@dssp/supervision 0.0.24 → 0.0.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.
- package/client/pages/building-inspection/building-inspection-detail-checklist.ts +5 -0
- package/client/pages/building-inspection/building-inspection-list.ts +31 -13
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +24 -5
- package/client/pages/checklist/checklist-view.ts +69 -27
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +6 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +5 -1
- package/dist-client/pages/building-inspection/building-inspection-list.js +31 -12
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +23 -5
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.js +73 -31
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.js +4 -1
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +36 -12
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.js +8 -8
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +2 -0
- package/dist-server/service/building-inspection/building-inspection.js +4 -2
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/building-inspection/building-inspection-history.ts +5 -1
- package/server/service/building-inspection/building-inspection-mutation.ts +37 -11
- package/server/service/building-inspection/building-inspection-query.ts +24 -8
- package/server/service/building-inspection/building-inspection-type.ts +2 -2
- package/server/service/building-inspection/building-inspection.ts +5 -2
|
@@ -86,6 +86,7 @@ export class BuildingInspectionDetailChecklist extends PageView {
|
|
|
86
86
|
.mode=${ChecklistMode.EDITOR}
|
|
87
87
|
status=${this.buildingInspection.status}
|
|
88
88
|
.checklist=${this.buildingInspection.checklist || {}}
|
|
89
|
+
.buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}
|
|
89
90
|
></checklist-view>
|
|
90
91
|
`
|
|
91
92
|
)}
|
|
@@ -157,6 +158,10 @@ export class BuildingInspectionDetailChecklist extends PageView {
|
|
|
157
158
|
name
|
|
158
159
|
buildingComplex {
|
|
159
160
|
id
|
|
161
|
+
overallConstructorEmails
|
|
162
|
+
taskConstructorEmails
|
|
163
|
+
overallSupervisoryEmails
|
|
164
|
+
taskSupervisoryEmails
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
167
|
}
|
|
@@ -28,13 +28,17 @@ export const CHECKLIST_MAIN_TYPE_LIST = {
|
|
|
28
28
|
|
|
29
29
|
export enum BuildingInspectionStatus {
|
|
30
30
|
WAIT = 'WAIT',
|
|
31
|
+
OVERALL_WAIT = 'OVERALL_WAIT',
|
|
31
32
|
REQUEST = 'REQUEST',
|
|
33
|
+
OVERALL_REQUEST = 'OVERALL_REQUEST',
|
|
32
34
|
PASS = 'PASS',
|
|
33
35
|
FAIL = 'FAIL'
|
|
34
36
|
}
|
|
35
|
-
export const
|
|
37
|
+
export const BUILDING_INSPECTION_STATUS_DISPLAY = {
|
|
36
38
|
[BuildingInspectionStatus.WAIT]: '검측 대기',
|
|
39
|
+
[BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',
|
|
37
40
|
[BuildingInspectionStatus.REQUEST]: '검측 요청',
|
|
41
|
+
[BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',
|
|
38
42
|
[BuildingInspectionStatus.PASS]: '합격',
|
|
39
43
|
[BuildingInspectionStatus.FAIL]: '불합격'
|
|
40
44
|
}
|
|
@@ -193,6 +197,7 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
193
197
|
display: flex;
|
|
194
198
|
flex-direction: column;
|
|
195
199
|
overflow: hidden;
|
|
200
|
+
min-height: 300px;
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
ox-grist {
|
|
@@ -259,17 +264,30 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
259
264
|
검측<br />현황
|
|
260
265
|
</span>
|
|
261
266
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
<span>
|
|
268
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</div>
|
|
269
|
+
<div bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>
|
|
270
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}
|
|
271
|
+
</div>
|
|
272
|
+
</span>
|
|
273
|
+
<span>
|
|
274
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</div>
|
|
275
|
+
<div bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>
|
|
276
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}
|
|
277
|
+
</div>
|
|
278
|
+
</span>
|
|
279
|
+
<span>
|
|
280
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</div>
|
|
281
|
+
<div bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>
|
|
282
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}
|
|
283
|
+
</div>
|
|
284
|
+
</span>
|
|
285
|
+
<span>
|
|
286
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</div>
|
|
287
|
+
<div bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>
|
|
288
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}
|
|
289
|
+
</div>
|
|
290
|
+
</span>
|
|
273
291
|
</div>
|
|
274
292
|
|
|
275
293
|
<ox-event-view
|
|
@@ -389,7 +407,7 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
389
407
|
name: 'status',
|
|
390
408
|
header: '검측 결과',
|
|
391
409
|
record: {
|
|
392
|
-
renderer: value =>
|
|
410
|
+
renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]
|
|
393
411
|
},
|
|
394
412
|
width: 120
|
|
395
413
|
},
|
|
@@ -68,23 +68,42 @@ class buildingInspectionDetailHeader extends LitElement {
|
|
|
68
68
|
@property({ type: String }) buildingLevelFloor: string = ''
|
|
69
69
|
|
|
70
70
|
render() {
|
|
71
|
+
const path = window.location.pathname
|
|
72
|
+
|
|
71
73
|
return html`
|
|
72
74
|
<div header>
|
|
73
75
|
<h2>${this.projectName || ''} ${this.buildingName || ''} ${this.buildingLevelFloor || ''}층</h2>
|
|
74
76
|
<div button-container>
|
|
75
|
-
<md-elevated-button
|
|
77
|
+
<md-elevated-button
|
|
78
|
+
?disabled=${path.includes('building-inspection-list/')}
|
|
79
|
+
href=${`building-inspection-list/${this.buildingLevelId}`}
|
|
80
|
+
>
|
|
76
81
|
<md-icon slot="icon">assignment</md-icon>검측 리스트
|
|
77
82
|
</md-elevated-button>
|
|
78
|
-
<md-elevated-button
|
|
83
|
+
<md-elevated-button
|
|
84
|
+
?disabled=${path.includes('building-inspection-detail-drawing/')}
|
|
85
|
+
href=${`building-inspection-detail-drawing/${this.buildingInspectionId}`}
|
|
86
|
+
>
|
|
79
87
|
<md-icon slot="icon">assignment</md-icon>검측도면
|
|
80
88
|
</md-elevated-button>
|
|
81
|
-
<md-elevated-button
|
|
89
|
+
<md-elevated-button
|
|
90
|
+
?disabled=${path.includes('building-inspection-detail-checklist/')}
|
|
91
|
+
href=${`building-inspection-detail-checklist/${this.buildingInspectionId}`}
|
|
92
|
+
>
|
|
82
93
|
<md-icon slot="icon">description</md-icon>검측 체크리스트
|
|
83
94
|
</md-elevated-button>
|
|
84
|
-
<md-elevated-button
|
|
95
|
+
<md-elevated-button
|
|
96
|
+
?disabled=${path.includes('building-inspection-detail-photo/')}
|
|
97
|
+
href=${`building-inspection-detail-photo/${this.buildingInspectionId}`}
|
|
98
|
+
disabled
|
|
99
|
+
>
|
|
85
100
|
<md-icon slot="icon">description</md-icon>사진촬영
|
|
86
101
|
</md-elevated-button>
|
|
87
|
-
<md-elevated-button
|
|
102
|
+
<md-elevated-button
|
|
103
|
+
?disabled=${path.includes('building-inspection-detail-history/')}
|
|
104
|
+
href=${`building-inspection-detail-history/${this.buildingInspectionId}`}
|
|
105
|
+
disabled
|
|
106
|
+
>
|
|
88
107
|
<md-icon slot="icon">description</md-icon>감리이력
|
|
89
108
|
</md-elevated-button>
|
|
90
109
|
</div>
|
|
@@ -5,9 +5,12 @@ import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
|
|
|
5
5
|
import {
|
|
6
6
|
CHECKLIST_MAIN_TYPE_LIST,
|
|
7
7
|
BuildingInspectionStatus,
|
|
8
|
-
|
|
8
|
+
BUILDING_INSPECTION_STATUS_DISPLAY
|
|
9
9
|
} from '../building-inspection/building-inspection-list'
|
|
10
10
|
import '@operato/input/ox-input-signature.js'
|
|
11
|
+
// import { BuildingComplex } from '@dssp/building-complex'
|
|
12
|
+
import { store } from '@operato/shell'
|
|
13
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
11
14
|
|
|
12
15
|
export const enum ChecklistMode {
|
|
13
16
|
VIEWER = 'VIEWER',
|
|
@@ -15,7 +18,7 @@ export const enum ChecklistMode {
|
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
@customElement('checklist-view')
|
|
18
|
-
class ChecklistView extends LitElement {
|
|
21
|
+
class ChecklistView extends connect(store)(LitElement) {
|
|
19
22
|
static styles = [
|
|
20
23
|
ButtonContainerStyles,
|
|
21
24
|
ScrollbarStyles,
|
|
@@ -167,12 +170,50 @@ class ChecklistView extends LitElement {
|
|
|
167
170
|
|
|
168
171
|
@property({ type: String }) mode: ChecklistMode = ChecklistMode.VIEWER
|
|
169
172
|
@property({ type: Object }) checklist: any = {}
|
|
173
|
+
@property({ type: Object }) buildingComplex = {
|
|
174
|
+
id: '',
|
|
175
|
+
taskConstructorEmails: [] as string[],
|
|
176
|
+
overallConstructorEmails: [] as string[],
|
|
177
|
+
taskSupervisoryEmails: [] as string[],
|
|
178
|
+
overallSupervisoryEmails: [] as string[]
|
|
179
|
+
}
|
|
170
180
|
@property({ type: String }) status: BuildingInspectionStatus = BuildingInspectionStatus.WAIT
|
|
171
181
|
|
|
172
182
|
render() {
|
|
173
183
|
const today = this._getDate(new Date())
|
|
174
|
-
|
|
175
|
-
|
|
184
|
+
|
|
185
|
+
// 시공자 스탭 여부
|
|
186
|
+
const isConstructorStep =
|
|
187
|
+
this.status == BuildingInspectionStatus.WAIT ||
|
|
188
|
+
this.status == BuildingInspectionStatus.OVERALL_WAIT ||
|
|
189
|
+
this.status == BuildingInspectionStatus.FAIL
|
|
190
|
+
|
|
191
|
+
// 감리자 스탭 여부
|
|
192
|
+
const isSupervisoryStep =
|
|
193
|
+
this.status == BuildingInspectionStatus.REQUEST || this.status == BuildingInspectionStatus.OVERALL_REQUEST
|
|
194
|
+
|
|
195
|
+
// 현재 스탭에 해당하는 계정인지 체크 (편집모드만)
|
|
196
|
+
let havePermissionByStatus: boolean = false
|
|
197
|
+
let isTaskConstructor: boolean = false
|
|
198
|
+
let isOverallConstructor: boolean = false
|
|
199
|
+
let isTaskSupervisory: boolean = false
|
|
200
|
+
let isOverallSupervisory: boolean = false
|
|
201
|
+
|
|
202
|
+
if (this.mode == ChecklistMode.EDITOR && this.status) {
|
|
203
|
+
const email = (store.getState() as any).auth?.user?.email
|
|
204
|
+
// 현재 유저가 "공종별 시공 관리자" 인지 체크
|
|
205
|
+
isTaskConstructor = this.buildingComplex.taskConstructorEmails?.includes(email) || false
|
|
206
|
+
// 현재 유저가 "총괄 시공 책임자" 인지 체크
|
|
207
|
+
isOverallConstructor = this.buildingComplex.overallConstructorEmails?.includes(email) || false
|
|
208
|
+
// 현재 유저가 "공종별 감리 책임자" 인지 체크
|
|
209
|
+
isTaskSupervisory = this.buildingComplex.taskSupervisoryEmails?.includes(email) || false
|
|
210
|
+
// 현재 유저가 "총괄 감리 책임자" 인지 체크
|
|
211
|
+
isOverallSupervisory = this.buildingComplex.overallSupervisoryEmails?.includes(email) || false
|
|
212
|
+
// 스탭이 시공자 스탭일때에 내가 시공자 권한이 있는지 체크
|
|
213
|
+
havePermissionByStatus = isConstructorStep
|
|
214
|
+
? isTaskConstructor || isOverallConstructor
|
|
215
|
+
: isTaskSupervisory || isOverallSupervisory
|
|
216
|
+
}
|
|
176
217
|
|
|
177
218
|
// 체크리스트 아이템 정렬
|
|
178
219
|
this.checklist?.checklistItems?.sort((a, b) => {
|
|
@@ -211,7 +252,7 @@ class ChecklistView extends LitElement {
|
|
|
211
252
|
<th>검측 부위</th>
|
|
212
253
|
<td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>
|
|
213
254
|
<th>검측 상태</th>
|
|
214
|
-
<td>${
|
|
255
|
+
<td>${BUILDING_INSPECTION_STATUS_DISPLAY[this.checklist?.buildingInspection?.status]}</td>
|
|
215
256
|
</tr>
|
|
216
257
|
</table>
|
|
217
258
|
|
|
@@ -253,7 +294,7 @@ class ChecklistView extends LitElement {
|
|
|
253
294
|
name=${'radio-construction-' + item.id}
|
|
254
295
|
value="T"
|
|
255
296
|
.checked=${item.constructionConfirmStatus === 'T'}
|
|
256
|
-
?disabled=${!isConstructorStep}
|
|
297
|
+
?disabled=${!isConstructorStep || !havePermissionByStatus}
|
|
257
298
|
@change=${this._onChangeConfirmStatus}
|
|
258
299
|
></md-radio>
|
|
259
300
|
</td>
|
|
@@ -264,7 +305,7 @@ class ChecklistView extends LitElement {
|
|
|
264
305
|
name=${'radio-construction-' + item.id}
|
|
265
306
|
value="F"
|
|
266
307
|
.checked=${item.constructionConfirmStatus === 'F'}
|
|
267
|
-
?disabled=${!isConstructorStep}
|
|
308
|
+
?disabled=${!isConstructorStep || !havePermissionByStatus}
|
|
268
309
|
@change=${this._onChangeConfirmStatus}
|
|
269
310
|
></md-radio>
|
|
270
311
|
</td>
|
|
@@ -275,7 +316,7 @@ class ChecklistView extends LitElement {
|
|
|
275
316
|
name=${'radio-supervisory-' + item.id}
|
|
276
317
|
value="T"
|
|
277
318
|
.checked=${item.supervisoryConfirmStatus === 'T'}
|
|
278
|
-
?disabled=${!isSupervisoryStep}
|
|
319
|
+
?disabled=${!isSupervisoryStep || !havePermissionByStatus}
|
|
279
320
|
@change=${this._onChangeConfirmStatus}
|
|
280
321
|
></md-radio>
|
|
281
322
|
</td>
|
|
@@ -286,7 +327,7 @@ class ChecklistView extends LitElement {
|
|
|
286
327
|
name=${'radio-supervisory-' + item.id}
|
|
287
328
|
value="F"
|
|
288
329
|
.checked=${item.supervisoryConfirmStatus === 'F'}
|
|
289
|
-
?disabled=${!isSupervisoryStep}
|
|
330
|
+
?disabled=${!isSupervisoryStep || !havePermissionByStatus}
|
|
290
331
|
@change=${this._onChangeConfirmStatus}
|
|
291
332
|
></md-radio>
|
|
292
333
|
</td>
|
|
@@ -300,61 +341,62 @@ class ChecklistView extends LitElement {
|
|
|
300
341
|
<table tail>
|
|
301
342
|
<tbody>
|
|
302
343
|
<tr first>
|
|
303
|
-
<th rowspan="2"
|
|
344
|
+
<th rowspan="2">시공자 점검일</th>
|
|
304
345
|
<td rowspan="2">
|
|
305
346
|
${this.mode == ChecklistMode.VIEWER ? today : this._getDate(this.checklist.constructionInspectionDate)}
|
|
306
347
|
</td>
|
|
307
|
-
<th
|
|
348
|
+
<th>공종별 시공 관리자</th>
|
|
308
349
|
<td>
|
|
309
350
|
<span sign-text>(인)</span>
|
|
310
351
|
<ox-input-signature
|
|
311
|
-
.value=${this.checklist.
|
|
312
|
-
name="
|
|
352
|
+
.value=${this.checklist.taskConstructorSignature}
|
|
353
|
+
name="taskConstructorSignature"
|
|
313
354
|
@change=${this._onChangeSignature}
|
|
314
|
-
?disabled=${
|
|
355
|
+
?disabled=${(this.status != BuildingInspectionStatus.WAIT && this.status != BuildingInspectionStatus.FAIL) ||
|
|
356
|
+
!isTaskConstructor}
|
|
315
357
|
>
|
|
316
358
|
</ox-input-signature>
|
|
317
359
|
</td>
|
|
318
360
|
</tr>
|
|
319
361
|
<tr>
|
|
320
|
-
<th
|
|
362
|
+
<th>총괄 시공 책임자</th>
|
|
321
363
|
<td>
|
|
322
364
|
<span sign-text>(인)</span>
|
|
323
365
|
<ox-input-signature
|
|
324
|
-
.value=${this.checklist.
|
|
325
|
-
name="
|
|
366
|
+
.value=${this.checklist.overallConstructorSignature}
|
|
367
|
+
name="overallConstructorSignature"
|
|
326
368
|
@change=${this._onChangeSignature}
|
|
327
|
-
?disabled=${!
|
|
369
|
+
?disabled=${this.status != BuildingInspectionStatus.OVERALL_WAIT || !isOverallConstructor}
|
|
328
370
|
>
|
|
329
371
|
</ox-input-signature>
|
|
330
372
|
</td>
|
|
331
373
|
</tr>
|
|
332
374
|
<tr>
|
|
333
|
-
<th rowspan="2"
|
|
375
|
+
<th rowspan="2">감리자 점검일</th>
|
|
334
376
|
<td rowspan="2">
|
|
335
377
|
${this.mode == ChecklistMode.VIEWER ? today : this._getDate(this.checklist.supervisorInspectionDate)}
|
|
336
378
|
</td>
|
|
337
|
-
<th
|
|
379
|
+
<th>공종별 감리 책임자</th>
|
|
338
380
|
<td>
|
|
339
381
|
<span sign-text>(인)</span>
|
|
340
382
|
<ox-input-signature
|
|
341
|
-
.value=${this.checklist.
|
|
342
|
-
name="
|
|
383
|
+
.value=${this.checklist.taskSupervisorySignature}
|
|
384
|
+
name="taskSupervisorySignature"
|
|
343
385
|
@change=${this._onChangeSignature}
|
|
344
|
-
?disabled=${!
|
|
386
|
+
?disabled=${this.status != BuildingInspectionStatus.REQUEST || !isTaskSupervisory}
|
|
345
387
|
>
|
|
346
388
|
</ox-input-signature>
|
|
347
389
|
</td>
|
|
348
390
|
</tr>
|
|
349
391
|
<tr>
|
|
350
|
-
<th
|
|
392
|
+
<th>총괄 감리 책임자</th>
|
|
351
393
|
<td>
|
|
352
394
|
<span sign-text>(인)</span>
|
|
353
395
|
<ox-input-signature
|
|
354
|
-
.value=${this.checklist.
|
|
355
|
-
name="
|
|
396
|
+
.value=${this.checklist.overallSupervisorySignature}
|
|
397
|
+
name="overallSupervisorySignature"
|
|
356
398
|
@change=${this._onChangeSignature}
|
|
357
|
-
?disabled=${!
|
|
399
|
+
?disabled=${this.status != BuildingInspectionStatus.OVERALL_REQUEST || !isOverallSupervisory}
|
|
358
400
|
>
|
|
359
401
|
</ox-input-signature>
|
|
360
402
|
</td>
|
|
@@ -24,7 +24,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
28
28
|
return html `
|
|
29
29
|
<building-inspection-detail-header
|
|
30
30
|
.buildingInspectionId=${(_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.id}
|
|
@@ -40,6 +40,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
40
40
|
.mode=${"EDITOR" /* ChecklistMode.EDITOR */}
|
|
41
41
|
status=${this.buildingInspection.status}
|
|
42
42
|
.checklist=${this.buildingInspection.checklist || {}}
|
|
43
|
+
.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) || {}}
|
|
43
44
|
></checklist-view>
|
|
44
45
|
`)}
|
|
45
46
|
|
|
@@ -109,6 +110,10 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
109
110
|
name
|
|
110
111
|
buildingComplex {
|
|
111
112
|
id
|
|
113
|
+
overallConstructorEmails
|
|
114
|
+
taskConstructorEmails
|
|
115
|
+
overallSupervisoryEmails
|
|
116
|
+
taskSupervisoryEmails
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
}
|
|
@@ -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;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAElE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6BAA6B,CAAA;AAI7B,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,QAAQ;IAAxD;;QAwCI,YAAO,G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/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 } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\n\nimport { verifyBiometric } from '@things-factory/auth-base/client'\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 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 ${keyed(\n this.buildingInspection.id,\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n ></checklist-view>\n `\n )}\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 </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 constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n buildingInspection {\n status\n }\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 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,M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AAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;SAC5F;IACH,CAAC;;AArOM,wCAAM,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,CAuO7C;SAvOY,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 { 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'\nimport { openPopup } from '@operato/layout'\n\nimport { verifyBiometric } from '@things-factory/auth-base/client'\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 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 ${keyed(\n this.buildingInspection.id,\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 @click=${this._onClickModifyChecklist}>\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 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 buildingInspection {\n status\n }\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 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\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 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"]}
|
|
@@ -17,13 +17,17 @@ export declare const CHECKLIST_MAIN_TYPE_LIST: {
|
|
|
17
17
|
};
|
|
18
18
|
export declare enum BuildingInspectionStatus {
|
|
19
19
|
WAIT = "WAIT",
|
|
20
|
+
OVERALL_WAIT = "OVERALL_WAIT",
|
|
20
21
|
REQUEST = "REQUEST",
|
|
22
|
+
OVERALL_REQUEST = "OVERALL_REQUEST",
|
|
21
23
|
PASS = "PASS",
|
|
22
24
|
FAIL = "FAIL"
|
|
23
25
|
}
|
|
24
|
-
export declare const
|
|
26
|
+
export declare const BUILDING_INSPECTION_STATUS_DISPLAY: {
|
|
25
27
|
WAIT: string;
|
|
28
|
+
OVERALL_WAIT: string;
|
|
26
29
|
REQUEST: string;
|
|
30
|
+
OVERALL_REQUEST: string;
|
|
27
31
|
PASS: string;
|
|
28
32
|
FAIL: string;
|
|
29
33
|
};
|
|
@@ -26,13 +26,17 @@ export const CHECKLIST_MAIN_TYPE_LIST = {
|
|
|
26
26
|
export var BuildingInspectionStatus;
|
|
27
27
|
(function (BuildingInspectionStatus) {
|
|
28
28
|
BuildingInspectionStatus["WAIT"] = "WAIT";
|
|
29
|
+
BuildingInspectionStatus["OVERALL_WAIT"] = "OVERALL_WAIT";
|
|
29
30
|
BuildingInspectionStatus["REQUEST"] = "REQUEST";
|
|
31
|
+
BuildingInspectionStatus["OVERALL_REQUEST"] = "OVERALL_REQUEST";
|
|
30
32
|
BuildingInspectionStatus["PASS"] = "PASS";
|
|
31
33
|
BuildingInspectionStatus["FAIL"] = "FAIL";
|
|
32
34
|
})(BuildingInspectionStatus || (BuildingInspectionStatus = {}));
|
|
33
|
-
export const
|
|
35
|
+
export const BUILDING_INSPECTION_STATUS_DISPLAY = {
|
|
34
36
|
[BuildingInspectionStatus.WAIT]: '검측 대기',
|
|
37
|
+
[BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',
|
|
35
38
|
[BuildingInspectionStatus.REQUEST]: '검측 요청',
|
|
39
|
+
[BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',
|
|
36
40
|
[BuildingInspectionStatus.PASS]: '합격',
|
|
37
41
|
[BuildingInspectionStatus.FAIL]: '불합격'
|
|
38
42
|
};
|
|
@@ -81,16 +85,30 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
81
85
|
검측<br />현황
|
|
82
86
|
</span>
|
|
83
87
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
<span>
|
|
89
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</div>
|
|
90
|
+
<div bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>
|
|
91
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}
|
|
92
|
+
</div>
|
|
93
|
+
</span>
|
|
94
|
+
<span>
|
|
95
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</div>
|
|
96
|
+
<div bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>
|
|
97
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}
|
|
98
|
+
</div>
|
|
99
|
+
</span>
|
|
100
|
+
<span>
|
|
101
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</div>
|
|
102
|
+
<div bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>
|
|
103
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}
|
|
104
|
+
</div>
|
|
105
|
+
</span>
|
|
106
|
+
<span>
|
|
107
|
+
<div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</div>
|
|
108
|
+
<div bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>
|
|
109
|
+
<span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}
|
|
110
|
+
</div>
|
|
111
|
+
</span>
|
|
94
112
|
</div>
|
|
95
113
|
|
|
96
114
|
<ox-event-view
|
|
@@ -204,7 +222,7 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
204
222
|
name: 'status',
|
|
205
223
|
header: '검측 결과',
|
|
206
224
|
record: {
|
|
207
|
-
renderer: value =>
|
|
225
|
+
renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]
|
|
208
226
|
},
|
|
209
227
|
width: 120
|
|
210
228
|
},
|
|
@@ -486,6 +504,7 @@ BuildingInspectionList.styles = [
|
|
|
486
504
|
display: flex;
|
|
487
505
|
flex-direction: column;
|
|
488
506
|
overflow: hidden;
|
|
507
|
+
min-height: 300px;
|
|
489
508
|
}
|
|
490
509
|
|
|
491
510
|
ox-grist {
|