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.
Files changed (470) hide show
  1. package/.eslintrc.json +37 -0
  2. package/ng-package.json +7 -0
  3. package/package.json +12 -25
  4. package/src/lib/components/action-centre/action-centre.component.html +607 -0
  5. package/src/lib/components/action-centre/action-centre.component.scss +185 -0
  6. package/src/lib/components/action-centre/action-centre.component.spec.ts +23 -0
  7. package/src/lib/components/action-centre/action-centre.component.ts +279 -0
  8. package/src/lib/components/activity-log/activity-log.component.html +84 -0
  9. package/src/lib/components/activity-log/activity-log.component.scss +33 -0
  10. package/src/lib/components/activity-log/activity-log.component.spec.ts +23 -0
  11. package/src/lib/components/activity-log/activity-log.component.ts +137 -0
  12. package/src/lib/components/activity-log-v2/activity-log-v2.component.html +189 -0
  13. package/src/lib/components/activity-log-v2/activity-log-v2.component.scss +162 -0
  14. package/src/lib/components/activity-log-v2/activity-log-v2.component.spec.ts +23 -0
  15. package/src/lib/components/activity-log-v2/activity-log-v2.component.ts +517 -0
  16. package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.html +19 -0
  17. package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.scss +148 -0
  18. package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.spec.ts +23 -0
  19. package/src/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.ts +141 -0
  20. package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.html +42 -0
  21. package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.scss +49 -0
  22. package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.spec.ts +23 -0
  23. package/src/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.ts +22 -0
  24. package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.html +724 -0
  25. package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.scss +217 -0
  26. package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.spec.ts +23 -0
  27. package/src/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.ts +122 -0
  28. package/src/lib/components/add-checklist/add-checklist.component.html +1459 -0
  29. package/src/lib/components/add-checklist/add-checklist.component.scss +1205 -0
  30. package/src/lib/components/add-checklist/add-checklist.component.spec.ts +23 -0
  31. package/src/lib/components/add-checklist/add-checklist.component.ts +2460 -0
  32. package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.html +207 -0
  33. package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.scss +213 -0
  34. package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.spec.ts +23 -0
  35. package/src/lib/components/add-checklist/checklist-popup/checklist-popup.component.ts +621 -0
  36. package/src/lib/components/add-checklist/counter/counter.component.html +43 -0
  37. package/src/lib/components/add-checklist/counter/counter.component.scss +49 -0
  38. package/src/lib/components/add-checklist/counter/counter.component.spec.ts +23 -0
  39. package/src/lib/components/add-checklist/counter/counter.component.ts +123 -0
  40. package/src/lib/components/add-multitask/add-multitask.component.html +705 -0
  41. package/src/lib/components/add-multitask/add-multitask.component.scss +296 -0
  42. package/src/lib/components/add-multitask/add-multitask.component.spec.ts +23 -0
  43. package/src/lib/components/add-multitask/add-multitask.component.ts +611 -0
  44. package/src/lib/components/add-multitask/ascending-validator.ts +13 -0
  45. package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.html +197 -0
  46. package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.scss +31 -0
  47. package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.spec.ts +23 -0
  48. package/src/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.ts +285 -0
  49. package/src/lib/components/add-multitask/create-task.data.ts +374 -0
  50. package/src/lib/components/add-multitask/create-task.interface.ts +177 -0
  51. package/src/lib/components/add-multitask/unique-string-validator.ts +13 -0
  52. package/src/lib/components/add-multitask/whitespace-validator.ts +11 -0
  53. package/src/lib/components/add-task/add-task.component.html +654 -0
  54. package/src/lib/components/add-task/add-task.component.scss +536 -0
  55. package/src/lib/components/add-task/add-task.component.spec.ts +23 -0
  56. package/src/lib/components/add-task/add-task.component.ts +569 -0
  57. package/src/lib/components/add-task/ascending-validator.ts +13 -0
  58. package/src/lib/components/add-task/create-task.data.ts +374 -0
  59. package/src/lib/components/add-task/create-task.interface.ts +192 -0
  60. package/src/lib/components/add-task/unique-string-validator.ts +13 -0
  61. package/src/lib/components/add-task/whitespace-validator.ts +11 -0
  62. package/src/lib/components/approval-popup/approval-popup.component.html +25 -0
  63. package/src/lib/components/approval-popup/approval-popup.component.scss +3 -0
  64. package/src/lib/components/approval-popup/approval-popup.component.spec.ts +23 -0
  65. package/src/lib/components/approval-popup/approval-popup.component.ts +26 -0
  66. package/src/lib/components/checklist/checklist.component.html +330 -0
  67. package/src/lib/components/checklist/checklist.component.scss +112 -0
  68. package/src/lib/components/checklist/checklist.component.spec.ts +23 -0
  69. package/src/lib/components/checklist/checklist.component.ts +344 -0
  70. package/src/lib/components/checklist-configure/assign/assign.component.html +665 -0
  71. package/src/lib/components/checklist-configure/assign/assign.component.scss +219 -0
  72. package/src/lib/components/checklist-configure/assign/assign.component.spec.ts +23 -0
  73. package/src/lib/components/checklist-configure/assign/assign.component.ts +932 -0
  74. package/src/lib/components/checklist-configure/checklist-configure.component.html +4340 -0
  75. package/src/lib/components/checklist-configure/checklist-configure.component.scss +2338 -0
  76. package/src/lib/components/checklist-configure/checklist-configure.component.spec.ts +23 -0
  77. package/src/lib/components/checklist-configure/checklist-configure.component.ts +4659 -0
  78. package/src/lib/components/checklistlayout/checklistlayout.component.html +30 -0
  79. package/src/lib/components/checklistlayout/checklistlayout.component.scss +15 -0
  80. package/src/lib/components/checklistlayout/checklistlayout.component.spec.ts +23 -0
  81. package/src/lib/components/checklistlayout/checklistlayout.component.ts +47 -0
  82. package/src/lib/components/chip-dropdown/chip-dropdown.component.html +36 -0
  83. package/src/lib/components/chip-dropdown/chip-dropdown.component.scss +97 -0
  84. package/src/lib/components/chip-dropdown/chip-dropdown.component.spec.ts +23 -0
  85. package/src/lib/components/chip-dropdown/chip-dropdown.component.ts +125 -0
  86. package/src/lib/components/create-task/create-task.component.html +2003 -0
  87. package/src/lib/components/create-task/create-task.component.scss +272 -0
  88. package/src/lib/components/create-task/create-task.component.spec.ts +23 -0
  89. package/src/lib/components/create-task/create-task.component.ts +614 -0
  90. package/src/lib/components/create-task/create-task.data.ts +372 -0
  91. package/src/lib/components/create-task/create-task.interface.ts +182 -0
  92. package/src/lib/components/create-task/validators/ascending-validator.ts +13 -0
  93. package/src/lib/components/create-task/validators/unique-string-validator.ts +13 -0
  94. package/src/lib/components/create-task/validators/whitespace-validator.ts +11 -0
  95. package/src/lib/components/custom-select/custom-select.component.html +44 -0
  96. package/src/lib/components/custom-select/custom-select.component.scss +144 -0
  97. package/src/lib/components/custom-select/custom-select.component.spec.ts +23 -0
  98. package/src/lib/components/custom-select/custom-select.component.ts +265 -0
  99. package/src/lib/components/dashboard/dashboard.component.html +1076 -0
  100. package/src/lib/components/dashboard/dashboard.component.scss +237 -0
  101. package/src/lib/components/dashboard/dashboard.component.spec.ts +23 -0
  102. package/src/lib/components/dashboard/dashboard.component.ts +539 -0
  103. package/src/lib/components/dashboard-info/dashboard-info.component.html +1420 -0
  104. package/src/lib/components/dashboard-info/dashboard-info.component.scss +409 -0
  105. package/src/lib/components/dashboard-info/dashboard-info.component.spec.ts +23 -0
  106. package/src/lib/components/dashboard-info/dashboard-info.component.ts +772 -0
  107. package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.html +110 -0
  108. package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.scss +260 -0
  109. package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.spec.ts +23 -0
  110. package/src/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.ts +143 -0
  111. package/src/lib/components/dashboard-layout/dashboard-layout.component.html +1 -0
  112. package/src/lib/components/dashboard-layout/dashboard-layout.component.scss +0 -0
  113. package/src/lib/components/dashboard-layout/dashboard-layout.component.spec.ts +23 -0
  114. package/src/lib/components/dashboard-layout/dashboard-layout.component.ts +10 -0
  115. package/src/lib/components/disabled-select/disabled-select.component.html +44 -0
  116. package/src/lib/components/disabled-select/disabled-select.component.scss +149 -0
  117. package/src/lib/components/disabled-select/disabled-select.component.spec.ts +23 -0
  118. package/src/lib/components/disabled-select/disabled-select.component.ts +146 -0
  119. package/src/lib/components/export-gallery/export-gallery.component.html +175 -0
  120. package/src/lib/components/export-gallery/export-gallery.component.scss +200 -0
  121. package/src/lib/components/export-gallery/export-gallery.component.spec.ts +23 -0
  122. package/src/lib/components/export-gallery/export-gallery.component.ts +263 -0
  123. package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.html +36 -0
  124. package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.scss +97 -0
  125. package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.spec.ts +23 -0
  126. package/src/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.ts +104 -0
  127. package/src/lib/components/eye-test-audit/custom-select/custom-select.component.html +44 -0
  128. package/src/lib/components/eye-test-audit/custom-select/custom-select.component.scss +144 -0
  129. package/src/lib/components/eye-test-audit/custom-select/custom-select.component.spec.ts +23 -0
  130. package/src/lib/components/eye-test-audit/custom-select/custom-select.component.ts +265 -0
  131. package/src/lib/components/eye-test-audit/eye-test/eye-test.component.html +1804 -0
  132. package/src/lib/components/eye-test-audit/eye-test/eye-test.component.scss +806 -0
  133. package/src/lib/components/eye-test-audit/eye-test/eye-test.component.spec.ts +23 -0
  134. package/src/lib/components/eye-test-audit/eye-test/eye-test.component.ts +1890 -0
  135. package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.html +25 -0
  136. package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.scss +0 -0
  137. package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.spec.ts +23 -0
  138. package/src/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.ts +20 -0
  139. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.ts +26 -0
  140. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.html +1 -0
  141. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.scss +0 -0
  142. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.spec.ts +23 -0
  143. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.ts +24 -0
  144. package/src/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.ts +44 -0
  145. package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.html +490 -0
  146. package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.scss +721 -0
  147. package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.spec.ts +23 -0
  148. package/src/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.ts +1017 -0
  149. package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.html +708 -0
  150. package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.scss +247 -0
  151. package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.spec.ts +23 -0
  152. package/src/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.ts +446 -0
  153. package/src/lib/components/eye-test-audit/group-select/group-select.component.html +44 -0
  154. package/src/lib/components/eye-test-audit/group-select/group-select.component.scss +144 -0
  155. package/src/lib/components/eye-test-audit/group-select/group-select.component.spec.ts +23 -0
  156. package/src/lib/components/eye-test-audit/group-select/group-select.component.ts +147 -0
  157. package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.html +18 -0
  158. package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.scss +49 -0
  159. package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.spec.ts +23 -0
  160. package/src/lib/components/eye-test-audit/reactive-select/reactive-select.component.ts +104 -0
  161. package/src/lib/components/eye-test-audit/select-drop/select-drop.component.html +44 -0
  162. package/src/lib/components/eye-test-audit/select-drop/select-drop.component.scss +144 -0
  163. package/src/lib/components/eye-test-audit/select-drop/select-drop.component.spec.ts +23 -0
  164. package/src/lib/components/eye-test-audit/select-drop/select-drop.component.ts +152 -0
  165. package/src/lib/components/eye-test-audit/services/eye-test-audit.service.spec.ts +16 -0
  166. package/src/lib/components/eye-test-audit/services/eye-test-audit.service.ts +190 -0
  167. package/src/lib/components/flag-layout/flag-layout.component.html +1 -0
  168. package/src/lib/components/flag-layout/flag-layout.component.scss +0 -0
  169. package/src/lib/components/flag-layout/flag-layout.component.spec.ts +23 -0
  170. package/src/lib/components/flag-layout/flag-layout.component.ts +10 -0
  171. package/src/lib/components/flags/flags.component.html +473 -0
  172. package/src/lib/components/flags/flags.component.scss +86 -0
  173. package/src/lib/components/flags/flags.component.spec.ts +23 -0
  174. package/src/lib/components/flags/flags.component.ts +280 -0
  175. package/{lib/components/flags/flags.interface.d.ts → src/lib/components/flags/flags.interface.ts} +73 -65
  176. package/src/lib/components/flags-info/flags-info.component.html +6012 -0
  177. package/src/lib/components/flags-info/flags-info.component.scss +278 -0
  178. package/src/lib/components/flags-info/flags-info.component.spec.ts +23 -0
  179. package/src/lib/components/flags-info/flags-info.component.ts +490 -0
  180. package/src/lib/components/flags-info/flags-info.interface.ts +441 -0
  181. package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.html +1 -0
  182. package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.scss +4 -0
  183. package/src/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.ts +78 -0
  184. package/src/lib/components/flags-new/flags-new.component.html +904 -0
  185. package/src/lib/components/flags-new/flags-new.component.scss +121 -0
  186. package/src/lib/components/flags-new/flags-new.component.spec.ts +23 -0
  187. package/src/lib/components/flags-new/flags-new.component.ts +357 -0
  188. package/{lib/components/flags-new/flags-new.interface.d.ts → src/lib/components/flags-new/flags-new.interface.ts} +90 -81
  189. package/src/lib/components/gallery/gallery.component.html +3660 -0
  190. package/src/lib/components/gallery/gallery.component.scss +930 -0
  191. package/src/lib/components/gallery/gallery.component.ts +3527 -0
  192. package/src/lib/components/group-select/group-select.component.html +44 -0
  193. package/src/lib/components/group-select/group-select.component.scss +144 -0
  194. package/src/lib/components/group-select/group-select.component.spec.ts +23 -0
  195. package/src/lib/components/group-select/group-select.component.ts +145 -0
  196. package/src/lib/components/image-popup/image-popup.component.html +11 -0
  197. package/src/lib/components/image-popup/image-popup.component.scss +5 -0
  198. package/src/lib/components/image-popup/image-popup.component.ts +18 -0
  199. package/src/lib/components/lib/custom-select/custom-select.component.html +42 -0
  200. package/src/lib/components/lib/custom-select/custom-select.component.scss +131 -0
  201. package/src/lib/components/lib/custom-select/custom-select.component.spec.ts +23 -0
  202. package/src/lib/components/lib/custom-select/custom-select.component.ts +151 -0
  203. package/src/lib/components/manage-task/manage-task.component.html +265 -0
  204. package/src/lib/components/manage-task/manage-task.component.scss +69 -0
  205. package/src/lib/components/manage-task/manage-task.component.spec.ts +23 -0
  206. package/src/lib/components/manage-task/manage-task.component.ts +267 -0
  207. package/src/lib/components/managechecklist/managechecklist.component.html +176 -0
  208. package/src/lib/components/managechecklist/managechecklist.component.scss +43 -0
  209. package/src/lib/components/managechecklist/managechecklist.component.spec.ts +23 -0
  210. package/src/lib/components/managechecklist/managechecklist.component.ts +176 -0
  211. package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.html +46 -0
  212. package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.scss +181 -0
  213. package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.spec.ts +23 -0
  214. package/src/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.ts +221 -0
  215. package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.html +36 -0
  216. package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.scss +89 -0
  217. package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.spec.ts +23 -0
  218. package/src/lib/components/multi-date-datepicker/multi-date-datepicker.component.ts +118 -0
  219. package/src/lib/components/orders/orders.component.html +203 -0
  220. package/src/lib/components/orders/orders.component.scss +180 -0
  221. package/src/lib/components/orders/orders.component.spec.ts +25 -0
  222. package/src/lib/components/orders/orders.component.ts +197 -0
  223. package/src/lib/components/pagination/pagination.component.html +28 -0
  224. package/src/lib/components/pagination/pagination.component.scss +6 -0
  225. package/src/lib/components/pagination/pagination.component.spec.ts +23 -0
  226. package/src/lib/components/pagination/pagination.component.ts +54 -0
  227. package/src/lib/components/reactive-select/reactive-select.component.html +18 -0
  228. package/src/lib/components/reactive-select/reactive-select.component.scss +48 -0
  229. package/src/lib/components/reactive-select/reactive-select.component.spec.ts +23 -0
  230. package/src/lib/components/reactive-select/reactive-select.component.ts +104 -0
  231. package/src/lib/components/reports/date-picker/date-picker.component.html +54 -0
  232. package/src/lib/components/reports/date-picker/date-picker.component.scss +156 -0
  233. package/src/lib/components/reports/date-picker/date-picker.component.spec.ts +23 -0
  234. package/src/lib/components/reports/date-picker/date-picker.component.ts +60 -0
  235. package/src/lib/components/reports/reports.component.html +225 -0
  236. package/src/lib/components/reports/reports.component.scss +69 -0
  237. package/src/lib/components/reports/reports.component.spec.ts +23 -0
  238. package/src/lib/components/reports/reports.component.ts +334 -0
  239. package/{lib/components/reports/reports.interface.d.ts → src/lib/components/reports/reports.interface.ts} +50 -46
  240. package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.html +1 -0
  241. package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.scss +15 -0
  242. package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.spec.ts +23 -0
  243. package/src/lib/components/tango-analyse-trax/tango-analyse-trax.component.ts +31 -0
  244. package/src/lib/components/task/task.component.html +322 -0
  245. package/src/lib/components/task/task.component.scss +169 -0
  246. package/src/lib/components/task/task.component.spec.ts +23 -0
  247. package/src/lib/components/task/task.component.ts +340 -0
  248. package/src/lib/components/task-configure/task-configure.component.html +737 -0
  249. package/src/lib/components/task-configure/task-configure.component.scss +569 -0
  250. package/src/lib/components/task-configure/task-configure.component.spec.ts +23 -0
  251. package/src/lib/components/task-configure/task-configure.component.ts +1603 -0
  252. package/src/lib/components/task-configure/task-configure.interface.ts +138 -0
  253. package/src/lib/components/task-info/task-info.component.html +390 -0
  254. package/src/lib/components/task-info/task-info.component.scss +56 -0
  255. package/src/lib/components/task-info/task-info.component.spec.ts +23 -0
  256. package/src/lib/components/task-info/task-info.component.ts +400 -0
  257. package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.html +141 -0
  258. package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.scss +460 -0
  259. package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.spec.ts +23 -0
  260. package/src/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.ts +202 -0
  261. package/src/lib/components/task-layout/task-layout.component.html +1 -0
  262. package/src/lib/components/task-layout/task-layout.component.scss +0 -0
  263. package/src/lib/components/task-layout/task-layout.component.spec.ts +23 -0
  264. package/src/lib/components/task-layout/task-layout.component.ts +10 -0
  265. package/src/lib/components/task-logs/task-logs.component.html +97 -0
  266. package/src/lib/components/task-logs/task-logs.component.scss +301 -0
  267. package/src/lib/components/task-logs/task-logs.component.spec.ts +23 -0
  268. package/src/lib/components/task-logs/task-logs.component.ts +80 -0
  269. package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.html +84 -0
  270. package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.scss +229 -0
  271. package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.spec.ts +23 -0
  272. package/src/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.ts +111 -0
  273. package/src/lib/components/trax-store/trax-store.component.html +78 -0
  274. package/src/lib/components/trax-store/trax-store.component.scss +134 -0
  275. package/src/lib/components/trax-store/trax-store.component.spec.ts +23 -0
  276. package/src/lib/components/trax-store/trax-store.component.ts +172 -0
  277. package/src/lib/components/traxpopup/traxpopup.component.html +130 -0
  278. package/src/lib/components/traxpopup/traxpopup.component.scss +225 -0
  279. package/src/lib/components/traxpopup/traxpopup.component.spec.ts +23 -0
  280. package/src/lib/components/traxpopup/traxpopup.component.ts +71 -0
  281. package/src/lib/services/trax.service.spec.ts +16 -0
  282. package/src/lib/services/trax.service.ts +789 -0
  283. package/src/lib/tango-analyse-trax-routing.module.ts +151 -0
  284. package/src/lib/tango-analyse-trax.module.ts +140 -0
  285. package/{public-api.d.ts → src/public-api.ts} +6 -2
  286. package/tsconfig.lib.json +14 -0
  287. package/tsconfig.lib.prod.json +10 -0
  288. package/tsconfig.spec.json +14 -0
  289. package/esm2022/lib/components/action-centre/action-centre.component.mjs +0 -288
  290. package/esm2022/lib/components/activity-log/activity-log.component.mjs +0 -150
  291. package/esm2022/lib/components/activity-log-v2/activity-log-v2.component.mjs +0 -502
  292. package/esm2022/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.mjs +0 -114
  293. package/esm2022/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.mjs +0 -24
  294. package/esm2022/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.mjs +0 -126
  295. package/esm2022/lib/components/add-checklist/add-checklist.component.mjs +0 -2352
  296. package/esm2022/lib/components/add-checklist/checklist-popup/checklist-popup.component.mjs +0 -612
  297. package/esm2022/lib/components/add-checklist/counter/counter.component.mjs +0 -138
  298. package/esm2022/lib/components/add-multitask/add-multitask.component.mjs +0 -604
  299. package/esm2022/lib/components/add-multitask/ascending-validator.mjs +0 -11
  300. package/esm2022/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.mjs +0 -297
  301. package/esm2022/lib/components/add-multitask/create-task.data.mjs +0 -372
  302. package/esm2022/lib/components/add-multitask/create-task.interface.mjs +0 -2
  303. package/esm2022/lib/components/add-multitask/unique-string-validator.mjs +0 -10
  304. package/esm2022/lib/components/add-multitask/whitespace-validator.mjs +0 -10
  305. package/esm2022/lib/components/add-task/add-task.component.mjs +0 -561
  306. package/esm2022/lib/components/add-task/ascending-validator.mjs +0 -11
  307. package/esm2022/lib/components/add-task/create-task.data.mjs +0 -372
  308. package/esm2022/lib/components/add-task/create-task.interface.mjs +0 -2
  309. package/esm2022/lib/components/add-task/unique-string-validator.mjs +0 -10
  310. package/esm2022/lib/components/add-task/whitespace-validator.mjs +0 -10
  311. package/esm2022/lib/components/approval-popup/approval-popup.component.mjs +0 -30
  312. package/esm2022/lib/components/checklist/checklist.component.mjs +0 -327
  313. package/esm2022/lib/components/checklist-configure/assign/assign.component.mjs +0 -912
  314. package/esm2022/lib/components/checklist-configure/checklist-configure.component.mjs +0 -4161
  315. package/esm2022/lib/components/checklistlayout/checklistlayout.component.mjs +0 -44
  316. package/esm2022/lib/components/chip-dropdown/chip-dropdown.component.mjs +0 -120
  317. package/esm2022/lib/components/create-task/create-task.component.mjs +0 -585
  318. package/esm2022/lib/components/create-task/create-task.data.mjs +0 -372
  319. package/esm2022/lib/components/create-task/create-task.interface.mjs +0 -2
  320. package/esm2022/lib/components/create-task/validators/ascending-validator.mjs +0 -11
  321. package/esm2022/lib/components/create-task/validators/unique-string-validator.mjs +0 -10
  322. package/esm2022/lib/components/create-task/validators/whitespace-validator.mjs +0 -10
  323. package/esm2022/lib/components/custom-select/custom-select.component.mjs +0 -240
  324. package/esm2022/lib/components/dashboard/dashboard.component.mjs +0 -532
  325. package/esm2022/lib/components/dashboard-info/dashboard-info.component.mjs +0 -741
  326. package/esm2022/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.mjs +0 -155
  327. package/esm2022/lib/components/dashboard-layout/dashboard-layout.component.mjs +0 -12
  328. package/esm2022/lib/components/disabled-select/disabled-select.component.mjs +0 -158
  329. package/esm2022/lib/components/export-gallery/export-gallery.component.mjs +0 -266
  330. package/esm2022/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.mjs +0 -105
  331. package/esm2022/lib/components/eye-test-audit/custom-select/custom-select.component.mjs +0 -240
  332. package/esm2022/lib/components/eye-test-audit/eye-test/eye-test.component.mjs +0 -1733
  333. package/esm2022/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.mjs +0 -24
  334. package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.mjs +0 -34
  335. package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.mjs +0 -27
  336. package/esm2022/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.mjs +0 -71
  337. package/esm2022/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.mjs +0 -823
  338. package/esm2022/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.mjs +0 -412
  339. package/esm2022/lib/components/eye-test-audit/group-select/group-select.component.mjs +0 -157
  340. package/esm2022/lib/components/eye-test-audit/reactive-select/reactive-select.component.mjs +0 -105
  341. package/esm2022/lib/components/eye-test-audit/select-drop/select-drop.component.mjs +0 -162
  342. package/esm2022/lib/components/eye-test-audit/services/eye-test-audit.service.mjs +0 -166
  343. package/esm2022/lib/components/flag-layout/flag-layout.component.mjs +0 -12
  344. package/esm2022/lib/components/flags/flags.component.mjs +0 -263
  345. package/esm2022/lib/components/flags/flags.interface.mjs +0 -2
  346. package/esm2022/lib/components/flags-info/flags-info.component.mjs +0 -452
  347. package/esm2022/lib/components/flags-info/flags-info.interface.mjs +0 -2
  348. package/esm2022/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.mjs +0 -71
  349. package/esm2022/lib/components/flags-new/flags-new.component.mjs +0 -335
  350. package/esm2022/lib/components/flags-new/flags-new.interface.mjs +0 -2
  351. package/esm2022/lib/components/gallery/gallery.component.mjs +0 -3402
  352. package/esm2022/lib/components/group-select/group-select.component.mjs +0 -155
  353. package/esm2022/lib/components/image-popup/image-popup.component.mjs +0 -25
  354. package/esm2022/lib/components/lib/custom-select/custom-select.component.mjs +0 -158
  355. package/esm2022/lib/components/manage-task/manage-task.component.mjs +0 -264
  356. package/esm2022/lib/components/managechecklist/managechecklist.component.mjs +0 -186
  357. package/esm2022/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.mjs +0 -229
  358. package/esm2022/lib/components/multi-date-datepicker/multi-date-datepicker.component.mjs +0 -124
  359. package/esm2022/lib/components/orders/orders.component.mjs +0 -171
  360. package/esm2022/lib/components/pagination/pagination.component.mjs +0 -62
  361. package/esm2022/lib/components/reactive-select/reactive-select.component.mjs +0 -108
  362. package/esm2022/lib/components/reports/date-picker/date-picker.component.mjs +0 -60
  363. package/esm2022/lib/components/reports/reports.component.mjs +0 -300
  364. package/esm2022/lib/components/reports/reports.interface.mjs +0 -2
  365. package/esm2022/lib/components/tango-analyse-trax/tango-analyse-trax.component.mjs +0 -32
  366. package/esm2022/lib/components/task/task.component.mjs +0 -341
  367. package/esm2022/lib/components/task-configure/task-configure.component.mjs +0 -1532
  368. package/esm2022/lib/components/task-configure/task-configure.interface.mjs +0 -2
  369. package/esm2022/lib/components/task-info/task-info.component.mjs +0 -375
  370. package/esm2022/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.mjs +0 -208
  371. package/esm2022/lib/components/task-layout/task-layout.component.mjs +0 -12
  372. package/esm2022/lib/components/task-logs/task-logs.component.mjs +0 -104
  373. package/esm2022/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.mjs +0 -107
  374. package/esm2022/lib/components/trax-store/trax-store.component.mjs +0 -179
  375. package/esm2022/lib/components/traxpopup/traxpopup.component.mjs +0 -70
  376. package/esm2022/lib/services/trax.service.mjs +0 -559
  377. package/esm2022/lib/tango-analyse-trax-routing.module.mjs +0 -153
  378. package/esm2022/lib/tango-analyse-trax.module.mjs +0 -221
  379. package/esm2022/public-api.mjs +0 -6
  380. package/esm2022/tango-app-ui-analyse-trax.mjs +0 -5
  381. package/fesm2022/tango-app-ui-analyse-trax.mjs +0 -28896
  382. package/fesm2022/tango-app-ui-analyse-trax.mjs.map +0 -1
  383. package/index.d.ts +0 -5
  384. package/lib/components/action-centre/action-centre.component.d.ts +0 -68
  385. package/lib/components/activity-log/activity-log.component.d.ts +0 -39
  386. package/lib/components/activity-log-v2/activity-log-v2.component.d.ts +0 -78
  387. package/lib/components/activity-log-v2/log-view-popup/date-range-picker/date-range-picker.component.d.ts +0 -24
  388. package/lib/components/activity-log-v2/log-view-popup/store-user-dropdown/store-user-dropdown.component.d.ts +0 -9
  389. package/lib/components/activity-log-v2/log-view-popup/view-action/view-action.component.d.ts +0 -34
  390. package/lib/components/add-checklist/add-checklist.component.d.ts +0 -121
  391. package/lib/components/add-checklist/checklist-popup/checklist-popup.component.d.ts +0 -45
  392. package/lib/components/add-checklist/counter/counter.component.d.ts +0 -29
  393. package/lib/components/add-multitask/add-multitask.component.d.ts +0 -102
  394. package/lib/components/add-multitask/ascending-validator.d.ts +0 -2
  395. package/lib/components/add-multitask/bulkcreationmodel/bulkcreationmodel.component.d.ts +0 -45
  396. package/lib/components/add-multitask/create-task.data.d.ts +0 -293
  397. package/lib/components/add-multitask/create-task.interface.d.ts +0 -159
  398. package/lib/components/add-multitask/unique-string-validator.d.ts +0 -2
  399. package/lib/components/add-multitask/whitespace-validator.d.ts +0 -2
  400. package/lib/components/add-task/add-task.component.d.ts +0 -89
  401. package/lib/components/add-task/ascending-validator.d.ts +0 -2
  402. package/lib/components/add-task/create-task.data.d.ts +0 -293
  403. package/lib/components/add-task/create-task.interface.d.ts +0 -161
  404. package/lib/components/add-task/unique-string-validator.d.ts +0 -2
  405. package/lib/components/add-task/whitespace-validator.d.ts +0 -2
  406. package/lib/components/approval-popup/approval-popup.component.d.ts +0 -14
  407. package/lib/components/checklist/checklist.component.d.ts +0 -40
  408. package/lib/components/checklist-configure/assign/assign.component.d.ts +0 -105
  409. package/lib/components/checklist-configure/checklist-configure.component.d.ts +0 -325
  410. package/lib/components/checklistlayout/checklistlayout.component.d.ts +0 -15
  411. package/lib/components/chip-dropdown/chip-dropdown.component.d.ts +0 -28
  412. package/lib/components/create-task/create-task.component.d.ts +0 -76
  413. package/lib/components/create-task/create-task.data.d.ts +0 -293
  414. package/lib/components/create-task/create-task.interface.d.ts +0 -163
  415. package/lib/components/create-task/validators/ascending-validator.d.ts +0 -2
  416. package/lib/components/create-task/validators/unique-string-validator.d.ts +0 -2
  417. package/lib/components/create-task/validators/whitespace-validator.d.ts +0 -2
  418. package/lib/components/custom-select/custom-select.component.d.ts +0 -35
  419. package/lib/components/dashboard/dashboard.component.d.ts +0 -80
  420. package/lib/components/dashboard-info/dashboard-info.component.d.ts +0 -117
  421. package/lib/components/dashboard-info/monthlyperformance-datepicker/monthlyperformance-datepicker.component.d.ts +0 -41
  422. package/lib/components/dashboard-layout/dashboard-layout.component.d.ts +0 -5
  423. package/lib/components/disabled-select/disabled-select.component.d.ts +0 -34
  424. package/lib/components/export-gallery/export-gallery.component.d.ts +0 -44
  425. package/lib/components/eye-test-audit/chip-dropdown/chip-dropdown.component.d.ts +0 -26
  426. package/lib/components/eye-test-audit/custom-select/custom-select.component.d.ts +0 -35
  427. package/lib/components/eye-test-audit/eye-test/eye-test.component.d.ts +0 -218
  428. package/lib/components/eye-test-audit/eye-test/send-alert/send-alert.component.d.ts +0 -12
  429. package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit-routing.module.d.ts +0 -7
  430. package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.component.d.ts +0 -11
  431. package/lib/components/eye-test-audit/eye-test-audit/eye-test-audit.module.d.ts +0 -21
  432. package/lib/components/eye-test-audit/eye-test-audit/settings-audit/settings-audit.component.d.ts +0 -129
  433. package/lib/components/eye-test-audit/eye-test-audit/start-audit/start-audit.component.d.ts +0 -86
  434. package/lib/components/eye-test-audit/group-select/group-select.component.d.ts +0 -33
  435. package/lib/components/eye-test-audit/reactive-select/reactive-select.component.d.ts +0 -32
  436. package/lib/components/eye-test-audit/select-drop/select-drop.component.d.ts +0 -33
  437. package/lib/components/eye-test-audit/services/eye-test-audit.service.d.ts +0 -47
  438. package/lib/components/flag-layout/flag-layout.component.d.ts +0 -5
  439. package/lib/components/flags/flags.component.d.ts +0 -52
  440. package/lib/components/flags-info/flags-info.component.d.ts +0 -73
  441. package/lib/components/flags-info/flags-info.interface.d.ts +0 -430
  442. package/lib/components/flags-info/unattended-pie-chart/unattended-pie-chart.component.d.ts +0 -13
  443. package/lib/components/flags-new/flags-new.component.d.ts +0 -60
  444. package/lib/components/gallery/gallery.component.d.ts +0 -261
  445. package/lib/components/group-select/group-select.component.d.ts +0 -33
  446. package/lib/components/image-popup/image-popup.component.d.ts +0 -11
  447. package/lib/components/lib/custom-select/custom-select.component.d.ts +0 -33
  448. package/lib/components/manage-task/manage-task.component.d.ts +0 -47
  449. package/lib/components/managechecklist/managechecklist.component.d.ts +0 -33
  450. package/lib/components/multi-chip-dropdown/multi-chip-dropdown.component.d.ts +0 -40
  451. package/lib/components/multi-date-datepicker/multi-date-datepicker.component.d.ts +0 -27
  452. package/lib/components/orders/orders.component.d.ts +0 -38
  453. package/lib/components/pagination/pagination.component.d.ts +0 -16
  454. package/lib/components/reactive-select/reactive-select.component.d.ts +0 -32
  455. package/lib/components/reports/date-picker/date-picker.component.d.ts +0 -23
  456. package/lib/components/reports/reports.component.d.ts +0 -55
  457. package/lib/components/tango-analyse-trax/tango-analyse-trax.component.d.ts +0 -14
  458. package/lib/components/task/task.component.d.ts +0 -70
  459. package/lib/components/task-configure/task-configure.component.d.ts +0 -142
  460. package/lib/components/task-configure/task-configure.interface.d.ts +0 -128
  461. package/lib/components/task-info/task-info.component.d.ts +0 -76
  462. package/lib/components/task-info/taskinfo-edit/taskinfo-edit.component.d.ts +0 -61
  463. package/lib/components/task-layout/task-layout.component.d.ts +0 -5
  464. package/lib/components/task-logs/task-logs.component.d.ts +0 -27
  465. package/lib/components/trax-run-ai-popup/trax-run-ai-popup.component.d.ts +0 -26
  466. package/lib/components/trax-store/trax-store.component.d.ts +0 -45
  467. package/lib/components/traxpopup/traxpopup.component.d.ts +0 -24
  468. package/lib/services/trax.service.d.ts +0 -175
  469. package/lib/tango-analyse-trax-routing.module.d.ts +0 -7
  470. package/lib/tango-analyse-trax.module.d.ts +0 -68
@@ -0,0 +1,569 @@
1
+ import { ChangeDetectorRef, Component, ElementRef, HostListener, Input, OnInit, ViewChild } from '@angular/core';
2
+ import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
3
+ import { GlobalStateService } from 'tango-app-ui-global';
4
+ import { TraxService } from '../../services/trax.service';
5
+ import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
6
+ import { Router } from '@angular/router';
7
+ import { Answer, AnswerForm, AnswerType, HeaderFilter, ITask, Question, QuestionForm, Section, SectionForm, TaskForm, ValidationType } from './create-task.interface';
8
+ import { date_question_template, descriptive_question_template, descriptiveImage_question_template, image_question_template, linearscale_question_template, multiplechoice_answer_template, multiplechoicemultiple_question_template, multiplechoicesingle_question_template, multipleImage_question_template, time_question_template, video_question_template, yesorno_question_template,image_video_question_template,dropdown_question_template } from './create-task.data';
9
+ import { Subject, debounceTime, distinctUntilChanged, filter, takeUntil } from "rxjs";
10
+ import { ToastService } from 'tango-app-ui-shared';
11
+ import dayjs from "dayjs";
12
+ import utc from 'dayjs/plugin/utc';
13
+ import { noWhitespaceValidator } from './whitespace-validator';
14
+ import { uniqueStringValidator } from './unique-string-validator';
15
+ import { TimePeriod } from 'ngx-daterangepicker-material/daterangepicker.component';
16
+ import { rangeValidator } from './ascending-validator';
17
+ dayjs.extend(utc);
18
+ @Component({
19
+ selector: 'lib-add-task',
20
+ templateUrl: './add-task.component.html',
21
+ styleUrl: './add-task.component.scss'
22
+ })
23
+ export class AddTaskComponent implements OnInit {
24
+ taskForm: FormGroup<TaskForm>;
25
+ @Input() type: any
26
+ @Input() sourceCheckList_id: any
27
+
28
+ submitted:boolean = false
29
+ headerData: HeaderFilter | null | undefined;
30
+ answerTypes: { label: string, value: AnswerType }[] = [
31
+ { label: 'Descriptive Answer', value: 'descriptive' },
32
+ { label: 'A/B Question', value: 'yes/no' },
33
+ { label: 'Multiple Choice Question - Single Answer', value: 'multiplechoicesingle' },
34
+ { label: 'Multiple Choice Question - Multiple Answer', value: 'multiplechoicemultiple' },
35
+ { label: 'Capture Image with Description', value: 'descriptiveImage' },
36
+ { label: 'Capture Image as answer', value: 'image' },
37
+ { label: 'Capture video as answer', value: 'video' },
38
+ { label: 'Capture Multiple Image', value: 'multipleImage' },
39
+ { label: 'Date - DD/MM/YYYY', value: 'date' },
40
+ { label: 'Linear Scale', value: 'linearscale' },
41
+ { label: 'Time', value: 'time' },
42
+ { label: 'Dropdown', value: 'dropdown' },
43
+ { label: 'Image/Video', value: 'image/video' },
44
+ ]
45
+ validationTypes: { label: string, value: ValidationType }[] = [
46
+ { label: 'Capture Image', value: 'Capture Image' },
47
+ { label: 'Descriptive Answer', value: 'Descriptive Answer' },
48
+ { label: 'Capture Video', value: 'Capture Video' }
49
+ ]
50
+ environment: any;
51
+ taskContainer: HTMLElement | null;
52
+ private destroy$ = new Subject();
53
+ @Input() taskDetails: any
54
+ @Input() inputData: any
55
+ @Input() checklistInfo: any
56
+ @Input() storeProfile: any
57
+ @Input() sectionInfo: any
58
+ @Input() operationtype: any
59
+ @Input() userAnswerItem: any
60
+
61
+ get displayedUserAnswers(): any[] {
62
+ if (this.userAnswerItem) {
63
+ return [this.userAnswerItem];
64
+ }
65
+ return this.inputData?.userAnswer ?? [];
66
+ }
67
+ clientId:any
68
+ timeDetails: any = [{ id: '00:00', text: "00:00" }, { id: '00:30', text: "00:30" }, { id: '01:00', text: "01:00" }, { id: '01:30', text: "01:30" }, { id: '02:00', text: "02:00" }, { id: '02:30', text: "02:30" }, { id: '03:00', text: "03:00" }, { id: '03:30', text: "03:30" }, { id: '04:00', text: "04:00" }, { id: '04:30', text: "04:30" }, { id: '05:00', text: "05:00" }, { id: '05:30', text: "05:30" }, { id: '06:00', text: "06:00" }, { id: '06:30', text: "06:30" }, { id: '07:00', text: "07:00" }, { id: '07:30', text: "07:30" }, { id: '08:00', text: "08:00" }, { id: '08:30', text: "08:30" }, { id: '09:00', text: "09:00" }, { id: '09:30', text: "09:30" }, { id: '10:00', text: "10:00" }, { id: '10:30', text: "10:30" },
69
+ { id: '11:00', text: "11:00" }, { id: '11:30', text: "11:30" }, { id: '12:00', text: "12:00" }, { id: '12:30', text: "12:30" }, { id: '13:00', text: "13:00" }, { id: '13:30', text: "13:30" }, { id: '14:00', text: "14:00" }, { id: '14:30', text: "14:30" }, { id: '15:00', text: "15:00" }, { id: '15:30', text: "15:30" }, { id: '16:00', text: "16:00" }, { id: '16:30', text: "16:30" }, { id: '17:00', text: "17:00" }, { id: '17:30', text: "17:30" }, { id: '18:00', text: "18:00" }, { id: '18:30', text: "18:30" }, { id: '19:00', text: "19:00" }, { id: '19:30', text: "19:30" }, { id: '20:00', text: "20:00" }, { id: '20:30', text: "20:30" }, { id: '21:00', text: "21:00" }, { id: '21:30', text: "21:30" }, { id: '22:00', text: "22:00" }, { id: '22:30', text: "22:30" }, { id: '23:00', text: "23:00" }, { id: '23:30', text: "23:30" }, { id: '24:00', text: "24:00" }
70
+ ]
71
+ userType:any;
72
+
73
+
74
+ constructor(private fb: FormBuilder, private activeModal: NgbActiveModal, private gs: GlobalStateService, private traxService: TraxService, private cd: ChangeDetectorRef, private modalService: NgbModal, private router: Router, private toastService: ToastService,
75
+ ) {
76
+ this.headerData = JSON.parse(localStorage.getItem('header-filters') as string)
77
+ }
78
+
79
+ ngOnInit() {
80
+ const userInfo = JSON.parse(localStorage.getItem("user-info") || "{}");
81
+ if (userInfo.userType) {
82
+ this.userType = userInfo.userType;
83
+ }
84
+ this.gs.environment.pipe(takeUntil(this.destroy$)).subscribe((env) => {
85
+ if (env) {
86
+ this.environment = env
87
+ }
88
+ })
89
+ if(this.headerData?.client){
90
+ this.clientId = this.headerData?.client
91
+ }else{
92
+ let userinfo = JSON.parse(localStorage.getItem("user-info") || "")
93
+ if (userinfo && userinfo?.clientId) {
94
+ this.clientId = userinfo?.clientId
95
+ }
96
+ }
97
+ this.createForm();
98
+ this.selectedDate.startDate = this.dayjs().utc().format("DD-MM-YYYY");
99
+ this.updateCurrentTime()
100
+ }
101
+ tasks: number[] = [1]; // List of task IDs
102
+ taskCounter: number = 1; // Counter to generate unique task IDs
103
+
104
+
105
+ updateForm() {
106
+ this.taskForm.patchValue({
107
+ checklistName: this.taskDetails.checkListName ?? '',
108
+ checklistDescription: this.taskDetails.checkListDescription ?? '',
109
+ })
110
+
111
+ for (let i = 0; i < this.taskDetails?.sections?.length; i++) {
112
+ this.addSectionForm(this.taskDetails.sections[i]);
113
+
114
+
115
+ for (let j = 0; j < this.taskDetails.sections[i]?.questions?.length; j++) {
116
+ this.addQuestionForm(this.taskDetails.sections[i]?.questions[j], i);
117
+ for (let k = 0; k < this.taskDetails.sections[i]?.questions[j]?.answers?.length; k++) {
118
+ this.addAnswerForm(this.taskDetails.sections[i]?.questions[j]?.answers[k], i, j);
119
+ }
120
+ }
121
+ }
122
+
123
+
124
+ }
125
+
126
+ cancel() {
127
+ this.activeModal.close('close')
128
+ const triggerButton = document.querySelector('#triggerButtonId') as HTMLElement;
129
+ triggerButton?.focus();
130
+ }
131
+ onSubmit() {
132
+ this.submitted = true
133
+ let response: any = this.taskForm.value.sections
134
+
135
+ const time = dayjs(this.selectedItem, "HH:mm")
136
+ if (this.type === 'redo') {
137
+ const answerIndex = this.userAnswerItem && Array.isArray(this.inputData?.userAnswer)
138
+ ? this.inputData.userAnswer.indexOf(this.userAnswerItem)
139
+ : -1;
140
+ let input: any = {
141
+ "clientId": this.storeProfile.client_id,
142
+ "payload": {
143
+ "_id": this.checklistInfo.checklistId,
144
+ "section_id":this.sectionInfo.section_id,
145
+ "sectionName":this.sectionInfo.sectionName,
146
+ "qno": response[0].questions[0].qno,
147
+ "uniqueNo": this.inputData.uniqueNo?this.inputData.uniqueNo:"",
148
+ "checklistDescription":this.taskForm.value.checklistDescription,
149
+ "parentQuestion":this.inputData.parentQuestion?this.inputData.parentQuestion:this.inputData.qno,
150
+ },
151
+ "upsert": {
152
+ "redoStatus": true,
153
+ "redo": true
154
+ }
155
+ }
156
+ if (answerIndex >= 0) {
157
+ input.payload.answerIndex = answerIndex;
158
+ input.payload.answerName = this.userAnswerItem?.answer;
159
+ }
160
+
161
+
162
+ if(this.operationtype == 'task'){
163
+ this.traxService.redoTask(input).pipe(takeUntil(this.destroy$)).subscribe({
164
+ next: (res: any) => {
165
+ if (res&&res?.code === 200) {
166
+ this.toastService.getSuccessToast(res?.message)
167
+ this.activeModal.close('submit');
168
+ }
169
+ }
170
+ })
171
+ }else{
172
+ this.traxService.redoTaskchecklist(input).pipe(takeUntil(this.destroy$)).subscribe({
173
+ next: (res: any) => {
174
+ if (res&&res?.code === 200) {
175
+ this.toastService.getSuccessToast(res?.message)
176
+ this.activeModal.close('submit');
177
+ }
178
+ }
179
+ })
180
+ }
181
+
182
+ } else {
183
+ let payload = {
184
+ "checkListName": this.taskForm.value.checklistName,
185
+ "checkListDescription": this.taskForm.value.checklistDescription,
186
+ "processedChecklistId": this.checklistInfo?.checklistId,
187
+ "checkListId":this.sourceCheckList_id,
188
+ "sectionId":this.sectionInfo.section_id,
189
+ "sectionName":this.sectionInfo.sectionName,
190
+ "qno": this.inputData.qno,
191
+ "uniqueNo": this.inputData.uniqueNo?this.inputData.uniqueNo:"",
192
+ "parentQuestion":this.inputData.parentQuestion?this.inputData.parentQuestion:this.inputData.qno,
193
+ "question": [
194
+ {
195
+ "qno":1,
196
+ "qname": this.taskForm.value.checklistDescription,
197
+ "answerType": response[0].questions[0].answerType,
198
+ "runAI": false,
199
+ "runAIDescription": "",
200
+ "allowUploadfromGallery": response[0].questions[0].allowUploadfromGallery,
201
+ "linkType": false,
202
+ "questionReferenceImage": this.uploadedFiles&&this.uploadedFiles.length>0?this.uploadedFiles:response[0].questions[0].questionReferenceImage,
203
+ "descriptivetype": response[0].questions[0].descriptivetype,
204
+ "answers": response[0].questions[0].answers,
205
+ "allowMultiple": response[0].questions[0].allowMultiple
206
+ }
207
+ ],
208
+ "scheduleDate": dayjs(this.selectedDate.startDate,"DD-MM-YYYY").format("YYYY-MM-DD"),
209
+ "scheduleEndTime": time.format("hh:mm A"),
210
+ "userEmail": this.checklistInfo?.userEmail,
211
+ "userName": this.checklistInfo?.submittedBy,
212
+ "storeName": this.storeProfile?.storeName?this.storeProfile?.storeName:"",
213
+ "clientId": this.storeProfile?.client_id,
214
+ "checkListType": "checklistTask" // ['checklistTask','cctv]
215
+ }
216
+
217
+ if(response[0].questions[0].answerType==='image'||response[0].questions[0].answerType==='descriptiveImage'||response[0].questions[0].answerType==='multipleImage'){
218
+ if(this.uploadedFiles&&this.uploadedFiles.length>0){
219
+ payload.question.forEach((data:any)=>{
220
+ data?.answers.forEach((ans: any) => {
221
+ ans.referenceImage = this.uploadedFiles
222
+ });
223
+ })
224
+
225
+ }
226
+ }
227
+
228
+
229
+ this.traxService.CreatechecklistTask(payload).pipe(takeUntil(this.destroy$)).subscribe({
230
+ next: (res: any) => {
231
+ if (res.code === 200) {
232
+ this.toastService.getSuccessToast(res?.message)
233
+ this.activeModal.close('submit');
234
+ }
235
+ }
236
+ })
237
+ }
238
+
239
+
240
+ }
241
+
242
+
243
+ createForm() {
244
+ this.taskForm = this.fb.group({
245
+ checklistName: ['', [Validators.required,noWhitespaceValidator()]],
246
+ checklistDescription: ['',[Validators.required,]],
247
+ sections: this.fb.array<FormGroup<SectionForm>>([])
248
+ })
249
+ this.updateForm()
250
+
251
+ }
252
+ addSectionForm(section?: Section) {
253
+
254
+ const sectionFormData: FormGroup<SectionForm> = this.fb.group({
255
+ id: [section?.id ?? ''],
256
+ name: [section?.name ?? ''],
257
+ questions: this.fb.array<FormGroup<QuestionForm>>([])
258
+ });
259
+
260
+ (this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>).push(sectionFormData)
261
+ }
262
+
263
+ addQuestionForm(question: Question, sectionIndex: number, insertIndex?: number) {
264
+ const questionFormData: FormGroup<QuestionForm> = this.fb.group({
265
+ qno: [question?.qno ?? (this.getQuestions(sectionIndex)?.length ? this.getQuestions(sectionIndex).length + 1 : 1), [Validators.required]],
266
+ qname: [question?.qname ?? '', [Validators.required,noWhitespaceValidator()]],
267
+ answerType: [question?.answerType ?? 'descriptive', [Validators.required]],
268
+ runAI: [question?.runAI ?? false],
269
+ runAIDescription: [question?.runAIDescription ?? ''],
270
+ allowUploadfromGallery: [question?.allowUploadfromGallery ?? false],
271
+ linkType: [question?.linkType ?? false],
272
+ questionReferenceImage: [[...question?.questionReferenceImage ?? '']],
273
+ answers: this.fb.array<FormGroup<AnswerForm>>([]),
274
+ allowMultiple:[question?.allowMultiple ?? false]
275
+ });
276
+
277
+ if (question.answerType === 'descriptive' || question.answerType === 'multipleImage') {
278
+ questionFormData.addControl('descriptivetype', new FormControl(question?.descriptivetype ?? 'text'))
279
+ }
280
+ if (question.answerType === 'yes/no' || question.answerType === 'multiplechoicesingle' || question.answerType === 'multiplechoicemultiple' || question.answerType === 'dropdown') {
281
+ questionFormData.get('answers')?.addValidators(uniqueStringValidator())
282
+ }
283
+ if (insertIndex !== undefined) {
284
+ ((this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>)
285
+ .at(sectionIndex).get('questions') as FormArray<FormGroup<QuestionForm>>).insert(insertIndex, questionFormData)
286
+ return
287
+ }
288
+
289
+ ((this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>)
290
+ .at(sectionIndex).get('questions') as FormArray<FormGroup<QuestionForm>>).push(questionFormData)
291
+ }
292
+
293
+ addAnswerForm(answer: Answer, sectionIndex: number, questionIndex: number, insertIndex?: number) {
294
+ console.log(answer?.referenceImage)
295
+ let answerLength = this.getAnswers(sectionIndex, questionIndex)?.length;
296
+ const answerFormData: FormGroup<AnswerForm> = this.fb.group({
297
+ answer: [answer?.answer ?? ''],
298
+ answeroptionNumber: [answer?.answeroptionNumber ?? (answerLength ? answerLength + 1 : 1), [Validators.required]],
299
+ sopFlag: [answer?.sopFlag ?? false],
300
+ validation: [answer?.validation ?? false],
301
+ validationType: [answer?.validationType ?? ''],
302
+ referenceImage: [[...answer?.referenceImage ?? '']],
303
+ showLinked: [answer?.showLinked ?? false],
304
+ linkedQuestion: [answer?.linkedQuestion ?? 0],
305
+ nestedQuestion: [answer?.nestedQuestion ?? []],
306
+ index: [answer?.index ?? answerLength ? answerLength - 1 : 0, [Validators.required]],
307
+ });
308
+
309
+ const answerType: AnswerType = ((this.taskForm?.get('sections') as FormArray).at(sectionIndex)?.get('questions') as FormArray).at(questionIndex)?.get('answerType')?.value;
310
+
311
+ if (answerType === 'descriptive' || answerType === 'descriptiveImage' || answerType === 'image' || answerType === 'multipleImage' || answerType === 'date' || answerType === 'linearscale' || answerType === 'time') {
312
+ answerFormData.addControl('validationAnswer', new FormControl(answer?.validationAnswer ?? ''))
313
+ }
314
+
315
+ if (answerType === 'yes/no' || answerType === 'multiplechoicesingle' || answerType === 'multiplechoicemultiple' || answerType === 'dropdown') {
316
+ answerFormData.addControl('allowUploadfromGallery', new FormControl(answer?.allowUploadfromGallery ?? false));
317
+ answerFormData.addControl('runAI', new FormControl(answer?.runAI ?? false));
318
+ answerFormData.get('answer')?.addValidators([Validators.required, noWhitespaceValidator()])
319
+ }
320
+
321
+ if (answerType === 'image/video') {
322
+ answerFormData.addControl('allowUploadfromGallery', new FormControl(answer?.allowUploadfromGallery ?? false));
323
+ answerFormData.addControl('limit', new FormControl(answer?.limit ?? false));
324
+ answerFormData.addControl('imageLimit', new FormControl(answer?.imageLimit ?? 1));
325
+ answerFormData.addControl('videoLimit', new FormControl(answer?.videoLimit ?? 1));
326
+ }
327
+
328
+ if (answerType === 'linearscale') {
329
+ const linearType = answer?.linearType ?? 'degree';
330
+ const defaults: Record<string, { rangeStart: number; rangeEnd: number }> = {
331
+ percentage: { rangeStart: 0, rangeEnd: 100 },
332
+ number: { rangeStart: 0, rangeEnd: 100 },
333
+ degree: { rangeStart: 0, rangeEnd: 100 }, // default 0; user can enter down to -273.15
334
+ };
335
+ const { rangeStart, rangeEnd } = defaults[linearType] ?? defaults.number;
336
+ answerFormData.addControl('rangeStart', new FormControl(answer?.rangeStart ?? rangeStart));
337
+ answerFormData.addControl('rangeEnd', new FormControl(answer?.rangeEnd ?? rangeEnd));
338
+ answerFormData.addControl('linearType', new FormControl(linearType));
339
+ answerFormData.addValidators(rangeValidator())
340
+ }
341
+
342
+ if (answerType === 'date') {
343
+ answerFormData.addControl('historicDate', new FormControl(answer?.historicDate ?? false));
344
+ }
345
+
346
+ if (answerType === 'yes/no' || answerType === 'multiplechoicesingle' || answerType === 'multiplechoicemultiple' || answerType === 'multipleImage') {
347
+ answerFormData.addControl('descriptivetype', new FormControl(answer?.descriptivetype ?? 'text'));
348
+ }
349
+
350
+ if (insertIndex !== undefined) {
351
+ (((this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>)
352
+ .at(sectionIndex).get('questions') as FormArray<FormGroup<QuestionForm>>)
353
+ .at(questionIndex).get('answers') as FormArray<FormGroup<AnswerForm>>).insert(insertIndex, answerFormData)
354
+ return
355
+ }
356
+
357
+ (((this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>)
358
+ .at(sectionIndex).get('questions') as FormArray<FormGroup<QuestionForm>>)
359
+ .at(questionIndex).get('answers') as FormArray<FormGroup<AnswerForm>>).push(answerFormData)
360
+ }
361
+
362
+ get getSections() {
363
+ return (this.taskForm?.get('sections') as FormArray<FormGroup<SectionForm>>)
364
+ }
365
+
366
+ getQuestions(sectionIndex: number) {
367
+ return ((this.taskForm?.get('sections') as FormArray<FormGroup<SectionForm>>).at(sectionIndex)?.get('questions') as FormArray<FormGroup<QuestionForm>>)
368
+ }
369
+ isInvalidAnswer(secIdx:number,qnIdx:number) {
370
+ let answer = this.getAnswers(secIdx,qnIdx);
371
+ if(answer.value.length > 2) {
372
+ return true;
373
+ }
374
+ else {
375
+ return false;
376
+ }
377
+ }
378
+ getAnswers(sectionIndex: number, questionIndex: number) {
379
+ return (((this.taskForm.get('sections') as FormArray<FormGroup<SectionForm>>).at(sectionIndex).get('questions') as FormArray<FormGroup<QuestionForm>>).at(questionIndex).get('answers') as FormArray<FormGroup<AnswerForm>>)
380
+ }
381
+
382
+ uploadFile(event: any, sectionIndex: number, questionIndex: number, answerIndex?: number) {
383
+ if (event.target.files != undefined && event.target.files.length) {
384
+ const formData = new FormData();
385
+ const file: File = event.target.files[0];
386
+ formData.append('file', file, file.name);
387
+ formData.append('clientId', this.clientId as string)
388
+ this.traxService.taskImageupload(formData).pipe(takeUntil(this.destroy$)).subscribe({
389
+ next: (res: any) => {
390
+ if (res.data.imgUrl) {
391
+ this.selectedFile = file;
392
+ this.previewUrl = URL.createObjectURL(file);
393
+ this.uploadedFiles.push(res.data.path)
394
+ if (this.fileInput) {
395
+ this.fileInput.nativeElement.value = '';
396
+ }
397
+
398
+ }
399
+ },
400
+ error: (err: any) => {
401
+ this.toastService.getErrorToast(err?.error?.error?.message || 'Something went wrong')
402
+ }
403
+ })
404
+ }
405
+ }
406
+ @HostListener('document:click', ['$event'])
407
+ closeDropdown(event: MouseEvent): void {
408
+
409
+ this.dropDown = false;
410
+ }
411
+ openDropdown(event: MouseEvent) {
412
+ event.stopPropagation();
413
+ this.dropDown = !this.dropDown;
414
+
415
+ }
416
+
417
+ selectedItem: any = '00:00';
418
+ dropDown: boolean = false;
419
+ currentTime: string = '';
420
+
421
+ updateCurrentTime(): void {
422
+ const now = new Date();
423
+ const nextHour = new Date();
424
+ nextHour.setHours(now.getHours() + 1);
425
+
426
+ const hours = String(now.getHours()).padStart(2, '0');
427
+ const minutes = String(Math.floor(now.getMinutes() / 30) * 30).padStart(2, '0');
428
+ this.currentTime = `${hours}:${minutes}`;
429
+
430
+ const nextHourStr = `${String(nextHour.getHours()).padStart(2, '0')}:00`;
431
+ this.selectedItem = this.timeDetails[this.timeDetails.length-2].id;
432
+ }
433
+
434
+ isDisabled(time: string): boolean {
435
+ const now = new Date();
436
+ console.log(dayjs(now).format('YYYY-MM-DD'),dayjs(this.selectedDate.startDate,"DD-MM-YYYY").format("YYYY-MM-DD"))
437
+ if(dayjs(now).format('YYYY-MM-DD')===dayjs(this.selectedDate.startDate,"DD-MM-YYYY").format("YYYY-MM-DD")){
438
+ now.setHours(now.getHours() + 1);
439
+ const disabledThreshold = `${String(now.getHours()).padStart(2, '0')}:00`;
440
+ console.log(disabledThreshold)
441
+ return time < disabledThreshold;
442
+ }else{
443
+ return false
444
+ }
445
+ }
446
+
447
+ selectItem(value: any) {
448
+ this.selectedItem = value;
449
+ this.dropDown = false;
450
+ }
451
+
452
+ onAnswerDelete(sectionIndex: number, questionIndex: number, answerIndex: number) {
453
+ this.getAnswers(sectionIndex, questionIndex).removeAt(answerIndex)
454
+ this.toastService.getSuccessToast('Answer deleted successfully')
455
+
456
+ }
457
+
458
+ onValidateResponseChange(event: any, sectionIndex: number, questionIndex: number, answerIndex: number) {
459
+ if (event.target.checked) {
460
+ this.getAnswers(sectionIndex, questionIndex).at(answerIndex).get('showLinked')?.setValue(false)
461
+ }
462
+ }
463
+ addNewAnswer(sectionIndex: number, questionIndex: number, type: AnswerType) {
464
+ if (type === 'multiplechoicesingle' || type === 'multiplechoicemultiple') {
465
+ this.addAnswerForm(multiplechoice_answer_template as Answer, sectionIndex, questionIndex)
466
+ this.toastService.getSuccessToast('Answer added successfully')
467
+
468
+ }
469
+ }
470
+ onQuestionChange(event: any, sectionIndex: number, questionIndex: number) {
471
+ let question
472
+ const answerType: AnswerType = event.target.value
473
+ switch (answerType) {
474
+ case 'descriptive': question = descriptive_question_template
475
+ break;
476
+ case 'yes/no': question = yesorno_question_template
477
+ break;
478
+ case 'multiplechoicesingle': question = multiplechoicesingle_question_template
479
+ break;
480
+ case 'multiplechoicemultiple': question = multiplechoicemultiple_question_template
481
+ break;
482
+ case 'descriptiveImage': question = descriptiveImage_question_template
483
+ break;
484
+ case 'image': question = image_question_template
485
+ break;
486
+ case 'video': question = video_question_template
487
+ break;
488
+ case 'multipleImage': question = multipleImage_question_template
489
+ break;
490
+ case 'date': question = date_question_template
491
+ break;
492
+ case 'linearscale': question = linearscale_question_template
493
+ break;
494
+ case 'time': question = time_question_template
495
+ break;
496
+ case 'image/video': question = image_video_question_template;
497
+ break;
498
+ case 'dropdown': question = dropdown_question_template;
499
+ break;
500
+ default: question = descriptive_question_template
501
+ break;
502
+ }
503
+ const questionName = this.getQuestions(sectionIndex).at(questionIndex).get('qname')?.value || ''
504
+
505
+ this.getQuestions(sectionIndex).removeAt(questionIndex)
506
+
507
+ this.addQuestionForm(question as Question, sectionIndex, questionIndex)
508
+
509
+ this.getQuestions(sectionIndex).at(questionIndex).get('qname')?.setValue(questionName)
510
+
511
+ if (question?.answers.length) {
512
+ question.answers.forEach((element, idx) => {
513
+ this.addAnswerForm(element as Answer, sectionIndex, questionIndex, idx)
514
+ });
515
+ }
516
+ }
517
+ selectedDate: any = {};
518
+ dayjs = dayjs;
519
+ isCustomDate = (m: dayjs.Dayjs) => {
520
+ const isValidDate = m > this.dayjs();
521
+ return isValidDate ? 'invalid-date' : false;
522
+ }
523
+ onStartDateChange(event: any) {
524
+ if (this.dayjs(event.startDate).isValid()) {
525
+ this.isCustomDate = (m: dayjs.Dayjs) => {
526
+ return m.isBefore(this.dayjs(), 'day') ? 'invalid-date' : false;
527
+ };
528
+ }
529
+ }
530
+
531
+ datechange(event: TimePeriod) {
532
+ if (!event.endDate || !event.startDate) {
533
+ return
534
+ }
535
+ }
536
+
537
+
538
+ uploadedFiles: File[] = [];
539
+
540
+
541
+ selectedFile?: File;
542
+ previewUrl?: any;
543
+ @ViewChild('fileInput') fileInput!: ElementRef;
544
+
545
+ removeImage(index:any): void {
546
+ this.selectedFile = undefined;
547
+ this.previewUrl = undefined;
548
+ if (this.fileInput) {
549
+ this.fileInput.nativeElement.value = '';
550
+ }
551
+ this.uploadedFiles.splice(index,1)
552
+ }
553
+
554
+ updateLinearTypeRange(event: any, sectionIndex: number, questionIndex: number) {
555
+ const linearType = event?.target?.value as 'percentage' | 'number' | 'degree';
556
+ const answers = this.getAnswers(sectionIndex, questionIndex).at(0);
557
+ if (!answers) return;
558
+
559
+ const defaults: Record<string, { rangeStart: number; rangeEnd: number }> = {
560
+ percentage: { rangeStart: 0, rangeEnd: 100 },
561
+ number: { rangeStart: 0, rangeEnd: 100 },
562
+ degree: { rangeStart: 0, rangeEnd: 100 }, // default 0; user can enter down to -273.15
563
+ };
564
+ const { rangeStart, rangeEnd } = defaults[linearType] ?? defaults.number;
565
+
566
+ answers.get('rangeStart')?.setValue(rangeStart);
567
+ answers.get('rangeEnd')?.setValue(rangeEnd);
568
+ }
569
+ }
@@ -0,0 +1,13 @@
1
+ import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
2
+
3
+ export function rangeValidator(): ValidatorFn {
4
+ return (control: AbstractControl): ValidationErrors | null => {
5
+ const rangeStart = control.get('rangeStart')?.value;
6
+ const rangeEnd = control.get('rangeEnd')?.value;
7
+
8
+ if (rangeStart != null && rangeEnd != null && rangeStart >= rangeEnd) {
9
+ return { invalidRange: true };
10
+ }
11
+ return null;
12
+ };
13
+ }