|
11 | 11 | * or submit itself to any jurisdiction. |
12 | 12 | */ |
13 | 13 |
|
14 | | -import { DATA_EXPORT_TYPES } from '../../../domain/enums/DataExportTypes.js'; |
| 14 | +import { DATA_EXPORT_TYPES, DataExportTypes } from '../../../domain/enums/DataExportTypes.js'; |
15 | 15 | import errorAlert from '../errorAlert.js'; |
16 | 16 | import spinner from '../spinner.js'; |
17 | 17 | import { h } from '/js/src/index.js'; |
@@ -57,22 +57,27 @@ const exportForm = (exportModel, modalHandler) => { |
57 | 57 | h('label.form-check-label.f6', 'Select output format'), |
58 | 58 | ]; |
59 | 59 |
|
60 | | - const exportTypeSelect = h('.flex-row.g3', DATA_EXPORT_TYPES.map((exportType) => { |
61 | | - const id = `data-export-type-${exportType}`; |
62 | | - return h('.form-check', [ |
63 | | - h('input.form-check-input', { |
64 | | - id, |
65 | | - type: 'radio', |
66 | | - value: exportType, |
67 | | - checked: selectedExportType.length ? selectedExportType.includes(exportType) : false, |
68 | | - name: 'export-type', |
69 | | - onclick: () => exportModel.setSelectedExportType(exportType), |
70 | | - }), |
71 | | - h('label.form-check-label', { |
72 | | - for: id, |
73 | | - }, exportType), |
74 | | - ]); |
75 | | - })); |
| 60 | + const exportTypeSelect = h('.flex-row.g3', [ |
| 61 | + ...DATA_EXPORT_TYPES.map((exportType) => { |
| 62 | + const id = `data-export-type-${exportType}`; |
| 63 | + return h('.form-check', [ |
| 64 | + h('input.form-check-input', { |
| 65 | + id, |
| 66 | + type: 'radio', |
| 67 | + value: exportType, |
| 68 | + checked: selectedExportType.length ? selectedExportType.includes(exportType) : false, |
| 69 | + name: 'export-type', |
| 70 | + onclick: () => exportModel.setSelectedExportType(exportType), |
| 71 | + }), |
| 72 | + h('label.form-check-label', { |
| 73 | + for: id, |
| 74 | + }, exportType), |
| 75 | + |
| 76 | + ]); |
| 77 | + }), |
| 78 | + selectedExportType === DataExportTypes.CSV ? h('.f7.italic', 'For CSV export semicolon is used as delimeter') : null, |
| 79 | + |
| 80 | + ]); |
76 | 81 |
|
77 | 82 | const exportBtn = h('button.shadow-level1.btn.btn-success.mt2#send', { |
78 | 83 | disabled: !fieldsSelected, |
|
0 commit comments