@dssp/project 1.0.0-alpha.8 → 1.0.0-alpha.80

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