@genesislcap/pbc-reconciliation-ui 0.0.13 → 0.0.14
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/.gradle/8.3/executionHistory/executionHistory.bin +0 -0
- package/.gradle/8.3/executionHistory/executionHistory.lock +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +1 -1
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/build/distributions/web-distribution.tar +0 -0
- package/build/distributions/web-distribution.zip +0 -0
- package/dist/dts/components/configurations-panel/configurations-panel.d.ts +24 -1
- package/dist/dts/components/configurations-panel/configurations-panel.d.ts.map +1 -1
- package/dist/dts/components/configurations-panel/configurations-panel.styles.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/recon-rules-columns.d.ts +1 -0
- package/dist/dts/components/configurations-panel/recon-rules-columns.d.ts.map +1 -0
- package/dist/dts/components/rapid-components.d.ts.map +1 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts +4 -1
- package/dist/dts/components/reconciliations-panel/reconciliations-panel.d.ts.map +1 -1
- package/dist/dts/components/zero-components.d.ts.map +1 -1
- package/dist/dts/config/templates.d.ts +2 -0
- package/dist/dts/config/templates.d.ts.map +1 -1
- package/dist/dts/reconciliation.types.d.ts +14 -4
- package/dist/dts/reconciliation.types.d.ts.map +1 -1
- package/dist/dts/tags/tags.d.ts +2 -0
- package/dist/dts/tags/tags.d.ts.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.js +179 -3
- package/dist/esm/components/configurations-panel/configurations-panel.js.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.styles.js +93 -2
- package/dist/esm/components/configurations-panel/configurations-panel.styles.js.map +1 -1
- package/dist/esm/components/configurations-panel/configurations-panel.template.js +110 -4
- package/dist/esm/components/configurations-panel/configurations-panel.template.js.map +1 -1
- package/dist/esm/components/configurations-panel/recon-rules-columns.js +1 -0
- package/dist/esm/components/configurations-panel/recon-rules-columns.js.map +1 -0
- package/dist/esm/components/rapid-components.js +3 -2
- package/dist/esm/components/rapid-components.js.map +1 -1
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.js +7 -1
- package/dist/esm/components/reconciliations-panel/reconciliations-panel.js.map +1 -1
- package/dist/esm/components/zero-components.js +2 -2
- package/dist/esm/components/zero-components.js.map +1 -1
- package/dist/esm/config/templates.js +2 -0
- package/dist/esm/config/templates.js.map +1 -1
- package/dist/esm/reconciliation.types.js +8 -0
- package/dist/esm/reconciliation.types.js.map +1 -1
- package/dist/esm/tags/tags.js +2 -0
- package/dist/esm/tags/tags.js.map +1 -1
- package/package.json +1 -1
- package/src/components/configurations-panel/configurations-panel.styles.ts +100 -2
- package/src/components/configurations-panel/configurations-panel.template.ts +136 -3
- package/src/components/configurations-panel/configurations-panel.ts +207 -12
- package/src/components/configurations-panel/recon-rules-columns.ts +117 -0
- package/src/components/rapid-components.ts +24 -19
- package/src/components/reconciliations-panel/reconciliations-panel.ts +13 -6
- package/src/components/zero-components.ts +4 -0
- package/src/config/templates.ts +4 -0
- package/src/reconciliation.types.ts +18 -8
- package/src/tags/tags.ts +10 -0
|
@@ -7,9 +7,12 @@ import {
|
|
|
7
7
|
Configuration,
|
|
8
8
|
ConfigurationMode,
|
|
9
9
|
DataDictionary,
|
|
10
|
+
DataDictionaryField,
|
|
10
11
|
Datasource,
|
|
11
12
|
DatasourceType,
|
|
13
|
+
FieldType,
|
|
12
14
|
ReconConfigurationRule,
|
|
15
|
+
ToleranceType,
|
|
13
16
|
} from '../../reconciliation.types';
|
|
14
17
|
import { ReconciliationConfigurationService } from '../../services/reconciliation-configuration.service';
|
|
15
18
|
import { DataDictionaryService } from '../../services/data-dictionary.service';
|
|
@@ -21,11 +24,14 @@ import { logger } from '../../utils';
|
|
|
21
24
|
styles: ConfigurationsPanelStyles,
|
|
22
25
|
})
|
|
23
26
|
export class ConfigurationsPanel extends GenesisElement {
|
|
24
|
-
@ReconciliationConfigurationService
|
|
27
|
+
@ReconciliationConfigurationService
|
|
28
|
+
reconciliationConfigurationService: ReconciliationConfigurationService;
|
|
25
29
|
@DataDictionaryService dataDictionaryService: DataDictionaryService;
|
|
26
30
|
@observable configurations: Array<Configuration> = [];
|
|
27
31
|
@observable dataSources: Array<Datasource> = [];
|
|
28
32
|
@observable dataDictionaries: Array<DataDictionary> = [];
|
|
33
|
+
@observable dataDictionaryFields: Array<DataDictionaryField> = [];
|
|
34
|
+
@observable filteredRuleFields: Array<DataDictionaryField> = [];
|
|
29
35
|
@observable reconRules: Array<ReconConfigurationRule> = [];
|
|
30
36
|
@observable selectedConfiguration: Configuration = null;
|
|
31
37
|
@observable configurationName: string = null;
|
|
@@ -33,6 +39,12 @@ export class ConfigurationsPanel extends GenesisElement {
|
|
|
33
39
|
@observable dataDictionaryId: string = '';
|
|
34
40
|
@observable configurationMode: (typeof ConfigurationMode)[keyof typeof ConfigurationMode];
|
|
35
41
|
@observable showConfigurationDetails: boolean = false;
|
|
42
|
+
@observable toleranceTypes: Array<ToleranceType> = [];
|
|
43
|
+
@observable fieldName: string = null;
|
|
44
|
+
@observable fieldType: FieldType = null;
|
|
45
|
+
@observable toleranceType: ToleranceType = null;
|
|
46
|
+
@observable toleranceValue: string;
|
|
47
|
+
@observable isPrimaryKey: boolean = false;
|
|
36
48
|
@observable matchNullValue: Switch;
|
|
37
49
|
|
|
38
50
|
async connectedCallback() {
|
|
@@ -42,16 +54,53 @@ export class ConfigurationsPanel extends GenesisElement {
|
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
async setConfigurations() {
|
|
45
|
-
this.configurations =
|
|
57
|
+
this.configurations =
|
|
58
|
+
await this.reconciliationConfigurationService.getReconciliationConfigurations();
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
async setDataDictionaries() {
|
|
49
62
|
this.dataDictionaries = await this.dataDictionaryService.getDataDictionaries();
|
|
50
63
|
}
|
|
51
64
|
|
|
65
|
+
async dataDictionaryChanged() {
|
|
66
|
+
const fields = await this.dataDictionaryService.getDataDictionaryFields(this.dataDictionaryId);
|
|
67
|
+
this.dataDictionaryFields = fields;
|
|
68
|
+
this.filteredRuleFields = fields;
|
|
69
|
+
this.reconRules = [];
|
|
70
|
+
this.fieldName = fields.length > 0 ? fields[0].FIELD_NAME : '';
|
|
71
|
+
this.dataDictionaryFieldChanged();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
dataDictionaryFieldChanged() {
|
|
75
|
+
this.fieldType = this.dataDictionaryFields.find(
|
|
76
|
+
(field) => field.FIELD_NAME === this.fieldName,
|
|
77
|
+
).FIELD_TYPE;
|
|
78
|
+
this.toleranceTypes = this.getToleranceTypes(this.fieldType);
|
|
79
|
+
this.toleranceType = this.toleranceTypes[0];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getToleranceTypes(fieldType) {
|
|
83
|
+
let toleranceTypes = [];
|
|
84
|
+
switch (fieldType) {
|
|
85
|
+
case FieldType.DATE:
|
|
86
|
+
toleranceTypes = [ToleranceType.DAYS];
|
|
87
|
+
break;
|
|
88
|
+
case FieldType.DATETIME:
|
|
89
|
+
toleranceTypes = [ToleranceType.MINUTES];
|
|
90
|
+
break;
|
|
91
|
+
case (FieldType.INT, FieldType.BIGDECIMAL):
|
|
92
|
+
toleranceTypes = [ToleranceType.ABSOLUTE, ToleranceType.PERCENTAGE, ToleranceType.EQUALITY];
|
|
93
|
+
break;
|
|
94
|
+
default:
|
|
95
|
+
toleranceTypes = [ToleranceType.EQUALITY];
|
|
96
|
+
}
|
|
97
|
+
return toleranceTypes;
|
|
98
|
+
}
|
|
99
|
+
|
|
52
100
|
addConfiguration() {
|
|
53
101
|
this.configurationMode = ConfigurationMode.CREATE;
|
|
54
102
|
this.reset();
|
|
103
|
+
this.dataDictionaryChanged();
|
|
55
104
|
this.showConfigurationDetails = true;
|
|
56
105
|
}
|
|
57
106
|
|
|
@@ -70,13 +119,27 @@ export class ConfigurationsPanel extends GenesisElement {
|
|
|
70
119
|
this.selectedConfiguration = configuration;
|
|
71
120
|
this.configurationName = configuration.NAME;
|
|
72
121
|
this.dataDictionaryId = configuration.DICTIONARY_ID;
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
122
|
+
const fields = await this.dataDictionaryService.getDataDictionaryFields(this.dataDictionaryId);
|
|
123
|
+
this.dataDictionaryFields = fields;
|
|
124
|
+
const configurationRules =
|
|
125
|
+
await this.reconciliationConfigurationService.getReconciliationConfigurationRules(
|
|
126
|
+
configuration.RECONCILIATION_CONFIG_ID,
|
|
127
|
+
);
|
|
128
|
+
this.reconRules =
|
|
129
|
+
configurationRules.map((rule) => {
|
|
130
|
+
return {
|
|
131
|
+
...rule,
|
|
132
|
+
FIELD_TYPE: this.dataDictionaryFields.find(
|
|
133
|
+
(field) => field.FIELD_NAME === rule.FIELD_NAME,
|
|
134
|
+
).FIELD_TYPE,
|
|
135
|
+
};
|
|
136
|
+
}) || [];
|
|
137
|
+
this.filterReconRuleFields();
|
|
138
|
+
this.resetRule();
|
|
139
|
+
const dataSourceConfig =
|
|
140
|
+
await this.reconciliationConfigurationService.getReconciliationDatasourceConfiguration(
|
|
141
|
+
configuration.RECONCILIATION_CONFIG_ID,
|
|
142
|
+
);
|
|
80
143
|
this.dataSources = dataSourceConfig;
|
|
81
144
|
if(this.matchNullValue){
|
|
82
145
|
this.matchNullValue.checked = configuration.MATCH_NULL;
|
|
@@ -99,9 +162,10 @@ export class ConfigurationsPanel extends GenesisElement {
|
|
|
99
162
|
{
|
|
100
163
|
label: 'Confirm',
|
|
101
164
|
action: async () => {
|
|
102
|
-
const response: any =
|
|
103
|
-
this.
|
|
104
|
-
|
|
165
|
+
const response: any =
|
|
166
|
+
await this.reconciliationConfigurationService.deleteReconciliationConfiguration(
|
|
167
|
+
this.configurations[index].RECONCILIATION_CONFIG_ID,
|
|
168
|
+
);
|
|
105
169
|
if (response.MESSAGE_TYPE === 'EVENT_ACK') {
|
|
106
170
|
this.configurations.splice(index, 1);
|
|
107
171
|
this.showConfigurationDetails = false;
|
|
@@ -221,4 +285,135 @@ export class ConfigurationsPanel extends GenesisElement {
|
|
|
221
285
|
|
|
222
286
|
this.showNotificationError(response.ERROR);
|
|
223
287
|
}
|
|
288
|
+
|
|
289
|
+
validateTolerance() {
|
|
290
|
+
return (
|
|
291
|
+
this.toleranceType && this.toleranceType !== ToleranceType.EQUALITY && !this.toleranceValue
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
addReconRule() {
|
|
296
|
+
if (!this.fieldName || !this.fieldType || !this.toleranceType || this.validateTolerance()) {
|
|
297
|
+
this.showErrorNotification(
|
|
298
|
+
'Missing fields',
|
|
299
|
+
'Please fill in all required fields for adding a rule.',
|
|
300
|
+
);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const rule: ReconConfigurationRule = {
|
|
304
|
+
FIELD_NAME: this.fieldName,
|
|
305
|
+
FIELD_TYPE: this.fieldType,
|
|
306
|
+
TOLERANCE_TYPE: this.toleranceType,
|
|
307
|
+
TOLERANCE_VALUE: this.toleranceValue || null,
|
|
308
|
+
IS_PRIMARY_KEY: this.isPrimaryKey,
|
|
309
|
+
};
|
|
310
|
+
this.reconRules.push(rule);
|
|
311
|
+
this.filterReconRuleFields();
|
|
312
|
+
this.resetRule();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
filterReconRuleFields() {
|
|
316
|
+
this.filteredRuleFields = this.dataDictionaryFields.filter(
|
|
317
|
+
(field) => !this.reconRules.some((rule) => rule.FIELD_NAME === field.FIELD_NAME),
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
resetRule() {
|
|
322
|
+
this.fieldName =
|
|
323
|
+
this.filteredRuleFields.length > 0 ? this.filteredRuleFields[0].FIELD_NAME : '';
|
|
324
|
+
this.fieldType =
|
|
325
|
+
this.filteredRuleFields.length > 0 ? this.filteredRuleFields[0].FIELD_TYPE : null;
|
|
326
|
+
this.toleranceTypes = this.getToleranceTypes(this.fieldType);
|
|
327
|
+
this.toleranceType = this.toleranceTypes.length > 0 ? this.toleranceTypes[0] : null;
|
|
328
|
+
this.toleranceValue = null;
|
|
329
|
+
this.isPrimaryKey = false;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
removeRule(index) {
|
|
333
|
+
this.reconRules.splice(index, 1);
|
|
334
|
+
this.filterReconRuleFields();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
resetGridToleranceValue(evt, index) {
|
|
338
|
+
const { value } = evt.target;
|
|
339
|
+
const ruleObject = {
|
|
340
|
+
...this.reconRules[index],
|
|
341
|
+
TOLERANCE_TYPE: value,
|
|
342
|
+
TOLERANCE_VALUE: null,
|
|
343
|
+
};
|
|
344
|
+
this.reconRules.splice(index, 1, ruleObject);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
gridToleranceValueChanged(evt, index) {
|
|
348
|
+
const { value } = evt.target;
|
|
349
|
+
const toleanceValue = this.formatToleranceValue(
|
|
350
|
+
this.reconRules[index].TOLERANCE_TYPE,
|
|
351
|
+
value,
|
|
352
|
+
);
|
|
353
|
+
const ruleObject = {
|
|
354
|
+
...this.reconRules[index],
|
|
355
|
+
TOLERANCE_VALUE: toleanceValue,
|
|
356
|
+
};
|
|
357
|
+
this.reconRules.splice(index, 1, ruleObject);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
formatToleranceValue(type, value) {
|
|
361
|
+
if (type === ToleranceType.ABSOLUTE) {
|
|
362
|
+
value = this.convertToAbsolute(value);
|
|
363
|
+
} else if (type === ToleranceType.PERCENTAGE) {
|
|
364
|
+
value = this.convertToPercentage(value);
|
|
365
|
+
} else if (type === ToleranceType.DAYS || this.toleranceType === ToleranceType.MINUTES) {
|
|
366
|
+
value = value.replace(/[^0-9]/g, '');
|
|
367
|
+
}
|
|
368
|
+
return value;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
toleranceValChanged(evt) {
|
|
372
|
+
const { value } = evt.target;
|
|
373
|
+
this.toleranceValue = this.formatToleranceValue(this.toleranceType, value);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
adjustDecimalPoints(value, parts) {
|
|
377
|
+
if (parts.length > 2) {
|
|
378
|
+
value = parts[0] + '.' + parts.slice(1).join('');
|
|
379
|
+
}
|
|
380
|
+
return value;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
convertToAbsolute(value) {
|
|
384
|
+
const parts = value.split('.');
|
|
385
|
+
value = this.adjustDecimalPoints(value, parts);
|
|
386
|
+
|
|
387
|
+
const digitsCount = value.replace(/\./g, '').length;
|
|
388
|
+
if (digitsCount > 8) {
|
|
389
|
+
if (parts.length > 1) {
|
|
390
|
+
const integerPart = parts[0];
|
|
391
|
+
const fractionalPart = parts[1];
|
|
392
|
+
if (integerPart.length >= 8) {
|
|
393
|
+
value = integerPart.slice(0, 8);
|
|
394
|
+
} else {
|
|
395
|
+
const remainingDigits = 8 - integerPart.length;
|
|
396
|
+
value = integerPart + '.' + fractionalPart.slice(0, remainingDigits);
|
|
397
|
+
}
|
|
398
|
+
} else {
|
|
399
|
+
value = value.slice(0, 8);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return value;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
convertToPercentage(value) {
|
|
406
|
+
const parts = value.split('.');
|
|
407
|
+
value = this.adjustDecimalPoints(value, parts);
|
|
408
|
+
|
|
409
|
+
if (parts.length === 2) {
|
|
410
|
+
parts[1] = parts[1].slice(0, 2);
|
|
411
|
+
value = parts[0] + '.' + parts[1];
|
|
412
|
+
}
|
|
413
|
+
let numericValue = parseFloat(value);
|
|
414
|
+
if (isNaN(numericValue) || numericValue < 0 || numericValue > 100) {
|
|
415
|
+
numericValue = null;
|
|
416
|
+
}
|
|
417
|
+
return numericValue !== null ? numericValue.toString() : '0';
|
|
418
|
+
}
|
|
224
419
|
}
|
|
@@ -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
|
+
// ];
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
rapidSegmentedItem,
|
|
14
14
|
rapidDivider,
|
|
15
15
|
rapidListboxOption,
|
|
16
|
+
rapidNumberField,
|
|
17
|
+
rapidCheckbox,
|
|
16
18
|
} from '@genesislcap/rapid-design-system';
|
|
17
19
|
import { rapidGridComponents } from '@genesislcap/rapid-grid-pro';
|
|
18
20
|
|
|
@@ -23,23 +25,26 @@ export const registerCommonRapidComponents = async () => {
|
|
|
23
25
|
/**
|
|
24
26
|
* Register the components the app is using with the system.
|
|
25
27
|
*/
|
|
26
|
-
provideDesignSystem()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
provideDesignSystem()
|
|
29
|
+
.register(
|
|
30
|
+
/**
|
|
31
|
+
* Common across most routes, so batch register these lightweight components upfront.
|
|
32
|
+
*/
|
|
33
|
+
rapidIcon(),
|
|
34
|
+
rapidButton(),
|
|
35
|
+
rapidTextField(),
|
|
36
|
+
rapidSelect(),
|
|
37
|
+
rapidDivider(),
|
|
38
|
+
rapidListboxOption(),
|
|
39
|
+
rapidTab(),
|
|
40
|
+
rapidTabs(),
|
|
41
|
+
rapidTabPanel(),
|
|
42
|
+
rapidProgressRing(),
|
|
43
|
+
rapidSegmentedControl(),
|
|
44
|
+
rapidSegmentedItem(),
|
|
45
|
+
rapidNumberField(),
|
|
46
|
+
rapidCheckbox(),
|
|
47
|
+
rapidGridComponents,
|
|
48
|
+
foundationLayoutComponents,
|
|
49
|
+
);
|
|
45
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GenesisElement, customElement, observable } from '@genesislcap/web-core';
|
|
2
2
|
import { ReconciliationsPanelTemplate } from './reconciliations-panel.template';
|
|
3
3
|
import { ReconciliationsPanelStyles } from './reconciliations-panel.styles';
|
|
4
4
|
import {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ReconciliationInsert,
|
|
9
9
|
ReconciliationStatus,
|
|
10
10
|
} from '../../reconciliation.types';
|
|
11
|
-
import { GridPro } from '@genesislcap/rapid-grid-pro';
|
|
11
|
+
import { GridPro, GridProGenesisDatasource } from '@genesislcap/rapid-grid-pro';
|
|
12
12
|
import { ReconciliationConfigurationService } from '../../services/reconciliation-configuration.service';
|
|
13
13
|
import { ReconciliationService } from '../../services/reconciliation.service';
|
|
14
14
|
import { showNotificationError } from '../../utils/notification';
|
|
@@ -45,6 +45,8 @@ export class ReconciliationsPanel extends GenesisElement {
|
|
|
45
45
|
@observable files: Map<string, any> = new Map();
|
|
46
46
|
|
|
47
47
|
grid: GridPro;
|
|
48
|
+
datasource: GridProGenesisDatasource;
|
|
49
|
+
reconciliationSubscription: any;
|
|
48
50
|
|
|
49
51
|
async connectedCallback() {
|
|
50
52
|
super.connectedCallback();
|
|
@@ -55,12 +57,17 @@ export class ReconciliationsPanel extends GenesisElement {
|
|
|
55
57
|
this.reconciliationConfigurations[0]?.RECONCILIATION_CONFIG_ID;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
super.disconnectedCallback();
|
|
62
|
+
this.reconciliationSubscription.unsubscribe();
|
|
63
|
+
}
|
|
59
64
|
|
|
60
65
|
getReconciliations() {
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
this.reconciliationSubscription = this.reconciliationService
|
|
67
|
+
.getReconciliations()
|
|
68
|
+
.subscribe((reconciliations) => {
|
|
69
|
+
this.filterAndSortReconciliations(reconciliations);
|
|
70
|
+
});
|
|
64
71
|
}
|
|
65
72
|
filterAndSortReconciliations(reconciliations) {
|
|
66
73
|
let inProgress: Array<Reconciliation> = [];
|
|
@@ -13,6 +13,8 @@ import {
|
|
|
13
13
|
zeroSegmentedItem,
|
|
14
14
|
zeroDivider,
|
|
15
15
|
zeroListboxOption,
|
|
16
|
+
zeroNumberField,
|
|
17
|
+
zeroCheckbox,
|
|
16
18
|
} from '@genesislcap/foundation-zero';
|
|
17
19
|
import { zeroGridComponents } from '@genesislcap/foundation-zero-grid-pro';
|
|
18
20
|
|
|
@@ -40,6 +42,8 @@ export const registerCommonZeroComponents = async () => {
|
|
|
40
42
|
zeroSegmentedItem(),
|
|
41
43
|
zeroDivider(),
|
|
42
44
|
zeroListboxOption(),
|
|
45
|
+
zeroNumberField(),
|
|
46
|
+
zeroCheckbox(),
|
|
43
47
|
zeroGridComponents,
|
|
44
48
|
foundationLayoutComponents,
|
|
45
49
|
);
|
package/src/config/templates.ts
CHANGED
|
@@ -19,6 +19,8 @@ export type TemplateComponents = {
|
|
|
19
19
|
tabs: TemplateElementDependency;
|
|
20
20
|
tab: TemplateElementDependency;
|
|
21
21
|
tabPanel: TemplateElementDependency;
|
|
22
|
+
numberField: TemplateElementDependency;
|
|
23
|
+
checkbox: TemplateElementDependency;
|
|
22
24
|
switch: TemplateElementDependency;
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -55,6 +57,8 @@ export const defaultTemplateOptions: TemplateOptions = {
|
|
|
55
57
|
switch: 'rapid-switch',
|
|
56
58
|
tab: 'rapid-tab',
|
|
57
59
|
tabPanel: 'rapid-tab-panel',
|
|
60
|
+
numberField: 'rapid-number-field',
|
|
61
|
+
checkbox: 'rapid-checkbox',
|
|
58
62
|
tabs: 'rapid-tabs',
|
|
59
63
|
textField: 'rapid-text-field',
|
|
60
64
|
};
|
|
@@ -9,12 +9,13 @@ export type Configuration = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type ReconConfigurationRule = {
|
|
12
|
-
RECONCILIATION_CONFIG_ID
|
|
12
|
+
RECONCILIATION_CONFIG_ID?: string;
|
|
13
|
+
FIELD_TYPE: FieldType;
|
|
13
14
|
FIELD_NAME: string;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
TOLERANCE_TYPE: ToleranceType;
|
|
16
|
+
TOLERANCE_VALUE: string;
|
|
16
17
|
IS_PRIMARY_KEY: boolean;
|
|
17
|
-
}
|
|
18
|
+
}
|
|
18
19
|
|
|
19
20
|
export const ConfigurationMode = {
|
|
20
21
|
CREATE: 'create',
|
|
@@ -27,10 +28,10 @@ export type DataDictionary = {
|
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export type DataDictionaryField = {
|
|
30
|
-
DICTIONARY_ID
|
|
31
|
-
FIELD_NAME
|
|
32
|
-
FIELD_TYPE
|
|
33
|
-
}
|
|
31
|
+
DICTIONARY_ID?: string;
|
|
32
|
+
FIELD_NAME?: string;
|
|
33
|
+
FIELD_TYPE?: FieldType;
|
|
34
|
+
}
|
|
34
35
|
|
|
35
36
|
export type Datasource = {
|
|
36
37
|
NAME: string;
|
|
@@ -64,6 +65,15 @@ export enum ReconciliationStatus {
|
|
|
64
65
|
CANCELLED = 'CANCELLED',
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
export enum ToleranceType {
|
|
69
|
+
ABSOLUTE = 'ABSOLUTE',
|
|
70
|
+
PERCENTAGE = 'PERCENTAGE',
|
|
71
|
+
EQUALITY = 'EQUALITY',
|
|
72
|
+
DAYS = 'DAYS',
|
|
73
|
+
MINUTES = 'MINUTES',
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
67
77
|
export type DatasourceRule = {
|
|
68
78
|
field: string;
|
|
69
79
|
type: FieldType;
|
package/src/tags/tags.ts
CHANGED
|
@@ -87,6 +87,16 @@ export const dividerTag = tagFor(templateOptions.divider);
|
|
|
87
87
|
*/
|
|
88
88
|
export const progressTag = tagFor(templateOptions.progress);
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
export const numberFieldTag = tagFor(templateOptions.numberField);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
*/
|
|
98
|
+
export const checkboxTag = tagFor(templateOptions.checkbox);
|
|
99
|
+
|
|
90
100
|
/**
|
|
91
101
|
* @internal
|
|
92
102
|
*/
|