@dssp/project 1.0.0-alpha.9 → 1.0.0-alpha.92
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/{attachment-list-popup.js → task-checklist-attachment-list-popup.js} +16 -17
- package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/{comment-list-popup.js → task-checklist-comment-list-popup.js} +19 -20
- package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/{schedule-checklist-create-popup.d.ts → task-checklist-create-popup.d.ts} +0 -1
- package/dist-client/pages/project/popup/checklist/{schedule-checklist-create-popup.js → task-checklist-create-popup.js} +40 -42
- package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js.map +1 -0
- package/dist-client/pages/project/popup/checklist/{schedule-checklist-view.d.ts → task-checklist-view.d.ts} +2 -7
- package/dist-client/pages/project/popup/checklist/{schedule-checklist-view.js → task-checklist-view.js} +137 -32
- 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 -6
- package/dist-client/pages/project/project-task.js +692 -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 +270 -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 +124 -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 +153 -13
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/service/project/project-type.d.ts +13 -2
- package/dist-server/service/project/project-type.js +44 -2
- package/dist-server/service/project/project-type.js.map +1 -1
- package/dist-server/service/project/project.d.ts +23 -0
- package/dist-server/service/project/project.js +89 -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 +188 -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/checklist/attachment-list-popup.js.map +0 -1
- package/dist-client/pages/project/popup/checklist/comment-list-popup.js.map +0 -1
- package/dist-client/pages/project/popup/checklist/schedule-checklist-create-popup.js.map +0 -1
- package/dist-client/pages/project/popup/checklist/schedule-checklist-view.js.map +0 -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 -422
- package/dist-client/pages/project/project-schedule.js.map +0 -1
- /package/dist-client/pages/project/popup/checklist/{attachment-list-popup.d.ts → task-checklist-attachment-list-popup.d.ts} +0 -0
- /package/dist-client/pages/project/popup/checklist/{comment-list-popup.d.ts → task-checklist-comment-list-popup.d.ts} +0 -0
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/elevated-button.js';
|
|
4
|
+
import '@material/web/textfield/outlined-text-field.js';
|
|
5
|
+
import '@material/web/button/filled-button.js';
|
|
6
|
+
import '@material/web/button/outlined-button.js';
|
|
7
|
+
import { PageView } from '@operato/shell';
|
|
8
|
+
import { css, html } from 'lit';
|
|
9
|
+
import { customElement, query, state } from 'lit/decorators.js';
|
|
10
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
11
|
+
import { client } from '@operato/graphql';
|
|
12
|
+
import { i18next } from '@operato/i18n';
|
|
13
|
+
import { notify, openPopup } from '@operato/layout';
|
|
14
|
+
import gql from 'graphql-tag';
|
|
15
|
+
import { ScrollbarStyles } from '@operato/styles';
|
|
16
|
+
import { verifyBiometric } from '@things-factory/auth-base/dist-client';
|
|
17
|
+
import { BuildingInspectionStatus } from './popup/checklist/task-checklist-view';
|
|
18
|
+
import { isProjectTypeDomain } from '../../shared/domain-context';
|
|
19
|
+
import '@operato/gantt/ox-gantt.js';
|
|
20
|
+
import './popup/popup-task-upload';
|
|
21
|
+
import './popup/checklist/task-checklist-create-popup';
|
|
22
|
+
import './popup/checklist/task-checklist-view';
|
|
23
|
+
const TaskFragment = gql `
|
|
24
|
+
fragment TaskFragment on Task {
|
|
25
|
+
type
|
|
26
|
+
title: name
|
|
27
|
+
id: code
|
|
28
|
+
duration
|
|
29
|
+
startDate
|
|
30
|
+
endDate
|
|
31
|
+
dependsOn
|
|
32
|
+
progress
|
|
33
|
+
style
|
|
34
|
+
taskChecklistBinding {
|
|
35
|
+
id
|
|
36
|
+
status
|
|
37
|
+
}
|
|
38
|
+
resources {
|
|
39
|
+
type
|
|
40
|
+
allocated
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
let ProjectTask = class ProjectTask extends ScopedElementsMixin(PageView) {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
this.defaultProject = {
|
|
48
|
+
name: '',
|
|
49
|
+
buildingComplex: {
|
|
50
|
+
address: '',
|
|
51
|
+
area: 0,
|
|
52
|
+
constructionCompany: '',
|
|
53
|
+
clientCompany: '',
|
|
54
|
+
supervisoryCompany: '',
|
|
55
|
+
designCompany: '',
|
|
56
|
+
constructionType: '',
|
|
57
|
+
buildings: []
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
this.projectId = '';
|
|
61
|
+
this.project = Object.assign({}, this.defaultProject);
|
|
62
|
+
this.selectedBuildingIdx = 0;
|
|
63
|
+
this.constructionTypeList = [];
|
|
64
|
+
this.selectedChecklist = {};
|
|
65
|
+
this.selectedConstructionTypeId = '';
|
|
66
|
+
this.fromDate = '2024-01-01';
|
|
67
|
+
this.toDate = '2026-12-31';
|
|
68
|
+
this.selectedFromDate = '';
|
|
69
|
+
this.selectedToDate = '';
|
|
70
|
+
this.timeScale = 'week-day';
|
|
71
|
+
this.extendGridLines = false;
|
|
72
|
+
this.columnConfigProvider = function () {
|
|
73
|
+
return [
|
|
74
|
+
{ name: 'title', label: i18next.t('label.gantt-task-title') || 'title', visible: true, width: 150, order: 1 },
|
|
75
|
+
{
|
|
76
|
+
name: 'startDate',
|
|
77
|
+
label: i18next.t('label.gantt-task-start-date') || 'start date',
|
|
78
|
+
visible: true,
|
|
79
|
+
width: 100,
|
|
80
|
+
order: 2
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'resources',
|
|
84
|
+
label: i18next.t('label.gantt-task-resources') || 'resources',
|
|
85
|
+
visible: true,
|
|
86
|
+
width: 100,
|
|
87
|
+
order: 3
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'duration',
|
|
91
|
+
label: i18next.t('label.gantt-task-duration') || 'duration',
|
|
92
|
+
visible: true,
|
|
93
|
+
width: 30,
|
|
94
|
+
order: 4
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
get context() {
|
|
100
|
+
var _a;
|
|
101
|
+
return {
|
|
102
|
+
title: !isProjectTypeDomain() && ((_a = this.project) === null || _a === void 0 ? void 0 : _a.name)
|
|
103
|
+
? `공정표 - ${this.project.name}`
|
|
104
|
+
: '공정표'
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
render() {
|
|
108
|
+
var _a;
|
|
109
|
+
return html `
|
|
110
|
+
<div header>
|
|
111
|
+
<h2>
|
|
112
|
+
<md-icon slot="icon" back @click=${() => history.back()}>arrow_back</md-icon>
|
|
113
|
+
${this.project.name}
|
|
114
|
+
</h2>
|
|
115
|
+
<div button-container>
|
|
116
|
+
<md-elevated-button @click=${this._openUploadSchedulePopup}>
|
|
117
|
+
<md-icon slot="icon">event_note</md-icon>공정표 관리
|
|
118
|
+
</md-elevated-button>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<div body>
|
|
123
|
+
<ox-gantt
|
|
124
|
+
from-date=${new Date(this.fromDate).toISOString().split('T')[0]}
|
|
125
|
+
to-date=${new Date(this.toDate).toISOString().split('T')[0]}
|
|
126
|
+
.timeScale=${this.timeScale}
|
|
127
|
+
.tasks=${this.tasks}
|
|
128
|
+
@date-range-selected=${this.onRangeSelected}
|
|
129
|
+
@task-clicked=${(e) => {
|
|
130
|
+
console.log('task-clicked', e.detail);
|
|
131
|
+
}}
|
|
132
|
+
?extend-grid-lines=${this.extendGridLines}
|
|
133
|
+
.columnConfigProvider=${this.columnConfigProvider}
|
|
134
|
+
.colorProvider=${task => {
|
|
135
|
+
return task.style || 'gray';
|
|
136
|
+
}}
|
|
137
|
+
>
|
|
138
|
+
</ox-gantt>
|
|
139
|
+
<div select-container>
|
|
140
|
+
<div date>
|
|
141
|
+
<span name>기간선택</span>
|
|
142
|
+
<div @change=${() => this.onChangePeriodRange()}>
|
|
143
|
+
<input type="date" name="startDate" project .value=${this.project.startDate || ''} max="9999-12-31" />
|
|
144
|
+
~
|
|
145
|
+
<input type="date" name="endDate" project .value=${this.project.endDate || ''} max="9999-12-31" />
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div construction-list-container>
|
|
149
|
+
${(_a = this.constructionTypeList) === null || _a === void 0 ? void 0 : _a.map((constructionType) => {
|
|
150
|
+
var _a, _b, _c;
|
|
151
|
+
return html ` <md-outlined-button
|
|
152
|
+
id=${constructionType.id}
|
|
153
|
+
?selected=${this.selectedConstructionTypeId === constructionType.id}
|
|
154
|
+
?pass=${((_a = constructionType.taskChecklistBinding) === null || _a === void 0 ? void 0 : _a.status) === BuildingInspectionStatus.PASS}
|
|
155
|
+
?fail=${((_b = constructionType.taskChecklistBinding) === null || _b === void 0 ? void 0 : _b.status) === BuildingInspectionStatus.FAIL}
|
|
156
|
+
@click=${() => this.onClickTaskChecklist(constructionType)}
|
|
157
|
+
>
|
|
158
|
+
<div icon-container>
|
|
159
|
+
${this._getIconHtmlByStatus((_c = constructionType.taskChecklistBinding) === null || _c === void 0 ? void 0 : _c.status)} ${constructionType.title}
|
|
160
|
+
</div>
|
|
161
|
+
</md-outlined-button>`;
|
|
162
|
+
})}
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
`;
|
|
167
|
+
}
|
|
168
|
+
async pageInitialized(lifecycle) { }
|
|
169
|
+
async pageUpdated(changes, lifecycle) {
|
|
170
|
+
if (this.active) {
|
|
171
|
+
this.projectId = lifecycle.resourceId || '';
|
|
172
|
+
await this.initProject(this.projectId);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
async initProject(projectId = '') {
|
|
176
|
+
var _a, _b;
|
|
177
|
+
const response = await client.query({
|
|
178
|
+
query: gql `
|
|
179
|
+
query Project($id: String!, $sortings: [Sorting!]) {
|
|
180
|
+
project(id: $id) {
|
|
181
|
+
id
|
|
182
|
+
name
|
|
183
|
+
startDate
|
|
184
|
+
endDate
|
|
185
|
+
rootTasks {
|
|
186
|
+
...TaskFragment
|
|
187
|
+
children(sortings: $sortings) {
|
|
188
|
+
...TaskFragment
|
|
189
|
+
children(sortings: $sortings) {
|
|
190
|
+
...TaskFragment
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
scheduleTable {
|
|
195
|
+
id
|
|
196
|
+
name
|
|
197
|
+
}
|
|
198
|
+
buildingComplex {
|
|
199
|
+
id
|
|
200
|
+
planXScale
|
|
201
|
+
planYScale
|
|
202
|
+
taskConstructorEmails
|
|
203
|
+
overallConstructorEmails
|
|
204
|
+
taskSupervisoryEmails
|
|
205
|
+
overallSupervisoryEmails
|
|
206
|
+
buildings {
|
|
207
|
+
id
|
|
208
|
+
name
|
|
209
|
+
drawing {
|
|
210
|
+
id
|
|
211
|
+
name
|
|
212
|
+
}
|
|
213
|
+
buildingLevels {
|
|
214
|
+
id
|
|
215
|
+
floor
|
|
216
|
+
mainDrawing {
|
|
217
|
+
id
|
|
218
|
+
name
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
${TaskFragment}
|
|
227
|
+
`,
|
|
228
|
+
variables: {
|
|
229
|
+
id: projectId,
|
|
230
|
+
sortings: [{ name: 'startDate' }]
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
this.project = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project;
|
|
234
|
+
this.tasks = (_b = response.data) === null || _b === void 0 ? void 0 : _b.project.rootTasks;
|
|
235
|
+
if (this.project) {
|
|
236
|
+
this.fromDate = this.project.startDate || '2024-01-01'; /* TODO default: start date of this year - 3 */
|
|
237
|
+
this.toDate = this.project.endDate || '2026-12-31'; /* TODO defaule: end date of this year + 3 */
|
|
238
|
+
}
|
|
239
|
+
this.updateContext();
|
|
240
|
+
}
|
|
241
|
+
onChangePeriodRange() {
|
|
242
|
+
this.fromDate = this.inputStartDate.value;
|
|
243
|
+
this.toDate = this.inputEndDate.value;
|
|
244
|
+
}
|
|
245
|
+
onRangeSelected(event) {
|
|
246
|
+
var _a, _b;
|
|
247
|
+
if (event) {
|
|
248
|
+
this.selectedFromDate = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.start;
|
|
249
|
+
this.selectedToDate = (_b = event.detail) === null || _b === void 0 ? void 0 : _b.end;
|
|
250
|
+
}
|
|
251
|
+
const selectedFromDate = new Date(this.selectedFromDate + 'T00:00:00.000Z');
|
|
252
|
+
const selectedToDate = new Date(this.selectedToDate + 'T23:59:59.000Z');
|
|
253
|
+
this.constructionTypeList = this.tasks.filter(constuction => {
|
|
254
|
+
const constuctionStartDate = new Date(constuction.startDate);
|
|
255
|
+
const constuctionEndDate = new Date(constuction.endDate);
|
|
256
|
+
return constuctionStartDate <= selectedToDate && constuctionEndDate >= selectedFromDate;
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
_openUploadSchedulePopup() {
|
|
260
|
+
var _a;
|
|
261
|
+
openPopup(html `<popup-task-upload
|
|
262
|
+
.projectId=${this.projectId}
|
|
263
|
+
.scheduleTable=${(_a = this.project) === null || _a === void 0 ? void 0 : _a.scheduleTable}
|
|
264
|
+
@uploaded=${() => this.initProject(this.projectId)}
|
|
265
|
+
></popup-task-upload>`, { backdrop: true, size: 'medium', title: '공정표 업로드' });
|
|
266
|
+
}
|
|
267
|
+
async onClickTaskChecklist(constructionType) {
|
|
268
|
+
// 선택된 공종 설정
|
|
269
|
+
this.selectedConstructionTypeId = constructionType.id;
|
|
270
|
+
// 체크리스트가 있으면 수정 모드, 없으면 생성 모드
|
|
271
|
+
if (constructionType.taskChecklistBinding) {
|
|
272
|
+
const taskChecklistBinding = await this._getTaskChecklistBindingById(constructionType.taskChecklistBinding.id);
|
|
273
|
+
this.selectedChecklist = Object.assign(Object.assign({}, taskChecklistBinding.checklist), { status: taskChecklistBinding.status });
|
|
274
|
+
this._openUpdateTaskChecklistPopup(constructionType);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
this._openCreateChecklistPopup(constructionType);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
_openCreateChecklistPopup(constructionType) {
|
|
281
|
+
openPopup(html `<task-checklist-create-popup
|
|
282
|
+
.projectId=${this.projectId}
|
|
283
|
+
.taskCode=${constructionType.id}
|
|
284
|
+
@requestRefresh="${async () => {
|
|
285
|
+
await this.initProject(this.projectId);
|
|
286
|
+
this.onRangeSelected(null);
|
|
287
|
+
}}"
|
|
288
|
+
></task-checklist-create-popup>`, {
|
|
289
|
+
backdrop: true,
|
|
290
|
+
size: 'large',
|
|
291
|
+
title: `체크리스트 생성`
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
_openUpdateTaskChecklistPopup(constructionType) {
|
|
295
|
+
var _a;
|
|
296
|
+
openPopup(html `
|
|
297
|
+
<div style="overflow-y: auto; height: 100%;">
|
|
298
|
+
<task-checklist-view
|
|
299
|
+
.mode=${"EDITOR" /* ChecklistMode.EDITOR */}
|
|
300
|
+
.status=${this.selectedChecklist.status}
|
|
301
|
+
.checklist=${this.selectedChecklist || {}}
|
|
302
|
+
.buildingComplex=${((_a = this.project) === null || _a === void 0 ? void 0 : _a.buildingComplex) || {}}
|
|
303
|
+
></task-checklist-view>
|
|
304
|
+
|
|
305
|
+
<div style="text-align: right; margin-right: 20px; margin-bottom: 15px">
|
|
306
|
+
<md-elevated-button
|
|
307
|
+
?disabled=${this.selectedChecklist.status == BuildingInspectionStatus.PASS}
|
|
308
|
+
@click=${this._onClickModifyChecklist.bind(this)}
|
|
309
|
+
>
|
|
310
|
+
<md-icon slot="icon">assignment</md-icon>등록
|
|
311
|
+
</md-elevated-button>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
`, { backdrop: true, size: 'large', title: constructionType.title });
|
|
315
|
+
}
|
|
316
|
+
_onClickModifyChecklist() {
|
|
317
|
+
this.validateChecklist(this.selectedChecklist);
|
|
318
|
+
}
|
|
319
|
+
async validateChecklist(checklist) {
|
|
320
|
+
var _a, _b;
|
|
321
|
+
try {
|
|
322
|
+
const result = await verifyBiometric();
|
|
323
|
+
if (result.verified) {
|
|
324
|
+
console.log('Verification successful. Proceeding with sensitive action.');
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
notify({ message: 'Verification failed:' + result.message });
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
notify({ message: 'Error during biometric verification:' + error });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
const response = await client.mutate({
|
|
336
|
+
mutation: gql `
|
|
337
|
+
mutation UpdateTaskChecklist($taskChecklist: UpdateTaskChecklistSubmitType!) {
|
|
338
|
+
updateTaskChecklist(taskChecklist: $taskChecklist)
|
|
339
|
+
}
|
|
340
|
+
`,
|
|
341
|
+
variables: {
|
|
342
|
+
taskChecklist: {
|
|
343
|
+
checklistId: checklist.id,
|
|
344
|
+
checklist: {
|
|
345
|
+
id: checklist.id,
|
|
346
|
+
overallConstructorSignature: checklist.overallConstructorSignature,
|
|
347
|
+
taskConstructorSignature: checklist.taskConstructorSignature,
|
|
348
|
+
overallSupervisorySignature: checklist.overallSupervisorySignature,
|
|
349
|
+
taskSupervisorySignature: checklist.taskSupervisorySignature
|
|
350
|
+
},
|
|
351
|
+
checklistItem: checklist.checklistItems.map(item => ({
|
|
352
|
+
id: item.id,
|
|
353
|
+
constructionConfirmStatus: item.constructionConfirmStatus,
|
|
354
|
+
supervisoryConfirmStatus: item.supervisoryConfirmStatus
|
|
355
|
+
}))
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
if (!response.errors) {
|
|
360
|
+
notify({ message: '검측 요청서를 등록하였습니다.' });
|
|
361
|
+
await this.initProject(this.projectId);
|
|
362
|
+
this.onRangeSelected(null);
|
|
363
|
+
history.back();
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
notify({ message: ((_b = (_a = response.errors) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.message) || '검측 요청서 등록에 실패하였습니다.', level: 'error' });
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
_getIconHtmlByStatus(status) {
|
|
370
|
+
if (!status)
|
|
371
|
+
return '';
|
|
372
|
+
if (status == BuildingInspectionStatus.WAIT || status == BuildingInspectionStatus.OVERALL_WAIT) {
|
|
373
|
+
return html `<md-icon request>frame_inspect</md-icon>`;
|
|
374
|
+
}
|
|
375
|
+
if (status == BuildingInspectionStatus.REQUEST || status == BuildingInspectionStatus.OVERALL_REQUEST) {
|
|
376
|
+
return html `<md-icon request>exclamation</md-icon>`;
|
|
377
|
+
}
|
|
378
|
+
if (status == BuildingInspectionStatus.PASS) {
|
|
379
|
+
return html `<md-icon pass>check</md-icon>`;
|
|
380
|
+
}
|
|
381
|
+
return html `<md-icon fail>close</md-icon>`;
|
|
382
|
+
}
|
|
383
|
+
async _getTaskChecklistBindingById(id) {
|
|
384
|
+
var _a;
|
|
385
|
+
const response = await client.query({
|
|
386
|
+
query: gql `
|
|
387
|
+
query TaskChecklistBinding($id: String!) {
|
|
388
|
+
taskChecklistBinding(id: $id) {
|
|
389
|
+
id
|
|
390
|
+
status
|
|
391
|
+
|
|
392
|
+
checklist {
|
|
393
|
+
id
|
|
394
|
+
name
|
|
395
|
+
constructionType
|
|
396
|
+
constructionDetailType
|
|
397
|
+
location
|
|
398
|
+
inspectionParts
|
|
399
|
+
documentNo
|
|
400
|
+
constructionInspectionDate
|
|
401
|
+
supervisorInspectionDate
|
|
402
|
+
overallConstructorSignature
|
|
403
|
+
taskConstructorSignature
|
|
404
|
+
overallSupervisorySignature
|
|
405
|
+
taskSupervisorySignature
|
|
406
|
+
|
|
407
|
+
checklistItems {
|
|
408
|
+
id
|
|
409
|
+
name
|
|
410
|
+
sequence
|
|
411
|
+
mainType
|
|
412
|
+
detailType
|
|
413
|
+
kcsCriteria
|
|
414
|
+
siteSpecCriteria
|
|
415
|
+
constructionConfirmStatus
|
|
416
|
+
supervisoryConfirmStatus
|
|
417
|
+
checklistItemCommentCount
|
|
418
|
+
checklistItemAttachmentCount
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
manager {
|
|
423
|
+
userId
|
|
424
|
+
name
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
`,
|
|
429
|
+
variables: { id }
|
|
430
|
+
});
|
|
431
|
+
if (response.errors)
|
|
432
|
+
return;
|
|
433
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.taskChecklistBinding) || {};
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
ProjectTask.styles = [
|
|
437
|
+
ScrollbarStyles,
|
|
438
|
+
css `
|
|
439
|
+
:host {
|
|
440
|
+
display: flex;
|
|
441
|
+
flex-direction: column;
|
|
442
|
+
|
|
443
|
+
color: #4e5055;
|
|
444
|
+
|
|
445
|
+
width: 100%;
|
|
446
|
+
background-color: var(--md-sys-color-background, #f6f6f6);
|
|
447
|
+
overflow-y: auto;
|
|
448
|
+
|
|
449
|
+
--grid-record-emphasized-background-color: red;
|
|
450
|
+
--grid-record-emphasized-color: yellow;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
*[bold] {
|
|
454
|
+
font-weight: bold;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
div[header] {
|
|
458
|
+
display: flex;
|
|
459
|
+
margin: 0px var(--spacing-large, 12px);
|
|
460
|
+
|
|
461
|
+
h2 {
|
|
462
|
+
display: flex;
|
|
463
|
+
gap: 7px;
|
|
464
|
+
flex: 0.5;
|
|
465
|
+
color: #3f71a0;
|
|
466
|
+
font-size: 18px;
|
|
467
|
+
|
|
468
|
+
md-icon[back] {
|
|
469
|
+
background: linear-gradient(135deg, #3f71a0 0%, #5a8cc7 100%);
|
|
470
|
+
color: white;
|
|
471
|
+
padding: 8px;
|
|
472
|
+
border-radius: 50%;
|
|
473
|
+
cursor: pointer;
|
|
474
|
+
box-shadow: 0 2px 8px rgba(63, 113, 160, 0.3);
|
|
475
|
+
width: 14px;
|
|
476
|
+
height: 14px;
|
|
477
|
+
--md-icon-size: 20px;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
md-icon[back]:hover {
|
|
481
|
+
background: linear-gradient(135deg, #2e5c89 0%, #4a7bb0 100%);
|
|
482
|
+
box-shadow: 0 4px 12px rgba(63, 113, 160, 0.4);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
div[button-container] {
|
|
487
|
+
display: flex;
|
|
488
|
+
align-items: center;
|
|
489
|
+
justify-content: end;
|
|
490
|
+
flex: 0.5;
|
|
491
|
+
|
|
492
|
+
md-elevated-button {
|
|
493
|
+
margin: 0px;
|
|
494
|
+
margin-left: var(--spacing-small, 4px);
|
|
495
|
+
|
|
496
|
+
--md-elevated-button-container-height: 32px;
|
|
497
|
+
--md-elevated-button-label-text-size: 16px;
|
|
498
|
+
--md-elevated-button-container-color: #0595e5;
|
|
499
|
+
|
|
500
|
+
--md-elevated-button-label-text-color: var(--md-sys-color-on-primary);
|
|
501
|
+
--md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);
|
|
502
|
+
--md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);
|
|
503
|
+
--md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);
|
|
504
|
+
--md-elevated-button-icon-color: var(--md-sys-color-on-primary);
|
|
505
|
+
--md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);
|
|
506
|
+
--md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);
|
|
507
|
+
--md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
div[body] {
|
|
513
|
+
flex: 1;
|
|
514
|
+
|
|
515
|
+
display: flex;
|
|
516
|
+
flex-direction: column;
|
|
517
|
+
margin: var(--spacing-large, 12px);
|
|
518
|
+
margin-top: 0;
|
|
519
|
+
gap: var(--spacing-medium, 8px);
|
|
520
|
+
overflow: hidden;
|
|
521
|
+
|
|
522
|
+
h3 {
|
|
523
|
+
color: #2e79be;
|
|
524
|
+
font-size: 16px;
|
|
525
|
+
margin: 0px;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
& > div {
|
|
529
|
+
display: flex;
|
|
530
|
+
border-radius: 5px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
ox-gantt {
|
|
534
|
+
flex: 1;
|
|
535
|
+
box-sizing: border-box;
|
|
536
|
+
overflow: hidden;
|
|
537
|
+
|
|
538
|
+
background-color: var(--md-sys-color-primary-container);
|
|
539
|
+
color: var(--md-sys-color-on-primary-container);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
div[select-container] {
|
|
543
|
+
gap: var(--spacing-medium, 8px);
|
|
544
|
+
|
|
545
|
+
div[date] {
|
|
546
|
+
display: flex;
|
|
547
|
+
align-items: center;
|
|
548
|
+
justify-content: space-between;
|
|
549
|
+
background-color: #2ea4df1a;
|
|
550
|
+
border: 1px solid #2ea4df33;
|
|
551
|
+
border-radius: 5px;
|
|
552
|
+
gap: var(--spacing-medium, 8px);
|
|
553
|
+
padding: 12px 36px 12px 15px;
|
|
554
|
+
|
|
555
|
+
span[name] {
|
|
556
|
+
font-size: 16px;
|
|
557
|
+
font-weight: bold;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
input[type='date'] {
|
|
561
|
+
border: 1px solid rgba(51, 51, 51, 0.2);
|
|
562
|
+
padding: var(--spacing-small, 4px) var(--spacing-medium, 8px);
|
|
563
|
+
border-radius: 5px;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
div[construction-list-container] {
|
|
568
|
+
flex: 1;
|
|
569
|
+
display: flex;
|
|
570
|
+
border-radius: 5px;
|
|
571
|
+
border: 1px solid #cccccc80;
|
|
572
|
+
background-color: #fff;
|
|
573
|
+
padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
|
|
574
|
+
gap: var(--spacing-medium, 8px);
|
|
575
|
+
overflow-x: auto;
|
|
576
|
+
|
|
577
|
+
md-outlined-button {
|
|
578
|
+
--md-outlined-button-container-height: 30px;
|
|
579
|
+
--md-outlined-button-trailing-space: var(--spacing-medium, 8px);
|
|
580
|
+
--md-outlined-button-leading-space: var(--spacing-medium, 8px);
|
|
581
|
+
--md-outlined-button-label-text-color: #586878;
|
|
582
|
+
--md-sys-color-outline: rgba(51, 51, 51, 0.2);
|
|
583
|
+
box-shadow: 1px 1px 1px #0000001a;
|
|
584
|
+
padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
|
|
585
|
+
font-weight: 700;
|
|
586
|
+
|
|
587
|
+
&[selected] {
|
|
588
|
+
--md-outlined-button-label-text-color: #0595e5 !important;
|
|
589
|
+
--md-sys-color-outline: #0595e5 !important;
|
|
590
|
+
background-color: #0595e51a !important;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
&[pass] {
|
|
594
|
+
--md-outlined-button-label-text-color: #4bbb4a;
|
|
595
|
+
--md-sys-color-outline: #4bbb4a;
|
|
596
|
+
background-color: #4bbb4a1a;
|
|
597
|
+
}
|
|
598
|
+
&[fail] {
|
|
599
|
+
--md-outlined-button-label-text-color: #ff4444;
|
|
600
|
+
--md-sys-color-outline: #ff4444;
|
|
601
|
+
background-color: #ff44441a;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
div[icon-container] {
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
gap: 4px;
|
|
609
|
+
|
|
610
|
+
md-icon[request],
|
|
611
|
+
md-icon[pass],
|
|
612
|
+
md-icon[fail] {
|
|
613
|
+
width: 16px;
|
|
614
|
+
height: 16px;
|
|
615
|
+
margin-right: 4px;
|
|
616
|
+
border-radius: 3px;
|
|
617
|
+
font-size: 14px;
|
|
618
|
+
font-weight: 700;
|
|
619
|
+
color: #fff;
|
|
620
|
+
}
|
|
621
|
+
md-icon[request] {
|
|
622
|
+
background-color: #4e5055;
|
|
623
|
+
}
|
|
624
|
+
md-icon[pass] {
|
|
625
|
+
background-color: #4bbb4a;
|
|
626
|
+
}
|
|
627
|
+
md-icon[fail] {
|
|
628
|
+
background-color: #ff4444;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
`
|
|
635
|
+
];
|
|
636
|
+
__decorate([
|
|
637
|
+
state(),
|
|
638
|
+
__metadata("design:type", String)
|
|
639
|
+
], ProjectTask.prototype, "projectId", void 0);
|
|
640
|
+
__decorate([
|
|
641
|
+
state(),
|
|
642
|
+
__metadata("design:type", Object)
|
|
643
|
+
], ProjectTask.prototype, "project", void 0);
|
|
644
|
+
__decorate([
|
|
645
|
+
state(),
|
|
646
|
+
__metadata("design:type", Number)
|
|
647
|
+
], ProjectTask.prototype, "selectedBuildingIdx", void 0);
|
|
648
|
+
__decorate([
|
|
649
|
+
state(),
|
|
650
|
+
__metadata("design:type", Object)
|
|
651
|
+
], ProjectTask.prototype, "tasks", void 0);
|
|
652
|
+
__decorate([
|
|
653
|
+
state(),
|
|
654
|
+
__metadata("design:type", Object)
|
|
655
|
+
], ProjectTask.prototype, "constructionTypeList", void 0);
|
|
656
|
+
__decorate([
|
|
657
|
+
state(),
|
|
658
|
+
__metadata("design:type", Object)
|
|
659
|
+
], ProjectTask.prototype, "selectedChecklist", void 0);
|
|
660
|
+
__decorate([
|
|
661
|
+
state(),
|
|
662
|
+
__metadata("design:type", String)
|
|
663
|
+
], ProjectTask.prototype, "selectedConstructionTypeId", void 0);
|
|
664
|
+
__decorate([
|
|
665
|
+
state(),
|
|
666
|
+
__metadata("design:type", Object)
|
|
667
|
+
], ProjectTask.prototype, "fromDate", void 0);
|
|
668
|
+
__decorate([
|
|
669
|
+
state(),
|
|
670
|
+
__metadata("design:type", Object)
|
|
671
|
+
], ProjectTask.prototype, "toDate", void 0);
|
|
672
|
+
__decorate([
|
|
673
|
+
state(),
|
|
674
|
+
__metadata("design:type", Object)
|
|
675
|
+
], ProjectTask.prototype, "selectedFromDate", void 0);
|
|
676
|
+
__decorate([
|
|
677
|
+
state(),
|
|
678
|
+
__metadata("design:type", Object)
|
|
679
|
+
], ProjectTask.prototype, "selectedToDate", void 0);
|
|
680
|
+
__decorate([
|
|
681
|
+
query('input[name="startDate"]'),
|
|
682
|
+
__metadata("design:type", HTMLInputElement)
|
|
683
|
+
], ProjectTask.prototype, "inputStartDate", void 0);
|
|
684
|
+
__decorate([
|
|
685
|
+
query('input[name="endDate"]'),
|
|
686
|
+
__metadata("design:type", HTMLInputElement)
|
|
687
|
+
], ProjectTask.prototype, "inputEndDate", void 0);
|
|
688
|
+
ProjectTask = __decorate([
|
|
689
|
+
customElement('project-task')
|
|
690
|
+
], ProjectTask);
|
|
691
|
+
export { ProjectTask };
|
|
692
|
+
//# sourceMappingURL=project-task.js.map
|