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
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { Subject, debounceTime, takeUntil } from "rxjs";
|
|
4
|
+
import { GlobalStateService, PageInfoService } from 'tango-app-ui-global';
|
|
5
|
+
import { ToastService } from 'tango-app-ui-shared';
|
|
6
|
+
import { TraxService } from '../../services/trax.service';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'lib-dashboard-info',
|
|
14
|
+
templateUrl: './dashboard-info.component.html',
|
|
15
|
+
styleUrl: './dashboard-info.component.scss'
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export class DashboardInfoComponent implements OnDestroy, OnInit {
|
|
19
|
+
dayjs = dayjs;
|
|
20
|
+
private detach = new Subject();
|
|
21
|
+
private destroy$ = new Subject<void>();
|
|
22
|
+
isExport: boolean = false;
|
|
23
|
+
itemsPerPage = 10
|
|
24
|
+
currentPage = 1
|
|
25
|
+
totalItems = 0
|
|
26
|
+
paginationSizes: any[] = [];
|
|
27
|
+
pageSize = 10
|
|
28
|
+
sortColumName: string = '';
|
|
29
|
+
sortBy: any = '';
|
|
30
|
+
sortDirection: any = '';
|
|
31
|
+
searchInput: any = "";
|
|
32
|
+
infoChecklistData: any[] = [];
|
|
33
|
+
checklistDropdown: any[] = [];
|
|
34
|
+
userlistDropdown: any[] = [];
|
|
35
|
+
searchDisabled: boolean = false;
|
|
36
|
+
invoiceList: any[] = [];
|
|
37
|
+
checklistLoading: boolean = true;
|
|
38
|
+
checklistNoData: boolean = false;
|
|
39
|
+
headerData: any;
|
|
40
|
+
receivedData: string = "Checklist";
|
|
41
|
+
form: FormGroup;
|
|
42
|
+
selectControl: FormControl;
|
|
43
|
+
checklistselectControl: FormControl;
|
|
44
|
+
userlistselectControl: FormControl;
|
|
45
|
+
selectedlistselectControl: FormControl;
|
|
46
|
+
|
|
47
|
+
selectedUser: any;
|
|
48
|
+
selectedUserType: string;
|
|
49
|
+
selectedSourceUserId: string;
|
|
50
|
+
|
|
51
|
+
selectedStatus: any;
|
|
52
|
+
selectedStatusType: string;
|
|
53
|
+
selectedSourceStatusId: string;
|
|
54
|
+
dateType = "daily";
|
|
55
|
+
checklistdatasets: Array<{ value: string, label: string }> = [];
|
|
56
|
+
infoCardDataLoading: boolean = true;
|
|
57
|
+
infoCardNoData: boolean = false;
|
|
58
|
+
infoCardsData: any = {};
|
|
59
|
+
// infoChecklistData: any = {};
|
|
60
|
+
selectedChecklist: any;
|
|
61
|
+
selectedChecklistType: string;
|
|
62
|
+
selectedSourceCheckListId: any;
|
|
63
|
+
selectDropdown: any[] = [];
|
|
64
|
+
selectedvalue: any;
|
|
65
|
+
statusselectControl = [
|
|
66
|
+
{ _id: 'All', label: 'All' },
|
|
67
|
+
{ _id: 'open', label: 'Open' },
|
|
68
|
+
{ _id: 'inprogress', label: 'In Progress' },
|
|
69
|
+
{ _id: 'submit', label: 'Submitted' },
|
|
70
|
+
{ _id: 'redo', label: 'Redo' },
|
|
71
|
+
];
|
|
72
|
+
timeFlag: any;
|
|
73
|
+
date: any;
|
|
74
|
+
infoComparisonCardsData: any = {};
|
|
75
|
+
searchValue: string;
|
|
76
|
+
limit: number;
|
|
77
|
+
offset: number;
|
|
78
|
+
dateLength: number;
|
|
79
|
+
checklistInfoDate: string;
|
|
80
|
+
refreshDropdown:boolean = true
|
|
81
|
+
refreshuserDropdown:boolean = true
|
|
82
|
+
selectAll: boolean = false;
|
|
83
|
+
isTodaySelected: boolean;
|
|
84
|
+
monthlyperformce: string;
|
|
85
|
+
todayDate: string;
|
|
86
|
+
userEmailes: any = [];
|
|
87
|
+
traxMonthlyComparisonData: any = "";
|
|
88
|
+
|
|
89
|
+
constructor(private route: ActivatedRoute, private router: Router, public gs: GlobalStateService, private changeDetector: ChangeDetectorRef, private toast: ToastService,
|
|
90
|
+
private TraxService: TraxService, private fb: FormBuilder, private pageInfo: PageInfoService, private toastService: ToastService
|
|
91
|
+
) { this.userEmailes = JSON.parse(localStorage.getItem("usersEmail-info") || "[]" ) }
|
|
92
|
+
ngOnDestroy(): void {
|
|
93
|
+
this.destroy$.next();
|
|
94
|
+
this.destroy$.complete();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
ngOnInit(): void {
|
|
99
|
+
this.todayDate = dayjs().format('DD MMM YYYY');
|
|
100
|
+
// this.isTodaySelected = this.checklistInfoDate === today;
|
|
101
|
+
this.dateType = localStorage.getItem('dashboardDateType') || 'defaultType';
|
|
102
|
+
this.selectedlistselectControl = new FormControl('All');
|
|
103
|
+
this.date = this.dayjs().format('YYYY-MM-DD');
|
|
104
|
+
this.checklistInfoDate = this.dayjs().format('DD MMM YYYY');
|
|
105
|
+
this.route?.queryParams
|
|
106
|
+
this.route?.queryParams
|
|
107
|
+
?.pipe(takeUntil(this.detach))
|
|
108
|
+
.subscribe((params) => {
|
|
109
|
+
if (params.type === 'Checklist') {
|
|
110
|
+
this.selectedvalue = params.checklist
|
|
111
|
+
if (params.status == 'submit') {
|
|
112
|
+
this.selectedlistselectControl.setValue('submit');
|
|
113
|
+
}
|
|
114
|
+
if (params.status == 'redo') {
|
|
115
|
+
this.selectedlistselectControl.setValue('redo');
|
|
116
|
+
}
|
|
117
|
+
this.receivedData = 'Checklist';
|
|
118
|
+
this.infoCardsData = params.checklistData ? JSON.parse(params.checklistData) : null;
|
|
119
|
+
} else if (params.type === 'store') {
|
|
120
|
+
this.selectedvalue = params.store_id
|
|
121
|
+
this.receivedData = 'Store';
|
|
122
|
+
} else if (params.type === 'user') {
|
|
123
|
+
this.selectedvalue = params.userEmail
|
|
124
|
+
this.receivedData = 'User';
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
this.checklistselectControl = new FormControl('');
|
|
129
|
+
this.form = this.fb.group({
|
|
130
|
+
checklistselectControl: this.checklistselectControl
|
|
131
|
+
});
|
|
132
|
+
this.checklistselectControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
|
|
133
|
+
this.onChecklistSelect({_id:this.selectedvalue});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
this.userlistselectControl = new FormControl('');
|
|
138
|
+
this.form = this.fb.group({
|
|
139
|
+
userlistselectControl: this.userlistselectControl
|
|
140
|
+
});
|
|
141
|
+
this.userlistselectControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
|
|
142
|
+
this.onUserSelect({userEmail:value});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
this.form = this.fb.group({
|
|
146
|
+
selectedlistselectControl: this.selectedlistselectControl
|
|
147
|
+
});
|
|
148
|
+
this.selectedlistselectControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value: any) => {
|
|
149
|
+
this.onValueChangeStatusSelect(value);
|
|
150
|
+
});
|
|
151
|
+
this.gs.dataRangeValue
|
|
152
|
+
.pipe(takeUntil(this.destroy$), debounceTime(300))
|
|
153
|
+
.subscribe((data: any) => {
|
|
154
|
+
if (data) {
|
|
155
|
+
this.headerData = data;
|
|
156
|
+
// this.dateLength = getDaysBetweenDates(data?.date.startDate, data?.date.endDate);
|
|
157
|
+
// if (this.dateLength > 28)
|
|
158
|
+
// this.dateType = "monthly";
|
|
159
|
+
// else if (this.dateLength > 5)
|
|
160
|
+
// this.dateType = "weekly";
|
|
161
|
+
// else if(this.dateLength === 0)
|
|
162
|
+
// this.dateType = "weekly";
|
|
163
|
+
|
|
164
|
+
this.setPageData();
|
|
165
|
+
if (this.receivedData === 'Checklist') {
|
|
166
|
+
this.getchecklistDropdown();
|
|
167
|
+
} else if (this.receivedData === 'User') {
|
|
168
|
+
this.getUserlistDropdown();
|
|
169
|
+
} else {
|
|
170
|
+
|
|
171
|
+
this.getInfoCardsData();
|
|
172
|
+
this.getInfoComparisonCardsData()
|
|
173
|
+
this.getChecklistInfoData();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
setPageData() {
|
|
182
|
+
this.pageInfo.setTitle("Dashboard");
|
|
183
|
+
// this.pageInfo.setDescription("Dashboard");
|
|
184
|
+
this.pageInfo.setBreadcrumbs([
|
|
185
|
+
{ title: "Tango Trax", path: "/manage/trax/dashboard", isActive: false, isSeparator: false },
|
|
186
|
+
{ title: "Tango Trax", path: "/manage/trax/dashboard", isActive: false, isSeparator: true },
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
getUserlistDropdown(): void {
|
|
191
|
+
const requestData = {
|
|
192
|
+
fromDate: this.headerData.date.startDate,
|
|
193
|
+
toDate: this.headerData.date.endDate,
|
|
194
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
195
|
+
userEmailes: this.userEmailes,
|
|
196
|
+
clientId: this.headerData.client,
|
|
197
|
+
};
|
|
198
|
+
this.TraxService.getUserlistDropdownData(requestData).pipe(takeUntil(this.destroy$)).subscribe(
|
|
199
|
+
(response: any) => {
|
|
200
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
201
|
+
this.userlistDropdown = response.data?.userData;
|
|
202
|
+
this.selectedUser = this.userlistDropdown.find(item => item.userEmail === this.selectedvalue);
|
|
203
|
+
if (this.selectedUser) {
|
|
204
|
+
// setTimeout(() => {
|
|
205
|
+
this.userlistselectControl.setValue(this.selectedUser.userEmail);
|
|
206
|
+
this.selectedSourceCheckListId = this.selectedUser.userEmail;
|
|
207
|
+
this.checklistNoData = false;
|
|
208
|
+
this.changeDetector.detectChanges();
|
|
209
|
+
// }, 100);
|
|
210
|
+
|
|
211
|
+
}
|
|
212
|
+
else if (this.userlistDropdown.length > 0) {
|
|
213
|
+
this.userlistselectControl.setValue(this.userlistDropdown[0].userEmail);
|
|
214
|
+
this.selectedUser = this.userlistDropdown[0];
|
|
215
|
+
this.infoCardsData = []
|
|
216
|
+
this.infoComparisonCardsData = []
|
|
217
|
+
this.checklistLoading = false
|
|
218
|
+
this.checklistNoData = true;
|
|
219
|
+
this.infoCardNoData = true;
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
this.selectedUser = ""
|
|
223
|
+
this.userlistDropdown = [];
|
|
224
|
+
this.selectedSourceCheckListId = [];
|
|
225
|
+
this.refreshuserDropdown = false
|
|
226
|
+
setTimeout(() => {
|
|
227
|
+
this.refreshuserDropdown = true
|
|
228
|
+
this.changeDetector.detectChanges();
|
|
229
|
+
}, 0);
|
|
230
|
+
this.infoCardsData = []
|
|
231
|
+
this.infoComparisonCardsData = []
|
|
232
|
+
this.checklistLoading = false
|
|
233
|
+
this.checklistNoData = true;
|
|
234
|
+
|
|
235
|
+
this.infoCardNoData = true;
|
|
236
|
+
this.changeDetector.detectChanges();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
},
|
|
240
|
+
error => {
|
|
241
|
+
this.userlistDropdown = [];
|
|
242
|
+
this.selectedSourceCheckListId = [];
|
|
243
|
+
this.changeDetector.detectChanges();
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
getchecklistDropdown(): void {
|
|
248
|
+
const requestData = {
|
|
249
|
+
fromDate: this.headerData.date.startDate,
|
|
250
|
+
toDate: this.headerData.date.endDate,
|
|
251
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
252
|
+
userEmailes: this.userEmailes,
|
|
253
|
+
clientId: this.headerData.client,
|
|
254
|
+
};
|
|
255
|
+
this.TraxService.getChecklistDropdownDashboardData(requestData).pipe(takeUntil(this.destroy$)).subscribe(
|
|
256
|
+
(response: any) => {
|
|
257
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
258
|
+
this.checklistDropdown = response.data?.checklistData;
|
|
259
|
+
this.selectedChecklist = this.checklistDropdown.find(item => item.sourceCheckList_id === this.selectedvalue);
|
|
260
|
+
if (this.selectedChecklist) {
|
|
261
|
+
this.checklistselectControl.setValue(this.selectedChecklist.sourceCheckList_id);
|
|
262
|
+
this.selectedChecklistType = this.selectedChecklist.checkListType;
|
|
263
|
+
this.selectedvalue = this.selectedChecklist.sourceCheckList_id;
|
|
264
|
+
this.checklistNoData = false;
|
|
265
|
+
this.changeDetector.detectChanges();
|
|
266
|
+
}
|
|
267
|
+
else if (this.checklistDropdown.length > 0) {
|
|
268
|
+
this.checklistselectControl.setValue(this.checklistDropdown[0].sourceCheckList_id);
|
|
269
|
+
this.infoCardsData = []
|
|
270
|
+
this.infoComparisonCardsData = []
|
|
271
|
+
this.checklistLoading = false
|
|
272
|
+
this.checklistNoData = true;
|
|
273
|
+
this.infoCardNoData = true;
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
this.checklistDropdown = [];
|
|
277
|
+
this.checklistLoading = false
|
|
278
|
+
this.checklistNoData = true;
|
|
279
|
+
this.selectedSourceCheckListId = [];
|
|
280
|
+
this.refreshDropdown = false
|
|
281
|
+
setTimeout(() => {
|
|
282
|
+
this.refreshDropdown = true
|
|
283
|
+
this.changeDetector.detectChanges();
|
|
284
|
+
}, 0);
|
|
285
|
+
this.infoCardsData = []
|
|
286
|
+
this.infoComparisonCardsData = []
|
|
287
|
+
this.checklistLoading = false
|
|
288
|
+
this.checklistNoData = true;
|
|
289
|
+
this.infoCardNoData = true;
|
|
290
|
+
this.changeDetector.detectChanges();
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
error => {
|
|
294
|
+
this.checklistDropdown = [];
|
|
295
|
+
this.selectedSourceCheckListId = [];
|
|
296
|
+
this.changeDetector.detectChanges();
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
getInfoCardsData(): void {
|
|
302
|
+
this.infoChecklistData = []
|
|
303
|
+
this.infoCardDataLoading = true;
|
|
304
|
+
this.infoCardNoData = true;
|
|
305
|
+
const requestData = {
|
|
306
|
+
fromDate: this.headerData.date.startDate,
|
|
307
|
+
toDate: this.headerData.date.endDate,
|
|
308
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
309
|
+
userEmailes: this.userEmailes,
|
|
310
|
+
clientId: this.headerData.client,
|
|
311
|
+
groupByType: this.receivedData,
|
|
312
|
+
groupByValue: this.selectedvalue,
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
this.TraxService.getInfoCardsData(requestData).pipe(takeUntil(this.destroy$)).subscribe((response: any) => {
|
|
316
|
+
this.infoCardDataLoading = false;
|
|
317
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
318
|
+
this.infoCardsData = response.data?.overallInfoCards || {};
|
|
319
|
+
this.infoCardDataLoading = false;
|
|
320
|
+
this.infoCardNoData = false;
|
|
321
|
+
} else {
|
|
322
|
+
this.infoCardsData = []
|
|
323
|
+
this.infoCardDataLoading = false;
|
|
324
|
+
this.infoCardNoData = true;
|
|
325
|
+
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
error => {
|
|
329
|
+
this.infoCardsData = []
|
|
330
|
+
this.infoCardDataLoading = false;
|
|
331
|
+
this.infoCardNoData = true;
|
|
332
|
+
this.changeDetector.detectChanges()
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
getInfoComparisonCardsData(): void {
|
|
338
|
+
this.infoComparisonCardsData = []
|
|
339
|
+
this.infoCardDataLoading = true;
|
|
340
|
+
this.infoCardNoData = true;
|
|
341
|
+
const requestData = {
|
|
342
|
+
fromDate: this.headerData.date.startDate,
|
|
343
|
+
toDate: this.headerData.date.endDate,
|
|
344
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
345
|
+
userEmailes: this.userEmailes,
|
|
346
|
+
clientId: this.headerData.client,
|
|
347
|
+
groupByType: this.receivedData,
|
|
348
|
+
groupByValue: this.selectedvalue,
|
|
349
|
+
dateType: this.dateType,
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
this.TraxService.getInfoComparisonCardsData(requestData).pipe(takeUntil(this.destroy$)).subscribe((response: any) => {
|
|
353
|
+
this.infoCardDataLoading = false;
|
|
354
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
355
|
+
this.infoComparisonCardsData = response.data?.infoComparisonCards || {};
|
|
356
|
+
if (this.traxMonthlyComparisonData == '') {
|
|
357
|
+
this.traxMonthlyComparisonData = response?.data?.infoComparisonCards?.traxMonthlyComparison
|
|
358
|
+
}
|
|
359
|
+
this.infoCardDataLoading = false;
|
|
360
|
+
this.infoCardNoData = false;
|
|
361
|
+
} else {
|
|
362
|
+
this.infoComparisonCardsData = []
|
|
363
|
+
this.infoCardDataLoading = false;
|
|
364
|
+
this.infoCardNoData = true;
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
error => {
|
|
368
|
+
this.infoComparisonCardsData = []
|
|
369
|
+
this.infoCardDataLoading = false;
|
|
370
|
+
this.infoCardNoData = true;
|
|
371
|
+
this.changeDetector.detectChanges()
|
|
372
|
+
}
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
getChecklistInfoData(): void {
|
|
377
|
+
|
|
378
|
+
this.searchDisabled = true;
|
|
379
|
+
this.checklistLoading = true;
|
|
380
|
+
this.checklistNoData = true;
|
|
381
|
+
|
|
382
|
+
const selectedStores = this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId);
|
|
383
|
+
if (selectedStores.length > 1 && this.receivedData === 'Store') {
|
|
384
|
+
this.router.navigate(['/manage/trax/dashboard'], {
|
|
385
|
+
queryParams: { type: 'store' }
|
|
386
|
+
});
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
const requestData = {
|
|
391
|
+
fromDate: this.headerData.date.startDate,
|
|
392
|
+
toDate: this.headerData.date.endDate,
|
|
393
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
394
|
+
userEmailes: this.userEmailes,
|
|
395
|
+
clientId: this.headerData.client,
|
|
396
|
+
limit: this.itemsPerPage,
|
|
397
|
+
offset: this.currentPage - 1,
|
|
398
|
+
sortBy: this.sortDirection,
|
|
399
|
+
sortColumnName: this.sortColumName,
|
|
400
|
+
searchValue: this.searchInput,
|
|
401
|
+
groupByType: this.receivedData,
|
|
402
|
+
groupByValue: this.selectedvalue,
|
|
403
|
+
export: false,
|
|
404
|
+
checklistStatus: this.selectedlistselectControl.value,
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
this.TraxService.getChecklistInfoData(requestData)
|
|
408
|
+
.pipe(takeUntil(this.destroy$))
|
|
409
|
+
.subscribe((response: any) => {
|
|
410
|
+
this.checklistLoading = false;
|
|
411
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
412
|
+
this.infoChecklistData = response.data.checklistInfo;
|
|
413
|
+
this.totalItems = response.data.totalCount
|
|
414
|
+
|
|
415
|
+
this.isTodaySelected = this.headerData.date.startDate === new Date().toISOString().split('T')[0];
|
|
416
|
+
this.selectAll = false;
|
|
417
|
+
this.infoChecklistData.forEach((item) => (item.selected = false));
|
|
418
|
+
|
|
419
|
+
this.setPaginationSizes()
|
|
420
|
+
this.checklistLoading = false;
|
|
421
|
+
this.checklistNoData = false;
|
|
422
|
+
this.searchDisabled = false;
|
|
423
|
+
this.timeFlag = response.data.timeFlag;
|
|
424
|
+
} else {
|
|
425
|
+
this.checklistLoading = false;
|
|
426
|
+
this.checklistNoData = true;
|
|
427
|
+
this.selectedSourceCheckListId = [];
|
|
428
|
+
this.searchDisabled = true;
|
|
429
|
+
if (this.searchInput?.length) {
|
|
430
|
+
this.searchDisabled = true
|
|
431
|
+
}
|
|
432
|
+
this.infoChecklistData = []
|
|
433
|
+
this.totalItems = 0
|
|
434
|
+
this.changeDetector.detectChanges()
|
|
435
|
+
}
|
|
436
|
+
}, error => {
|
|
437
|
+
this.infoChecklistData = []
|
|
438
|
+
this.selectedSourceCheckListId = [];
|
|
439
|
+
this.changeDetector.detectChanges()
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
// onExport(): void {
|
|
443
|
+
// this.currentPage = 0;
|
|
444
|
+
// const requestData = {
|
|
445
|
+
// fromDate: this.headerData.date.startDate,
|
|
446
|
+
// toDate: this.headerData.date.endDate,
|
|
447
|
+
// storeId: this.headerData.stores.filter((store:any) => store.checked).map((store:any) => store.storeId),
|
|
448
|
+
// // storeId: ["11-253", "11-511","11-1176"],
|
|
449
|
+
// clientId:this.headerData.client,
|
|
450
|
+
// // valueType: "sum",
|
|
451
|
+
// search: this.searchInput,
|
|
452
|
+
// sort: this.sortColumName,
|
|
453
|
+
// sortBy: this.sortDirection,
|
|
454
|
+
// limit: 10000,
|
|
455
|
+
// offset: this.currentPage,
|
|
456
|
+
// // export: true
|
|
457
|
+
// };
|
|
458
|
+
|
|
459
|
+
// this.TraxService.getSummaryTableExport(requestData)
|
|
460
|
+
// .pipe(takeUntil(this.destroy$))
|
|
461
|
+
// .subscribe({
|
|
462
|
+
// next: (res) => {
|
|
463
|
+
// this.TraxService.saveAsExcelFile(res, 'ZoneSummaryTable');
|
|
464
|
+
// },
|
|
465
|
+
// error: (e) => {
|
|
466
|
+
// this.toast.getErrorToast('Something went Wrong..')
|
|
467
|
+
// }
|
|
468
|
+
// });
|
|
469
|
+
// }
|
|
470
|
+
searchField(): void {
|
|
471
|
+
this.headerData.search = this.searchInput;
|
|
472
|
+
this.currentPage = 1;
|
|
473
|
+
this.pageSize = 10;
|
|
474
|
+
this.getChecklistInfoData();
|
|
475
|
+
}
|
|
476
|
+
sortData(column: string): void {
|
|
477
|
+
if (this.sortColumName === column) {
|
|
478
|
+
this.sortDirection = this.sortDirection === 1 ? -1 : 1;
|
|
479
|
+
} else {
|
|
480
|
+
this.sortColumName = column;
|
|
481
|
+
this.sortDirection = 1;
|
|
482
|
+
}
|
|
483
|
+
this.changeDetector.detectChanges();
|
|
484
|
+
this.getChecklistInfoData();
|
|
485
|
+
}
|
|
486
|
+
onPageSizeChange(pageSize: any) {
|
|
487
|
+
this.currentPage = 1;
|
|
488
|
+
this.itemsPerPage = pageSize;
|
|
489
|
+
this.pageSize = pageSize;
|
|
490
|
+
this.changeDetector.detectChanges();
|
|
491
|
+
this.getChecklistInfoData()
|
|
492
|
+
}
|
|
493
|
+
onPageChange(pageOffset: any) {
|
|
494
|
+
this.currentPage = pageOffset
|
|
495
|
+
this.getChecklistInfoData()
|
|
496
|
+
}
|
|
497
|
+
setPaginationSizes() {
|
|
498
|
+
if (this.totalItems > 10) {
|
|
499
|
+
this.paginationSizes = [10, 20, 30];
|
|
500
|
+
} else {
|
|
501
|
+
this.paginationSizes = [this.totalItems];
|
|
502
|
+
this.pageSize = this.totalItems;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
onChecklistSelect(event: any): void {
|
|
507
|
+
this.selectedChecklist = this.checklistDropdown.find(item => item._id === event?._id);
|
|
508
|
+
if (this.selectedChecklist) {
|
|
509
|
+
this.selectedvalue = event._id;
|
|
510
|
+
this.selectedChecklistType = this.selectedChecklist.checkListType;
|
|
511
|
+
this.selectedSourceCheckListId = this.selectedChecklist.sourceCheckList_id;
|
|
512
|
+
this.changeDetector.detectChanges();
|
|
513
|
+
this.router.navigate([], {
|
|
514
|
+
relativeTo: this.route,
|
|
515
|
+
queryParams: { checklist: this.selectedSourceCheckListId },
|
|
516
|
+
queryParamsHandling: 'merge'
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
this.getInfoCardsData();
|
|
520
|
+
this.getInfoComparisonCardsData();
|
|
521
|
+
this.getChecklistInfoData();
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
onUserSelect(event: any): void {
|
|
526
|
+
this.selectedvalue = event;
|
|
527
|
+
this.selectedUser = this.userlistDropdown.find(item => item.userEmail === event?.userEmail);
|
|
528
|
+
if (this.selectedUser) {
|
|
529
|
+
this.selectedvalue = event.userEmail;
|
|
530
|
+
this.selectedSourceCheckListId = this.selectedUser.userEmail;
|
|
531
|
+
this.changeDetector.detectChanges();
|
|
532
|
+
this.router.navigate([], {
|
|
533
|
+
relativeTo: this.route,
|
|
534
|
+
queryParams: { userEmail: this.selectedUser.userEmail },
|
|
535
|
+
queryParamsHandling: 'merge'
|
|
536
|
+
});
|
|
537
|
+
this.getInfoCardsData();
|
|
538
|
+
this.getInfoComparisonCardsData();
|
|
539
|
+
this.getChecklistInfoData();
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
trimText(text: string): string {
|
|
544
|
+
return text.length > 10 ? text.slice(0, 10) + '...' : text;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
onValueChangeStatusSelect(event: any): void {
|
|
548
|
+
this.sortColumName = "",
|
|
549
|
+
this.sortDirection = "",
|
|
550
|
+
this.searchValue = "",
|
|
551
|
+
this.limit = 10,
|
|
552
|
+
this.offset = 1,
|
|
553
|
+
this.currentPage = 1,
|
|
554
|
+
this.pageSize = 10
|
|
555
|
+
this.selectedStatus = this.statusselectControl.find(item => item._id === event);
|
|
556
|
+
if (this.selectedStatus) {
|
|
557
|
+
this.changeDetector.detectChanges();
|
|
558
|
+
this.getChecklistInfoData();
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
reinitiate(id: string) {
|
|
563
|
+
const requestData = {
|
|
564
|
+
_id: id
|
|
565
|
+
}
|
|
566
|
+
this.TraxService.reinitiateChecklist(requestData)
|
|
567
|
+
.pipe(takeUntil(this.destroy$))
|
|
568
|
+
.subscribe((response: any) => {
|
|
569
|
+
this.checklistLoading = false;
|
|
570
|
+
if (response?.code === 200 && response?.status === "success") {
|
|
571
|
+
this.toastService.getSuccessToast(`Reinitiated successfully.`);
|
|
572
|
+
this.getChecklistInfoData();
|
|
573
|
+
}
|
|
574
|
+
}, error => {
|
|
575
|
+
this.toastService.getErrorToast(`Something went wrong !`)
|
|
576
|
+
this.changeDetector.detectChanges()
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
sendAlert(id?: string): void {
|
|
581
|
+
let selectedItems = this.infoChecklistData.filter((item) => item.selected);
|
|
582
|
+
let requestData: any;
|
|
583
|
+
if (id) {
|
|
584
|
+
let singleItem = this.infoChecklistData.find((item) => item._id === id);
|
|
585
|
+
requestData = {
|
|
586
|
+
checklistStatus: this.selectedlistselectControl.value.toLowerCase(),
|
|
587
|
+
id: [singleItem._id],
|
|
588
|
+
};
|
|
589
|
+
} else if (this.selectAll) {
|
|
590
|
+
let sourceCheckListId = selectedItems[0]?.sourceCheckList_id;
|
|
591
|
+
requestData = {
|
|
592
|
+
checklistStatus: this.selectedlistselectControl.value.toLowerCase(),
|
|
593
|
+
sourceCheckList_id: sourceCheckListId,
|
|
594
|
+
};
|
|
595
|
+
} else if (selectedItems.length > 0) {
|
|
596
|
+
requestData = {
|
|
597
|
+
checklistStatus: this.selectedlistselectControl.value.toLowerCase(),
|
|
598
|
+
id: selectedItems.map((item) => item._id),
|
|
599
|
+
};
|
|
600
|
+
} else {
|
|
601
|
+
this.toastService.getErrorToast('Please select at least one user to send an alert.');
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
this.TraxService.getSendAlert(requestData)
|
|
605
|
+
.pipe(takeUntil(this.destroy$))
|
|
606
|
+
.subscribe(
|
|
607
|
+
(response: any) => {
|
|
608
|
+
this.checklistLoading = false;
|
|
609
|
+
if (response?.code === 200 && response?.status === 'success') {
|
|
610
|
+
this.toastService.getSuccessToast('Alert Sent successfully.');
|
|
611
|
+
this.getChecklistInfoData();
|
|
612
|
+
}
|
|
613
|
+
else{
|
|
614
|
+
this.toastService.getErrorToast('User not logged in, Notify the store to log in to Trax');
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
(error) => {
|
|
618
|
+
this.toastService.getErrorToast('Something went wrong!');
|
|
619
|
+
this.changeDetector.detectChanges();
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
onExport(){
|
|
624
|
+
const requestData = {
|
|
625
|
+
fromDate: this.headerData.date.startDate,
|
|
626
|
+
toDate: this.headerData.date.endDate,
|
|
627
|
+
storeId: this.headerData.stores.filter((store: any) => store.checked).map((store: any) => store.storeId),
|
|
628
|
+
userEmailes: this.userEmailes,
|
|
629
|
+
clientId: this.headerData.client,
|
|
630
|
+
limit: this.totalItems,
|
|
631
|
+
offset: this.currentPage - 1,
|
|
632
|
+
sortBy: this.sortDirection,
|
|
633
|
+
sortColumnName: this.sortColumName,
|
|
634
|
+
searchValue: this.searchInput,
|
|
635
|
+
groupByType: this.receivedData,
|
|
636
|
+
groupByValue: this.selectedvalue,
|
|
637
|
+
export: true,
|
|
638
|
+
checklistStatus: this.selectedlistselectControl.value,
|
|
639
|
+
};
|
|
640
|
+
this.TraxService.getChecklistInfoDataExport(requestData)
|
|
641
|
+
.pipe(takeUntil(this.destroy$))
|
|
642
|
+
.subscribe({
|
|
643
|
+
next: (res) => {
|
|
644
|
+
this.TraxService.saveAsExcelFile(res, 'ChecklistInfoTable');
|
|
645
|
+
},
|
|
646
|
+
error: (e) => {
|
|
647
|
+
this.toast.getErrorToast('Something went Wrong..')
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
download(type: 'pdf', item: any) {
|
|
652
|
+
const user = JSON.parse(localStorage.getItem('user-info') as string)
|
|
653
|
+
const payload = {
|
|
654
|
+
"fromDate": this.headerData?.date.startDate,
|
|
655
|
+
"toDate": this.headerData?.date.endDate,
|
|
656
|
+
"checklistId": [item?._id],
|
|
657
|
+
"sourceCheckList_id": '',
|
|
658
|
+
"checklistName": item.checkListName,
|
|
659
|
+
"fileType": type,
|
|
660
|
+
// "storeIds": this.headerData?.stores.map((val: { storeId: string, storeName: string }) => val.storeId),
|
|
661
|
+
"storeIds": [item.store_id],
|
|
662
|
+
// "userEmailList": [item?.userEmail],
|
|
663
|
+
"userId": user?._id,
|
|
664
|
+
"clientId": this.headerData?.client,
|
|
665
|
+
"downloadInsertFrom": "dashboard",
|
|
666
|
+
insertType:"checklist",
|
|
667
|
+
checkListType:item.checkListType
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
this.TraxService.reportTableExport(payload).subscribe({
|
|
671
|
+
next: (res) => {
|
|
672
|
+
if (res.code === 200) {
|
|
673
|
+
this.toastService.getSuccessToast(`<div><span class="me-8" >Downloading your reports</span><a href="/notifications/alerts?tab=download" style="color:#99c3ff; text-decoration:underline; cursor:pointer" >View</a></div>`)
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
error: (err) => {
|
|
677
|
+
this.toastService.getErrorToast(`Something went wrong !`)
|
|
678
|
+
}
|
|
679
|
+
})
|
|
680
|
+
}
|
|
681
|
+
dateValue(type: string): void {
|
|
682
|
+
this.dateType = type;
|
|
683
|
+
this.getInfoComparisonCardsData();
|
|
684
|
+
}
|
|
685
|
+
navigateToGallery(item: any): void {
|
|
686
|
+
if(item.store_id&&item.store_id!=''){
|
|
687
|
+
this.router.navigate(['/manage/trax/gallery'], {
|
|
688
|
+
queryParams: {
|
|
689
|
+
ChecklistDate: item.checklistDate,
|
|
690
|
+
storeId: item.store_id,
|
|
691
|
+
checklistType: item.checkListType,
|
|
692
|
+
sourceCheckList_id: item.sourceCheckList_id,
|
|
693
|
+
},
|
|
694
|
+
});
|
|
695
|
+
}else{
|
|
696
|
+
this.router.navigate(['/manage/trax/gallery'], {
|
|
697
|
+
queryParams: {
|
|
698
|
+
ChecklistDate: item.checklistDate,
|
|
699
|
+
userEmail: item.userEmail,
|
|
700
|
+
checklistType: item.checkListType,
|
|
701
|
+
sourceCheckList_id: item.sourceCheckList_id,
|
|
702
|
+
},
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
toggleSelectAll(): void {
|
|
707
|
+
if (!this.isTodaySelected) {
|
|
708
|
+
this.selectAll = false;
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
this.infoChecklistData.forEach((item) => {
|
|
713
|
+
item.selected = this.selectAll;
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
if (this.selectAll) {
|
|
717
|
+
this.displaySelectAllBadge();
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
updateSelectAllState(): void {
|
|
721
|
+
this.selectAll = this.infoChecklistData.every((item) => item.selected);
|
|
722
|
+
|
|
723
|
+
if (this.selectAll) {
|
|
724
|
+
this.displaySelectAllBadge();
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
displaySelectAllBadge(): void {
|
|
728
|
+
let currentPageCount = this.infoChecklistData.length;
|
|
729
|
+
let totalFilteredCount = this.totalItems;
|
|
730
|
+
|
|
731
|
+
// this.toastService.getSuccessToast(
|
|
732
|
+
// `All ${currentPageCount} users on this page are selected. Select all ${totalFilteredCount} users filtered.`
|
|
733
|
+
// );
|
|
734
|
+
}
|
|
735
|
+
getSvgColor(status: string): string {
|
|
736
|
+
switch (status) {
|
|
737
|
+
case 'Open':
|
|
738
|
+
return '#009BF3';
|
|
739
|
+
case 'In Progress':
|
|
740
|
+
return '#B54708';
|
|
741
|
+
case 'Submitted':
|
|
742
|
+
return '#027A48';
|
|
743
|
+
default:
|
|
744
|
+
return '#000000';
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
get isSendAlertEnabled(): boolean {
|
|
748
|
+
return this.infoChecklistData.filter((item) => item.selected).length > 0;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
get selectedCheckboxCount(): number {
|
|
752
|
+
return this.infoChecklistData.filter(item => item.selected).length;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
interface DataContext {
|
|
757
|
+
category: string;
|
|
758
|
+
value: number;
|
|
759
|
+
count: number;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
function getDaysBetweenDates(fromDate: string, toDate: string): number {
|
|
763
|
+
const start = new Date(fromDate);
|
|
764
|
+
const end = new Date(toDate);
|
|
765
|
+
|
|
766
|
+
const differenceInMs = end.getTime() - start.getTime();
|
|
767
|
+
|
|
768
|
+
const millisecondsPerDay = 86400000;
|
|
769
|
+
const differenceInDays = Math.floor(differenceInMs / millisecondsPerDay);
|
|
770
|
+
|
|
771
|
+
return differenceInDays;
|
|
772
|
+
}
|