@dssp/supervision 1.0.0-alpha.26 → 1.0.0-alpha.27
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/graphql/building-inspection.js +6 -0
- package/dist-client/graphql/building-inspection.js.map +1 -1
- package/dist-client/pages/action-plan/action-plan-importer.d.ts +1 -1
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +25 -11
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +5 -0
- package/dist-client/pages/building-inspection/building-inspection-list.js +64 -8
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +17 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +354 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +17 -21
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +4 -1
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +45 -19
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +2 -2
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +1 -1
- package/dist-client/pages/checklist/checklist-view.js +28 -3
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -1
- package/dist-client/pages/checklist/inspection-tab-popup.d.ts +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.d.ts +1 -1
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +1 -1
- package/dist-client/pages/issue/issue-importer.d.ts +1 -1
- package/dist-client/pages/issue/issue-list-page.d.ts +1 -1
- package/dist-client/pages/project-report/project-report-importer.d.ts +1 -1
- package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -1
- package/dist-client/pages/supervisor/supervisor-importer.d.ts +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.js +7 -2
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.js +7 -1
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +2 -0
- package/dist-server/service/building-inspection/building-inspection-type.js +8 -0
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +8 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +98 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +12 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +85 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +12 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +47 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +25 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +98 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
- package/dist-server/service/checklist/checklist.d.ts +4 -1
- package/dist-server/service/checklist/checklist.js +15 -4
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/index.d.ts +2 -1
- package/dist-server/service/index.js +6 -2
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.d.ts +0 -21
- package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js +0 -327
- package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js.map +0 -1
- package/dist-client/pages/building-inspection/component/photo-album-popup.d.ts +0 -41
- package/dist-client/pages/building-inspection/component/photo-album-popup.js +0 -406
- package/dist-client/pages/building-inspection/component/photo-album-popup.js.map +0 -1
|
@@ -20,7 +20,13 @@ export async function getBuildingInspectionForChecklist(buildingInspectionId = '
|
|
|
20
20
|
inspectionParts
|
|
21
21
|
documentNo
|
|
22
22
|
inspectionRequestDocumentNo
|
|
23
|
+
inspectionRequestMemo
|
|
24
|
+
inspectionRequestUpdatedAt
|
|
23
25
|
inspectionResultDocumentNo
|
|
26
|
+
inspectionResultStatus
|
|
27
|
+
inspectionResultType
|
|
28
|
+
inspectionResultMemo
|
|
29
|
+
inspectionResultUpdatedAt
|
|
24
30
|
constructionInspectionDate
|
|
25
31
|
supervisorInspectionDate
|
|
26
32
|
overallConstructorSignature
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"building-inspection.js","sourceRoot":"","sources":["../../client/graphql/building-inspection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,uBAA+B,EAAE;IACvF,IAAI,CAAC,oBAAoB;QAAE,OAAO,IAAI,CAAA;IAEtC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoFT;QACD,SAAS,EAAE;YACT,oBAAoB;SACrB;KACF,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEhC,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAA;AACzC,CAAC","sourcesContent":["import { client } from '@operato/graphql'\nimport { gql } from '@apollo/client'\n\nexport async function getBuildingInspectionForChecklist(buildingInspectionId: string = '') {\n if (!buildingInspectionId) return null\n\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n memo\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n inspectionRequestDocumentNo\n inspectionRequestMemo\n inspectionRequestUpdatedAt\n inspectionResultDocumentNo\n inspectionResultStatus\n inspectionResultType\n inspectionResultMemo\n inspectionResultUpdatedAt\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n nameListAttachment {\n id\n name\n fullpath\n }\n taskConstructor {\n id\n name\n }\n overallConstructor {\n id\n name\n }\n taskSupervisory {\n id\n name\n }\n overallSupervisory {\n id\n name\n }\n\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n checklistItemCommentCount\n checklistItemAttachmentCount\n }\n }\n\n buildingLevel {\n id\n floor\n\n building {\n id\n buildingComplex {\n id\n overallConstructorEmails\n taskConstructorEmails\n overallSupervisoryEmails\n taskSupervisoryEmails\n supervisoryCompany\n constructionCompany\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return null\n\n return response.data.buildingInspection\n}\n"]}
|
|
@@ -48,7 +48,7 @@ export declare class ActionPlanListPage extends ActionPlanListPage_base {
|
|
|
48
48
|
handler: (records: any) => Promise<void>;
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
render(): import("lit
|
|
51
|
+
render(): import("lit").TemplateResult<1>;
|
|
52
52
|
pageInitialized(lifecycle: any): Promise<void>;
|
|
53
53
|
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
54
54
|
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
@@ -15,7 +15,7 @@ export declare class BuildingInspectionCamera extends PageView {
|
|
|
15
15
|
get context(): {
|
|
16
16
|
title: string;
|
|
17
17
|
};
|
|
18
|
-
render(): import("lit
|
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
|
19
19
|
protected updated(changes: PropertyValues): Promise<void>;
|
|
20
20
|
pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
|
|
21
21
|
initBuildingInspection(buildingInspectionId?: string): Promise<void>;
|
|
@@ -13,7 +13,7 @@ export declare class BuildingInspectionDetailChecklist extends PageView {
|
|
|
13
13
|
get context(): {
|
|
14
14
|
title: string;
|
|
15
15
|
};
|
|
16
|
-
render(): import("lit
|
|
16
|
+
render(): import("lit").TemplateResult<1>;
|
|
17
17
|
pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
|
|
18
18
|
initBuildingInspection(buildingInspectionId?: string): Promise<void>;
|
|
19
19
|
private _getProjectByBuildingComplexId;
|
|
@@ -66,7 +66,6 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
66
66
|
if (this.active) {
|
|
67
67
|
const buildingInspectionId = lifecycle.resourceId || '';
|
|
68
68
|
await this.initBuildingInspection(buildingInspectionId);
|
|
69
|
-
this._showInspectionResultNotification(this.buildingInspection.checklist);
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
async initBuildingInspection(buildingInspectionId = '') {
|
|
@@ -136,13 +135,13 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
136
135
|
variables: {
|
|
137
136
|
buildingInspection: {
|
|
138
137
|
id: this.buildingInspection.id,
|
|
139
|
-
memo: this.buildingInspection.memo,
|
|
140
138
|
checklist: {
|
|
141
139
|
id: checklist.id,
|
|
142
140
|
overallConstructorSignature: checklist.overallConstructorSignature,
|
|
143
141
|
taskConstructorSignature: checklist.taskConstructorSignature,
|
|
144
142
|
overallSupervisorySignature: checklist.overallSupervisorySignature,
|
|
145
143
|
taskSupervisorySignature: checklist.taskSupervisorySignature,
|
|
144
|
+
inspectionRequestMemo: checklist.inspectionRequestMemo,
|
|
146
145
|
inspectionResultMemo: checklist.inspectionResultMemo,
|
|
147
146
|
inspectionResultStatus: checklist.inspectionResultStatus,
|
|
148
147
|
inspectionResultType: checklist.inspectionResultType
|
|
@@ -170,11 +169,12 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
170
169
|
<inspection-request-document
|
|
171
170
|
.checklist=${checklist}
|
|
172
171
|
.buildingInspection=${this.buildingInspection}
|
|
173
|
-
.mode=${InspectionMode.EDIT}
|
|
172
|
+
.mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}
|
|
174
173
|
@inspection-memo-change=${this._onInspectionMemoChange.bind(this)}
|
|
175
174
|
@name-list-file-selected=${(e) => {
|
|
176
175
|
// checklist에 선택된 파일 저장
|
|
177
176
|
checklist.nameListAttachment = e.detail.file;
|
|
177
|
+
checklist.isNameListAttachmentUploaded = true;
|
|
178
178
|
}}
|
|
179
179
|
@popup-close=${() => resolve()}
|
|
180
180
|
></inspection-request-document>
|
|
@@ -188,6 +188,7 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
188
188
|
.checklist=${checklist}
|
|
189
189
|
.buildingInspection=${this.buildingInspection}
|
|
190
190
|
.project=${this.project}
|
|
191
|
+
.mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}
|
|
191
192
|
@inspection-result-change=${this._onInspectionResultChange.bind(this)}
|
|
192
193
|
@inspection-type-change=${this._onInspectionTypeChange.bind(this)}
|
|
193
194
|
@instructions-change=${this._onInstructionsChange.bind(this)}
|
|
@@ -197,25 +198,38 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
|
|
|
197
198
|
});
|
|
198
199
|
}
|
|
199
200
|
_onInspectionMemoChange(e) {
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
var _a;
|
|
202
|
+
const { inspectionRequestMemo } = e.detail;
|
|
203
|
+
if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
|
|
204
|
+
this.buildingInspection.checklist.inspectionRequestMemo = inspectionRequestMemo;
|
|
205
|
+
}
|
|
206
|
+
this.requestUpdate();
|
|
202
207
|
}
|
|
203
208
|
_onInspectionResultChange(e) {
|
|
209
|
+
var _a;
|
|
204
210
|
const { inspectionResultStatus } = e.detail;
|
|
205
|
-
// checklist 업데이트
|
|
206
|
-
|
|
211
|
+
// checklist 업데이트 (레퍼런스 유지하여 호출부 인자에도 반영)
|
|
212
|
+
if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
|
|
213
|
+
this.buildingInspection.checklist.inspectionResultStatus = inspectionResultStatus;
|
|
214
|
+
}
|
|
207
215
|
this.requestUpdate();
|
|
208
216
|
}
|
|
209
217
|
_onInspectionTypeChange(e) {
|
|
218
|
+
var _a;
|
|
210
219
|
const { inspectionResultType } = e.detail;
|
|
211
|
-
// checklist 업데이트
|
|
212
|
-
|
|
220
|
+
// checklist 업데이트 (레퍼런스 유지)
|
|
221
|
+
if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
|
|
222
|
+
this.buildingInspection.checklist.inspectionResultType = inspectionResultType;
|
|
223
|
+
}
|
|
213
224
|
this.requestUpdate();
|
|
214
225
|
}
|
|
215
226
|
_onInstructionsChange(e) {
|
|
227
|
+
var _a;
|
|
216
228
|
const { inspectionResultMemo } = e.detail;
|
|
217
|
-
// checklist 업데이트
|
|
218
|
-
|
|
229
|
+
// checklist 업데이트 (레퍼런스 유지)
|
|
230
|
+
if ((_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) {
|
|
231
|
+
this.buildingInspection.checklist.inspectionResultMemo = inspectionResultMemo;
|
|
232
|
+
}
|
|
219
233
|
this.requestUpdate();
|
|
220
234
|
}
|
|
221
235
|
// 실명부 파일 업로드
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6DAA6D,CAAA;AACpE,OAAO,gEAAgE,CAAA;AACvE,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAA;AAGrF,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,QAAQ;IAAxD;;QAwCI,YAAO,GAAQ,EAAE,CAAA;QACjB,uBAAkB,GAAQ,EAAE,CAAA;IAuQvC,CAAC;IArQC,IAAI,OAAO;QACT,OAAO;YACL,KAAK,EAAE,qBAAqB;SAC7B,CAAA;IACH,CAAC;IAED,MAAM;;QACJ,OAAO,IAAI,CAAA;;gCAEiB,MAAA,IAAI,CAAC,kB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,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CAgT7C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify, openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport './component/inspection-document/inspection-request-document'\nimport './component/inspection-document/inspection-result-notification'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n gap: 10px;\n margin-right: 50px;\n margin-bottom: 15px;\n }\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 체크리스트'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .projectType=${this.project.projectType}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n const buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(buildingInspectionId)\n\n this._showInspectionResultNotification(this.buildingInspection.checklist)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n projectType\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onClickModifyChecklist() {\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n // 사용자 권한 체크\n const email = (store.getState() as any).auth?.user?.email\n const isOverallConstructor =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallConstructorEmails?.includes(email) || false\n const isOverallSupervisory =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallSupervisoryEmails?.includes(email) || false\n\n // 권한에 따라 적절한 문서 표시\n if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {\n await this._showInspectionRequestDocument(checklist)\n } else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {\n await this._showInspectionResultNotification(checklist)\n }\n\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n // 실명부 파일 업로드 처리 (새로 업로드된 경우만)\n if (checklist.isNameListAttachmentUploaded) {\n await this._uploadNameListFile(checklist)\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n memo: this.buildingInspection.memo,\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature,\n inspectionResultMemo: checklist.inspectionResultMemo,\n inspectionResultStatus: checklist.inspectionResultStatus,\n inspectionResultType: checklist.inspectionResultType\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // resolve 호출 전까지 싱크를 위해 Promise 사용\n private async _showInspectionRequestDocument(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-request-document\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .mode=${InspectionMode.EDIT}\n @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}\n @name-list-file-selected=${(e: CustomEvent) => {\n // checklist에 선택된 파일 저장\n checklist.nameListAttachment = e.detail.file\n }}\n @popup-close=${() => resolve()}\n ></inspection-request-document>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n })\n }\n\n private async _showInspectionResultNotification(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-result-notification\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .project=${this.project}\n @inspection-result-change=${this._onInspectionResultChange.bind(this)}\n @inspection-type-change=${this._onInspectionTypeChange.bind(this)}\n @instructions-change=${this._onInstructionsChange.bind(this)}\n @popup-close=${() => resolve()}\n ></inspection-result-notification>\n `,\n { backdrop: true, size: 'large', title: '검측 결과 통보' }\n )\n })\n }\n\n private _onInspectionMemoChange(e: CustomEvent) {\n const { memo } = e.detail\n this.buildingInspection = {\n ...this.buildingInspection,\n memo\n }\n }\n\n private _onInspectionResultChange(e: CustomEvent) {\n const { inspectionResultStatus } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultStatus\n }\n this.requestUpdate()\n }\n\n private _onInspectionTypeChange(e: CustomEvent) {\n const { inspectionResultType } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultType\n }\n this.requestUpdate()\n }\n\n private _onInstructionsChange(e: CustomEvent) {\n const { inspectionResultMemo } = e.detail\n // checklist 업데이트\n this.buildingInspection.checklist = {\n ...this.buildingInspection.checklist,\n inspectionResultMemo\n }\n this.requestUpdate()\n }\n\n // 실명부 파일 업로드\n private async _uploadNameListFile(checklist: any) {\n if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateAttachments($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [\n {\n file: checklist.nameListAttachment,\n refBy: checklist.id,\n refType: 'Checklist_NameList'\n }\n ]\n },\n context: { hasUpload: true }\n })\n\n if (response.errors) {\n throw new Error(response.errors[0]?.message || '실명부 파일 업로드에 실패했습니다.')\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection-detail-checklist.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-checklist.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,OAAO,+CAA+C,CAAA;AACtD,OAAO,6DAA6D,CAAA;AACpE,OAAO,gEAAgE,CAAA;AACvE,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,iCAAiC,E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CAAC,SAAS,CAAC,4BAA4B,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;YAC7E,OAAM;QACR,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;;;OAMZ;YACD,SAAS,EAAE;gBACT,WAAW,EAAE;oBACX;wBACE,IAAI,EAAE,SAAS,CAAC,kBAAkB;wBAClC,KAAK,EAAE,SAAS,CAAC,EAAE;wBACnB,OAAO,EAAE,oBAAoB;qBAC9B;iBACF;aACF;YACD,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAC7B,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,CAAA,MAAA,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,CAAC,CAAA;QACvE,CAAC;IACH,CAAC;;AA3SM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,AArCY,CAqCZ;AAEQ;IAAR,KAAK,EAAE;;kEAAkB;AACjB;IAAR,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CA6S7C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify, openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport gql from 'graphql-tag'\n\nimport { verifyBiometric } from '@things-factory/auth-base/dist-client'\n\nimport './component/building-inspection-detail-header'\nimport './component/inspection-document/inspection-request-document'\nimport './component/inspection-document/inspection-result-notification'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { BuildingInspectionStatus } from './building-inspection-list'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[body] {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n gap: 10px;\n margin-right: 50px;\n margin-bottom: 15px;\n }\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 체크리스트'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n ${keyed(\n new Date(),\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n .buildingComplex=${this.buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .projectType=${this.project.projectType}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button\n ?disabled=${this.buildingInspection.status == BuildingInspectionStatus.PASS}\n @click=${this._onClickModifyChecklist}\n >\n <md-icon slot=\"icon\">assignment</md-icon>등록\n </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n const buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n this.buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n projectType\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onClickModifyChecklist() {\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\n // 사용자 권한 체크\n const email = (store.getState() as any).auth?.user?.email\n const isOverallConstructor =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallConstructorEmails?.includes(email) || false\n const isOverallSupervisory =\n this.buildingInspection?.buildingLevel?.building?.buildingComplex?.overallSupervisoryEmails?.includes(email) || false\n\n // 권한에 따라 적절한 문서 표시\n if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_WAIT && isOverallConstructor) {\n await this._showInspectionRequestDocument(checklist)\n } else if (this.buildingInspection.status == BuildingInspectionStatus.OVERALL_REQUEST && isOverallSupervisory) {\n await this._showInspectionResultNotification(checklist)\n }\n\n try {\n const result = await verifyBiometric()\n if (result.verified) {\n console.log('Verification successful. Proceeding with sensitive action.')\n } else {\n notify({ message: 'Verification failed:' + result.message })\n return\n }\n } catch (error) {\n notify({ message: 'Error during biometric verification:' + error })\n return\n }\n\n // 실명부 파일 업로드 처리 (새로 업로드된 경우만)\n if (checklist.isNameListAttachmentUploaded) {\n await this._uploadNameListFile(checklist)\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBuildingInspectionChecklist($buildingInspection: UpdateBuildingInspectionSubmitType!) {\n updateBuildingInspectionChecklist(buildingInspection: $buildingInspection)\n }\n `,\n variables: {\n buildingInspection: {\n id: this.buildingInspection.id,\n checklist: {\n id: checklist.id,\n overallConstructorSignature: checklist.overallConstructorSignature,\n taskConstructorSignature: checklist.taskConstructorSignature,\n overallSupervisorySignature: checklist.overallSupervisorySignature,\n taskSupervisorySignature: checklist.taskSupervisorySignature,\n inspectionRequestMemo: checklist.inspectionRequestMemo,\n inspectionResultMemo: checklist.inspectionResultMemo,\n inspectionResultStatus: checklist.inspectionResultStatus,\n inspectionResultType: checklist.inspectionResultType\n },\n checklistItem: checklist.checklistItems.map(item => ({\n id: item.id,\n constructionConfirmStatus: item.constructionConfirmStatus,\n supervisoryConfirmStatus: item.supervisoryConfirmStatus\n }))\n }\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.initBuildingInspection(this.buildingInspection.id)\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // resolve 호출 전까지 싱크를 위해 Promise 사용\n private async _showInspectionRequestDocument(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-request-document\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}\n @inspection-memo-change=${this._onInspectionMemoChange.bind(this)}\n @name-list-file-selected=${(e: CustomEvent) => {\n // checklist에 선택된 파일 저장\n checklist.nameListAttachment = e.detail.file\n checklist.isNameListAttachmentUploaded = true\n }}\n @popup-close=${() => resolve()}\n ></inspection-request-document>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n })\n }\n\n private async _showInspectionResultNotification(checklist: any): Promise<void> {\n return new Promise(resolve => {\n openPopup(\n html`\n <inspection-result-notification\n .checklist=${checklist}\n .buildingInspection=${this.buildingInspection}\n .project=${this.project}\n .mode=${this.buildingInspection.status == BuildingInspectionStatus.PASS ? InspectionMode.VIEW : InspectionMode.EDIT}\n @inspection-result-change=${this._onInspectionResultChange.bind(this)}\n @inspection-type-change=${this._onInspectionTypeChange.bind(this)}\n @instructions-change=${this._onInstructionsChange.bind(this)}\n @popup-close=${() => resolve()}\n ></inspection-result-notification>\n `,\n { backdrop: true, size: 'large', title: '검측 결과 통보' }\n )\n })\n }\n\n private _onInspectionMemoChange(e: CustomEvent) {\n const { inspectionRequestMemo } = e.detail\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionRequestMemo = inspectionRequestMemo\n }\n this.requestUpdate()\n }\n\n private _onInspectionResultChange(e: CustomEvent) {\n const { inspectionResultStatus } = e.detail\n // checklist 업데이트 (레퍼런스 유지하여 호출부 인자에도 반영)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultStatus = inspectionResultStatus\n }\n this.requestUpdate()\n }\n\n private _onInspectionTypeChange(e: CustomEvent) {\n const { inspectionResultType } = e.detail\n // checklist 업데이트 (레퍼런스 유지)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultType = inspectionResultType\n }\n this.requestUpdate()\n }\n\n private _onInstructionsChange(e: CustomEvent) {\n const { inspectionResultMemo } = e.detail\n // checklist 업데이트 (레퍼런스 유지)\n if (this.buildingInspection?.checklist) {\n this.buildingInspection.checklist.inspectionResultMemo = inspectionResultMemo\n }\n this.requestUpdate()\n }\n\n // 실명부 파일 업로드\n private async _uploadNameListFile(checklist: any) {\n if (!checklist.isNameListAttachmentUploaded || !checklist.nameListAttachment) {\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateAttachments($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [\n {\n file: checklist.nameListAttachment,\n refBy: checklist.id,\n refType: 'Checklist_NameList'\n }\n ]\n },\n context: { hasUpload: true }\n })\n\n if (response.errors) {\n throw new Error(response.errors[0]?.message || '실명부 파일 업로드에 실패했습니다.')\n }\n }\n}\n"]}
|
|
@@ -25,7 +25,7 @@ export declare class BuildingInspectionDetailDrawing extends BuildingInspectionD
|
|
|
25
25
|
title: string;
|
|
26
26
|
};
|
|
27
27
|
connectedCallback(): void;
|
|
28
|
-
render(): import("lit
|
|
28
|
+
render(): import("lit").TemplateResult<1>;
|
|
29
29
|
protected updated(changes: PropertyValues): Promise<void>;
|
|
30
30
|
pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
|
|
31
31
|
initBuildingInspection(buildingInspectionId?: string): Promise<void>;
|
|
@@ -7,7 +7,9 @@ import { FetchOption } from '@operato/data-grist';
|
|
|
7
7
|
import './inspection-create-popup';
|
|
8
8
|
import './component/inspection-document/photo-album-popup';
|
|
9
9
|
import './component/inspection-document/inspection-request-document';
|
|
10
|
+
import './component/inspection-document/inspection-result-notification';
|
|
10
11
|
import './component/image-preview-popup';
|
|
12
|
+
import './component/daily-worklog-popup';
|
|
11
13
|
import '@operato/event-view/ox-event-view.js';
|
|
12
14
|
import { EventProvider } from '@operato/event-view';
|
|
13
15
|
export declare enum ChecklistTypeMainType {
|
|
@@ -46,6 +48,8 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
|
|
|
46
48
|
drawingImage: string;
|
|
47
49
|
buildingInspectionSummary: any;
|
|
48
50
|
calendarData?: EventProvider;
|
|
51
|
+
selectedYearMonth: string;
|
|
52
|
+
selectedDate?: string;
|
|
49
53
|
private grist;
|
|
50
54
|
private eventView;
|
|
51
55
|
get context(): {
|
|
@@ -77,5 +81,6 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
|
|
|
77
81
|
_openPhotoAlbumPopup(checklistId: string): Promise<void>;
|
|
78
82
|
_openInspectionRequestDocument(buildingInspectionId: string): Promise<void>;
|
|
79
83
|
private _showNameListPreview;
|
|
84
|
+
private _openDailyWorklogPopup;
|
|
80
85
|
}
|
|
81
86
|
export {};
|
|
@@ -14,11 +14,14 @@ import { openPopup } from '@operato/layout';
|
|
|
14
14
|
import './inspection-create-popup';
|
|
15
15
|
import './component/inspection-document/photo-album-popup';
|
|
16
16
|
import './component/inspection-document/inspection-request-document';
|
|
17
|
+
import './component/inspection-document/inspection-result-notification';
|
|
17
18
|
import './component/image-preview-popup';
|
|
19
|
+
import './component/daily-worklog-popup';
|
|
18
20
|
import '@operato/event-view/ox-event-view.js';
|
|
19
21
|
import { InspectionEventProvider } from './component/inspection-event-provider';
|
|
20
22
|
import { getBuildingInspectionForChecklist } from '../../graphql/building-inspection';
|
|
21
23
|
import { InspectionMode } from './component/inspection-document/inspection-request-document';
|
|
24
|
+
import moment from 'moment-timezone';
|
|
22
25
|
export var ChecklistTypeMainType;
|
|
23
26
|
(function (ChecklistTypeMainType) {
|
|
24
27
|
ChecklistTypeMainType["BASIC"] = "10";
|
|
@@ -60,6 +63,8 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
60
63
|
this.building = {};
|
|
61
64
|
this.drawingImage = '';
|
|
62
65
|
this.buildingInspectionSummary = {};
|
|
66
|
+
this.selectedYearMonth = moment().tz('Asia/Seoul').format('YYYY-MM');
|
|
67
|
+
this.selectedDate = moment().tz('Asia/Seoul').format('YYYY-MM-DD');
|
|
63
68
|
}
|
|
64
69
|
get context() {
|
|
65
70
|
return {
|
|
@@ -123,8 +128,12 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
123
128
|
.mode=${'monthly'}
|
|
124
129
|
.eventProvider=${this.calendarData}
|
|
125
130
|
@select-date=${(e) => {
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
this.selectedDate = moment(e.detail[0]).format('YYYY-MM-DD');
|
|
132
|
+
}}
|
|
133
|
+
@change-month=${(e) => {
|
|
134
|
+
const { year, month } = e.detail;
|
|
135
|
+
this.selectedYearMonth = moment({ year, month }).tz('Asia/Seoul').format('YYYY-MM');
|
|
136
|
+
this.grist.fetch();
|
|
128
137
|
}}
|
|
129
138
|
>
|
|
130
139
|
</ox-event-view>
|
|
@@ -132,6 +141,11 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
132
141
|
</div>
|
|
133
142
|
|
|
134
143
|
<div bottom>
|
|
144
|
+
<div daily-worklog-actions>
|
|
145
|
+
<md-filled-button @click=${this._openDailyWorklogPopup}>
|
|
146
|
+
<md-icon slot="icon">note_add</md-icon>일일 업무일지 작성
|
|
147
|
+
</md-filled-button>
|
|
148
|
+
</div>
|
|
135
149
|
<ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>
|
|
136
150
|
</div>
|
|
137
151
|
</div>
|
|
@@ -367,7 +381,9 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
367
381
|
variables: {
|
|
368
382
|
params: {
|
|
369
383
|
buildingLevelId: this.buildingLevelId,
|
|
370
|
-
limit: 0
|
|
384
|
+
limit: 0,
|
|
385
|
+
startDate: moment(this.selectedYearMonth).startOf('month').format('YYYY-MM-DD'),
|
|
386
|
+
endDate: moment(this.selectedYearMonth).endOf('month').format('YYYY-MM-DD')
|
|
371
387
|
},
|
|
372
388
|
buildingLevelId: this.buildingLevelId
|
|
373
389
|
}
|
|
@@ -448,12 +464,30 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
448
464
|
}
|
|
449
465
|
async _openInspectionRequestDocument(buildingInspectionId) {
|
|
450
466
|
const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId);
|
|
467
|
+
if (!buildingInspection.checklist.inspectionRequestUpdatedAt) {
|
|
468
|
+
notify({ message: '검측 요청서가 없습니다.', level: 'info' });
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
451
471
|
openPopup(html `
|
|
452
|
-
<
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
472
|
+
<div style="overflow-y: auto;">
|
|
473
|
+
<inspection-request-document
|
|
474
|
+
.checklist=${buildingInspection.checklist}
|
|
475
|
+
.buildingInspection=${buildingInspection}
|
|
476
|
+
.mode=${InspectionMode.VIEW}
|
|
477
|
+
></inspection-request-document>
|
|
478
|
+
|
|
479
|
+
${buildingInspection.checklist.inspectionResultUpdatedAt
|
|
480
|
+
? html `
|
|
481
|
+
<hr />
|
|
482
|
+
|
|
483
|
+
<inspection-result-notification
|
|
484
|
+
.checklist=${buildingInspection.checklist}
|
|
485
|
+
.buildingInspection=${buildingInspection}
|
|
486
|
+
.mode=${InspectionMode.VIEW}
|
|
487
|
+
></inspection-result-notification>
|
|
488
|
+
`
|
|
489
|
+
: ''}
|
|
490
|
+
</div>
|
|
457
491
|
`, { backdrop: true, size: 'large', title: '검측요청결과 통보내용' });
|
|
458
492
|
}
|
|
459
493
|
// 실명부 미리보기
|
|
@@ -471,6 +505,14 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
471
505
|
></image-preview-popup>
|
|
472
506
|
`, { backdrop: true, size: 'large', title: '실명부' });
|
|
473
507
|
}
|
|
508
|
+
_openDailyWorklogPopup() {
|
|
509
|
+
const date = this.selectedDate;
|
|
510
|
+
openPopup(html `<daily-worklog-popup .project=${this.project} .date=${date}></daily-worklog-popup>`, {
|
|
511
|
+
backdrop: true,
|
|
512
|
+
size: 'large',
|
|
513
|
+
title: '일일 업무일지 작성'
|
|
514
|
+
});
|
|
515
|
+
}
|
|
474
516
|
};
|
|
475
517
|
BuildingInspectionList.styles = [
|
|
476
518
|
ScrollbarStyles,
|
|
@@ -661,6 +703,12 @@ BuildingInspectionList.styles = [
|
|
|
661
703
|
flex-direction: column;
|
|
662
704
|
overflow: hidden;
|
|
663
705
|
min-height: 300px;
|
|
706
|
+
gap: 0px !important;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
div[daily-worklog-actions] {
|
|
710
|
+
display: flex;
|
|
711
|
+
justify-content: flex-end;
|
|
664
712
|
}
|
|
665
713
|
|
|
666
714
|
ox-grist {
|
|
@@ -701,6 +749,14 @@ __decorate([
|
|
|
701
749
|
state(),
|
|
702
750
|
__metadata("design:type", Object)
|
|
703
751
|
], BuildingInspectionList.prototype, "calendarData", void 0);
|
|
752
|
+
__decorate([
|
|
753
|
+
state(),
|
|
754
|
+
__metadata("design:type", String)
|
|
755
|
+
], BuildingInspectionList.prototype, "selectedYearMonth", void 0);
|
|
756
|
+
__decorate([
|
|
757
|
+
state(),
|
|
758
|
+
__metadata("design:type", String)
|
|
759
|
+
], BuildingInspectionList.prototype, "selectedDate", void 0);
|
|
704
760
|
__decorate([
|
|
705
761
|
query('ox-grist'),
|
|
706
762
|
__metadata("design:type", DataGrist)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-list.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AA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ourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, navigate } from '@operato/shell'\nimport { css, html, TemplateResult } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\nimport './inspection-create-popup'\nimport './component/inspection-document/photo-album-popup'\nimport './component/inspection-document/inspection-request-document'\nimport './component/image-preview-popup'\nimport '@operato/event-view/ox-event-view.js'\nimport { InspectionEventProvider } from './component/inspection-event-provider'\nimport { EventProvider } from '@operato/event-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\nexport const CHECKLIST_MAIN_TYPE_LIST = {\n [ChecklistTypeMainType.BASIC]: '기본 업무',\n [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'\n}\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport const BUILDING_INSPECTION_STATUS_DISPLAY = {\n [BuildingInspectionStatus.WAIT]: '검측 대기',\n [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',\n [BuildingInspectionStatus.REQUEST]: '검측 요청',\n [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',\n [BuildingInspectionStatus.PASS]: '합격',\n [BuildingInspectionStatus.FAIL]: '불합격'\n}\n\n@customElement('building-inspection-list')\nexport class BuildingInspectionList extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n md-filled-button {\n --md-filled-button-container-color: #0595e5;\n --md-filled-button-container-height: 30px;\n --md-filled-button-trailing-space: 15px;\n --md-filled-button-leading-space: 15px;\n }\n\n md-outlined-button {\n --md-outlined-button-container-height: 30px;\n --md-outlined-button-trailing-space: var(--spacing-medium, 8px);\n --md-outlined-button-leading-space: var(--spacing-medium, 8px);\n --md-sys-color-outline: rgba(51, 51, 51, 0.2);\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[header] {\n display: flex;\n margin: 0px var(--spacing-large, 12px);\n margin-bottom: var(--spacing-small, 5px);\n\n h2 {\n display: flex;\n gap: 7px;\n flex: 0.5;\n color: #3f71a0;\n font-size: 18px;\n\n md-icon[back] {\n background: linear-gradient(135deg, #3f71a0 0%, #5a8cc7 100%);\n color: white;\n padding: 8px;\n border-radius: 50%;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(63, 113, 160, 0.3);\n width: 14px;\n height: 14px;\n --md-icon-size: 20px;\n }\n\n md-icon[back]:hover {\n background: linear-gradient(135deg, #2e5c89 0%, #4a7bb0 100%);\n box-shadow: 0 4px 12px rgba(63, 113, 160, 0.4);\n }\n }\n }\n\n div[body] {\n display: flex;\n flex-direction: column;\n margin: var(--spacing-large, 12px);\n margin-top: 0;\n gap: var(--spacing-medium, 8px);\n min-height: fit-content;\n overflow-x: hidden;\n }\n\n div[body] h3 {\n color: #2e79be;\n font-size: 16px;\n margin: 0px;\n }\n\n div[body] > div {\n display: flex;\n gap: var(--spacing-medium, 8px);\n border-radius: 5px;\n }\n\n div[top] {\n flex: 1;\n\n display: flex;\n background-color: #f7f7f7;\n }\n\n div[drawing] {\n flex: 1;\n border: 1px solid #cccccc80;\n background-color: var(--md-sys-color-on-primary);\n padding: var(--spacing-large, 12px);\n border-radius: 5px;\n\n img {\n width: 100%;\n\n display: block;\n object-fit: contain;\n object-position: center;\n }\n }\n\n div[inspection-container] {\n flex: 1;\n gap: var(--spacing-medium, 8px);\n\n display: flex;\n flex-direction: column;\n\n div[inspection] {\n display: grid;\n grid-template-columns: 90px 1fr 1fr 1fr 1fr;\n background: #ebc8321a;\n border-radius: 5px;\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n\n & > div {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n span::before {\n display: inline-block;\n position: relative;\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 6px;\n top: -1px;\n margin-right: 2px;\n }\n\n span[status='wait']::before {\n background-color: #4e5055;\n }\n span[status='request']::before {\n background-color: #3395f1;\n }\n span[status='pass']::before {\n background-color: #1bb401;\n }\n span[status='fail']::before {\n background-color: #ff4444;\n }\n span[dot] {\n font-size: 1.3em;\n }\n }\n & > div[name] {\n flex-direction: row;\n text-align: right;\n gap: var(--spacing-small, 4px);\n padding-right: var(--spacing-large, 12px);\n border-right: 2px dotted #ccc;\n max-width: 100%;\n line-height: 1.3;\n\n md-icon {\n width: 40px;\n height: 40px;\n border-radius: 5px;\n color: #fff;\n background: #f16154;\n }\n }\n }\n }\n\n ox-event-view {\n flex: 1;\n }\n\n div[bottom] {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 300px;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n private defaultProject = {\n name: '',\n buildingComplex: {\n buildings: []\n }\n }\n\n @state() private gristConfig: any\n @state() buildingLevelId: string = ''\n @state() project: any = { ...this.defaultProject }\n @state() location: string = ''\n @state() building: any = {}\n @state() drawingImage: string = ''\n @state() buildingInspectionSummary: any = {}\n @state() calendarData?: EventProvider\n\n @query('ox-grist') private grist!: DataGrist\n @query('ox-event-view') private eventView!: HTMLElement\n\n get context() {\n return {\n title: '검측 관리',\n actions: [\n {\n title: '검측 등록',\n action: this._openCreateInspection.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._deleteChecklistType.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n return html`\n <div header>\n <h2>\n <md-icon slot=\"icon\" back @click=${() => history.back()}>arrow_back</md-icon>\n ${this.project.name}\n </h2>\n </div>\n\n <div body>\n <div top>\n <div drawing>\n <h3>도면: ${this.location}</h3>\n <img src=${this.drawingImage || '/assets/images/img-drawing-default.png'} />\n </div>\n\n <div inspection-container>\n <div inspection>\n <div name bold>\n <md-icon slot=\"icon\">fact_check</md-icon>\n 검측 현황\n </div>\n\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</label>\n <span bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</label>\n <span bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</label>\n <span bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</label>\n <span bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}\n </span>\n </div>\n </div>\n\n <ox-event-view\n .mode=${'monthly'}\n .eventProvider=${this.calendarData}\n @select-date=${(e: CustomEvent) => {\n // TODO 선택된 날짜의 검측데이터만 그리드에 보여야함\n console.log('select-date', e.detail)\n }}\n >\n </ox-event-view>\n </div>\n </div>\n\n <div bottom>\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingLevelId = lifecycle.resourceId || ''\n\n await this.initProject(this.buildingLevelId)\n this.grist.fetch()\n }\n }\n\n async initProject(buildingLevelId: string = '') {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingLevelId($buildingLevelId: String!) {\n projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {\n id\n name\n projectType\n mainPhoto {\n fullpath\n }\n buildingComplex {\n id\n drawing {\n id\n name\n fullpath\n }\n buildings {\n id\n name\n }\n }\n }\n\n buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data?.projectByBuildingLevelId\n this.buildingInspectionSummary = response.data?.buildingInspectionSummaryOfBuildingLevel\n\n this.calendarData = new InspectionEventProvider(buildingLevelId)\n\n // 캘린더 최소 높이 속성 수정\n this.eventView.style.setProperty('--calendar-monthly-date-min-height', '50px')\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'open_in_new',\n header: '상세보기',\n width: 60,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n navigate(`building-inspection-detail-drawing/${record.id}`)\n }\n }\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'location',\n header: '위치',\n width: 150\n },\n {\n type: 'string',\n name: 'constructionType',\n header: '공종',\n width: 120\n },\n {\n type: 'string',\n name: 'inspectionParts',\n header: '검측 부위',\n record: {\n renderer: value => value?.join(', ') || ''\n },\n width: 200\n },\n {\n type: 'string',\n name: 'requestDate',\n header: '검측 요청일',\n width: 120\n },\n {\n type: 'string',\n name: 'status',\n header: '검측 결과',\n record: {\n renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]\n },\n width: 120\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'fact_check',\n header: '도면',\n width: 50,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n console.log('record : ', record)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'edit_square',\n header: '요청서/결과통보',\n width: 100,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openInspectionRequestDocument(record.id)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'task',\n header: '체크리스트',\n width: 70,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openChecklistPopup(record.id)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'photo_camera',\n header: '사진대지',\n width: 60,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openPhotoAlbumPopup(record.checklistId)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'engineering',\n header: '실명부',\n width: 50,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._showNameListPreview(record)\n }\n }\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n appendable: false\n },\n sorters: [{ name: 'requestDate' }]\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n if (!this.buildingLevelId) return\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionsOfBuildingLevel($params: BuildingInspectionsOfBuildingLevel!, $buildingLevelId: String!) {\n buildingInspectionsOfBuildingLevel(params: $params) {\n items {\n id\n status\n requestDate\n checklist {\n checklistId: id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n nameListAttachment {\n id\n name\n fullpath\n }\n }\n }\n total\n }\n\n buildingLevel(id: $buildingLevelId) {\n id\n floor\n floorDisplayName\n building {\n id\n name\n }\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n `,\n variables: {\n params: {\n buildingLevelId: this.buildingLevelId,\n limit: 0\n },\n buildingLevelId: this.buildingLevelId\n }\n })\n\n let items = response.data?.buildingInspectionsOfBuildingLevel?.items || []\n items = items.map(item => ({\n ...item,\n ...item.checklist,\n requestDate: this._formatDate(item.requestDate)\n }))\n const buildingLevel = response.data?.buildingLevel\n\n this.location = `${buildingLevel.building.name} ${buildingLevel.floorDisplayName}층` || ''\n this.drawingImage = buildingLevel?.mainDrawingImage || ''\n this.building = buildingLevel?.building || {}\n\n return {\n total: response.data?.buildingInspectionsOfBuildingLevel?.total || 0,\n records: items\n }\n }\n\n private async _deleteChecklistType() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteBuildingInspections(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private _openCreateInspection() {\n openPopup(\n html`\n <inspection-create-popup\n .projectId=${this.project.id}\n .selectedBuildingId=${this.building.id}\n .selectedBuildingLevelId=${this.buildingLevelId}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></inspection-create-popup>\n `,\n { backdrop: true, size: 'large', title: '검측 등록' }\n )\n }\n\n private _formatDate(date: Date | undefined) {\n return date\n ? new Intl.DateTimeFormat('en-CA', {\n timeZone: 'Asia/Seoul',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit'\n }).format(new Date(date))\n : ''\n }\n\n private async _openChecklistPopup(buildingInspectionId: string) {\n const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n openPopup(\n html`\n <div style=\"overflow-y: auto;\">\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .checklist=${buildingInspection?.checklist}\n .buildingComplex=${buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .status=${buildingInspection?.status}\n .projectType=${this.project.projectType}\n ></checklist-view>\n </div>\n `,\n { backdrop: true, size: 'large', title: '체크 리스트 미리보기' }\n )\n }\n\n async _openPhotoAlbumPopup(checklistId: string) {\n openPopup(html` <photo-album-popup .checklistId=${checklistId}></photo-album-popup> `, {\n backdrop: true,\n size: 'large',\n title: '사진대지'\n })\n }\n\n async _openInspectionRequestDocument(buildingInspectionId: string) {\n const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n openPopup(\n html`\n <inspection-request-document\n .checklist=${buildingInspection.checklist}\n .buildingInspection=${buildingInspection}\n .mode=${InspectionMode.VIEW}\n ></inspection-request-document>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n }\n\n // 실명부 미리보기\n private _showNameListPreview(record: any) {\n const nameListAttachment = record.nameListAttachment\n\n if (!nameListAttachment) {\n notify({ message: '실명부 파일이 없습니다.', level: 'info' })\n return\n }\n\n // 이미지 미리보기 팝업\n openPopup(\n html`\n <image-preview-popup\n .images=${[{ fullpath: nameListAttachment.fullpath, name: nameListAttachment.name }]}\n .currentIndex=${0}\n ></image-preview-popup>\n `,\n { backdrop: true, size: 'large', title: '실명부' }\n )\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection-list.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsMF;CACF,AA1MY,CA0MZ;AASgB;IAAhB,KAAK,EAAE;;2DAAyB;AACxB;IAAR,KAAK,EAAE;;+DAA6B;AAC5B;IAAR,KAAK,EAAE;;uDAA0C;AACzC;IAAR,KAAK,EAAE;;wDAAsB;AACrB;IAAR,KAAK,EAAE;;wDAAmB;AAClB;IAAR,KAAK,EAAE;;4DAA0B;AACzB;IAAR,KAAK,EAAE;;yEAAoC;AACnC;IAAR,KAAK,EAAE;;4DAA6B;AAC5B;IAAR,KAAK,EAAE;;iEAAwE;AACvE;IAAR,KAAK,EAAE;;4DAAuE;AAEpD;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;qDAAA;AACZ;IAA/B,KAAK,CAAC,eAAe,CAAC;8BAAqB,WAAW;yDAAA;AAhO5C,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAitBlC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, navigate } from '@operato/shell'\nimport { css, html, TemplateResult } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\nimport './inspection-create-popup'\nimport './component/inspection-document/photo-album-popup'\nimport './component/inspection-document/inspection-request-document'\nimport './component/inspection-document/inspection-result-notification'\nimport './component/image-preview-popup'\nimport './component/daily-worklog-popup'\nimport '@operato/event-view/ox-event-view.js'\nimport { InspectionEventProvider } from './component/inspection-event-provider'\nimport { EventProvider } from '@operato/event-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\nimport { getBuildingInspectionForChecklist } from '../../graphql/building-inspection'\nimport { InspectionMode } from './component/inspection-document/inspection-request-document'\nimport moment from 'moment-timezone'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\nexport const CHECKLIST_MAIN_TYPE_LIST = {\n [ChecklistTypeMainType.BASIC]: '기본 업무',\n [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'\n}\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport const BUILDING_INSPECTION_STATUS_DISPLAY = {\n [BuildingInspectionStatus.WAIT]: '검측 대기',\n [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',\n [BuildingInspectionStatus.REQUEST]: '검측 요청',\n [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',\n [BuildingInspectionStatus.PASS]: '합격',\n [BuildingInspectionStatus.FAIL]: '불합격'\n}\n\n@customElement('building-inspection-list')\nexport class BuildingInspectionList extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n md-filled-button {\n --md-filled-button-container-color: #0595e5;\n --md-filled-button-container-height: 30px;\n --md-filled-button-trailing-space: 15px;\n --md-filled-button-leading-space: 15px;\n }\n\n md-outlined-button {\n --md-outlined-button-container-height: 30px;\n --md-outlined-button-trailing-space: var(--spacing-medium, 8px);\n --md-outlined-button-leading-space: var(--spacing-medium, 8px);\n --md-sys-color-outline: rgba(51, 51, 51, 0.2);\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[header] {\n display: flex;\n margin: 0px var(--spacing-large, 12px);\n margin-bottom: var(--spacing-small, 5px);\n\n h2 {\n display: flex;\n gap: 7px;\n flex: 0.5;\n color: #3f71a0;\n font-size: 18px;\n\n md-icon[back] {\n background: linear-gradient(135deg, #3f71a0 0%, #5a8cc7 100%);\n color: white;\n padding: 8px;\n border-radius: 50%;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(63, 113, 160, 0.3);\n width: 14px;\n height: 14px;\n --md-icon-size: 20px;\n }\n\n md-icon[back]:hover {\n background: linear-gradient(135deg, #2e5c89 0%, #4a7bb0 100%);\n box-shadow: 0 4px 12px rgba(63, 113, 160, 0.4);\n }\n }\n }\n\n div[body] {\n display: flex;\n flex-direction: column;\n margin: var(--spacing-large, 12px);\n margin-top: 0;\n gap: var(--spacing-medium, 8px);\n min-height: fit-content;\n overflow-x: hidden;\n }\n\n div[body] h3 {\n color: #2e79be;\n font-size: 16px;\n margin: 0px;\n }\n\n div[body] > div {\n display: flex;\n gap: var(--spacing-medium, 8px);\n border-radius: 5px;\n }\n\n div[top] {\n flex: 1;\n\n display: flex;\n background-color: #f7f7f7;\n }\n\n div[drawing] {\n flex: 1;\n border: 1px solid #cccccc80;\n background-color: var(--md-sys-color-on-primary);\n padding: var(--spacing-large, 12px);\n border-radius: 5px;\n\n img {\n width: 100%;\n\n display: block;\n object-fit: contain;\n object-position: center;\n }\n }\n\n div[inspection-container] {\n flex: 1;\n gap: var(--spacing-medium, 8px);\n\n display: flex;\n flex-direction: column;\n\n div[inspection] {\n display: grid;\n grid-template-columns: 90px 1fr 1fr 1fr 1fr;\n background: #ebc8321a;\n border-radius: 5px;\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n\n & > div {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n span::before {\n display: inline-block;\n position: relative;\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 6px;\n top: -1px;\n margin-right: 2px;\n }\n\n span[status='wait']::before {\n background-color: #4e5055;\n }\n span[status='request']::before {\n background-color: #3395f1;\n }\n span[status='pass']::before {\n background-color: #1bb401;\n }\n span[status='fail']::before {\n background-color: #ff4444;\n }\n span[dot] {\n font-size: 1.3em;\n }\n }\n & > div[name] {\n flex-direction: row;\n text-align: right;\n gap: var(--spacing-small, 4px);\n padding-right: var(--spacing-large, 12px);\n border-right: 2px dotted #ccc;\n max-width: 100%;\n line-height: 1.3;\n\n md-icon {\n width: 40px;\n height: 40px;\n border-radius: 5px;\n color: #fff;\n background: #f16154;\n }\n }\n }\n }\n\n ox-event-view {\n flex: 1;\n }\n\n div[bottom] {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 300px;\n gap: 0px !important;\n }\n\n div[daily-worklog-actions] {\n display: flex;\n justify-content: flex-end;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n private defaultProject = {\n name: '',\n buildingComplex: {\n buildings: []\n }\n }\n\n @state() private gristConfig: any\n @state() buildingLevelId: string = ''\n @state() project: any = { ...this.defaultProject }\n @state() location: string = ''\n @state() building: any = {}\n @state() drawingImage: string = ''\n @state() buildingInspectionSummary: any = {}\n @state() calendarData?: EventProvider\n @state() selectedYearMonth: string = moment().tz('Asia/Seoul').format('YYYY-MM')\n @state() selectedDate?: string = moment().tz('Asia/Seoul').format('YYYY-MM-DD')\n\n @query('ox-grist') private grist!: DataGrist\n @query('ox-event-view') private eventView!: HTMLElement\n\n get context() {\n return {\n title: '검측 관리',\n actions: [\n {\n title: '검측 등록',\n action: this._openCreateInspection.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._deleteChecklistType.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n return html`\n <div header>\n <h2>\n <md-icon slot=\"icon\" back @click=${() => history.back()}>arrow_back</md-icon>\n ${this.project.name}\n </h2>\n </div>\n\n <div body>\n <div top>\n <div drawing>\n <h3>도면: ${this.location}</h3>\n <img src=${this.drawingImage || '/assets/images/img-drawing-default.png'} />\n </div>\n\n <div inspection-container>\n <div inspection>\n <div name bold>\n <md-icon slot=\"icon\">fact_check</md-icon>\n 검측 현황\n </div>\n\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</label>\n <span bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</label>\n <span bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</label>\n <span bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</label>\n <span bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}\n </span>\n </div>\n </div>\n\n <ox-event-view\n .mode=${'monthly'}\n .eventProvider=${this.calendarData}\n @select-date=${(e: CustomEvent) => {\n this.selectedDate = moment(e.detail[0]).format('YYYY-MM-DD')\n }}\n @change-month=${(e: CustomEvent) => {\n const { year, month } = e.detail\n this.selectedYearMonth = moment({ year, month }).tz('Asia/Seoul').format('YYYY-MM')\n this.grist.fetch()\n }}\n >\n </ox-event-view>\n </div>\n </div>\n\n <div bottom>\n <div daily-worklog-actions>\n <md-filled-button @click=${this._openDailyWorklogPopup}>\n <md-icon slot=\"icon\">note_add</md-icon>일일 업무일지 작성\n </md-filled-button>\n </div>\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingLevelId = lifecycle.resourceId || ''\n\n await this.initProject(this.buildingLevelId)\n this.grist.fetch()\n }\n }\n\n async initProject(buildingLevelId: string = '') {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingLevelId($buildingLevelId: String!) {\n projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {\n id\n name\n projectType\n mainPhoto {\n fullpath\n }\n buildingComplex {\n id\n drawing {\n id\n name\n fullpath\n }\n buildings {\n id\n name\n }\n }\n }\n\n buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data?.projectByBuildingLevelId\n this.buildingInspectionSummary = response.data?.buildingInspectionSummaryOfBuildingLevel\n\n this.calendarData = new InspectionEventProvider(buildingLevelId)\n\n // 캘린더 최소 높이 속성 수정\n this.eventView.style.setProperty('--calendar-monthly-date-min-height', '50px')\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'open_in_new',\n header: '상세보기',\n width: 60,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n navigate(`building-inspection-detail-drawing/${record.id}`)\n }\n }\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'location',\n header: '위치',\n width: 150\n },\n {\n type: 'string',\n name: 'constructionType',\n header: '공종',\n width: 120\n },\n {\n type: 'string',\n name: 'inspectionParts',\n header: '검측 부위',\n record: {\n renderer: value => value?.join(', ') || ''\n },\n width: 200\n },\n {\n type: 'string',\n name: 'requestDate',\n header: '검측 요청일',\n width: 120\n },\n {\n type: 'string',\n name: 'status',\n header: '검측 결과',\n record: {\n renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]\n },\n width: 120\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'fact_check',\n header: '도면',\n width: 50,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n console.log('record : ', record)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'edit_square',\n header: '요청서/결과통보',\n width: 100,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openInspectionRequestDocument(record.id)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'task',\n header: '체크리스트',\n width: 70,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openChecklistPopup(record.id)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'photo_camera',\n header: '사진대지',\n width: 60,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._openPhotoAlbumPopup(record.checklistId)\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'engineering',\n header: '실명부',\n width: 50,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._showNameListPreview(record)\n }\n }\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n appendable: false\n },\n sorters: [{ name: 'requestDate' }]\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n if (!this.buildingLevelId) return\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionsOfBuildingLevel($params: BuildingInspectionsOfBuildingLevel!, $buildingLevelId: String!) {\n buildingInspectionsOfBuildingLevel(params: $params) {\n items {\n id\n status\n requestDate\n checklist {\n checklistId: id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n nameListAttachment {\n id\n name\n fullpath\n }\n }\n }\n total\n }\n\n buildingLevel(id: $buildingLevelId) {\n id\n floor\n floorDisplayName\n building {\n id\n name\n }\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n `,\n variables: {\n params: {\n buildingLevelId: this.buildingLevelId,\n limit: 0,\n startDate: moment(this.selectedYearMonth).startOf('month').format('YYYY-MM-DD'),\n endDate: moment(this.selectedYearMonth).endOf('month').format('YYYY-MM-DD')\n },\n buildingLevelId: this.buildingLevelId\n }\n })\n\n let items = response.data?.buildingInspectionsOfBuildingLevel?.items || []\n items = items.map(item => ({\n ...item,\n ...item.checklist,\n requestDate: this._formatDate(item.requestDate)\n }))\n const buildingLevel = response.data?.buildingLevel\n\n this.location = `${buildingLevel.building.name} ${buildingLevel.floorDisplayName}층` || ''\n this.drawingImage = buildingLevel?.mainDrawingImage || ''\n this.building = buildingLevel?.building || {}\n\n return {\n total: response.data?.buildingInspectionsOfBuildingLevel?.total || 0,\n records: items\n }\n }\n\n private async _deleteChecklistType() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteBuildingInspections(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private _openCreateInspection() {\n openPopup(\n html`\n <inspection-create-popup\n .projectId=${this.project.id}\n .selectedBuildingId=${this.building.id}\n .selectedBuildingLevelId=${this.buildingLevelId}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></inspection-create-popup>\n `,\n { backdrop: true, size: 'large', title: '검측 등록' }\n )\n }\n\n private _formatDate(date: Date | undefined) {\n return date\n ? new Intl.DateTimeFormat('en-CA', {\n timeZone: 'Asia/Seoul',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit'\n }).format(new Date(date))\n : ''\n }\n\n private async _openChecklistPopup(buildingInspectionId: string) {\n const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n openPopup(\n html`\n <div style=\"overflow-y: auto;\">\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .checklist=${buildingInspection?.checklist}\n .buildingComplex=${buildingInspection?.buildingLevel?.building?.buildingComplex || {}}\n .status=${buildingInspection?.status}\n .projectType=${this.project.projectType}\n ></checklist-view>\n </div>\n `,\n { backdrop: true, size: 'large', title: '체크 리스트 미리보기' }\n )\n }\n\n async _openPhotoAlbumPopup(checklistId: string) {\n openPopup(html` <photo-album-popup .checklistId=${checklistId}></photo-album-popup> `, {\n backdrop: true,\n size: 'large',\n title: '사진대지'\n })\n }\n\n async _openInspectionRequestDocument(buildingInspectionId: string) {\n const buildingInspection = await getBuildingInspectionForChecklist(buildingInspectionId)\n\n if (!buildingInspection.checklist.inspectionRequestUpdatedAt) {\n notify({ message: '검측 요청서가 없습니다.', level: 'info' })\n return\n }\n\n openPopup(\n html`\n <div style=\"overflow-y: auto;\">\n <inspection-request-document\n .checklist=${buildingInspection.checklist}\n .buildingInspection=${buildingInspection}\n .mode=${InspectionMode.VIEW}\n ></inspection-request-document>\n\n ${buildingInspection.checklist.inspectionResultUpdatedAt\n ? html`\n <hr />\n\n <inspection-result-notification\n .checklist=${buildingInspection.checklist}\n .buildingInspection=${buildingInspection}\n .mode=${InspectionMode.VIEW}\n ></inspection-result-notification>\n `\n : ''}\n </div>\n `,\n { backdrop: true, size: 'large', title: '검측요청결과 통보내용' }\n )\n }\n\n // 실명부 미리보기\n private _showNameListPreview(record: any) {\n const nameListAttachment = record.nameListAttachment\n\n if (!nameListAttachment) {\n notify({ message: '실명부 파일이 없습니다.', level: 'info' })\n return\n }\n\n // 이미지 미리보기 팝업\n openPopup(\n html`\n <image-preview-popup\n .images=${[{ fullpath: nameListAttachment.fullpath, name: nameListAttachment.name }]}\n .currentIndex=${0}\n ></image-preview-popup>\n `,\n { backdrop: true, size: 'large', title: '실명부' }\n )\n }\n\n private _openDailyWorklogPopup() {\n const date = this.selectedDate\n\n openPopup(html`<daily-worklog-popup .project=${this.project} .date=${date}></daily-worklog-popup>`, {\n backdrop: true,\n size: 'large',\n title: '일일 업무일지 작성'\n })\n }\n}\n"]}
|