@genesislcap/pbc-reconciliation-ui 0.0.46 → 14.339.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +3 -0
- package/dist/dts/components/configurations-panel/configuration-datasources/configuration-datasources.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/configuration-datasources/configuration-datasources.template.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/configurations-panel.d.ts +2 -2
- package/dist/dts/components/configurations-panel/configurations-panel.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/configurations-panel.template.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.d.ts.map +1 -1
- package/dist/dts/components/data-dictionaries/columns.d.ts +2 -2
- package/dist/dts/components/data-dictionaries/columns.d.ts.map +1 -1
- package/dist/dts/components/data-dictionaries/data-dictionaries-utils.d.ts.map +1 -1
- package/dist/dts/components/data-dictionaries/data-dictionaries.d.ts +3 -6
- package/dist/dts/components/data-dictionaries/data-dictionaries.d.ts.map +1 -1
- package/dist/dts/components/data-dictionaries/data-dictionaries.template.d.ts +1 -1
- package/dist/dts/components/data-dictionaries/data-dictionaries.template.d.ts.map +1 -1
- package/dist/dts/components/data-dictionaries/data-dictionaries.types.d.ts +6 -0
- package/dist/dts/components/data-dictionaries/data-dictionaries.types.d.ts.map +1 -0
- package/dist/dts/components/list/list.d.ts.map +1 -1
- package/dist/dts/components/list/list.template.d.ts.map +1 -1
- package/dist/dts/components/rapid-components.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/columns.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.d.ts +3 -14
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.template.d.ts +1 -1
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.template.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.types.d.ts +13 -0
- package/dist/dts/components/reconciliations-panel/input-parameter/input-parameter.types.d.ts.map +1 -0
- package/dist/dts/components/reconciliations-panel/reconciliation-no-rows-overlay.d.ts +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliation-no-rows-overlay.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.styles.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.template.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.utils.d.ts +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.utils.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/result-details/result-details.d.ts +4 -33
- package/dist/dts/components/reconciliations-panel/result-details/result-details.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/result-details/result-details.template.d.ts +1 -1
- package/dist/dts/components/reconciliations-panel/result-details/result-details.template.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/result-details/result-details.types.d.ts +30 -0
- package/dist/dts/components/reconciliations-panel/result-details/result-details.types.d.ts.map +1 -0
- package/dist/dts/components/zero-components.d.ts.map +1 -1
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/config/configure.d.ts.map +1 -1
- package/dist/dts/config/templates.d.ts +2 -2
- package/dist/dts/config/templates.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +2 -2
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/reconciliation.types.d.ts +13 -13
- package/dist/dts/reconciliation.types.d.ts.map +1 -1
- package/dist/dts/sandbox.d.ts +2 -2
- package/dist/dts/sandbox.d.ts.map +1 -1
- package/dist/dts/services/document.service.d.ts.map +1 -1
- package/dist/dts/services/reconciliation-configuration.service.d.ts.map +1 -1
- package/dist/dts/services/reconciliation.service.d.ts.map +1 -1
- package/dist/dts/utils/delete-row-action-cell-renderer.d.ts.map +1 -1
- package/dist/dts/utils/endpoint.d.ts.map +1 -1
- package/dist/dts/utils/eventDetail.d.ts.map +1 -1
- package/dist/dts/utils/format-date.d.ts.map +1 -1
- package/dist/dts/utils/humanize.d.ts.map +1 -1
- package/dist/dts/utils/isEmpty.d.ts.map +1 -1
- package/dist/dts/utils/notification.d.ts.map +1 -1
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.js +3 -3
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.js.map +1 -1
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.styles.js +4 -4
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.styles.js.map +1 -1
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.template.js +1 -1
- package/dist/esm/components/configurations-panel/configuration-datasources/configuration-datasources.template.js.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.js +15 -11
- package/dist/esm/components/configurations-panel/configurations-panel.js.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.styles.js +346 -346
- package/dist/esm/components/configurations-panel/configurations-panel.styles.js.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.template.js +276 -278
- package/dist/esm/components/configurations-panel/configurations-panel.template.js.map +1 -1
- package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.js +3 -3
- package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.js.map +1 -1
- package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.styles.js +1 -1
- package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.js +1 -1
- package/dist/esm/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.js.map +1 -1
- package/dist/esm/components/data-dictionaries/columns.js +4 -4
- package/dist/esm/components/data-dictionaries/data-dictionaries-utils.js.map +1 -1
- package/dist/esm/components/data-dictionaries/data-dictionaries.js +7 -11
- package/dist/esm/components/data-dictionaries/data-dictionaries.js.map +1 -1
- package/dist/esm/components/data-dictionaries/data-dictionaries.styles.js +1 -1
- package/dist/esm/components/data-dictionaries/data-dictionaries.template.js +3 -3
- package/dist/esm/components/data-dictionaries/data-dictionaries.template.js.map +1 -1
- package/dist/esm/components/data-dictionaries/data-dictionaries.types.js +7 -0
- package/dist/esm/components/data-dictionaries/data-dictionaries.types.js.map +1 -0
- package/dist/esm/components/list/list.js +1 -1
- package/dist/esm/components/list/list.js.map +1 -1
- package/dist/esm/components/list/list.template.js.map +1 -1
- package/dist/esm/components/rapid-components.js +1 -2
- package/dist/esm/components/rapid-components.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/columns.js +9 -15
- package/dist/esm/components/reconciliations-panel/columns.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.js +8 -21
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.styles.js +7 -7
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.template.js +9 -12
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.template.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.types.js +16 -0
- package/dist/esm/components/reconciliations-panel/input-parameter/input-parameter.types.js.map +1 -0
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.js +40 -32
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.styles.js +300 -301
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.styles.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.template.js +335 -331
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.template.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.utils.js +9 -9
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.utils.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/result-details/result-details.js +24 -43
- package/dist/esm/components/reconciliations-panel/result-details/result-details.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/result-details/result-details.template.js +7 -7
- package/dist/esm/components/reconciliations-panel/result-details/result-details.template.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/result-details/result-details.types.js +17 -0
- package/dist/esm/components/reconciliations-panel/result-details/result-details.types.js.map +1 -0
- package/dist/esm/components/zero-components.js +2 -3
- package/dist/esm/components/zero-components.js.map +1 -1
- package/dist/esm/config/config.js.map +1 -1
- package/dist/esm/config/configure.js +1 -1
- package/dist/esm/config/configure.js.map +1 -1
- package/dist/esm/config/templates.js +1 -1
- package/dist/esm/main/main.js +4 -4
- package/dist/esm/main/main.js.map +1 -1
- package/dist/esm/main/main.styles.js +1 -0
- package/dist/esm/main/main.styles.js.map +1 -1
- package/dist/esm/main/main.template.js +8 -7
- package/dist/esm/main/main.template.js.map +1 -1
- package/dist/esm/sandbox.js +15 -8
- package/dist/esm/sandbox.js.map +1 -1
- package/dist/esm/services/data-dictionary.service.js +6 -6
- package/dist/esm/services/data-dictionary.service.js.map +1 -1
- package/dist/esm/services/document.service.js +3 -4
- package/dist/esm/services/document.service.js.map +1 -1
- package/dist/esm/services/reconciliation-configuration.service.js +3 -1
- package/dist/esm/services/reconciliation-configuration.service.js.map +1 -1
- package/dist/esm/services/reconciliation.service.js +8 -5
- package/dist/esm/services/reconciliation.service.js.map +1 -1
- package/dist/esm/utils/delete-row-action-cell-renderer.js +1 -3
- package/dist/esm/utils/delete-row-action-cell-renderer.js.map +1 -1
- package/dist/esm/utils/endpoint.js.map +1 -1
- package/dist/esm/utils/humanize.js.map +1 -1
- package/dist/esm/utils/icons.js +1 -1
- package/dist/esm/utils/isEmpty.js.map +1 -1
- package/dist/esm/utils/notification.js +1 -1
- package/dist/esm/utils/notification.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/license.txt +46 -0
- package/package.json +31 -30
- package/src/components/configurations-panel/configuration-datasources/configuration-datasources.styles.ts +72 -0
- package/src/components/configurations-panel/configuration-datasources/configuration-datasources.template.ts +73 -0
- package/src/components/configurations-panel/configuration-datasources/configuration-datasources.ts +64 -0
- package/src/components/configurations-panel/configurations-panel.styles.ts +363 -0
- package/src/components/configurations-panel/configurations-panel.template.ts +356 -0
- package/src/components/configurations-panel/configurations-panel.ts +387 -0
- package/src/components/configurations-panel/recon-rules-columns.ts +117 -0
- package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.styles.ts +73 -0
- package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.template.ts +122 -0
- package/src/components/configurations-panel/reconciliation-rule-row/reconciliation-rule-row.ts +202 -0
- package/src/components/data-dictionaries/columns.ts +42 -0
- package/src/components/data-dictionaries/data-dictionaries-utils.ts +40 -0
- package/src/components/data-dictionaries/data-dictionaries.styles.ts +92 -0
- package/src/components/data-dictionaries/data-dictionaries.template.ts +78 -0
- package/src/components/data-dictionaries/data-dictionaries.ts +236 -0
- package/src/components/data-dictionaries/data-dictionaries.types.ts +5 -0
- package/src/components/list/list.styles.ts +88 -0
- package/src/components/list/list.template.ts +36 -0
- package/src/components/list/list.ts +33 -0
- package/src/components/rapid-components.ts +69 -0
- package/src/components/reconciliations-panel/columns.ts +74 -0
- package/src/components/reconciliations-panel/input-parameter/input-parameter.styles.ts +104 -0
- package/src/components/reconciliations-panel/input-parameter/input-parameter.template.ts +93 -0
- package/src/components/reconciliations-panel/input-parameter/input-parameter.ts +131 -0
- package/src/components/reconciliations-panel/input-parameter/input-parameter.types.ts +14 -0
- package/src/components/reconciliations-panel/reconciliation-no-rows-overlay.ts +18 -0
- package/src/components/reconciliations-panel/reconciliations-panel.styles.ts +328 -0
- package/src/components/reconciliations-panel/reconciliations-panel.template.ts +432 -0
- package/src/components/reconciliations-panel/reconciliations-panel.ts +441 -0
- package/src/components/reconciliations-panel/reconciliations-panel.utils.ts +103 -0
- package/src/components/reconciliations-panel/result-details/result-details.styles.ts +108 -0
- package/src/components/reconciliations-panel/result-details/result-details.template.ts +88 -0
- package/src/components/reconciliations-panel/result-details/result-details.ts +200 -0
- package/src/components/reconciliations-panel/result-details/result-details.types.ts +30 -0
- package/src/components/zero-components.ts +61 -0
- package/src/config/config.ts +49 -0
- package/src/config/configure.ts +72 -0
- package/src/config/index.ts +2 -0
- package/src/config/templates.ts +80 -0
- package/src/globals.d.ts +7 -0
- package/src/index.federated.ts +1 -0
- package/src/index.ts +3 -0
- package/src/main/index.ts +3 -0
- package/src/main/main.styles.ts +33 -0
- package/src/main/main.template.ts +65 -0
- package/src/main/main.ts +153 -0
- package/src/reconciliation.types.ts +170 -0
- package/src/sandbox.ts +40 -0
- package/src/services/data-dictionary.service.ts +64 -0
- package/src/services/document.service.ts +72 -0
- package/src/services/reconciliation-configuration.service.ts +105 -0
- package/src/services/reconciliation.service.ts +120 -0
- package/src/styles/scrollbar.styles.ts +15 -0
- package/src/tags/index.ts +1 -0
- package/src/tags/tags.ts +143 -0
- package/src/typings.d.ts +1 -0
- package/src/utils/delete-row-action-cell-renderer.ts +71 -0
- package/src/utils/endpoint.ts +15 -0
- package/src/utils/eventDetail.ts +5 -0
- package/src/utils/format-date.ts +9 -0
- package/src/utils/humanize.ts +14 -0
- package/src/utils/icons.ts +24 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/isEmpty.ts +2 -0
- package/src/utils/logger.ts +3 -0
- package/src/utils/notification.ts +35 -0
- package/tsconfig.json +45 -0
- package/Dockerfile +0 -12
- package/docs/images/lsp_jetbrains_one.png +0 -0
- package/docs/images/lsp_jetbrains_two.png +0 -0
- package/docs/images/lsp_vscode_one.png +0 -0
- package/docs/images/lsp_vscode_two.png +0 -0
- package/playwright.config.ts +0 -1
- package/test/README.md +0 -3
- package/test/e2e/fixture.ts +0 -25
- package/test/e2e/flows/001-protected.e2e.ts +0 -6
- package/test/e2e/index.ts +0 -2
- package/test/e2e/pages/index.ts +0 -1
- package/test/e2e/pages/protected.ts +0 -16
- package/test/unit/mock/services/data-dictionary-service-mock.ts +0 -15
- package/test/unit/mock/services/reconciliation-configuration-service-mock.ts +0 -26
- package/test/unit/mock/services/reconciliation-service-mock.ts +0 -11
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { showNotificationDialog } from '@genesislcap/foundation-notifications';
|
|
2
|
+
import { DOM, GenesisElement, customElement, observable } from '@genesislcap/web-core';
|
|
3
|
+
import {
|
|
4
|
+
Configuration,
|
|
5
|
+
ReconciliationFrequency,
|
|
6
|
+
ConfigurationMode,
|
|
7
|
+
DataDictionary,
|
|
8
|
+
DataDictionaryField,
|
|
9
|
+
Datasource,
|
|
10
|
+
ReconConfigurationRule,
|
|
11
|
+
ReconciliationMethod,
|
|
12
|
+
DatasourceType,
|
|
13
|
+
} from '../../reconciliation.types';
|
|
14
|
+
import { DataDictionaryService } from '../../services/data-dictionary.service';
|
|
15
|
+
import { ReconciliationConfigurationService } from '../../services/reconciliation-configuration.service';
|
|
16
|
+
import { logger } from '../../utils';
|
|
17
|
+
import { isEmpty } from '../../utils/isEmpty';
|
|
18
|
+
import { showNotificationError, showNotificationErrors } from '../../utils/notification';
|
|
19
|
+
import { ConfigurationDatasources } from './configuration-datasources/configuration-datasources';
|
|
20
|
+
import { ConfigurationsPanelStyles } from './configurations-panel.styles';
|
|
21
|
+
import { ConfigurationsPanelTemplate } from './configurations-panel.template';
|
|
22
|
+
|
|
23
|
+
export type DatasourceEdit = {
|
|
24
|
+
IS_EDITING: boolean;
|
|
25
|
+
} & Datasource;
|
|
26
|
+
|
|
27
|
+
@customElement({
|
|
28
|
+
name: 'configurations-panel',
|
|
29
|
+
template: ConfigurationsPanelTemplate,
|
|
30
|
+
styles: ConfigurationsPanelStyles,
|
|
31
|
+
})
|
|
32
|
+
export class ConfigurationsPanel extends GenesisElement {
|
|
33
|
+
@ReconciliationConfigurationService
|
|
34
|
+
reconciliationConfigurationService: ReconciliationConfigurationService;
|
|
35
|
+
@DataDictionaryService dataDictionaryService: DataDictionaryService;
|
|
36
|
+
@observable configurations: Array<Configuration> = [];
|
|
37
|
+
@observable datasources: Array<DatasourceEdit> = [];
|
|
38
|
+
@observable dataDictionaries: Array<DataDictionary> = [];
|
|
39
|
+
|
|
40
|
+
@observable selectedConfiguration: Configuration = null;
|
|
41
|
+
@observable configurationName: string = null;
|
|
42
|
+
@observable reconciliationFrequency: string = ReconciliationFrequency.BATCH;
|
|
43
|
+
@observable reconciliationStrategy: string = ReconciliationMethod.ONE_TO_ONE;
|
|
44
|
+
@observable dataDictionaryId: string = '';
|
|
45
|
+
@observable configurationMode: (typeof ConfigurationMode)[keyof typeof ConfigurationMode];
|
|
46
|
+
@observable showConfigurationDetails: boolean = false;
|
|
47
|
+
@observable matchNull: boolean = false;
|
|
48
|
+
|
|
49
|
+
@observable reconRules: Array<ReconConfigurationRule> = [];
|
|
50
|
+
@observable dataDictionaryFields: Array<DataDictionaryField> = []; // Keep in both
|
|
51
|
+
@observable filteredRuleFields: Array<DataDictionaryField> = []; // Keep in both
|
|
52
|
+
@observable firstDatasource: ConfigurationDatasources;
|
|
53
|
+
@observable secondDatasource: ConfigurationDatasources;
|
|
54
|
+
@observable primaryDatasource: string;
|
|
55
|
+
@observable dataPipelineList = [];
|
|
56
|
+
|
|
57
|
+
async connectedCallback() {
|
|
58
|
+
super.connectedCallback();
|
|
59
|
+
await this.setConfigurations();
|
|
60
|
+
await this.setDataDictionaries();
|
|
61
|
+
await this.setDataPipelines();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async setConfigurations() {
|
|
65
|
+
this.configurations =
|
|
66
|
+
await this.reconciliationConfigurationService.getReconciliationConfigurations();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async setDataPipelines() {
|
|
70
|
+
const response = await this.reconciliationConfigurationService.getReconciliationDataPipelines();
|
|
71
|
+
this.dataPipelineList =
|
|
72
|
+
this.reconciliationFrequency === ReconciliationFrequency.BATCH
|
|
73
|
+
? response.BATCH_DATA_SOURCE_NAMES
|
|
74
|
+
: response.REAL_TIME_DATA_SOURCE_NAMES;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
async setDataDictionaries() {
|
|
78
|
+
this.dataDictionaries = await this.dataDictionaryService.getDataDictionaries();
|
|
79
|
+
this.dataDictionaryId = this.dataDictionaries[0]?.DICTIONARY_ID;
|
|
80
|
+
this.dataDictionaryChanged();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async dataDictionaryChanged() {
|
|
84
|
+
const fields = await this.dataDictionaryService.getDataDictionaryFields(this.dataDictionaryId);
|
|
85
|
+
this.dataDictionaryFields = fields;
|
|
86
|
+
this.filteredRuleFields = fields;
|
|
87
|
+
this.reconRules = [];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
addConfiguration() {
|
|
91
|
+
this.configurationMode = ConfigurationMode.CREATE;
|
|
92
|
+
this.reset();
|
|
93
|
+
this.dataDictionaryChanged();
|
|
94
|
+
this.showConfigurationDetails = true;
|
|
95
|
+
DOM.queueUpdate(() => {
|
|
96
|
+
this.resetDatasources();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
resetDatasources() {
|
|
101
|
+
this.firstDatasource.setDefaultDatasource('Datasource 1');
|
|
102
|
+
this.secondDatasource.setDefaultDatasource('Datasource 2');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
reset() {
|
|
106
|
+
this.selectedConfiguration = {};
|
|
107
|
+
this.configurationName = null;
|
|
108
|
+
this.datasources = [];
|
|
109
|
+
this.reconRules = [];
|
|
110
|
+
this.dataDictionaryId =
|
|
111
|
+
this.dataDictionaries.length > 0 ? this.dataDictionaries[0].DICTIONARY_ID : '';
|
|
112
|
+
this.matchNull = false;
|
|
113
|
+
this.primaryDatasource = null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async selectConfiguration(configuration: Configuration) {
|
|
117
|
+
this.reset();
|
|
118
|
+
|
|
119
|
+
this.configurationMode = ConfigurationMode.EDIT;
|
|
120
|
+
this.reconciliationStrategy = configuration.RECONCILIATION_STRATEGY;
|
|
121
|
+
this.primaryDatasource = configuration.PRIMARY_DATASOURCE;
|
|
122
|
+
this.selectedConfiguration = configuration;
|
|
123
|
+
this.configurationName = configuration.NAME;
|
|
124
|
+
this.dataDictionaryId = configuration.DICTIONARY_ID;
|
|
125
|
+
const fields = await this.dataDictionaryService.getDataDictionaryFields(this.dataDictionaryId);
|
|
126
|
+
this.dataDictionaryFields = fields;
|
|
127
|
+
const configurationRules =
|
|
128
|
+
await this.reconciliationConfigurationService.getReconciliationConfigurationRules(
|
|
129
|
+
configuration.RECONCILIATION_CONFIG_ID,
|
|
130
|
+
);
|
|
131
|
+
this.reconRules =
|
|
132
|
+
configurationRules.map((rule) => {
|
|
133
|
+
return {
|
|
134
|
+
...rule,
|
|
135
|
+
FIELD_TYPE: this.dataDictionaryFields.find(
|
|
136
|
+
(field) => field.FIELD_NAME === rule.FIELD_NAME,
|
|
137
|
+
).FIELD_TYPE,
|
|
138
|
+
};
|
|
139
|
+
}) || [];
|
|
140
|
+
this.filterReconRuleFields();
|
|
141
|
+
const dataSourceConfig =
|
|
142
|
+
await this.reconciliationConfigurationService.getReconciliationDatasourceConfiguration(
|
|
143
|
+
configuration.RECONCILIATION_CONFIG_ID,
|
|
144
|
+
);
|
|
145
|
+
this.matchNull = configuration.MATCH_NULL;
|
|
146
|
+
this.showConfigurationDetails = true;
|
|
147
|
+
this.datasources = dataSourceConfig;
|
|
148
|
+
DOM.queueUpdate(() => {
|
|
149
|
+
if (this.reconciliationStrategy === ReconciliationMethod.ONE_TO_ONE) {
|
|
150
|
+
this.firstDatasource.setDatasource(this.datasources[0]);
|
|
151
|
+
this.secondDatasource.setDatasource(this.datasources[1]);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
deleteConfiguration(index: number) {
|
|
157
|
+
showNotificationDialog(
|
|
158
|
+
{
|
|
159
|
+
title: 'Confirm Delete',
|
|
160
|
+
body: `Do you really want to delete "${this.configurations[index].NAME}"?`,
|
|
161
|
+
dialog: {
|
|
162
|
+
dismissingAction: {
|
|
163
|
+
label: 'Dismiss',
|
|
164
|
+
action: () => null,
|
|
165
|
+
},
|
|
166
|
+
confirmingActions: [
|
|
167
|
+
{
|
|
168
|
+
label: 'Confirm',
|
|
169
|
+
action: async () => {
|
|
170
|
+
const response: any =
|
|
171
|
+
await this.reconciliationConfigurationService.deleteReconciliationConfiguration(
|
|
172
|
+
this.configurations[index].RECONCILIATION_CONFIG_ID,
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
if (response.MESSAGE_TYPE !== 'EVENT_ACK') {
|
|
176
|
+
showNotificationError(response.ERROR);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
this.configurations.splice(index, 1);
|
|
181
|
+
this.showConfigurationDetails = false;
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
'rapid',
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@observable isEditingDatasourceName: boolean = false;
|
|
192
|
+
|
|
193
|
+
addDataSource(datasource: Datasource) {
|
|
194
|
+
this.datasources.push({
|
|
195
|
+
NAME: datasource.NAME ?? `Data Source ${this.datasources.length + 1}`,
|
|
196
|
+
TYPE: datasource.TYPE,
|
|
197
|
+
CONFIG_DATA: datasource.CONFIG_DATA,
|
|
198
|
+
IS_EDITING: false,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
deleteDataSource(index: number) {
|
|
203
|
+
if (this.configurationMode === ConfigurationMode.CREATE) {
|
|
204
|
+
this.datasources.splice(index, 1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
setDatasources() {
|
|
209
|
+
const datasourcesList = [];
|
|
210
|
+
if (
|
|
211
|
+
this.configurationMode === ConfigurationMode.CREATE &&
|
|
212
|
+
this.reconciliationStrategy === ReconciliationMethod.ONE_TO_ONE
|
|
213
|
+
) {
|
|
214
|
+
datasourcesList.push(this.firstDatasource.getDatasource(0));
|
|
215
|
+
datasourcesList.push(this.secondDatasource.getDatasource(1));
|
|
216
|
+
this.datasources = datasourcesList;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
transformDatasources() {
|
|
220
|
+
return this.datasources.map((dataSource, index) => {
|
|
221
|
+
return {
|
|
222
|
+
...dataSource,
|
|
223
|
+
INDEX: index,
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
validateDatasources() {
|
|
229
|
+
let validate = true;
|
|
230
|
+
this.datasources.forEach((element) => {
|
|
231
|
+
if (element.TYPE === DatasourceType.PIPELINE && isEmpty(element.CONFIG_DATA)) {
|
|
232
|
+
validate = false;
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
return validate;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
validateConfiguration() {
|
|
240
|
+
const errors = [];
|
|
241
|
+
if (!this.configurationName || !this.dataDictionaryId || this.datasources.length === 0) {
|
|
242
|
+
errors.push({ CODE: 'Missing fields', TEXT: 'Please fill in all required fields.' });
|
|
243
|
+
}
|
|
244
|
+
if (
|
|
245
|
+
this.reconciliationStrategy === ReconciliationMethod.ONE_TO_MANY &&
|
|
246
|
+
!this.primaryDatasource
|
|
247
|
+
) {
|
|
248
|
+
errors.push({
|
|
249
|
+
CODE: 'Missing primary datasource',
|
|
250
|
+
TEXT: 'Please provide primary datasource for 1:N reconciliation strategy',
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (!this.validateDatasources()) {
|
|
254
|
+
errors.push({
|
|
255
|
+
CODE: 'Missing Pipeline source',
|
|
256
|
+
TEXT: 'Data Pipeline Source required',
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
return errors;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
saveConfiguration() {
|
|
263
|
+
this.setDatasources();
|
|
264
|
+
const errors = this.validateConfiguration();
|
|
265
|
+
if (errors.length > 0) {
|
|
266
|
+
showNotificationErrors(errors);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
let reqObject: Configuration;
|
|
270
|
+
switch (this.configurationMode) {
|
|
271
|
+
case ConfigurationMode.CREATE:
|
|
272
|
+
reqObject = {
|
|
273
|
+
DICTIONARY_ID: this.dataDictionaryId,
|
|
274
|
+
RECONCILIATION_STRATEGY: this.reconciliationStrategy,
|
|
275
|
+
NAME: this.configurationName,
|
|
276
|
+
RULES: this.reconRules,
|
|
277
|
+
DATASOURCES: this.transformDatasources(),
|
|
278
|
+
MATCH_NULL: this.matchNull,
|
|
279
|
+
PRIMARY_DATASOURCE_NAME: this.primaryDatasource,
|
|
280
|
+
};
|
|
281
|
+
this.reconciliationConfigurationService
|
|
282
|
+
.createReconciliationConfiguration(reqObject)
|
|
283
|
+
.then((response) => this.validateResponse(response));
|
|
284
|
+
break;
|
|
285
|
+
case ConfigurationMode.EDIT:
|
|
286
|
+
reqObject = {
|
|
287
|
+
RECONCILIATION_CONFIG_ID: this.selectedConfiguration.RECONCILIATION_CONFIG_ID,
|
|
288
|
+
DICTIONARY_ID: this.dataDictionaryId,
|
|
289
|
+
RECONCILIATION_STRATEGY: this.selectedConfiguration.RECONCILIATION_STRATEGY,
|
|
290
|
+
NAME: this.configurationName,
|
|
291
|
+
RULES: this.reconRules,
|
|
292
|
+
DATASOURCES: this.datasources,
|
|
293
|
+
MATCH_NULL: this.matchNull,
|
|
294
|
+
PRIMARY_DATASOURCE: this.primaryDatasource,
|
|
295
|
+
};
|
|
296
|
+
this.reconciliationConfigurationService
|
|
297
|
+
.updateReconciliationConfiguration(reqObject)
|
|
298
|
+
.then((response) => this.validateResponse(response));
|
|
299
|
+
break;
|
|
300
|
+
default:
|
|
301
|
+
logger.error(`Unknown operation ${this.configurationMode}`);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
async validateResponse(response) {
|
|
306
|
+
if (response.MESSAGE_TYPE === 'EVENT_ACK') {
|
|
307
|
+
this.configurations =
|
|
308
|
+
await this.reconciliationConfigurationService.getReconciliationConfigurations();
|
|
309
|
+
|
|
310
|
+
if (this.configurationMode === ConfigurationMode.CREATE) {
|
|
311
|
+
this.selectedConfiguration = this.configurations.find(
|
|
312
|
+
(configuration) =>
|
|
313
|
+
configuration.RECONCILIATION_CONFIG_ID ===
|
|
314
|
+
response.GENERATED[0].RECONCILIATION_CONFIG_ID,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
this.configurationMode = ConfigurationMode.EDIT;
|
|
319
|
+
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
showNotificationError(response.ERROR);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
addReconRule(rule) {
|
|
327
|
+
if (this.reconRules.some((r) => r.FIELD_NAME === rule.FIELD_NAME)) {
|
|
328
|
+
showNotificationError([
|
|
329
|
+
{
|
|
330
|
+
CODE: 'Duplicate Field',
|
|
331
|
+
TEXT: 'Field already exists in the reconciliation rules.',
|
|
332
|
+
},
|
|
333
|
+
]);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
this.reconRules.push(rule);
|
|
337
|
+
this.filterReconRuleFields();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
filterReconRuleFields() {
|
|
341
|
+
this.filteredRuleFields = this.dataDictionaryFields.filter(
|
|
342
|
+
(field) => !this.reconRules.some((rule) => rule.FIELD_NAME === field.FIELD_NAME),
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
removeRule(index) {
|
|
347
|
+
this.reconRules.splice(index, 1);
|
|
348
|
+
this.filterReconRuleFields();
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
updateRule(rule, index) {
|
|
352
|
+
this.reconRules.splice(index, 1, rule);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
clearReconciliationRules() {
|
|
356
|
+
this.reconRules = [];
|
|
357
|
+
this.filterReconRuleFields();
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
public onPrimaryDatasourceChange = (selection) => {
|
|
361
|
+
this.primaryDatasource = selection;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
datasourceNameChanged(evt, index) {
|
|
365
|
+
const { value } = evt.target;
|
|
366
|
+
if (this.datasources[index].NAME === this.primaryDatasource) {
|
|
367
|
+
this.primaryDatasource = value;
|
|
368
|
+
}
|
|
369
|
+
this.datasources[index].NAME = value;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
clearDatasources() {
|
|
373
|
+
this.datasources.splice(0, this.datasources.length);
|
|
374
|
+
this.primaryDatasource = null;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
reconStrategyChanged() {
|
|
378
|
+
if (
|
|
379
|
+
this.configurationMode === ConfigurationMode.CREATE &&
|
|
380
|
+
this.reconciliationStrategy === ReconciliationMethod.ONE_TO_ONE
|
|
381
|
+
) {
|
|
382
|
+
DOM.queueUpdate(() => {
|
|
383
|
+
this.resetDatasources();
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// import {
|
|
2
|
+
// RapidAgSelectRenderer,
|
|
3
|
+
// RapidBooleanRenderer,
|
|
4
|
+
// RapidNumberEditor,
|
|
5
|
+
// } from '@genesislcap/rapid-grid-pro';
|
|
6
|
+
// import { iconTag } from '../../tags';
|
|
7
|
+
// import { DeleteRowActionCellRenderer } from '../../utils/delete-row-action-cell-renderer';
|
|
8
|
+
|
|
9
|
+
// export const RECON_RULES_FIELDS_COLUMNS = (context) => [
|
|
10
|
+
// {
|
|
11
|
+
// field: 'FIELD_NAME',
|
|
12
|
+
// headerName: 'Field',
|
|
13
|
+
// editable: false,
|
|
14
|
+
// suppressMenu: true,
|
|
15
|
+
// resizable: false,
|
|
16
|
+
// sortable: false,
|
|
17
|
+
// flex: 2,
|
|
18
|
+
// },
|
|
19
|
+
// {
|
|
20
|
+
// field: 'FIELD_TYPE',
|
|
21
|
+
// headerName: 'Type',
|
|
22
|
+
// editable: false,
|
|
23
|
+
// suppressMenu: true,
|
|
24
|
+
// resizable: false,
|
|
25
|
+
// sortable: false,
|
|
26
|
+
// flex: 2,
|
|
27
|
+
// },
|
|
28
|
+
// {
|
|
29
|
+
// field: 'TOLERANCE_TYPE',
|
|
30
|
+
// headerName: 'Type',
|
|
31
|
+
// editable: true,
|
|
32
|
+
// suppressMenu: false,
|
|
33
|
+
// resizable: false,
|
|
34
|
+
// sortable: false,
|
|
35
|
+
// cellStyle: {
|
|
36
|
+
// overflow: 'visible',
|
|
37
|
+
// paddingLeft: 0,
|
|
38
|
+
// paddingRight: 0,
|
|
39
|
+
// },
|
|
40
|
+
// // cellRenderer: RapidAgSelectRenderer,
|
|
41
|
+
// cellRendererParams: {
|
|
42
|
+
// accessor: 'TOLERANCE_TYPE',
|
|
43
|
+
// defaultValue: 'Select filter',
|
|
44
|
+
// onSelect: (value, params) => context.resetToleranceValue(value, params),
|
|
45
|
+
// options: (data) =>
|
|
46
|
+
// Object.values(context.getToleranceTypes(data.FIELD_TYPE)).map((value) => ({
|
|
47
|
+
// name: value,
|
|
48
|
+
// displayName: value,
|
|
49
|
+
// })),
|
|
50
|
+
// },
|
|
51
|
+
// cellEditor: RapidAgSelectRenderer,
|
|
52
|
+
// cellEditorParams: (params) => {
|
|
53
|
+
// debugger;
|
|
54
|
+
// console.log(params);
|
|
55
|
+
// return { values: context.getToleranceTypes(params.data.FIELD_TYPE) };
|
|
56
|
+
// },
|
|
57
|
+
// flex: 2,
|
|
58
|
+
// },
|
|
59
|
+
// {
|
|
60
|
+
// field: 'TOLERANCE_VALUE',
|
|
61
|
+
// headerName: '',
|
|
62
|
+
// editable: true,
|
|
63
|
+
// suppressMenu: true,
|
|
64
|
+
// resizable: false,
|
|
65
|
+
// sortable: false,
|
|
66
|
+
// cellEditor: RapidNumberEditor,
|
|
67
|
+
// cellEditorParams: (params) => {
|
|
68
|
+
// console.log(params);
|
|
69
|
+
// onChange: context.gridToleranceValueChanged(
|
|
70
|
+
// params.data.TOLERANCE_TYPE,
|
|
71
|
+
// params.data.TOLERANCE_VALUE,
|
|
72
|
+
// );
|
|
73
|
+
// },
|
|
74
|
+
// // cellRenderer: RapidNumberEditor,
|
|
75
|
+
// // cellRendererParams: {
|
|
76
|
+
// // onChange: (params) => context.gridToleranceValueChanged(params.data.TOLERANCE_TYPE,params.data.TOLERANCE_VALUE),
|
|
77
|
+
// // },
|
|
78
|
+
// flex: 2,
|
|
79
|
+
// },
|
|
80
|
+
// {
|
|
81
|
+
// field: 'IS_PRIMARY_KEY',
|
|
82
|
+
// headerName: 'PRIMARY KEY',
|
|
83
|
+
// suppressMenu: true,
|
|
84
|
+
// resizable: false,
|
|
85
|
+
// editable: true,
|
|
86
|
+
// sortable: false,
|
|
87
|
+
// cellRenderer: RapidBooleanRenderer,
|
|
88
|
+
// flex: 2,
|
|
89
|
+
// },
|
|
90
|
+
// {
|
|
91
|
+
// headerName: '',
|
|
92
|
+
// suppressMenu: true,
|
|
93
|
+
// resizable: false,
|
|
94
|
+
// sortable: false,
|
|
95
|
+
// flex: 1,
|
|
96
|
+
// cellStyle: () => ({
|
|
97
|
+
// display: 'flex',
|
|
98
|
+
// alignItems: 'center',
|
|
99
|
+
// }),
|
|
100
|
+
// cellRenderer: DeleteRowActionCellRenderer,
|
|
101
|
+
// cellRendererParams: (params) => {
|
|
102
|
+
// const deleteButton = {
|
|
103
|
+
// name: `<${iconTag} name="minus" size="lg"></${iconTag}>`,
|
|
104
|
+
// callback: (detail) => {
|
|
105
|
+
// context.removeRowEvent(params.data);
|
|
106
|
+
// },
|
|
107
|
+
// actionName: 'Delete',
|
|
108
|
+
// };
|
|
109
|
+
// const actions = [deleteButton];
|
|
110
|
+
// const enabled = true;
|
|
111
|
+
// return {
|
|
112
|
+
// actions,
|
|
113
|
+
// enabled,
|
|
114
|
+
// };
|
|
115
|
+
// },
|
|
116
|
+
// },
|
|
117
|
+
// ];
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
2
|
+
import { buttonTag, numberFieldTag, selectTag, textFieldTag } from '../../../tags';
|
|
3
|
+
|
|
4
|
+
export const ReconciliationRuleRowStyles = css`
|
|
5
|
+
.recon-rule-row {
|
|
6
|
+
display: flex;
|
|
7
|
+
gap: calc(var(--design-unit) * 3px);
|
|
8
|
+
align-items: center;
|
|
9
|
+
padding: 0 calc(var(--design-unit) * 4px);
|
|
10
|
+
font-size: var(--type-ramp-minus-2-font-size);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.col-width {
|
|
14
|
+
width: 20%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.col-width-5 {
|
|
18
|
+
width: 5%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.col-width-30 {
|
|
22
|
+
width: 30%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.overflow {
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.col-width-30 ${selectTag} {
|
|
32
|
+
min-width: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.col-width ${numberFieldTag}::part(label) {
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.col-center {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
${buttonTag}.add-rule-btn::part(control) {
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.add-rule-btn {
|
|
49
|
+
display: flex;
|
|
50
|
+
margin: 0;
|
|
51
|
+
background-color: rgb(122 204 121 / 50%);
|
|
52
|
+
min-width: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
53
|
+
width: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
54
|
+
height: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.delete-rule-btn {
|
|
58
|
+
display: flex;
|
|
59
|
+
margin: 0;
|
|
60
|
+
background-color: var(--error-color);
|
|
61
|
+
min-width: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
62
|
+
width: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
63
|
+
height: calc(var(--base-height-multiplier) * (var(--design-unit) - 1) * 1px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${buttonTag}.delete-rule-btn::part(control) {
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${textFieldTag} {
|
|
71
|
+
margin: 0;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { html, repeat, sync, when } from '@genesislcap/web-core';
|
|
2
|
+
import { ToleranceType, RuleMode } from '../../../reconciliation.types';
|
|
3
|
+
import {
|
|
4
|
+
buttonTag,
|
|
5
|
+
checkboxTag,
|
|
6
|
+
iconTag,
|
|
7
|
+
numberFieldTag,
|
|
8
|
+
optionTag,
|
|
9
|
+
selectTag,
|
|
10
|
+
textFieldTag,
|
|
11
|
+
} from '../../../tags';
|
|
12
|
+
import { ReconciliationRuleRow } from './reconciliation-rule-row';
|
|
13
|
+
|
|
14
|
+
export const ReconciliationRuleRowTemplate = html<ReconciliationRuleRow>`
|
|
15
|
+
<div class="recon-rule-row">
|
|
16
|
+
${when(
|
|
17
|
+
(x) => x.mode === RuleMode.ADD,
|
|
18
|
+
html`
|
|
19
|
+
<div class="col-width-30">
|
|
20
|
+
<${selectTag}
|
|
21
|
+
:value=${sync((x) => x.fieldName)}
|
|
22
|
+
@change= ${(x) => x.dataDictionaryFieldChanged()}
|
|
23
|
+
>
|
|
24
|
+
<${optionTag} value="">Select Field</${optionTag}>
|
|
25
|
+
${repeat(
|
|
26
|
+
(x) => x.filteredRuleFields,
|
|
27
|
+
html`
|
|
28
|
+
<${optionTag} :value=${(x) => x.FIELD_NAME}>
|
|
29
|
+
${(x) => x.FIELD_NAME}
|
|
30
|
+
</${optionTag}>
|
|
31
|
+
`,
|
|
32
|
+
)}
|
|
33
|
+
</${selectTag}>
|
|
34
|
+
</div>
|
|
35
|
+
`,
|
|
36
|
+
)}
|
|
37
|
+
|
|
38
|
+
${when(
|
|
39
|
+
(x) => x.mode === RuleMode.EDIT,
|
|
40
|
+
html`
|
|
41
|
+
<div class="col-width-30 overflow">${(x) => x.fieldName}</div>
|
|
42
|
+
`,
|
|
43
|
+
)}
|
|
44
|
+
|
|
45
|
+
<div class="col-width">
|
|
46
|
+
${when(
|
|
47
|
+
(x) => x.mode === RuleMode.ADD,
|
|
48
|
+
html`
|
|
49
|
+
<${textFieldTag} :value=${sync((x) => x.fieldType)} disabled></${textFieldTag}>
|
|
50
|
+
`,
|
|
51
|
+
)}
|
|
52
|
+
|
|
53
|
+
${when(
|
|
54
|
+
(x) => x.mode === RuleMode.EDIT,
|
|
55
|
+
html`
|
|
56
|
+
${(x) => x.fieldType}
|
|
57
|
+
`,
|
|
58
|
+
)}
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div class="col-width-30">
|
|
62
|
+
<${selectTag}
|
|
63
|
+
:value=${sync((x) => x.toleranceType)}
|
|
64
|
+
@change=${(x) => x.tolTypeChanged()}
|
|
65
|
+
>
|
|
66
|
+
${repeat(
|
|
67
|
+
(x) => x.toleranceTypes,
|
|
68
|
+
html`
|
|
69
|
+
<${optionTag} :value=${(x) => x}>
|
|
70
|
+
${(x) => x}
|
|
71
|
+
</${optionTag}>
|
|
72
|
+
`,
|
|
73
|
+
)}
|
|
74
|
+
</${selectTag}>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="col-width">
|
|
78
|
+
${when(
|
|
79
|
+
(x) => x.toleranceType !== ToleranceType.EQUALITY && x.toleranceType !== null,
|
|
80
|
+
html`
|
|
81
|
+
<${numberFieldTag}
|
|
82
|
+
:value=${sync((x) => x.toleranceValue)}
|
|
83
|
+
@input=${(x, c) => x.toleranceValChanged(c.event as CustomEvent)}>
|
|
84
|
+
</${numberFieldTag}>
|
|
85
|
+
`,
|
|
86
|
+
)}
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="col-width col-center">
|
|
90
|
+
${when(
|
|
91
|
+
(x) => x.mode === RuleMode.EDIT,
|
|
92
|
+
html`
|
|
93
|
+
<${checkboxTag}
|
|
94
|
+
:checked=${(x) => x.isMatchKey}
|
|
95
|
+
@click=${(x) => x.togglePrimaryKey()}
|
|
96
|
+
>
|
|
97
|
+
</${checkboxTag}>
|
|
98
|
+
`,
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="col-width-5">
|
|
103
|
+
${when(
|
|
104
|
+
(x) => x.mode === RuleMode.ADD,
|
|
105
|
+
html`
|
|
106
|
+
<${buttonTag} class="add-rule-btn" @click=${(x) => x.addRule()}>
|
|
107
|
+
<${iconTag} name="plus" size="md"></${iconTag}>
|
|
108
|
+
</${buttonTag}>
|
|
109
|
+
`,
|
|
110
|
+
)}
|
|
111
|
+
|
|
112
|
+
${when(
|
|
113
|
+
(x) => x.mode === RuleMode.EDIT,
|
|
114
|
+
html`
|
|
115
|
+
<${buttonTag} class="delete-rule-btn" @click=${(x) => x.deleteRule()}>
|
|
116
|
+
<${iconTag} name="minus" size="md"></${iconTag}>
|
|
117
|
+
</${buttonTag}>
|
|
118
|
+
`,
|
|
119
|
+
)}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
`;
|