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