@dssp/supervision 1.0.0-alpha.0 → 1.0.0-alpha.100

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 (540) hide show
  1. package/dist-client/graphql/building-inspection.d.ts +1 -0
  2. package/dist-client/graphql/building-inspection.js +102 -0
  3. package/dist-client/graphql/building-inspection.js.map +1 -0
  4. package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -1
  5. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
  6. package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
  7. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
  8. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
  9. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +171 -0
  10. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
  11. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +71 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1407 -0
  13. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.d.ts +59 -0
  15. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js +868 -0
  16. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js.map +1 -0
  17. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +8 -6
  18. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +116 -65
  19. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
  20. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +11 -0
  21. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +148 -73
  22. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  23. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -1
  24. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +94 -25
  25. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  26. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +28 -4
  27. package/dist-client/pages/building-inspection/building-inspection-list.js +377 -35
  28. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  29. package/dist-client/pages/building-inspection/building-inspection-management.d.ts +82 -0
  30. package/dist-client/pages/building-inspection/building-inspection-management.js +1527 -0
  31. package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
  32. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +46 -14
  33. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  34. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
  35. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
  36. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  37. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.d.ts +18 -0
  38. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
  39. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
  40. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
  41. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
  42. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
  43. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
  44. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +546 -0
  45. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
  46. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +42 -0
  47. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +738 -0
  48. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
  49. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  50. package/dist-client/pages/building-inspection/component/image-preview-popup.js +348 -0
  51. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  52. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +25 -0
  53. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -0
  54. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  55. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +31 -0
  56. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -0
  57. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  58. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  59. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
  60. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  61. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +4 -2
  62. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +156 -37
  63. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  64. package/dist-client/pages/building-inspection/inspection-create-popup.js +27 -13
  65. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  66. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +4 -0
  67. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +844 -0
  68. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
  69. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +60 -0
  70. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +1135 -0
  71. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
  72. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
  73. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +740 -0
  74. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
  75. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
  76. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
  77. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
  78. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
  79. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
  80. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
  81. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
  82. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
  83. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
  84. package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
  85. package/dist-client/pages/checklist/attachment-list-popup.js +251 -69
  86. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  87. package/dist-client/pages/checklist/checklist-view.d.ts +8 -0
  88. package/dist-client/pages/checklist/checklist-view.js +557 -191
  89. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  90. package/dist-client/pages/checklist/comment-list-popup.js +15 -5
  91. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  92. package/dist-client/pages/checklist/file-preview-popup.js +0 -1
  93. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  94. package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
  95. package/dist-client/pages/checklist/inspection-info-popup.js +683 -0
  96. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
  97. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
  98. package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
  99. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
  100. package/dist-client/pages/checklist/kcs-criteria-popup.d.ts +16 -0
  101. package/dist-client/pages/checklist/kcs-criteria-popup.js +179 -0
  102. package/dist-client/pages/checklist/kcs-criteria-popup.js.map +1 -0
  103. package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
  104. package/dist-client/pages/checklist-database/checklist-database.js +540 -0
  105. package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
  106. package/dist-client/pages/checklist-template/checklist-template-item.js +44 -3
  107. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  108. package/dist-client/pages/checklist-template/checklist-template-list.js +4 -3
  109. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  110. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +2 -2
  111. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
  112. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
  113. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +223 -0
  114. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
  115. package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
  116. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
  117. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
  118. package/dist-client/pages/issue/issue-importer.js.map +1 -1
  119. package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
  120. package/dist-client/pages/issue/issue-list-page.js +1 -2
  121. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  122. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +62 -0
  123. package/dist-client/pages/project-checklist/project-checklist-management.js +1145 -0
  124. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
  125. package/dist-client/pages/project-report/project-report-importer.js.map +1 -1
  126. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
  127. package/dist-client/pages/project-report/project-report-list-page.js +1 -2
  128. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  129. package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -1
  130. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
  131. package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
  132. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  133. package/dist-client/route.d.ts +1 -1
  134. package/dist-client/route.js +21 -0
  135. package/dist-client/route.js.map +1 -1
  136. package/dist-client/stt/speech-to-text.d.ts +41 -0
  137. package/dist-client/stt/speech-to-text.js +331 -0
  138. package/dist-client/stt/speech-to-text.js.map +1 -0
  139. package/dist-client/stt/stt-utils.d.ts +28 -0
  140. package/dist-client/stt/stt-utils.js +146 -0
  141. package/dist-client/stt/stt-utils.js.map +1 -0
  142. package/dist-client/tsconfig.tsbuildinfo +1 -1
  143. package/dist-server/middlewares/index.js +1 -2
  144. package/dist-server/middlewares/index.js.map +1 -1
  145. package/dist-server/service/action-plan/action-plan-mutation.js +7 -8
  146. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  147. package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
  148. package/dist-server/service/action-plan/action-plan-query.js +7 -13
  149. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  150. package/dist-server/service/action-plan/action-plan-type.js +6 -6
  151. package/dist-server/service/action-plan/action-plan-type.js.map +1 -1
  152. package/dist-server/service/action-plan/action-plan.js +3 -3
  153. package/dist-server/service/action-plan/action-plan.js.map +1 -1
  154. package/dist-server/service/action-plan/index.d.ts +0 -1
  155. package/dist-server/service/action-plan/index.js +1 -2
  156. package/dist-server/service/action-plan/index.js.map +1 -1
  157. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +3 -3
  158. package/dist-server/service/building-inspection/building-inspection-mutation.js +185 -40
  159. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  160. package/dist-server/service/building-inspection/building-inspection-query.d.ts +9 -6
  161. package/dist-server/service/building-inspection/building-inspection-query.js +199 -54
  162. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  163. package/dist-server/service/building-inspection/building-inspection-type.d.ts +38 -10
  164. package/dist-server/service/building-inspection/building-inspection-type.js +142 -29
  165. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  166. package/dist-server/service/building-inspection/building-inspection.d.ts +14 -0
  167. package/dist-server/service/building-inspection/building-inspection.js +78 -7
  168. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  169. package/dist-server/service/building-inspection/index.d.ts +4 -7
  170. package/dist-server/service/building-inspection/index.js +11 -6
  171. package/dist-server/service/building-inspection/index.js.map +1 -1
  172. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  173. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +66 -0
  174. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  175. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
  176. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
  177. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  178. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
  179. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
  180. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  181. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
  182. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
  183. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  184. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  185. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  186. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  187. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
  188. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
  189. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
  190. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
  191. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
  192. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
  193. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +35 -0
  194. package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
  195. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
  196. package/dist-server/service/{building-inspection → building-inspection-history}/event-subscriber.d.ts +1 -1
  197. package/dist-server/service/{building-inspection → building-inspection-history}/event-subscriber.js +3 -3
  198. package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
  199. package/dist-server/service/building-inspection-history/index.d.ts +6 -0
  200. package/dist-server/service/building-inspection-history/index.js +10 -0
  201. package/dist-server/service/building-inspection-history/index.js.map +1 -0
  202. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
  203. package/dist-server/service/checklist/checklist-mutation.js +3 -69
  204. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  205. package/dist-server/service/checklist/checklist-query.d.ts +7 -0
  206. package/dist-server/service/checklist/checklist-query.js +85 -2
  207. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  208. package/dist-server/service/checklist/checklist-type.d.ts +0 -13
  209. package/dist-server/service/checklist/checklist-type.js +3 -51
  210. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  211. package/dist-server/service/checklist/checklist.d.ts +38 -3
  212. package/dist-server/service/checklist/checklist.js +133 -17
  213. package/dist-server/service/checklist/checklist.js.map +1 -1
  214. package/dist-server/service/checklist/event-subscriber.d.ts +2 -2
  215. package/dist-server/service/checklist/event-subscriber.js +4 -4
  216. package/dist-server/service/checklist/event-subscriber.js.map +1 -1
  217. package/dist-server/service/checklist/index.d.ts +1 -4
  218. package/dist-server/service/checklist/index.js +2 -5
  219. package/dist-server/service/checklist/index.js.map +1 -1
  220. package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
  221. package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
  222. package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
  223. package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
  224. package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
  225. package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
  226. package/dist-server/service/checklist-history/checklist-history.d.ts +50 -0
  227. package/dist-server/service/checklist-history/checklist-history.js +239 -0
  228. package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
  229. package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
  230. package/dist-server/service/checklist-history/event-subscriber.js +21 -0
  231. package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
  232. package/dist-server/service/checklist-history/index.d.ts +6 -0
  233. package/dist-server/service/checklist-history/index.js +10 -0
  234. package/dist-server/service/checklist-history/index.js.map +1 -0
  235. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
  236. package/dist-server/service/checklist-item/checklist-item-mutation.js +23 -2
  237. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
  238. package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
  239. package/dist-server/service/checklist-item/checklist-item-query.js +7 -5
  240. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  241. package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -1
  242. package/dist-server/service/checklist-item/checklist-item-type.js +17 -3
  243. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
  244. package/dist-server/service/checklist-item/checklist-item.d.ts +2 -0
  245. package/dist-server/service/checklist-item/checklist-item.js +14 -4
  246. package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
  247. package/dist-server/service/checklist-item/index.d.ts +2 -2
  248. package/dist-server/service/checklist-item/index.js +1 -2
  249. package/dist-server/service/checklist-item/index.js.map +1 -1
  250. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +2 -2
  251. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -1
  252. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
  253. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +35 -8
  254. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  255. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +2 -2
  256. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -1
  257. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +6 -6
  258. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -1
  259. package/dist-server/service/checklist-item-comment/checklist-item-comment.js +2 -2
  260. package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -1
  261. package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
  262. package/dist-server/service/checklist-item-comment/index.js +1 -3
  263. package/dist-server/service/checklist-item-comment/index.js.map +1 -1
  264. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
  265. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
  266. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
  267. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
  268. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
  269. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
  270. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +27 -0
  271. package/dist-server/service/checklist-item-history/checklist-item-history.js +133 -0
  272. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
  273. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
  274. package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
  275. package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
  276. package/dist-server/service/checklist-item-history/index.d.ts +6 -0
  277. package/dist-server/service/checklist-item-history/index.js +10 -0
  278. package/dist-server/service/checklist-item-history/index.js.map +1 -0
  279. package/dist-server/service/checklist-template/checklist-template-mutation.js +2 -2
  280. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -1
  281. package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
  282. package/dist-server/service/checklist-template/checklist-template-query.js +4 -7
  283. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  284. package/dist-server/service/checklist-template/checklist-template-type.js +4 -4
  285. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -1
  286. package/dist-server/service/checklist-template/checklist-template.js +2 -2
  287. package/dist-server/service/checklist-template/checklist-template.js.map +1 -1
  288. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +15 -3
  289. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  290. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +2 -2
  291. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
  292. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +3 -0
  293. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +13 -4
  294. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  295. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +7 -0
  296. package/dist-server/service/checklist-template-item/checklist-template-item.js +26 -8
  297. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  298. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
  299. package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
  300. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
  301. package/dist-server/service/checklist-type/checklist-type-mutation.js +2 -2
  302. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -1
  303. package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
  304. package/dist-server/service/checklist-type/checklist-type-query.js +4 -7
  305. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  306. package/dist-server/service/checklist-type/checklist-type-type.js +4 -4
  307. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -1
  308. package/dist-server/service/checklist-type/checklist-type.js +3 -3
  309. package/dist-server/service/checklist-type/checklist-type.js.map +1 -1
  310. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
  311. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
  312. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
  313. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
  314. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
  315. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
  316. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
  317. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
  318. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
  319. package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
  320. package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
  321. package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
  322. package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
  323. package/dist-server/service/construction-checklist-template/index.js +9 -0
  324. package/dist-server/service/construction-checklist-template/index.js.map +1 -0
  325. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
  326. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +56 -0
  327. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
  328. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
  329. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
  330. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
  331. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
  332. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
  333. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
  334. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
  335. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
  336. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
  337. package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
  338. package/dist-server/service/construction-checklist-template-item/index.js +9 -0
  339. package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
  340. package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
  341. package/dist-server/service/field-document/field-document-auto-file.js +47 -0
  342. package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
  343. package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
  344. package/dist-server/service/field-document/field-document-mutation.js +139 -0
  345. package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
  346. package/dist-server/service/field-document/field-document-query.d.ts +14 -0
  347. package/dist-server/service/field-document/field-document-query.js +120 -0
  348. package/dist-server/service/field-document/field-document-query.js.map +1 -0
  349. package/dist-server/service/field-document/field-document-summary-service.d.ts +10 -0
  350. package/dist-server/service/field-document/field-document-summary-service.js +79 -0
  351. package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
  352. package/dist-server/service/field-document/field-document-type.d.ts +24 -0
  353. package/dist-server/service/field-document/field-document-type.js +88 -0
  354. package/dist-server/service/field-document/field-document-type.js.map +1 -0
  355. package/dist-server/service/field-document/field-document.d.ts +29 -0
  356. package/dist-server/service/field-document/field-document.js +127 -0
  357. package/dist-server/service/field-document/field-document.js.map +1 -0
  358. package/dist-server/service/field-document/index.d.ts +5 -0
  359. package/dist-server/service/field-document/index.js +9 -0
  360. package/dist-server/service/field-document/index.js.map +1 -0
  361. package/dist-server/service/index.d.ts +10 -3
  362. package/dist-server/service/index.js +42 -13
  363. package/dist-server/service/index.js.map +1 -1
  364. package/dist-server/service/issue/index.d.ts +0 -1
  365. package/dist-server/service/issue/index.js +1 -2
  366. package/dist-server/service/issue/index.js.map +1 -1
  367. package/dist-server/service/issue/issue-mutation.js +7 -8
  368. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  369. package/dist-server/service/issue/issue-query.d.ts +2 -2
  370. package/dist-server/service/issue/issue-query.js +7 -13
  371. package/dist-server/service/issue/issue-query.js.map +1 -1
  372. package/dist-server/service/issue/issue-type.js +6 -6
  373. package/dist-server/service/issue/issue-type.js.map +1 -1
  374. package/dist-server/service/issue/issue.js +3 -3
  375. package/dist-server/service/issue/issue.js.map +1 -1
  376. package/dist-server/service/project-checklist/index.d.ts +5 -0
  377. package/dist-server/service/project-checklist/index.js +9 -0
  378. package/dist-server/service/project-checklist/index.js.map +1 -0
  379. package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
  380. package/dist-server/service/project-checklist/project-checklist-mutation.js +118 -0
  381. package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
  382. package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
  383. package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
  384. package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
  385. package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
  386. package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
  387. package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
  388. package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
  389. package/dist-server/service/project-checklist/project-checklist.js +90 -0
  390. package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
  391. package/dist-server/service/project-checklist/spec-matching-service.d.ts +17 -0
  392. package/dist-server/service/project-checklist/spec-matching-service.js +140 -0
  393. package/dist-server/service/project-checklist/spec-matching-service.js.map +1 -0
  394. package/dist-server/service/project-checklist-item/index.d.ts +4 -0
  395. package/dist-server/service/project-checklist-item/index.js +9 -0
  396. package/dist-server/service/project-checklist-item/index.js.map +1 -0
  397. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
  398. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
  399. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
  400. package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
  401. package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
  402. package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
  403. package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
  404. package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
  405. package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
  406. package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +19 -0
  407. package/dist-server/service/project-checklist-item/project-checklist-item.js +92 -0
  408. package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
  409. package/dist-server/service/project-report/index.d.ts +0 -1
  410. package/dist-server/service/project-report/index.js +1 -2
  411. package/dist-server/service/project-report/index.js.map +1 -1
  412. package/dist-server/service/project-report/project-report-mutation.js +7 -8
  413. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  414. package/dist-server/service/project-report/project-report-query.d.ts +2 -2
  415. package/dist-server/service/project-report/project-report-query.js +7 -13
  416. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  417. package/dist-server/service/project-report/project-report-type.js +6 -6
  418. package/dist-server/service/project-report/project-report-type.js.map +1 -1
  419. package/dist-server/service/project-report/project-report.d.ts +0 -2
  420. package/dist-server/service/project-report/project-report.js +3 -9
  421. package/dist-server/service/project-report/project-report.js.map +1 -1
  422. package/dist-server/service/supervisor/index.d.ts +0 -1
  423. package/dist-server/service/supervisor/index.js +1 -2
  424. package/dist-server/service/supervisor/index.js.map +1 -1
  425. package/dist-server/service/supervisor/supervisor-mutation.js +7 -8
  426. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  427. package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
  428. package/dist-server/service/supervisor/supervisor-query.js +7 -13
  429. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  430. package/dist-server/service/supervisor/supervisor-type.js +6 -6
  431. package/dist-server/service/supervisor/supervisor-type.js.map +1 -1
  432. package/dist-server/service/supervisor/supervisor.js +3 -3
  433. package/dist-server/service/supervisor/supervisor.js.map +1 -1
  434. package/dist-server/tsconfig.tsbuildinfo +1 -1
  435. package/package.json +16 -13
  436. package/things-factory.config.js +11 -1
  437. package/client/bootstrap.ts +0 -1
  438. package/client/index.ts +0 -0
  439. package/client/pages/action-plan/action-plan-importer.ts +0 -94
  440. package/client/pages/action-plan/action-plan-list-page.ts +0 -340
  441. package/client/pages/building-inspection/building-inspection-detail-camera.ts +0 -277
  442. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +0 -258
  443. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +0 -288
  444. package/client/pages/building-inspection/building-inspection-list.ts +0 -565
  445. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +0 -123
  446. package/client/pages/building-inspection/component/inspection-event-provider.ts +0 -81
  447. package/client/pages/building-inspection/inspection-create-popup.ts +0 -785
  448. package/client/pages/checklist/attachment-list-popup.ts +0 -301
  449. package/client/pages/checklist/checklist-view.ts +0 -581
  450. package/client/pages/checklist/comment-list-popup.ts +0 -328
  451. package/client/pages/checklist/file-preview-popup.ts +0 -70
  452. package/client/pages/checklist-template/checklist-template-item.ts +0 -240
  453. package/client/pages/checklist-template/checklist-template-list.ts +0 -368
  454. package/client/pages/checklist-template/checklist-type-management.ts +0 -262
  455. package/client/pages/issue/issue-importer.ts +0 -94
  456. package/client/pages/issue/issue-list-page.ts +0 -340
  457. package/client/pages/project-report/project-report-importer.ts +0 -94
  458. package/client/pages/project-report/project-report-list-page.ts +0 -340
  459. package/client/pages/supervisor/supervisor-importer.ts +0 -94
  460. package/client/pages/supervisor/supervisor-list-page.ts +0 -340
  461. package/client/route.ts +0 -27
  462. package/client/tsconfig.json +0 -11
  463. package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
  464. package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
  465. package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
  466. package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
  467. package/dist-server/service/checklist/checklist-history.d.ts +0 -24
  468. package/dist-server/service/checklist/checklist-history.js +0 -120
  469. package/dist-server/service/checklist/checklist-history.js.map +0 -1
  470. package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
  471. package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
  472. package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
  473. package/server/controllers/index.ts +0 -0
  474. package/server/index.ts +0 -4
  475. package/server/middlewares/index.ts +0 -3
  476. package/server/migrations/index.ts +0 -9
  477. package/server/routes.ts +0 -28
  478. package/server/service/action-plan/action-plan-mutation.ts +0 -198
  479. package/server/service/action-plan/action-plan-query.ts +0 -62
  480. package/server/service/action-plan/action-plan-type.ts +0 -61
  481. package/server/service/action-plan/action-plan.ts +0 -103
  482. package/server/service/action-plan/index.ts +0 -7
  483. package/server/service/building-inspection/building-inspection-history.ts +0 -72
  484. package/server/service/building-inspection/building-inspection-mutation.ts +0 -276
  485. package/server/service/building-inspection/building-inspection-query.ts +0 -242
  486. package/server/service/building-inspection/building-inspection-type.ts +0 -145
  487. package/server/service/building-inspection/building-inspection.ts +0 -108
  488. package/server/service/building-inspection/event-subscriber.ts +0 -20
  489. package/server/service/building-inspection/index.ts +0 -11
  490. package/server/service/checklist/checklist-history.ts +0 -96
  491. package/server/service/checklist/checklist-mutation.ts +0 -103
  492. package/server/service/checklist/checklist-query.ts +0 -58
  493. package/server/service/checklist/checklist-type.ts +0 -49
  494. package/server/service/checklist/checklist.ts +0 -127
  495. package/server/service/checklist/event-subscriber.ts +0 -17
  496. package/server/service/checklist/index.ts +0 -9
  497. package/server/service/checklist-item/checklist-item-mutation.ts +0 -5
  498. package/server/service/checklist-item/checklist-item-query.ts +0 -84
  499. package/server/service/checklist-item/checklist-item-type.ts +0 -12
  500. package/server/service/checklist-item/checklist-item.ts +0 -103
  501. package/server/service/checklist-item/index.ts +0 -7
  502. package/server/service/checklist-item-comment/checklist-item-comment-history.ts +0 -69
  503. package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +0 -80
  504. package/server/service/checklist-item-comment/checklist-item-comment-query.ts +0 -36
  505. package/server/service/checklist-item-comment/checklist-item-comment-type.ts +0 -32
  506. package/server/service/checklist-item-comment/checklist-item-comment.ts +0 -56
  507. package/server/service/checklist-item-comment/event-subscriber.ts +0 -17
  508. package/server/service/checklist-item-comment/index.ts +0 -9
  509. package/server/service/checklist-template/checklist-template-mutation.ts +0 -66
  510. package/server/service/checklist-template/checklist-template-query.ts +0 -39
  511. package/server/service/checklist-template/checklist-template-type.ts +0 -23
  512. package/server/service/checklist-template/checklist-template.ts +0 -71
  513. package/server/service/checklist-template/index.ts +0 -6
  514. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +0 -64
  515. package/server/service/checklist-template-item/checklist-template-item-query.ts +0 -44
  516. package/server/service/checklist-template-item/checklist-template-item-type.ts +0 -39
  517. package/server/service/checklist-template-item/checklist-template-item.ts +0 -68
  518. package/server/service/checklist-template-item/index.ts +0 -6
  519. package/server/service/checklist-type/checklist-type-mutation.ts +0 -66
  520. package/server/service/checklist-type/checklist-type-query.ts +0 -39
  521. package/server/service/checklist-type/checklist-type-type.ts +0 -26
  522. package/server/service/checklist-type/checklist-type.ts +0 -64
  523. package/server/service/checklist-type/index.ts +0 -6
  524. package/server/service/index.ts +0 -88
  525. package/server/service/issue/index.ts +0 -7
  526. package/server/service/issue/issue-mutation.ts +0 -198
  527. package/server/service/issue/issue-query.ts +0 -62
  528. package/server/service/issue/issue-type.ts +0 -61
  529. package/server/service/issue/issue.ts +0 -100
  530. package/server/service/project-report/index.ts +0 -7
  531. package/server/service/project-report/project-report-mutation.ts +0 -198
  532. package/server/service/project-report/project-report-query.ts +0 -62
  533. package/server/service/project-report/project-report-type.ts +0 -61
  534. package/server/service/project-report/project-report.ts +0 -113
  535. package/server/service/supervisor/index.ts +0 -7
  536. package/server/service/supervisor/supervisor-mutation.ts +0 -198
  537. package/server/service/supervisor/supervisor-query.ts +0 -62
  538. package/server/service/supervisor/supervisor-type.ts +0 -61
  539. package/server/service/supervisor/supervisor.ts +0 -108
  540. package/server/tsconfig.json +0 -10
@@ -1,340 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import '@operato/data-grist'
3
-
4
- import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
5
- import { PageView, store } from '@operato/shell'
6
- import { css, html } from 'lit'
7
- import { customElement, property, query, state } from 'lit/decorators.js'
8
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
9
- import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
10
- import { client } from '@operato/graphql'
11
- import { i18next, localize } from '@operato/i18n'
12
- import { notify, openPopup } from '@operato/layout'
13
- import { OxPopup, OxPrompt } from '@operato/popup'
14
- import { isMobileDevice } from '@operato/utils'
15
-
16
- import { connect } from 'pwa-helpers/connect-mixin'
17
- import gql from 'graphql-tag'
18
-
19
- import { ProjectReportImporter } from './project-report-importer'
20
-
21
- @customElement('project-report-list-page')
22
- export class ProjectReportListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
23
- static styles = [
24
- ScrollbarStyles,
25
- CommonGristStyles,
26
- css`
27
- :host {
28
- display: flex;
29
-
30
- width: 100%;
31
-
32
- --grid-record-emphasized-background-color: red;
33
- --grid-record-emphasized-color: yellow;
34
- }
35
- `
36
- ]
37
-
38
- static get scopedElements() {
39
- return {
40
- 'project-report-importer': ProjectReportImporter
41
- }
42
- }
43
-
44
- @state() private gristConfig: any
45
- @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
46
-
47
- @query('ox-grist') private grist!: DataGrist
48
- @query('#sorter-control') private sortersControl!: OxPopup
49
-
50
- get context() {
51
- return {
52
- title: i18next.t('title.project-report list'),
53
- search: {
54
- handler: (search: string) => {
55
- this.grist.searchText = search
56
- },
57
- value: this.grist.searchText
58
- },
59
- filter: {
60
- handler: () => {
61
- this.grist.toggleHeadroom()
62
- }
63
- },
64
- help: 'supervision/project-report',
65
- actions: [
66
- {
67
- title: i18next.t('button.save'),
68
- action: this.updateProjectReport.bind(this),
69
- ...CommonButtonStyles.save
70
- },
71
- {
72
- title: i18next.t('button.delete'),
73
- action: this.deleteProjectReport.bind(this),
74
- ...CommonButtonStyles.delete
75
- }
76
- ],
77
- exportable: {
78
- name: i18next.t('title.project-report list'),
79
- data: this.exportHandler.bind(this)
80
- },
81
- importable: {
82
- handler: this.importHandler.bind(this)
83
- }
84
- }
85
- }
86
-
87
- render() {
88
- const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
89
-
90
- return html`
91
- <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
92
- <div slot="headroom">
93
- <div id="filters">
94
- <ox-filters-form autofocus></ox-filters-form>
95
- </div>
96
-
97
- <div id="sorters">
98
- Sort
99
- <md-icon
100
- @click=${e => {
101
- const target = e.currentTarget
102
- this.sortersControl.open({
103
- right: 0,
104
- top: target.offsetTop + target.offsetHeight
105
- })
106
- }}
107
- >expand_more</md-icon
108
- >
109
- <ox-popup id="sorter-control">
110
- <ox-sorters-control> </ox-sorters-control>
111
- </ox-popup>
112
- </div>
113
-
114
- <div id="modes">
115
- <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
116
- <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
117
- <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
118
- </div>
119
- </div>
120
- </ox-grist>
121
- `
122
- }
123
-
124
- async pageInitialized(lifecycle: any) {
125
- this.gristConfig = {
126
- list: {
127
- fields: ['name', 'description'],
128
- details: ['active', 'updatedAt']
129
- },
130
- columns: [
131
- { type: 'gutter', gutterName: 'sequence' },
132
- { type: 'gutter', gutterName: 'row-selector', multiple: true },
133
- {
134
- type: 'string',
135
- name: 'name',
136
- header: i18next.t('field.name'),
137
- record: {
138
- editable: true
139
- },
140
- filter: 'search',
141
- sortable: true,
142
- width: 150
143
- },
144
- {
145
- type: 'string',
146
- name: 'description',
147
- header: i18next.t('field.description'),
148
- record: {
149
- editable: true
150
- },
151
- filter: 'search',
152
- width: 200
153
- },
154
- {
155
- type: 'checkbox',
156
- name: 'active',
157
- label: true,
158
- header: i18next.t('field.active'),
159
- record: {
160
- editable: true
161
- },
162
- filter: true,
163
- sortable: true,
164
- width: 60
165
- },
166
- {
167
- type: 'resource-object',
168
- name: 'updater',
169
- header: i18next.t('field.updater'),
170
- record: {
171
- editable: false
172
- },
173
- sortable: true,
174
- width: 120
175
- },
176
- {
177
- type: 'datetime',
178
- name: 'updatedAt',
179
- header: i18next.t('field.updated_at'),
180
- record: {
181
- editable: false
182
- },
183
- sortable: true,
184
- width: 180
185
- }
186
- ],
187
- rows: {
188
- selectable: {
189
- multiple: true
190
- }
191
- },
192
- sorters: [
193
- {
194
- name: 'name'
195
- }
196
- ]
197
- }
198
- }
199
-
200
- async pageUpdated(changes: any, lifecycle: any) {
201
- if (this.active) {
202
- // do something here when this page just became as active
203
- }
204
- }
205
-
206
- async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
207
- const response = await client.query({
208
- query: gql`
209
- query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
210
- responses: projectReports(filters: $filters, pagination: $pagination, sortings: $sortings) {
211
- items {
212
- id
213
- name
214
- description
215
- active
216
- updater {
217
- id
218
- name
219
- }
220
- updatedAt
221
- }
222
- total
223
- }
224
- }
225
- `,
226
- variables: {
227
- filters,
228
- pagination: { page, limit },
229
- sortings
230
- }
231
- })
232
-
233
- return {
234
- total: response.data.responses.total || 0,
235
- records: response.data.responses.items || []
236
- }
237
- }
238
-
239
- private async deleteProjectReport() {
240
- if (
241
- await OxPrompt.open({
242
- title: i18next.t('text.are_you_sure'),
243
- text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
244
- confirmButton: { text: i18next.t('button.confirm') },
245
- cancelButton: { text: i18next.t('button.cancel') }
246
- })
247
- ) {
248
- const ids = this.grist.selected.map(record => record.id)
249
- if (ids && ids.length > 0) {
250
- const response = await client.mutate({
251
- mutation: gql`
252
- mutation ($ids: [String!]!) {
253
- deleteProjectReports(ids: $ids)
254
- }
255
- `,
256
- variables: {
257
- ids
258
- }
259
- })
260
-
261
- if (!response.errors) {
262
- this.grist.fetch()
263
- notify({
264
- message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
265
- })
266
- }
267
- }
268
- }
269
- }
270
-
271
- private async updateProjectReport() {
272
- let patches = this.grist.dirtyRecords
273
- if (patches && patches.length) {
274
- patches = patches.map(patch => {
275
- let patchField: any = patch.id ? { id: patch.id } : {}
276
- const dirtyFields = patch.__dirtyfields__
277
- for (let key in dirtyFields) {
278
- patchField[key] = dirtyFields[key].after
279
- }
280
- patchField.cuFlag = patch.__dirty__
281
-
282
- return patchField
283
- })
284
-
285
- const response = await client.mutate({
286
- mutation: gql`
287
- mutation ($patches: [ProjectReportPatch!]!) {
288
- updateMultipleProjectReport(patches: $patches) {
289
- name
290
- }
291
- }
292
- `,
293
- variables: {
294
- patches
295
- }
296
- })
297
-
298
- if (!response.errors) {
299
- this.grist.fetch()
300
- }
301
- }
302
- }
303
-
304
- private async exportHandler() {
305
- const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
306
- const targetFieldSet = new Set(['id', 'name', 'description', 'active'])
307
-
308
- return exportTargets.map(projectReport => {
309
- let tempObj = {}
310
- for (const field of targetFieldSet) {
311
- tempObj[field] = projectReport[field]
312
- }
313
-
314
- return tempObj
315
- })
316
- }
317
-
318
- private async importHandler(records) {
319
- const popup = openPopup(
320
- html`
321
- <project-report-importer
322
- .projectReports=${records}
323
- @imported=${() => {
324
- history.back()
325
- this.grist.fetch()
326
- }}
327
- ></project-report-importer>
328
- `,
329
- {
330
- backdrop: true,
331
- size: 'large',
332
- title: i18next.t('title.import project-report')
333
- }
334
- )
335
-
336
- popup.onclosed = () => {
337
- this.grist.fetch()
338
- }
339
- }
340
- }
@@ -1,94 +0,0 @@
1
- import '@material/web/button/elevated-button.js'
2
- import '@operato/data-grist'
3
-
4
- import gql from 'graphql-tag'
5
- import { css, html, LitElement } from 'lit'
6
- import { property, state } from 'lit/decorators.js'
7
-
8
- import { client } from '@operato/graphql'
9
- import { i18next } from '@operato/i18n'
10
- import { isMobileDevice } from '@operato/utils'
11
-
12
- export class SupervisorImporter extends LitElement {
13
- static styles = [
14
- css`
15
- :host {
16
- display: flex;
17
- flex-direction: column;
18
-
19
- background-color: #fff;
20
- }
21
-
22
- ox-grist {
23
- flex: 1;
24
- }
25
-
26
- .button-container {
27
- display: flex;
28
- margin-left: auto;
29
- padding: var(--padding-default);
30
- }
31
-
32
- md-elevated-button {
33
- margin-left: var(--margin-default);
34
- }
35
- `
36
- ]
37
-
38
- @state() private supervisors: any[] = []
39
- @state() private columns = {
40
- list: { fields: ['name', 'description'] },
41
- pagination: { infinite: true },
42
- columns: [
43
- {
44
- type: 'string',
45
- name: 'name',
46
- header: i18next.t('field.name'),
47
- width: 150
48
- },
49
- {
50
- type: 'string',
51
- name: 'description',
52
- header: i18next.t('field.description'),
53
- width: 200
54
- },
55
- {
56
- type: 'checkbox',
57
- name: 'active',
58
- header: i18next.t('field.active'),
59
- width: 60
60
- }
61
- ]
62
- }
63
-
64
- render() {
65
- return html`
66
- <ox-grist
67
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
- .config=${this.columns}
69
- .data=${{
70
- records: this.supervisors
71
- }}
72
- ></ox-grist>
73
-
74
- <div class="button-container">
75
- <md-elevated-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</md-elevated-button>
76
- </div>
77
- `
78
- }
79
-
80
- private async save() {
81
- const response = await client.mutate({
82
- mutation: gql`
83
- mutation importSupervisors($supervisors: [SupervisorPatch!]!) {
84
- importSupervisors(supervisors: $supervisors)
85
- }
86
- `,
87
- variables: { supervisors: this.supervisors }
88
- })
89
-
90
- if (response.errors?.length) return
91
-
92
- this.dispatchEvent(new CustomEvent('imported'))
93
- }
94
- }