@dssp/supervision 1.0.0-alpha.24 → 1.0.0-alpha.26

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 (70) hide show
  1. package/dist-client/graphql/building-inspection.js +28 -0
  2. package/dist-client/graphql/building-inspection.js.map +1 -1
  3. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +9 -0
  4. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +114 -4
  5. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +6 -0
  7. package/dist-client/pages/building-inspection/building-inspection-list.js +47 -8
  8. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  9. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  10. package/dist-client/pages/building-inspection/component/image-preview-popup.js +351 -0
  11. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  12. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +20 -0
  13. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +436 -0
  14. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  15. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +27 -0
  16. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +453 -0
  17. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  18. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.d.ts +21 -0
  19. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js +327 -0
  20. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js.map +1 -0
  21. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  22. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +401 -0
  23. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  24. package/dist-client/pages/building-inspection/component/photo-album-popup.d.ts +41 -0
  25. package/dist-client/pages/building-inspection/component/photo-album-popup.js +406 -0
  26. package/dist-client/pages/building-inspection/component/photo-album-popup.js.map +1 -0
  27. package/dist-client/pages/building-inspection/inspection-create-popup.js +17 -5
  28. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  29. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +1 -0
  30. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +47 -3
  31. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
  32. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +8 -2
  33. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  34. package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
  35. package/dist-client/pages/checklist/attachment-list-popup.js +244 -68
  36. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
  37. package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
  38. package/dist-client/pages/checklist/checklist-view.js +64 -14
  39. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  40. package/dist-client/pages/checklist/file-preview-popup.js +0 -1
  41. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
  42. package/dist-client/pages/checklist/inspection-tab-popup.js +3 -1
  43. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -1
  44. package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
  45. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  46. package/dist-client/route.d.ts +1 -1
  47. package/dist-client/tsconfig.tsbuildinfo +1 -1
  48. package/dist-server/service/building-inspection/building-inspection-history.d.ts +1 -0
  49. package/dist-server/service/building-inspection/building-inspection-history.js +5 -0
  50. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
  51. package/dist-server/service/building-inspection/building-inspection-mutation.js +48 -21
  52. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  53. package/dist-server/service/building-inspection/building-inspection-type.d.ts +6 -0
  54. package/dist-server/service/building-inspection/building-inspection-type.js +21 -0
  55. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  56. package/dist-server/service/building-inspection/building-inspection.js +1 -1
  57. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  58. package/dist-server/service/building-inspection/index.d.ts +1 -1
  59. package/dist-server/service/checklist/checklist-query.d.ts +6 -0
  60. package/dist-server/service/checklist/checklist-query.js +63 -0
  61. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  62. package/dist-server/service/checklist/checklist.d.ts +20 -0
  63. package/dist-server/service/checklist/checklist.js +62 -1
  64. package/dist-server/service/checklist/checklist.js.map +1 -1
  65. package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
  66. package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
  67. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
  68. package/dist-server/service/index.d.ts +1 -1
  69. package/dist-server/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +2 -2
@@ -10,6 +10,7 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
10
10
  id
11
11
  status
12
12
  requestDate
13
+ memo
13
14
  checklist {
14
15
  id
15
16
  name
@@ -18,12 +19,35 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
18
19
  location
19
20
  inspectionParts
20
21
  documentNo
22
+ inspectionRequestDocumentNo
23
+ inspectionResultDocumentNo
21
24
  constructionInspectionDate
22
25
  supervisorInspectionDate
23
26
  overallConstructorSignature
24
27
  taskConstructorSignature
25
28
  overallSupervisorySignature
26
29
  taskSupervisorySignature
30
+ nameListAttachment {
31
+ id
32
+ name
33
+ fullpath
34
+ }
35
+ taskConstructor {
36
+ id
37
+ name
38
+ }
39
+ overallConstructor {
40
+ id
41
+ name
42
+ }
43
+ taskSupervisory {
44
+ id
45
+ name
46
+ }
47
+ overallSupervisory {
48
+ id
49
+ name
50
+ }
27
51
 
28
52
  checklistItems {
29
53
  id
@@ -41,6 +65,8 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
41
65
 
42
66
  buildingLevel {
43
67
  id
68
+ floor
69
+
44
70
  building {
45
71
  id
46
72
  buildingComplex {
@@ -49,6 +75,8 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
49
75
  taskConstructorEmails
50
76
  overallSupervisoryEmails
51
77
  taskSupervisoryEmails
78
+ supervisoryCompany
79
+ constructionCompany
52
80
  }
53
81
  }
54
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkDT;QACD,SAAS,EAAE;YACT,oBAAoB;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;AACzC,CAAC","sourcesContent":["import { client } from '@operato/graphql'\nimport { gql } from '@apollo/client'\n\nexport async function getBuildingInspectionForChecklist(buildingInspectionId: string = '') {\n if (!buildingInspectionId) return null\n\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 constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n checklistItemCommentCount\n checklistItemAttachmentCount\n }\n }\n\n buildingLevel {\n id\n building {\n id\n buildingComplex {\n id\n overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return null\n\n return response.data.buildingInspection\n}\n"]}
1
+ {"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8ET;QACD,SAAS,EAAE;YACT,oBAAoB;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;AACzC,CAAC","sourcesContent":["import { client } from '@operato/graphql'\nimport { gql } from '@apollo/client'\n\nexport async function getBuildingInspectionForChecklist(buildingInspectionId: string = '') {\n if (!buildingInspectionId) return null\n\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 memo\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n inspectionRequestDocumentNo\n inspectionResultDocumentNo\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n nameListAttachment {\n id\n name\n fullpath\n }\n taskConstructor {\n id\n name\n }\n overallConstructor {\n id\n name\n }\n taskSupervisory {\n id\n name\n }\n overallSupervisory {\n id\n name\n }\n\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n checklistItemCommentCount\n checklistItemAttachmentCount\n }\n }\n\n buildingLevel {\n id\n floor\n\n building {\n id\n buildingComplex {\n id\n overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\n supervisoryCompany\n constructionCompany\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return null\n\n return response.data.buildingInspection\n}\n"]}
@@ -3,6 +3,8 @@ import '@operato/data-grist';
3
3
  import { PageView } from '@operato/shell';
4
4
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
5
5
  import './component/building-inspection-detail-header';
6
+ import './component/inspection-document/inspection-request-document';
7
+ import './component/inspection-document/inspection-result-notification';
6
8
  import '../checklist/checklist-view';
7
9
  export declare class BuildingInspectionDetailChecklist extends PageView {
8
10
  static styles: import("lit").CSSResult[];
@@ -17,4 +19,11 @@ export declare class BuildingInspectionDetailChecklist extends PageView {
17
19
  private _getProjectByBuildingComplexId;
18
20
  private _onClickModifyChecklist;
19
21
  private validateChecklist;
22
+ private _showInspectionRequestDocument;
23
+ private _showInspectionResultNotification;
24
+ private _onInspectionMemoChange;
25
+ private _onInspectionResultChange;
26
+ private _onInspectionTypeChange;
27
+ private _onInstructionsChange;
28
+ private _uploadNameListFile;
20
29
  }
@@ -7,13 +7,17 @@ import { css, html } from 'lit';
7
7
  import { customElement, state } from 'lit/decorators.js';
8
8
  import { keyed } from 'lit/directives/keyed.js';
9
9
  import { client } from '@operato/graphql';
10
- import { notify } from '@operato/layout';
10
+ import { notify, openPopup } from '@operato/layout';
11
+ import { store } from '@operato/shell';
11
12
  import gql from 'graphql-tag';
12
13
  import { verifyBiometric } from '@things-factory/auth-base/dist-client';
13
14
  import './component/building-inspection-detail-header';
15
+ import './component/inspection-document/inspection-request-document';
16
+ import './component/inspection-document/inspection-result-notification';
14
17
  import '../checklist/checklist-view';
15
18
  import { BuildingInspectionStatus } from './building-inspection-list';
16
19
  import { getBuildingInspectionForChecklist } from '../../graphql/building-inspection';
20
+ import { InspectionMode } from './component/inspection-document/inspection-request-document';
17
21
  let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist extends PageView {
18
22
  constructor() {
19
23
  super(...arguments);
@@ -43,6 +47,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
43
47
  status=${this.buildingInspection.status}
44
48
  .checklist=${this.buildingInspection.checklist || {}}
45
49
  .buildingComplex=${((_l = (_k = (_j = this.buildingInspection) === null || _j === void 0 ? void 0 : _j.buildingLevel) === null || _k === void 0 ? void 0 : _k.building) === null || _l === void 0 ? void 0 : _l.buildingComplex) || {}}
50
+ .projectType=${this.project.projectType}
46
51
  ></checklist-view>
47
52
  `)}
48
53
 
@@ -61,6 +66,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
61
66
  if (this.active) {
62
67
  const buildingInspectionId = lifecycle.resourceId || '';
63
68
  await this.initBuildingInspection(buildingInspectionId);
69
+ this._showInspectionResultNotification(this.buildingInspection.checklist);
64
70
  }
65
71
  }
66
72
  async initBuildingInspection(buildingInspectionId = '') {
@@ -75,6 +81,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
75
81
  project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
76
82
  id
77
83
  name
84
+ projectType
78
85
  }
79
86
  }
80
87
  `,
@@ -90,7 +97,18 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
90
97
  this.validateChecklist(this.buildingInspection.checklist);
91
98
  }
92
99
  async validateChecklist(checklist) {
93
- var _a, _b;
100
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
101
+ // 사용자 권한 체크
102
+ const email = (_b = (_a = store.getState().auth) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.email;
103
+ const isOverallConstructor = ((_g = (_f = (_e = (_d = (_c = this.buildingInspection) === null || _c === void 0 ? void 0 : _c.buildingLevel) === null || _d === void 0 ? void 0 : _d.building) === null || _e === void 0 ? void 0 : _e.buildingComplex) === null || _f === void 0 ? void 0 : _f.overallConstructorEmails) === null || _g === void 0 ? void 0 : _g.includes(email)) || false;
104
+ const isOverallSupervisory = ((_m = (_l = (_k = (_j = (_h = this.buildingInspection) === null || _h === void 0 ? void 0 : _h.buildingLevel) === null || _j === void 0 ? void 0 : _j.building) === null || _k === void 0 ? void 0 : _k.buildingComplex) === null || _l === void 0 ? void 0 : _l.overallSupervisoryEmails) === null || _m === void 0 ? void 0 : _m.includes(email)) || false;
105
+ // 권한에 따라 적절한 문서 표시
106
+ if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {
107
+ await this._showInspectionRequestDocument(checklist);
108
+ }
109
+ else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {
110
+ await this._showInspectionResultNotification(checklist);
111
+ }
94
112
  try {
95
113
  const result = await verifyBiometric();
96
114
  if (result.verified) {
@@ -105,6 +123,10 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
105
123
  notify({ message: 'Error during biometric verification:' + error });
106
124
  return;
107
125
  }
126
+ // 실명부 파일 업로드 처리 (새로 업로드된 경우만)
127
+ if (checklist.isNameListAttachmentUploaded) {
128
+ await this._uploadNameListFile(checklist);
129
+ }
108
130
  const response = await client.mutate({
109
131
  mutation: gql `
110
132
  mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {
@@ -114,12 +136,16 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
114
136
  variables: {
115
137
  buildingInspection: {
116
138
  id: this.buildingInspection.id,
139
+ memo: this.buildingInspection.memo,
117
140
  checklist: {
118
141
  id: checklist.id,
119
142
  overallConstructorSignature: checklist.overallConstructorSignature,
120
143
  taskConstructorSignature: checklist.taskConstructorSignature,
121
144
  overallSupervisorySignature: checklist.overallSupervisorySignature,
122
- taskSupervisorySignature: checklist.taskSupervisorySignature
145
+ taskSupervisorySignature: checklist.taskSupervisorySignature,
146
+ inspectionResultMemo: checklist.inspectionResultMemo,
147
+ inspectionResultStatus: checklist.inspectionResultStatus,
148
+ inspectionResultType: checklist.inspectionResultType
123
149
  },
124
150
  checklistItem: checklist.checklistItems.map(item => ({
125
151
  id: item.id,
@@ -134,7 +160,91 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
134
160
  this.initBuildingInspection(this.buildingInspection.id);
135
161
  }
136
162
  else {
137
- notify({ message: ((_b = (_a = response.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
163
+ notify({ message: ((_p = (_o = response.errors) === null || _o === void 0 ? void 0 : _o[0]) === null || _p === void 0 ? void 0 : _p.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
164
+ }
165
+ }
166
+ // resolve 호출 전까지 싱크를 위해 Promise 사용
167
+ async _showInspectionRequestDocument(checklist) {
168
+ return new Promise(resolve => {
169
+ openPopup(html `
170
+ <inspection-request-document
171
+ .checklist=${checklist}
172
+ .buildingInspection=${this.buildingInspection}
173
+ .mode=${InspectionMode.EDIT}
174
+ @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}
175
+ @name-list-file-selected=${(e) => {
176
+ // checklist에 선택된 파일 저장
177
+ checklist.nameListAttachment = e.detail.file;
178
+ }}
179
+ @popup-close=${() => resolve()}
180
+ ></inspection-request-document>
181
+ `, { backdrop: true, size: 'large', title: '검측요청결과 통보내용' });
182
+ });
183
+ }
184
+ async _showInspectionResultNotification(checklist) {
185
+ return new Promise(resolve => {
186
+ openPopup(html `
187
+ <inspection-result-notification
188
+ .checklist=${checklist}
189
+ .buildingInspection=${this.buildingInspection}
190
+ .project=${this.project}
191
+ @inspection-result-change=${this._onInspectionResultChange.bind(this)}
192
+ @inspection-type-change=${this._onInspectionTypeChange.bind(this)}
193
+ @instructions-change=${this._onInstructionsChange.bind(this)}
194
+ @popup-close=${() => resolve()}
195
+ ></inspection-result-notification>
196
+ `, { backdrop: true, size: 'large', title: '검측 결과 통보' });
197
+ });
198
+ }
199
+ _onInspectionMemoChange(e) {
200
+ const { memo } = e.detail;
201
+ this.buildingInspection = Object.assign(Object.assign({}, this.buildingInspection), { memo });
202
+ }
203
+ _onInspectionResultChange(e) {
204
+ const { inspectionResultStatus } = e.detail;
205
+ // checklist 업데이트
206
+ this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultStatus });
207
+ this.requestUpdate();
208
+ }
209
+ _onInspectionTypeChange(e) {
210
+ const { inspectionResultType } = e.detail;
211
+ // checklist 업데이트
212
+ this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultType });
213
+ this.requestUpdate();
214
+ }
215
+ _onInstructionsChange(e) {
216
+ const { inspectionResultMemo } = e.detail;
217
+ // checklist 업데이트
218
+ this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultMemo });
219
+ this.requestUpdate();
220
+ }
221
+ // 실명부 파일 업로드
222
+ async _uploadNameListFile(checklist) {
223
+ var _a;
224
+ if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {
225
+ return;
226
+ }
227
+ const response = await client.mutate({
228
+ mutation: gql `
229
+ mutation CreateAttachments($attachments: [NewAttachment!]!) {
230
+ createAttachments(attachments: $attachments) {
231
+ id
232
+ }
233
+ }
234
+ `,
235
+ variables: {
236
+ attachments: [
237
+ {
238
+ file: checklist.nameListAttachment,
239
+ refBy: checklist.id,
240
+ refType: 'Checklist_NameList'
241
+ }
242
+ ]
243
+ },
244
+ context: { hasUpload: true }
245
+ });
246
+ if (response.errors) {
247
+ throw new Error(((_a = response.errors[0]) === null || _a === void 0 ? void 0 : _a.message) || '실명부 파일 업로드에 실패했습니다.');
138
248
  }
139
249
  }
140
250
  };
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAA;AAG9E,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,QAAQ;IAAxD;;QA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on.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\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 ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </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 this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\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 this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6DAA6D,CAAA;AACpE,OAAO,gEAAgE,CAAA;AACvE,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B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F,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,CAAC,CAAA;QACvE,CAAC;IACH,CAAC;;AA9SM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,AArCY,CAqCZ;AAEQ;IAAR,KAAK,EAAE;;kEAAkB;AACjB;IAAR,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CAgT7C","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 { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify, openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport './component/inspection-document/inspection-request-document'\nimport './component/inspection-document/inspection-result-notification'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\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 ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .projectType=${this.project.projectType}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </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 this._showInspectionResultNotification(this.buildingInspection.checklist)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\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 projectType\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 this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n // 사용자 권한 체크\n const email = (store.getState() as any).auth?.user?.email\n const isOverallConstructor =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallConstructorEmails?.includes(email) || false\n const isOverallSupervisory =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallSupervisoryEmails?.includes(email) || false\n\n // 권한에 따라 적절한 문서 표시\n if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {\n await this._showInspectionRequestDocument(checklist)\n } else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {\n await this._showInspectionResultNotification(checklist)\n }\n\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n // 실명부 파일 업로드 처리 (새로 업로드된 경우만)\n if (checklist.isNameListAttachmentUploaded) {\n await this._uploadNameListFile(checklist)\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n memo: this.buildingInspection.memo,\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature,\n inspectionResultMemo: checklist.inspectionResultMemo,\n inspectionResultStatus: checklist.inspectionResultStatus,\n inspectionResultType: checklist.inspectionResultType\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // resolve 호출 전까지 싱크를 위해 Promise 사용\n private async _showInspectionRequestDocument(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-request-document\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .mode=${InspectionMode.EDIT}\n @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}\n @name-list-file-selected=${(e: CustomEvent) => {\n // checklist에 선택된 파일 저장\n checklist.nameListAttachment = e.detail.file\n }}\n @popup-close=${() => resolve()}\n ></inspection-request-document>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n })\n }\n\n private async _showInspectionResultNotification(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-result-notification\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .project=${this.project}\n @inspection-result-change=${this._onInspectionResultChange.bind(this)}\n @inspection-type-change=${this._onInspectionTypeChange.bind(this)}\n @instructions-change=${this._onInstructionsChange.bind(this)}\n @popup-close=${() => resolve()}\n ></inspection-result-notification>\n `,\n { backdrop: true, size: 'large', title: '검측 결과 통보' }\n )\n })\n }\n\n private _onInspectionMemoChange(e: CustomEvent) {\n const { memo } = e.detail\n this.buildingInspection = {\n ...this.buildingInspection,\n memo\n }\n }\n\n private _onInspectionResultChange(e: CustomEvent) {\n const { inspectionResultStatus } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultStatus\n }\n this.requestUpdate()\n }\n\n private _onInspectionTypeChange(e: CustomEvent) {\n const { inspectionResultType } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultType\n }\n this.requestUpdate()\n }\n\n private _onInstructionsChange(e: CustomEvent) {\n const { inspectionResultMemo } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultMemo\n }\n this.requestUpdate()\n }\n\n // 실명부 파일 업로드\n private async _uploadNameListFile(checklist: any) {\n if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateAttachments($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [\n {\n file: checklist.nameListAttachment,\n refBy: checklist.id,\n refType: 'Checklist_NameList'\n }\n ]\n },\n context: { hasUpload: true }\n })\n\n if (response.errors) {\n throw new Error(response.errors[0]?.message || '실명부 파일 업로드에 실패했습니다.')\n }\n }\n}\n"]}
@@ -5,6 +5,9 @@ import { TemplateResult } from 'lit';
5
5
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
6
6
  import { FetchOption } from '@operato/data-grist';
7
7
  import './inspection-create-popup';
8
+ import './component/inspection-document/photo-album-popup';
9
+ import './component/inspection-document/inspection-request-document';
10
+ import './component/image-preview-popup';
8
11
  import '@operato/event-view/ox-event-view.js';
9
12
  import { EventProvider } from '@operato/event-view';
10
13
  export declare enum ChecklistTypeMainType {
@@ -71,5 +74,8 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
71
74
  private _openCreateInspection;
72
75
  private _formatDate;
73
76
  private _openChecklistPopup;
77
+ _openPhotoAlbumPopup(checklistId: string): Promise<void>;
78
+ _openInspectionRequestDocument(buildingInspectionId: string): Promise<void>;
79
+ private _showNameListPreview;
74
80
  }
75
81
  export {};
@@ -12,9 +12,13 @@ import { notify } from '@operato/layout';
12
12
  import gql from 'graphql-tag';
13
13
  import { openPopup } from '@operato/layout';
14
14
  import './inspection-create-popup';
15
+ import './component/inspection-document/photo-album-popup';
16
+ import './component/inspection-document/inspection-request-document';
17
+ import './component/image-preview-popup';
15
18
  import '@operato/event-view/ox-event-view.js';
16
19
  import { InspectionEventProvider } from './component/inspection-event-provider';
17
20
  import { getBuildingInspectionForChecklist } from '../../graphql/building-inspection';
21
+ import { InspectionMode } from './component/inspection-document/inspection-request-document';
18
22
  export var ChecklistTypeMainType;
19
23
  (function (ChecklistTypeMainType) {
20
24
  ChecklistTypeMainType["BASIC"] = "10";
@@ -148,6 +152,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
148
152
  projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {
149
153
  id
150
154
  name
155
+ projectType
151
156
  mainPhoto {
152
157
  fullpath
153
158
  }
@@ -263,7 +268,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
263
268
  width: 100,
264
269
  handlers: {
265
270
  click: (columns, data, column, record, rowIndex) => {
266
- console.log('record : ', record);
271
+ this._openInspectionRequestDocument(record.id);
267
272
  }
268
273
  }
269
274
  },
@@ -287,7 +292,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
287
292
  width: 60,
288
293
  handlers: {
289
294
  click: (columns, data, column, record, rowIndex) => {
290
- console.log('record : ', record);
295
+ this._openPhotoAlbumPopup(record.checklistId);
291
296
  }
292
297
  }
293
298
  },
@@ -299,7 +304,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
299
304
  width: 50,
300
305
  handlers: {
301
306
  click: (columns, data, column, record, rowIndex) => {
302
- console.log('record : ', record);
307
+ this._showNameListPreview(record);
303
308
  }
304
309
  }
305
310
  }
@@ -332,6 +337,11 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
332
337
  constructionDetailType
333
338
  location
334
339
  inspectionParts
340
+ nameListAttachment {
341
+ id
342
+ name
343
+ fullpath
344
+ }
335
345
  }
336
346
  }
337
347
  total
@@ -402,11 +412,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
402
412
  .selectedBuildingLevelId=${this.buildingLevelId}
403
413
  @requestRefresh="${() => this.grist.fetch()}"
404
414
  ></inspection-create-popup>
405
- `, {
406
- backdrop: true,
407
- size: 'large',
408
- title: '검측 요청서 등록'
409
- });
415
+ `, { backdrop: true, size: 'large', title: '검측 등록' });
410
416
  }
411
417
  _formatDate(date) {
412
418
  return date
@@ -428,10 +434,43 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
428
434
  .checklist=${buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.checklist}
429
435
  .buildingComplex=${((_b = (_a = buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.buildingLevel) === null || _a === void 0 ? void 0 : _a.building) === null || _b === void 0 ? void 0 : _b.buildingComplex) || {}}
430
436
  .status=${buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.status}
437
+ .projectType=${this.project.projectType}
431
438
  ></checklist-view>
432
439
  </div>
433
440
  `, { backdrop: true, size: 'large', title: '체크 리스트 미리보기' });
434
441
  }
442
+ async _openPhotoAlbumPopup(checklistId) {
443
+ openPopup(html ` <photo-album-popup .checklistId=${checklistId}></photo-album-popup> `, {
444
+ backdrop: true,
445
+ size: 'large',
446
+ title: '사진대지'
447
+ });
448
+ }
449
+ async _openInspectionRequestDocument(buildingInspectionId) {
450
+ const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId);
451
+ openPopup(html `
452
+ <inspection-request-document
453
+ .checklist=${buildingInspection.checklist}
454
+ .buildingInspection=${buildingInspection}
455
+ .mode=${InspectionMode.VIEW}
456
+ ></inspection-request-document>
457
+ `, { backdrop: true, size: 'large', title: '검측요청결과 통보내용' });
458
+ }
459
+ // 실명부 미리보기
460
+ _showNameListPreview(record) {
461
+ const nameListAttachment = record.nameListAttachment;
462
+ if (!nameListAttachment) {
463
+ notify({ message: '실명부 파일이 없습니다.', level: 'info' });
464
+ return;
465
+ }
466
+ // 이미지 미리보기 팝업
467
+ openPopup(html `
468
+ <image-preview-popup
469
+ .images=${[{ fullpath: nameListAttachment.fullpath, name: nameListAttachment.name }]}
470
+ .currentIndex=${0}
471
+ ></image-preview-popup>
472
+ `, { backdrop: true, size: 'large', title: '실명부' });
473
+ }
435
474
  };
436
475
  BuildingInspectionList.styles = [
437
476
  ScrollbarStyles,