@dssp/supervision 1.0.0-alpha.3 → 1.0.0-alpha.5
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/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +16 -11
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -3
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +40 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +756 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +626 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.d.ts +2 -0
- package/dist-client/pages/checklist/checklist-view.js +282 -174
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-item.js +8 -3
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +36 -0
- package/dist-client/stt/speech-to-text.js +89 -0
- package/dist-client/stt/speech-to-text.js.map +1 -0
- package/dist-client/stt/stt-utils.d.ts +28 -0
- package/dist-client/stt/stt-utils.js +146 -0
- package/dist-client/stt/stt-utils.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/action-plan/index.d.ts +0 -1
- package/dist-server/service/action-plan/index.js +1 -2
- package/dist-server/service/action-plan/index.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +25 -10
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +2 -1
- package/dist-server/service/building-inspection/building-inspection-query.js +31 -2
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +5 -2
- package/dist-server/service/building-inspection/building-inspection-type.js +16 -4
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +9 -0
- package/dist-server/service/building-inspection/building-inspection.js +40 -2
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +2 -4
- package/dist-server/service/building-inspection/index.js +2 -4
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/checklist/checklist-history.d.ts +8 -0
- package/dist-server/service/checklist/checklist-history.js +36 -0
- package/dist-server/service/checklist/checklist-history.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +10 -0
- package/dist-server/service/checklist/checklist.js +45 -3
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/checklist/index.d.ts +0 -2
- package/dist-server/service/checklist/index.js +1 -3
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
- package/dist-server/service/checklist-item-comment/index.js +1 -3
- package/dist-server/service/checklist-item-comment/index.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.js +2 -4
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/index.d.ts +0 -1
- package/dist-server/service/index.js +1 -11
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/index.d.ts +0 -1
- package/dist-server/service/issue/index.js +1 -2
- package/dist-server/service/issue/index.js.map +1 -1
- package/dist-server/service/project-report/index.d.ts +0 -1
- package/dist-server/service/project-report/index.js +1 -2
- package/dist-server/service/project-report/index.js.map +1 -1
- package/dist-server/service/supervisor/index.d.ts +0 -1
- package/dist-server/service/supervisor/index.js +1 -2
- package/dist-server/service/supervisor/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/things-factory.config.js +3 -1
- package/dist-server/service/building-inspection/event-subscriber.d.ts +0 -7
- package/dist-server/service/building-inspection/event-subscriber.js +0 -21
- package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist/event-subscriber.js +0 -21
- package/dist-server/service/checklist/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
- package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/elevated-button.js';
|
|
4
|
+
import '@material/web/textfield/outlined-text-field.js';
|
|
5
|
+
import '@material/web/button/outlined-button.js';
|
|
6
|
+
import { PageView } from '@operato/shell';
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, state, query } from 'lit/decorators.js';
|
|
9
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
10
|
+
import { client } from '@operato/graphql';
|
|
11
|
+
import gql from 'graphql-tag';
|
|
12
|
+
import { notify, openPopup } from '@operato/layout';
|
|
13
|
+
import './component/notice-comment-popup';
|
|
14
|
+
import './component/grid-inspection-create-popup';
|
|
15
|
+
import { BUILDING_INSPECTION_STATUS_DISPLAY, BuildingInspectionStatus } from '../building-inspection/building-inspection-list';
|
|
16
|
+
let BuildingInspectionGridDetail = class BuildingInspectionGridDetail extends ScopedElementsMixin(PageView) {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.defaultProject = {
|
|
20
|
+
name: '',
|
|
21
|
+
buildingComplex: {
|
|
22
|
+
buildings: []
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.project = Object.assign({}, this.defaultProject);
|
|
26
|
+
this.buildingInspections = [];
|
|
27
|
+
this.buildingInspectionSummaryOfProject = {};
|
|
28
|
+
this.buildingInspectionSummaryOfBuildingLevel = {};
|
|
29
|
+
this.selectedBuilding = {};
|
|
30
|
+
this.selectedLevel = {};
|
|
31
|
+
this.selectedInspection = {};
|
|
32
|
+
this.cell = '';
|
|
33
|
+
}
|
|
34
|
+
get context() {
|
|
35
|
+
return {
|
|
36
|
+
title: '층별 시공검측 상세 정보'
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
41
|
+
// 그리드 가로, 세로 길이 배열 생성
|
|
42
|
+
const planXScale = Array.from({ length: ((_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.buildingComplex) === null || _b === void 0 ? void 0 : _b.planXScale) || 0 }, (_, i) => i);
|
|
43
|
+
const planYScale = Array.from({ length: ((_d = (_c = this.project) === null || _c === void 0 ? void 0 : _c.buildingComplex) === null || _d === void 0 ? void 0 : _d.planYScale) || 0 }, (_, i) => i);
|
|
44
|
+
return html `
|
|
45
|
+
<div header>
|
|
46
|
+
<h2>${this.project.name} ${(_e = this.selectedBuilding) === null || _e === void 0 ? void 0 : _e.name} ${(_f = this.selectedLevel) === null || _f === void 0 ? void 0 : _f.floor}층</h2>
|
|
47
|
+
<div button-container>
|
|
48
|
+
<md-elevated-button href=${`project-update/${this.project.id}`}>
|
|
49
|
+
<md-icon slot="icon">assignment</md-icon>프로젝트 정보 수정
|
|
50
|
+
</md-elevated-button>
|
|
51
|
+
<md-elevated-button href=${`project-plan-management/${this.project.id}`}>
|
|
52
|
+
<md-icon slot="icon">description</md-icon>도면 관리
|
|
53
|
+
</md-elevated-button>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div body>
|
|
58
|
+
<div left>
|
|
59
|
+
<div select>
|
|
60
|
+
<div>
|
|
61
|
+
<md-filled-select building @change=${this._onSelectBuilding}>
|
|
62
|
+
${(_j = (_h = (_g = this.project) === null || _g === void 0 ? void 0 : _g.buildingComplex) === null || _h === void 0 ? void 0 : _h.buildings) === null || _j === void 0 ? void 0 : _j.map(building => {
|
|
63
|
+
var _a;
|
|
64
|
+
const selected = building.id === ((_a = this.selectedBuilding) === null || _a === void 0 ? void 0 : _a.id);
|
|
65
|
+
return html ` <md-select-option ?selected=${selected} .value=${building.id}>
|
|
66
|
+
<div slot="headline">${building.name}</div>
|
|
67
|
+
</md-select-option>`;
|
|
68
|
+
})}
|
|
69
|
+
</md-filled-select>
|
|
70
|
+
|
|
71
|
+
<md-filled-select level @change=${this._onSelectBuildingLevel}>
|
|
72
|
+
${(_l = (_k = this.selectedBuilding) === null || _k === void 0 ? void 0 : _k.buildingLevels) === null || _l === void 0 ? void 0 : _l.map(level => {
|
|
73
|
+
const selected = level.id === this.selectedLevel.id;
|
|
74
|
+
return html `<md-select-option ?selected=${selected} .value=${level.id}>
|
|
75
|
+
<div slot="headline">${level.floor}</div>
|
|
76
|
+
</md-select-option>`;
|
|
77
|
+
})}
|
|
78
|
+
</md-filled-select>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div state>
|
|
82
|
+
<span
|
|
83
|
+
><md-icon request slot="icon">frame_inspect</md-icon> 검측대기
|
|
84
|
+
<span bold>${this.buildingInspectionSummaryOfProject[BuildingInspectionStatus.WAIT.toLowerCase()]}</span></span
|
|
85
|
+
>
|
|
86
|
+
<span
|
|
87
|
+
><md-icon request slot="icon">exclamation</md-icon> 검측요청
|
|
88
|
+
<span bold>${this.buildingInspectionSummaryOfProject[BuildingInspectionStatus.REQUEST.toLowerCase()]}</span></span
|
|
89
|
+
>
|
|
90
|
+
<span
|
|
91
|
+
><md-icon pass slot="icon">check</md-icon> 합격
|
|
92
|
+
<span bold>${this.buildingInspectionSummaryOfProject[BuildingInspectionStatus.PASS.toLowerCase()]}</span></span
|
|
93
|
+
>
|
|
94
|
+
<span
|
|
95
|
+
><md-icon fail slot="icon">close</md-icon> 불합격
|
|
96
|
+
<span bold>${this.buildingInspectionSummaryOfProject[BuildingInspectionStatus.FAIL.toLowerCase()]}</span></span
|
|
97
|
+
>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div drawing>
|
|
102
|
+
<img src=${((_m = this.selectedLevel) === null || _m === void 0 ? void 0 : _m.mainDrawingImage) || '/assets/images/img-drawing-default.png'} />
|
|
103
|
+
|
|
104
|
+
<div grid>
|
|
105
|
+
${planXScale.map(v => html ` <div row=${v}>
|
|
106
|
+
${planYScale.map(vv => {
|
|
107
|
+
const buildingInspection = this.buildingInspections.find(i => i.cellX === v && i.cellY === vv);
|
|
108
|
+
const status = (buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.status) || '';
|
|
109
|
+
return html `<div
|
|
110
|
+
column=${vv}
|
|
111
|
+
cell=${`${v},${vv}`}
|
|
112
|
+
buildingInspectionId=${buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.id}
|
|
113
|
+
status=${status}
|
|
114
|
+
@click=${this._onClickGrid}
|
|
115
|
+
>
|
|
116
|
+
${this._getIconHtmlByStatus(status)}
|
|
117
|
+
</div>`;
|
|
118
|
+
})}
|
|
119
|
+
</div>`)}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div right>
|
|
125
|
+
<div top bold>
|
|
126
|
+
<div>신규 등록 현황</div>
|
|
127
|
+
<div content>
|
|
128
|
+
<span
|
|
129
|
+
><md-icon request slot="icon">frame_inspect</md-icon>
|
|
130
|
+
${this.buildingInspectionSummaryOfBuildingLevel[BuildingInspectionStatus.WAIT.toLowerCase()]}
|
|
131
|
+
</span>
|
|
132
|
+
<span
|
|
133
|
+
><md-icon request slot="icon">exclamation</md-icon>
|
|
134
|
+
${this.buildingInspectionSummaryOfBuildingLevel[BuildingInspectionStatus.REQUEST.toLowerCase()]}
|
|
135
|
+
</span>
|
|
136
|
+
<span
|
|
137
|
+
><md-icon pass slot="icon">check</md-icon>
|
|
138
|
+
${this.buildingInspectionSummaryOfBuildingLevel[BuildingInspectionStatus.PASS.toLowerCase()]}
|
|
139
|
+
</span>
|
|
140
|
+
<span
|
|
141
|
+
><md-icon fail slot="icon">close</md-icon>
|
|
142
|
+
${this.buildingInspectionSummaryOfBuildingLevel[BuildingInspectionStatus.FAIL.toLowerCase()]}
|
|
143
|
+
</span>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div bottom>
|
|
148
|
+
<div name bold>층별 공지사항</div>
|
|
149
|
+
<md-elevated-button @click=${e => this._onClicPopupNotice()}
|
|
150
|
+
>공지사항 확인하기(${((_o = this.selectedLevel) === null || _o === void 0 ? void 0 : _o.noticeCount) || 0})</md-elevated-button
|
|
151
|
+
>
|
|
152
|
+
|
|
153
|
+
<div name bold>시공검측 세부사항</div>
|
|
154
|
+
${html `
|
|
155
|
+
<div view>
|
|
156
|
+
<div>
|
|
157
|
+
<div status>
|
|
158
|
+
${this._getIconHtmlByStatus(this.selectedInspection.status)}
|
|
159
|
+
<span bold> ${BUILDING_INSPECTION_STATUS_DISPLAY[this.selectedInspection.status]}</span>
|
|
160
|
+
</div>
|
|
161
|
+
<div date>검측일 : ${this.selectedInspection.requestDate}</div>
|
|
162
|
+
</div>
|
|
163
|
+
<hr />
|
|
164
|
+
<!-- <div desc>${this.selectedInspection.detail} <img /></div>
|
|
165
|
+
<hr />-->
|
|
166
|
+
<div manager>
|
|
167
|
+
담당자 : ${(_q = (_p = this.selectedInspection) === null || _p === void 0 ? void 0 : _p.manager) === null || _q === void 0 ? void 0 : _q.name} <br />
|
|
168
|
+
${(_s = (_r = this.selectedInspection) === null || _r === void 0 ? void 0 : _r.manager) === null || _s === void 0 ? void 0 : _s.phone}
|
|
169
|
+
</div>
|
|
170
|
+
<hr />
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<input type="checkbox" name="apply-to-all" checked />
|
|
174
|
+
|
|
175
|
+
<md-outlined-button @click=${() => this._onClickCreateInspection()}>검측 정보 등록 </md-outlined-button>
|
|
176
|
+
`}
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
async pageInitialized(lifecycle) { }
|
|
183
|
+
async pageUpdated(changes, lifecycle) {
|
|
184
|
+
if (this.active) {
|
|
185
|
+
const params = lifecycle.params;
|
|
186
|
+
await this.initProject(lifecycle.resourceId, params.buildingId, params.levelId);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
async initProject(projectId = '', buildingId = '', levelId = '') {
|
|
190
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
191
|
+
const response = await client.query({
|
|
192
|
+
query: gql `
|
|
193
|
+
query Project(
|
|
194
|
+
$id: String!
|
|
195
|
+
$projectId: String!
|
|
196
|
+
$buildingLevelId: String!
|
|
197
|
+
$params: BuildingInspectionsOfBuildingLevel!
|
|
198
|
+
) {
|
|
199
|
+
project(id: $id) {
|
|
200
|
+
id
|
|
201
|
+
name
|
|
202
|
+
buildingComplex {
|
|
203
|
+
id
|
|
204
|
+
planXScale
|
|
205
|
+
planYScale
|
|
206
|
+
buildings {
|
|
207
|
+
id
|
|
208
|
+
name
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
buildingInspectionSummaryOfProject(projectId: $projectId) {
|
|
214
|
+
wait
|
|
215
|
+
request
|
|
216
|
+
pass
|
|
217
|
+
fail
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {
|
|
221
|
+
wait
|
|
222
|
+
request
|
|
223
|
+
pass
|
|
224
|
+
fail
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
buildingInspectionsOfBuildingLevel(params: $params) {
|
|
228
|
+
items {
|
|
229
|
+
id
|
|
230
|
+
cellX
|
|
231
|
+
cellY
|
|
232
|
+
status
|
|
233
|
+
requestDate
|
|
234
|
+
creator {
|
|
235
|
+
id
|
|
236
|
+
name
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`,
|
|
242
|
+
variables: {
|
|
243
|
+
id: projectId,
|
|
244
|
+
projectId: projectId,
|
|
245
|
+
buildingLevelId: levelId,
|
|
246
|
+
params: { buildingLevelId: levelId }
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
if (response.errors)
|
|
250
|
+
return;
|
|
251
|
+
this.project = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project;
|
|
252
|
+
this.buildingInspections = (_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.buildingInspectionsOfBuildingLevel) === null || _c === void 0 ? void 0 : _c.items;
|
|
253
|
+
this.buildingInspectionSummaryOfProject = (_d = response.data) === null || _d === void 0 ? void 0 : _d.buildingInspectionSummaryOfProject;
|
|
254
|
+
this.buildingInspectionSummaryOfBuildingLevel = (_e = response.data) === null || _e === void 0 ? void 0 : _e.buildingInspectionSummaryOfBuildingLevel;
|
|
255
|
+
// buildingId 파라미터가 있으면 선택된 빌딩, 없으면 첫번째 빌딩 선택
|
|
256
|
+
this.selectedBuilding = buildingId
|
|
257
|
+
? (_h = (_g = (_f = this.project) === null || _f === void 0 ? void 0 : _f.buildingComplex) === null || _g === void 0 ? void 0 : _g.buildings) === null || _h === void 0 ? void 0 : _h.filter(v => v.id === buildingId)[0]
|
|
258
|
+
: (_l = (_k = (_j = this.project) === null || _j === void 0 ? void 0 : _j.buildingComplex) === null || _k === void 0 ? void 0 : _k.buildings) === null || _l === void 0 ? void 0 : _l[0];
|
|
259
|
+
// 선택된 동의 층 리스트 가져오기
|
|
260
|
+
this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id);
|
|
261
|
+
// levelId 파라미터가 있으면 선택된 층, 없으면 첫번째 층 선택
|
|
262
|
+
this.selectedLevel = levelId
|
|
263
|
+
? (_o = (_m = this.selectedBuilding) === null || _m === void 0 ? void 0 : _m.buildingLevels) === null || _o === void 0 ? void 0 : _o.filter(v => v.id === levelId)[0]
|
|
264
|
+
: (_q = (_p = this.selectedBuilding) === null || _p === void 0 ? void 0 : _p.buildingLevels) === null || _q === void 0 ? void 0 : _q[0];
|
|
265
|
+
// 동, 층이 랜더링 된 후에 select를 위해 이 시점에서 랜더링
|
|
266
|
+
this.selectedBuilding = await Object.assign({}, this.selectedBuilding);
|
|
267
|
+
// 기본 값 셋팅 select
|
|
268
|
+
await this.htmlSelectBuilding.select(this.selectedBuilding.id);
|
|
269
|
+
await this.htmlSelectLevel.select(this.selectedLevel.id);
|
|
270
|
+
}
|
|
271
|
+
async _getBuilding(buildingId = '') {
|
|
272
|
+
var _a;
|
|
273
|
+
const response = await client.query({
|
|
274
|
+
query: gql `
|
|
275
|
+
query Building($id: String!) {
|
|
276
|
+
building(id: $id) {
|
|
277
|
+
id
|
|
278
|
+
name
|
|
279
|
+
buildingLevels {
|
|
280
|
+
id
|
|
281
|
+
floor
|
|
282
|
+
noticeCount
|
|
283
|
+
mainDrawing {
|
|
284
|
+
id
|
|
285
|
+
name
|
|
286
|
+
fullpath
|
|
287
|
+
}
|
|
288
|
+
mainDrawingImage
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
`,
|
|
293
|
+
variables: {
|
|
294
|
+
id: buildingId
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
if (response.errors)
|
|
298
|
+
return;
|
|
299
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.building) || {};
|
|
300
|
+
}
|
|
301
|
+
async _getBuildingInspection(buildingInspectionId = '') {
|
|
302
|
+
var _a;
|
|
303
|
+
const response = await client.query({
|
|
304
|
+
query: gql `
|
|
305
|
+
query BuildingInspection($id: String!) {
|
|
306
|
+
buildingInspection(id: $id) {
|
|
307
|
+
id
|
|
308
|
+
cellX
|
|
309
|
+
cellY
|
|
310
|
+
status
|
|
311
|
+
requestDate
|
|
312
|
+
|
|
313
|
+
checklist {
|
|
314
|
+
id
|
|
315
|
+
name
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
manager {
|
|
319
|
+
userId
|
|
320
|
+
name
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
`,
|
|
325
|
+
variables: {
|
|
326
|
+
id: buildingInspectionId
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
if (response.errors)
|
|
330
|
+
return;
|
|
331
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.buildingInspection) || {};
|
|
332
|
+
}
|
|
333
|
+
async _onSelectBuilding(e) {
|
|
334
|
+
var _a, _b;
|
|
335
|
+
const buildingId = e.target.value;
|
|
336
|
+
this.selectedBuilding = await this._getBuilding(buildingId);
|
|
337
|
+
this.selectedLevel = Object.assign({}, (_b = (_a = this.selectedBuilding) === null || _a === void 0 ? void 0 : _a.buildingLevels) === null || _b === void 0 ? void 0 : _b[0]);
|
|
338
|
+
}
|
|
339
|
+
_onSelectBuildingLevel(e) {
|
|
340
|
+
var _a, _b, _c;
|
|
341
|
+
// SELECT event는 target, 팝업 Close는 detail
|
|
342
|
+
const buildingLevelId = ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.value) || e.detail.buildingLevelId;
|
|
343
|
+
this.selectedLevel = Object.assign({}, (((_c = (_b = this.selectedBuilding) === null || _b === void 0 ? void 0 : _b.buildingLevels) === null || _c === void 0 ? void 0 : _c.find(v => v.id == buildingLevelId)) || {}));
|
|
344
|
+
this.refresh();
|
|
345
|
+
}
|
|
346
|
+
async _onClickGrid(e) {
|
|
347
|
+
var _a;
|
|
348
|
+
const target = e.currentTarget;
|
|
349
|
+
const buildingInspectionId = target.getAttribute('buildingInspectionId');
|
|
350
|
+
const cell = target.getAttribute('cell');
|
|
351
|
+
// active 속성 모두 제거후 클릭한 셀만 active로 변경
|
|
352
|
+
(_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('div[cell][active]').forEach(e => e.removeAttribute('active'));
|
|
353
|
+
target.setAttribute('active', true);
|
|
354
|
+
const [cellX, cellY] = cell.split(',');
|
|
355
|
+
this.selectedInspection = buildingInspectionId ? await this._getBuildingInspection(buildingInspectionId) : { cellX, cellY };
|
|
356
|
+
this.cell = cell;
|
|
357
|
+
}
|
|
358
|
+
_onClicPopupNotice() {
|
|
359
|
+
var _a, _b;
|
|
360
|
+
openPopup(html `<notice-comment-popup
|
|
361
|
+
.buildingLevelId=${this.selectedLevel.id}
|
|
362
|
+
.title=${`${(_a = this.selectedBuilding) === null || _a === void 0 ? void 0 : _a.name} ${(_b = this.selectedLevel) === null || _b === void 0 ? void 0 : _b.floor}층 공지사항`}
|
|
363
|
+
@change-comment=${(e) => {
|
|
364
|
+
if (e.detail.type === 'create') {
|
|
365
|
+
this.selectedLevel.noticeCount++; // 코멘트 카운트 + 1
|
|
366
|
+
}
|
|
367
|
+
else if (e.detail.type === 'delete') {
|
|
368
|
+
this.selectedLevel.noticeCount--; // 코멘트 카운트 - 1
|
|
369
|
+
}
|
|
370
|
+
this.requestUpdate();
|
|
371
|
+
}}
|
|
372
|
+
></notice-comment-popup>`, { backdrop: true, size: 'medium', title: '층별 공지사항' });
|
|
373
|
+
}
|
|
374
|
+
_onClickCreateInspection() {
|
|
375
|
+
if (!this.cell) {
|
|
376
|
+
notify({ message: '셀을 선택해주세요.' });
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
openPopup(html `
|
|
380
|
+
<grid-inspection-create-popup
|
|
381
|
+
.projectId=${this.project.id}
|
|
382
|
+
.selectedBuildingId=${this.selectedBuilding.id}
|
|
383
|
+
.selectedBuildingLevelId=${this.selectedLevel.id}
|
|
384
|
+
.cell=${this.cell}
|
|
385
|
+
@requestRefresh=${async (e) => {
|
|
386
|
+
await this.refresh(e.detail.buildingInspectionId);
|
|
387
|
+
}}
|
|
388
|
+
></grid-inspection-create-popup>
|
|
389
|
+
`, { backdrop: true, size: 'large', title: '검측 요청서 등록' });
|
|
390
|
+
}
|
|
391
|
+
async refresh(buildingInspectionId = '') {
|
|
392
|
+
// 그리드, 서머리 정보 갱신
|
|
393
|
+
await this.initProject(this.project.id, this.selectedBuilding.id, this.selectedLevel.id);
|
|
394
|
+
// 선택된 검측 정보 갱신
|
|
395
|
+
this.selectedInspection = buildingInspectionId ? await this._getBuildingInspection(buildingInspectionId) : {};
|
|
396
|
+
}
|
|
397
|
+
_getIconHtmlByStatus(status) {
|
|
398
|
+
if (!status)
|
|
399
|
+
return '';
|
|
400
|
+
if (status == BuildingInspectionStatus.WAIT || status == BuildingInspectionStatus.REQUEST) {
|
|
401
|
+
return html `<md-icon request slot="icon">frame_inspect</md-icon>`;
|
|
402
|
+
}
|
|
403
|
+
if (status == BuildingInspectionStatus.OVERALL_WAIT || status == BuildingInspectionStatus.OVERALL_REQUEST) {
|
|
404
|
+
return html `<md-icon request slot="icon">exclamation</md-icon>`;
|
|
405
|
+
}
|
|
406
|
+
if (status == BuildingInspectionStatus.PASS) {
|
|
407
|
+
return html `<md-icon pass slot="icon">check</md-icon>`;
|
|
408
|
+
}
|
|
409
|
+
return html `<md-icon fail slot="icon">close</md-icon>`;
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
BuildingInspectionGridDetail.styles = [
|
|
413
|
+
css `
|
|
414
|
+
:host {
|
|
415
|
+
display: grid;
|
|
416
|
+
grid-template-rows: 75px auto;
|
|
417
|
+
color: #4e5055;
|
|
418
|
+
|
|
419
|
+
width: 100%;
|
|
420
|
+
background-color: #f7f7f7;
|
|
421
|
+
overflow-y: auto;
|
|
422
|
+
|
|
423
|
+
--grid-record-emphasized-background-color: red;
|
|
424
|
+
--grid-record-emphasized-color: yellow;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
md-filled-button {
|
|
428
|
+
--md-filled-button-container-color: #0595e5;
|
|
429
|
+
--md-filled-button-container-height: 30px;
|
|
430
|
+
--md-filled-button-trailing-space: 15px;
|
|
431
|
+
--md-filled-button-leading-space: 15px;
|
|
432
|
+
}
|
|
433
|
+
md-outlined-button {
|
|
434
|
+
color: #586878;
|
|
435
|
+
font-weight: bold;
|
|
436
|
+
--md-outlined-button-label-text-size: 13px;
|
|
437
|
+
--md-outlined-button-container-height: 30px;
|
|
438
|
+
--md-outlined-button-trailing-space: 15px;
|
|
439
|
+
--md-outlined-button-leading-space: 15px;
|
|
440
|
+
}
|
|
441
|
+
md-filled-select {
|
|
442
|
+
width: auto;
|
|
443
|
+
min-width: 150px;
|
|
444
|
+
--md-filled-select-text-field-container-color: transparent;
|
|
445
|
+
--md-filled-select-text-field-active-indicator-color: #999;
|
|
446
|
+
--md-filled-select-text-field-input-text-size: 14px;
|
|
447
|
+
--md-filled-select-text-field-input-text-weight: bold;
|
|
448
|
+
--md-filled-select-text-field-input-text-line-height: 6px;
|
|
449
|
+
}
|
|
450
|
+
md-filled-select[level] {
|
|
451
|
+
min-width: 110px;
|
|
452
|
+
margin-left: 20px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
md-icon[request],
|
|
456
|
+
md-icon[pass],
|
|
457
|
+
md-icon[fail] {
|
|
458
|
+
width: 20px;
|
|
459
|
+
height: 20px;
|
|
460
|
+
margin-right: 4px;
|
|
461
|
+
border-radius: 5px;
|
|
462
|
+
font-size: 21px;
|
|
463
|
+
font-weight: 700;
|
|
464
|
+
color: #fff;
|
|
465
|
+
}
|
|
466
|
+
md-icon[request] {
|
|
467
|
+
background-color: #4e5055;
|
|
468
|
+
}
|
|
469
|
+
md-icon[pass] {
|
|
470
|
+
background-color: #4bbb4a;
|
|
471
|
+
}
|
|
472
|
+
md-icon[fail] {
|
|
473
|
+
background-color: #ff4444;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
*[bold] {
|
|
477
|
+
font-weight: bold;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
div[header] {
|
|
481
|
+
display: flex;
|
|
482
|
+
margin: 0px 20px;
|
|
483
|
+
|
|
484
|
+
h2 {
|
|
485
|
+
flex: 0.5;
|
|
486
|
+
color: #3f71a0;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
div[button-container] {
|
|
490
|
+
display: flex;
|
|
491
|
+
align-items: center;
|
|
492
|
+
justify-content: end;
|
|
493
|
+
flex: 0.5;
|
|
494
|
+
|
|
495
|
+
md-elevated-button {
|
|
496
|
+
margin: 0px 3px;
|
|
497
|
+
|
|
498
|
+
--md-elevated-button-container-height: 35px;
|
|
499
|
+
--md-elevated-button-label-text-size: 16px;
|
|
500
|
+
--md-elevated-button-container-color: #0595e5;
|
|
501
|
+
|
|
502
|
+
--md-elevated-button-label-text-color: #fff;
|
|
503
|
+
--md-elevated-button-hover-label-text-color: #fff;
|
|
504
|
+
--md-elevated-button-pressed-label-text-color: #fff;
|
|
505
|
+
--md-elevated-button-focus-label-text-color: #fff;
|
|
506
|
+
--md-elevated-button-icon-color: #fff;
|
|
507
|
+
--md-elevated-button-hover-icon-color: #fff;
|
|
508
|
+
--md-elevated-button-pressed-icon-color: #fff;
|
|
509
|
+
--md-elevated-button-focus-icon-color: #fff;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
div[body] {
|
|
515
|
+
display: grid;
|
|
516
|
+
grid-template-columns: 1fr 200px;
|
|
517
|
+
margin: 0px 25px 25px 25px;
|
|
518
|
+
gap: 10px;
|
|
519
|
+
min-height: fit-content;
|
|
520
|
+
|
|
521
|
+
h3 {
|
|
522
|
+
color: #2e79be;
|
|
523
|
+
font-size: 18px;
|
|
524
|
+
margin: 0px;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
& > div {
|
|
528
|
+
display: flex;
|
|
529
|
+
gap: 10px;
|
|
530
|
+
border-radius: 5px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
div[left] {
|
|
534
|
+
flex-direction: column;
|
|
535
|
+
|
|
536
|
+
div[select] {
|
|
537
|
+
display: flex;
|
|
538
|
+
align-items: center;
|
|
539
|
+
justify-content: space-between;
|
|
540
|
+
background-color: #2ea4df1a;
|
|
541
|
+
border: 1px solid #2ea4df33;
|
|
542
|
+
font-size: 18px;
|
|
543
|
+
padding: 7px 10px;
|
|
544
|
+
border-radius: 5px;
|
|
545
|
+
gap: 12px;
|
|
546
|
+
|
|
547
|
+
& > div[state] {
|
|
548
|
+
display: flex;
|
|
549
|
+
font-size: 15px;
|
|
550
|
+
margin-right: 12px;
|
|
551
|
+
gap: 10px;
|
|
552
|
+
|
|
553
|
+
& > span {
|
|
554
|
+
display: flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
margin-left: 15px;
|
|
557
|
+
gap: 2px;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
div[drawing] {
|
|
563
|
+
width: 100%;
|
|
564
|
+
background-color: #ffffff;
|
|
565
|
+
border: 1px solid #cccccc;
|
|
566
|
+
border-radius: 5px;
|
|
567
|
+
position: relative;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
img {
|
|
571
|
+
width: 100%;
|
|
572
|
+
background-size: contain;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
div[grid] {
|
|
576
|
+
display: flex;
|
|
577
|
+
position: absolute;
|
|
578
|
+
width: 100%;
|
|
579
|
+
height: 100%;
|
|
580
|
+
top: 0;
|
|
581
|
+
left: 0;
|
|
582
|
+
border: 1px #ccc solid;
|
|
583
|
+
justify-content: space-between;
|
|
584
|
+
|
|
585
|
+
& > div[row] {
|
|
586
|
+
display: flex;
|
|
587
|
+
flex-direction: column;
|
|
588
|
+
justify-content: space-between;
|
|
589
|
+
flex: 1;
|
|
590
|
+
|
|
591
|
+
& > div[column] {
|
|
592
|
+
flex: 1;
|
|
593
|
+
border: dashed 1px #2ea4df99;
|
|
594
|
+
display: flex;
|
|
595
|
+
justify-content: center;
|
|
596
|
+
align-items: center;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
div[row='1'] div[column] {
|
|
601
|
+
border-left: none !important;
|
|
602
|
+
}
|
|
603
|
+
div[row]:last-of-type div[column] {
|
|
604
|
+
border-right: none !important;
|
|
605
|
+
}
|
|
606
|
+
div[column='1'] {
|
|
607
|
+
border-top: none !important;
|
|
608
|
+
}
|
|
609
|
+
div[column]:last-of-type {
|
|
610
|
+
border-bottom: none !important;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
div[cell] {
|
|
614
|
+
&[status='WAIT'],
|
|
615
|
+
&[status='REQUEST'],
|
|
616
|
+
&[status='OVERALL_WAIT'],
|
|
617
|
+
&[status='OVERALL_REQUEST'],
|
|
618
|
+
&[status='PASS'],
|
|
619
|
+
&[status='FAIL'] {
|
|
620
|
+
background-color: #2ea4df1a;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
&[active] {
|
|
624
|
+
background-color: #2ea4df99;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
div[right] {
|
|
631
|
+
flex-direction: column;
|
|
632
|
+
gap: 15px;
|
|
633
|
+
|
|
634
|
+
& > div {
|
|
635
|
+
background-color: #ffffff;
|
|
636
|
+
border: 1px solid #cccccc80;
|
|
637
|
+
padding: 11px 12px 15px 12px;
|
|
638
|
+
border-radius: 5px;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
div[top] {
|
|
642
|
+
div[content] {
|
|
643
|
+
display: grid;
|
|
644
|
+
grid-template-columns: 1fr 1fr;
|
|
645
|
+
gap: 5px;
|
|
646
|
+
align-items: center;
|
|
647
|
+
margin-top: 8px;
|
|
648
|
+
justify-content: space-between;
|
|
649
|
+
|
|
650
|
+
span {
|
|
651
|
+
display: flex;
|
|
652
|
+
align-items: center;
|
|
653
|
+
min-width: 55px;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
div[bottom] {
|
|
659
|
+
display: flex;
|
|
660
|
+
flex-direction: column;
|
|
661
|
+
flex: 1;
|
|
662
|
+
gap: 10px;
|
|
663
|
+
|
|
664
|
+
& > div {
|
|
665
|
+
display: flex;
|
|
666
|
+
flex-direction: column;
|
|
667
|
+
gap: 9px;
|
|
668
|
+
|
|
669
|
+
hr {
|
|
670
|
+
border: 1px #cccccc dashed;
|
|
671
|
+
width: 100%;
|
|
672
|
+
margin: 0;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
div[view] {
|
|
677
|
+
flex: 1;
|
|
678
|
+
|
|
679
|
+
div[status] {
|
|
680
|
+
display: flex;
|
|
681
|
+
align-items: center;
|
|
682
|
+
margin-bottom: 7px;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
div[date],
|
|
686
|
+
div[manager] {
|
|
687
|
+
font-size: 14px;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
div[edit] {
|
|
692
|
+
flex: 1;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
md-elevated-button {
|
|
696
|
+
--md-elevated-button-container-color: #fafafa;
|
|
697
|
+
|
|
698
|
+
--md-elevated-button-label-text-color: #586878;
|
|
699
|
+
--md-elevated-button-hover-label-text-color: #586878;
|
|
700
|
+
--md-elevated-button-pressed-label-text-color: #586878;
|
|
701
|
+
--md-elevated-button-focus-label-text-color: #586878;
|
|
702
|
+
--md-elevated-button-icon-color: #586878;
|
|
703
|
+
--md-elevated-button-hover-icon-color: #586878;
|
|
704
|
+
--md-elevated-button-pressed-icon-color: #586878;
|
|
705
|
+
--md-elevated-button-focus-icon-color: #586878;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
`
|
|
711
|
+
];
|
|
712
|
+
__decorate([
|
|
713
|
+
state(),
|
|
714
|
+
__metadata("design:type", Object)
|
|
715
|
+
], BuildingInspectionGridDetail.prototype, "project", void 0);
|
|
716
|
+
__decorate([
|
|
717
|
+
state(),
|
|
718
|
+
__metadata("design:type", Object)
|
|
719
|
+
], BuildingInspectionGridDetail.prototype, "buildingInspections", void 0);
|
|
720
|
+
__decorate([
|
|
721
|
+
state(),
|
|
722
|
+
__metadata("design:type", Object)
|
|
723
|
+
], BuildingInspectionGridDetail.prototype, "buildingInspectionSummaryOfProject", void 0);
|
|
724
|
+
__decorate([
|
|
725
|
+
state(),
|
|
726
|
+
__metadata("design:type", Object)
|
|
727
|
+
], BuildingInspectionGridDetail.prototype, "buildingInspectionSummaryOfBuildingLevel", void 0);
|
|
728
|
+
__decorate([
|
|
729
|
+
state(),
|
|
730
|
+
__metadata("design:type", Object)
|
|
731
|
+
], BuildingInspectionGridDetail.prototype, "selectedBuilding", void 0);
|
|
732
|
+
__decorate([
|
|
733
|
+
state(),
|
|
734
|
+
__metadata("design:type", Object)
|
|
735
|
+
], BuildingInspectionGridDetail.prototype, "selectedLevel", void 0);
|
|
736
|
+
__decorate([
|
|
737
|
+
state(),
|
|
738
|
+
__metadata("design:type", Object)
|
|
739
|
+
], BuildingInspectionGridDetail.prototype, "selectedInspection", void 0);
|
|
740
|
+
__decorate([
|
|
741
|
+
state(),
|
|
742
|
+
__metadata("design:type", String)
|
|
743
|
+
], BuildingInspectionGridDetail.prototype, "cell", void 0);
|
|
744
|
+
__decorate([
|
|
745
|
+
query('md-filled-select[building]'),
|
|
746
|
+
__metadata("design:type", Object)
|
|
747
|
+
], BuildingInspectionGridDetail.prototype, "htmlSelectBuilding", void 0);
|
|
748
|
+
__decorate([
|
|
749
|
+
query('md-filled-select[level]'),
|
|
750
|
+
__metadata("design:type", Object)
|
|
751
|
+
], BuildingInspectionGridDetail.prototype, "htmlSelectLevel", void 0);
|
|
752
|
+
BuildingInspectionGridDetail = __decorate([
|
|
753
|
+
customElement('building-inspection-grid-detail')
|
|
754
|
+
], BuildingInspectionGridDetail);
|
|
755
|
+
export { BuildingInspectionGridDetail };
|
|
756
|
+
//# sourceMappingURL=building-inspection-grid-detail.js.map
|