@dssp/project 1.0.0-alpha.8 → 1.0.0-alpha.80
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/index.d.ts +1 -0
- package/dist-client/index.js +1 -1
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/lib/chatbot-widget.d.ts +53 -0
- package/dist-client/pages/lib/chatbot-widget.js +631 -0
- package/dist-client/pages/lib/chatbot-widget.js.map +1 -0
- package/dist-client/pages/lib/select2-component.d.ts +1 -1
- package/dist-client/pages/lib/select2-component.js +35 -35
- package/dist-client/pages/lib/select2-component.js.map +1 -1
- package/dist-client/pages/project/component/pagenation.d.ts +18 -0
- package/dist-client/pages/project/component/pagenation.js +142 -0
- package/dist-client/pages/project/component/pagenation.js.map +1 -0
- package/dist-client/pages/project/component/project-update-header.js +26 -3
- package/dist-client/pages/project/component/project-update-header.js.map +1 -1
- package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.d.ts +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js +308 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.d.ts +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js +356 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.d.ts +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js +681 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-view.d.ts +32 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-view.js +620 -0
- package/dist-client/pages/project/popup/checklist/task-checklist-view.js.map +1 -0
- package/dist-client/pages/project/popup/popup-plan-export.js +8 -2
- package/dist-client/pages/project/popup/popup-plan-export.js.map +1 -1
- package/dist-client/pages/project/popup/{popup-schedule-upload.d.ts → popup-task-upload.d.ts} +1 -1
- package/dist-client/pages/project/popup/{popup-schedule-upload.js → popup-task-upload.js} +9 -9
- package/dist-client/pages/project/popup/popup-task-upload.js.map +1 -0
- package/dist-client/pages/project/project-completed-list.d.ts +5 -0
- package/dist-client/pages/project/project-completed-list.js +32 -3
- package/dist-client/pages/project/project-completed-list.js.map +1 -1
- package/dist-client/pages/project/project-detail.d.ts +6 -0
- package/dist-client/pages/project/project-detail.js +222 -89
- package/dist-client/pages/project/project-detail.js.map +1 -1
- package/dist-client/pages/project/project-list.d.ts +57 -0
- package/dist-client/pages/project/project-list.js +80 -9
- package/dist-client/pages/project/project-list.js.map +1 -1
- package/dist-client/pages/project/project-plan-management.js +3 -1
- package/dist-client/pages/project/project-plan-management.js.map +1 -1
- package/dist-client/pages/project/project-setting-list.d.ts +7 -0
- package/dist-client/pages/project/project-setting-list.js +61 -7
- package/dist-client/pages/project/project-setting-list.js.map +1 -1
- package/dist-client/pages/project/{project-schedule-list.d.ts → project-task-list.d.ts} +2 -2
- package/dist-client/pages/project/{project-schedule-list.js → project-task-list.js} +11 -11
- package/dist-client/pages/project/project-task-list.js.map +1 -0
- package/dist-client/pages/project/{project-schedule.d.ts → project-task.d.ts} +17 -4
- package/dist-client/pages/project/project-task.js +688 -0
- package/dist-client/pages/project/project-task.js.map +1 -0
- package/dist-client/pages/project/project-update.d.ts +34 -0
- package/dist-client/pages/project/project-update.js +505 -35
- package/dist-client/pages/project/project-update.js.map +1 -1
- package/dist-client/pages/resource/construction-type-management.js +14 -0
- package/dist-client/pages/resource/construction-type-management.js.map +1 -1
- package/dist-client/pages/resource/resource-list-page.d.ts +1 -2
- package/dist-client/pages/resource/resource-list-page.js +1 -2
- package/dist-client/pages/resource/resource-list-page.js.map +1 -1
- package/dist-client/pages/task/task-list-page.d.ts +1 -2
- package/dist-client/pages/task/task-list-page.js +1 -2
- package/dist-client/pages/task/task-list-page.js.map +1 -1
- package/dist-client/pages/task-resource/task-resource-list-page.d.ts +1 -2
- package/dist-client/pages/task-resource/task-resource-list-page.js +1 -2
- package/dist-client/pages/task-resource/task-resource-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +4 -4
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/parse-excel.js.map +1 -1
- package/dist-server/migrations/1723861466414-seed-codes.js +1 -1
- package/dist-server/migrations/1723861466414-seed-codes.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-query.d.ts +2 -2
- package/dist-server/service/construction-type/construction-type-query.js +5 -10
- package/dist-server/service/construction-type/construction-type-query.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-type.d.ts +1 -0
- package/dist-server/service/construction-type/construction-type-type.js +4 -0
- package/dist-server/service/construction-type/construction-type-type.js.map +1 -1
- package/dist-server/service/construction-type/construction-type.d.ts +1 -0
- package/dist-server/service/construction-type/construction-type.js +5 -0
- package/dist-server/service/construction-type/construction-type.js.map +1 -1
- package/dist-server/service/index.d.ts +2 -2
- package/dist-server/service/index.js +5 -2
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.d.ts +2 -2
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +5 -10
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +1 -1
- package/dist-server/service/manager/manager-query.d.ts +1 -1
- package/dist-server/service/manager/manager-query.js +2 -6
- package/dist-server/service/manager/manager-query.js.map +1 -1
- package/dist-server/service/project/issue-project-code.d.ts +7 -0
- package/dist-server/service/project/issue-project-code.js +27 -0
- package/dist-server/service/project/issue-project-code.js.map +1 -0
- package/dist-server/service/project/project-mutation.d.ts +2 -0
- package/dist-server/service/project/project-mutation.js +98 -9
- package/dist-server/service/project/project-mutation.js.map +1 -1
- package/dist-server/service/project/project-query.d.ts +13 -2
- package/dist-server/service/project/project-query.js +138 -13
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/service/project/project-type.d.ts +8 -1
- package/dist-server/service/project/project-type.js +27 -1
- package/dist-server/service/project/project-type.js.map +1 -1
- package/dist-server/service/project/project.d.ts +22 -0
- package/dist-server/service/project/project.js +80 -2
- package/dist-server/service/project/project.js.map +1 -1
- package/dist-server/service/resource/resource-mutation.js +5 -6
- package/dist-server/service/resource/resource-mutation.js.map +1 -1
- package/dist-server/service/resource/resource-query.d.ts +2 -2
- package/dist-server/service/resource/resource-query.js +5 -10
- package/dist-server/service/resource/resource-query.js.map +1 -1
- package/dist-server/service/task/task-query.d.ts +2 -0
- package/dist-server/service/task/task-query.js +11 -0
- package/dist-server/service/task/task-query.js.map +1 -1
- package/dist-server/service/task/task.d.ts +2 -0
- package/dist-server/service/task/task.js +6 -0
- package/dist-server/service/task/task.js.map +1 -1
- package/dist-server/service/task-checklist-binding/index.d.ts +5 -0
- package/dist-server/service/task-checklist-binding/index.js +9 -0
- package/dist-server/service/task-checklist-binding/index.js.map +1 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.d.ts +5 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js +186 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-mutation.js.map +1 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-query.d.ts +8 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js +61 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-query.js.map +1 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-type.d.ts +15 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js +57 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding-type.js.map +1 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding.d.ts +22 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding.js +106 -0
- package/dist-server/service/task-checklist-binding/task-checklist-binding.js.map +1 -0
- package/dist-server/service/task-resource/task-resource-query.d.ts +2 -2
- package/dist-server/service/task-resource/task-resource-query.js +4 -9
- package/dist-server/service/task-resource/task-resource-query.js.map +1 -1
- package/dist-server/service/worker-type/worker-type-query.d.ts +2 -2
- package/dist-server/service/worker-type/worker-type-query.js +5 -10
- package/dist-server/service/worker-type/worker-type-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -13
- package/things-factory.config.js +3 -3
- package/translations/en.json +10 -9
- package/translations/ja.json +15 -1
- package/translations/ko.json +3 -0
- package/translations/ms.json +15 -1
- package/translations/zh.json +15 -1
- package/dist-client/pages/project/popup/popup-schedule-upload.js.map +0 -1
- package/dist-client/pages/project/project-schedule-list.js.map +0 -1
- package/dist-client/pages/project/project-schedule.js +0 -407
- package/dist-client/pages/project/project-schedule.js.map +0 -1
|
@@ -9,6 +9,7 @@ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
|
9
9
|
import { client } from '@operato/graphql';
|
|
10
10
|
import { notify } from '@operato/layout';
|
|
11
11
|
import gql from 'graphql-tag';
|
|
12
|
+
import { SITE_TYPE_DISPLAY } from './project-list';
|
|
12
13
|
import '../lib/select2-component';
|
|
13
14
|
import './component/project-update-header';
|
|
14
15
|
let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
@@ -16,6 +17,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
16
17
|
super(...arguments);
|
|
17
18
|
this.defaultProject = {
|
|
18
19
|
name: '',
|
|
20
|
+
documentNaming: '',
|
|
19
21
|
buildingComplex: {
|
|
20
22
|
address: '',
|
|
21
23
|
area: 0,
|
|
@@ -34,14 +36,16 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
34
36
|
this.taskConstructorList = [];
|
|
35
37
|
this.taskSupervisoryList = [];
|
|
36
38
|
this.overallSupervisoryList = [];
|
|
39
|
+
this.collectingBasicInfo = false;
|
|
37
40
|
}
|
|
38
41
|
get context() {
|
|
42
|
+
var _a, _b;
|
|
39
43
|
return {
|
|
40
|
-
title: '프로젝트 정보 관리'
|
|
44
|
+
title: ((_a = this.project) === null || _a === void 0 ? void 0 : _a.name) ? `프로젝트 정보 관리 - ${(_b = this.project) === null || _b === void 0 ? void 0 : _b.name}` : '프로젝트 정보 관리'
|
|
41
45
|
};
|
|
42
46
|
}
|
|
43
47
|
render() {
|
|
44
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50;
|
|
45
49
|
return html `
|
|
46
50
|
<project-update-header .projectId=${this.project.id || ''} title="프로젝트 정보 관리" @custom-click=${this._saveProject}>
|
|
47
51
|
</project-update-header>
|
|
@@ -62,8 +66,27 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
62
66
|
</span>
|
|
63
67
|
</div>
|
|
64
68
|
<div row>
|
|
65
|
-
<span>프로젝트
|
|
69
|
+
<span>프로젝트 문서 네이밍</span>
|
|
70
|
+
<span>
|
|
71
|
+
<md-outlined-text-field
|
|
72
|
+
type="text"
|
|
73
|
+
name="documentNaming"
|
|
74
|
+
project
|
|
75
|
+
.value=${this.project.documentNaming || ''}
|
|
76
|
+
@input=${this._onInputChange}
|
|
77
|
+
placeholder="프로젝트 문서 네이밍"
|
|
78
|
+
></md-outlined-text-field>
|
|
79
|
+
</span>
|
|
80
|
+
</div>
|
|
81
|
+
<div row>
|
|
82
|
+
<span></span>
|
|
66
83
|
<span>
|
|
84
|
+
<div document-preview>📄 문서 생성 예시: <br />${this.project.documentNaming} 검측 제01-00001호</div>
|
|
85
|
+
</span>
|
|
86
|
+
</div>
|
|
87
|
+
<div row>
|
|
88
|
+
<span>프로젝트 주소</span>
|
|
89
|
+
<span class="address-row">
|
|
67
90
|
<md-outlined-text-field
|
|
68
91
|
type="text"
|
|
69
92
|
name="address"
|
|
@@ -71,6 +94,14 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
71
94
|
.value=${((_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.buildingComplex) === null || _b === void 0 ? void 0 : _b.address) || ''}
|
|
72
95
|
@input=${this._onInputChange}
|
|
73
96
|
></md-outlined-text-field>
|
|
97
|
+
<md-elevated-button
|
|
98
|
+
class="info-link-btn"
|
|
99
|
+
?disabled=${this.collectingBasicInfo}
|
|
100
|
+
@click=${() => this._collectBasicInfo()}
|
|
101
|
+
title="입력된 주소로 세움터 건축물대장 정보를 가져와 폼을 채웁니다"
|
|
102
|
+
>
|
|
103
|
+
${this.collectingBasicInfo ? '연동 중…' : '🔗 정보 연동'}
|
|
104
|
+
</md-elevated-button>
|
|
74
105
|
</span>
|
|
75
106
|
</div>
|
|
76
107
|
<div row>
|
|
@@ -100,7 +131,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
100
131
|
</span>
|
|
101
132
|
</div>
|
|
102
133
|
<div row>
|
|
103
|
-
<span
|
|
134
|
+
<span>연 면적</span>
|
|
104
135
|
<span align-end
|
|
105
136
|
><md-outlined-text-field
|
|
106
137
|
type="text"
|
|
@@ -109,10 +140,56 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
109
140
|
building-complex
|
|
110
141
|
.value=${((_l = (_k = (_j = this.project) === null || _j === void 0 ? void 0 : _j.buildingComplex) === null || _k === void 0 ? void 0 : _k.area) === null || _l === void 0 ? void 0 : _l.toString()) || ''}
|
|
111
142
|
@input=${this._onInputChange}
|
|
143
|
+
suffix-text="㎡"
|
|
144
|
+
></md-outlined-text-field>
|
|
145
|
+
</span>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div row>
|
|
149
|
+
<span>건폐율</span>
|
|
150
|
+
<span align-end>
|
|
151
|
+
<md-outlined-text-field
|
|
152
|
+
type="text"
|
|
153
|
+
name="coverageRatio"
|
|
154
|
+
numeric
|
|
155
|
+
building-complex
|
|
156
|
+
.value=${((_p = (_o = (_m = this.project) === null || _m === void 0 ? void 0 : _m.buildingComplex) === null || _o === void 0 ? void 0 : _o.coverageRatio) === null || _p === void 0 ? void 0 : _p.toString()) || ''}
|
|
157
|
+
@input=${this._onInputChange}
|
|
158
|
+
suffix-text="%"
|
|
112
159
|
></md-outlined-text-field>
|
|
113
|
-
|
|
114
|
-
|
|
160
|
+
</span>
|
|
161
|
+
</div>
|
|
162
|
+
<div row>
|
|
163
|
+
<span>용적률</span>
|
|
164
|
+
<span align-end>
|
|
165
|
+
<md-outlined-text-field
|
|
166
|
+
type="text"
|
|
167
|
+
name="floorAreaRatio"
|
|
168
|
+
numeric
|
|
169
|
+
building-complex
|
|
170
|
+
.value=${((_s = (_r = (_q = this.project) === null || _q === void 0 ? void 0 : _q.buildingComplex) === null || _r === void 0 ? void 0 : _r.floorAreaRatio) === null || _s === void 0 ? void 0 : _s.toString()) || ''}
|
|
171
|
+
@input=${this._onInputChange}
|
|
172
|
+
suffix-text="%"
|
|
173
|
+
></md-outlined-text-field>
|
|
174
|
+
</span>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div row>
|
|
178
|
+
<span>현장유형</span>
|
|
179
|
+
<span
|
|
180
|
+
><md-filled-select name="siteType" building-complex @change=${this._onInputChange}>
|
|
181
|
+
${Object.entries(SITE_TYPE_DISPLAY).map(([key, display]) => {
|
|
182
|
+
var _a, _b;
|
|
183
|
+
return html `
|
|
184
|
+
<md-select-option ?selected=${((_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.buildingComplex) === null || _b === void 0 ? void 0 : _b.siteType) === key} .value=${key}>
|
|
185
|
+
<div slot="headline">${display}</div>
|
|
186
|
+
</md-select-option>
|
|
187
|
+
`;
|
|
188
|
+
})}
|
|
189
|
+
</md-filled-select>
|
|
190
|
+
</span>
|
|
115
191
|
</div>
|
|
192
|
+
|
|
116
193
|
<div row>
|
|
117
194
|
<span>착공일정 ~ 준공일정</span>
|
|
118
195
|
<span
|
|
@@ -142,7 +219,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
142
219
|
type="text"
|
|
143
220
|
name="clientCompany"
|
|
144
221
|
building-complex
|
|
145
|
-
.value=${((
|
|
222
|
+
.value=${((_u = (_t = this.project) === null || _t === void 0 ? void 0 : _t.buildingComplex) === null || _u === void 0 ? void 0 : _u.clientCompany) || ''}
|
|
146
223
|
@input=${this._onInputChange}
|
|
147
224
|
></md-outlined-text-field>
|
|
148
225
|
</span>
|
|
@@ -154,7 +231,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
154
231
|
type="text"
|
|
155
232
|
name="constructionCompany"
|
|
156
233
|
building-complex
|
|
157
|
-
.value=${((
|
|
234
|
+
.value=${((_w = (_v = this.project) === null || _v === void 0 ? void 0 : _v.buildingComplex) === null || _w === void 0 ? void 0 : _w.constructionCompany) || ''}
|
|
158
235
|
@input=${this._onInputChange}
|
|
159
236
|
></md-outlined-text-field>
|
|
160
237
|
</span>
|
|
@@ -166,7 +243,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
166
243
|
type="text"
|
|
167
244
|
name="designCompany"
|
|
168
245
|
building-complex
|
|
169
|
-
.value=${((
|
|
246
|
+
.value=${((_y = (_x = this.project) === null || _x === void 0 ? void 0 : _x.buildingComplex) === null || _y === void 0 ? void 0 : _y.designCompany) || ''}
|
|
170
247
|
@input=${this._onInputChange}
|
|
171
248
|
></md-outlined-text-field>
|
|
172
249
|
</span>
|
|
@@ -178,7 +255,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
178
255
|
type="text"
|
|
179
256
|
name="supervisoryCompany"
|
|
180
257
|
building-complex
|
|
181
|
-
.value=${((
|
|
258
|
+
.value=${((_0 = (_z = this.project) === null || _z === void 0 ? void 0 : _z.buildingComplex) === null || _0 === void 0 ? void 0 : _0.supervisoryCompany) || ''}
|
|
182
259
|
@input=${this._onInputChange}
|
|
183
260
|
></md-outlined-text-field>
|
|
184
261
|
</span>
|
|
@@ -190,17 +267,30 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
190
267
|
type="text"
|
|
191
268
|
name="constructionType"
|
|
192
269
|
building-complex
|
|
193
|
-
.value=${((
|
|
270
|
+
.value=${((_2 = (_1 = this.project) === null || _1 === void 0 ? void 0 : _1.buildingComplex) === null || _2 === void 0 ? void 0 : _2.constructionType) || ''}
|
|
271
|
+
@input=${this._onInputChange}
|
|
272
|
+
></md-outlined-text-field>
|
|
273
|
+
</span>
|
|
274
|
+
</div>
|
|
275
|
+
<div row>
|
|
276
|
+
<span>구조 유형</span>
|
|
277
|
+
<span
|
|
278
|
+
><md-outlined-text-field
|
|
279
|
+
type="text"
|
|
280
|
+
name="structureType"
|
|
281
|
+
building-complex
|
|
282
|
+
.value=${((_4 = (_3 = this.project) === null || _3 === void 0 ? void 0 : _3.buildingComplex) === null || _4 === void 0 ? void 0 : _4.structureType) || ''}
|
|
194
283
|
@input=${this._onInputChange}
|
|
195
284
|
></md-outlined-text-field>
|
|
196
285
|
</span>
|
|
197
286
|
</div>
|
|
287
|
+
|
|
198
288
|
<div row>
|
|
199
289
|
<span>대표사진 업로드</span>
|
|
200
290
|
<span>
|
|
201
291
|
<ox-input-image
|
|
202
292
|
name="mainPhoto"
|
|
203
|
-
value=${((
|
|
293
|
+
value=${((_6 = (_5 = this.project) === null || _5 === void 0 ? void 0 : _5.mainPhoto) === null || _6 === void 0 ? void 0 : _6.fullpath) || ''}
|
|
204
294
|
@change=${this.onCreateAttachment.bind(this)}
|
|
205
295
|
></ox-input-image>
|
|
206
296
|
</span>
|
|
@@ -212,7 +302,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
212
302
|
name="drawing"
|
|
213
303
|
label=" "
|
|
214
304
|
description="IFC 업로드"
|
|
215
|
-
.value=${((
|
|
305
|
+
.value=${((_8 = (_7 = this.project) === null || _7 === void 0 ? void 0 : _7.buildingComplex) === null || _8 === void 0 ? void 0 : _8.drawing) || ''}
|
|
216
306
|
@change=${this.onCreateAttachment.bind(this)}
|
|
217
307
|
></ox-input-file>
|
|
218
308
|
</span>
|
|
@@ -225,8 +315,23 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
225
315
|
name="constructionCost"
|
|
226
316
|
numeric
|
|
227
317
|
building-complex
|
|
228
|
-
.value=${((
|
|
318
|
+
.value=${((_11 = (_10 = (_9 = this.project) === null || _9 === void 0 ? void 0 : _9.buildingComplex) === null || _10 === void 0 ? void 0 : _10.constructionCost) === null || _11 === void 0 ? void 0 : _11.toString()) || ''}
|
|
319
|
+
@input=${this._onInputChange}
|
|
320
|
+
suffix-text="억원"
|
|
321
|
+
></md-outlined-text-field>
|
|
322
|
+
</span>
|
|
323
|
+
</div>
|
|
324
|
+
<div row>
|
|
325
|
+
<span>투입 인력</span>
|
|
326
|
+
<span
|
|
327
|
+
><md-outlined-text-field
|
|
328
|
+
type="text"
|
|
329
|
+
name="workerCount"
|
|
330
|
+
numeric
|
|
331
|
+
building-complex
|
|
332
|
+
.value=${((_14 = (_13 = (_12 = this.project) === null || _12 === void 0 ? void 0 : _12.buildingComplex) === null || _13 === void 0 ? void 0 : _13.workerCount) === null || _14 === void 0 ? void 0 : _14.toString()) || ''}
|
|
229
333
|
@input=${this._onInputChange}
|
|
334
|
+
suffix-text="명"
|
|
230
335
|
></md-outlined-text-field>
|
|
231
336
|
</span>
|
|
232
337
|
</div>
|
|
@@ -237,7 +342,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
237
342
|
type="textarea"
|
|
238
343
|
name="etc"
|
|
239
344
|
building-complex
|
|
240
|
-
.value=${((
|
|
345
|
+
.value=${((_16 = (_15 = this.project) === null || _15 === void 0 ? void 0 : _15.buildingComplex) === null || _16 === void 0 ? void 0 : _16.etc) || ''}
|
|
241
346
|
@input=${this._onInputChange}
|
|
242
347
|
></md-outlined-text-field>
|
|
243
348
|
</span>
|
|
@@ -249,7 +354,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
249
354
|
placeholder="총괄 시공 관리자 리스트"
|
|
250
355
|
name="overallConstructorEmails"
|
|
251
356
|
.options=${this.overallConstructorList}
|
|
252
|
-
.selectedValues=${((
|
|
357
|
+
.selectedValues=${((_18 = (_17 = this.project) === null || _17 === void 0 ? void 0 : _17.buildingComplex) === null || _18 === void 0 ? void 0 : _18.overallConstructorEmails) || []}
|
|
253
358
|
@selection-changed=${this._handleSelectionChange}
|
|
254
359
|
></select2-component>
|
|
255
360
|
</span>
|
|
@@ -261,7 +366,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
261
366
|
placeholder="공종별 시공 관리자 리스트"
|
|
262
367
|
name="taskConstructorEmails"
|
|
263
368
|
.options=${this.taskConstructorList}
|
|
264
|
-
.selectedValues=${((
|
|
369
|
+
.selectedValues=${((_20 = (_19 = this.project) === null || _19 === void 0 ? void 0 : _19.buildingComplex) === null || _20 === void 0 ? void 0 : _20.taskConstructorEmails) || []}
|
|
265
370
|
@selection-changed=${this._handleSelectionChange}
|
|
266
371
|
></select2-component>
|
|
267
372
|
</span>
|
|
@@ -273,7 +378,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
273
378
|
placeholder="총괄 감리 책임자 리스트"
|
|
274
379
|
name="overallSupervisoryEmails"
|
|
275
380
|
.options=${this.overallSupervisoryList}
|
|
276
|
-
.selectedValues=${((
|
|
381
|
+
.selectedValues=${((_22 = (_21 = this.project) === null || _21 === void 0 ? void 0 : _21.buildingComplex) === null || _22 === void 0 ? void 0 : _22.overallSupervisoryEmails) || []}
|
|
277
382
|
@selection-changed=${this._handleSelectionChange}
|
|
278
383
|
></select2-component>
|
|
279
384
|
</span>
|
|
@@ -285,7 +390,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
285
390
|
placeholder="공종별 감리 책임자 리스트"
|
|
286
391
|
name="taskSupervisoryEmails"
|
|
287
392
|
.options=${this.taskSupervisoryList}
|
|
288
|
-
.selectedValues=${((
|
|
393
|
+
.selectedValues=${((_24 = (_23 = this.project) === null || _23 === void 0 ? void 0 : _23.buildingComplex) === null || _24 === void 0 ? void 0 : _24.taskSupervisoryEmails) || []}
|
|
289
394
|
@selection-changed=${this._handleSelectionChange}
|
|
290
395
|
></select2-component
|
|
291
396
|
></span>
|
|
@@ -293,6 +398,44 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
293
398
|
</div>
|
|
294
399
|
|
|
295
400
|
<div detail-info>
|
|
401
|
+
<div>
|
|
402
|
+
<h3>테넌트 관리</h3>
|
|
403
|
+
<div row>
|
|
404
|
+
<span>관리번호</span>
|
|
405
|
+
<span>
|
|
406
|
+
${this.project.tenantDomain
|
|
407
|
+
? html `<a href=${`/project/${this.project.code}/`} target="_blank" title="테넌트로 이동"
|
|
408
|
+
>${this.project.code} <md-icon style="font-size:14px;vertical-align:middle">open_in_new</md-icon></a
|
|
409
|
+
>`
|
|
410
|
+
: this.project.code
|
|
411
|
+
? html `${this.project.code}`
|
|
412
|
+
: html `<span style="color:#999">미발번 (승격 시 자동 부여)</span>`}
|
|
413
|
+
</span>
|
|
414
|
+
</div>
|
|
415
|
+
<div row>
|
|
416
|
+
<span>현재 상태</span>
|
|
417
|
+
<span>
|
|
418
|
+
${this.project.tenantDomain
|
|
419
|
+
? html `<b style="color:#42b382">활성 테넌트</b>`
|
|
420
|
+
: this.project.code
|
|
421
|
+
? html `<b style="color:#aa6633">강등됨</b> (재승격 시 ${this.project.code} 재사용)`
|
|
422
|
+
: html `<b style="color:#999">미승격</b>`}
|
|
423
|
+
</span>
|
|
424
|
+
</div>
|
|
425
|
+
<div row>
|
|
426
|
+
<span></span>
|
|
427
|
+
<span tenant-actions>
|
|
428
|
+
${this.project.tenantDomain
|
|
429
|
+
? html `<md-elevated-button @click=${this._demoteTenant} ?disabled=${!this.project.id}>
|
|
430
|
+
<md-icon slot="icon">link_off</md-icon>테넌트 강등
|
|
431
|
+
</md-elevated-button>`
|
|
432
|
+
: html `<md-elevated-button green @click=${this._promoteTenant} ?disabled=${!this.project.id}>
|
|
433
|
+
<md-icon slot="icon">verified</md-icon>테넌트 승격
|
|
434
|
+
</md-elevated-button>`}
|
|
435
|
+
</span>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
296
439
|
<div>
|
|
297
440
|
<h3>건설구분 상세 정보</h3>
|
|
298
441
|
<div row>
|
|
@@ -303,7 +446,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
303
446
|
numeric
|
|
304
447
|
building-complex
|
|
305
448
|
name="householdCount"
|
|
306
|
-
.value=${((
|
|
449
|
+
.value=${((_27 = (_26 = (_25 = this.project) === null || _25 === void 0 ? void 0 : _25.buildingComplex) === null || _26 === void 0 ? void 0 : _26.householdCount) === null || _27 === void 0 ? void 0 : _27.toString()) || ''}
|
|
307
450
|
@input=${this._onInputChange}
|
|
308
451
|
></md-outlined-text-field>
|
|
309
452
|
</span>
|
|
@@ -316,7 +459,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
316
459
|
numeric
|
|
317
460
|
building-complex
|
|
318
461
|
name="buildingCount"
|
|
319
|
-
value=${((
|
|
462
|
+
value=${((_30 = (_29 = (_28 = this.project) === null || _28 === void 0 ? void 0 : _28.buildingComplex) === null || _29 === void 0 ? void 0 : _29.buildingCount) === null || _30 === void 0 ? void 0 : _30.toString()) || ''}
|
|
320
463
|
@input=${this._onInputChange}
|
|
321
464
|
></md-outlined-text-field>
|
|
322
465
|
<md-outlined-button @click=${this._setBuilding}>적용</md-outlined-button>
|
|
@@ -325,7 +468,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
325
468
|
<hr />
|
|
326
469
|
<div warn>* 동/층의 정보를 수정하면 기존의 동/층 정보는 모두 제거됩니다.</div>
|
|
327
470
|
<div separate-container>
|
|
328
|
-
${(
|
|
471
|
+
${(_33 = (_32 = (_31 = this.project) === null || _31 === void 0 ? void 0 : _31.buildingComplex) === null || _32 === void 0 ? void 0 : _32.buildings) === null || _33 === void 0 ? void 0 : _33.map((building, idx) => {
|
|
329
472
|
var _a, _b;
|
|
330
473
|
return html `
|
|
331
474
|
<div>
|
|
@@ -393,7 +536,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
393
536
|
numeric
|
|
394
537
|
project
|
|
395
538
|
name="totalProgress"
|
|
396
|
-
.value=${((
|
|
539
|
+
.value=${((_34 = this.project.totalProgress) === null || _34 === void 0 ? void 0 : _34.toString()) || ''}
|
|
397
540
|
@input=${this._onInputChange}
|
|
398
541
|
suffix-text="%"
|
|
399
542
|
></md-outlined-text-field>
|
|
@@ -407,7 +550,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
407
550
|
numeric
|
|
408
551
|
project
|
|
409
552
|
name="inspPassRate"
|
|
410
|
-
.value=${((
|
|
553
|
+
.value=${((_35 = this.project.inspPassRate) === null || _35 === void 0 ? void 0 : _35.toString()) || ''}
|
|
411
554
|
@input=${this._onInputChange}
|
|
412
555
|
suffix-text="%"
|
|
413
556
|
></md-outlined-text-field>
|
|
@@ -423,7 +566,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
423
566
|
numeric
|
|
424
567
|
project
|
|
425
568
|
name="weeklyProgress"
|
|
426
|
-
.value=${((
|
|
569
|
+
.value=${((_36 = this.project.weeklyProgress) === null || _36 === void 0 ? void 0 : _36.toString()) || ''}
|
|
427
570
|
@input=${this._onInputChange}
|
|
428
571
|
suffix-text="%"
|
|
429
572
|
></md-outlined-text-field>
|
|
@@ -437,7 +580,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
437
580
|
numeric
|
|
438
581
|
project
|
|
439
582
|
name="robotProgressRate"
|
|
440
|
-
.value=${((
|
|
583
|
+
.value=${((_37 = this.project.robotProgressRate) === null || _37 === void 0 ? void 0 : _37.toString()) || ''}
|
|
441
584
|
@input=${this._onInputChange}
|
|
442
585
|
suffix-text="%"
|
|
443
586
|
></md-outlined-text-field>
|
|
@@ -453,7 +596,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
453
596
|
numeric
|
|
454
597
|
project
|
|
455
598
|
name="kpi"
|
|
456
|
-
.value=${((
|
|
599
|
+
.value=${((_38 = this.project.kpi) === null || _38 === void 0 ? void 0 : _38.toString()) || ''}
|
|
457
600
|
@input=${this._onInputChange}
|
|
458
601
|
suffix-text="%"
|
|
459
602
|
></md-outlined-text-field>
|
|
@@ -467,7 +610,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
467
610
|
numeric
|
|
468
611
|
project
|
|
469
612
|
name="structuralSafetyRate"
|
|
470
|
-
.value=${((
|
|
613
|
+
.value=${((_39 = this.project.structuralSafetyRate) === null || _39 === void 0 ? void 0 : _39.toString()) || ''}
|
|
471
614
|
@input=${this._onInputChange}
|
|
472
615
|
suffix-text="%"
|
|
473
616
|
></md-outlined-text-field>
|
|
@@ -484,12 +627,61 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
484
627
|
numeric
|
|
485
628
|
project
|
|
486
629
|
name="robotCount"
|
|
487
|
-
.value=${((
|
|
630
|
+
.value=${((_40 = this.project.robotCount) === null || _40 === void 0 ? void 0 : _40.toString()) || ''}
|
|
488
631
|
@input=${this._onInputChange}
|
|
489
632
|
></md-outlined-text-field>
|
|
490
633
|
</span>
|
|
491
634
|
</div>
|
|
492
635
|
</div>
|
|
636
|
+
|
|
637
|
+
<hr />
|
|
638
|
+
|
|
639
|
+
<div row separate-container>
|
|
640
|
+
<div>
|
|
641
|
+
<span>설계 변경 횟수</span>
|
|
642
|
+
<span
|
|
643
|
+
><md-outlined-text-field
|
|
644
|
+
type="text"
|
|
645
|
+
numeric
|
|
646
|
+
building-complex
|
|
647
|
+
name="designChangeCount"
|
|
648
|
+
.value=${((_42 = (_41 = this.project.buildingComplex) === null || _41 === void 0 ? void 0 : _41.designChangeCount) === null || _42 === void 0 ? void 0 : _42.toString()) || ''}
|
|
649
|
+
@input=${this._onInputChange}
|
|
650
|
+
></md-outlined-text-field>
|
|
651
|
+
</span>
|
|
652
|
+
</div>
|
|
653
|
+
<div>
|
|
654
|
+
<span>계획 공정률</span>
|
|
655
|
+
<span
|
|
656
|
+
><md-outlined-text-field
|
|
657
|
+
type="text"
|
|
658
|
+
numeric
|
|
659
|
+
building-complex
|
|
660
|
+
name="plannedProgress"
|
|
661
|
+
.value=${((_44 = (_43 = this.project.buildingComplex) === null || _43 === void 0 ? void 0 : _43.plannedProgress) === null || _44 === void 0 ? void 0 : _44.toString()) || ''}
|
|
662
|
+
@input=${this._onInputChange}
|
|
663
|
+
suffix-text="%"
|
|
664
|
+
></md-outlined-text-field>
|
|
665
|
+
</span>
|
|
666
|
+
</div>
|
|
667
|
+
</div>
|
|
668
|
+
|
|
669
|
+
<div row separate-container>
|
|
670
|
+
<div>
|
|
671
|
+
<span>실제 공정률</span>
|
|
672
|
+
<span
|
|
673
|
+
><md-outlined-text-field
|
|
674
|
+
type="text"
|
|
675
|
+
numeric
|
|
676
|
+
building-complex
|
|
677
|
+
name="actualProgress"
|
|
678
|
+
.value=${((_46 = (_45 = this.project.buildingComplex) === null || _45 === void 0 ? void 0 : _45.actualProgress) === null || _46 === void 0 ? void 0 : _46.toString()) || ''}
|
|
679
|
+
@input=${this._onInputChange}
|
|
680
|
+
suffix-text="%"
|
|
681
|
+
></md-outlined-text-field>
|
|
682
|
+
</span>
|
|
683
|
+
</div>
|
|
684
|
+
</div>
|
|
493
685
|
</div>
|
|
494
686
|
|
|
495
687
|
<div>
|
|
@@ -501,7 +693,23 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
501
693
|
type="textarea"
|
|
502
694
|
name="notice"
|
|
503
695
|
building-complex
|
|
504
|
-
.value=${((
|
|
696
|
+
.value=${((_48 = (_47 = this.project) === null || _47 === void 0 ? void 0 : _47.buildingComplex) === null || _48 === void 0 ? void 0 : _48.notice) || ''}
|
|
697
|
+
@input=${this._onInputChange}
|
|
698
|
+
></md-outlined-text-field>
|
|
699
|
+
</span>
|
|
700
|
+
</div>
|
|
701
|
+
</div>
|
|
702
|
+
|
|
703
|
+
<div>
|
|
704
|
+
<h3>Virtual Tour Link</h3>
|
|
705
|
+
<div>
|
|
706
|
+
<span></span>
|
|
707
|
+
<span>
|
|
708
|
+
<md-outlined-text-field
|
|
709
|
+
type="text"
|
|
710
|
+
name="virtualTourLink"
|
|
711
|
+
building-complex
|
|
712
|
+
.value=${((_50 = (_49 = this.project) === null || _49 === void 0 ? void 0 : _49.buildingComplex) === null || _50 === void 0 ? void 0 : _50.virtualTourLink) || ''}
|
|
505
713
|
@input=${this._onInputChange}
|
|
506
714
|
></md-outlined-text-field>
|
|
507
715
|
</span>
|
|
@@ -513,10 +721,30 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
513
721
|
}
|
|
514
722
|
async pageInitialized(lifecycle) { }
|
|
515
723
|
async pageUpdated(changes, lifecycle) {
|
|
516
|
-
if (this.active)
|
|
517
|
-
|
|
518
|
-
|
|
724
|
+
if (!this.active)
|
|
725
|
+
return;
|
|
726
|
+
this.projectId = await this._resolveProjectId(lifecycle.resourceId || '');
|
|
727
|
+
await this.initProject(this.projectId);
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* resourceId 를 정상 Project.id (UUID) 로 변환한다.
|
|
731
|
+
* - UUID 형식이면 그대로 사용
|
|
732
|
+
* - 그 외 (code 또는 비어있음) 에는 현재 테넌트 컨텍스트의 프로젝트 조회
|
|
733
|
+
*/
|
|
734
|
+
async _resolveProjectId(resourceId) {
|
|
735
|
+
var _a, _b;
|
|
736
|
+
if (resourceId && resourceId.length === 36)
|
|
737
|
+
return resourceId;
|
|
738
|
+
const response = await client.query({
|
|
739
|
+
query: gql `
|
|
740
|
+
query CurrentProject {
|
|
741
|
+
currentProject {
|
|
742
|
+
id
|
|
743
|
+
}
|
|
519
744
|
}
|
|
745
|
+
`
|
|
746
|
+
});
|
|
747
|
+
return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.currentProject) === null || _b === void 0 ? void 0 : _b.id) || '';
|
|
520
748
|
}
|
|
521
749
|
async initProject(projectId = '') {
|
|
522
750
|
var _a, _b, _c;
|
|
@@ -525,7 +753,14 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
525
753
|
query Project($id: String!, $filters: [Filter!]) {
|
|
526
754
|
project(id: $id) {
|
|
527
755
|
id
|
|
756
|
+
code
|
|
757
|
+
tenantDomain {
|
|
758
|
+
id
|
|
759
|
+
subdomain
|
|
760
|
+
name
|
|
761
|
+
}
|
|
528
762
|
name
|
|
763
|
+
documentNaming
|
|
529
764
|
startDate
|
|
530
765
|
endDate
|
|
531
766
|
mainPhoto {
|
|
@@ -541,9 +776,17 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
541
776
|
buildingComplex {
|
|
542
777
|
id
|
|
543
778
|
address
|
|
779
|
+
siteType
|
|
544
780
|
latitude
|
|
545
781
|
longitude
|
|
546
782
|
area
|
|
783
|
+
coverageRatio
|
|
784
|
+
floorAreaRatio
|
|
785
|
+
structureType
|
|
786
|
+
workerCount
|
|
787
|
+
designChangeCount
|
|
788
|
+
plannedProgress
|
|
789
|
+
actualProgress
|
|
547
790
|
clientCompany
|
|
548
791
|
constructionCompany
|
|
549
792
|
supervisoryCompany
|
|
@@ -562,6 +805,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
562
805
|
taskConstructorEmails
|
|
563
806
|
overallSupervisoryEmails
|
|
564
807
|
taskSupervisoryEmails
|
|
808
|
+
virtualTourLink
|
|
565
809
|
buildings {
|
|
566
810
|
id
|
|
567
811
|
name
|
|
@@ -603,22 +847,41 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
603
847
|
]
|
|
604
848
|
}
|
|
605
849
|
});
|
|
606
|
-
this.project = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project;
|
|
850
|
+
this.project = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.project) || Object.assign({}, this.defaultProject);
|
|
607
851
|
const items = ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.employees) === null || _c === void 0 ? void 0 : _c.items) || [];
|
|
608
852
|
this.overallConstructorList = this._filterUserByPermission(items, 'OVERALL_CONSTRUCTOR');
|
|
609
853
|
this.taskConstructorList = this._filterUserByPermission(items, 'TASK_CONSTRUCTOR');
|
|
610
854
|
this.overallSupervisoryList = this._filterUserByPermission(items, 'OVERALL_SUPERVISORY');
|
|
611
855
|
this.taskSupervisoryList = this._filterUserByPermission(items, 'TASK_SUPERVISORY');
|
|
856
|
+
this.updateContext();
|
|
612
857
|
}
|
|
613
858
|
_filterUserByPermission(userList, permission) {
|
|
614
859
|
return userList
|
|
615
860
|
.filter(v => v.jobResponsibility == permission || v.jobResponsibility == 'ADMIN')
|
|
616
861
|
.map(v => ({ name: v.name, value: v.user.email }));
|
|
617
862
|
}
|
|
863
|
+
_stripTypename(obj) {
|
|
864
|
+
if (Array.isArray(obj)) {
|
|
865
|
+
return obj.map(item => this._stripTypename(item));
|
|
866
|
+
}
|
|
867
|
+
if (obj && typeof obj === 'object' && !(obj instanceof File)) {
|
|
868
|
+
const cleaned = {};
|
|
869
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
870
|
+
if (key === '__typename')
|
|
871
|
+
continue;
|
|
872
|
+
cleaned[key] = this._stripTypename(value);
|
|
873
|
+
}
|
|
874
|
+
return cleaned;
|
|
875
|
+
}
|
|
876
|
+
return obj;
|
|
877
|
+
}
|
|
618
878
|
async _saveProject() {
|
|
619
879
|
// 첨부 파일 필드 제거 (첨부 파일은 {filename}Upload 로 전송)
|
|
620
880
|
delete this.project.mainPhoto;
|
|
621
881
|
delete this.project.buildingComplex.drawing;
|
|
882
|
+
// ProjectPatch 입력 타입에 없는 표시 전용 필드 제거 (테넌트 승격 UI 표시용)
|
|
883
|
+
delete this.project.code;
|
|
884
|
+
delete this.project.tenantDomain;
|
|
622
885
|
const response = await client.mutate({
|
|
623
886
|
mutation: gql `
|
|
624
887
|
mutation UpdateProject($project: ProjectPatch!) {
|
|
@@ -628,7 +891,7 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
628
891
|
}
|
|
629
892
|
`,
|
|
630
893
|
variables: {
|
|
631
|
-
project: this.project
|
|
894
|
+
project: this._stripTypename(this.project)
|
|
632
895
|
},
|
|
633
896
|
context: {
|
|
634
897
|
hasUpload: true
|
|
@@ -638,6 +901,174 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
638
901
|
notify({ message: '저장에 성공하였습니다.' });
|
|
639
902
|
}
|
|
640
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* 주소 옆 "정보 연동" 버튼 handler.
|
|
906
|
+
* - 현재 폼의 주소를 backend 로 보냄 → backend 가 EnvVar 갱신 + 세움터 시나리오 호출
|
|
907
|
+
* - 결과 (한글 raw + 숫자) 를 받아 BuildingComplex 폼 필드들에 매핑
|
|
908
|
+
* · siteType (한글) → SiteType enum 변환 (BC.siteType, enum 컬럼)
|
|
909
|
+
* · siteType (한글) → BC.constructionType 그대로 (자유 텍스트 컬럼)
|
|
910
|
+
* · area / floorAreaRatio / coverageRatio / householdCount / buildingCount /
|
|
911
|
+
* structureType → BC 동명 컬럼에 직접 대입
|
|
912
|
+
* · upperFloorCount / lowerFloorCount / bldNm / useAprDay / pmsDay → BC 컬럼
|
|
913
|
+
* 없음, 매핑 skip (참고용 콘솔 로그만)
|
|
914
|
+
*/
|
|
915
|
+
async _collectBasicInfo() {
|
|
916
|
+
var _a, _b, _c;
|
|
917
|
+
const address = (((_b = (_a = this.project) === null || _a === void 0 ? void 0 : _a.buildingComplex) === null || _b === void 0 ? void 0 : _b.address) || '').trim();
|
|
918
|
+
if (!address) {
|
|
919
|
+
notify({ message: '먼저 프로젝트 주소를 입력해 주세요.' });
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
this.collectingBasicInfo = true;
|
|
923
|
+
try {
|
|
924
|
+
const response = await client.mutate({
|
|
925
|
+
mutation: gql `
|
|
926
|
+
mutation CollectProjectBasicInfo($projectId: String!, $address: String) {
|
|
927
|
+
collectProjectBasicInfo(projectId: $projectId, address: $address) {
|
|
928
|
+
source
|
|
929
|
+
label
|
|
930
|
+
ok
|
|
931
|
+
message
|
|
932
|
+
data
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
`,
|
|
936
|
+
variables: { projectId: this.project.id, address }
|
|
937
|
+
});
|
|
938
|
+
if (response.errors) {
|
|
939
|
+
throw new Error(response.errors.map((e) => e.message).join('\n'));
|
|
940
|
+
}
|
|
941
|
+
const result = (_c = response.data) === null || _c === void 0 ? void 0 : _c.collectProjectBasicInfo;
|
|
942
|
+
if (!(result === null || result === void 0 ? void 0 : result.ok)) {
|
|
943
|
+
notify({ message: (result === null || result === void 0 ? void 0 : result.message) || '업데이트할 정보가 없습니다.' });
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
const data = result.data || {};
|
|
947
|
+
this._applyBasicInfoToForm(data);
|
|
948
|
+
this.requestUpdate();
|
|
949
|
+
notify({ message: '외부 시스템에서 기본 정보를 가져왔습니다. 검토 후 [저장]을 눌러주세요.' });
|
|
950
|
+
}
|
|
951
|
+
catch (err) {
|
|
952
|
+
console.warn('[정보 연동] 실패', err);
|
|
953
|
+
notify({ message: '외부 시스템 연동이 일시적으로 안 됩니다.' });
|
|
954
|
+
}
|
|
955
|
+
finally {
|
|
956
|
+
this.collectingBasicInfo = false;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* 한글 주용도명 → SiteType enum.
|
|
961
|
+
* - NFC normalize + 공백 제거로 보이지 않는 문자/표기 차이 대응
|
|
962
|
+
* - 매핑 미존재시 null
|
|
963
|
+
*/
|
|
964
|
+
_siteTypeFromKorean(korean) {
|
|
965
|
+
if (!korean)
|
|
966
|
+
return null;
|
|
967
|
+
const KEYS = {
|
|
968
|
+
공동주택: 'APARTMENT_COMPLEX',
|
|
969
|
+
단독주택: 'DETACHED_HOUSE',
|
|
970
|
+
제1종근린생활시설: 'NEIGHBORHOOD_FACILITY',
|
|
971
|
+
제2종근린생활시설: 'NEIGHBORHOOD_FACILITY',
|
|
972
|
+
근린생활시설: 'NEIGHBORHOOD_FACILITY',
|
|
973
|
+
업무시설: 'OFFICE',
|
|
974
|
+
판매시설: 'COMMERCIAL',
|
|
975
|
+
교육연구시설: 'EDUCATION',
|
|
976
|
+
의료시설: 'MEDICAL',
|
|
977
|
+
문화및집회시설: 'CULTURAL',
|
|
978
|
+
종교시설: 'RELIGIOUS',
|
|
979
|
+
공장: 'INDUSTRIAL',
|
|
980
|
+
창고시설: 'INDUSTRIAL',
|
|
981
|
+
운수시설: 'TRANSPORT'
|
|
982
|
+
};
|
|
983
|
+
const key = korean.normalize('NFC').replace(/\s+/g, '').trim();
|
|
984
|
+
return KEYS[key] || null;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* 시나리오 result data 를 폼에 매핑 — BuildingComplex 와 Project 양쪽.
|
|
988
|
+
* 빈 값(null/undefined/'')은 기존 값 유지 — 자동 수집이 사용자 입력을 무리하게 덮지 않도록.
|
|
989
|
+
*/
|
|
990
|
+
_applyBasicInfoToForm(data) {
|
|
991
|
+
const bc = Object.assign({}, this.project.buildingComplex);
|
|
992
|
+
const setBC = (key, value) => {
|
|
993
|
+
if (value === null || value === undefined || value === '')
|
|
994
|
+
return;
|
|
995
|
+
bc[key] = value;
|
|
996
|
+
};
|
|
997
|
+
setBC('area', this._toNum(data.area));
|
|
998
|
+
setBC('floorAreaRatio', this._toNum(data.floorAreaRatio));
|
|
999
|
+
setBC('coverageRatio', this._toNum(data.coverageRatio));
|
|
1000
|
+
setBC('householdCount', this._toNum(data.householdCount));
|
|
1001
|
+
setBC('buildingCount', this._toNum(data.buildingCount));
|
|
1002
|
+
setBC('structureType', data.structureType);
|
|
1003
|
+
// siteType: 한글 → SiteType enum 매핑. 매핑 안 되면 BC.siteType 빈 채로.
|
|
1004
|
+
if (data.siteType) {
|
|
1005
|
+
const enumVal = this._siteTypeFromKorean(data.siteType);
|
|
1006
|
+
if (enumVal)
|
|
1007
|
+
bc.siteType = enumVal;
|
|
1008
|
+
}
|
|
1009
|
+
// Project 엔티티 컬럼 — 착공일/준공일.
|
|
1010
|
+
// 세움터 useAprDay (사용승인일) = 준공으로 매핑. stcnsDay = 착공.
|
|
1011
|
+
const project = Object.assign(Object.assign({}, this.project), { buildingComplex: bc });
|
|
1012
|
+
if (data.startDate)
|
|
1013
|
+
project.startDate = data.startDate;
|
|
1014
|
+
if (data.endDate)
|
|
1015
|
+
project.endDate = data.endDate;
|
|
1016
|
+
this.project = project;
|
|
1017
|
+
// 참고 메타 — BC/Project 직접 컬럼 없음, 콘솔로만 (permitDate=건축허가일, bldNm 등)
|
|
1018
|
+
console.log('[정보 연동] meta:', JSON.stringify({
|
|
1019
|
+
upperFloorCount: data.upperFloorCount,
|
|
1020
|
+
lowerFloorCount: data.lowerFloorCount,
|
|
1021
|
+
bldNm: data.bldNm,
|
|
1022
|
+
permitDate: data.permitDate
|
|
1023
|
+
}));
|
|
1024
|
+
}
|
|
1025
|
+
_toNum(v) {
|
|
1026
|
+
if (v === null || v === undefined || v === '')
|
|
1027
|
+
return null;
|
|
1028
|
+
const n = Number(v);
|
|
1029
|
+
return Number.isFinite(n) ? n : null;
|
|
1030
|
+
}
|
|
1031
|
+
async _promoteTenant() {
|
|
1032
|
+
if (!this.project.id)
|
|
1033
|
+
return;
|
|
1034
|
+
if (!confirm('이 프로젝트를 테넌트로 승격하시겠습니까?\n승격 시 관리번호(YYYY-NNNNN)가 자동 발번되며 변경할 수 없습니다.')) {
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
const response = await client.mutate({
|
|
1038
|
+
mutation: gql `
|
|
1039
|
+
mutation PromoteProjectToTenant($projectId: String!) {
|
|
1040
|
+
promoteProjectToTenant(projectId: $projectId) {
|
|
1041
|
+
id
|
|
1042
|
+
code
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
`,
|
|
1046
|
+
variables: { projectId: this.project.id }
|
|
1047
|
+
});
|
|
1048
|
+
if (!response.errors) {
|
|
1049
|
+
notify({ message: `테넌트로 승격되었습니다. 관리번호: ${response.data.promoteProjectToTenant.code}` });
|
|
1050
|
+
await this.initProject(this.projectId);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
async _demoteTenant() {
|
|
1054
|
+
if (!this.project.id)
|
|
1055
|
+
return;
|
|
1056
|
+
if (!confirm('이 프로젝트의 테넌트를 강등하시겠습니까?\n관리번호는 보존되며 재승격 시 같은 번호가 재사용됩니다.')) {
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
const response = await client.mutate({
|
|
1060
|
+
mutation: gql `
|
|
1061
|
+
mutation DemoteProjectTenant($projectId: String!) {
|
|
1062
|
+
demoteProjectTenant(projectId: $projectId)
|
|
1063
|
+
}
|
|
1064
|
+
`,
|
|
1065
|
+
variables: { projectId: this.project.id }
|
|
1066
|
+
});
|
|
1067
|
+
if (!response.errors) {
|
|
1068
|
+
notify({ message: '테넌트가 강등되었습니다.' });
|
|
1069
|
+
await this.initProject(this.projectId);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
641
1072
|
// 동 적용 버튼을 누르면 입력한 수 만큼 해당 단지에 동 데이터 생성
|
|
642
1073
|
_setBuilding() {
|
|
643
1074
|
var _a, _b, _c, _d, _e;
|
|
@@ -670,6 +1101,10 @@ let ProjectUpdate = class ProjectUpdate extends ScopedElementsMixin(PageView) {
|
|
|
670
1101
|
}
|
|
671
1102
|
if (target.hasAttribute('project')) {
|
|
672
1103
|
this.project[target.name] = inputVal;
|
|
1104
|
+
// documentNaming 필드가 변경되면 실시간으로 미리보기 업데이트
|
|
1105
|
+
if (target.name === 'documentNaming') {
|
|
1106
|
+
this.requestUpdate();
|
|
1107
|
+
}
|
|
673
1108
|
}
|
|
674
1109
|
else if (target.hasAttribute('building-complex')) {
|
|
675
1110
|
this.project.buildingComplex[target.name] = inputVal;
|
|
@@ -737,6 +1172,13 @@ ProjectUpdate.styles = [
|
|
|
737
1172
|
select2-component {
|
|
738
1173
|
width: 100%;
|
|
739
1174
|
}
|
|
1175
|
+
md-filled-select {
|
|
1176
|
+
width: 100%;
|
|
1177
|
+
--md-filled-select-text-field-container-color: transparent;
|
|
1178
|
+
--md-filled-select-text-field-active-indicator-color: #999;
|
|
1179
|
+
--md-filled-select-text-field-input-text-size: 14px;
|
|
1180
|
+
--md-filled-select-text-field-input-text-line-height: 6px;
|
|
1181
|
+
}
|
|
740
1182
|
input[type='date'] {
|
|
741
1183
|
border: 1px solid rgba(51, 51, 51, 0.2);
|
|
742
1184
|
padding: var(--spacing-small, 4px) var(--spacing-medium, 8px);
|
|
@@ -797,6 +1239,18 @@ ProjectUpdate.styles = [
|
|
|
797
1239
|
margin-left: var(--spacing-medium, 8px);
|
|
798
1240
|
align-items: center;
|
|
799
1241
|
|
|
1242
|
+
&.address-row {
|
|
1243
|
+
md-outlined-text-field {
|
|
1244
|
+
flex: 1;
|
|
1245
|
+
}
|
|
1246
|
+
.info-link-btn {
|
|
1247
|
+
flex: 0 0 auto;
|
|
1248
|
+
--md-elevated-button-container-color: #2e79be;
|
|
1249
|
+
--md-elevated-button-label-text-color: #fff;
|
|
1250
|
+
--md-elevated-button-container-height: 36px;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
800
1254
|
&[align-end] {
|
|
801
1255
|
align-items: end;
|
|
802
1256
|
}
|
|
@@ -808,6 +1262,18 @@ ProjectUpdate.styles = [
|
|
|
808
1262
|
flex: 0.55;
|
|
809
1263
|
}
|
|
810
1264
|
|
|
1265
|
+
div[document-preview] {
|
|
1266
|
+
width: 100%;
|
|
1267
|
+
font-size: 12px;
|
|
1268
|
+
color: #2e79be;
|
|
1269
|
+
font-weight: 500;
|
|
1270
|
+
background-color: #f8f9fa;
|
|
1271
|
+
padding: 8px 12px;
|
|
1272
|
+
border-radius: 4px;
|
|
1273
|
+
border-left: 3px solid #2e79be;
|
|
1274
|
+
margin-top: 4px;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
811
1277
|
div[detail-info] {
|
|
812
1278
|
flex: 0.45;
|
|
813
1279
|
padding: 0px;
|
|
@@ -997,6 +1463,10 @@ __decorate([
|
|
|
997
1463
|
state(),
|
|
998
1464
|
__metadata("design:type", Array)
|
|
999
1465
|
], ProjectUpdate.prototype, "overallSupervisoryList", void 0);
|
|
1466
|
+
__decorate([
|
|
1467
|
+
state(),
|
|
1468
|
+
__metadata("design:type", Boolean)
|
|
1469
|
+
], ProjectUpdate.prototype, "collectingBasicInfo", void 0);
|
|
1000
1470
|
ProjectUpdate = __decorate([
|
|
1001
1471
|
customElement('project-update')
|
|
1002
1472
|
], ProjectUpdate);
|