@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,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 { SupervisorImporter } from './supervisor-importer'
20
-
21
- @customElement('supervisor-list-page')
22
- export class SupervisorListPage 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
- 'supervisor-importer': SupervisorImporter
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.supervisor 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/supervisor',
65
- actions: [
66
- {
67
- title: i18next.t('button.save'),
68
- action: this.updateSupervisor.bind(this),
69
- ...CommonButtonStyles.save
70
- },
71
- {
72
- title: i18next.t('button.delete'),
73
- action: this.deleteSupervisor.bind(this),
74
- ...CommonButtonStyles.delete
75
- }
76
- ],
77
- exportable: {
78
- name: i18next.t('title.supervisor 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: supervisors(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 deleteSupervisor() {
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
- deleteSupervisors(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 updateSupervisor() {
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: [SupervisorPatch!]!) {
288
- updateMultipleSupervisor(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(supervisor => {
309
- let tempObj = {}
310
- for (const field of targetFieldSet) {
311
- tempObj[field] = supervisor[field]
312
- }
313
-
314
- return tempObj
315
- })
316
- }
317
-
318
- private async importHandler(records) {
319
- const popup = openPopup(
320
- html`
321
- <supervisor-importer
322
- .supervisors=${records}
323
- @imported=${() => {
324
- history.back()
325
- this.grist.fetch()
326
- }}
327
- ></supervisor-importer>
328
- `,
329
- {
330
- backdrop: true,
331
- size: 'large',
332
- title: i18next.t('title.import supervisor')
333
- }
334
- )
335
-
336
- popup.onclosed = () => {
337
- this.grist.fetch()
338
- }
339
- }
340
- }
package/client/route.ts DELETED
@@ -1,27 +0,0 @@
1
- export default function route(page: string) {
2
- switch (page) {
3
- case 'checklist-template-list':
4
- import('./pages/checklist-template/checklist-template-list')
5
- return page
6
-
7
- case 'checklist-type-management':
8
- import('./pages/checklist-template/checklist-type-management')
9
- return page
10
-
11
- case 'building-inspection-list':
12
- import('./pages/building-inspection/building-inspection-list')
13
- return page
14
-
15
- case 'building-inspection-detail-drawing':
16
- import('./pages/building-inspection/building-inspection-detail-drawing')
17
- return page
18
-
19
- case 'building-inspection-detail-checklist':
20
- import('./pages/building-inspection/building-inspection-detail-checklist')
21
- return page
22
-
23
- case 'building-inspection-detail-camera':
24
- import('./pages/building-inspection/building-inspection-detail-camera')
25
- return page
26
- }
27
- }
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig-base.json",
3
- "compilerOptions": {
4
- "strict": true,
5
- "declaration": true,
6
- "module": "esnext",
7
- "outDir": "../dist-client",
8
- "baseUrl": "./"
9
- },
10
- "include": ["./**/*"]
11
- }
@@ -1,7 +0,0 @@
1
- import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
- import { BuildingInspection } from './building-inspection';
3
- import { BuildingInspectionHistory } from './building-inspection-history';
4
- export declare class BuildingInspectionHistoryEntitySubscriber extends HistoryEntitySubscriber<BuildingInspection, BuildingInspectionHistory> {
5
- get entity(): typeof BuildingInspection;
6
- get historyEntity(): typeof BuildingInspectionHistory;
7
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuildingInspectionHistoryEntitySubscriber = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const typeorm_history_1 = require("@operato/typeorm-history");
7
- const building_inspection_1 = require("./building-inspection");
8
- const building_inspection_history_1 = require("./building-inspection-history");
9
- let BuildingInspectionHistoryEntitySubscriber = class BuildingInspectionHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
10
- get entity() {
11
- return building_inspection_1.BuildingInspection;
12
- }
13
- get historyEntity() {
14
- return building_inspection_history_1.BuildingInspectionHistory;
15
- }
16
- };
17
- BuildingInspectionHistoryEntitySubscriber = tslib_1.__decorate([
18
- (0, typeorm_1.EventSubscriber)()
19
- ], BuildingInspectionHistoryEntitySubscriber);
20
- exports.BuildingInspectionHistoryEntitySubscriber = BuildingInspectionHistoryEntitySubscriber;
21
- //# sourceMappingURL=event-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/building-inspection/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,+DAA0D;AAC1D,+EAAyE;AAGlE,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,yCAG9D;IACC,IAAW,MAAM;QACf,OAAO,wCAAkB,CAAA;IAC3B,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,uDAAyB,CAAA;IAClC,CAAC;CACF,CAAA;AAXY,yCAAyC;IADrD,IAAA,yBAAe,GAAE;GACL,yCAAyC,CAWrD;AAXY,8FAAyC","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { BuildingInspection } from './building-inspection'\nimport { BuildingInspectionHistory } from './building-inspection-history'\n\n@EventSubscriber()\nexport class BuildingInspectionHistoryEntitySubscriber extends HistoryEntitySubscriber<\n BuildingInspection,\n BuildingInspectionHistory\n> {\n public get entity() {\n return BuildingInspection\n }\n\n public get historyEntity() {\n return BuildingInspectionHistory\n }\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
- import { Checklist } from './checklist';
3
- import { ChecklistHistory } from './checklist-history';
4
- export declare class ChecklistHistoryEntitySubscriber extends HistoryEntitySubscriber<Checklist, ChecklistHistory> {
5
- get entity(): typeof Checklist;
6
- get historyEntity(): typeof ChecklistHistory;
7
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChecklistHistoryEntitySubscriber = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const typeorm_history_1 = require("@operato/typeorm-history");
7
- const checklist_1 = require("./checklist");
8
- const checklist_history_1 = require("./checklist-history");
9
- let ChecklistHistoryEntitySubscriber = class ChecklistHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
10
- get entity() {
11
- return checklist_1.Checklist;
12
- }
13
- get historyEntity() {
14
- return checklist_history_1.ChecklistHistory;
15
- }
16
- };
17
- ChecklistHistoryEntitySubscriber = tslib_1.__decorate([
18
- (0, typeorm_1.EventSubscriber)()
19
- ], ChecklistHistoryEntitySubscriber);
20
- exports.ChecklistHistoryEntitySubscriber = ChecklistHistoryEntitySubscriber;
21
- //# sourceMappingURL=event-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/checklist/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,2CAAuC;AACvC,2DAAsD;AAG/C,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,yCAAoD;IACxG,IAAW,MAAM;QACf,OAAO,qBAAS,CAAA;IAClB,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,oCAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AARY,gCAAgC;IAD5C,IAAA,yBAAe,GAAE;GACL,gCAAgC,CAQ5C;AARY,4EAAgC","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { Checklist } from './checklist'\nimport { ChecklistHistory } from './checklist-history'\n\n@EventSubscriber()\nexport class ChecklistHistoryEntitySubscriber extends HistoryEntitySubscriber<Checklist, ChecklistHistory> {\n public get entity() {\n return Checklist\n }\n\n public get historyEntity() {\n return ChecklistHistory\n }\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { HistoryEntitySubscriber } from '@operato/typeorm-history';
2
- import { ChecklistItemComment } from './checklist-item-comment';
3
- import { ChecklistItemCommentHistory } from './checklist-item-comment-history';
4
- export declare class ChecklistItemCommentHistoryEntitySubscriber extends HistoryEntitySubscriber<ChecklistItemComment, ChecklistItemCommentHistory> {
5
- get entity(): typeof ChecklistItemComment;
6
- get historyEntity(): typeof ChecklistItemCommentHistory;
7
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChecklistItemCommentHistoryEntitySubscriber = void 0;
4
- const tslib_1 = require("tslib");
5
- const typeorm_1 = require("typeorm");
6
- const typeorm_history_1 = require("@operato/typeorm-history");
7
- const checklist_item_comment_1 = require("./checklist-item-comment");
8
- const checklist_item_comment_history_1 = require("./checklist-item-comment-history");
9
- let ChecklistItemCommentHistoryEntitySubscriber = class ChecklistItemCommentHistoryEntitySubscriber extends typeorm_history_1.HistoryEntitySubscriber {
10
- get entity() {
11
- return checklist_item_comment_1.ChecklistItemComment;
12
- }
13
- get historyEntity() {
14
- return checklist_item_comment_history_1.ChecklistItemCommentHistory;
15
- }
16
- };
17
- ChecklistItemCommentHistoryEntitySubscriber = tslib_1.__decorate([
18
- (0, typeorm_1.EventSubscriber)()
19
- ], ChecklistItemCommentHistoryEntitySubscriber);
20
- exports.ChecklistItemCommentHistoryEntitySubscriber = ChecklistItemCommentHistoryEntitySubscriber;
21
- //# sourceMappingURL=event-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/checklist-item-comment/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAAyC;AAEzC,8DAAkE;AAElE,qEAA+D;AAC/D,qFAA8E;AAGvE,IAAM,2CAA2C,GAAjD,MAAM,2CAA4C,SAAQ,yCAA0E;IACzI,IAAW,MAAM;QACf,OAAO,6CAAoB,CAAA;IAC7B,CAAC;IAED,IAAW,aAAa;QACtB,OAAO,4DAA2B,CAAA;IACpC,CAAC;CACF,CAAA;AARY,2CAA2C;IADvD,IAAA,yBAAe,GAAE;GACL,2CAA2C,CAQvD;AARY,kGAA2C","sourcesContent":["import { EventSubscriber } from 'typeorm'\n\nimport { HistoryEntitySubscriber } from '@operato/typeorm-history'\n\nimport { ChecklistItemComment } from './checklist-item-comment'\nimport { ChecklistItemCommentHistory } from './checklist-item-comment-history'\n\n@EventSubscriber()\nexport class ChecklistItemCommentHistoryEntitySubscriber extends HistoryEntitySubscriber<ChecklistItemComment, ChecklistItemCommentHistory> {\n public get entity() {\n return ChecklistItemComment\n }\n\n public get historyEntity() {\n return ChecklistItemCommentHistory\n }\n}\n"]}
File without changes
package/server/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './migrations'
2
- export * from './service'
3
-
4
- import './routes'
@@ -1,3 +0,0 @@
1
- export function initMiddlewares(app) {
2
- /* can add middlewares into app */
3
- }
@@ -1,9 +0,0 @@
1
- const glob = require('glob')
2
- const path = require('path')
3
-
4
- export var migrations = []
5
-
6
- glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
7
- if (file.indexOf('index.js') !== -1) return
8
- migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
9
- })
package/server/routes.ts DELETED
@@ -1,28 +0,0 @@
1
- // const debug = require('debug')('dssp:supervision:routes')
2
-
3
- process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
4
- /*
5
- * can add global public routes to application (auth not required, tenancy not required)
6
- *
7
- * ex) routes.get('/path', async(context, next) => {})
8
- * ex) routes.post('/path', async(context, next) => {})
9
- */
10
- })
11
-
12
- process.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {
13
- /*
14
- * can add global private routes to application (auth required, tenancy not required)
15
- */
16
- })
17
-
18
- process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {
19
- /*
20
- * can add domain public routes to application (auth not required, tenancy required)
21
- */
22
- })
23
-
24
- process.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {
25
- /*
26
- * can add domain private routes to application (auth required, tenancy required)
27
- */
28
- })