Skip to content

Commit 28b3282

Browse files
author
Ivan Beloborodov
committed
phonology csv export
1 parent 0601040 commit 28b3282

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

‎src/components/PhonologyModal/graphql.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export const createPhonologyMutation = gql`
5353
$tiers: [String]!,
5454
$chartThreshold: Int!,
5555
$keepList: [Int]!,
56-
$joinList: [Int]!) {
56+
$joinList: [Int]!,
57+
$generateCsv: Boolean!) {
5758
phonology(perspective_id: $perspectiveId,
5859
vowel_selection: $vowelSelection,
5960
group_by_description: $groupByDescription,
@@ -62,7 +63,8 @@ export const createPhonologyMutation = gql`
6263
maybe_tier_list: $tiers,
6364
chart_threshold: $chartThreshold,
6465
keep_list: $keepList,
65-
join_list: $joinList) {
66+
join_list: $joinList,
67+
generate_csv: $generateCsv) {
6668
triumph
6769
}
6870
}

‎src/components/PhonologyModal/index.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class PhonologyModal extends React.Component {
2020
translationsMode: 'all',
2121
enabledGroup: false,
2222
chartThreshold: DEFAULT_CHART_THRESHOLD,
23+
enabledCsv: false,
2324
tierList: [],
2425
loadedTiers: false,
2526
enabledTiers: false,
@@ -185,6 +186,7 @@ class PhonologyModal extends React.Component {
185186
chartThreshold: this.state.chartThreshold,
186187
keepList: this.state.selectedKeepList,
187188
joinList: this.state.selectedJoinList,
189+
generateCsv: this.state.enabledCsv,
188190
},
189191
}).then(() => {
190192
window.logger.suc('Phonology is being created. Check out tasks for details.');
@@ -290,6 +292,16 @@ class PhonologyModal extends React.Component {
290292
</List.Item>
291293
</List>
292294

295+
<List>
296+
<List.Item>
297+
<Checkbox
298+
label="Export phonology data to a CSV file."
299+
checked={this.state.enabledCsv}
300+
onChange={(e, { checked }) => this.setState({ enabledCsv: checked })}
301+
/>
302+
</List.Item>
303+
</List>
304+
293305
<List>
294306
<List.Item>
295307
<Checkbox

‎src/components/TaskList/index.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function Task(props) {
2121
} = props;
2222

2323
const links = result_link_list.map(link => (
24-
<a href={link} key={link}>
25-
{link}
26-
</a>
24+
<div key={link}>
25+
<a href={link} key={link}>{link}</a>
26+
</div>
2727
));
2828

2929
return (

0 commit comments

Comments
 (0)