tango-app-ui-analyse-trax 3.9.2 → 3.9.3
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/.eslintrc.json +37 -0
- package/ng-package.json +7 -0
- package/package.json +12 -25
- package/src/lib/components/action-centre/action-centre.component.html +607 -0
- package/src/lib/components/action-centre/action-centre.component.scss +185 -0
- package/src/lib/components/action-centre/action-centre.component.spec.ts +23 -0
- package/src/lib/components/action-centre/action-centre.component.ts +279 -0
- package/src/lib/components/activity-log/activity-log.component.html +84 -0
- package/src/lib/components/activity-log/activity-log.component.scss +33 -0
- package/src/lib/components/activity-log/activity-log.component.spec.ts +23 -0
- package/src/lib/components/activity-log/activity-log.component.ts +137 -0
- package/src/lib/components/activity-log-v2/activity-log-v2.component.html +189 -0
- package/src/lib/components/activity-log-v2/activity-log-v2.component.scss +162 -0
- package/src/lib/components/activity-log-v2/activity-log-v2.component.spec.ts +23 -0
- package/src/lib/components/activity-log-v2/activity-log-v2.component.ts +517 -0
- package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.html +19 -0
- package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.scss +148 -0
- package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.spec.ts +23 -0
- package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.ts +141 -0
- package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.html +42 -0
- package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.scss +49 -0
- package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.spec.ts +23 -0
- package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.ts +22 -0
- package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.html +724 -0
- package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.scss +217 -0
- package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.spec.ts +23 -0
- package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.ts +122 -0
- package/src/lib/components/add-checklist/add-checklist.component.html +1459 -0
- package/src/lib/components/add-checklist/add-checklist.component.scss +1205 -0
- package/src/lib/components/add-checklist/add-checklist.component.spec.ts +23 -0
- package/src/lib/components/add-checklist/add-checklist.component.ts +2460 -0
- package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.html +207 -0
- package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.scss +213 -0
- package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.spec.ts +23 -0
- package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.ts +621 -0
- package/src/lib/components/add-checklist/counter/counter.component.html +43 -0
- package/src/lib/components/add-checklist/counter/counter.component.scss +49 -0
- package/src/lib/components/add-checklist/counter/counter.component.spec.ts +23 -0
- package/src/lib/components/add-checklist/counter/counter.component.ts +123 -0
- package/src/lib/components/add-multitask/add-multitask.component.html +705 -0
- package/src/lib/components/add-multitask/add-multitask.component.scss +296 -0
- package/src/lib/components/add-multitask/add-multitask.component.spec.ts +23 -0
- package/src/lib/components/add-multitask/add-multitask.component.ts +611 -0
- package/src/lib/components/add-multitask/ascending-validator.ts +13 -0
- package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.html +197 -0
- package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.scss +31 -0
- package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.spec.ts +23 -0
- package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.ts +285 -0
- package/src/lib/components/add-multitask/create-task.data.ts +374 -0
- package/src/lib/components/add-multitask/create-task.interface.ts +177 -0
- package/src/lib/components/add-multitask/unique-string-validator.ts +13 -0
- package/src/lib/components/add-multitask/whitespace-validator.ts +11 -0
- package/src/lib/components/add-task/add-task.component.html +654 -0
- package/src/lib/components/add-task/add-task.component.scss +536 -0
- package/src/lib/components/add-task/add-task.component.spec.ts +23 -0
- package/src/lib/components/add-task/add-task.component.ts +569 -0
- package/src/lib/components/add-task/ascending-validator.ts +13 -0
- package/src/lib/components/add-task/create-task.data.ts +374 -0
- package/src/lib/components/add-task/create-task.interface.ts +192 -0
- package/src/lib/components/add-task/unique-string-validator.ts +13 -0
- package/src/lib/components/add-task/whitespace-validator.ts +11 -0
- package/src/lib/components/approval-popup/approval-popup.component.html +25 -0
- package/src/lib/components/approval-popup/approval-popup.component.scss +3 -0
- package/src/lib/components/approval-popup/approval-popup.component.spec.ts +23 -0
- package/src/lib/components/approval-popup/approval-popup.component.ts +26 -0
- package/src/lib/components/checklist/checklist.component.html +330 -0
- package/src/lib/components/checklist/checklist.component.scss +112 -0
- package/src/lib/components/checklist/checklist.component.spec.ts +23 -0
- package/src/lib/components/checklist/checklist.component.ts +344 -0
- package/src/lib/components/checklist-configure/assign/assign.component.html +665 -0
- package/src/lib/components/checklist-configure/assign/assign.component.scss +219 -0
- package/src/lib/components/checklist-configure/assign/assign.component.spec.ts +23 -0
- package/src/lib/components/checklist-configure/assign/assign.component.ts +932 -0
- package/src/lib/components/checklist-configure/checklist-configure.component.html +4340 -0
- package/src/lib/components/checklist-configure/checklist-configure.component.scss +2338 -0
- package/src/lib/components/checklist-configure/checklist-configure.component.spec.ts +23 -0
- package/src/lib/components/checklist-configure/checklist-configure.component.ts +4659 -0
- package/src/lib/components/checklistlayout/checklistlayout.component.html +30 -0
- package/src/lib/components/checklistlayout/checklistlayout.component.scss +15 -0
- package/src/lib/components/checklistlayout/checklistlayout.component.spec.ts +23 -0
- package/src/lib/components/checklistlayout/checklistlayout.component.ts +47 -0
- package/src/lib/components/chip-dropdown/chip-dropdown.component.html +36 -0
- package/src/lib/components/chip-dropdown/chip-dropdown.component.scss +97 -0
- package/src/lib/components/chip-dropdown/chip-dropdown.component.spec.ts +23 -0
- package/src/lib/components/chip-dropdown/chip-dropdown.component.ts +125 -0
- package/src/lib/components/create-task/create-task.component.html +2003 -0
- package/src/lib/components/create-task/create-task.component.scss +272 -0
- package/src/lib/components/create-task/create-task.component.spec.ts +23 -0
- package/src/lib/components/create-task/create-task.component.ts +614 -0
- package/src/lib/components/create-task/create-task.data.ts +372 -0
- package/src/lib/components/create-task/create-task.interface.ts +182 -0
- package/src/lib/components/create-task/validators/ascending-validator.ts +13 -0
- package/src/lib/components/create-task/validators/unique-string-validator.ts +13 -0
- package/src/lib/components/create-task/validators/whitespace-validator.ts +11 -0
- package/src/lib/components/custom-select/custom-select.component.html +44 -0
- package/src/lib/components/custom-select/custom-select.component.scss +144 -0
- package/src/lib/components/custom-select/custom-select.component.spec.ts +23 -0
- package/src/lib/components/custom-select/custom-select.component.ts +265 -0
- package/src/lib/components/dashboard/dashboard.component.html +1076 -0
- package/src/lib/components/dashboard/dashboard.component.scss +237 -0
- package/src/lib/components/dashboard/dashboard.component.spec.ts +23 -0
- package/src/lib/components/dashboard/dashboard.component.ts +539 -0
- package/src/lib/components/dashboard-info/dashboard-info.component.html +1420 -0
- package/src/lib/components/dashboard-info/dashboard-info.component.scss +409 -0
- package/src/lib/components/dashboard-info/dashboard-info.component.spec.ts +23 -0
- package/src/lib/components/dashboard-info/dashboard-info.component.ts +772 -0
- package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.html +110 -0
- package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.scss +260 -0
- package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.spec.ts +23 -0
- package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.ts +143 -0
- package/src/lib/components/dashboard-layout/dashboard-layout.component.html +1 -0
- package/src/lib/components/dashboard-layout/dashboard-layout.component.scss +0 -0
- package/src/lib/components/dashboard-layout/dashboard-layout.component.spec.ts +23 -0
- package/src/lib/components/dashboard-layout/dashboard-layout.component.ts +10 -0
- package/src/lib/components/disabled-select/disabled-select.component.html +44 -0
- package/src/lib/components/disabled-select/disabled-select.component.scss +149 -0
- package/src/lib/components/disabled-select/disabled-select.component.spec.ts +23 -0
- package/src/lib/components/disabled-select/disabled-select.component.ts +146 -0
- package/src/lib/components/export-gallery/export-gallery.component.html +175 -0
- package/src/lib/components/export-gallery/export-gallery.component.scss +200 -0
- package/src/lib/components/export-gallery/export-gallery.component.spec.ts +23 -0
- package/src/lib/components/export-gallery/export-gallery.component.ts +263 -0
- package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.html +36 -0
- package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.scss +97 -0
- package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.ts +104 -0
- package/src/lib/components/eye-test-audit/custom-select/custom-select.component.html +44 -0
- package/src/lib/components/eye-test-audit/custom-select/custom-select.component.scss +144 -0
- package/src/lib/components/eye-test-audit/custom-select/custom-select.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/custom-select/custom-select.component.ts +265 -0
- package/src/lib/components/eye-test-audit/eye-test/eye-test.component.html +1804 -0
- package/src/lib/components/eye-test-audit/eye-test/eye-test.component.scss +806 -0
- package/src/lib/components/eye-test-audit/eye-test/eye-test.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/eye-test/eye-test.component.ts +1890 -0
- package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.html +25 -0
- package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.scss +0 -0
- package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.ts +20 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.ts +26 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.html +1 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.scss +0 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.ts +24 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.ts +44 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.html +490 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.scss +721 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.ts +1017 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.html +708 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.scss +247 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.ts +446 -0
- package/src/lib/components/eye-test-audit/group-select/group-select.component.html +44 -0
- package/src/lib/components/eye-test-audit/group-select/group-select.component.scss +144 -0
- package/src/lib/components/eye-test-audit/group-select/group-select.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/group-select/group-select.component.ts +147 -0
- package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.html +18 -0
- package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.scss +49 -0
- package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.ts +104 -0
- package/src/lib/components/eye-test-audit/select-drop/select-drop.component.html +44 -0
- package/src/lib/components/eye-test-audit/select-drop/select-drop.component.scss +144 -0
- package/src/lib/components/eye-test-audit/select-drop/select-drop.component.spec.ts +23 -0
- package/src/lib/components/eye-test-audit/select-drop/select-drop.component.ts +152 -0
- package/src/lib/components/eye-test-audit/services/eye-test-audit.service.spec.ts +16 -0
- package/src/lib/components/eye-test-audit/services/eye-test-audit.service.ts +190 -0
- package/src/lib/components/flag-layout/flag-layout.component.html +1 -0
- package/src/lib/components/flag-layout/flag-layout.component.scss +0 -0
- package/src/lib/components/flag-layout/flag-layout.component.spec.ts +23 -0
- package/src/lib/components/flag-layout/flag-layout.component.ts +10 -0
- package/src/lib/components/flags/flags.component.html +473 -0
- package/src/lib/components/flags/flags.component.scss +86 -0
- package/src/lib/components/flags/flags.component.spec.ts +23 -0
- package/src/lib/components/flags/flags.component.ts +280 -0
- package/{lib/components/flags/flags.interface.d.ts → src/lib/components/flags/flags.interface.ts} +73 -65
- package/src/lib/components/flags-info/flags-info.component.html +6012 -0
- package/src/lib/components/flags-info/flags-info.component.scss +278 -0
- package/src/lib/components/flags-info/flags-info.component.spec.ts +23 -0
- package/src/lib/components/flags-info/flags-info.component.ts +490 -0
- package/src/lib/components/flags-info/flags-info.interface.ts +441 -0
- package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.html +1 -0
- package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.scss +4 -0
- package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.ts +78 -0
- package/src/lib/components/flags-new/flags-new.component.html +904 -0
- package/src/lib/components/flags-new/flags-new.component.scss +121 -0
- package/src/lib/components/flags-new/flags-new.component.spec.ts +23 -0
- package/src/lib/components/flags-new/flags-new.component.ts +357 -0
- package/{lib/components/flags-new/flags-new.interface.d.ts → src/lib/components/flags-new/flags-new.interface.ts} +90 -81
- package/src/lib/components/gallery/gallery.component.html +3660 -0
- package/src/lib/components/gallery/gallery.component.scss +930 -0
- package/src/lib/components/gallery/gallery.component.ts +3527 -0
- package/src/lib/components/group-select/group-select.component.html +44 -0
- package/src/lib/components/group-select/group-select.component.scss +144 -0
- package/src/lib/components/group-select/group-select.component.spec.ts +23 -0
- package/src/lib/components/group-select/group-select.component.ts +145 -0
- package/src/lib/components/image-popup/image-popup.component.html +11 -0
- package/src/lib/components/image-popup/image-popup.component.scss +5 -0
- package/src/lib/components/image-popup/image-popup.component.ts +18 -0
- package/src/lib/components/lib/custom-select/custom-select.component.html +42 -0
- package/src/lib/components/lib/custom-select/custom-select.component.scss +131 -0
- package/src/lib/components/lib/custom-select/custom-select.component.spec.ts +23 -0
- package/src/lib/components/lib/custom-select/custom-select.component.ts +151 -0
- package/src/lib/components/manage-task/manage-task.component.html +265 -0
- package/src/lib/components/manage-task/manage-task.component.scss +69 -0
- package/src/lib/components/manage-task/manage-task.component.spec.ts +23 -0
- package/src/lib/components/manage-task/manage-task.component.ts +267 -0
- package/src/lib/components/managechecklist/managechecklist.component.html +176 -0
- package/src/lib/components/managechecklist/managechecklist.component.scss +43 -0
- package/src/lib/components/managechecklist/managechecklist.component.spec.ts +23 -0
- package/src/lib/components/managechecklist/managechecklist.component.ts +176 -0
- package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.html +46 -0
- package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.scss +181 -0
- package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.spec.ts +23 -0
- package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.ts +221 -0
- package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.html +36 -0
- package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.scss +89 -0
- package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.spec.ts +23 -0
- package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.ts +118 -0
- package/src/lib/components/orders/orders.component.html +203 -0
- package/src/lib/components/orders/orders.component.scss +180 -0
- package/src/lib/components/orders/orders.component.spec.ts +25 -0
- package/src/lib/components/orders/orders.component.ts +197 -0
- package/src/lib/components/pagination/pagination.component.html +28 -0
- package/src/lib/components/pagination/pagination.component.scss +6 -0
- package/src/lib/components/pagination/pagination.component.spec.ts +23 -0
- package/src/lib/components/pagination/pagination.component.ts +54 -0
- package/src/lib/components/reactive-select/reactive-select.component.html +18 -0
- package/src/lib/components/reactive-select/reactive-select.component.scss +48 -0
- package/src/lib/components/reactive-select/reactive-select.component.spec.ts +23 -0
- package/src/lib/components/reactive-select/reactive-select.component.ts +104 -0
- package/src/lib/components/reports/date-picker/date-picker.component.html +54 -0
- package/src/lib/components/reports/date-picker/date-picker.component.scss +156 -0
- package/src/lib/components/reports/date-picker/date-picker.component.spec.ts +23 -0
- package/src/lib/components/reports/date-picker/date-picker.component.ts +60 -0
- package/src/lib/components/reports/reports.component.html +225 -0
- package/src/lib/components/reports/reports.component.scss +69 -0
- package/src/lib/components/reports/reports.component.spec.ts +23 -0
- package/src/lib/components/reports/reports.component.ts +334 -0
- package/{lib/components/reports/reports.interface.d.ts → src/lib/components/reports/reports.interface.ts} +50 -46
- package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.html +1 -0
- package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.scss +15 -0
- package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.spec.ts +23 -0
- package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.ts +31 -0
- package/src/lib/components/task/task.component.html +322 -0
- package/src/lib/components/task/task.component.scss +169 -0
- package/src/lib/components/task/task.component.spec.ts +23 -0
- package/src/lib/components/task/task.component.ts +340 -0
- package/src/lib/components/task-configure/task-configure.component.html +737 -0
- package/src/lib/components/task-configure/task-configure.component.scss +569 -0
- package/src/lib/components/task-configure/task-configure.component.spec.ts +23 -0
- package/src/lib/components/task-configure/task-configure.component.ts +1603 -0
- package/src/lib/components/task-configure/task-configure.interface.ts +138 -0
- package/src/lib/components/task-info/task-info.component.html +390 -0
- package/src/lib/components/task-info/task-info.component.scss +56 -0
- package/src/lib/components/task-info/task-info.component.spec.ts +23 -0
- package/src/lib/components/task-info/task-info.component.ts +400 -0
- package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.html +141 -0
- package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.scss +460 -0
- package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.spec.ts +23 -0
- package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.ts +202 -0
- package/src/lib/components/task-layout/task-layout.component.html +1 -0
- package/src/lib/components/task-layout/task-layout.component.scss +0 -0
- package/src/lib/components/task-layout/task-layout.component.spec.ts +23 -0
- package/src/lib/components/task-layout/task-layout.component.ts +10 -0
- package/src/lib/components/task-logs/task-logs.component.html +97 -0
- package/src/lib/components/task-logs/task-logs.component.scss +301 -0
- package/src/lib/components/task-logs/task-logs.component.spec.ts +23 -0
- package/src/lib/components/task-logs/task-logs.component.ts +80 -0
- package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.html +84 -0
- package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.scss +229 -0
- package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.spec.ts +23 -0
- package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.ts +111 -0
- package/src/lib/components/trax-store/trax-store.component.html +78 -0
- package/src/lib/components/trax-store/trax-store.component.scss +134 -0
- package/src/lib/components/trax-store/trax-store.component.spec.ts +23 -0
- package/src/lib/components/trax-store/trax-store.component.ts +172 -0
- package/src/lib/components/traxpopup/traxpopup.component.html +130 -0
- package/src/lib/components/traxpopup/traxpopup.component.scss +225 -0
- package/src/lib/components/traxpopup/traxpopup.component.spec.ts +23 -0
- package/src/lib/components/traxpopup/traxpopup.component.ts +71 -0
- package/src/lib/services/trax.service.spec.ts +16 -0
- package/src/lib/services/trax.service.ts +789 -0
- package/src/lib/tango-analyse-trax-routing.module.ts +151 -0
- package/src/lib/tango-analyse-trax.module.ts +140 -0
- package/{public-api.d.ts → src/public-api.ts} +6 -2
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/esm2022/lib/components/action-centre/action-centre.component.mjs +0 -288
- package/esm2022/lib/components/activity-log/activity-log.component.mjs +0 -150
- package/esm2022/lib/components/activity-log-v2/activity-log-v2.component.mjs +0 -502
- package/esm2022/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.mjs +0 -114
- package/esm2022/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.mjs +0 -24
- package/esm2022/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.mjs +0 -126
- package/esm2022/lib/components/add-checklist/add-checklist.component.mjs +0 -2352
- package/esm2022/lib/components/add-checklist/checklist-popup/checklist-popup.component.mjs +0 -612
- package/esm2022/lib/components/add-checklist/counter/counter.component.mjs +0 -138
- package/esm2022/lib/components/add-multitask/add-multitask.component.mjs +0 -604
- package/esm2022/lib/components/add-multitask/ascending-validator.mjs +0 -11
- package/esm2022/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.mjs +0 -297
- package/esm2022/lib/components/add-multitask/create-task.data.mjs +0 -372
- package/esm2022/lib/components/add-multitask/create-task.interface.mjs +0 -2
- package/esm2022/lib/components/add-multitask/unique-string-validator.mjs +0 -10
- package/esm2022/lib/components/add-multitask/whitespace-validator.mjs +0 -10
- package/esm2022/lib/components/add-task/add-task.component.mjs +0 -561
- package/esm2022/lib/components/add-task/ascending-validator.mjs +0 -11
- package/esm2022/lib/components/add-task/create-task.data.mjs +0 -372
- package/esm2022/lib/components/add-task/create-task.interface.mjs +0 -2
- package/esm2022/lib/components/add-task/unique-string-validator.mjs +0 -10
- package/esm2022/lib/components/add-task/whitespace-validator.mjs +0 -10
- package/esm2022/lib/components/approval-popup/approval-popup.component.mjs +0 -30
- package/esm2022/lib/components/checklist/checklist.component.mjs +0 -327
- package/esm2022/lib/components/checklist-configure/assign/assign.component.mjs +0 -912
- package/esm2022/lib/components/checklist-configure/checklist-configure.component.mjs +0 -4161
- package/esm2022/lib/components/checklistlayout/checklistlayout.component.mjs +0 -44
- package/esm2022/lib/components/chip-dropdown/chip-dropdown.component.mjs +0 -120
- package/esm2022/lib/components/create-task/create-task.component.mjs +0 -585
- package/esm2022/lib/components/create-task/create-task.data.mjs +0 -372
- package/esm2022/lib/components/create-task/create-task.interface.mjs +0 -2
- package/esm2022/lib/components/create-task/validators/ascending-validator.mjs +0 -11
- package/esm2022/lib/components/create-task/validators/unique-string-validator.mjs +0 -10
- package/esm2022/lib/components/create-task/validators/whitespace-validator.mjs +0 -10
- package/esm2022/lib/components/custom-select/custom-select.component.mjs +0 -240
- package/esm2022/lib/components/dashboard/dashboard.component.mjs +0 -532
- package/esm2022/lib/components/dashboard-info/dashboard-info.component.mjs +0 -741
- package/esm2022/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.mjs +0 -155
- package/esm2022/lib/components/dashboard-layout/dashboard-layout.component.mjs +0 -12
- package/esm2022/lib/components/disabled-select/disabled-select.component.mjs +0 -158
- package/esm2022/lib/components/export-gallery/export-gallery.component.mjs +0 -266
- package/esm2022/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.mjs +0 -105
- package/esm2022/lib/components/eye-test-audit/custom-select/custom-select.component.mjs +0 -240
- package/esm2022/lib/components/eye-test-audit/eye-test/eye-test.component.mjs +0 -1733
- package/esm2022/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.mjs +0 -24
- package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.mjs +0 -34
- package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.mjs +0 -27
- package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.mjs +0 -71
- package/esm2022/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.mjs +0 -823
- package/esm2022/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.mjs +0 -412
- package/esm2022/lib/components/eye-test-audit/group-select/group-select.component.mjs +0 -157
- package/esm2022/lib/components/eye-test-audit/reactive-select/reactive-select.component.mjs +0 -105
- package/esm2022/lib/components/eye-test-audit/select-drop/select-drop.component.mjs +0 -162
- package/esm2022/lib/components/eye-test-audit/services/eye-test-audit.service.mjs +0 -166
- package/esm2022/lib/components/flag-layout/flag-layout.component.mjs +0 -12
- package/esm2022/lib/components/flags/flags.component.mjs +0 -263
- package/esm2022/lib/components/flags/flags.interface.mjs +0 -2
- package/esm2022/lib/components/flags-info/flags-info.component.mjs +0 -452
- package/esm2022/lib/components/flags-info/flags-info.interface.mjs +0 -2
- package/esm2022/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.mjs +0 -71
- package/esm2022/lib/components/flags-new/flags-new.component.mjs +0 -335
- package/esm2022/lib/components/flags-new/flags-new.interface.mjs +0 -2
- package/esm2022/lib/components/gallery/gallery.component.mjs +0 -3402
- package/esm2022/lib/components/group-select/group-select.component.mjs +0 -155
- package/esm2022/lib/components/image-popup/image-popup.component.mjs +0 -25
- package/esm2022/lib/components/lib/custom-select/custom-select.component.mjs +0 -158
- package/esm2022/lib/components/manage-task/manage-task.component.mjs +0 -264
- package/esm2022/lib/components/managechecklist/managechecklist.component.mjs +0 -186
- package/esm2022/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.mjs +0 -229
- package/esm2022/lib/components/multi-date-datepicker/multi-date-datepicker.component.mjs +0 -124
- package/esm2022/lib/components/orders/orders.component.mjs +0 -171
- package/esm2022/lib/components/pagination/pagination.component.mjs +0 -62
- package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +0 -108
- package/esm2022/lib/components/reports/date-picker/date-picker.component.mjs +0 -60
- package/esm2022/lib/components/reports/reports.component.mjs +0 -300
- package/esm2022/lib/components/reports/reports.interface.mjs +0 -2
- package/esm2022/lib/components/tango-analyse-trax/tango-analyse-trax.component.mjs +0 -32
- package/esm2022/lib/components/task/task.component.mjs +0 -341
- package/esm2022/lib/components/task-configure/task-configure.component.mjs +0 -1532
- package/esm2022/lib/components/task-configure/task-configure.interface.mjs +0 -2
- package/esm2022/lib/components/task-info/task-info.component.mjs +0 -375
- package/esm2022/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.mjs +0 -208
- package/esm2022/lib/components/task-layout/task-layout.component.mjs +0 -12
- package/esm2022/lib/components/task-logs/task-logs.component.mjs +0 -104
- package/esm2022/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.mjs +0 -107
- package/esm2022/lib/components/trax-store/trax-store.component.mjs +0 -179
- package/esm2022/lib/components/traxpopup/traxpopup.component.mjs +0 -70
- package/esm2022/lib/services/trax.service.mjs +0 -559
- package/esm2022/lib/tango-analyse-trax-routing.module.mjs +0 -153
- package/esm2022/lib/tango-analyse-trax.module.mjs +0 -221
- package/esm2022/public-api.mjs +0 -6
- package/esm2022/tango-app-ui-analyse-trax.mjs +0 -5
- package/fesm2022/tango-app-ui-analyse-trax.mjs +0 -28896
- package/fesm2022/tango-app-ui-analyse-trax.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/action-centre/action-centre.component.d.ts +0 -68
- package/lib/components/activity-log/activity-log.component.d.ts +0 -39
- package/lib/components/activity-log-v2/activity-log-v2.component.d.ts +0 -78
- package/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.d.ts +0 -24
- package/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.d.ts +0 -9
- package/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.d.ts +0 -34
- package/lib/components/add-checklist/add-checklist.component.d.ts +0 -121
- package/lib/components/add-checklist/checklist-popup/checklist-popup.component.d.ts +0 -45
- package/lib/components/add-checklist/counter/counter.component.d.ts +0 -29
- package/lib/components/add-multitask/add-multitask.component.d.ts +0 -102
- package/lib/components/add-multitask/ascending-validator.d.ts +0 -2
- package/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.d.ts +0 -45
- package/lib/components/add-multitask/create-task.data.d.ts +0 -293
- package/lib/components/add-multitask/create-task.interface.d.ts +0 -159
- package/lib/components/add-multitask/unique-string-validator.d.ts +0 -2
- package/lib/components/add-multitask/whitespace-validator.d.ts +0 -2
- package/lib/components/add-task/add-task.component.d.ts +0 -89
- package/lib/components/add-task/ascending-validator.d.ts +0 -2
- package/lib/components/add-task/create-task.data.d.ts +0 -293
- package/lib/components/add-task/create-task.interface.d.ts +0 -161
- package/lib/components/add-task/unique-string-validator.d.ts +0 -2
- package/lib/components/add-task/whitespace-validator.d.ts +0 -2
- package/lib/components/approval-popup/approval-popup.component.d.ts +0 -14
- package/lib/components/checklist/checklist.component.d.ts +0 -40
- package/lib/components/checklist-configure/assign/assign.component.d.ts +0 -105
- package/lib/components/checklist-configure/checklist-configure.component.d.ts +0 -325
- package/lib/components/checklistlayout/checklistlayout.component.d.ts +0 -15
- package/lib/components/chip-dropdown/chip-dropdown.component.d.ts +0 -28
- package/lib/components/create-task/create-task.component.d.ts +0 -76
- package/lib/components/create-task/create-task.data.d.ts +0 -293
- package/lib/components/create-task/create-task.interface.d.ts +0 -163
- package/lib/components/create-task/validators/ascending-validator.d.ts +0 -2
- package/lib/components/create-task/validators/unique-string-validator.d.ts +0 -2
- package/lib/components/create-task/validators/whitespace-validator.d.ts +0 -2
- package/lib/components/custom-select/custom-select.component.d.ts +0 -35
- package/lib/components/dashboard/dashboard.component.d.ts +0 -80
- package/lib/components/dashboard-info/dashboard-info.component.d.ts +0 -117
- package/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.d.ts +0 -41
- package/lib/components/dashboard-layout/dashboard-layout.component.d.ts +0 -5
- package/lib/components/disabled-select/disabled-select.component.d.ts +0 -34
- package/lib/components/export-gallery/export-gallery.component.d.ts +0 -44
- package/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.d.ts +0 -26
- package/lib/components/eye-test-audit/custom-select/custom-select.component.d.ts +0 -35
- package/lib/components/eye-test-audit/eye-test/eye-test.component.d.ts +0 -218
- package/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.d.ts +0 -12
- package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.d.ts +0 -7
- package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.d.ts +0 -11
- package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.d.ts +0 -21
- package/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.d.ts +0 -129
- package/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.d.ts +0 -86
- package/lib/components/eye-test-audit/group-select/group-select.component.d.ts +0 -33
- package/lib/components/eye-test-audit/reactive-select/reactive-select.component.d.ts +0 -32
- package/lib/components/eye-test-audit/select-drop/select-drop.component.d.ts +0 -33
- package/lib/components/eye-test-audit/services/eye-test-audit.service.d.ts +0 -47
- package/lib/components/flag-layout/flag-layout.component.d.ts +0 -5
- package/lib/components/flags/flags.component.d.ts +0 -52
- package/lib/components/flags-info/flags-info.component.d.ts +0 -73
- package/lib/components/flags-info/flags-info.interface.d.ts +0 -430
- package/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.d.ts +0 -13
- package/lib/components/flags-new/flags-new.component.d.ts +0 -60
- package/lib/components/gallery/gallery.component.d.ts +0 -261
- package/lib/components/group-select/group-select.component.d.ts +0 -33
- package/lib/components/image-popup/image-popup.component.d.ts +0 -11
- package/lib/components/lib/custom-select/custom-select.component.d.ts +0 -33
- package/lib/components/manage-task/manage-task.component.d.ts +0 -47
- package/lib/components/managechecklist/managechecklist.component.d.ts +0 -33
- package/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.d.ts +0 -40
- package/lib/components/multi-date-datepicker/multi-date-datepicker.component.d.ts +0 -27
- package/lib/components/orders/orders.component.d.ts +0 -38
- package/lib/components/pagination/pagination.component.d.ts +0 -16
- package/lib/components/reactive-select/reactive-select.component.d.ts +0 -32
- package/lib/components/reports/date-picker/date-picker.component.d.ts +0 -23
- package/lib/components/reports/reports.component.d.ts +0 -55
- package/lib/components/tango-analyse-trax/tango-analyse-trax.component.d.ts +0 -14
- package/lib/components/task/task.component.d.ts +0 -70
- package/lib/components/task-configure/task-configure.component.d.ts +0 -142
- package/lib/components/task-configure/task-configure.interface.d.ts +0 -128
- package/lib/components/task-info/task-info.component.d.ts +0 -76
- package/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.d.ts +0 -61
- package/lib/components/task-layout/task-layout.component.d.ts +0 -5
- package/lib/components/task-logs/task-logs.component.d.ts +0 -27
- package/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.d.ts +0 -26
- package/lib/components/trax-store/trax-store.component.d.ts +0 -45
- package/lib/components/traxpopup/traxpopup.component.d.ts +0 -24
- package/lib/services/trax.service.d.ts +0 -175
- package/lib/tango-analyse-trax-routing.module.d.ts +0 -7
- package/lib/tango-analyse-trax.module.d.ts +0 -68
package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.ts
ADDED
|
@@ -0,0 +1,1017 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewInit,
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
ElementRef,
|
|
6
|
+
HostListener,
|
|
7
|
+
NgZone,
|
|
8
|
+
OnDestroy,
|
|
9
|
+
OnInit,
|
|
10
|
+
ViewChild,
|
|
11
|
+
} from "@angular/core";
|
|
12
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
13
|
+
import { PageInfoService } from "tango-app-ui-global";
|
|
14
|
+
import { ToastService } from "tango-app-ui-shared";
|
|
15
|
+
import { EyeTestAuditService } from "../../services/eye-test-audit.service";
|
|
16
|
+
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
|
|
17
|
+
import { Subject, takeUntil } from "rxjs";
|
|
18
|
+
import dayjs from "dayjs";
|
|
19
|
+
import "dayjs/locale/en";
|
|
20
|
+
import { any } from "@amcharts/amcharts5/.internal/core/util/Array";
|
|
21
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
22
|
+
// import * as Plotly from 'plotly.js-dist-min';
|
|
23
|
+
import { DatePipe } from "@angular/common";
|
|
24
|
+
|
|
25
|
+
@Component({
|
|
26
|
+
selector: "lib-settings-audit",
|
|
27
|
+
templateUrl: "./settings-audit.component.html",
|
|
28
|
+
styleUrl: "./settings-audit.component.scss",
|
|
29
|
+
})
|
|
30
|
+
export class SettingsAuditComponent implements OnInit {
|
|
31
|
+
AuditId: any;
|
|
32
|
+
dayjs = dayjs;
|
|
33
|
+
complianceForm: FormGroup;
|
|
34
|
+
constructor(
|
|
35
|
+
private cd: ChangeDetectorRef,
|
|
36
|
+
private zone: NgZone,
|
|
37
|
+
private fb: FormBuilder,
|
|
38
|
+
private pageInfo: PageInfoService,
|
|
39
|
+
private toastService: ToastService,
|
|
40
|
+
private route: ActivatedRoute,
|
|
41
|
+
private $api: EyeTestAuditService,
|
|
42
|
+
private modalService: NgbModal,
|
|
43
|
+
private router: Router,
|
|
44
|
+
) {}
|
|
45
|
+
@HostListener('document:click', ['$event'])
|
|
46
|
+
onClickOutside(event: MouseEvent) {
|
|
47
|
+
const target = event.target as HTMLElement;
|
|
48
|
+
if (!target.closest('.dropdown2') && !target.closest('.btn')) {
|
|
49
|
+
this.closeDropdown();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
setPageData() {
|
|
53
|
+
this.pageInfo.setTitle("Audit - Eye Test");
|
|
54
|
+
|
|
55
|
+
this.pageInfo.setBreadcrumbs([
|
|
56
|
+
{
|
|
57
|
+
title: "Tango Trax",
|
|
58
|
+
path: "/manage/trax/dashboard",
|
|
59
|
+
isActive: false,
|
|
60
|
+
isSeparator: false,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: "Tango Trax",
|
|
64
|
+
path: "/manage/trax/dashboard",
|
|
65
|
+
isActive: false,
|
|
66
|
+
isSeparator: true,
|
|
67
|
+
},
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
70
|
+
alertUsers: any = [
|
|
71
|
+
{
|
|
72
|
+
id: "6687d9d1a27ee88f9a4457cb",
|
|
73
|
+
userName: "Ajinkya Malshe",
|
|
74
|
+
email: "ajinkya.malshe@yopmail.com",
|
|
75
|
+
role: "admin",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "6687d9d1a27ee88f9a4457cc",
|
|
79
|
+
userName: "John Doe",
|
|
80
|
+
email: "john.doe@yopmail.com",
|
|
81
|
+
role: "manager",
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
users: any;
|
|
85
|
+
auditData: any;
|
|
86
|
+
currentAuditType: any;
|
|
87
|
+
ngOnInit(): void {
|
|
88
|
+
const userData: any = JSON.parse(localStorage.getItem("user-info") || "{}");
|
|
89
|
+
this.users = userData;
|
|
90
|
+
const headers: any = JSON.parse(
|
|
91
|
+
localStorage.getItem("header-filters") || "{}"
|
|
92
|
+
);
|
|
93
|
+
this.auditData = this.$api.getAuditData()
|
|
94
|
+
? this.$api.getAuditData()
|
|
95
|
+
: headers;
|
|
96
|
+
this.complianceForm = this.fb.group({
|
|
97
|
+
threshold: [{ value: null, disabled: true }],
|
|
98
|
+
percentage: [{ value: null, disabled: true }],
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
this.getUser();
|
|
102
|
+
this.getEmailConfig();
|
|
103
|
+
this.getAllRm();
|
|
104
|
+
// this.buildDataObject();
|
|
105
|
+
this.cd.detectChanges();
|
|
106
|
+
this.setPageData();
|
|
107
|
+
this.tableData = [
|
|
108
|
+
{
|
|
109
|
+
rmName: "Olivia",
|
|
110
|
+
clusterName: "John",
|
|
111
|
+
optumId: "OPT001",
|
|
112
|
+
storeName: "LKST1001",
|
|
113
|
+
tangoScore: "9%",
|
|
114
|
+
trustScore: "9%",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
rmName: "Emma",
|
|
118
|
+
clusterName: "Doe",
|
|
119
|
+
optumId: "OPT002",
|
|
120
|
+
storeName: "LKST1002",
|
|
121
|
+
tangoScore: "8%",
|
|
122
|
+
trustScore: "8%",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
rmName: "Ava",
|
|
126
|
+
clusterName: "Smit",
|
|
127
|
+
optumId: "OPT003",
|
|
128
|
+
storeName: "LKST1003",
|
|
129
|
+
tangoScore: "7%",
|
|
130
|
+
trustScore: "7%",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
rmName: "Isabella",
|
|
134
|
+
clusterName: "Johnson",
|
|
135
|
+
optumId: "OPT004",
|
|
136
|
+
storeName: "LKST1004",
|
|
137
|
+
tangoScore: "6%",
|
|
138
|
+
trustScore: "6%",
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
// this.alertUsers = this.alertUsers.map(
|
|
142
|
+
// (user: { userName: string; email: string; role: string }) => ({
|
|
143
|
+
// name: user.userName,
|
|
144
|
+
// value: user.email,
|
|
145
|
+
// role: user.role,
|
|
146
|
+
// })
|
|
147
|
+
// );
|
|
148
|
+
this.route.queryParams.subscribe((params) => {
|
|
149
|
+
// this.storeId = params['storeId'];
|
|
150
|
+
this.currentAuditType = params["type"];
|
|
151
|
+
this.AuditId = params["_id"];
|
|
152
|
+
});
|
|
153
|
+
this.getAuditdetails();
|
|
154
|
+
}
|
|
155
|
+
private readonly destroy$ = new Subject();
|
|
156
|
+
stepWiseProcess: any = [];
|
|
157
|
+
auditDetails: any;
|
|
158
|
+
takeAudit: any;
|
|
159
|
+
getAuditdetails() {
|
|
160
|
+
// this.tableLoading.next('loading');
|
|
161
|
+
let payload = {
|
|
162
|
+
id: this.AuditId,
|
|
163
|
+
type: this.currentAuditType,
|
|
164
|
+
};
|
|
165
|
+
this.$api
|
|
166
|
+
.getAuditdetails(payload)
|
|
167
|
+
.pipe(takeUntil(this.destroy$))
|
|
168
|
+
.subscribe({
|
|
169
|
+
next: (res: any) => {
|
|
170
|
+
if (res && res?.code == 200) {
|
|
171
|
+
// this.disablecancel = false
|
|
172
|
+
this.auditDetails = res?.data?.result;
|
|
173
|
+
if (this.auditDetails.auditStatus === "In-Progress") {
|
|
174
|
+
this.takeAudit = true;
|
|
175
|
+
} else {
|
|
176
|
+
this.takeAudit = false;
|
|
177
|
+
}
|
|
178
|
+
this.stepWiseProcess = this.auditDetails?.steps;
|
|
179
|
+
// setTimeout(()=>{
|
|
180
|
+
// this.getAuditHistory()
|
|
181
|
+
// },100)
|
|
182
|
+
this.cd.detectChanges();
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// this.tableLoading.next('loaded')
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
openItem(event: any) {}
|
|
191
|
+
|
|
192
|
+
// component.ts
|
|
193
|
+
|
|
194
|
+
backNavigation() {
|
|
195
|
+
this.$api.auditFilterData = {
|
|
196
|
+
back: "back",
|
|
197
|
+
auditDetails: this.auditDetails,
|
|
198
|
+
};
|
|
199
|
+
this.router.navigate(["/manage/trax/audit"], {
|
|
200
|
+
queryParams: {
|
|
201
|
+
date: this.dayjs(
|
|
202
|
+
this.auditDetails?.fileDate
|
|
203
|
+
? this.auditDetails?.fileDate
|
|
204
|
+
: this.filterStartDate
|
|
205
|
+
).format("YYYY-MM-DD"),
|
|
206
|
+
typeValue: "physical",
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
selectedComplianceThreshold: any;
|
|
211
|
+
selectedCompliancePercentage: any;
|
|
212
|
+
complianceThresholds = [
|
|
213
|
+
{ value: "<=", label: "<=" },
|
|
214
|
+
{ value: "<", label: "<" },
|
|
215
|
+
{ value: ">=", label: ">=" },
|
|
216
|
+
{ value: ">", label: ">" },
|
|
217
|
+
{ value: "=", label: "=" },
|
|
218
|
+
];
|
|
219
|
+
compliancePercentage = [
|
|
220
|
+
{ value: "10%", label: "10%" },
|
|
221
|
+
{ value: "20%", label: "20%" },
|
|
222
|
+
{ value: "30%", label: "30%" },
|
|
223
|
+
{ value: "40%", label: "40%" },
|
|
224
|
+
{ value: "50%", label: "50%" },
|
|
225
|
+
{ value: "60%", label: "60%" },
|
|
226
|
+
{ value: "70%", label: "70%" },
|
|
227
|
+
{ value: "80%", label: "80%" },
|
|
228
|
+
{ value: "90%", label: "90%" },
|
|
229
|
+
{ value: "100%", label: "100%" },
|
|
230
|
+
];
|
|
231
|
+
|
|
232
|
+
selectedDateRange: any = {
|
|
233
|
+
startDate: this.dayjs().subtract(30, "days"),
|
|
234
|
+
endDate: this.dayjs(),
|
|
235
|
+
};
|
|
236
|
+
filterStartDate: any = this.dayjs().subtract(30, "days").format("YYYY-MM-DD");
|
|
237
|
+
filterEndDate: any = this.dayjs().subtract(0, "days").format("YYYY-MM-DD");
|
|
238
|
+
|
|
239
|
+
ranges: any = {
|
|
240
|
+
Today: [this.dayjs(), this.dayjs()],
|
|
241
|
+
Yesterday: [
|
|
242
|
+
this.dayjs().subtract(1, "days"),
|
|
243
|
+
this.dayjs().subtract(1, "days"),
|
|
244
|
+
],
|
|
245
|
+
"This Week": [this.dayjs().subtract(6, "days"), this.dayjs()],
|
|
246
|
+
"Last Week": [
|
|
247
|
+
this.dayjs().subtract(13, "days").startOf("days"),
|
|
248
|
+
this.dayjs().subtract(7, "days").endOf("days"),
|
|
249
|
+
],
|
|
250
|
+
"This Month": [
|
|
251
|
+
this.dayjs().subtract(30, "days"), // Start date is 30 days before today
|
|
252
|
+
this.dayjs(),
|
|
253
|
+
],
|
|
254
|
+
"Last Month": [
|
|
255
|
+
this.dayjs().subtract(1, "month").startOf("month"),
|
|
256
|
+
this.dayjs().subtract(1, "month").endOf("month"),
|
|
257
|
+
],
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
datechange(event: any) {
|
|
261
|
+
if (event.startDate || event.endDate) {
|
|
262
|
+
this.filterStartDate = this.dayjs(event.startDate).format("YYYY-MM-DD");
|
|
263
|
+
this.filterEndDate = this.dayjs(event.endDate).format("YYYY-MM-DD");
|
|
264
|
+
this.Apply();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
exportXLSX() {
|
|
269
|
+
const requestData = {
|
|
270
|
+
fromDate: this.filterStartDate,
|
|
271
|
+
toDate: this.filterEndDate,
|
|
272
|
+
// type: this.currentAuditType, it is shows only physical
|
|
273
|
+
RMList: this.selectedRms?.length ? this.selectedRms : [],
|
|
274
|
+
clientId: this.auditData?.client
|
|
275
|
+
? this.auditData?.client
|
|
276
|
+
: this.users?.clientId,
|
|
277
|
+
cluster: this.selectedClusters?.length
|
|
278
|
+
? this.selectedClusters
|
|
279
|
+
: [],
|
|
280
|
+
isExport: true,
|
|
281
|
+
searchValue: this.searchValue,
|
|
282
|
+
sortBy: this.sortedColumn ? this.sortedColumn : "RMEmail",
|
|
283
|
+
sortOrder: this.sortOrder ? this.sortOrder : 1,
|
|
284
|
+
offset: 1,
|
|
285
|
+
limit: 10000,
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
this.$api
|
|
289
|
+
.getEmailLogExport(requestData)
|
|
290
|
+
.pipe(takeUntil(this.destroy$))
|
|
291
|
+
.subscribe({
|
|
292
|
+
next: (res: any) => {
|
|
293
|
+
this.$api.saveAsExcelFile(
|
|
294
|
+
res,
|
|
295
|
+
`${this.currentAuditType} Eye Test Table `
|
|
296
|
+
);
|
|
297
|
+
this.cd.detectChanges();
|
|
298
|
+
},
|
|
299
|
+
error: (err: any) => {
|
|
300
|
+
this.toastService.getErrorToast(
|
|
301
|
+
err?.error?.error ? err?.error?.error : err?.error?.message
|
|
302
|
+
);
|
|
303
|
+
},
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
searchValue: any;
|
|
309
|
+
searchData(event:any) {
|
|
310
|
+
this.searchValue = event?.target?.value ?? '';
|
|
311
|
+
this.getEmail();
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
tableData: any = [];
|
|
315
|
+
|
|
316
|
+
sortedColumn: any;
|
|
317
|
+
sortOrder: any;
|
|
318
|
+
onSort(column: string) {
|
|
319
|
+
if (this.sortedColumn === column) {
|
|
320
|
+
this.sortOrder = this.sortOrder === 1 ? -1 : 1;
|
|
321
|
+
} else {
|
|
322
|
+
this.sortedColumn = column ? column : "RMEmail";
|
|
323
|
+
this.sortOrder = 1;
|
|
324
|
+
}
|
|
325
|
+
this.getEmail();
|
|
326
|
+
}
|
|
327
|
+
allUsers: any;
|
|
328
|
+
getUser() {
|
|
329
|
+
let obj = {
|
|
330
|
+
userType: 'client',
|
|
331
|
+
filterByRole: ["admin", "user"],
|
|
332
|
+
isActive: this.users?.isActive,
|
|
333
|
+
clientId:this.auditData?.client ? this.auditData?.client : this.users?.clientId
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
this.$api
|
|
337
|
+
.getuserList(obj)
|
|
338
|
+
.pipe(takeUntil(this.destroy$))
|
|
339
|
+
.subscribe((res: any) => {
|
|
340
|
+
if (res && res?.code == 200) {
|
|
341
|
+
this.allUsers = res?.data?.result?.map((item: any) => ({
|
|
342
|
+
id: item._id,
|
|
343
|
+
name: item.email,
|
|
344
|
+
}));
|
|
345
|
+
|
|
346
|
+
this.getUserConfig(); // call after allUsers is ready
|
|
347
|
+
this.cd.detectChanges();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
configData: any;
|
|
353
|
+
|
|
354
|
+
updateOwner(selectedEmail: any) {
|
|
355
|
+
this.configData = selectedEmail;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
toggleEdit() {
|
|
359
|
+
if (!this.editMode) {
|
|
360
|
+
// entering edit mode → make a working copy
|
|
361
|
+
this.configData = [...this.lastSavedConfig];
|
|
362
|
+
this.editMode = true;
|
|
363
|
+
} else {
|
|
364
|
+
// leaving edit without saving → restore baseline
|
|
365
|
+
this.configData = [...this.lastSavedConfig];
|
|
366
|
+
this.editMode = false;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
cancelEdit() {
|
|
371
|
+
// revert back to last saved state
|
|
372
|
+
this.configData = [...this.lastSavedConfig];
|
|
373
|
+
this.editMode = false;
|
|
374
|
+
}
|
|
375
|
+
editMode = false;
|
|
376
|
+
submitOwners() {
|
|
377
|
+
const payload = {
|
|
378
|
+
clientId: this.auditData?.client, // or this.clientId
|
|
379
|
+
userList: this.configData.map((o: any) => ({
|
|
380
|
+
_id: o.id ?? o.value, // ✅ support both cases
|
|
381
|
+
email: o.name,
|
|
382
|
+
})),
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
this.$api
|
|
386
|
+
.updateUserConfig(payload)
|
|
387
|
+
.pipe(takeUntil(this.destroy$))
|
|
388
|
+
.subscribe({
|
|
389
|
+
next: (res: any) => {
|
|
390
|
+
if (res && res?.code == 200) {
|
|
391
|
+
this.getUserConfig();
|
|
392
|
+
this.toastService.getSuccessToast(res?.message ? res?.message : "Email configuration updated successfully");
|
|
393
|
+
this.editMode = false;
|
|
394
|
+
} else {
|
|
395
|
+
this.toastService.getErrorToast("Failed to update owners");
|
|
396
|
+
}
|
|
397
|
+
this.cd.detectChanges();
|
|
398
|
+
},
|
|
399
|
+
error: (err) => {
|
|
400
|
+
this.toastService.getSuccessToast(err?.error?.error ? err?.error?.error : err?.error?.message);
|
|
401
|
+
},
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// this.onSubmit();
|
|
406
|
+
userConfigList: any = [];
|
|
407
|
+
lastSavedConfig: any;
|
|
408
|
+
getUserConfig() {
|
|
409
|
+
this.$api
|
|
410
|
+
.getUserConfigList(this.auditData?.client)
|
|
411
|
+
.pipe(takeUntil(this.destroy$))
|
|
412
|
+
.subscribe((res: any) => {
|
|
413
|
+
if (res && res?.code == 200) {
|
|
414
|
+
// Assigned users
|
|
415
|
+
this.configData =
|
|
416
|
+
res?.data?.result?.userList?.map((item: any) => ({
|
|
417
|
+
id: item._id,
|
|
418
|
+
name: item.email,
|
|
419
|
+
})) ?? [];
|
|
420
|
+
this.lastSavedConfig = [...this.configData];
|
|
421
|
+
|
|
422
|
+
// Build set of assigned ids
|
|
423
|
+
const assignedIds = new Set(this.configData.map((u: any) => u.id));
|
|
424
|
+
|
|
425
|
+
// Filter from allUsers (not from userConfigList!)
|
|
426
|
+
this.userConfigList = this.allUsers.filter(
|
|
427
|
+
(u: any) => !assignedIds.has(u.id)
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
this.cd.detectChanges();
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// email congig method and variables
|
|
436
|
+
emailConfigList: any;
|
|
437
|
+
editMode1 = true;
|
|
438
|
+
toggleEdit1() {
|
|
439
|
+
this.editMode1 = false;
|
|
440
|
+
this.complianceForm.enable();
|
|
441
|
+
}
|
|
442
|
+
getEmailConfig() {
|
|
443
|
+
this.$api
|
|
444
|
+
.getEmailConfigList(
|
|
445
|
+
this.auditData?.client ? this.auditData?.client : this.users?.clientId
|
|
446
|
+
)
|
|
447
|
+
.pipe(takeUntil(this.destroy$))
|
|
448
|
+
.subscribe((res: any) => {
|
|
449
|
+
if (res && res?.code == 200) {
|
|
450
|
+
this.emailConfigList = res?.data?.result;
|
|
451
|
+
|
|
452
|
+
// Suppose backend returns something like:
|
|
453
|
+
// { threshold: "10", percentage: "80" }
|
|
454
|
+
const initialData = {
|
|
455
|
+
threshold: this.emailConfigList?.complianceThreshold?.condition,
|
|
456
|
+
percentage: this.emailConfigList?.complianceThreshold?.value,
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
// Fill reactive form with values
|
|
460
|
+
this.complianceForm.patchValue(initialData);
|
|
461
|
+
this.cd.detectChanges();
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
lastSavedCompliance: any;
|
|
467
|
+
submitCompliance() {
|
|
468
|
+
if (this.complianceForm.invalid) return;
|
|
469
|
+
const payload = {
|
|
470
|
+
clientId: this.auditData?.client,
|
|
471
|
+
complianceThreshold: {
|
|
472
|
+
condition: this.complianceForm.value.threshold,
|
|
473
|
+
value: this.complianceForm.value.percentage,
|
|
474
|
+
},
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
this.$api
|
|
478
|
+
.updateEmailConfig(this.emailConfigList?._id, payload)
|
|
479
|
+
.pipe(takeUntil(this.destroy$))
|
|
480
|
+
.subscribe({
|
|
481
|
+
next: (res) => {
|
|
482
|
+
this.toastService.getSuccessToast(
|
|
483
|
+
res?.message
|
|
484
|
+
? `Email configuration` + res?.message
|
|
485
|
+
: "Compliance settings updated successfully"
|
|
486
|
+
);
|
|
487
|
+
this.getEmailConfig(); // update baseline
|
|
488
|
+
this.complianceForm.disable();
|
|
489
|
+
this.editMode1 = true;
|
|
490
|
+
this.cd.detectChanges();
|
|
491
|
+
},
|
|
492
|
+
error: (err) => console.error("Update failed:", err),
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
cancelCompliance() {
|
|
497
|
+
this.complianceForm.disable();
|
|
498
|
+
this.editMode1 = true;
|
|
499
|
+
this.getEmailConfig();
|
|
500
|
+
}
|
|
501
|
+
// RMs
|
|
502
|
+
// RmList: any[] = [];
|
|
503
|
+
filteredRms: any[] = [];
|
|
504
|
+
searchRmText = "";
|
|
505
|
+
|
|
506
|
+
// Clusters
|
|
507
|
+
ClusterList: any[] = [];
|
|
508
|
+
filteredClusters: any[] = [];
|
|
509
|
+
searchClusterText = "";
|
|
510
|
+
|
|
511
|
+
// Dropdowns
|
|
512
|
+
Opendropdown = false;
|
|
513
|
+
dropdownOpen: string | null = null;
|
|
514
|
+
|
|
515
|
+
// Open/close dropdown
|
|
516
|
+
opendropdown() {
|
|
517
|
+
this.Opendropdown = !this.Opendropdown;
|
|
518
|
+
}
|
|
519
|
+
closeDropdown() {
|
|
520
|
+
this.dropdownOpen = null;
|
|
521
|
+
}
|
|
522
|
+
rmOpen = false;
|
|
523
|
+
clusterOpen = false;
|
|
524
|
+
|
|
525
|
+
toggleRmDropdown() {
|
|
526
|
+
this.rmOpen = !this.rmOpen;
|
|
527
|
+
this.clusterOpen = false; // close other
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
toggleClusterDropdown() {
|
|
531
|
+
this.clusterOpen = !this.clusterOpen;
|
|
532
|
+
this.rmOpen = false; // close other
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
closeAllDropdowns() {
|
|
536
|
+
this.rmOpen = false;
|
|
537
|
+
this.clusterOpen = false;
|
|
538
|
+
}
|
|
539
|
+
RmList:any[] = [
|
|
540
|
+
{
|
|
541
|
+
_id: "1",
|
|
542
|
+
userName: "Ajay M",
|
|
543
|
+
email: "marellapudi.ajay@lenskart.com",
|
|
544
|
+
role: "admin",
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
_id: "2",
|
|
548
|
+
userName: "Anirban Ghosh",
|
|
549
|
+
email: "anirban.ghosh@lenskart.com",
|
|
550
|
+
role: "admin",
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
_id: "3",
|
|
554
|
+
userName: "Avadhesh Sharma",
|
|
555
|
+
email: "avadhesh.kumar@lenskart.com",
|
|
556
|
+
role: "admin",
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
_id: "4",
|
|
560
|
+
userName: "Ayush Gupta",
|
|
561
|
+
email: "ayush.gupta1@lenskart.in",
|
|
562
|
+
role: "admin",
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
_id: "5",
|
|
566
|
+
userName: "Dhiren Bisht",
|
|
567
|
+
email: "dhirendra.bisht@thelenskart.com",
|
|
568
|
+
role: "admin",
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
_id: "6",
|
|
572
|
+
userName: "Mueen Khan",
|
|
573
|
+
email: "mueen.khan@thelenskart.com",
|
|
574
|
+
role: "admin",
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
_id: "7",
|
|
578
|
+
userName: "Reshma Shetty",
|
|
579
|
+
email: "reshma.shetty@lenskart.in",
|
|
580
|
+
role: "admin",
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
_id: "8",
|
|
584
|
+
userName: "Srinivas Reddy",
|
|
585
|
+
email: "srinivas.reddy@thelenskart.com",
|
|
586
|
+
role: "admin",
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
_id: "9",
|
|
590
|
+
userName: "Suresh Balaji R",
|
|
591
|
+
email: "suresh.r@thelenskart.com",
|
|
592
|
+
role: "admin",
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
_id: "10",
|
|
596
|
+
userName: "Thulasi Krishna",
|
|
597
|
+
email: "krishna.thulasi@lenskart.in",
|
|
598
|
+
role: "admin",
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
_id: "11",
|
|
602
|
+
userName: "Vijeesh V L",
|
|
603
|
+
email: "vijeesh.vl@lenskart.in",
|
|
604
|
+
role: "admin",
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
_id: "12",
|
|
608
|
+
userName: "Kunal Sharma",
|
|
609
|
+
email: "kunal.sharma@lenskart.mobi",
|
|
610
|
+
role: "admin",
|
|
611
|
+
},
|
|
612
|
+
];
|
|
613
|
+
/** ---- RMs ---- */
|
|
614
|
+
getAllRm() {
|
|
615
|
+
// this.$api.getRmList(this.auditData?.client).subscribe((res: any) => {
|
|
616
|
+
// if (res?.code === 200) {
|
|
617
|
+
// const result = Array.isArray(res.data.result)
|
|
618
|
+
// ? res.data.result
|
|
619
|
+
// : [res.data.result];
|
|
620
|
+
this.RmList = this.RmList.map((rm: any) => ({ ...rm, checked: true })); // ✅ pre-select all
|
|
621
|
+
this.filteredRms = [...this.RmList];
|
|
622
|
+
//-- Old code --
|
|
623
|
+
// this.getAllGroups(this.RmList);
|
|
624
|
+
// this.Apply();
|
|
625
|
+
this.getAllGroupsPromise(this.RmList).then(() => {
|
|
626
|
+
this.Apply();
|
|
627
|
+
});
|
|
628
|
+
// }
|
|
629
|
+
// });
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
filterRms() {
|
|
633
|
+
const search = this.searchRmText.toLowerCase();
|
|
634
|
+
this.filteredRms = this.RmList.filter((r) =>
|
|
635
|
+
r.userName.toLowerCase().includes(search)
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
isAllRmsSelected() {
|
|
640
|
+
return (
|
|
641
|
+
this.filteredRms.length > 0 && this.filteredRms.every((r) => r.checked)
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
toggleSelectAllRms(event: any) {
|
|
646
|
+
const checked = event.target.checked;
|
|
647
|
+
this.filteredRms.forEach((r) => (r.checked = checked));
|
|
648
|
+
this.updateSelectedRms();
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
updateSelectedRms() {
|
|
652
|
+
const selected = this.RmList.filter((r) => r.checked);
|
|
653
|
+
// this.getAllGroups(selected); // auto refresh clusters
|
|
654
|
+
this.getAllGroupsPromise(selected).then(() => {
|
|
655
|
+
// auto refresh clusters with promise
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
selectedRmsLabel(): string {
|
|
660
|
+
const selected = this.filteredRms.filter(rm => rm.checked);
|
|
661
|
+
if (selected.length === 0) return '';
|
|
662
|
+
return selected[0].userName;
|
|
663
|
+
}
|
|
664
|
+
getSelectedRmsCount(): number {
|
|
665
|
+
return this.filteredRms.filter(rm => rm.checked).length;
|
|
666
|
+
}
|
|
667
|
+
/** ---- Clusters ---- */
|
|
668
|
+
// getAllGroups(event?: any[]) {
|
|
669
|
+
// let rmList: string[] = [];
|
|
670
|
+
|
|
671
|
+
// if (event?.length) {
|
|
672
|
+
// rmList = event.map((o) => o.email);
|
|
673
|
+
// } else if (this.users?.role === "rm") {
|
|
674
|
+
// rmList = [this.users?.email];
|
|
675
|
+
// }
|
|
676
|
+
|
|
677
|
+
// const obj = {
|
|
678
|
+
// clientId: this.auditData?.client ? this.auditData?.client : this.users?.clientId,
|
|
679
|
+
// rmList
|
|
680
|
+
// };
|
|
681
|
+
|
|
682
|
+
// this.$api.getClusters(obj).subscribe((res: any) => {
|
|
683
|
+
// if (res?.code === 200) {
|
|
684
|
+
// // Initialize clusters with checked=false
|
|
685
|
+
// this.ClusterList = (res.data.result || []).map((c: any) => ({
|
|
686
|
+
// ...c,
|
|
687
|
+
// checked: true
|
|
688
|
+
// }));
|
|
689
|
+
// this.filteredClusters = [...this.ClusterList];
|
|
690
|
+
// } else {
|
|
691
|
+
// this.ClusterList = [];
|
|
692
|
+
// this.filteredClusters = [];
|
|
693
|
+
// }
|
|
694
|
+
// });
|
|
695
|
+
// }
|
|
696
|
+
|
|
697
|
+
getAllGroupsPromise(event?: any[]): Promise<void> {
|
|
698
|
+
return new Promise((resolve, reject) => {
|
|
699
|
+
let rmList: string[] = [];
|
|
700
|
+
|
|
701
|
+
if (event?.length) {
|
|
702
|
+
rmList = event.map((o) => o.email);
|
|
703
|
+
} else if (this.users?.role === "rm") {
|
|
704
|
+
rmList = [this.users?.email];
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const obj = {
|
|
708
|
+
clientId: this.auditData?.client ?? this.users?.clientId,
|
|
709
|
+
rmList
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
this.$api.getClusters(obj).subscribe({
|
|
713
|
+
next: (res: any) => {
|
|
714
|
+
if (res?.code === 200) {
|
|
715
|
+
this.ClusterList = (res.data.result || []).map((c: any) => ({
|
|
716
|
+
...c,
|
|
717
|
+
checked: true,
|
|
718
|
+
}));
|
|
719
|
+
this.filteredClusters = [...this.ClusterList];
|
|
720
|
+
} else {
|
|
721
|
+
this.ClusterList = [];
|
|
722
|
+
this.filteredClusters = [];
|
|
723
|
+
}
|
|
724
|
+
resolve(); // completion
|
|
725
|
+
},
|
|
726
|
+
error: (err) => reject(err),
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
filterClusters() {
|
|
732
|
+
const search = this.searchClusterText.toLowerCase();
|
|
733
|
+
this.filteredClusters = this.ClusterList.filter((c) =>
|
|
734
|
+
c.clusterName.toLowerCase().includes(search)
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
isAllClustersSelected() {
|
|
739
|
+
return (
|
|
740
|
+
this.filteredClusters.length > 0 &&
|
|
741
|
+
this.filteredClusters.every((c) => c.checked)
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
toggleSelectAllClusters(event: any) {
|
|
746
|
+
const checked = event.target.checked;
|
|
747
|
+
this.filteredClusters.forEach((c) => (c.checked = checked));
|
|
748
|
+
this.updateSelectedClusters();
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
updateSelectedClusters() {
|
|
752
|
+
this.selectedClusters = this.ClusterList
|
|
753
|
+
.filter(c => c.checked)
|
|
754
|
+
.map(c => c._id); // or c.clusterName if needed
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
selectedClustersLabel() {
|
|
758
|
+
const selected = this.ClusterList.filter((c) => c.checked);
|
|
759
|
+
if (selected.length === 0) return '';
|
|
760
|
+
return selected[0].clusterName;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
getSelectedClustersCount() {
|
|
764
|
+
return this.ClusterList.filter(c => c.checked).length;
|
|
765
|
+
// return count > 1 ? count - 1 : 0; // Show "+N others"
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/** ---- Apply / Reset ---- */
|
|
769
|
+
Reset() {
|
|
770
|
+
this.rmOpen = false;
|
|
771
|
+
this.clusterOpen = false;
|
|
772
|
+
this.getAllRm();
|
|
773
|
+
this.Opendropdown = false;
|
|
774
|
+
// getAllRm
|
|
775
|
+
// this.getEmail()
|
|
776
|
+
}
|
|
777
|
+
selectedRms: any = [];
|
|
778
|
+
selectedClusters: any = [];
|
|
779
|
+
Apply() {
|
|
780
|
+
const datePipe = new DatePipe("en-US");
|
|
781
|
+
this.selectedRms = this.RmList.filter((r) => r.checked).map((r) => r.email);
|
|
782
|
+
this.selectedClusters = this.ClusterList.filter((c) => c.checked).map(
|
|
783
|
+
(c) => c.clusterName
|
|
784
|
+
);
|
|
785
|
+
this.getEmail();
|
|
786
|
+
this.rmOpen = false;
|
|
787
|
+
this.clusterOpen = false;
|
|
788
|
+
this.Opendropdown = false;
|
|
789
|
+
if (this.filterStartDate) {
|
|
790
|
+
this.filterStartDate = datePipe.transform(
|
|
791
|
+
this.filterStartDate,
|
|
792
|
+
"yyyy-MM-dd"
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
if (this.filterEndDate) {
|
|
796
|
+
this.filterEndDate = datePipe.transform(this.filterEndDate, "yyyy-MM-dd");
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
offset = 1;
|
|
800
|
+
limit = 10;
|
|
801
|
+
pageSize = 10;
|
|
802
|
+
paginationSizes = [10,20,30];
|
|
803
|
+
totalItems = 0;
|
|
804
|
+
setPaginationSizes() {
|
|
805
|
+
if (this.totalItems > 10) {
|
|
806
|
+
this.paginationSizes = [10, 20, 30];
|
|
807
|
+
} else {
|
|
808
|
+
this.paginationSizes = [this.totalItems]; // Just one option if less than 10
|
|
809
|
+
}
|
|
810
|
+
this.pageSize = this.paginationSizes[0];
|
|
811
|
+
}
|
|
812
|
+
loading = false;
|
|
813
|
+
noData = false;
|
|
814
|
+
getEmail() {
|
|
815
|
+
this.loading = true;
|
|
816
|
+
this.noData = false;
|
|
817
|
+
let obj = {
|
|
818
|
+
fromDate: this.filterStartDate,
|
|
819
|
+
toDate: this.filterEndDate,
|
|
820
|
+
// type: this.currentAuditType,
|
|
821
|
+
RMList: this.selectedRms?.length ? this.selectedRms : [],
|
|
822
|
+
clientId: this.auditData?.client
|
|
823
|
+
? this.auditData?.client
|
|
824
|
+
: this.users?.clientId,
|
|
825
|
+
cluster: this.selectedClusters?.length
|
|
826
|
+
? this.selectedClusters
|
|
827
|
+
: [],
|
|
828
|
+
isExport: false,
|
|
829
|
+
searchValue: this.searchValue,
|
|
830
|
+
sortBy: this.sortedColumn ? this.sortedColumn : "RMEmail",
|
|
831
|
+
sortOrder: this.sortOrder ? this.sortOrder : 1,
|
|
832
|
+
offset: this.offset,
|
|
833
|
+
limit: this.limit,
|
|
834
|
+
};
|
|
835
|
+
this.$api
|
|
836
|
+
.getEmailLog(obj)
|
|
837
|
+
.pipe(takeUntil(this.destroy$))
|
|
838
|
+
.subscribe({
|
|
839
|
+
next: (res: any) => {
|
|
840
|
+
if (res && res?.code == 200) {
|
|
841
|
+
this.tableData = res.data.result;
|
|
842
|
+
this.totalItems = res?.data?.count || 0;
|
|
843
|
+
this.setPaginationSizes();
|
|
844
|
+
this.loading = false;
|
|
845
|
+
this.noData = false;
|
|
846
|
+
} else {
|
|
847
|
+
this.tableData = [];
|
|
848
|
+
this.loading = false;
|
|
849
|
+
this.noData = true;
|
|
850
|
+
this.totalItems = 0;
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
error: (err) => {
|
|
854
|
+
this.tableData = [];
|
|
855
|
+
this.loading = false;
|
|
856
|
+
this.noData = true;
|
|
857
|
+
this.totalItems = 0;
|
|
858
|
+
console.error("Update failed:", err);
|
|
859
|
+
},
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
onPageChange(page: number) {
|
|
864
|
+
this.offset = page;
|
|
865
|
+
this.getEmail(); // reload with new page
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
onPageSizeChange(size: number) {
|
|
869
|
+
this.pageSize = size;
|
|
870
|
+
this.limit = size;
|
|
871
|
+
this.offset = 1; // reset to first page when page size changes
|
|
872
|
+
this.getEmail();
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
eyeTestView(data: any) {
|
|
876
|
+
this.$api.setAuditData(data);
|
|
877
|
+
|
|
878
|
+
this.router.navigate(["/manage/trax/audit/start"], {
|
|
879
|
+
queryParams: {
|
|
880
|
+
type: this.currentAuditType,
|
|
881
|
+
storeId: data?.storeId,
|
|
882
|
+
_id: data.auditedId,
|
|
883
|
+
eyeType :data?.comment ? "fake" : "genuine",
|
|
884
|
+
RMEmail:data?.RMEmail,
|
|
885
|
+
cluster:data?.cluster,
|
|
886
|
+
},
|
|
887
|
+
});
|
|
888
|
+
let data1: any = JSON.parse(localStorage.getItem("header-filters") || "");
|
|
889
|
+
data1.date = {
|
|
890
|
+
startDate: this.auditDetails?.fileDate,
|
|
891
|
+
endDate: this.auditDetails?.fileDate
|
|
892
|
+
};
|
|
893
|
+
localStorage.setItem("header-filters", JSON.stringify(data1));
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
// @ViewChild('sankeyChart', { static: true }) chartElement!: ElementRef;
|
|
913
|
+
|
|
914
|
+
// ngAfterViewInit() {
|
|
915
|
+
// const rawData = [
|
|
916
|
+
// { from: "Customization", to: "Formal Pants", value: 3 },
|
|
917
|
+
// { from: "Entry", to: "Formal Pants", value: 12 },
|
|
918
|
+
// { from: "Pin Tuck Pants", to: "Joggers", value: 4 },
|
|
919
|
+
// { from: "Joggers", to: "Formal Pants", value: 2 },
|
|
920
|
+
// { from: "Power Stretch", to: "Customization", value: 2 },
|
|
921
|
+
// { from: "Pin Tuck Pants", to: "Shorts with Lounge wear , Chinos and Pintuck Pants", value: 5 },
|
|
922
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Power Stretch", value: 2 },
|
|
923
|
+
// { from: "Customization", to: "Trial Room", value: 2 },
|
|
924
|
+
// { from: "Joggers", to: "Exit", value: 29 },
|
|
925
|
+
// { from: "Pin Tuck Pants", to: "Power Stretch", value: 2 },
|
|
926
|
+
// { from: "Entry", to: "Customization", value: 64 },
|
|
927
|
+
// { from: "Power Stretch", to: "Pin Tuck Pants", value: 3 },
|
|
928
|
+
// { from: "Customization", to: "Pin Tuck Pants", value: 10 },
|
|
929
|
+
// { from: "Entry", to: "Shorts with Lounge wear , Chinos and Pintuck Pants", value: 49 },
|
|
930
|
+
// { from: "Entry", to: "Joggers", value: 29 },
|
|
931
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Exit", value: 49 },
|
|
932
|
+
// { from: "Joggers", to: "Customization", value: 6 },
|
|
933
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Joggers", value: 3 },
|
|
934
|
+
// { from: "Power Stretch", to: "Joggers", value: 1 },
|
|
935
|
+
// { from: "Customization", to: "Shorts with Lounge wear , Chinos and Pintuck Pants", value: 7 },
|
|
936
|
+
// { from: "Formal Pants", to: "Shorts with Lounge wear , Chinos and Pintuck Pants", value: 1 },
|
|
937
|
+
// { from: "Pin Tuck Pants", to: "Exit", value: 54 },
|
|
938
|
+
// { from: "Power Stretch", to: "Trial Room", value: 2 },
|
|
939
|
+
// { from: "Formal Pants", to: "Customization", value: 3 },
|
|
940
|
+
// { from: "Formal Pants", to: "Power Stretch", value: 1 },
|
|
941
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Trial Room", value: 2 },
|
|
942
|
+
// { from: "Customization", to: "Exit", value: 64 },
|
|
943
|
+
// { from: "Entry", to: "Pin Tuck Pants", value: 54 },
|
|
944
|
+
// { from: "Pin Tuck Pants", to: "Formal Pants", value: 3 },
|
|
945
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Pin Tuck Pants", value: 5 },
|
|
946
|
+
// { from: "Joggers", to: "Power Stretch", value: 4 },
|
|
947
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Formal Pants", value: 3 },
|
|
948
|
+
// { from: "Pin Tuck Pants", to: "Customization", value: 11 },
|
|
949
|
+
// { from: "Formal Pants", to: "Pin Tuck Pants", value: 3 },
|
|
950
|
+
// { from: "Trial Room", to: "Pin Tuck Pants", value: 1 },
|
|
951
|
+
// { from: "Customization", to: "Power Stretch", value: 1 },
|
|
952
|
+
// { from: "Customization", to: "Joggers", value: 6 },
|
|
953
|
+
// { from: "Formal Pants", to: "Exit", value: 12 },
|
|
954
|
+
// { from: "Joggers", to: "Pin Tuck Pants", value: 4 },
|
|
955
|
+
// { from: "Power Stretch", to: "Shorts with Lounge wear , Chinos and Pintuck Pants", value: 1 },
|
|
956
|
+
// { from: "Power Stretch", to: "Exit", value: 18 },
|
|
957
|
+
// { from: "Entry", to: "Trial Room", value: 6 },
|
|
958
|
+
// { from: "Shorts with Lounge wear , Chinos and Pintuck Pants", to: "Customization", value: 5 },
|
|
959
|
+
// { from: "Entry", to: "Power Stretch", value: 18 },
|
|
960
|
+
// { from: "Power Stretch", to: "Formal Pants", value: 1 },
|
|
961
|
+
// { from: "Trial Room", to: "Customization", value: 3 },
|
|
962
|
+
// { from: "Trial Room", to: "Exit", value: 6 },
|
|
963
|
+
// { from: "Formal Pants", to: "Joggers", value: 4 }
|
|
964
|
+
// ];
|
|
965
|
+
|
|
966
|
+
// // Build unique nodes
|
|
967
|
+
// const labels = [...new Set(rawData.flatMap(d => [d.from, d.to]))];
|
|
968
|
+
// const labelToIndex: Record<string, number> = {};
|
|
969
|
+
// labels.forEach((label, i) => (labelToIndex[label] = i));
|
|
970
|
+
|
|
971
|
+
// // Map data for Sankey
|
|
972
|
+
// const source = rawData.map(d => labelToIndex[d.from]);
|
|
973
|
+
// const target = rawData.map(d => labelToIndex[d.to]);
|
|
974
|
+
// const value = rawData.map(d => d.value);
|
|
975
|
+
|
|
976
|
+
// // Assign consistent colors (like amCharts distinct palette)
|
|
977
|
+
// const nodeColors: Record<string, string> = {
|
|
978
|
+
// "Customization": "#1f77b4",
|
|
979
|
+
// "Formal Pants": "#ff7f0e",
|
|
980
|
+
// "Entry": "#2ca02c",
|
|
981
|
+
// "Pin Tuck Pants": "#d62728",
|
|
982
|
+
// "Joggers": "#9467bd",
|
|
983
|
+
// "Power Stretch": "#8c564b",
|
|
984
|
+
// "Exit": "#e377c2",
|
|
985
|
+
// "Trial Room": "#17becf",
|
|
986
|
+
// "Shorts with Lounge wear , Chinos and Pintuck Pants": "#bcbd22"
|
|
987
|
+
// };
|
|
988
|
+
|
|
989
|
+
// const nodeColorArray = labels.map(l => nodeColors[l] || "#999");
|
|
990
|
+
// const linkColorArray = rawData.map(d => nodeColors[d.from] || "#999");
|
|
991
|
+
|
|
992
|
+
// const data: any = [{
|
|
993
|
+
// type: "sankey",
|
|
994
|
+
// orientation: "h",
|
|
995
|
+
// node: {
|
|
996
|
+
// pad: 15,
|
|
997
|
+
// thickness: 20,
|
|
998
|
+
// line: { color: "black", width: 0.5 },
|
|
999
|
+
// label: labels,
|
|
1000
|
+
// color: nodeColorArray
|
|
1001
|
+
// },
|
|
1002
|
+
// link: {
|
|
1003
|
+
// source,
|
|
1004
|
+
// target,
|
|
1005
|
+
// value,
|
|
1006
|
+
// color: linkColorArray
|
|
1007
|
+
// }
|
|
1008
|
+
// }];
|
|
1009
|
+
|
|
1010
|
+
// const layout = {
|
|
1011
|
+
// title: { text: "Sankey Flow (Plotly with AmCharts-like Colors)" },
|
|
1012
|
+
// font: { size: 12 }
|
|
1013
|
+
// };
|
|
1014
|
+
|
|
1015
|
+
// Plotly.newPlot(this.chartElement.nativeElement, data, layout);
|
|
1016
|
+
// }
|
|
1017
|
+
}
|