@dssp/supervision 1.0.0-alpha.66 → 1.0.0-alpha.74
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-ai-defect.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +2 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +16 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-management.d.ts +72 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js +1256 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +8 -3
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +0 -3
- package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +5 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +62 -3
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +8 -2
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +791 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.js +76 -5
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
- package/dist-client/pages/checklist-database/checklist-database.js +539 -0
- package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +242 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js +409 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
- package/dist-client/pages/project-checklist/project-checklist-management.d.ts +50 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js +910 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +12 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
- package/dist-server/service/action-plan/action-plan-query.js +5 -11
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +3 -3
- 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 -2
- package/dist-server/service/building-inspection/building-inspection-query.js +19 -22
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +1 -0
- package/dist-server/service/building-inspection/building-inspection-type.js +4 -0
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.js +14 -1
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
- package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template/index.js +9 -0
- package/dist-server/service/construction-checklist-template/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +60 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template-item/index.js +9 -0
- package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.d.ts +2 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js +50 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js.map +1 -0
- package/dist-server/service/index.d.ts +5 -1
- package/dist-server/service/index.js +16 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +5 -6
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.d.ts +2 -2
- package/dist-server/service/issue/issue-query.js +5 -11
- package/dist-server/service/issue/issue-query.js.map +1 -1
- package/dist-server/service/project-checklist/index.d.ts +5 -0
- package/dist-server/service/project-checklist/index.js +9 -0
- package/dist-server/service/project-checklist/index.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js +109 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
- package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
- package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
- package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
- package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
- package/dist-server/service/project-checklist/project-checklist.js +90 -0
- package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
- package/dist-server/service/project-checklist-item/index.d.ts +4 -0
- package/dist-server/service/project-checklist-item/index.js +9 -0
- package/dist-server/service/project-checklist-item/index.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +17 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js +82 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
- package/dist-server/service/project-report/project-report-mutation.js +5 -6
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.d.ts +2 -2
- package/dist-server/service/project-report/project-report-query.js +5 -11
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
- package/dist-server/service/supervisor/supervisor-query.js +5 -11
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/things-factory.config.js +7 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { __decorate, __metadata, __rest } 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 } from 'lit/decorators.js';
|
|
7
|
+
import { DataGrist } from '@operato/data-grist/ox-grist.js';
|
|
8
|
+
import { client } from '@operato/graphql';
|
|
9
|
+
import { ButtonContainerStyles } from '@operato/styles';
|
|
10
|
+
import { notify } from '@operato/layout';
|
|
11
|
+
let ConstructionChecklistTemplateItemPopup = class ConstructionChecklistTemplateItemPopup extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
<ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
|
15
|
+
<div class="button-container">
|
|
16
|
+
<button danger @click=${this._delete.bind(this)}><md-icon>delete</md-icon>삭제</button>
|
|
17
|
+
<button @click=${this._save.bind(this)}><md-icon>save</md-icon>저장</button>
|
|
18
|
+
</div>
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
async firstUpdated() {
|
|
22
|
+
this.gristConfig = {
|
|
23
|
+
columns: [
|
|
24
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
25
|
+
{
|
|
26
|
+
type: 'gutter',
|
|
27
|
+
gutterName: 'button',
|
|
28
|
+
fixed: true,
|
|
29
|
+
icon: 'add',
|
|
30
|
+
handlers: { click: 'record-copy' }
|
|
31
|
+
},
|
|
32
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
33
|
+
{
|
|
34
|
+
type: 'gutter',
|
|
35
|
+
gutterName: 'button',
|
|
36
|
+
icon: 'arrow_upward',
|
|
37
|
+
handlers: { click: 'move-up' }
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'gutter',
|
|
41
|
+
gutterName: 'button',
|
|
42
|
+
icon: 'arrow_downward',
|
|
43
|
+
handlers: { click: 'move-down' }
|
|
44
|
+
},
|
|
45
|
+
{ type: 'number', name: 'sequence', hidden: true },
|
|
46
|
+
{ type: 'string', name: 'id', hidden: true },
|
|
47
|
+
{
|
|
48
|
+
type: 'string',
|
|
49
|
+
name: 'mainType',
|
|
50
|
+
header: '구분',
|
|
51
|
+
record: { editable: true },
|
|
52
|
+
width: 120
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'string',
|
|
56
|
+
name: 'name',
|
|
57
|
+
header: '검사항목',
|
|
58
|
+
record: { editable: true },
|
|
59
|
+
width: 200
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'string',
|
|
63
|
+
name: 'recommendation1',
|
|
64
|
+
header: '추천 검사 항목 1',
|
|
65
|
+
record: { editable: true },
|
|
66
|
+
width: 180
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: 'string',
|
|
70
|
+
name: 'recommendation2',
|
|
71
|
+
header: '추천 검사 항목 2',
|
|
72
|
+
record: { editable: true },
|
|
73
|
+
width: 180
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'string',
|
|
77
|
+
name: 'recommendation3',
|
|
78
|
+
header: '추천 검사 항목 3',
|
|
79
|
+
record: { editable: true },
|
|
80
|
+
width: 180
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: 'string',
|
|
84
|
+
name: 'recommendation4',
|
|
85
|
+
header: '추천 검사 항목 4',
|
|
86
|
+
record: { editable: true },
|
|
87
|
+
width: 180
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'string',
|
|
91
|
+
name: 'recommendation5',
|
|
92
|
+
header: '추천 검사 항목 5',
|
|
93
|
+
record: { editable: true },
|
|
94
|
+
width: 180
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: 'string',
|
|
98
|
+
name: 'inspctionCriteria',
|
|
99
|
+
header: '검사 기준 (AI)',
|
|
100
|
+
record: { editable: false },
|
|
101
|
+
width: 250
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'string',
|
|
105
|
+
name: 'criteriaRequestStatus',
|
|
106
|
+
header: '요청 상태',
|
|
107
|
+
record: { align: 'center', editable: false },
|
|
108
|
+
width: 100
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
rows: {
|
|
112
|
+
selectable: { multiple: true }
|
|
113
|
+
},
|
|
114
|
+
pagination: { infinite: true },
|
|
115
|
+
sorters: [{ name: 'sequence' }]
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
async fetchHandler({ page, limit, sorters = [] }) {
|
|
119
|
+
var _a, _b, _c, _d, _e;
|
|
120
|
+
const response = await client.query({
|
|
121
|
+
query: gql `
|
|
122
|
+
query ($filters: [Filter!], $sortings: [Sorting!]) {
|
|
123
|
+
constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {
|
|
124
|
+
items {
|
|
125
|
+
id
|
|
126
|
+
sequence
|
|
127
|
+
mainType
|
|
128
|
+
name
|
|
129
|
+
recommendation1
|
|
130
|
+
recommendation2
|
|
131
|
+
recommendation3
|
|
132
|
+
recommendation4
|
|
133
|
+
recommendation5
|
|
134
|
+
inspctionCriteria
|
|
135
|
+
criteriaRequestStatus
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
`,
|
|
140
|
+
variables: {
|
|
141
|
+
filters: {
|
|
142
|
+
name: 'constructionChecklistTemplateId',
|
|
143
|
+
value: this.constructionChecklistTemplate.id,
|
|
144
|
+
operator: 'eq'
|
|
145
|
+
},
|
|
146
|
+
sortings: [{ name: 'sequence' }]
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
total: ((_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionChecklistTemplateItems) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.length) || 0,
|
|
151
|
+
records: ((_e = (_d = response.data) === null || _d === void 0 ? void 0 : _d.constructionChecklistTemplateItems) === null || _e === void 0 ? void 0 : _e.items) || []
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
async _delete() {
|
|
155
|
+
if (confirm('삭제하시겠습니까?')) {
|
|
156
|
+
const ids = this.grist.selected.map(record => record.id);
|
|
157
|
+
if (ids && ids.length > 0) {
|
|
158
|
+
const response = await client.mutate({
|
|
159
|
+
mutation: gql `
|
|
160
|
+
mutation ($ids: [String!]!) {
|
|
161
|
+
deleteConstructionChecklistTemplateItems(ids: $ids)
|
|
162
|
+
}
|
|
163
|
+
`,
|
|
164
|
+
variables: { ids }
|
|
165
|
+
});
|
|
166
|
+
if (!response.errors) {
|
|
167
|
+
this.grist.fetch();
|
|
168
|
+
notify({ message: '삭제되었습니다.' });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
async _save() {
|
|
174
|
+
let patches = this.grist.dirtyData.records;
|
|
175
|
+
if (patches) {
|
|
176
|
+
patches = patches.map(patch => {
|
|
177
|
+
const _a = patch.__origin__, _b = _a === void 0 ? {} : _a, { __typename } = _b, patchField = __rest(_b, ["__typename"]), { __dirtyfields__ } = patch;
|
|
178
|
+
for (let key in __dirtyfields__) {
|
|
179
|
+
patchField[key] = __dirtyfields__[key].after;
|
|
180
|
+
}
|
|
181
|
+
// 서버 전용 필드 제거
|
|
182
|
+
delete patchField.inspctionCriteria;
|
|
183
|
+
delete patchField.criteriaRequestStatus;
|
|
184
|
+
return patchField;
|
|
185
|
+
});
|
|
186
|
+
const response = await client.mutate({
|
|
187
|
+
mutation: gql `
|
|
188
|
+
mutation ($templateId: String!, $patches: [ConstructionChecklistTemplateItemPatch!]!) {
|
|
189
|
+
updateMultipleConstructionChecklistTemplateItems(
|
|
190
|
+
constructionChecklistTemplateId: $templateId
|
|
191
|
+
patches: $patches
|
|
192
|
+
) {
|
|
193
|
+
id
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
`,
|
|
197
|
+
variables: {
|
|
198
|
+
templateId: this.constructionChecklistTemplate.id,
|
|
199
|
+
patches
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
if (!response.errors) {
|
|
203
|
+
this.grist.fetch();
|
|
204
|
+
notify({ message: '저장되었습니다.' });
|
|
205
|
+
this.dispatchEvent(new CustomEvent('requestRefresh'));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
notify({ message: '저장에 실패하였습니다.', level: 'error' });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
ConstructionChecklistTemplateItemPopup.styles = [
|
|
214
|
+
ButtonContainerStyles,
|
|
215
|
+
css `
|
|
216
|
+
:host {
|
|
217
|
+
display: flex;
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
background-color: var(--md-sys-color-surface);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
ox-grist {
|
|
223
|
+
flex: 1;
|
|
224
|
+
}
|
|
225
|
+
`
|
|
226
|
+
];
|
|
227
|
+
__decorate([
|
|
228
|
+
property({ type: Object }),
|
|
229
|
+
__metadata("design:type", Object)
|
|
230
|
+
], ConstructionChecklistTemplateItemPopup.prototype, "constructionChecklistTemplate", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: Object }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], ConstructionChecklistTemplateItemPopup.prototype, "gristConfig", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
query('ox-grist'),
|
|
237
|
+
__metadata("design:type", DataGrist)
|
|
238
|
+
], ConstructionChecklistTemplateItemPopup.prototype, "grist", void 0);
|
|
239
|
+
ConstructionChecklistTemplateItemPopup = __decorate([
|
|
240
|
+
customElement('construction-checklist-template-item-popup')
|
|
241
|
+
], ConstructionChecklistTemplateItemPopup);
|
|
242
|
+
//# sourceMappingURL=construction-checklist-template-item-popup.js.map
|
package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-checklist-template-item-popup.js","sourceRoot":"","sources":["../../../client/pages/checklist-template/construction-checklist-template-item-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAGxC,IAAM,sCAAsC,GAA5C,MAAM,sCAAuC,SAAQ,UAAU;IAqB7D,MAAM;QACJ,OAAO,IAAI,CAAA;wBACS,MAAM,YAAY,IAAI,CAAC,WAAW,kBAAkB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;gCAExE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;yBAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;;KAEzC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,WAAW,GAAG;YAC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AM,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;YACrD,CAAC;QACH,CAAC;IACH,CAAC;;AAjOM,6CAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;KAUF;CACF,AAbY,CAaZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6FAAmC;AAClC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2EAAiB;AAEzB;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;qEAAA;AAnBhC,sCAAsC;IAD3C,aAAa,CAAC,4CAA4C,CAAC;GACtD,sCAAsC,CAmO3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles } from '@operato/styles'\nimport { FetchOption } from '@operato/data-grist'\nimport { notify } from '@operato/layout'\n\n@customElement('construction-checklist-template-item-popup')\nclass ConstructionChecklistTemplateItemPopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--md-sys-color-surface);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) constructionChecklistTemplate: any\n @property({ type: Object }) gristConfig: any\n\n @query('ox-grist') grist!: DataGrist\n\n render() {\n return html`\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>\n <div class=\"button-container\">\n <button danger @click=${this._delete.bind(this)}><md-icon>delete</md-icon>삭제</button>\n <button @click=${this._save.bind(this)}><md-icon>save</md-icon>저장</button>\n </div>\n `\n }\n\n async firstUpdated() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: 'add',\n handlers: { click: 'record-copy' }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: { click: 'move-up' }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: { click: 'move-down' }\n },\n { type: 'number', name: 'sequence', hidden: true },\n { type: 'string', name: 'id', hidden: true },\n {\n type: 'string',\n name: 'mainType',\n header: '구분',\n record: { editable: true },\n width: 120\n },\n {\n type: 'string',\n name: 'name',\n header: '검사항목',\n record: { editable: true },\n width: 200\n },\n {\n type: 'string',\n name: 'recommendation1',\n header: '추천 검사 항목 1',\n record: { editable: true },\n width: 180\n },\n {\n type: 'string',\n name: 'recommendation2',\n header: '추천 검사 항목 2',\n record: { editable: true },\n width: 180\n },\n {\n type: 'string',\n name: 'recommendation3',\n header: '추천 검사 항목 3',\n record: { editable: true },\n width: 180\n },\n {\n type: 'string',\n name: 'recommendation4',\n header: '추천 검사 항목 4',\n record: { editable: true },\n width: 180\n },\n {\n type: 'string',\n name: 'recommendation5',\n header: '추천 검사 항목 5',\n record: { editable: true },\n width: 180\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준 (AI)',\n record: { editable: false },\n width: 250\n },\n {\n type: 'string',\n name: 'criteriaRequestStatus',\n header: '요청 상태',\n record: { align: 'center', editable: false },\n width: 100\n }\n ],\n rows: {\n selectable: { multiple: true }\n },\n pagination: { infinite: true },\n sorters: [{ name: 'sequence' }]\n }\n }\n\n async fetchHandler({ page, limit, sorters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $sortings: [Sorting!]) {\n constructionChecklistTemplateItems(filters: $filters, sortings: $sortings) {\n items {\n id\n sequence\n mainType\n name\n recommendation1\n recommendation2\n recommendation3\n recommendation4\n recommendation5\n inspctionCriteria\n criteriaRequestStatus\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'constructionChecklistTemplateId',\n value: this.constructionChecklistTemplate.id,\n operator: 'eq'\n },\n sortings: [{ name: 'sequence' }]\n }\n })\n\n return {\n total: response.data?.constructionChecklistTemplateItems?.items?.length || 0,\n records: response.data?.constructionChecklistTemplateItems?.items || []\n }\n }\n\n private async _delete() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteConstructionChecklistTemplateItems(ids: $ids)\n }\n `,\n variables: { ids }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n async _save() {\n let patches = this.grist.dirtyData.records\n if (patches) {\n patches = patches.map(patch => {\n const { __origin__: { __typename, ...patchField } = {}, __dirtyfields__ } = patch\n for (let key in __dirtyfields__) {\n patchField[key] = __dirtyfields__[key].after\n }\n // 서버 전용 필드 제거\n delete patchField.inspctionCriteria\n delete patchField.criteriaRequestStatus\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($templateId: String!, $patches: [ConstructionChecklistTemplateItemPatch!]!) {\n updateMultipleConstructionChecklistTemplateItems(\n constructionChecklistTemplateId: $templateId\n patches: $patches\n ) {\n id\n }\n }\n `,\n variables: {\n templateId: this.constructionChecklistTemplate.id,\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '저장되었습니다.' })\n this.dispatchEvent(new CustomEvent('requestRefresh'))\n } else {\n notify({ message: '저장에 실패하였습니다.', level: 'error' })\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js';
|
|
3
|
+
import '@operato/data-grist';
|
|
4
|
+
import './construction-checklist-template-item-popup';
|
|
5
|
+
import '../checklist/checklist-view';
|
|
6
|
+
import { PageView } from '@operato/shell';
|
|
7
|
+
import { FetchOption } from '@operato/data-grist';
|
|
8
|
+
declare const ConstructionChecklistTemplateList_base: (new (...args: any[]) => {
|
|
9
|
+
__preferenceProviders: {
|
|
10
|
+
[element: string]: import("@operato/p13n").PagePreferenceProvider;
|
|
11
|
+
};
|
|
12
|
+
getPagePreferenceProvider(element: string): import("@operato/p13n").PagePreferenceProvider | undefined;
|
|
13
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
14
|
+
export declare class ConstructionChecklistTemplateList extends ConstructionChecklistTemplateList_base {
|
|
15
|
+
static styles: import("lit").CSSResult[];
|
|
16
|
+
private gristConfig;
|
|
17
|
+
private constructionTypes;
|
|
18
|
+
private allDetailTypes;
|
|
19
|
+
private grist;
|
|
20
|
+
get context(): {
|
|
21
|
+
title: string;
|
|
22
|
+
search: {
|
|
23
|
+
handler: (search: string) => void;
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
26
|
+
filter: {
|
|
27
|
+
handler: () => void;
|
|
28
|
+
};
|
|
29
|
+
actions: {
|
|
30
|
+
icon: string;
|
|
31
|
+
emphasis: {
|
|
32
|
+
raised: boolean;
|
|
33
|
+
outlined: boolean;
|
|
34
|
+
dense: boolean;
|
|
35
|
+
danger: boolean;
|
|
36
|
+
};
|
|
37
|
+
title: string;
|
|
38
|
+
action: () => Promise<void>;
|
|
39
|
+
}[];
|
|
40
|
+
toolbar: boolean;
|
|
41
|
+
};
|
|
42
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
43
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
44
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
45
|
+
private _buildGristConfig;
|
|
46
|
+
private _fetchConstructionTypes;
|
|
47
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
48
|
+
total: any;
|
|
49
|
+
records: any;
|
|
50
|
+
}>;
|
|
51
|
+
private _save;
|
|
52
|
+
private _delete;
|
|
53
|
+
private _getTemplateItems;
|
|
54
|
+
}
|
|
55
|
+
export {};
|