@unifylib/ui-lib 1.1.3 → 1.1.5
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/esm2022/iq-ui-lib.mjs +5 -0
- package/esm2022/lib/base-model/SearchStrConfig.mjs +11 -0
- package/esm2022/lib/base-model/api-response.mjs +2 -0
- package/esm2022/lib/base-model/audit-log-entry.mjs +3 -0
- package/esm2022/lib/base-model/button-action-settings.mjs +16 -0
- package/esm2022/lib/base-model/column-def.model.mjs +28 -0
- package/esm2022/lib/base-model/do-action-request.mjs +8 -0
- package/esm2022/lib/base-model/field-action.mjs +6 -0
- package/esm2022/lib/base-model/field-filter.model.mjs +3 -0
- package/esm2022/lib/base-model/field-info.mjs +57 -0
- package/esm2022/lib/base-model/field-predicate.model.mjs +10 -0
- package/esm2022/lib/base-model/filter-request.mjs +13 -0
- package/esm2022/lib/base-model/filter.model.mjs +25 -0
- package/esm2022/lib/base-model/get-items-list.mjs +10 -0
- package/esm2022/lib/base-model/index.mjs +12 -0
- package/esm2022/lib/base-model/items-total.model.mjs +8 -0
- package/esm2022/lib/base-model/line-item.model.mjs +11 -0
- package/esm2022/lib/base-model/lookupItem.mjs +16 -0
- package/esm2022/lib/base-model/page-info.mjs +17 -0
- package/esm2022/lib/base-model/report-request.model.mjs +17 -0
- package/esm2022/lib/base-model/response-envelop.model.mjs +10 -0
- package/esm2022/lib/base-model/snack-message.model.mjs +11 -0
- package/esm2022/lib/base-model/table-column.interface.mjs +2 -0
- package/esm2022/lib/base-model/table-page-user-action.interface.mjs +21 -0
- package/esm2022/lib/base-model/workflow/workflow-steps.model.mjs +9 -0
- package/esm2022/lib/base-model/workflow/workflow.model.mjs +42 -0
- package/esm2022/lib/components/action-comment/action-comment.component.mjs +101 -0
- package/esm2022/lib/components/action-confirmation/action-confirmation.component.mjs +55 -0
- package/esm2022/lib/components/activity-report-form/activity-report-form.component.mjs +499 -0
- package/esm2022/lib/components/advanced-filter/field-filter/field-filter.component.mjs +41 -0
- package/esm2022/lib/components/advanced-filter/filter-builder/filter-builder.component.mjs +162 -0
- package/esm2022/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.mjs +70 -0
- package/esm2022/lib/components/audit-log-list/audit-log.component.mjs +99 -0
- package/esm2022/lib/components/auto-complete/auto-complete.component.mjs +292 -0
- package/esm2022/lib/components/base-form/base-form.component.mjs +297 -0
- package/esm2022/lib/components/base-form-canvas/base-form-canvas.component.mjs +591 -0
- package/esm2022/lib/components/base-input-dialog/base-input-dialog.component.mjs +72 -0
- package/esm2022/lib/components/base-table/base-table.component.mjs +514 -0
- package/esm2022/lib/components/button-actions/button-actions.component.mjs +70 -0
- package/esm2022/lib/components/editable-base-table/editable-base-table.component.mjs +496 -0
- package/esm2022/lib/components/equation-builder/equation-builder.component.mjs +112 -0
- package/esm2022/lib/components/item-line-editor/item-line-editor.component.mjs +299 -0
- package/esm2022/lib/components/multi-auto-complete/multi-auto-complete.component.mjs +278 -0
- package/esm2022/lib/components/paginator/paginator.component.mjs +91 -0
- package/esm2022/lib/components/report-details-dialog/report-details-dialog.component.mjs +102 -0
- package/esm2022/lib/components/report-form/report-form.component.mjs +498 -0
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +62 -0
- package/esm2022/lib/components/section-form-canvas/section-form-canvas.component.mjs +81 -0
- package/esm2022/lib/components/shared/action-button/action-button.component.mjs +59 -0
- package/esm2022/lib/components/shared/action-card/action-card.component.mjs +93 -0
- package/esm2022/lib/components/shared/attachment-uploader/attachment-uploader.component.mjs +70 -0
- package/esm2022/lib/components/shared-list/shared-list.component.mjs +47 -0
- package/esm2022/lib/components/snackbar-static/snackbar-static.component.mjs +43 -0
- package/esm2022/lib/components/title-bar/title-bar.component.mjs +119 -0
- package/esm2022/lib/services/backend-service.mjs +240 -0
- package/esm2022/lib/services/index.mjs +4 -0
- package/esm2022/lib/services/top-panel.mjs +22 -0
- package/esm2022/lib/services/trigger-form.service.mjs +17 -0
- package/esm2022/lib/utils/base-utils.mjs +97 -0
- package/esm2022/lib/validators/date-range-validator.mjs +27 -0
- package/esm2022/lib/validators/index.mjs +4 -0
- package/esm2022/lib/validators/match-list.validator.mjs +9 -0
- package/esm2022/lib/validators/multi-email-validator.mjs +13 -0
- package/esm2022/public-api.mjs +29 -0
- package/esm2022/q-btech-ui-lib.mjs +5 -0
- package/esm2022/unifylib-ui-lib.mjs +5 -0
- package/fesm2022/iq-ui-lib.mjs +5625 -0
- package/fesm2022/iq-ui-lib.mjs.map +1 -0
- package/fesm2022/q-btech-ui-lib.mjs +5619 -0
- package/fesm2022/q-btech-ui-lib.mjs.map +1 -0
- package/fesm2022/unifylib-ui-lib.mjs +5625 -0
- package/fesm2022/unifylib-ui-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/base-model/SearchStrConfig.d.ts +8 -0
- package/{src/lib/base-model/api-response.ts → lib/base-model/api-response.d.ts} +21 -23
- package/lib/base-model/audit-log-entry.d.ts +7 -0
- package/lib/base-model/button-action-settings.d.ts +15 -0
- package/lib/base-model/column-def.model.d.ts +11 -0
- package/lib/base-model/do-action-request.d.ts +10 -0
- package/lib/base-model/field-action.d.ts +6 -0
- package/lib/base-model/field-filter.model.d.ts +7 -0
- package/lib/base-model/field-info.d.ts +53 -0
- package/lib/base-model/field-predicate.model.d.ts +7 -0
- package/lib/base-model/filter-request.d.ts +15 -0
- package/lib/base-model/filter.model.d.ts +22 -0
- package/lib/base-model/get-items-list.d.ts +21 -0
- package/lib/base-model/index.d.ts +11 -0
- package/lib/base-model/items-total.model.d.ts +6 -0
- package/lib/base-model/line-item.model.d.ts +9 -0
- package/lib/base-model/lookupItem.d.ts +13 -0
- package/lib/base-model/page-info.d.ts +52 -0
- package/lib/base-model/report-request.model.d.ts +18 -0
- package/lib/base-model/response-envelop.model.d.ts +8 -0
- package/lib/base-model/snack-message.model.d.ts +7 -0
- package/lib/base-model/table-column.interface.d.ts +28 -0
- package/lib/base-model/table-page-user-action.interface.d.ts +14 -0
- package/lib/base-model/workflow/workflow-steps.model.d.ts +7 -0
- package/lib/base-model/workflow/workflow.model.d.ts +13 -0
- package/lib/components/action-comment/action-comment.component.d.ts +32 -0
- package/lib/components/action-confirmation/action-confirmation.component.d.ts +19 -0
- package/lib/components/activity-report-form/activity-report-form.component.d.ts +93 -0
- package/lib/components/advanced-filter/field-filter/field-filter.component.d.ts +20 -0
- package/lib/components/advanced-filter/filter-builder/filter-builder.component.d.ts +28 -0
- package/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.d.ts +25 -0
- package/lib/components/audit-log-list/audit-log.component.d.ts +36 -0
- package/lib/components/auto-complete/auto-complete.component.d.ts +51 -0
- package/lib/components/base-form/base-form.component.d.ts +59 -0
- package/lib/components/base-form-canvas/base-form-canvas.component.d.ts +124 -0
- package/lib/components/base-input-dialog/base-input-dialog.component.d.ts +23 -0
- package/lib/components/base-table/base-table.component.d.ts +128 -0
- package/lib/components/button-actions/button-actions.component.d.ts +17 -0
- package/lib/components/editable-base-table/editable-base-table.component.d.ts +106 -0
- package/lib/components/equation-builder/equation-builder.component.d.ts +23 -0
- package/lib/components/item-line-editor/item-line-editor.component.d.ts +64 -0
- package/lib/components/multi-auto-complete/multi-auto-complete.component.d.ts +51 -0
- package/lib/components/paginator/paginator.component.d.ts +26 -0
- package/lib/components/report-details-dialog/report-details-dialog.component.d.ts +34 -0
- package/lib/components/report-form/report-form.component.d.ts +92 -0
- package/lib/components/search-bar/search-bar.component.d.ts +29 -0
- package/lib/components/section-form-canvas/section-form-canvas.component.d.ts +27 -0
- package/lib/components/shared/action-button/action-button.component.d.ts +17 -0
- package/lib/components/shared/action-card/action-card.component.d.ts +37 -0
- package/lib/components/shared/attachment-uploader/attachment-uploader.component.d.ts +16 -0
- package/lib/components/shared-list/shared-list.component.d.ts +21 -0
- package/lib/components/snackbar-static/snackbar-static.component.d.ts +15 -0
- package/lib/components/title-bar/title-bar.component.d.ts +42 -0
- package/lib/services/backend-service.d.ts +59 -0
- package/{src/lib/services/index.ts → lib/services/index.d.ts} +3 -3
- package/lib/services/top-panel.d.ts +8 -0
- package/lib/services/trigger-form.service.d.ts +7 -0
- package/lib/utils/base-utils.d.ts +13 -0
- package/lib/validators/date-range-validator.d.ts +2 -0
- package/{src/lib/validators/index.ts → lib/validators/index.d.ts} +3 -3
- package/lib/validators/match-list.validator.d.ts +4 -0
- package/lib/validators/multi-email-validator.d.ts +6 -0
- package/package.json +27 -14
- package/{src/public-api.ts → public-api.d.ts} +25 -29
- package/ng-package.json +0 -7
- package/src/lib/base-model/SearchStrConfig.ts +0 -12
- package/src/lib/base-model/audit-log-entry.ts +0 -7
- package/src/lib/base-model/button-action-settings.ts +0 -29
- package/src/lib/base-model/column-def.model.ts +0 -34
- package/src/lib/base-model/do-action-request.ts +0 -11
- package/src/lib/base-model/feature-item.ts +0 -9
- package/src/lib/base-model/field-action.ts +0 -7
- package/src/lib/base-model/field-filter.model.ts +0 -7
- package/src/lib/base-model/field-info.ts +0 -102
- package/src/lib/base-model/field-predicate.model.ts +0 -7
- package/src/lib/base-model/filter-request.ts +0 -27
- package/src/lib/base-model/filter.model.ts +0 -49
- package/src/lib/base-model/get-items-list.ts +0 -24
- package/src/lib/base-model/index.ts +0 -11
- package/src/lib/base-model/items-total.model.ts +0 -12
- package/src/lib/base-model/line-item.model.ts +0 -18
- package/src/lib/base-model/lookupItem.ts +0 -21
- package/src/lib/base-model/null-snackmessage.ts +0 -9
- package/src/lib/base-model/page-info.ts +0 -54
- package/src/lib/base-model/report-request.model.ts +0 -33
- package/src/lib/base-model/response-envelop.model.ts +0 -15
- package/src/lib/base-model/snack-message.model.ts +0 -14
- package/src/lib/base-model/snackmessage-interface.ts +0 -7
- package/src/lib/base-model/table-column.interface.ts +0 -29
- package/src/lib/base-model/table-page-user-action.interface.ts +0 -33
- package/src/lib/base-model/workflow/workflow-steps.model.ts +0 -9
- package/src/lib/base-model/workflow/workflow.model.ts +0 -52
- package/src/lib/components/action-comment/action-comment.component.css +0 -52
- package/src/lib/components/action-comment/action-comment.component.html +0 -47
- package/src/lib/components/action-comment/action-comment.component.spec.ts +0 -23
- package/src/lib/components/action-comment/action-comment.component.ts +0 -102
- package/src/lib/components/action-confirmation/action-confirmation.component.css +0 -46
- package/src/lib/components/action-confirmation/action-confirmation.component.html +0 -32
- package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +0 -23
- package/src/lib/components/action-confirmation/action-confirmation.component.ts +0 -58
- package/src/lib/components/activity-report-form/activity-report-form.component.html +0 -110
- package/src/lib/components/activity-report-form/activity-report-form.component.scss +0 -69
- package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +0 -25
- package/src/lib/components/activity-report-form/activity-report-form.component.ts +0 -616
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.html +0 -8
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.scss +0 -0
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.spec.ts +0 -25
- package/src/lib/components/advanced-filter/field-filter/field-filter.component.ts +0 -55
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.html +0 -36
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.scss +0 -130
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.spec.ts +0 -25
- package/src/lib/components/advanced-filter/filter-builder/filter-builder.component.ts +0 -186
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +0 -51
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +0 -23
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +0 -23
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +0 -69
- package/src/lib/components/audit-log-list/audit-log.component.html +0 -26
- package/src/lib/components/audit-log-list/audit-log.component.scss +0 -50
- package/src/lib/components/audit-log-list/audit-log.component.spec.ts +0 -25
- package/src/lib/components/audit-log-list/audit-log.component.ts +0 -114
- package/src/lib/components/auto-complete/auto-complete.component.css +0 -55
- package/src/lib/components/auto-complete/auto-complete.component.html +0 -45
- package/src/lib/components/auto-complete/auto-complete.component.spec.ts +0 -23
- package/src/lib/components/auto-complete/auto-complete.component.ts +0 -331
- package/src/lib/components/base-form/base-form.component.html +0 -59
- package/src/lib/components/base-form/base-form.component.scss +0 -68
- package/src/lib/components/base-form/base-form.component.spec.ts +0 -25
- package/src/lib/components/base-form/base-form.component.ts +0 -323
- package/src/lib/components/base-form-canvas/base-form-canvas.component.css +0 -196
- package/src/lib/components/base-form-canvas/base-form-canvas.component.html +0 -1095
- package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +0 -23
- package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +0 -680
- package/src/lib/components/base-input-dialog/base-input-dialog.component.css +0 -67
- package/src/lib/components/base-input-dialog/base-input-dialog.component.html +0 -47
- package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +0 -23
- package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +0 -77
- package/src/lib/components/base-table/base-table.component.html +0 -268
- package/src/lib/components/base-table/base-table.component.scss +0 -140
- package/src/lib/components/base-table/base-table.component.spec.ts +0 -25
- package/src/lib/components/base-table/base-table.component.ts +0 -621
- package/src/lib/components/button-actions/button-actions.component.html +0 -27
- package/src/lib/components/button-actions/button-actions.component.scss +0 -101
- package/src/lib/components/button-actions/button-actions.component.spec.ts +0 -23
- package/src/lib/components/button-actions/button-actions.component.ts +0 -70
- package/src/lib/components/editable-base-table/editable-base-table.component.html +0 -337
- package/src/lib/components/editable-base-table/editable-base-table.component.scss +0 -126
- package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +0 -25
- package/src/lib/components/editable-base-table/editable-base-table.component.ts +0 -579
- package/src/lib/components/equation-builder/equation-builder.component.css +0 -39
- package/src/lib/components/equation-builder/equation-builder.component.html +0 -31
- package/src/lib/components/equation-builder/equation-builder.component.spec.ts +0 -23
- package/src/lib/components/equation-builder/equation-builder.component.ts +0 -119
- package/src/lib/components/item-line-editor/item-line-editor.component.html +0 -102
- package/src/lib/components/item-line-editor/item-line-editor.component.scss +0 -152
- package/src/lib/components/item-line-editor/item-line-editor.component.spec.ts +0 -23
- package/src/lib/components/item-line-editor/item-line-editor.component.ts +0 -306
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +0 -19
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +0 -38
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +0 -23
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +0 -315
- package/src/lib/components/paginator/paginator.component.css +0 -65
- package/src/lib/components/paginator/paginator.component.html +0 -30
- package/src/lib/components/paginator/paginator.component.ts +0 -87
- package/src/lib/components/report-details-dialog/report-details-dialog.component.css +0 -17
- package/src/lib/components/report-details-dialog/report-details-dialog.component.html +0 -16
- package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +0 -23
- package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +0 -111
- package/src/lib/components/report-form/report-form.component.html +0 -92
- package/src/lib/components/report-form/report-form.component.scss +0 -51
- package/src/lib/components/report-form/report-form.component.spec.ts +0 -25
- package/src/lib/components/report-form/report-form.component.ts +0 -599
- package/src/lib/components/search-bar/search-bar.component.html +0 -51
- package/src/lib/components/search-bar/search-bar.component.scss +0 -63
- package/src/lib/components/search-bar/search-bar.component.spec.ts +0 -25
- package/src/lib/components/search-bar/search-bar.component.ts +0 -68
- package/src/lib/components/section-form-canvas/section-form-canvas.component.html +0 -43
- package/src/lib/components/section-form-canvas/section-form-canvas.component.scss +0 -81
- package/src/lib/components/section-form-canvas/section-form-canvas.component.spec.ts +0 -23
- package/src/lib/components/section-form-canvas/section-form-canvas.component.ts +0 -67
- package/src/lib/components/shared/action-button/action-button.component.html +0 -12
- package/src/lib/components/shared/action-button/action-button.component.scss +0 -45
- package/src/lib/components/shared/action-button/action-button.component.ts +0 -51
- package/src/lib/components/shared/action-card/action-card.component.html +0 -78
- package/src/lib/components/shared/action-card/action-card.component.scss +0 -238
- package/src/lib/components/shared/action-card/action-card.component.ts +0 -56
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +0 -135
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +0 -36
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +0 -23
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +0 -71
- package/src/lib/components/shared-list/shared-list.component.css +0 -0
- package/src/lib/components/shared-list/shared-list.component.html +0 -17
- package/src/lib/components/shared-list/shared-list.component.spec.ts +0 -23
- package/src/lib/components/shared-list/shared-list.component.ts +0 -53
- package/src/lib/components/snackbar-static/snackbar-static.component.html +0 -20
- package/src/lib/components/snackbar-static/snackbar-static.component.scss +0 -135
- package/src/lib/components/snackbar-static/snackbar-static.component.ts +0 -26
- package/src/lib/components/title-bar/title-bar.component.css +0 -0
- package/src/lib/components/title-bar/title-bar.component.css.map +0 -1
- package/src/lib/components/title-bar/title-bar.component.html +0 -35
- package/src/lib/components/title-bar/title-bar.component.scss +0 -126
- package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -23
- package/src/lib/components/title-bar/title-bar.component.ts +0 -126
- package/src/lib/services/backend-service.ts +0 -287
- package/src/lib/services/top-panel.ts +0 -17
- package/src/lib/services/trigger-form.service.ts +0 -11
- package/src/lib/share-module/shared-module.ts +0 -10
- package/src/lib/utils/base-utils.ts +0 -102
- package/src/lib/validators/date-range-validator.ts +0 -31
- package/src/lib/validators/match-list.validator.ts +0 -10
- package/src/lib/validators/multi-email-validator.ts +0 -15
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,599 +0,0 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, EventEmitter, Injector, Input, OnInit, Output} from '@angular/core';
|
|
2
|
-
import {FieldInfo} from "../../base-model/field-info";
|
|
3
|
-
import {EMPTY_PAGE_INFO, PageInfo} from "../../base-model/page-info";
|
|
4
|
-
import {TableColumn} from "../../base-model/table-column.interface";
|
|
5
|
-
import {FieldMessage} from "../../base-model/api-response";
|
|
6
|
-
import {TranslateModule, TranslateService} from "@ngx-translate/core";
|
|
7
|
-
import {BackendService} from "../../services/backend-service";
|
|
8
|
-
import {ActivatedRoute, Router} from "@angular/router";
|
|
9
|
-
import {FormBuilder, FormGroup} from "@angular/forms";
|
|
10
|
-
import {formatDate, NgForOf, NgIf} from "@angular/common";
|
|
11
|
-
import {MatMenu, MatMenuItem, MatMenuTrigger} from "@angular/material/menu";
|
|
12
|
-
import {MatButton, MatButtonModule} from "@angular/material/button";
|
|
13
|
-
import {BaseTableComponent} from "../base-table/base-table.component";
|
|
14
|
-
import {MatIconModule} from "@angular/material/icon";
|
|
15
|
-
import {FilterRequest} from "../../base-model/filter-request";
|
|
16
|
-
import {ReportRequest} from "../../base-model/report-request.model";
|
|
17
|
-
import {Filter} from "../../base-model/filter.model";
|
|
18
|
-
import {TitleBarComponent} from "../title-bar/title-bar.component";
|
|
19
|
-
import {BaseFormCanvasComponent} from "../base-form-canvas/base-form-canvas.component";
|
|
20
|
-
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
21
|
-
import {DRILL_DOWN_ACTION, JUNIOR_DOWN_ACTION, SnackMessage, TablePageUserAction} from "../../base-model";
|
|
22
|
-
import {} from "../audit-log-details-dialog/audit-log-details-dialog.component";
|
|
23
|
-
import {MatDialog} from "@angular/material/dialog";
|
|
24
|
-
import {ReportDetailsDialogComponent} from "../report-details-dialog/report-details-dialog.component";
|
|
25
|
-
import { cloneDeep } from 'lodash';
|
|
26
|
-
import {MatTooltip} from "@angular/material/tooltip";
|
|
27
|
-
import {Directionality} from "@angular/cdk/bidi";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const NON_REPORT_COLUMNS = ['listAction', 'button', 'checkbox'];
|
|
31
|
-
|
|
32
|
-
@Component({
|
|
33
|
-
selector: 'app-report-form',
|
|
34
|
-
standalone: true,
|
|
35
|
-
imports: [
|
|
36
|
-
TitleBarComponent,
|
|
37
|
-
BaseFormCanvasComponent,
|
|
38
|
-
MatMenu,
|
|
39
|
-
MatMenuItem,
|
|
40
|
-
NgForOf,
|
|
41
|
-
MatMenuTrigger,
|
|
42
|
-
MatButtonModule,
|
|
43
|
-
TranslateModule,
|
|
44
|
-
BaseTableComponent,
|
|
45
|
-
NgIf,
|
|
46
|
-
MatIconModule,
|
|
47
|
-
MatButton,
|
|
48
|
-
MatTooltip
|
|
49
|
-
],
|
|
50
|
-
templateUrl: './report-form.component.html',
|
|
51
|
-
styleUrl: './report-form.component.scss'
|
|
52
|
-
})
|
|
53
|
-
export class ReportFormComponent implements OnInit {
|
|
54
|
-
@Input()
|
|
55
|
-
showDetails : any = [];
|
|
56
|
-
|
|
57
|
-
@Input()
|
|
58
|
-
showExtractButton: boolean = true;
|
|
59
|
-
|
|
60
|
-
@Input()
|
|
61
|
-
columns: TableColumn<any>[] =[];
|
|
62
|
-
|
|
63
|
-
@Input() actionRequestCallback!: (actionRequest: TablePageUserAction) => TablePageUserAction;
|
|
64
|
-
@Input() enrichDrillDownReportRequest!: (actionRequest: TablePageUserAction, reportRequest: ReportRequest) => TablePageUserAction;
|
|
65
|
-
@Input() enrichHyperLinkReportRequest!: (actionRequest: TablePageUserAction, reportRequest: ReportRequest) => TablePageUserAction;
|
|
66
|
-
@Input() enrichJuniorReportRequest!: (actionRequest: TablePageUserAction, reportRequest: ReportRequest) => TablePageUserAction;
|
|
67
|
-
|
|
68
|
-
@Output()
|
|
69
|
-
userAction: EventEmitter<TablePageUserAction> = new EventEmitter<TablePageUserAction>();
|
|
70
|
-
activeLevel: number = 1;
|
|
71
|
-
|
|
72
|
-
private filterRequest: FilterRequest;
|
|
73
|
-
x: any;
|
|
74
|
-
isEditable: boolean = true;
|
|
75
|
-
fields: FieldInfo[] = [];
|
|
76
|
-
pageInfo: PageInfo = EMPTY_PAGE_INFO;
|
|
77
|
-
drillDownPageInfo: PageInfo = EMPTY_PAGE_INFO;
|
|
78
|
-
drillDownColumns: TableColumn<any>[] = [];
|
|
79
|
-
hideDrillDownButton: false;
|
|
80
|
-
|
|
81
|
-
juniorPageInfo: PageInfo = EMPTY_PAGE_INFO;
|
|
82
|
-
juniorColumns: TableColumn<any>[] = [];
|
|
83
|
-
|
|
84
|
-
columnsDefinition: TableColumn<any>[] = [];
|
|
85
|
-
types: string[] = ["pdf", "csv", "xlsx"]
|
|
86
|
-
searchStr: string = '';
|
|
87
|
-
|
|
88
|
-
errors: FieldMessage[] = [];
|
|
89
|
-
|
|
90
|
-
reloadData: boolean = false;
|
|
91
|
-
backButtonEnabled: boolean = true;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
reportRequest: ReportRequest = new ReportRequest({});
|
|
95
|
-
childReportRequest: ReportRequest = new ReportRequest({});
|
|
96
|
-
juniorReportRequest: ReportRequest = new ReportRequest({});
|
|
97
|
-
public reportForm: FormGroup;
|
|
98
|
-
readyToSearch = false;
|
|
99
|
-
private pageSize: any;
|
|
100
|
-
private dialogReportRequest: any;
|
|
101
|
-
currentDirection: 'ltr' | 'rtl';
|
|
102
|
-
|
|
103
|
-
constructor(private translateService: TranslateService,
|
|
104
|
-
public backendService: BackendService,
|
|
105
|
-
private activatedRoute: ActivatedRoute,
|
|
106
|
-
private injector: Injector,
|
|
107
|
-
private router: Router,
|
|
108
|
-
private route: ActivatedRoute,
|
|
109
|
-
private directionality: Directionality,
|
|
110
|
-
public dialog: MatDialog,
|
|
111
|
-
private fb: FormBuilder) {
|
|
112
|
-
ClassicEditor.defaultConfig = {
|
|
113
|
-
toolbar: {
|
|
114
|
-
items: ['heading', '|', 'bold', 'italic', '|', 'bulletedList', 'numberedList']
|
|
115
|
-
},
|
|
116
|
-
image: {
|
|
117
|
-
toolbar: ['imageStyle:side', '|', 'imageTextAlternative']
|
|
118
|
-
},
|
|
119
|
-
table: {
|
|
120
|
-
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
|
|
121
|
-
},
|
|
122
|
-
language: 'en'
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
disableExportAction : boolean = false;
|
|
127
|
-
|
|
128
|
-
ngOnInit(): void {
|
|
129
|
-
this.currentDirection = this.directionality.value;
|
|
130
|
-
this.directionality.change.subscribe((value) => {
|
|
131
|
-
this.currentDirection = value;
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
this.activatedRoute.data.subscribe(data => {
|
|
135
|
-
this.pageInfo = data['pageInfo'];
|
|
136
|
-
this.pageSize = this.pageInfo.pageSize ?? 10;
|
|
137
|
-
this.filterRequest = new FilterRequest(this.pageSize);
|
|
138
|
-
data['pageInfo'].lazyLoadData = true;
|
|
139
|
-
this.drillDownPageInfo = data['drillDownPageInfo'];
|
|
140
|
-
this.drillDownColumns = data['drillDownColumns']?.filter(c => c.property !== 'selectItem');
|
|
141
|
-
this.hideDrillDownButton = data['hideDrillDownButton'] ?? false;
|
|
142
|
-
this.juniorPageInfo = data['juniorPageInfo'];
|
|
143
|
-
this.juniorColumns = data['juniorColumns'];
|
|
144
|
-
this.columnsDefinition = data['columnsDefinition'].filter(c => (this.drillDownPageInfo && this.drillDownColumns || (!NON_REPORT_COLUMNS.includes(c.type))));
|
|
145
|
-
this.fields = data['fields'];
|
|
146
|
-
if (data['enrichDrillDownReportRequest']) {
|
|
147
|
-
this.enrichDrillDownReportRequest = data['enrichDrillDownReportRequest'](this.injector);
|
|
148
|
-
}
|
|
149
|
-
if (data['enrichJuniorReportRequest']) {
|
|
150
|
-
this.enrichJuniorReportRequest = data['enrichJuniorReportRequest'](this.injector);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
if (data['enrichHyperLinkReportRequest']) {
|
|
154
|
-
this.enrichHyperLinkReportRequest = data['enrichHyperLinkReportRequest'](this.injector);
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
this.route.queryParamMap.subscribe(params => {
|
|
158
|
-
const isComparisonReport = params.get('comparisonReport') === 'true';
|
|
159
|
-
|
|
160
|
-
if (isComparisonReport) {
|
|
161
|
-
const comparisonStr = sessionStorage.getItem('comparisonReportPageInfo');
|
|
162
|
-
|
|
163
|
-
if (comparisonStr) {
|
|
164
|
-
const comparisonData = JSON.parse(comparisonStr);
|
|
165
|
-
|
|
166
|
-
this.pageInfo.lazyLoadData = comparisonData.lazyLoadData ?? false;
|
|
167
|
-
this.activeLevel = comparisonData.activeLevel ?? 2;
|
|
168
|
-
this.isEditable = false;
|
|
169
|
-
this.backButtonEnabled = false;
|
|
170
|
-
this.drillDownPageInfo = comparisonData.drillDownPageInfo;
|
|
171
|
-
this.drillDownColumns = comparisonData.drillDownColumns;
|
|
172
|
-
this.reportForm = this.fb.group({
|
|
173
|
-
directorate: [[]],
|
|
174
|
-
fromDate: [''],
|
|
175
|
-
toDate: [''],
|
|
176
|
-
sector: [''],
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
this.reportForm.patchValue(comparisonData.form)
|
|
180
|
-
this.fields = this.fields.filter(c => c.type !== 'checkbox');
|
|
181
|
-
|
|
182
|
-
const reportRequest = comparisonData.reportRequest;
|
|
183
|
-
|
|
184
|
-
this.childReportRequest = this.backendService.buildReportRequest(
|
|
185
|
-
this.drillDownColumns,
|
|
186
|
-
`${this.drillDownPageInfo.labelsSection}.${this.drillDownPageInfo.id}`,
|
|
187
|
-
reportRequest,
|
|
188
|
-
'',
|
|
189
|
-
this.drillDownPageInfo,
|
|
190
|
-
'LANDSCAPE'
|
|
191
|
-
);
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
// ngOnChanges({item, errors, fields}: SimpleChanges): void {
|
|
200
|
-
// // errors?.currentValue?.forEach((msg: FieldMessage) => {
|
|
201
|
-
// // this.backendService.parentForm.get(msg.fieldName)?.setErrors({serverError: msg.message});
|
|
202
|
-
// // });
|
|
203
|
-
// // if (fields?.currentValue && !fields.isFirstChange()){
|
|
204
|
-
// // this.buildForm();
|
|
205
|
-
// // }
|
|
206
|
-
// // this.buildForm();
|
|
207
|
-
// }
|
|
208
|
-
|
|
209
|
-
isMatchHeight() {
|
|
210
|
-
return this.pageInfo.pageHeight === 'match';
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
doAction(type: string) {
|
|
215
|
-
if (this.backendService.parentForm.valid) {
|
|
216
|
-
this.reloadData = !this.reloadData;
|
|
217
|
-
const filterRequest: FilterRequest = new FilterRequest(this.pageSize);
|
|
218
|
-
filterRequest.filters = [];
|
|
219
|
-
let paramsString: string[] = [];
|
|
220
|
-
this.fields.filter(x => x.type !== 'spacer').forEach(f => {
|
|
221
|
-
if (this.getParamValue(f) != null && this.getParamValue(f).toString().trim() !== '')
|
|
222
|
-
{
|
|
223
|
-
if (f.type === 'multi-select' || f.type === 'lookup') {
|
|
224
|
-
// do not filter if this field as cascading for another one and the other one got selected values
|
|
225
|
-
const childFieldIdx = this.fields.findIndex(field => field.cascadedBy === f.property);
|
|
226
|
-
if (childFieldIdx > -1 && this.backendService.parentForm.get(this.fields[childFieldIdx].property)?.value?.length > 0) {
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
const idz: number[] = [];
|
|
230
|
-
const param: string[] = [];
|
|
231
|
-
if (this.backendService.parentForm.get(f.property)?.value && Array.isArray(this.backendService.parentForm.get(f.property)?.value)
|
|
232
|
-
&& this.backendService.parentForm.get(f.property)?.value.length > 0) {
|
|
233
|
-
this.backendService.parentForm.get(f.property)?.value.forEach((a: {
|
|
234
|
-
channelId: number;
|
|
235
|
-
englishName: string;
|
|
236
|
-
id: number;
|
|
237
|
-
}) => {
|
|
238
|
-
if (f.flattenBySubAttribute) {
|
|
239
|
-
idz.push(a[f.flattenBySubAttribute]);
|
|
240
|
-
param.push(a[f.flattenBySubAttribute]);
|
|
241
|
-
} else if (this.fields.find(s => s.property === 'terminalId')) {
|
|
242
|
-
idz.push(a.channelId);
|
|
243
|
-
param.push(a.englishName);
|
|
244
|
-
} else {
|
|
245
|
-
idz.push(a.id);
|
|
246
|
-
param.push(a.englishName);
|
|
247
|
-
}
|
|
248
|
-
})
|
|
249
|
-
filterRequest.filters?.push(new Filter({
|
|
250
|
-
id: f.property, fieldName: f.property, label: this.translateService.instant(f.label),
|
|
251
|
-
filterType: 'FILED_FILTER', operator: f.filterOperator,
|
|
252
|
-
valueObject: idz
|
|
253
|
-
}));
|
|
254
|
-
paramsString.push(this.translateService.instant(f.label) + ' : ' + param.join(','));
|
|
255
|
-
} else if (this.backendService.parentForm.get(f.property)?.value && f.flattenBySubAttribute) {
|
|
256
|
-
filterRequest.filters?.push(new Filter({
|
|
257
|
-
id: f.property, fieldName: f.property, label: this.translateService.instant(f.label),
|
|
258
|
-
filterType: 'FILED_FILTER', operator: f.filterOperator,
|
|
259
|
-
valueObject: this.getParamValue(f)[f.flattenBySubAttribute]
|
|
260
|
-
}));
|
|
261
|
-
}
|
|
262
|
-
} else {
|
|
263
|
-
if (this.backendService.parentForm.get(f.property)?.value !== null &&
|
|
264
|
-
this.backendService.parentForm.get(f.property)?.value !== undefined &&
|
|
265
|
-
this.backendService.parentForm.get(f.property)?.value !== "") {
|
|
266
|
-
filterRequest.filters?.push(new Filter({
|
|
267
|
-
id: f.property, fieldName: f.property, label: this.translateService.instant(f.label),
|
|
268
|
-
filterType: 'FILED_FILTER', operator: f.filterOperator,
|
|
269
|
-
valueObject: this.getParamValue(f)
|
|
270
|
-
}));
|
|
271
|
-
}
|
|
272
|
-
paramsString.push(this.translateService.instant(f.label) + ' : ' + this.getParamValueLabel(f));
|
|
273
|
-
}
|
|
274
|
-
}})
|
|
275
|
-
const reportRequest = this.backendService.buildReportRequest(this.columnsDefinition, this.pageInfo.labelsSection + '.' + this.pageInfo.id,
|
|
276
|
-
filterRequest, type, this.pageInfo, 'LANDSCAPE');
|
|
277
|
-
reportRequest.searchStr = paramsString.join(' , ');
|
|
278
|
-
this.reportRequest = reportRequest;
|
|
279
|
-
// this.activeLevel = 1;
|
|
280
|
-
} else {
|
|
281
|
-
this.backendService.topPanelMessage$.next(new SnackMessage('INVALID_REPORT_FORM', true, 'error'));
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
private getParamValue(f: FieldInfo) {
|
|
286
|
-
if (f.type === 'date' && this.backendService.parentForm.get(f.property)?.value) {
|
|
287
|
-
return formatDate(this.backendService.parentForm.get(f.property)?.value, 'yyyy-MM-dd', 'en_US')
|
|
288
|
-
}else if (f.type === 'checkbox') {
|
|
289
|
-
return !!this.backendService.parentForm.get(f.property)?.value;
|
|
290
|
-
}else {
|
|
291
|
-
return this.backendService.parentForm.get(f.property)?.value;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
private getParamValueLabel(f: FieldInfo) {
|
|
296
|
-
if (f.type === 'checkbox') {
|
|
297
|
-
return this.backendService.parentForm.get(f.property)?.value ? this.translateService.instant('yes') : this.translateService.instant('no');
|
|
298
|
-
}else {
|
|
299
|
-
return this.backendService.parentForm.get(f.property)?.value;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
getTitle() {
|
|
304
|
-
const pageInfoMap = {
|
|
305
|
-
1: this.pageInfo,
|
|
306
|
-
2: this.drillDownPageInfo,
|
|
307
|
-
3: this.juniorPageInfo
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
const currentInfo = pageInfoMap[this.activeLevel] || this.pageInfo;
|
|
311
|
-
return `${currentInfo.labelsSection}.${currentInfo.id}`;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
updateForm($event: FormGroup) {
|
|
315
|
-
this.reportForm = $event;
|
|
316
|
-
this.backendService.parentForm = $event;
|
|
317
|
-
|
|
318
|
-
this.setupDependentFieldWatchers();
|
|
319
|
-
|
|
320
|
-
this.backendService.parentForm.valueChanges.subscribe(x => {
|
|
321
|
-
this.readyToSearch = this.backendService.parentForm.valid;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
private setupDependentFieldWatchers() {
|
|
328
|
-
this.fields
|
|
329
|
-
.filter(field => field.lookupFilterList && field.lookupFilterList.length > 0)
|
|
330
|
-
.forEach(field => {
|
|
331
|
-
const dependentFields = field.lookupFilterList.map(f => f.fieldName);
|
|
332
|
-
|
|
333
|
-
dependentFields.forEach(dependentFieldName => {
|
|
334
|
-
const dependentControl = this.reportForm.get(dependentFieldName);
|
|
335
|
-
if (dependentControl) {
|
|
336
|
-
dependentControl.valueChanges.subscribe(() => {
|
|
337
|
-
const targetControl = this.reportForm.get(field.property);
|
|
338
|
-
if (targetControl) {
|
|
339
|
-
targetControl.setValue([]);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
isValidForm() {
|
|
348
|
-
return this.readyToSearch ;
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
emitUserAction($event: TablePageUserAction) {
|
|
355
|
-
$event.pageInfo = this.pageInfo;
|
|
356
|
-
this.doADrillDownAction($event);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
emitHyperLinkAction($event: TablePageUserAction) {
|
|
360
|
-
if (!this.shouldProcessEventItem($event.item)) return;
|
|
361
|
-
|
|
362
|
-
const item = $event.item;
|
|
363
|
-
this.prepareDialogReportRequest(item);
|
|
364
|
-
const reportRequest = this.buildDialogReportRequest();
|
|
365
|
-
reportRequest.filterRequest.pageIndex = 0
|
|
366
|
-
const dialogRef = this.dialog.open(ReportDetailsDialogComponent, {
|
|
367
|
-
data: {
|
|
368
|
-
pageInfo: this.juniorPageInfo,
|
|
369
|
-
request: reportRequest,
|
|
370
|
-
columns: this.juniorColumns,
|
|
371
|
-
item,
|
|
372
|
-
},
|
|
373
|
-
height: '50vw',
|
|
374
|
-
maxWidth: '120vw',
|
|
375
|
-
direction: this.currentDirection,
|
|
376
|
-
disableClose: false,
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
dialogRef.afterOpened().subscribe(() => this.doHyperLinkAction($event));
|
|
380
|
-
dialogRef.afterClosed().subscribe(() => {});
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
private prepareDialogReportRequest(item: any): void {
|
|
384
|
-
this.dialogReportRequest = cloneDeep(this.reportRequest);
|
|
385
|
-
this.dialogReportRequest.filterRequest = { filters: [] };
|
|
386
|
-
|
|
387
|
-
this.addStandardFilters(item);
|
|
388
|
-
this.addOrReplaceFilter('isec1', 'iSec', item['isec_value']);
|
|
389
|
-
this.addFilterType();
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
private addStandardFilters(item: any): void {
|
|
393
|
-
const standardFilters = [
|
|
394
|
-
{ key: 'period', value: item['period'] },
|
|
395
|
-
{ key: 'year', value: item['year'] },
|
|
396
|
-
{ key: 'sector', value: item['sectorCode'] },
|
|
397
|
-
{ key: 'directorate', value: item['directorateCode'] },
|
|
398
|
-
{ key: 'subTaxRate', value: item['tax_rate_code'] },
|
|
399
|
-
];
|
|
400
|
-
|
|
401
|
-
standardFilters.forEach(({ key, value }) =>
|
|
402
|
-
this.dialogReportRequest.filterRequest.filters.push(
|
|
403
|
-
this.createFilter(key, key, value)
|
|
404
|
-
)
|
|
405
|
-
);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
private addFilterType(): void {
|
|
409
|
-
const isTax = this.dialogReportRequest.actionKey?.toLowerCase().includes('tax');
|
|
410
|
-
const filterType = isTax ? 'TAX' : 'VALUE';
|
|
411
|
-
|
|
412
|
-
this.dialogReportRequest.filterRequest.filters.push(
|
|
413
|
-
this.createFilter('filterType', 'filterType', filterType)
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
private buildDialogReportRequest(): any {
|
|
418
|
-
return this.backendService.buildReportRequest(
|
|
419
|
-
this.juniorColumns,
|
|
420
|
-
`${this.juniorPageInfo.labelsSection}.${this.juniorPageInfo.id}`,
|
|
421
|
-
{ ...this.dialogReportRequest.filterRequest },
|
|
422
|
-
'',
|
|
423
|
-
this.juniorPageInfo,
|
|
424
|
-
'LANDSCAPE'
|
|
425
|
-
);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
private createFilter(key: string, fieldName: string, value: any): Filter {
|
|
429
|
-
return new Filter({
|
|
430
|
-
key,
|
|
431
|
-
fieldName,
|
|
432
|
-
label: '',
|
|
433
|
-
filterType: 'FILED_FILTER',
|
|
434
|
-
operator: 'EQUALS',
|
|
435
|
-
valueObject: value,
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
private addOrReplaceFilter(id: string, fieldName: string, value: any): void {
|
|
440
|
-
const filter = new Filter({
|
|
441
|
-
id,
|
|
442
|
-
fieldName,
|
|
443
|
-
label: '',
|
|
444
|
-
filterType: 'FILED_FILTER',
|
|
445
|
-
operator: 'EQUALS',
|
|
446
|
-
valueObject: value,
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
const filters = this.dialogReportRequest.filterRequest.filters;
|
|
450
|
-
const existingIndex = filters.findIndex((f: Filter) => f.id === id);
|
|
451
|
-
|
|
452
|
-
if (existingIndex !== -1) {
|
|
453
|
-
filters.splice(existingIndex, 1, filter);
|
|
454
|
-
} else {
|
|
455
|
-
filters.push(filter);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
emitJuniorAction($event: TablePageUserAction) {
|
|
462
|
-
const juniorAction = JUNIOR_DOWN_ACTION;
|
|
463
|
-
juniorAction.pageInfo = this.drillDownPageInfo;
|
|
464
|
-
this.doJuniorAction($event);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
drillDown() {
|
|
468
|
-
const drilldownaction = DRILL_DOWN_ACTION;
|
|
469
|
-
drilldownaction.pageInfo = this.drillDownPageInfo;
|
|
470
|
-
this.doADrillDownAction(drilldownaction);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
private doJuniorAction($event: TablePageUserAction) {
|
|
474
|
-
if (this.juniorColumns && this.juniorPageInfo) {
|
|
475
|
-
if (this.enrichJuniorReportRequest) {
|
|
476
|
-
if (this.activeLevel === 2) {
|
|
477
|
-
this.isEditable = false;
|
|
478
|
-
this.disableExportAction = this.juniorPageInfo.hideReportsExtractButton || false;
|
|
479
|
-
this.juniorReportRequest = this.backendService.buildReportRequest(this.juniorColumns,
|
|
480
|
-
this.juniorPageInfo.labelsSection + '.' + this.juniorPageInfo.id,
|
|
481
|
-
this.reportRequest.filterRequest, '', this.juniorPageInfo, 'LANDSCAPE');
|
|
482
|
-
this.enrichJuniorReportRequest($event, this.juniorReportRequest);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
this.activeLevel = this.activeLevel +1;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
private doADrillDownAction($event: TablePageUserAction) {
|
|
489
|
-
if (this.drillDownColumns && this.drillDownPageInfo) {
|
|
490
|
-
if (this.enrichDrillDownReportRequest) {
|
|
491
|
-
if (this.activeLevel === 1) {
|
|
492
|
-
this.isEditable = false;
|
|
493
|
-
this.childReportRequest = this.backendService.buildReportRequest(this.drillDownColumns,
|
|
494
|
-
this.drillDownPageInfo.labelsSection + '.' + this.drillDownPageInfo.id,
|
|
495
|
-
this.reportRequest.filterRequest, '', this.drillDownPageInfo, 'LANDSCAPE');
|
|
496
|
-
this.disableExportAction = this.drillDownPageInfo.hideReportsExtractButton || false;
|
|
497
|
-
this.enrichDrillDownReportRequest($event, this.childReportRequest);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
this.activeLevel = this.activeLevel +1;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
private doHyperLinkAction($event: TablePageUserAction) {
|
|
505
|
-
if (this.enrichHyperLinkReportRequest) {
|
|
506
|
-
this.juniorReportRequest = this.backendService.buildReportRequest(this.juniorColumns,
|
|
507
|
-
this.juniorPageInfo.labelsSection + '.' + this.juniorPageInfo.id,
|
|
508
|
-
this.dialogReportRequest.filterRequest, '', this.juniorPageInfo, 'LANDSCAPE');
|
|
509
|
-
this.disableExportAction = this.juniorPageInfo.hideReportsExtractButton || false;
|
|
510
|
-
this.enrichHyperLinkReportRequest($event, this.juniorReportRequest);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
extractReport(reportType: any) {
|
|
515
|
-
if (this.activeLevel === 1) {
|
|
516
|
-
this.reportRequest.reportType = reportType;
|
|
517
|
-
this.backendService.downloadReport(this.reportRequest, this.pageInfo.apiUri );
|
|
518
|
-
}
|
|
519
|
-
else if (this.activeLevel === 2) {
|
|
520
|
-
this.childReportRequest.reportType = reportType;
|
|
521
|
-
this.backendService.downloadReport(this.childReportRequest, this.drillDownPageInfo.apiUri );
|
|
522
|
-
}
|
|
523
|
-
else if (this.activeLevel === 3) {
|
|
524
|
-
this.juniorReportRequest.reportType = reportType;
|
|
525
|
-
this.backendService.downloadReport(this.juniorReportRequest, this.juniorPageInfo.apiUri );
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
goUp() {
|
|
530
|
-
this.isEditable = true;
|
|
531
|
-
this.activeLevel = this.activeLevel -1;
|
|
532
|
-
this.doAction(this.x);
|
|
533
|
-
this.reloadData = true;
|
|
534
|
-
if (this.activeLevel >1) {
|
|
535
|
-
this.isEditable = false;
|
|
536
|
-
}
|
|
537
|
-
this.disableExportAction = false
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
drillDownEnabled() {
|
|
541
|
-
return this.drillDownPageInfo && !this.hideDrillDownButton && !this.getIsEmptyList();
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
drillDownLabel() {
|
|
545
|
-
return `${this.pageInfo.labelsSection}.drillDownLabel` ;
|
|
546
|
-
}
|
|
547
|
-
getIsEmptyList() {
|
|
548
|
-
return this.backendService.isEmptyItems || this.disableExportAction === true;
|
|
549
|
-
}
|
|
550
|
-
clear() {
|
|
551
|
-
const currentUrl = this.router.url;
|
|
552
|
-
this.router.navigateByUrl('/', { skipLocationChange: true }).then(() => {
|
|
553
|
-
this.router.navigate([currentUrl]);
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
// if (this.reportForm) {
|
|
557
|
-
// this.reportForm.reset();
|
|
558
|
-
//
|
|
559
|
-
// this.fields.forEach(field => {
|
|
560
|
-
// if (field.type === 'lookup' || field.type === 'multi-select') {
|
|
561
|
-
// const control = this.reportForm.get(field.property);
|
|
562
|
-
// if (control) {
|
|
563
|
-
// control.setValue([]);
|
|
564
|
-
// }
|
|
565
|
-
// }
|
|
566
|
-
// });
|
|
567
|
-
// }
|
|
568
|
-
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
isFormEmpty(): boolean {
|
|
573
|
-
if (!this.reportForm || !this.reportForm.value) {
|
|
574
|
-
return true;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
return Object.values(this.reportForm.value).every(value => {
|
|
578
|
-
if (value === null || value === undefined || value === '') {
|
|
579
|
-
return true;
|
|
580
|
-
}
|
|
581
|
-
return Array.isArray(value) && value.length === 0;
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
shouldProcessEventItem(item: any): boolean {
|
|
588
|
-
const groupByProp = this.pageInfo?.groupByProperty;
|
|
589
|
-
const groupByValues = this.pageInfo?.groupByValue;
|
|
590
|
-
|
|
591
|
-
if (!groupByProp || !groupByValues || !item[groupByProp]) {
|
|
592
|
-
return true;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
const value = item[groupByProp].toString();
|
|
596
|
-
|
|
597
|
-
return !groupByValues.some(v => value.includes(v) && value.length >= v.length);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<div class="mainSearchBar">
|
|
2
|
-
<div class="search row align-start-center gap-16">
|
|
3
|
-
|
|
4
|
-
<mat-form-field appearance="outline" class="search__field flex-50">
|
|
5
|
-
<input
|
|
6
|
-
matInput
|
|
7
|
-
class="search__input"
|
|
8
|
-
placeholder="Search..."
|
|
9
|
-
(keydown.enter)="onSearch()"
|
|
10
|
-
[(ngModel)]="searchValue" />
|
|
11
|
-
</mat-form-field>
|
|
12
|
-
|
|
13
|
-
<mat-form-field appearance="outline" class="search__field flex-15">
|
|
14
|
-
<mat-select
|
|
15
|
-
class="search__toggle"
|
|
16
|
-
[(ngModel)]="searchType"
|
|
17
|
-
placeholder="Type">
|
|
18
|
-
<mat-option value="exact">Exact</mat-option>
|
|
19
|
-
<mat-option value="like">Like</mat-option>
|
|
20
|
-
</mat-select>
|
|
21
|
-
</mat-form-field>
|
|
22
|
-
|
|
23
|
-
<mat-form-field appearance="outline" class="search__field flex-15">
|
|
24
|
-
<mat-select
|
|
25
|
-
class="search__toggle"
|
|
26
|
-
[(ngModel)]="selectedSortKey"
|
|
27
|
-
placeholder="Sort By">
|
|
28
|
-
<mat-option *ngFor="let col of getColumns()" [value]="col.property">
|
|
29
|
-
{{ labelKey(col) | translate }}
|
|
30
|
-
</mat-option>
|
|
31
|
-
</mat-select>
|
|
32
|
-
</mat-form-field>
|
|
33
|
-
|
|
34
|
-
<mat-form-field appearance="outline" class="search__field flex-10">
|
|
35
|
-
<mat-select
|
|
36
|
-
class="search__toggle"
|
|
37
|
-
[(ngModel)]="selectedSortType"
|
|
38
|
-
placeholder="Type">
|
|
39
|
-
<mat-option value="ASC">ASC</mat-option>
|
|
40
|
-
<mat-option value="DESC">DESC</mat-option>
|
|
41
|
-
</mat-select>
|
|
42
|
-
</mat-form-field>
|
|
43
|
-
|
|
44
|
-
<div class="search__button row align-center-center">
|
|
45
|
-
<div class="icon-design" (click)="onSearch()">
|
|
46
|
-
<mat-icon class="icon-search" color="primary">search</mat-icon>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|