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

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 (288) hide show
  1. package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -1
  2. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
  3. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
  4. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +1 -1
  5. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +16 -11
  8. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  9. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +2 -2
  10. package/dist-client/pages/building-inspection/building-inspection-list.js +2 -1
  11. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  12. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  13. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -3
  14. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  15. package/dist-client/pages/building-inspection/inspection-create-popup.js +8 -5
  16. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  17. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +46 -0
  18. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +930 -0
  19. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
  20. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
  21. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +736 -0
  22. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
  23. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
  24. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
  25. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
  26. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
  27. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
  28. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
  29. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  30. package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
  31. package/dist-client/pages/checklist/checklist-view.js +291 -185
  32. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  33. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
  34. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  35. package/dist-client/pages/checklist-template/checklist-template-item.js +8 -3
  36. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  37. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  38. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  39. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +2 -2
  40. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
  41. package/dist-client/pages/issue/issue-importer.js.map +1 -1
  42. package/dist-client/pages/issue/issue-list-page.js.map +1 -1
  43. package/dist-client/pages/project-report/project-report-importer.js.map +1 -1
  44. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
  45. package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -1
  46. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
  47. package/dist-client/route.d.ts +1 -1
  48. package/dist-client/route.js +3 -0
  49. package/dist-client/route.js.map +1 -1
  50. package/dist-client/stt/speech-to-text.d.ts +36 -0
  51. package/dist-client/stt/speech-to-text.js +89 -0
  52. package/dist-client/stt/speech-to-text.js.map +1 -0
  53. package/dist-client/stt/stt-utils.d.ts +28 -0
  54. package/dist-client/stt/stt-utils.js +146 -0
  55. package/dist-client/stt/stt-utils.js.map +1 -0
  56. package/dist-client/tsconfig.tsbuildinfo +1 -1
  57. package/dist-server/middlewares/index.js +1 -2
  58. package/dist-server/middlewares/index.js.map +1 -1
  59. package/dist-server/service/action-plan/action-plan-mutation.js +2 -2
  60. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
  61. package/dist-server/service/action-plan/action-plan-query.js +2 -2
  62. package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
  63. package/dist-server/service/action-plan/action-plan-type.js +6 -6
  64. package/dist-server/service/action-plan/action-plan-type.js.map +1 -1
  65. package/dist-server/service/action-plan/action-plan.js +3 -3
  66. package/dist-server/service/action-plan/action-plan.js.map +1 -1
  67. package/dist-server/service/action-plan/index.d.ts +0 -1
  68. package/dist-server/service/action-plan/index.js +1 -2
  69. package/dist-server/service/action-plan/index.js.map +1 -1
  70. package/dist-server/service/building-inspection/building-inspection-history.js +2 -2
  71. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
  72. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +1 -0
  73. package/dist-server/service/building-inspection/building-inspection-mutation.js +91 -14
  74. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  75. package/dist-server/service/building-inspection/building-inspection-query.d.ts +2 -1
  76. package/dist-server/service/building-inspection/building-inspection-query.js +33 -4
  77. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  78. package/dist-server/service/building-inspection/building-inspection-type.d.ts +10 -3
  79. package/dist-server/service/building-inspection/building-inspection-type.js +45 -20
  80. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  81. package/dist-server/service/building-inspection/building-inspection.d.ts +9 -0
  82. package/dist-server/service/building-inspection/building-inspection.js +43 -5
  83. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  84. package/dist-server/service/building-inspection/index.d.ts +2 -4
  85. package/dist-server/service/building-inspection/index.js +2 -4
  86. package/dist-server/service/building-inspection/index.js.map +1 -1
  87. package/dist-server/service/checklist/checklist-history.d.ts +8 -0
  88. package/dist-server/service/checklist/checklist-history.js +38 -2
  89. package/dist-server/service/checklist/checklist-history.js.map +1 -1
  90. package/dist-server/service/checklist/checklist-mutation.js +2 -2
  91. package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
  92. package/dist-server/service/checklist/checklist-query.js +2 -2
  93. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  94. package/dist-server/service/checklist/checklist-type.js +6 -6
  95. package/dist-server/service/checklist/checklist-type.js.map +1 -1
  96. package/dist-server/service/checklist/checklist.d.ts +19 -1
  97. package/dist-server/service/checklist/checklist.js +78 -7
  98. package/dist-server/service/checklist/checklist.js.map +1 -1
  99. package/dist-server/service/checklist/index.d.ts +0 -2
  100. package/dist-server/service/checklist/index.js +1 -3
  101. package/dist-server/service/checklist/index.js.map +1 -1
  102. package/dist-server/service/checklist-item/checklist-item-mutation.js +2 -2
  103. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
  104. package/dist-server/service/checklist-item/checklist-item-query.js +2 -2
  105. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  106. package/dist-server/service/checklist-item/checklist-item-type.js +2 -2
  107. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
  108. package/dist-server/service/checklist-item/checklist-item.js +3 -3
  109. package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
  110. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +2 -2
  111. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -1
  112. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +2 -2
  113. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
  114. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +2 -2
  115. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -1
  116. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +6 -6
  117. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -1
  118. package/dist-server/service/checklist-item-comment/checklist-item-comment.js +2 -2
  119. package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -1
  120. package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
  121. package/dist-server/service/checklist-item-comment/index.js +1 -3
  122. package/dist-server/service/checklist-item-comment/index.js.map +1 -1
  123. package/dist-server/service/checklist-template/checklist-template-mutation.js +2 -2
  124. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -1
  125. package/dist-server/service/checklist-template/checklist-template-query.js +2 -2
  126. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
  127. package/dist-server/service/checklist-template/checklist-template-type.js +4 -4
  128. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -1
  129. package/dist-server/service/checklist-template/checklist-template.js +2 -2
  130. package/dist-server/service/checklist-template/checklist-template.js.map +1 -1
  131. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +2 -2
  132. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  133. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +2 -2
  134. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
  135. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -4
  136. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  137. package/dist-server/service/checklist-template-item/checklist-template-item.js +4 -6
  138. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  139. package/dist-server/service/checklist-type/checklist-type-mutation.js +2 -2
  140. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -1
  141. package/dist-server/service/checklist-type/checklist-type-query.js +2 -2
  142. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  143. package/dist-server/service/checklist-type/checklist-type-type.js +4 -4
  144. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -1
  145. package/dist-server/service/checklist-type/checklist-type.js +3 -3
  146. package/dist-server/service/checklist-type/checklist-type.js.map +1 -1
  147. package/dist-server/service/index.d.ts +0 -1
  148. package/dist-server/service/index.js +1 -11
  149. package/dist-server/service/index.js.map +1 -1
  150. package/dist-server/service/issue/index.d.ts +0 -1
  151. package/dist-server/service/issue/index.js +1 -2
  152. package/dist-server/service/issue/index.js.map +1 -1
  153. package/dist-server/service/issue/issue-mutation.js +2 -2
  154. package/dist-server/service/issue/issue-mutation.js.map +1 -1
  155. package/dist-server/service/issue/issue-query.js +2 -2
  156. package/dist-server/service/issue/issue-query.js.map +1 -1
  157. package/dist-server/service/issue/issue-type.js +6 -6
  158. package/dist-server/service/issue/issue-type.js.map +1 -1
  159. package/dist-server/service/issue/issue.js +3 -3
  160. package/dist-server/service/issue/issue.js.map +1 -1
  161. package/dist-server/service/project-report/index.d.ts +0 -1
  162. package/dist-server/service/project-report/index.js +1 -2
  163. package/dist-server/service/project-report/index.js.map +1 -1
  164. package/dist-server/service/project-report/project-report-mutation.js +2 -2
  165. package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
  166. package/dist-server/service/project-report/project-report-query.js +2 -2
  167. package/dist-server/service/project-report/project-report-query.js.map +1 -1
  168. package/dist-server/service/project-report/project-report-type.js +6 -6
  169. package/dist-server/service/project-report/project-report-type.js.map +1 -1
  170. package/dist-server/service/project-report/project-report.js +3 -3
  171. package/dist-server/service/project-report/project-report.js.map +1 -1
  172. package/dist-server/service/supervisor/index.d.ts +0 -1
  173. package/dist-server/service/supervisor/index.js +1 -2
  174. package/dist-server/service/supervisor/index.js.map +1 -1
  175. package/dist-server/service/supervisor/supervisor-mutation.js +2 -2
  176. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
  177. package/dist-server/service/supervisor/supervisor-query.js +2 -2
  178. package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
  179. package/dist-server/service/supervisor/supervisor-type.js +6 -6
  180. package/dist-server/service/supervisor/supervisor-type.js.map +1 -1
  181. package/dist-server/service/supervisor/supervisor.js +3 -3
  182. package/dist-server/service/supervisor/supervisor.js.map +1 -1
  183. package/dist-server/tsconfig.tsbuildinfo +1 -1
  184. package/package.json +13 -13
  185. package/things-factory.config.js +3 -1
  186. package/client/bootstrap.ts +0 -1
  187. package/client/index.ts +0 -0
  188. package/client/pages/action-plan/action-plan-importer.ts +0 -94
  189. package/client/pages/action-plan/action-plan-list-page.ts +0 -340
  190. package/client/pages/building-inspection/building-inspection-detail-camera.ts +0 -277
  191. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +0 -258
  192. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +0 -288
  193. package/client/pages/building-inspection/building-inspection-list.ts +0 -565
  194. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +0 -123
  195. package/client/pages/building-inspection/component/inspection-event-provider.ts +0 -81
  196. package/client/pages/building-inspection/inspection-create-popup.ts +0 -785
  197. package/client/pages/checklist/attachment-list-popup.ts +0 -301
  198. package/client/pages/checklist/checklist-view.ts +0 -581
  199. package/client/pages/checklist/comment-list-popup.ts +0 -328
  200. package/client/pages/checklist/file-preview-popup.ts +0 -70
  201. package/client/pages/checklist-template/checklist-template-item.ts +0 -240
  202. package/client/pages/checklist-template/checklist-template-list.ts +0 -368
  203. package/client/pages/checklist-template/checklist-type-management.ts +0 -262
  204. package/client/pages/issue/issue-importer.ts +0 -94
  205. package/client/pages/issue/issue-list-page.ts +0 -340
  206. package/client/pages/project-report/project-report-importer.ts +0 -94
  207. package/client/pages/project-report/project-report-list-page.ts +0 -340
  208. package/client/pages/supervisor/supervisor-importer.ts +0 -94
  209. package/client/pages/supervisor/supervisor-list-page.ts +0 -340
  210. package/client/route.ts +0 -27
  211. package/client/tsconfig.json +0 -11
  212. package/dist-server/service/building-inspection/event-subscriber.d.ts +0 -7
  213. package/dist-server/service/building-inspection/event-subscriber.js +0 -21
  214. package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
  215. package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
  216. package/dist-server/service/checklist/event-subscriber.js +0 -21
  217. package/dist-server/service/checklist/event-subscriber.js.map +0 -1
  218. package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
  219. package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
  220. package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
  221. package/server/controllers/index.ts +0 -0
  222. package/server/index.ts +0 -4
  223. package/server/middlewares/index.ts +0 -3
  224. package/server/migrations/index.ts +0 -9
  225. package/server/routes.ts +0 -28
  226. package/server/service/action-plan/action-plan-mutation.ts +0 -198
  227. package/server/service/action-plan/action-plan-query.ts +0 -62
  228. package/server/service/action-plan/action-plan-type.ts +0 -61
  229. package/server/service/action-plan/action-plan.ts +0 -103
  230. package/server/service/action-plan/index.ts +0 -7
  231. package/server/service/building-inspection/building-inspection-history.ts +0 -72
  232. package/server/service/building-inspection/building-inspection-mutation.ts +0 -276
  233. package/server/service/building-inspection/building-inspection-query.ts +0 -242
  234. package/server/service/building-inspection/building-inspection-type.ts +0 -145
  235. package/server/service/building-inspection/building-inspection.ts +0 -108
  236. package/server/service/building-inspection/event-subscriber.ts +0 -20
  237. package/server/service/building-inspection/index.ts +0 -11
  238. package/server/service/checklist/checklist-history.ts +0 -96
  239. package/server/service/checklist/checklist-mutation.ts +0 -103
  240. package/server/service/checklist/checklist-query.ts +0 -58
  241. package/server/service/checklist/checklist-type.ts +0 -49
  242. package/server/service/checklist/checklist.ts +0 -127
  243. package/server/service/checklist/event-subscriber.ts +0 -17
  244. package/server/service/checklist/index.ts +0 -9
  245. package/server/service/checklist-item/checklist-item-mutation.ts +0 -5
  246. package/server/service/checklist-item/checklist-item-query.ts +0 -84
  247. package/server/service/checklist-item/checklist-item-type.ts +0 -12
  248. package/server/service/checklist-item/checklist-item.ts +0 -103
  249. package/server/service/checklist-item/index.ts +0 -7
  250. package/server/service/checklist-item-comment/checklist-item-comment-history.ts +0 -69
  251. package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +0 -80
  252. package/server/service/checklist-item-comment/checklist-item-comment-query.ts +0 -36
  253. package/server/service/checklist-item-comment/checklist-item-comment-type.ts +0 -32
  254. package/server/service/checklist-item-comment/checklist-item-comment.ts +0 -56
  255. package/server/service/checklist-item-comment/event-subscriber.ts +0 -17
  256. package/server/service/checklist-item-comment/index.ts +0 -9
  257. package/server/service/checklist-template/checklist-template-mutation.ts +0 -66
  258. package/server/service/checklist-template/checklist-template-query.ts +0 -39
  259. package/server/service/checklist-template/checklist-template-type.ts +0 -23
  260. package/server/service/checklist-template/checklist-template.ts +0 -71
  261. package/server/service/checklist-template/index.ts +0 -6
  262. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +0 -64
  263. package/server/service/checklist-template-item/checklist-template-item-query.ts +0 -44
  264. package/server/service/checklist-template-item/checklist-template-item-type.ts +0 -39
  265. package/server/service/checklist-template-item/checklist-template-item.ts +0 -68
  266. package/server/service/checklist-template-item/index.ts +0 -6
  267. package/server/service/checklist-type/checklist-type-mutation.ts +0 -66
  268. package/server/service/checklist-type/checklist-type-query.ts +0 -39
  269. package/server/service/checklist-type/checklist-type-type.ts +0 -26
  270. package/server/service/checklist-type/checklist-type.ts +0 -64
  271. package/server/service/checklist-type/index.ts +0 -6
  272. package/server/service/index.ts +0 -88
  273. package/server/service/issue/index.ts +0 -7
  274. package/server/service/issue/issue-mutation.ts +0 -198
  275. package/server/service/issue/issue-query.ts +0 -62
  276. package/server/service/issue/issue-type.ts +0 -61
  277. package/server/service/issue/issue.ts +0 -100
  278. package/server/service/project-report/index.ts +0 -7
  279. package/server/service/project-report/project-report-mutation.ts +0 -198
  280. package/server/service/project-report/project-report-query.ts +0 -62
  281. package/server/service/project-report/project-report-type.ts +0 -61
  282. package/server/service/project-report/project-report.ts +0 -113
  283. package/server/service/supervisor/index.ts +0 -7
  284. package/server/service/supervisor/supervisor-mutation.ts +0 -198
  285. package/server/service/supervisor/supervisor-query.ts +0 -62
  286. package/server/service/supervisor/supervisor-type.ts +0 -61
  287. package/server/service/supervisor/supervisor.ts +0 -108
  288. package/server/tsconfig.json +0 -10
@@ -1,581 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import gql from 'graphql-tag'
3
- import { client } from '@operato/graphql'
4
- import { css, html, LitElement } from 'lit'
5
- import { customElement, property } from 'lit/decorators.js'
6
- import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
7
- import {
8
- CHECKLIST_MAIN_TYPE_LIST,
9
- BuildingInspectionStatus,
10
- BUILDING_INSPECTION_STATUS_DISPLAY
11
- } from '../building-inspection/building-inspection-list'
12
- import '@operato/input/ox-input-signature.js'
13
- import { store } from '@operato/shell'
14
- import { connect } from 'pwa-helpers/connect-mixin.js'
15
- import { openPopup } from '@operato/layout'
16
- import './comment-list-popup'
17
- import './attachment-list-popup'
18
-
19
- export const enum ChecklistMode {
20
- VIEWER = 'VIEWER',
21
- EDITOR = 'EDITOR'
22
- }
23
-
24
- @customElement('checklist-view')
25
- class ChecklistView extends connect(store)(LitElement) {
26
- static styles = [
27
- ButtonContainerStyles,
28
- ScrollbarStyles,
29
- css`
30
- :host {
31
- display: flex;
32
- flex-direction: column;
33
- padding: var(--spacing-large, 12px);
34
- padding-top: 0;
35
- font-size: 14px;
36
- min-width: 800px;
37
- }
38
-
39
- [bold] {
40
- font-weight: bold;
41
- }
42
-
43
- div[name] {
44
- display: flex;
45
- color: #586878;
46
- font-size: 24px;
47
- align-items: center;
48
- justify-content: center;
49
- }
50
-
51
- table {
52
- width: 100%;
53
- font-size: 15px;
54
- color: #586878;
55
- text-align: left;
56
- border-collapse: collapse;
57
- td,
58
- th {
59
- border: 1px rgba(51, 51, 51, 0.2) solid;
60
- padding-inline: var(--spacing-medium, 8px);
61
- vertical-align: middle;
62
- }
63
- th {
64
- background-color: #efefef;
65
- font-weight: bold;
66
- }
67
- td {
68
- height: 33px;
69
- background-color: var(--md-sys-color-on-primary);
70
- &[radio] {
71
- text-align: center;
72
- width: 50px;
73
- }
74
- }
75
- }
76
-
77
- table[header] {
78
- margin-top: var(--spacing-small, 4px);
79
-
80
- td {
81
- min-width: 180px;
82
- border-left: none;
83
- }
84
- th {
85
- width: 110px;
86
- border-right: none;
87
- }
88
- }
89
-
90
- table[body] {
91
- border: 2px solid var(--md-sys-color-on-primary-container);
92
- border-bottom: none;
93
- margin-top: var(--spacing-medium, 8px);
94
-
95
- th {
96
- text-align: center;
97
-
98
- &[type] {
99
- min-width: 150px;
100
- }
101
- &[inspection-name] {
102
- min-width: 250px;
103
- }
104
- &[result] {
105
- width: 270px;
106
- }
107
- &[criteria] {
108
- width: 90px;
109
- }
110
- &[small] {
111
- width: 60px;
112
- }
113
- }
114
- td {
115
- &[main-type] {
116
- width: 50px;
117
- text-align: center;
118
- word-break: keep-all;
119
- }
120
-
121
- &[attachment] {
122
- text-align: center;
123
- cursor: pointer;
124
-
125
- * {
126
- vertical-align: middle;
127
- }
128
- }
129
- &[comment] {
130
- cursor: pointer;
131
- text-align: center;
132
-
133
- * {
134
- vertical-align: middle;
135
- }
136
- }
137
- &[disabled] * {
138
- opacity: 0.6;
139
- }
140
- }
141
- }
142
-
143
- table[tail] {
144
- border: 2px solid var(--md-sys-color-on-primary-container);
145
- border-top: none;
146
- margin-top: -1px;
147
-
148
- td {
149
- width: 25%;
150
- border-left: none;
151
- text-align: center;
152
- position: relative;
153
- background-color: var(--md-sys-color-on-primary);
154
- font-size: 14px;
155
- }
156
- th {
157
- width: 25%;
158
- border-right: none;
159
- }
160
-
161
- span[sign-text] {
162
- position: absolute;
163
- top: 50%;
164
- left: 50%;
165
- transform: translate(-50%, -50%);
166
- pointer-events: none;
167
- }
168
- ox-input-signature {
169
- margin: var(--spacing-medium, 8px);
170
-
171
- &[disabled] {
172
- background: #eee;
173
- }
174
- }
175
- }
176
-
177
- div[footer] {
178
- display: flex;
179
- flex-direction: column;
180
- gap: var(--spacing-tiny, 2px);
181
- font-size: 12px;
182
- margin-top: var(--spacing-medium, 8px);
183
- color: #586878;
184
- text-indent: -9px;
185
- padding-left: var(--spacing-medium, 8px);
186
- }
187
- `
188
- ]
189
-
190
- @property({ type: String }) mode: ChecklistMode = ChecklistMode.VIEWER
191
- @property({ type: Object }) checklist: any = {}
192
- @property({ type: Object }) buildingComplex = {
193
- id: '',
194
- taskConstructorEmails: [] as string[],
195
- overallConstructorEmails: [] as string[],
196
- taskSupervisoryEmails: [] as string[],
197
- overallSupervisoryEmails: [] as string[]
198
- }
199
- @property({ type: String }) status: BuildingInspectionStatus = BuildingInspectionStatus.WAIT
200
-
201
- render() {
202
- const today = this._getDate(new Date())
203
-
204
- // 시공자 스탭 여부
205
- const isConstructorStep =
206
- this.status == BuildingInspectionStatus.WAIT ||
207
- this.status == BuildingInspectionStatus.OVERALL_WAIT ||
208
- this.status == BuildingInspectionStatus.FAIL
209
-
210
- // 감리자 스탭 여부
211
- const isSupervisoryStep =
212
- this.status == BuildingInspectionStatus.REQUEST || this.status == BuildingInspectionStatus.OVERALL_REQUEST
213
-
214
- // 현재 스탭에 해당하는 계정인지 체크 (편집모드만)
215
- let havePermissionByStatus: boolean = false
216
- let isTaskConstructor: boolean = false
217
- let isOverallConstructor: boolean = false
218
- let isTaskSupervisory: boolean = false
219
- let isOverallSupervisory: boolean = false
220
-
221
- if (this.mode == ChecklistMode.EDITOR && this.status) {
222
- const email = (store.getState() as any).auth?.user?.email
223
- // 현재 유저가 "공종별 시공 관리자" 인지 체크
224
- isTaskConstructor = this.buildingComplex.taskConstructorEmails?.includes(email) || false
225
- // 현재 유저가 "총괄 시공 책임자" 인지 체크
226
- isOverallConstructor = this.buildingComplex.overallConstructorEmails?.includes(email) || false
227
- // 현재 유저가 "공종별 감리 책임자" 인지 체크
228
- isTaskSupervisory = this.buildingComplex.taskSupervisoryEmails?.includes(email) || false
229
- // 현재 유저가 "총괄 감리 책임자" 인지 체크
230
- isOverallSupervisory = this.buildingComplex.overallSupervisoryEmails?.includes(email) || false
231
- // 스탭이 시공자 스탭일때에 내가 시공자 권한이 있는지 체크
232
- havePermissionByStatus = isConstructorStep
233
- ? isTaskConstructor || isOverallConstructor
234
- : isTaskSupervisory || isOverallSupervisory
235
- }
236
-
237
- // 체크리스트 아이템 정렬
238
- this.checklist?.checklistItems?.sort((a, b) => {
239
- // 1순위: mainType 오름차순
240
- if (a.mainType < b.mainType) return -1
241
- if (a.mainType > b.mainType) return 1
242
-
243
- // 2순위: detailType 오름차순
244
- if (a.detailType < b.detailType) return -1
245
- if (a.detailType > b.detailType) return 1
246
-
247
- // 3순위: sequence 오름차순
248
- return a.sequence - b.sequence
249
- })
250
-
251
- const processedItems = this.drawChecklistItems(this.checklist?.checklistItems || [])
252
-
253
- return html`
254
- <div wrapper>
255
- <div name bold>${this.checklist.name}</div>
256
-
257
- <table header>
258
- <tr>
259
- <th>공종</th>
260
- <td>${this.checklist.constructionType}</td>
261
- <th>문서 번호</th>
262
- <td>${this.checklist.documentNo}</td>
263
- </tr>
264
- <tr>
265
- <th>세부 공종</th>
266
- <td>${this.checklist.constructionDetailType}</td>
267
- <th>위치 및 부위</th>
268
- <td>${this.checklist.location}</td>
269
- </tr>
270
- <tr>
271
- <th>검측 부위</th>
272
- <td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>
273
- <th>검측 상태</th>
274
- <td>${BUILDING_INSPECTION_STATUS_DISPLAY[this.checklist?.buildingInspection?.status]}</td>
275
- </tr>
276
- </table>
277
-
278
- <table body>
279
- <thead>
280
- <tr>
281
- <th colspan="2" rowspan="3" type>구분</th>
282
- <th rowspan="3" inspection-name>검사항목</th>
283
- <th rowspan="3" criteria>검사기준</th>
284
- <th colspan="4" result>검사결과</th>
285
- <th rowspan="3" small>첨부자료</th>
286
- <th rowspan="3" small>조치사항</th>
287
- </tr>
288
- <tr>
289
- <th colspan="2">시공자</th>
290
- <th colspan="2">감리자</th>
291
- </tr>
292
- <tr>
293
- <th>적합</th>
294
- <th>부적합</th>
295
- <th>적합</th>
296
- <th>부적합</th>
297
- </tr>
298
- </thead>
299
- <tbody>
300
- ${processedItems.map(({ item, showMainTypeCell, mainTypeRowspan, showDetailTypeCell, detailTypeRowspan }, idx) => {
301
- return html` <tr>
302
- ${showMainTypeCell
303
- ? html`<td main-type bold rowspan="${mainTypeRowspan}">${CHECKLIST_MAIN_TYPE_LIST[item.mainType]}</td>`
304
- : ''}
305
- ${showDetailTypeCell ? html` <td bold rowspan="${detailTypeRowspan}">${item.detailType}</td> ` : ''}
306
-
307
- <td>${idx + 1}. ${item.name}</td>
308
- <td>${item.inspctionCriteria}</td>
309
- <td radio>
310
- <md-radio
311
- item-id=${item.id}
312
- item-name="constructionConfirmStatus"
313
- name=${'radio-construction-' + item.id}
314
- value="T"
315
- .checked=${item.constructionConfirmStatus === 'T'}
316
- ?disabled=${!isConstructorStep || !havePermissionByStatus}
317
- @change=${this._onChangeConfirmStatus}
318
- ></md-radio>
319
- </td>
320
- <td radio>
321
- <md-radio
322
- item-id=${item.id}
323
- item-name="constructionConfirmStatus"
324
- name=${'radio-construction-' + item.id}
325
- value="F"
326
- .checked=${item.constructionConfirmStatus === 'F'}
327
- ?disabled=${!isConstructorStep || !havePermissionByStatus}
328
- @change=${this._onChangeConfirmStatus}
329
- ></md-radio>
330
- </td>
331
- <td radio>
332
- <md-radio
333
- item-id=${item.id}
334
- item-name="supervisoryConfirmStatus"
335
- name=${'radio-supervisory-' + item.id}
336
- value="T"
337
- .checked=${item.supervisoryConfirmStatus === 'T'}
338
- ?disabled=${!isSupervisoryStep || !havePermissionByStatus}
339
- @change=${this._onChangeConfirmStatus}
340
- ></md-radio>
341
- </td>
342
- <td radio>
343
- <md-radio
344
- item-id=${item.id}
345
- item-name="supervisoryConfirmStatus"
346
- name=${'radio-supervisory-' + item.id}
347
- value="F"
348
- .checked=${item.supervisoryConfirmStatus === 'F'}
349
- ?disabled=${!isSupervisoryStep || !havePermissionByStatus}
350
- @change=${this._onChangeConfirmStatus}
351
- ></md-radio>
352
- </td>
353
- <td
354
- attachment
355
- ?disabled=${this.status == BuildingInspectionStatus.PASS}
356
- @click=${() => this._onClickAttachment(item.id)}
357
- >
358
- <md-icon slot="icon">attach_file</md-icon>
359
- <span>${item?.checklistItemAttachmentCount || ''}</span>
360
- </td>
361
- <td
362
- comment
363
- ?disabled=${this.status == BuildingInspectionStatus.PASS}
364
- @click=${() => this._onClickComment(item.id)}
365
- >
366
- <md-icon slot="icon">chat</md-icon>
367
- <span>${item?.checklistItemCommentCount || ''}</span>
368
- </td>
369
- </tr>`
370
- })}
371
- </tbody>
372
- </table>
373
-
374
- <table tail>
375
- <tbody>
376
- <tr first>
377
- <th rowspan="2">시공자 점검일</th>
378
- <td rowspan="2">
379
- ${this.mode == ChecklistMode.VIEWER ? today : this._getDate(this.checklist.constructionInspectionDate)}
380
- </td>
381
- <th>공종별 시공 관리자</th>
382
- <td>
383
- <span sign-text>(인)</span>
384
- <ox-input-signature
385
- .value=${this.checklist.taskConstructorSignature}
386
- name="taskConstructorSignature"
387
- @change=${this._onChangeSignature}
388
- ?disabled=${(this.status != BuildingInspectionStatus.WAIT && this.status != BuildingInspectionStatus.FAIL) ||
389
- !isTaskConstructor}
390
- >
391
- </ox-input-signature>
392
- </td>
393
- </tr>
394
- <tr>
395
- <th>총괄 시공 책임자</th>
396
- <td>
397
- <span sign-text>(인)</span>
398
- <ox-input-signature
399
- .value=${this.checklist.overallConstructorSignature}
400
- name="overallConstructorSignature"
401
- @change=${this._onChangeSignature}
402
- ?disabled=${this.status != BuildingInspectionStatus.OVERALL_WAIT || !isOverallConstructor}
403
- >
404
- </ox-input-signature>
405
- </td>
406
- </tr>
407
- <tr>
408
- <th rowspan="2">감리자 점검일</th>
409
- <td rowspan="2">
410
- ${this.mode == ChecklistMode.VIEWER ? today : this._getDate(this.checklist.supervisorInspectionDate)}
411
- </td>
412
- <th>공종별 감리 책임자</th>
413
- <td>
414
- <span sign-text>(인)</span>
415
- <ox-input-signature
416
- .value=${this.checklist.taskSupervisorySignature}
417
- name="taskSupervisorySignature"
418
- @change=${this._onChangeSignature}
419
- ?disabled=${this.status != BuildingInspectionStatus.REQUEST || !isTaskSupervisory}
420
- >
421
- </ox-input-signature>
422
- </td>
423
- </tr>
424
- <tr>
425
- <th>총괄 감리 책임자</th>
426
- <td>
427
- <span sign-text>(인)</span>
428
- <ox-input-signature
429
- .value=${this.checklist.overallSupervisorySignature}
430
- name="overallSupervisorySignature"
431
- @change=${this._onChangeSignature}
432
- ?disabled=${this.status != BuildingInspectionStatus.OVERALL_REQUEST || !isOverallSupervisory}
433
- >
434
- </ox-input-signature>
435
- </td>
436
- </tr>
437
- </tbody>
438
- </table>
439
-
440
- <div footer>
441
- <div>
442
- - 검사결과는 1차, 2차로 구분 재검측시 2차에 기록하고 검사기준도 검사결과와 비교될 수 있도록 시방서 또는 도면 등에 있는
443
- 수치를 작성하며, 수치가 없는 검사항목은 시방서 또는 설계도서에 있는 내용과 검사한 내용으로 작성함
444
- </div>
445
- <div>- 검사항목 및 검사기준은 각 공종별로 감리원과 협의하여 작성할 것</div>
446
- </div>
447
- </div>
448
- `
449
- }
450
-
451
- private _onChangeConfirmStatus(e: Event) {
452
- const target = e.target as HTMLInputElement
453
- const itemId = target.getAttribute('item-id')
454
- const name = target.getAttribute('item-name') || ''
455
- const value = target.value
456
-
457
- this.checklist.checklistItems = this.checklist?.checklistItems?.map(item =>
458
- item.id == itemId ? { ...item, [name]: value } : item
459
- )
460
- }
461
-
462
- private _onChangeSignature(e: Event) {
463
- const target = e.target as HTMLInputElement
464
-
465
- this.checklist[target.name] = target.value
466
- }
467
-
468
- private _getDate(date) {
469
- if (!date) return ' 년 월 일'
470
-
471
- const _date = new Date(date) || new Date()
472
- return _date.toLocaleDateString('ko-KR', {
473
- timeZone: 'Asia/Seoul',
474
- year: 'numeric',
475
- month: 'long',
476
- day: 'numeric'
477
- })
478
- }
479
-
480
- private drawChecklistItems(checklistItems) {
481
- const mainTypeRowspans = {}
482
- const detailTypeRowspans = {}
483
- let previousMainType = null
484
- let previousDetailType = null
485
-
486
- return checklistItems.map((item, index) => {
487
- const mainType = item.mainType
488
- const detailType = item.detailType
489
-
490
- // mainType이 변경되면 rowspan을 계산
491
- if (mainType !== previousMainType) {
492
- mainTypeRowspans[mainType] = checklistItems.filter(i => i.mainType === mainType).length
493
- previousDetailType = null // detailType 초기화
494
- }
495
-
496
- // detailType이 변경되면 rowspan을 계산
497
- if (detailType !== previousDetailType) {
498
- detailTypeRowspans[`${mainType}-${detailType}`] = checklistItems.filter(
499
- i => i.mainType === mainType && i.detailType === detailType
500
- ).length
501
- }
502
-
503
- const showMainTypeCell = mainType !== previousMainType
504
- const showDetailTypeCell = detailType !== previousDetailType
505
-
506
- const mainTypeRowspan = mainTypeRowspans[mainType]
507
- const detailTypeRowspan = detailTypeRowspans[`${mainType}-${detailType}`]
508
-
509
- // 이전 값을 업데이트
510
- previousMainType = mainType
511
- previousDetailType = detailType
512
-
513
- return {
514
- item,
515
- showMainTypeCell,
516
- mainTypeRowspan,
517
- showDetailTypeCell,
518
- detailTypeRowspan
519
- }
520
- })
521
- }
522
-
523
- private _onClickComment(checklistItemId: string) {
524
- openPopup(
525
- html`
526
- <comment-list-popup
527
- .checklistItemId=${checklistItemId}
528
- .status=${this.status}
529
- @change-comment=${this._refreshItem.bind(this)}
530
- ></comment-list-popup>
531
- `,
532
- {
533
- backdrop: true,
534
- size: 'medium',
535
- title: '조치 사항'
536
- }
537
- )
538
- }
539
-
540
- private _onClickAttachment(checklistItemId: string) {
541
- openPopup(
542
- html`
543
- <attachment-list-popup
544
- .checklistItemId=${checklistItemId}
545
- .status=${this.status}
546
- @change-attachment=${this._refreshItem.bind(this)}
547
- ></attachment-list-popup>
548
- `,
549
- {
550
- backdrop: true,
551
- size: 'medium',
552
- title: '첨부 자료'
553
- }
554
- )
555
- }
556
-
557
- private async _refreshItem(e) {
558
- const { checklistItemId } = e.detail
559
- const response = await client.query({
560
- query: gql`
561
- query ChecklistItem($checklistItemId: String!) {
562
- checklistItem(id: $checklistItemId) {
563
- id
564
- checklistItemCommentCount
565
- checklistItemAttachmentCount
566
- }
567
- }
568
- `,
569
- variables: {
570
- checklistItemId: checklistItemId
571
- }
572
- })
573
-
574
- const checklistItem = response.data?.checklistItem || []
575
- this.checklist.checklistItems = this.checklist.checklistItems.map(item => {
576
- return item.id != checklistItemId ? item : { ...item, ...checklistItem }
577
- })
578
-
579
- this.requestUpdate()
580
- }
581
- }