@dssp/supervision 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/building-inspection/building-inspection-detail-checklist.ts +186 -0
- package/client/pages/building-inspection/building-inspection-detail-drawing.ts +160 -0
- package/client/pages/building-inspection/building-inspection-list.ts +430 -0
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +94 -0
- package/client/pages/building-inspection/inspection-create-popup.ts +696 -0
- package/client/pages/checklist/checklist-view.ts +443 -0
- package/client/pages/checklist-template/checklist-template-item.ts +240 -0
- package/client/pages/checklist-template/checklist-template-list.ts +271 -0
- package/client/pages/checklist-template/checklist-type-management.ts +242 -0
- package/client/route.ts +14 -18
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +21 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +187 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +21 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +169 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +67 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js +434 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +118 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js +735 -0
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
- package/dist-client/pages/checklist/checklist-view.js +434 -0
- package/dist-client/pages/checklist/checklist-view.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +237 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
- package/dist-client/pages/{check-item/check-item-list-page.d.ts → checklist-template/checklist-template-list.d.ts} +8 -27
- package/dist-client/pages/checklist-template/checklist-template-list.js +259 -0
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +48 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js +229 -0
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +10 -13
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +1 -1
- package/dist-server/index.js +1 -1
- package/dist-server/index.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.d.ts +17 -0
- package/dist-server/service/building-inspection/building-inspection-history.js +85 -0
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +8 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js +148 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +20 -0
- package/dist-server/service/building-inspection/building-inspection-query.js +235 -0
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +43 -0
- package/dist-server/service/building-inspection/building-inspection-type.js +153 -0
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
- package/dist-server/service/building-inspection/building-inspection.d.ts +26 -0
- package/dist-server/service/building-inspection/building-inspection.js +113 -0
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
- package/dist-server/service/building-inspection/event-subscriber.d.ts +7 -0
- package/dist-server/service/building-inspection/event-subscriber.js +21 -0
- package/dist-server/service/building-inspection/event-subscriber.js.map +1 -0
- package/dist-server/service/building-inspection/index.d.ts +10 -0
- package/dist-server/service/building-inspection/index.js +14 -0
- package/dist-server/service/building-inspection/index.js.map +1 -0
- package/dist-server/service/checklist/checklist-history.d.ts +24 -0
- package/dist-server/service/checklist/checklist-history.js +120 -0
- package/dist-server/service/checklist/checklist-history.js.map +1 -0
- package/dist-server/service/checklist/checklist-mutation.d.ts +8 -0
- package/dist-server/service/checklist/checklist-mutation.js +96 -0
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
- package/dist-server/service/checklist/checklist-query.d.ts +12 -0
- package/dist-server/service/checklist/checklist-query.js +83 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -0
- package/dist-server/service/checklist/checklist-type.d.ts +18 -0
- package/dist-server/service/checklist/checklist-type.js +69 -0
- package/dist-server/service/checklist/checklist-type.js.map +1 -0
- package/dist-server/service/checklist/checklist.d.ts +31 -0
- package/dist-server/service/checklist/checklist.js +143 -0
- package/dist-server/service/checklist/checklist.js.map +1 -0
- package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist/event-subscriber.js +21 -0
- package/dist-server/service/checklist/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist/index.d.ts +8 -0
- package/dist-server/service/checklist/index.js +12 -0
- package/dist-server/service/checklist/index.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js +13 -0
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +10 -0
- package/dist-server/service/checklist-item/checklist-item-query.js +68 -0
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -0
- package/dist-server/service/checklist-item/checklist-item-type.js +21 -0
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item.d.ts +26 -0
- package/dist-server/service/checklist-item/checklist-item.js +113 -0
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
- package/dist-server/service/checklist-item/index.d.ts +5 -0
- package/dist-server/service/checklist-item/index.js +10 -0
- package/dist-server/service/checklist-item/index.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +6 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-query.js +65 -0
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
- package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
- package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
- package/dist-server/service/checklist-template/checklist-template.js +78 -0
- package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
- package/dist-server/service/checklist-template/index.d.ts +5 -0
- package/dist-server/service/checklist-template/index.js +9 -0
- package/dist-server/service/checklist-template/index.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +68 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +10 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +66 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +16 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +60 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +19 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +87 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
- package/dist-server/service/checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/checklist-template-item/index.js +9 -0
- package/dist-server/service/checklist-template-item/index.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
- package/dist-server/service/checklist-type/checklist-type-query.js +65 -0
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
- package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
- package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
- package/dist-server/service/checklist-type/checklist-type.js +78 -0
- package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
- package/dist-server/service/checklist-type/index.d.ts +5 -0
- package/dist-server/service/checklist-type/index.js +9 -0
- package/dist-server/service/checklist-type/index.js.map +1 -0
- package/dist-server/service/index.d.ts +8 -3
- package/dist-server/service/index.js +25 -5
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue.d.ts +1 -3
- package/dist-server/service/issue/issue.js +1 -7
- package/dist-server/service/issue/issue.js.map +1 -1
- package/dist-server/service/supervisor/supervisor.d.ts +1 -3
- package/dist-server/service/supervisor/supervisor.js +1 -7
- package/dist-server/service/supervisor/supervisor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/supervision/checklist-item.md +160 -0
- package/helps/supervision/checklist.md +160 -0
- package/package.json +11 -7
- package/server/index.ts +1 -1
- package/server/service/building-inspection/building-inspection-history.ts +70 -0
- package/server/service/building-inspection/building-inspection-mutation.ts +147 -0
- package/server/service/building-inspection/building-inspection-query.ts +202 -0
- package/server/service/building-inspection/building-inspection-type.ts +101 -0
- package/server/service/building-inspection/building-inspection.ts +106 -0
- package/server/service/building-inspection/event-subscriber.ts +20 -0
- package/server/service/building-inspection/index.ts +11 -0
- package/server/service/checklist/checklist-history.ts +96 -0
- package/server/service/checklist/checklist-mutation.ts +103 -0
- package/server/service/checklist/checklist-query.ts +52 -0
- package/server/service/{check-item/check-item-type.ts → checklist/checklist-type.ts} +6 -18
- package/server/service/checklist/checklist.ts +127 -0
- package/server/service/checklist/event-subscriber.ts +17 -0
- package/server/service/checklist/index.ts +9 -0
- package/server/service/checklist-item/checklist-item-mutation.ts +5 -0
- package/server/service/checklist-item/checklist-item-query.ts +43 -0
- package/server/service/checklist-item/checklist-item-type.ts +12 -0
- package/server/service/checklist-item/checklist-item.ts +100 -0
- package/server/service/checklist-item/index.ts +7 -0
- package/server/service/checklist-template/checklist-template-mutation.ts +66 -0
- package/server/service/checklist-template/checklist-template-query.ts +39 -0
- package/server/service/checklist-template/checklist-template-type.ts +23 -0
- package/server/service/checklist-template/checklist-template.ts +71 -0
- package/server/service/checklist-template/index.ts +6 -0
- package/server/service/checklist-template-item/checklist-template-item-mutation.ts +64 -0
- package/server/service/checklist-template-item/checklist-template-item-query.ts +39 -0
- package/server/service/checklist-template-item/checklist-template-item-type.ts +39 -0
- package/server/service/checklist-template-item/checklist-template-item.ts +67 -0
- package/server/service/checklist-template-item/index.ts +6 -0
- package/server/service/checklist-type/checklist-type-mutation.ts +66 -0
- package/server/service/checklist-type/checklist-type-query.ts +39 -0
- package/server/service/checklist-type/checklist-type-type.ts +26 -0
- package/server/service/checklist-type/checklist-type.ts +64 -0
- package/server/service/checklist-type/index.ts +6 -0
- package/server/service/index.ts +59 -23
- package/server/service/issue/issue.ts +1 -6
- package/server/service/supervisor/supervisor.ts +1 -6
- package/things-factory.config.js +11 -7
- package/client/pages/check-item/check-item-importer.ts +0 -94
- package/client/pages/check-item/check-item-list-page.ts +0 -340
- package/dist-client/pages/check-item/check-item-importer.d.ts +0 -10
- package/dist-client/pages/check-item/check-item-importer.js +0 -101
- package/dist-client/pages/check-item/check-item-importer.js.map +0 -1
- package/dist-client/pages/check-item/check-item-list-page.js +0 -323
- package/dist-client/pages/check-item/check-item-list-page.js.map +0 -1
- package/dist-server/service/check-item/check-item-mutation.d.ts +0 -10
- package/dist-server/service/check-item/check-item-mutation.js +0 -168
- package/dist-server/service/check-item/check-item-mutation.js.map +0 -1
- package/dist-server/service/check-item/check-item-query.d.ts +0 -12
- package/dist-server/service/check-item/check-item-query.js +0 -97
- package/dist-server/service/check-item/check-item-query.js.map +0 -1
- package/dist-server/service/check-item/check-item-type.d.ts +0 -23
- package/dist-server/service/check-item/check-item-type.js +0 -86
- package/dist-server/service/check-item/check-item-type.js.map +0 -1
- package/dist-server/service/check-item/check-item.d.ts +0 -28
- package/dist-server/service/check-item/check-item.js +0 -117
- package/dist-server/service/check-item/check-item.js.map +0 -1
- package/dist-server/service/check-item/index.d.ts +0 -6
- package/dist-server/service/check-item/index.js +0 -10
- package/dist-server/service/check-item/index.js.map +0 -1
- package/server/service/check-item/check-item-mutation.ts +0 -198
- package/server/service/check-item/check-item-query.ts +0 -62
- package/server/service/check-item/check-item.ts +0 -111
- package/server/service/check-item/index.ts +0 -7
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@operato/data-grist/ox-grist.js';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
import { css, html, LitElement } from 'lit';
|
|
6
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
7
|
+
import { DataGrist } from '@operato/data-grist/ox-grist.js';
|
|
8
|
+
import { client } from '@operato/graphql';
|
|
9
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
10
|
+
import { notify } from '@operato/layout';
|
|
11
|
+
import { CHECKLIST_MAIN_TYPE_LIST } from './building-inspection-list';
|
|
12
|
+
import '../checklist/checklist-view';
|
|
13
|
+
let InspectionCreatePopup = class InspectionCreatePopup extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.projectId = '';
|
|
17
|
+
this.checklistTemplateId = '';
|
|
18
|
+
this.selectedBuildingId = '';
|
|
19
|
+
this.selectedBuildingLevelId = '';
|
|
20
|
+
this.buildings = [];
|
|
21
|
+
this.selectedBuilding = {};
|
|
22
|
+
this.selectedLevel = {};
|
|
23
|
+
this.constructionTypes = [];
|
|
24
|
+
this.selectedConstructionType = {};
|
|
25
|
+
this.selectedConstructionDetailType = {};
|
|
26
|
+
this.inspectionDrawingTypes = [];
|
|
27
|
+
this.selectedInspectionDrawingType = {};
|
|
28
|
+
this.selectedInspectionParts = [];
|
|
29
|
+
this.checklistTemplates = [];
|
|
30
|
+
this.checklist = {};
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
34
|
+
return html `
|
|
35
|
+
<div body>
|
|
36
|
+
<div left>
|
|
37
|
+
<div block-name>
|
|
38
|
+
<hr />
|
|
39
|
+
<span>세부 정보</span>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div>
|
|
43
|
+
<md-filled-select label="공종" constructionType @change=${this._onSelectConstructionType}>
|
|
44
|
+
${(_a = this.constructionTypes) === null || _a === void 0 ? void 0 : _a.map(constructionType => {
|
|
45
|
+
var _a;
|
|
46
|
+
const selected = constructionType.id === ((_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id);
|
|
47
|
+
return html `<md-select-option ?selected=${selected} .value=${constructionType.id}>
|
|
48
|
+
<div slot="headline">${constructionType.name}</div>
|
|
49
|
+
</md-select-option>`;
|
|
50
|
+
})}
|
|
51
|
+
</md-filled-select>
|
|
52
|
+
|
|
53
|
+
<md-filled-select label="세부 공종" constructionDetailType @change=${this._onSelectConstructionDetailType}>
|
|
54
|
+
${(_c = (_b = this.selectedConstructionType) === null || _b === void 0 ? void 0 : _b.constructionDetailTypes) === null || _c === void 0 ? void 0 : _c.map(constructionDetailType => {
|
|
55
|
+
const selected = constructionDetailType.id === this.selectedConstructionDetailType.id;
|
|
56
|
+
return html `<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>
|
|
57
|
+
<div slot="headline">${constructionDetailType.name}</div>
|
|
58
|
+
</md-select-option>`;
|
|
59
|
+
})}
|
|
60
|
+
</md-filled-select>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div>
|
|
64
|
+
<md-filled-select label="동" building @change=${this._onSelectBuilding}>
|
|
65
|
+
${(_d = this.buildings) === null || _d === void 0 ? void 0 : _d.map(building => {
|
|
66
|
+
return html ` <md-select-option .value=${building.id}>
|
|
67
|
+
<div slot="headline">${building.name}</div>
|
|
68
|
+
</md-select-option>`;
|
|
69
|
+
})}
|
|
70
|
+
</md-filled-select>
|
|
71
|
+
|
|
72
|
+
<md-filled-select label="층" level @change=${this._onSelectBuildingLevel}>
|
|
73
|
+
${(_f = (_e = this.selectedBuilding) === null || _e === void 0 ? void 0 : _e.buildingLevels) === null || _f === void 0 ? void 0 : _f.map(level => {
|
|
74
|
+
return html `<md-select-option .value=${level.id}>
|
|
75
|
+
<div slot="headline">${level.floor}</div>
|
|
76
|
+
</md-select-option>`;
|
|
77
|
+
})}
|
|
78
|
+
</md-filled-select>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div>
|
|
82
|
+
<md-filled-select label="검측 도면" inspectionDrawingType @change=${this._onSelectInspectionDrawingType}>
|
|
83
|
+
${(_g = this.inspectionDrawingTypes) === null || _g === void 0 ? void 0 : _g.map(inspectionDrawingType => {
|
|
84
|
+
return html ` <md-select-option .value=${inspectionDrawingType.id}>
|
|
85
|
+
<div slot="headline">${inspectionDrawingType.name}</div>
|
|
86
|
+
</md-select-option>`;
|
|
87
|
+
})}
|
|
88
|
+
</md-filled-select>
|
|
89
|
+
|
|
90
|
+
<md-filled-select label="검측 부위" inspectionParts>
|
|
91
|
+
<div slot="label">${((_h = this.selectedInspectionParts) === null || _h === void 0 ? void 0 : _h.join(', ')) || ''}</div>
|
|
92
|
+
|
|
93
|
+
${(_k = (_j = this.selectedInspectionDrawingType) === null || _j === void 0 ? void 0 : _j.inspectionParts) === null || _k === void 0 ? void 0 : _k.map(inspectionPart => {
|
|
94
|
+
return html `
|
|
95
|
+
<md-list-option @click=${() => this._onSelectInspectionPart(inspectionPart)}>
|
|
96
|
+
<md-checkbox ?checked="${this.isSelected(inspectionPart)}"></md-checkbox>
|
|
97
|
+
${inspectionPart.name}
|
|
98
|
+
</md-list-option>
|
|
99
|
+
`;
|
|
100
|
+
})}
|
|
101
|
+
</md-filled-select>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div block-name>
|
|
105
|
+
<hr />
|
|
106
|
+
<span>체크리스트</span>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div>
|
|
110
|
+
<label>체크리스트 템플릿 불러오기</label>
|
|
111
|
+
|
|
112
|
+
<md-filled-select label="템플릿" checklistTemplate @change=${this._onSelectChecklistTemplate}>
|
|
113
|
+
<md-select-option></md-select-option>
|
|
114
|
+
${(_l = this.checklistTemplates) === null || _l === void 0 ? void 0 : _l.map((checklistTemplate, idx) => {
|
|
115
|
+
return html ` <md-select-option .value=${checklistTemplate.id}>
|
|
116
|
+
<div slot="headline">${checklistTemplate.name}</div>
|
|
117
|
+
</md-select-option>`;
|
|
118
|
+
})}
|
|
119
|
+
</md-filled-select>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div>
|
|
123
|
+
<md-filled-text-field
|
|
124
|
+
name="checklistName"
|
|
125
|
+
type="text"
|
|
126
|
+
label="체크리스트 이름"
|
|
127
|
+
.value=${((_m = this.checklist) === null || _m === void 0 ? void 0 : _m.name) || ''}
|
|
128
|
+
@input=${this._onInputChange}
|
|
129
|
+
>
|
|
130
|
+
</md-filled-text-field>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<ox-grist
|
|
134
|
+
.mode=${'GRID'}
|
|
135
|
+
.config=${this.gristConfig}
|
|
136
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
137
|
+
@field-change=${this.onChangeGird}
|
|
138
|
+
>
|
|
139
|
+
</ox-grist>
|
|
140
|
+
|
|
141
|
+
<div button-container>
|
|
142
|
+
<md-elevated-button @click=${this._createInspection}>
|
|
143
|
+
<md-icon slot="icon">add</md-icon>검측 요청서 등록
|
|
144
|
+
</md-elevated-button>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div right>
|
|
149
|
+
<checklist-view .mode=${"VIEWER" /* ChecklistMode.VIEWER */} .checklist=${this.checklist}></checklist-view>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
`;
|
|
153
|
+
}
|
|
154
|
+
updated() {
|
|
155
|
+
var _a, _b;
|
|
156
|
+
const ratio = Math.round((((_a = this.checklistViewContainer) === null || _a === void 0 ? void 0 : _a.offsetWidth) / ((_b = this.checklistView) === null || _b === void 0 ? void 0 : _b.offsetWidth)) * 100) / 100 || 1;
|
|
157
|
+
this.checklistView.style.transform = `scale(${ratio})`;
|
|
158
|
+
}
|
|
159
|
+
async firstUpdated() {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
161
|
+
const response = await client.query({
|
|
162
|
+
query: gql `
|
|
163
|
+
query Project($id: String!) {
|
|
164
|
+
project(id: $id) {
|
|
165
|
+
id
|
|
166
|
+
name
|
|
167
|
+
buildingComplex {
|
|
168
|
+
id
|
|
169
|
+
buildings {
|
|
170
|
+
id
|
|
171
|
+
name
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
constructionTypes {
|
|
177
|
+
items {
|
|
178
|
+
name
|
|
179
|
+
id
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
inspectionDrawingTypes {
|
|
184
|
+
items {
|
|
185
|
+
name
|
|
186
|
+
id
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
checklistTemplates {
|
|
191
|
+
items {
|
|
192
|
+
id
|
|
193
|
+
name
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
checklistTypes {
|
|
198
|
+
items {
|
|
199
|
+
id
|
|
200
|
+
mainType
|
|
201
|
+
detailType
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
`,
|
|
206
|
+
variables: {
|
|
207
|
+
id: this.projectId
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
if (response.errors)
|
|
211
|
+
return;
|
|
212
|
+
const project = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project;
|
|
213
|
+
const constructionTypes = ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.constructionTypes) === null || _c === void 0 ? void 0 : _c.items) || [];
|
|
214
|
+
const inspectionDrawingTypes = ((_e = (_d = response.data) === null || _d === void 0 ? void 0 : _d.inspectionDrawingTypes) === null || _e === void 0 ? void 0 : _e.items) || [];
|
|
215
|
+
const checklistTemplates = ((_g = (_f = response.data) === null || _f === void 0 ? void 0 : _f.checklistTemplates) === null || _g === void 0 ? void 0 : _g.items) || [];
|
|
216
|
+
this.checklistDetailTypes = (_j = (_h = response.data.checklistTypes) === null || _h === void 0 ? void 0 : _h.items) === null || _j === void 0 ? void 0 : _j.map(v => {
|
|
217
|
+
return {
|
|
218
|
+
display: v.detailType,
|
|
219
|
+
value: v.id,
|
|
220
|
+
mainType: v.mainType
|
|
221
|
+
};
|
|
222
|
+
});
|
|
223
|
+
this.buildings = [...(((_k = project === null || project === void 0 ? void 0 : project.buildingComplex) === null || _k === void 0 ? void 0 : _k.buildings) || [])];
|
|
224
|
+
this.constructionTypes = [...constructionTypes];
|
|
225
|
+
this.inspectionDrawingTypes = [...inspectionDrawingTypes];
|
|
226
|
+
this.checklistTemplates = [...checklistTemplates];
|
|
227
|
+
// selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택
|
|
228
|
+
this.selectedBuilding = this.selectedBuildingId
|
|
229
|
+
? this.buildings.find(building => building.id == this.selectedBuildingId)
|
|
230
|
+
: this.buildings[0];
|
|
231
|
+
this.selectedConstructionType = constructionTypes === null || constructionTypes === void 0 ? void 0 : constructionTypes[0];
|
|
232
|
+
this.selectedInspectionDrawingType = inspectionDrawingTypes === null || inspectionDrawingTypes === void 0 ? void 0 : inspectionDrawingTypes[0];
|
|
233
|
+
// 선택된 동의 층 리스트 가져오기
|
|
234
|
+
this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id);
|
|
235
|
+
this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id);
|
|
236
|
+
this.selectedInspectionDrawingType = await this._getInspectionDrawingType(this.selectedInspectionDrawingType.id);
|
|
237
|
+
// selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택
|
|
238
|
+
this.selectedLevel = this.selectedBuildingLevelId
|
|
239
|
+
? (_m = (_l = this.selectedBuilding) === null || _l === void 0 ? void 0 : _l.buildingLevels) === null || _m === void 0 ? void 0 : _m.find(level => level.id == this.selectedBuildingLevelId)
|
|
240
|
+
: (_p = (_o = this.selectedBuilding) === null || _o === void 0 ? void 0 : _o.buildingLevels) === null || _p === void 0 ? void 0 : _p[0];
|
|
241
|
+
this.selectedConstructionDetailType = (_r = (_q = this.selectedConstructionType) === null || _q === void 0 ? void 0 : _q.constructionDetailTypes) === null || _r === void 0 ? void 0 : _r[0];
|
|
242
|
+
this.selectedInspectionParts = [];
|
|
243
|
+
// 동, 층이 랜더링 된 후에 select를 위해 이 시점에서 랜더링
|
|
244
|
+
this.selectedBuilding = await Object.assign({}, this.selectedBuilding);
|
|
245
|
+
this.selectedConstructionType = await Object.assign({}, this.selectedConstructionType);
|
|
246
|
+
// 기본 값 셋팅 select
|
|
247
|
+
await this.htmlSelectBuilding.select(this.selectedBuilding.id);
|
|
248
|
+
await this.htmlSelectLevel.select(this.selectedLevel.id);
|
|
249
|
+
await this.htmlSelectConstructionType.select(this.selectedConstructionType.id);
|
|
250
|
+
await this.htmlSelectConstructionDetailType.select(this.selectedConstructionDetailType.id);
|
|
251
|
+
await this.htmlSelectInspectionDrawingType.select(this.selectedInspectionDrawingType.id);
|
|
252
|
+
await this.htmlSelectChecklistTemplate.selectIndex(0);
|
|
253
|
+
this.checklist = {
|
|
254
|
+
constructionType: (_s = this.selectedConstructionType) === null || _s === void 0 ? void 0 : _s.name,
|
|
255
|
+
constructionDetailType: (_t = this.selectedConstructionDetailType) === null || _t === void 0 ? void 0 : _t.name,
|
|
256
|
+
location: `${((_u = this.selectedBuilding) === null || _u === void 0 ? void 0 : _u.name) || ''} ${this.selectedLevel.floor || ''}층`,
|
|
257
|
+
documentNo: '0000-000-000000'
|
|
258
|
+
};
|
|
259
|
+
// 그리드 셋팅
|
|
260
|
+
this.setGristConfig();
|
|
261
|
+
}
|
|
262
|
+
async _getBuilding(buildingId = '') {
|
|
263
|
+
var _a;
|
|
264
|
+
const response = await client.query({
|
|
265
|
+
query: gql `
|
|
266
|
+
query Building($id: String!) {
|
|
267
|
+
building(id: $id) {
|
|
268
|
+
id
|
|
269
|
+
name
|
|
270
|
+
buildingLevels {
|
|
271
|
+
id
|
|
272
|
+
floor
|
|
273
|
+
mainDrawing {
|
|
274
|
+
id
|
|
275
|
+
name
|
|
276
|
+
fullpath
|
|
277
|
+
}
|
|
278
|
+
mainDrawingImage
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
`,
|
|
283
|
+
variables: {
|
|
284
|
+
id: buildingId
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
if (response.errors)
|
|
288
|
+
return;
|
|
289
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.building) || {};
|
|
290
|
+
}
|
|
291
|
+
async _getConstructionType(id = '') {
|
|
292
|
+
var _a;
|
|
293
|
+
const response = await client.query({
|
|
294
|
+
query: gql `
|
|
295
|
+
query ConstructionType($id: String!) {
|
|
296
|
+
constructionType(id: $id) {
|
|
297
|
+
id
|
|
298
|
+
name
|
|
299
|
+
description
|
|
300
|
+
constructionDetailTypes {
|
|
301
|
+
id
|
|
302
|
+
name
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
`,
|
|
307
|
+
variables: { id }
|
|
308
|
+
});
|
|
309
|
+
if (response.errors)
|
|
310
|
+
return;
|
|
311
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionType) || {};
|
|
312
|
+
}
|
|
313
|
+
async _getInspectionDrawingType(id = '') {
|
|
314
|
+
var _a;
|
|
315
|
+
const response = await client.query({
|
|
316
|
+
query: gql `
|
|
317
|
+
query InspectionDrawingType($id: String!) {
|
|
318
|
+
inspectionDrawingType(id: $id) {
|
|
319
|
+
id
|
|
320
|
+
name
|
|
321
|
+
inspectionParts {
|
|
322
|
+
id
|
|
323
|
+
name
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
`,
|
|
328
|
+
variables: { id }
|
|
329
|
+
});
|
|
330
|
+
if (response.errors)
|
|
331
|
+
return;
|
|
332
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.inspectionDrawingType) || {};
|
|
333
|
+
}
|
|
334
|
+
async _onSelectBuilding(e) {
|
|
335
|
+
var _a, _b, _c;
|
|
336
|
+
const buildingId = e.target.value;
|
|
337
|
+
this.selectedBuilding = await this._getBuilding(buildingId);
|
|
338
|
+
this.selectedLevel = await Object.assign({}, (_b = (_a = this.selectedBuilding) === null || _a === void 0 ? void 0 : _a.buildingLevels) === null || _b === void 0 ? void 0 : _b[0]);
|
|
339
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { location: `${((_c = this.selectedBuilding) === null || _c === void 0 ? void 0 : _c.name) || ''} ${this.selectedLevel.floor || ''}층` });
|
|
340
|
+
await this.htmlSelectLevel.selectIndex(0);
|
|
341
|
+
}
|
|
342
|
+
_onSelectBuildingLevel(e) {
|
|
343
|
+
var _a, _b, _c;
|
|
344
|
+
const buildingLevelId = e.target.value;
|
|
345
|
+
this.selectedLevel = Object.assign({}, (((_b = (_a = this.selectedBuilding) === null || _a === void 0 ? void 0 : _a.buildingLevels) === null || _b === void 0 ? void 0 : _b.find(v => v.id == buildingLevelId)) || {}));
|
|
346
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { location: `${((_c = this.selectedBuilding) === null || _c === void 0 ? void 0 : _c.name) || ''} ${this.selectedLevel.floor || ''}층` });
|
|
347
|
+
}
|
|
348
|
+
async _onSelectConstructionType(e) {
|
|
349
|
+
var _a, _b, _c, _d;
|
|
350
|
+
const constructionTypeId = e.target.value;
|
|
351
|
+
this.selectedConstructionType = await this._getConstructionType(constructionTypeId);
|
|
352
|
+
this.selectedConstructionDetailType = await Object.assign({}, (_b = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.constructionDetailTypes) === null || _b === void 0 ? void 0 : _b[0]);
|
|
353
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { constructionType: (_c = this.selectedConstructionType) === null || _c === void 0 ? void 0 : _c.name, constructionDetailType: (_d = this.selectedConstructionDetailType) === null || _d === void 0 ? void 0 : _d.name });
|
|
354
|
+
await this.htmlSelectConstructionDetailType.selectIndex(0);
|
|
355
|
+
}
|
|
356
|
+
_onSelectConstructionDetailType(e) {
|
|
357
|
+
var _a, _b, _c, _d;
|
|
358
|
+
const constructionDetailTypeId = e.target.value;
|
|
359
|
+
this.selectedConstructionDetailType = Object.assign({}, (((_b = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.constructionDetailTypes) === null || _b === void 0 ? void 0 : _b.find(v => v.id == constructionDetailTypeId)) || {}));
|
|
360
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { constructionType: (_c = this.selectedConstructionType) === null || _c === void 0 ? void 0 : _c.name, constructionDetailType: (_d = this.selectedConstructionDetailType) === null || _d === void 0 ? void 0 : _d.name });
|
|
361
|
+
}
|
|
362
|
+
async _onSelectInspectionDrawingType(e) {
|
|
363
|
+
const inspectionDrawingTypeId = e.target.value;
|
|
364
|
+
this.selectedInspectionDrawingType = await this._getInspectionDrawingType(inspectionDrawingTypeId);
|
|
365
|
+
this.selectedInspectionParts = [];
|
|
366
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { inspectionParts: this.selectedInspectionParts });
|
|
367
|
+
}
|
|
368
|
+
async _onSelectInspectionPart(part) {
|
|
369
|
+
if (this.selectedInspectionParts.includes(part.name)) {
|
|
370
|
+
this.selectedInspectionParts = this.selectedInspectionParts.filter(item => item !== part.name);
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
this.selectedInspectionParts.push(part.name);
|
|
374
|
+
}
|
|
375
|
+
this.selectedInspectionParts = [...this.selectedInspectionParts];
|
|
376
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { inspectionParts: this.selectedInspectionParts });
|
|
377
|
+
}
|
|
378
|
+
isSelected(option) {
|
|
379
|
+
return this.selectedInspectionParts.includes(option.name);
|
|
380
|
+
}
|
|
381
|
+
requestRefresh() {
|
|
382
|
+
this.dispatchEvent(new CustomEvent('requestRefresh'));
|
|
383
|
+
}
|
|
384
|
+
_close() {
|
|
385
|
+
history.back();
|
|
386
|
+
}
|
|
387
|
+
setGristConfig() {
|
|
388
|
+
this.gristConfig = {
|
|
389
|
+
columns: [
|
|
390
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
391
|
+
{
|
|
392
|
+
type: 'gutter',
|
|
393
|
+
gutterName: 'button',
|
|
394
|
+
icon: 'arrow_upward',
|
|
395
|
+
handlers: {
|
|
396
|
+
click: 'move-up'
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
type: 'gutter',
|
|
401
|
+
gutterName: 'button',
|
|
402
|
+
icon: 'arrow_downward',
|
|
403
|
+
handlers: {
|
|
404
|
+
click: 'move-down'
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: 'select',
|
|
409
|
+
name: 'mainType',
|
|
410
|
+
header: '구분',
|
|
411
|
+
record: {
|
|
412
|
+
editable: true,
|
|
413
|
+
options: [{ display: '', value: '' }].concat(Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key })))
|
|
414
|
+
},
|
|
415
|
+
width: 100
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
type: 'select',
|
|
419
|
+
name: 'detailType',
|
|
420
|
+
header: '상세 구분',
|
|
421
|
+
record: {
|
|
422
|
+
editable: true,
|
|
423
|
+
options: (columns, data, column) => [
|
|
424
|
+
{ display: '', value: '' },
|
|
425
|
+
...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
width: 200
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
type: 'string',
|
|
432
|
+
name: 'name',
|
|
433
|
+
header: '검사 항목',
|
|
434
|
+
record: {
|
|
435
|
+
editable: true
|
|
436
|
+
},
|
|
437
|
+
width: 200
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
type: 'string',
|
|
441
|
+
name: 'inspctionCriteria',
|
|
442
|
+
header: '검사 기준',
|
|
443
|
+
record: {
|
|
444
|
+
editable: true
|
|
445
|
+
},
|
|
446
|
+
width: 200
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
pagination: {
|
|
450
|
+
infinite: true
|
|
451
|
+
},
|
|
452
|
+
sorters: [{ name: 'mainType' }, { name: 'sequence' }]
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
async fetchHandler() {
|
|
456
|
+
if (!this.checklistTemplateId)
|
|
457
|
+
return [];
|
|
458
|
+
const response = await client.query({
|
|
459
|
+
query: gql `
|
|
460
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
461
|
+
checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
462
|
+
items {
|
|
463
|
+
id
|
|
464
|
+
sequence
|
|
465
|
+
name
|
|
466
|
+
inspctionCriteria
|
|
467
|
+
mainType
|
|
468
|
+
detailType
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
`,
|
|
473
|
+
variables: {
|
|
474
|
+
filters: {
|
|
475
|
+
name: 'checklistTemplateId',
|
|
476
|
+
value: this.checklistTemplateId,
|
|
477
|
+
operator: 'eq'
|
|
478
|
+
},
|
|
479
|
+
sortings: [{ name: 'mainType' }, { name: 'sequence' }]
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
return {
|
|
483
|
+
records: response.data.checklistTemplateItems.items || []
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
_onSelectChecklistTemplate(e) {
|
|
487
|
+
const checklistTemplateId = e.target.value;
|
|
488
|
+
// 그리드 아이템 셋팅
|
|
489
|
+
if (checklistTemplateId) {
|
|
490
|
+
this.checklistTemplateId = checklistTemplateId;
|
|
491
|
+
this.grist.fetch();
|
|
492
|
+
}
|
|
493
|
+
// 체크 리스트 이름 셋팅
|
|
494
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { name: e.target.displayText });
|
|
495
|
+
// 체크리스트 아이템 데이터 갱신
|
|
496
|
+
this.onChangeGird();
|
|
497
|
+
}
|
|
498
|
+
async _createInspection() {
|
|
499
|
+
var _a, _b, _c;
|
|
500
|
+
let patch = {};
|
|
501
|
+
patch.buildingLevelId = this.htmlSelectLevel.value;
|
|
502
|
+
patch.checklist = {
|
|
503
|
+
name: this.checklist.name,
|
|
504
|
+
constructionType: this.htmlSelectConstructionType.displayText,
|
|
505
|
+
constructionDetailType: this.htmlSelectConstructionDetailType.displayText,
|
|
506
|
+
location: `${this.htmlSelectBuilding.displayText} ${this.htmlSelectLevel.displayText}층`,
|
|
507
|
+
inspectionDrawingType: this.selectedInspectionDrawingType.name,
|
|
508
|
+
inspectionParts: this.checklist.inspectionParts
|
|
509
|
+
};
|
|
510
|
+
patch.checklistItem = (_a = this.checklist.checklistItems) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
511
|
+
return {
|
|
512
|
+
name: item.name,
|
|
513
|
+
mainType: item.mainType,
|
|
514
|
+
detailType: item.detailType,
|
|
515
|
+
inspctionCriteria: item.inspctionCriteria
|
|
516
|
+
};
|
|
517
|
+
});
|
|
518
|
+
const response = await client.mutate({
|
|
519
|
+
mutation: gql `
|
|
520
|
+
mutation CreateBuildingInspection($patch: NewBuildingInspection!) {
|
|
521
|
+
createBuildingInspection(patch: $patch) {
|
|
522
|
+
id
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
`,
|
|
526
|
+
variables: {
|
|
527
|
+
patch
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
if (!response.errors) {
|
|
531
|
+
notify({ message: '검측 요청서를 등록하였습니다.' });
|
|
532
|
+
this.requestRefresh();
|
|
533
|
+
this._close();
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
notify({ message: ((_c = (_b = response.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
540
|
+
_onInputChange(event) {
|
|
541
|
+
const target = event.target;
|
|
542
|
+
this[target.name] = target.value;
|
|
543
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { name: target.value });
|
|
544
|
+
}
|
|
545
|
+
// 체크리스트 아이템 데이터 갱신
|
|
546
|
+
onChangeGird() {
|
|
547
|
+
const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]));
|
|
548
|
+
const grist = this.grist;
|
|
549
|
+
// grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경
|
|
550
|
+
setTimeout(() => {
|
|
551
|
+
this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {
|
|
552
|
+
return Object.assign(Object.assign({}, row), { detailType: checklistDetailTypes[row.detailType], sequence: idx });
|
|
553
|
+
});
|
|
554
|
+
this.checklist = Object.assign({}, this.checklist);
|
|
555
|
+
}, 100);
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
InspectionCreatePopup.styles = [
|
|
559
|
+
ButtonContainerStyles,
|
|
560
|
+
ScrollbarStyles,
|
|
561
|
+
css `
|
|
562
|
+
:host {
|
|
563
|
+
display: flex;
|
|
564
|
+
flex-direction: column;
|
|
565
|
+
|
|
566
|
+
background-color: var(--md-sys-color-surface);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
md-filled-select {
|
|
570
|
+
width: auto;
|
|
571
|
+
min-width: 150px;
|
|
572
|
+
--md-filled-select-text-field-container-color: transparent;
|
|
573
|
+
--md-filled-select-text-field-active-indicator-color: #999;
|
|
574
|
+
--md-filled-select-text-field-input-text-size: 14px;
|
|
575
|
+
--md-filled-select-text-field-input-text-weight: bold;
|
|
576
|
+
--md-filled-select-text-field-input-text-line-height: 6px;
|
|
577
|
+
}
|
|
578
|
+
md-filled-select[level] {
|
|
579
|
+
min-width: 110px;
|
|
580
|
+
margin-left: 20px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
checklist-view {
|
|
584
|
+
pointer-events: none;
|
|
585
|
+
transform-origin: top left;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
div[body] {
|
|
589
|
+
display: flex;
|
|
590
|
+
height: 100%;
|
|
591
|
+
gap: 15px;
|
|
592
|
+
justify-content: flex-start;
|
|
593
|
+
overflow-y: auto;
|
|
594
|
+
|
|
595
|
+
div[left] {
|
|
596
|
+
width: 60%;
|
|
597
|
+
|
|
598
|
+
div[block-name] {
|
|
599
|
+
position: relative;
|
|
600
|
+
|
|
601
|
+
hr {
|
|
602
|
+
position: absolute;
|
|
603
|
+
width: 100%;
|
|
604
|
+
margin-block: 0;
|
|
605
|
+
top: 50%;
|
|
606
|
+
}
|
|
607
|
+
span {
|
|
608
|
+
position: relative;
|
|
609
|
+
background-color: var(--md-sys-color-surface);
|
|
610
|
+
margin-left: 1rem;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
div[right] {
|
|
616
|
+
display: flex;
|
|
617
|
+
overflow-y: auto;
|
|
618
|
+
overflow-x: hidden;
|
|
619
|
+
max-width: calc(40% - 15px);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
`
|
|
623
|
+
];
|
|
624
|
+
__decorate([
|
|
625
|
+
property({ type: Object }),
|
|
626
|
+
__metadata("design:type", Object)
|
|
627
|
+
], InspectionCreatePopup.prototype, "gristConfig", void 0);
|
|
628
|
+
__decorate([
|
|
629
|
+
property({ type: Object }),
|
|
630
|
+
__metadata("design:type", Object)
|
|
631
|
+
], InspectionCreatePopup.prototype, "checklistDetailTypes", void 0);
|
|
632
|
+
__decorate([
|
|
633
|
+
property({ type: String }),
|
|
634
|
+
__metadata("design:type", String)
|
|
635
|
+
], InspectionCreatePopup.prototype, "projectId", void 0);
|
|
636
|
+
__decorate([
|
|
637
|
+
property({ type: String }),
|
|
638
|
+
__metadata("design:type", String)
|
|
639
|
+
], InspectionCreatePopup.prototype, "checklistTemplateId", void 0);
|
|
640
|
+
__decorate([
|
|
641
|
+
property({ type: String }),
|
|
642
|
+
__metadata("design:type", String)
|
|
643
|
+
], InspectionCreatePopup.prototype, "selectedBuildingId", void 0);
|
|
644
|
+
__decorate([
|
|
645
|
+
property({ type: String }),
|
|
646
|
+
__metadata("design:type", String)
|
|
647
|
+
], InspectionCreatePopup.prototype, "selectedBuildingLevelId", void 0);
|
|
648
|
+
__decorate([
|
|
649
|
+
state(),
|
|
650
|
+
__metadata("design:type", Object)
|
|
651
|
+
], InspectionCreatePopup.prototype, "buildings", void 0);
|
|
652
|
+
__decorate([
|
|
653
|
+
state(),
|
|
654
|
+
__metadata("design:type", Object)
|
|
655
|
+
], InspectionCreatePopup.prototype, "selectedBuilding", void 0);
|
|
656
|
+
__decorate([
|
|
657
|
+
state(),
|
|
658
|
+
__metadata("design:type", Object)
|
|
659
|
+
], InspectionCreatePopup.prototype, "selectedLevel", void 0);
|
|
660
|
+
__decorate([
|
|
661
|
+
state(),
|
|
662
|
+
__metadata("design:type", Object)
|
|
663
|
+
], InspectionCreatePopup.prototype, "constructionTypes", void 0);
|
|
664
|
+
__decorate([
|
|
665
|
+
state(),
|
|
666
|
+
__metadata("design:type", Object)
|
|
667
|
+
], InspectionCreatePopup.prototype, "selectedConstructionType", void 0);
|
|
668
|
+
__decorate([
|
|
669
|
+
state(),
|
|
670
|
+
__metadata("design:type", Object)
|
|
671
|
+
], InspectionCreatePopup.prototype, "selectedConstructionDetailType", void 0);
|
|
672
|
+
__decorate([
|
|
673
|
+
state(),
|
|
674
|
+
__metadata("design:type", Object)
|
|
675
|
+
], InspectionCreatePopup.prototype, "inspectionDrawingTypes", void 0);
|
|
676
|
+
__decorate([
|
|
677
|
+
state(),
|
|
678
|
+
__metadata("design:type", Object)
|
|
679
|
+
], InspectionCreatePopup.prototype, "selectedInspectionDrawingType", void 0);
|
|
680
|
+
__decorate([
|
|
681
|
+
state(),
|
|
682
|
+
__metadata("design:type", Array)
|
|
683
|
+
], InspectionCreatePopup.prototype, "selectedInspectionParts", void 0);
|
|
684
|
+
__decorate([
|
|
685
|
+
state(),
|
|
686
|
+
__metadata("design:type", Object)
|
|
687
|
+
], InspectionCreatePopup.prototype, "checklistTemplates", void 0);
|
|
688
|
+
__decorate([
|
|
689
|
+
state(),
|
|
690
|
+
__metadata("design:type", Object)
|
|
691
|
+
], InspectionCreatePopup.prototype, "checklist", void 0);
|
|
692
|
+
__decorate([
|
|
693
|
+
query('md-filled-select[building]'),
|
|
694
|
+
__metadata("design:type", Object)
|
|
695
|
+
], InspectionCreatePopup.prototype, "htmlSelectBuilding", void 0);
|
|
696
|
+
__decorate([
|
|
697
|
+
query('md-filled-select[level]'),
|
|
698
|
+
__metadata("design:type", Object)
|
|
699
|
+
], InspectionCreatePopup.prototype, "htmlSelectLevel", void 0);
|
|
700
|
+
__decorate([
|
|
701
|
+
query('md-filled-select[constructionType]'),
|
|
702
|
+
__metadata("design:type", Object)
|
|
703
|
+
], InspectionCreatePopup.prototype, "htmlSelectConstructionType", void 0);
|
|
704
|
+
__decorate([
|
|
705
|
+
query('md-filled-select[constructionDetailType]'),
|
|
706
|
+
__metadata("design:type", Object)
|
|
707
|
+
], InspectionCreatePopup.prototype, "htmlSelectConstructionDetailType", void 0);
|
|
708
|
+
__decorate([
|
|
709
|
+
query('md-filled-select[inspectionDrawingType]'),
|
|
710
|
+
__metadata("design:type", Object)
|
|
711
|
+
], InspectionCreatePopup.prototype, "htmlSelectInspectionDrawingType", void 0);
|
|
712
|
+
__decorate([
|
|
713
|
+
query('md-filled-select[inspectionPart]'),
|
|
714
|
+
__metadata("design:type", Object)
|
|
715
|
+
], InspectionCreatePopup.prototype, "htmlSelectInspectionPart", void 0);
|
|
716
|
+
__decorate([
|
|
717
|
+
query('md-filled-select[checklistTemplate]'),
|
|
718
|
+
__metadata("design:type", Object)
|
|
719
|
+
], InspectionCreatePopup.prototype, "htmlSelectChecklistTemplate", void 0);
|
|
720
|
+
__decorate([
|
|
721
|
+
query('ox-grist'),
|
|
722
|
+
__metadata("design:type", DataGrist)
|
|
723
|
+
], InspectionCreatePopup.prototype, "grist", void 0);
|
|
724
|
+
__decorate([
|
|
725
|
+
query('div[right]'),
|
|
726
|
+
__metadata("design:type", HTMLDivElement)
|
|
727
|
+
], InspectionCreatePopup.prototype, "checklistViewContainer", void 0);
|
|
728
|
+
__decorate([
|
|
729
|
+
query('checklist-view'),
|
|
730
|
+
__metadata("design:type", HTMLElement)
|
|
731
|
+
], InspectionCreatePopup.prototype, "checklistView", void 0);
|
|
732
|
+
InspectionCreatePopup = __decorate([
|
|
733
|
+
customElement('inspection-create-popup')
|
|
734
|
+
], InspectionCreatePopup);
|
|
735
|
+
//# sourceMappingURL=inspection-create-popup.js.map
|