@dssp/supervision 0.0.8 → 0.0.10

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 (224) hide show
  1. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +186 -0
  2. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +160 -0
  3. package/client/pages/building-inspection/building-inspection-list.ts +430 -0
  4. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +94 -0
  5. package/client/pages/building-inspection/inspection-create-popup.ts +696 -0
  6. package/client/pages/checklist/checklist-view.ts +443 -0
  7. package/client/pages/checklist-template/checklist-template-item.ts +240 -0
  8. package/client/pages/checklist-template/checklist-template-list.ts +271 -0
  9. package/client/pages/checklist-template/checklist-type-management.ts +242 -0
  10. package/client/route.ts +14 -18
  11. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +21 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +187 -0
  13. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +21 -0
  15. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +169 -0
  16. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
  17. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +67 -0
  18. package/dist-client/pages/building-inspection/building-inspection-list.js +434 -0
  19. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
  20. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
  21. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +118 -0
  22. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
  23. package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
  24. package/dist-client/pages/building-inspection/inspection-create-popup.js +735 -0
  25. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
  26. package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
  27. package/dist-client/pages/checklist/checklist-view.js +434 -0
  28. package/dist-client/pages/checklist/checklist-view.js.map +1 -0
  29. package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
  30. package/dist-client/pages/checklist-template/checklist-template-item.js +237 -0
  31. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
  32. package/dist-client/pages/{check-item/check-item-list-page.d.ts → checklist-template/checklist-template-list.d.ts} +8 -27
  33. package/dist-client/pages/checklist-template/checklist-template-list.js +259 -0
  34. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
  35. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +48 -0
  36. package/dist-client/pages/checklist-template/checklist-type-management.js +229 -0
  37. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
  38. package/dist-client/route.d.ts +1 -1
  39. package/dist-client/route.js +10 -13
  40. package/dist-client/route.js.map +1 -1
  41. package/dist-client/tsconfig.tsbuildinfo +1 -1
  42. package/dist-server/index.d.ts +1 -1
  43. package/dist-server/index.js +1 -1
  44. package/dist-server/index.js.map +1 -1
  45. package/dist-server/service/building-inspection/building-inspection-history.d.ts +17 -0
  46. package/dist-server/service/building-inspection/building-inspection-history.js +85 -0
  47. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -0
  48. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +8 -0
  49. package/dist-server/service/building-inspection/building-inspection-mutation.js +148 -0
  50. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
  51. package/dist-server/service/building-inspection/building-inspection-query.d.ts +20 -0
  52. package/dist-server/service/building-inspection/building-inspection-query.js +235 -0
  53. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
  54. package/dist-server/service/building-inspection/building-inspection-type.d.ts +43 -0
  55. package/dist-server/service/building-inspection/building-inspection-type.js +153 -0
  56. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
  57. package/dist-server/service/building-inspection/building-inspection.d.ts +26 -0
  58. package/dist-server/service/building-inspection/building-inspection.js +113 -0
  59. package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
  60. package/dist-server/service/building-inspection/event-subscriber.d.ts +7 -0
  61. package/dist-server/service/building-inspection/event-subscriber.js +21 -0
  62. package/dist-server/service/building-inspection/event-subscriber.js.map +1 -0
  63. package/dist-server/service/building-inspection/index.d.ts +10 -0
  64. package/dist-server/service/building-inspection/index.js +14 -0
  65. package/dist-server/service/building-inspection/index.js.map +1 -0
  66. package/dist-server/service/checklist/checklist-history.d.ts +24 -0
  67. package/dist-server/service/checklist/checklist-history.js +120 -0
  68. package/dist-server/service/checklist/checklist-history.js.map +1 -0
  69. package/dist-server/service/checklist/checklist-mutation.d.ts +8 -0
  70. package/dist-server/service/checklist/checklist-mutation.js +96 -0
  71. package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
  72. package/dist-server/service/checklist/checklist-query.d.ts +12 -0
  73. package/dist-server/service/checklist/checklist-query.js +83 -0
  74. package/dist-server/service/checklist/checklist-query.js.map +1 -0
  75. package/dist-server/service/checklist/checklist-type.d.ts +18 -0
  76. package/dist-server/service/checklist/checklist-type.js +69 -0
  77. package/dist-server/service/checklist/checklist-type.js.map +1 -0
  78. package/dist-server/service/checklist/checklist.d.ts +31 -0
  79. package/dist-server/service/checklist/checklist.js +143 -0
  80. package/dist-server/service/checklist/checklist.js.map +1 -0
  81. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  82. package/dist-server/service/checklist/event-subscriber.js +21 -0
  83. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  84. package/dist-server/service/checklist/index.d.ts +8 -0
  85. package/dist-server/service/checklist/index.js +12 -0
  86. package/dist-server/service/checklist/index.js.map +1 -0
  87. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
  88. package/dist-server/service/checklist-item/checklist-item-mutation.js +13 -0
  89. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
  90. package/dist-server/service/checklist-item/checklist-item-query.d.ts +10 -0
  91. package/dist-server/service/checklist-item/checklist-item-query.js +68 -0
  92. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
  93. package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -0
  94. package/dist-server/service/checklist-item/checklist-item-type.js +21 -0
  95. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
  96. package/dist-server/service/checklist-item/checklist-item.d.ts +26 -0
  97. package/dist-server/service/checklist-item/checklist-item.js +113 -0
  98. package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
  99. package/dist-server/service/checklist-item/index.d.ts +5 -0
  100. package/dist-server/service/checklist-item/index.js +10 -0
  101. package/dist-server/service/checklist-item/index.js.map +1 -0
  102. package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +6 -0
  103. package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
  104. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
  105. package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
  106. package/dist-server/service/checklist-template/checklist-template-query.js +65 -0
  107. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
  108. package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
  109. package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
  110. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
  111. package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
  112. package/dist-server/service/checklist-template/checklist-template.js +78 -0
  113. package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
  114. package/dist-server/service/checklist-template/index.d.ts +5 -0
  115. package/dist-server/service/checklist-template/index.js +9 -0
  116. package/dist-server/service/checklist-template/index.js.map +1 -0
  117. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
  118. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +68 -0
  119. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
  120. package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +10 -0
  121. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +66 -0
  122. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
  123. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +16 -0
  124. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +60 -0
  125. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
  126. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +19 -0
  127. package/dist-server/service/checklist-template-item/checklist-template-item.js +87 -0
  128. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
  129. package/dist-server/service/checklist-template-item/index.d.ts +5 -0
  130. package/dist-server/service/checklist-template-item/index.js +9 -0
  131. package/dist-server/service/checklist-template-item/index.js.map +1 -0
  132. package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
  133. package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
  134. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
  135. package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
  136. package/dist-server/service/checklist-type/checklist-type-query.js +65 -0
  137. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
  138. package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
  139. package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
  140. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
  141. package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
  142. package/dist-server/service/checklist-type/checklist-type.js +78 -0
  143. package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
  144. package/dist-server/service/checklist-type/index.d.ts +5 -0
  145. package/dist-server/service/checklist-type/index.js +9 -0
  146. package/dist-server/service/checklist-type/index.js.map +1 -0
  147. package/dist-server/service/index.d.ts +8 -3
  148. package/dist-server/service/index.js +25 -5
  149. package/dist-server/service/index.js.map +1 -1
  150. package/dist-server/service/issue/issue.d.ts +1 -3
  151. package/dist-server/service/issue/issue.js +1 -7
  152. package/dist-server/service/issue/issue.js.map +1 -1
  153. package/dist-server/service/supervisor/supervisor.d.ts +1 -3
  154. package/dist-server/service/supervisor/supervisor.js +1 -7
  155. package/dist-server/service/supervisor/supervisor.js.map +1 -1
  156. package/dist-server/tsconfig.tsbuildinfo +1 -1
  157. package/helps/supervision/checklist-item.md +160 -0
  158. package/helps/supervision/checklist.md +160 -0
  159. package/package.json +11 -7
  160. package/server/index.ts +1 -1
  161. package/server/service/building-inspection/building-inspection-history.ts +70 -0
  162. package/server/service/building-inspection/building-inspection-mutation.ts +147 -0
  163. package/server/service/building-inspection/building-inspection-query.ts +202 -0
  164. package/server/service/building-inspection/building-inspection-type.ts +101 -0
  165. package/server/service/building-inspection/building-inspection.ts +106 -0
  166. package/server/service/building-inspection/event-subscriber.ts +20 -0
  167. package/server/service/building-inspection/index.ts +11 -0
  168. package/server/service/checklist/checklist-history.ts +96 -0
  169. package/server/service/checklist/checklist-mutation.ts +103 -0
  170. package/server/service/checklist/checklist-query.ts +52 -0
  171. package/server/service/{check-item/check-item-type.ts → checklist/checklist-type.ts} +6 -18
  172. package/server/service/checklist/checklist.ts +127 -0
  173. package/server/service/checklist/event-subscriber.ts +17 -0
  174. package/server/service/checklist/index.ts +9 -0
  175. package/server/service/checklist-item/checklist-item-mutation.ts +5 -0
  176. package/server/service/checklist-item/checklist-item-query.ts +43 -0
  177. package/server/service/checklist-item/checklist-item-type.ts +12 -0
  178. package/server/service/checklist-item/checklist-item.ts +100 -0
  179. package/server/service/checklist-item/index.ts +7 -0
  180. package/server/service/checklist-template/checklist-template-mutation.ts +66 -0
  181. package/server/service/checklist-template/checklist-template-query.ts +39 -0
  182. package/server/service/checklist-template/checklist-template-type.ts +23 -0
  183. package/server/service/checklist-template/checklist-template.ts +71 -0
  184. package/server/service/checklist-template/index.ts +6 -0
  185. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +64 -0
  186. package/server/service/checklist-template-item/checklist-template-item-query.ts +39 -0
  187. package/server/service/checklist-template-item/checklist-template-item-type.ts +39 -0
  188. package/server/service/checklist-template-item/checklist-template-item.ts +67 -0
  189. package/server/service/checklist-template-item/index.ts +6 -0
  190. package/server/service/checklist-type/checklist-type-mutation.ts +66 -0
  191. package/server/service/checklist-type/checklist-type-query.ts +39 -0
  192. package/server/service/checklist-type/checklist-type-type.ts +26 -0
  193. package/server/service/checklist-type/checklist-type.ts +64 -0
  194. package/server/service/checklist-type/index.ts +6 -0
  195. package/server/service/index.ts +59 -23
  196. package/server/service/issue/issue.ts +1 -6
  197. package/server/service/supervisor/supervisor.ts +1 -6
  198. package/things-factory.config.js +11 -7
  199. package/client/pages/check-item/check-item-importer.ts +0 -94
  200. package/client/pages/check-item/check-item-list-page.ts +0 -340
  201. package/dist-client/pages/check-item/check-item-importer.d.ts +0 -10
  202. package/dist-client/pages/check-item/check-item-importer.js +0 -101
  203. package/dist-client/pages/check-item/check-item-importer.js.map +0 -1
  204. package/dist-client/pages/check-item/check-item-list-page.js +0 -323
  205. package/dist-client/pages/check-item/check-item-list-page.js.map +0 -1
  206. package/dist-server/service/check-item/check-item-mutation.d.ts +0 -10
  207. package/dist-server/service/check-item/check-item-mutation.js +0 -168
  208. package/dist-server/service/check-item/check-item-mutation.js.map +0 -1
  209. package/dist-server/service/check-item/check-item-query.d.ts +0 -12
  210. package/dist-server/service/check-item/check-item-query.js +0 -97
  211. package/dist-server/service/check-item/check-item-query.js.map +0 -1
  212. package/dist-server/service/check-item/check-item-type.d.ts +0 -23
  213. package/dist-server/service/check-item/check-item-type.js +0 -86
  214. package/dist-server/service/check-item/check-item-type.js.map +0 -1
  215. package/dist-server/service/check-item/check-item.d.ts +0 -28
  216. package/dist-server/service/check-item/check-item.js +0 -117
  217. package/dist-server/service/check-item/check-item.js.map +0 -1
  218. package/dist-server/service/check-item/index.d.ts +0 -6
  219. package/dist-server/service/check-item/index.js +0 -10
  220. package/dist-server/service/check-item/index.js.map +0 -1
  221. package/server/service/check-item/check-item-mutation.ts +0 -198
  222. package/server/service/check-item/check-item-query.ts +0 -62
  223. package/server/service/check-item/check-item.ts +0 -111
  224. package/server/service/check-item/index.ts +0 -7
@@ -0,0 +1,187 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@operato/data-grist';
4
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
5
+ import { PageView } from '@operato/shell';
6
+ import { css, html } from 'lit';
7
+ import { customElement, state } from 'lit/decorators.js';
8
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
9
+ import { client } from '@operato/graphql';
10
+ import gql from 'graphql-tag';
11
+ import './component/building-inspection-detail-header';
12
+ import '../checklist/checklist-view';
13
+ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist extends ScopedElementsMixin(PageView) {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.project = {};
17
+ this.buildingInspection = {};
18
+ }
19
+ get context() {
20
+ return {
21
+ title: '검측 관리 상세 - 검측 체크리스트'
22
+ };
23
+ }
24
+ render() {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26
+ return html `
27
+ <building-inspection-detail-header
28
+ .buildingInspectionId=${(_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.id}
29
+ .buildingLevelId=${(_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.buildingLevel) === null || _c === void 0 ? void 0 : _c.id}
30
+ .projectName=${this.project.name}
31
+ .buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
32
+ .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
33
+ ></building-inspection-detail-header>
34
+
35
+ <div body>
36
+ <checklist-view
37
+ .mode=${"EDITOR" /* ChecklistMode.EDITOR */}
38
+ status=${this.buildingInspection.status}
39
+ .checklist=${this.buildingInspection.checklist || {}}
40
+ ></checklist-view>
41
+
42
+ <div button-container>
43
+ <md-elevated-button @click=${this._onClickModifyChecklist}>
44
+ <md-icon slot="icon">assignment</md-icon>등록
45
+ </md-elevated-button>
46
+ <md-elevated-button> <md-icon slot="icon">assignment</md-icon>취소 </md-elevated-button>
47
+ </div>
48
+ </div>
49
+ `;
50
+ }
51
+ async pageUpdated(changes, lifecycle) {
52
+ if (this.active) {
53
+ const buildingInspectionId = lifecycle.resourceId || '';
54
+ await this.initBuildingInspection(buildingInspectionId);
55
+ }
56
+ }
57
+ async initBuildingInspection(buildingInspectionId = '') {
58
+ var _a, _b, _c, _d;
59
+ const response = await client.query({
60
+ query: gql `
61
+ query BuildingInspection($buildingInspectionId: String!) {
62
+ buildingInspection(id: $buildingInspectionId) {
63
+ id
64
+ status
65
+ requestDate
66
+ checklist {
67
+ id
68
+ name
69
+ constructionType
70
+ constructionDetailType
71
+ location
72
+ inspectionParts
73
+ documentNo
74
+ checklistItems {
75
+ id
76
+ name
77
+ sequence
78
+ mainType
79
+ detailType
80
+ inspctionCriteria
81
+ constructionConfirmStatus
82
+ supervisoryConfirmStatus
83
+ comment
84
+ }
85
+ }
86
+ buildingLevel {
87
+ id
88
+ floor
89
+ mainDrawing {
90
+ id
91
+ name
92
+ fullpath
93
+ }
94
+ mainDrawingImage
95
+ building {
96
+ id
97
+ name
98
+ buildingComplex {
99
+ id
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ `,
106
+ variables: {
107
+ buildingInspectionId
108
+ }
109
+ });
110
+ if (response.errors)
111
+ return;
112
+ this.buildingInspection = response.data.buildingInspection;
113
+ await this._getProjectByBuildingComplexId((_d = (_c = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.buildingLevel) === null || _b === void 0 ? void 0 : _b.building) === null || _c === void 0 ? void 0 : _c.buildingComplex) === null || _d === void 0 ? void 0 : _d.id);
114
+ }
115
+ async _getProjectByBuildingComplexId(buildingComplexId) {
116
+ const response = await client.query({
117
+ query: gql `
118
+ query ProjectByBuildingComplexId($buildingComplexId: String!) {
119
+ project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
120
+ id
121
+ name
122
+ }
123
+ }
124
+ `,
125
+ variables: {
126
+ buildingComplexId
127
+ }
128
+ });
129
+ if (response.errors)
130
+ return;
131
+ this.project = response.data.project;
132
+ }
133
+ _onClickModifyChecklist() {
134
+ console.log('checklist : ', this.buildingInspection.checklist);
135
+ }
136
+ };
137
+ BuildingInspectionDetailChecklist.styles = [
138
+ ScrollbarStyles,
139
+ CommonGristStyles,
140
+ css `
141
+ :host {
142
+ display: grid;
143
+ grid-template-rows: 75px auto;
144
+ color: #4e5055;
145
+
146
+ width: 100%;
147
+ background-color: #f7f7f7;
148
+ overflow-y: auto;
149
+
150
+ --grid-record-emphasized-background-color: red;
151
+ --grid-record-emphasized-color: yellow;
152
+ }
153
+
154
+ *[bold] {
155
+ font-weight: bold;
156
+ }
157
+
158
+ div[body] {
159
+ display: flex;
160
+ justify-content: center;
161
+ flex-direction: column;
162
+ align-items: center;
163
+
164
+ div[button-container] {
165
+ display: flex;
166
+ justify-content: flex-end;
167
+ width: 100%;
168
+ gap: 10px;
169
+ margin-right: 50px;
170
+ margin-bottom: 15px;
171
+ }
172
+ }
173
+ `
174
+ ];
175
+ __decorate([
176
+ state(),
177
+ __metadata("design:type", Object)
178
+ ], BuildingInspectionDetailChecklist.prototype, "project", void 0);
179
+ __decorate([
180
+ state(),
181
+ __metadata("design:type", Object)
182
+ ], BuildingInspectionDetailChecklist.prototype, "buildingInspection", void 0);
183
+ BuildingInspectionDetailChecklist = __decorate([
184
+ customElement('building-inspection-detail-checklist')
185
+ ], BuildingInspectionDetailChecklist);
186
+ export { BuildingInspectionDetailChecklist };
187
+ //# sourceMappingURL=building-inspection-detail-checklist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],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AAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;kEAAkB;AAC1B;IAAC,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CAsK7C;SAtKY,iCAAiC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n gap: 10px;\n margin-right: 50px;\n margin-bottom: 15px;\n }\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 체크리스트'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n ></checklist-view>\n\n <div button-container>\n <md-elevated-button @click=${this._onClickModifyChecklist}>\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </md-elevated-button>\n <md-elevated-button> <md-icon slot=\"icon\">assignment</md-icon>취소 </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n const buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n comment\n }\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onClickModifyChecklist() {\n console.log('checklist : ', this.buildingInspection.checklist)\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import '@material/web/icon/icon.js';
2
+ import { PageView } from '@operato/shell';
3
+ import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
4
+ import './component/building-inspection-detail-header';
5
+ import '@operato/image-marker/ox-image-marker.js';
6
+ declare const BuildingInspectionDetailDrawing_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
7
+ export declare class BuildingInspectionDetailDrawing extends BuildingInspectionDetailDrawing_base {
8
+ static styles: import("lit").CSSResult[];
9
+ project: any;
10
+ buildingInspection: any;
11
+ buildingInspectionId: string;
12
+ get context(): {
13
+ title: string;
14
+ };
15
+ render(): import("lit-html").TemplateResult<1>;
16
+ pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
17
+ initBuildingInspection(buildingInspectionId?: string): Promise<void>;
18
+ private _getProjectByBuildingComplexId;
19
+ private onClickMarkerSave;
20
+ }
21
+ export {};
@@ -0,0 +1,169 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
4
+ import { PageView } from '@operato/shell';
5
+ import { css, html } from 'lit';
6
+ import { customElement, state } from 'lit/decorators.js';
7
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
8
+ import { client } from '@operato/graphql';
9
+ import { notify } from '@operato/layout';
10
+ import gql from 'graphql-tag';
11
+ import './component/building-inspection-detail-header';
12
+ import '@operato/image-marker/ox-image-marker.js';
13
+ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.project = {};
17
+ this.buildingInspection = {};
18
+ this.buildingInspectionId = '';
19
+ }
20
+ get context() {
21
+ return {
22
+ title: '검측 관리 상세 - 검측 도면'
23
+ };
24
+ }
25
+ render() {
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
27
+ return html `
28
+ <building-inspection-detail-header
29
+ .buildingInspectionId=${(_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.id}
30
+ .buildingLevelId=${(_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.buildingLevel) === null || _c === void 0 ? void 0 : _c.id}
31
+ .projectName=${this.project.name}
32
+ .buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
33
+ .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
34
+ ></building-inspection-detail-header>
35
+
36
+ <div body>
37
+ <ox-image-marker
38
+ .imageUrl=${((_k = (_j = this.buildingInspection) === null || _j === void 0 ? void 0 : _j.buildingLevel) === null || _k === void 0 ? void 0 : _k.mainDrawingImage) || '/assets/images/img-drawing-default.png'}
39
+ .shapes=${JSON.parse(((_l = this.buildingInspection) === null || _l === void 0 ? void 0 : _l.drawingMarker) || [])}
40
+ @shapes-changed=${this.onClickMarkerSave}
41
+ ></ox-image-marker>
42
+ </div>
43
+ `;
44
+ }
45
+ async pageUpdated(changes, lifecycle) {
46
+ if (this.active) {
47
+ this.buildingInspectionId = lifecycle.resourceId || '';
48
+ await this.initBuildingInspection(this.buildingInspectionId);
49
+ }
50
+ }
51
+ async initBuildingInspection(buildingInspectionId = '') {
52
+ var _a, _b, _c, _d;
53
+ const response = await client.query({
54
+ query: gql `
55
+ query BuildingInspection($buildingInspectionId: String!) {
56
+ buildingInspection(id: $buildingInspectionId) {
57
+ id
58
+ status
59
+ requestDate
60
+ drawingMarker
61
+ buildingLevel {
62
+ id
63
+ floor
64
+ mainDrawing {
65
+ id
66
+ name
67
+ fullpath
68
+ }
69
+ mainDrawingImage
70
+ building {
71
+ id
72
+ name
73
+ buildingComplex {
74
+ id
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ `,
81
+ variables: {
82
+ buildingInspectionId
83
+ }
84
+ });
85
+ if (response.errors)
86
+ return;
87
+ this.buildingInspection = response.data.buildingInspection;
88
+ await this._getProjectByBuildingComplexId((_d = (_c = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.buildingLevel) === null || _b === void 0 ? void 0 : _b.building) === null || _c === void 0 ? void 0 : _c.buildingComplex) === null || _d === void 0 ? void 0 : _d.id);
89
+ }
90
+ async _getProjectByBuildingComplexId(buildingComplexId) {
91
+ const response = await client.query({
92
+ query: gql `
93
+ query ProjectByBuildingComplexId($buildingComplexId: String!) {
94
+ project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
95
+ id
96
+ name
97
+ }
98
+ }
99
+ `,
100
+ variables: {
101
+ buildingComplexId
102
+ }
103
+ });
104
+ if (response.errors)
105
+ return;
106
+ this.project = response.data.project;
107
+ }
108
+ async onClickMarkerSave(e) {
109
+ const response = await client.query({
110
+ query: gql `
111
+ mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {
112
+ updateBuildingInspection(patch: $patch) {
113
+ id
114
+ drawingMarker
115
+ }
116
+ }
117
+ `,
118
+ variables: {
119
+ patch: {
120
+ id: this.buildingInspectionId,
121
+ drawingMarker: JSON.stringify(e.detail)
122
+ }
123
+ }
124
+ });
125
+ if (response.errors)
126
+ return;
127
+ notify({ message: '저장되었습니다.' });
128
+ }
129
+ };
130
+ BuildingInspectionDetailDrawing.styles = [
131
+ ScrollbarStyles,
132
+ CommonGristStyles,
133
+ css `
134
+ :host {
135
+ display: grid;
136
+ grid-template-rows: 75px auto;
137
+ color: #4e5055;
138
+
139
+ width: 100%;
140
+ background-color: #f7f7f7;
141
+ overflow-y: auto;
142
+
143
+ --grid-record-emphasized-background-color: red;
144
+ --grid-record-emphasized-color: yellow;
145
+ }
146
+
147
+ div[body] {
148
+ display: flex;
149
+ justify-content: center;
150
+ }
151
+ `
152
+ ];
153
+ __decorate([
154
+ state(),
155
+ __metadata("design:type", Object)
156
+ ], BuildingInspectionDetailDrawing.prototype, "project", void 0);
157
+ __decorate([
158
+ state(),
159
+ __metadata("design:type", Object)
160
+ ], BuildingInspectionDetailDrawing.prototype, "buildingInspection", void 0);
161
+ __decorate([
162
+ state(),
163
+ __metadata("design:type", String)
164
+ ], BuildingInspectionDetailDrawing.prototype, "buildingInspectionId", void 0);
165
+ BuildingInspectionDetailDrawing = __decorate([
166
+ customElement('building-inspection-detail-drawing')
167
+ ], BuildingInspectionDetailDrawing);
168
+ export { BuildingInspectionDetailDrawing };
169
+ //# sourceMappingURL=building-inspection-detail-drawing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"building-inspection-detail-drawing.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-drawing.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,+CAA+C,CAAA;AACtD,OAAO,0CAA0C,CAAA;AAG1C,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAA3E;;QAyBI,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;AA3B/B,+BAA+B;IAD3C,aAAa,CAAC,oCAAoC,CAAC;GACvC,+BAA+B,CAiJ3C;SAjJY,+BAA+B","sourcesContent":["import '@material/web/icon/icon.js'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport './component/building-inspection-detail-header'\nimport '@operato/image-marker/ox-image-marker.js'\n\n@customElement('building-inspection-detail-drawing')\nexport class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <ox-image-marker\n .imageUrl=${this.buildingInspection?.buildingLevel?.mainDrawingImage || '/assets/images/img-drawing-default.png'}\n .shapes=${JSON.parse(this.buildingInspection?.drawingMarker || [])}\n @shapes-changed=${this.onClickMarkerSave}\n ></ox-image-marker>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n drawingMarker\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private async onClickMarkerSave(e) {\n const response = await client.query({\n query: gql`\n mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {\n updateBuildingInspection(patch: $patch) {\n id\n drawingMarker\n }\n }\n `,\n variables: {\n patch: {\n id: this.buildingInspectionId,\n drawingMarker: JSON.stringify(e.detail)\n }\n }\n })\n\n if (response.errors) return\n\n notify({ message: '저장되었습니다.' })\n }\n}\n"]}
@@ -0,0 +1,67 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@operato/data-grist';
3
+ import { PageView } from '@operato/shell';
4
+ import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
5
+ import { FetchOption } from '@operato/data-grist';
6
+ import './inspection-create-popup';
7
+ import '@operato/event-view/ox-event-view.js';
8
+ export declare enum ChecklistTypeMainType {
9
+ BASIC = "10",
10
+ NON_BASIC = "20"
11
+ }
12
+ export declare const CHECKLIST_MAIN_TYPE_LIST: {
13
+ 10: string;
14
+ 20: string;
15
+ };
16
+ export declare enum BuildingInspectionStatus {
17
+ WAIT = "WAIT",
18
+ REQUEST = "REQUEST",
19
+ PASS = "PASS",
20
+ FAIL = "FAIL"
21
+ }
22
+ export declare const BUILDING_INSPECTION_STATUS: {
23
+ WAIT: string;
24
+ REQUEST: string;
25
+ PASS: string;
26
+ FAIL: string;
27
+ };
28
+ declare const BuildingInspectionList_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
29
+ export declare class BuildingInspectionList extends BuildingInspectionList_base {
30
+ static styles: import("lit").CSSResult[];
31
+ private defaultProject;
32
+ private gristConfig;
33
+ buildingLevelId: string;
34
+ project: any;
35
+ location: string;
36
+ building: any;
37
+ drawingImage: string;
38
+ buildingInspectionSummary: any;
39
+ private grist;
40
+ private eventView;
41
+ get context(): {
42
+ title: string;
43
+ actions: {
44
+ icon: string;
45
+ emphasis: {
46
+ raised: boolean;
47
+ outlined: boolean;
48
+ dense: boolean;
49
+ danger: boolean;
50
+ };
51
+ title: string;
52
+ action: () => void;
53
+ }[];
54
+ };
55
+ render(): import("lit-html").TemplateResult<1>;
56
+ pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
57
+ initProject(buildingLevelId?: string): Promise<void>;
58
+ pageInitialized(lifecycle: any): Promise<void>;
59
+ fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
60
+ total: any;
61
+ records: any;
62
+ } | undefined>;
63
+ private _deleteChecklistType;
64
+ private _openCreateInspection;
65
+ private _formatDate;
66
+ }
67
+ export {};