@everymatrix/stage-mm-verification-report 1.0.38 → 1.0.39
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/main.js +28 -6
- package/main.js.map +1 -1
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -58263,6 +58263,11 @@ var AppComponent = class _AppComponent {
|
|
|
58263
58263
|
}
|
|
58264
58264
|
buildFilterForm(all, values) {
|
|
58265
58265
|
this.filterForm = new FormGroup({});
|
|
58266
|
+
const fieldsToExclude = [
|
|
58267
|
+
"verification_updated_date",
|
|
58268
|
+
"documents_expiry_date",
|
|
58269
|
+
"documents_created_date"
|
|
58270
|
+
];
|
|
58266
58271
|
all.forEach((field) => {
|
|
58267
58272
|
let def = values && values[field.field_id] || null;
|
|
58268
58273
|
const validators = [];
|
|
@@ -58272,7 +58277,7 @@ var AppComponent = class _AppComponent {
|
|
|
58272
58277
|
def = this.domainLookupsSignal().map((l) => l.lookup_key);
|
|
58273
58278
|
}
|
|
58274
58279
|
}
|
|
58275
|
-
if (!values && field.
|
|
58280
|
+
if (!values && field.field_data_type === "TIMESTAMP" && !fieldsToExclude.includes(field.field_id)) {
|
|
58276
58281
|
def = {
|
|
58277
58282
|
alias: "custom",
|
|
58278
58283
|
start: (0, import_moment2.default)().startOf("day").toDate(),
|
|
@@ -58533,14 +58538,10 @@ var AppComponent = class _AppComponent {
|
|
|
58533
58538
|
clearFilters() {
|
|
58534
58539
|
const defaults = {
|
|
58535
58540
|
merchant_name: this.domainLookupsSignal()?.length ? this.domainLookupsSignal().map((l) => l.lookup_key) : [],
|
|
58536
|
-
verification_creation_date: {
|
|
58537
|
-
alias: "custom",
|
|
58538
|
-
start: (0, import_moment2.default)().startOf("day").toDate(),
|
|
58539
|
-
end: (0, import_moment2.default)().endOf("day").toDate()
|
|
58540
|
-
},
|
|
58541
58541
|
show_last_verification: true
|
|
58542
58542
|
};
|
|
58543
58543
|
this.filterForm.reset(defaults);
|
|
58544
|
+
this.applyDefaultPeriods(true, false);
|
|
58544
58545
|
this.filterForm.markAsPristine();
|
|
58545
58546
|
this.filterForm.markAsUntouched();
|
|
58546
58547
|
}
|
|
@@ -58615,6 +58616,7 @@ var AppComponent = class _AppComponent {
|
|
|
58615
58616
|
applyConfigurationFields(event2) {
|
|
58616
58617
|
this.isTemplateSaved.set(false);
|
|
58617
58618
|
this.visibleFieldsSignal.set(event2.fieldsToShow);
|
|
58619
|
+
this.applyDefaultPeriods(false, true);
|
|
58618
58620
|
}
|
|
58619
58621
|
applyDocumentField() {
|
|
58620
58622
|
const fieldsMap = {
|
|
@@ -58656,6 +58658,26 @@ var AppComponent = class _AppComponent {
|
|
|
58656
58658
|
}
|
|
58657
58659
|
this.scrollHeight = isPanelOpened ? 350 : 400;
|
|
58658
58660
|
}
|
|
58661
|
+
applyDefaultPeriods(onClearFilters = false, onApplyConfigurationFields = false) {
|
|
58662
|
+
if (!this.filterForm || !this.visibleFieldsSignal())
|
|
58663
|
+
return;
|
|
58664
|
+
const fieldsToExclude = [
|
|
58665
|
+
"verification_updated_date",
|
|
58666
|
+
"documents_expiry_date",
|
|
58667
|
+
"documents_created_date"
|
|
58668
|
+
];
|
|
58669
|
+
const visibleFieldsSignal = this.visibleFieldsSignal().filter((item) => !fieldsToExclude.includes(item.field_id));
|
|
58670
|
+
Object.keys(this.filterForm.controls).forEach((control) => {
|
|
58671
|
+
const field = visibleFieldsSignal.find((item) => item["field_id"] == control);
|
|
58672
|
+
if (field && field["field_data_type"] === "TIMESTAMP" && (!this.getControl(control)?.value && onClearFilters || onApplyConfigurationFields && !this.getControl(control)?.touched && !this.getControl(control)?.dirty)) {
|
|
58673
|
+
this.filterForm.controls[control].reset({
|
|
58674
|
+
alias: "custom",
|
|
58675
|
+
start: (0, import_moment2.default)().startOf("day").toDate(),
|
|
58676
|
+
end: (0, import_moment2.default)().endOf("day").toDate()
|
|
58677
|
+
});
|
|
58678
|
+
}
|
|
58679
|
+
});
|
|
58680
|
+
}
|
|
58659
58681
|
static \u0275fac = function AppComponent_Factory(__ngFactoryType__) {
|
|
58660
58682
|
return new (__ngFactoryType__ || _AppComponent)();
|
|
58661
58683
|
};
|