@dssp/supervision 1.0.0-alpha.26 → 1.0.0-alpha.28

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.
Files changed (83) hide show
  1. package/dist-client/graphql/building-inspection.js +6 -0
  2. package/dist-client/graphql/building-inspection.js.map +1 -1
  3. package/dist-client/pages/action-plan/action-plan-importer.d.ts +1 -1
  4. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -1
  5. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +25 -11
  8. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  9. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -1
  10. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +1 -1
  11. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  12. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +11 -2
  13. package/dist-client/pages/building-inspection/building-inspection-list.js +141 -10
  14. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  15. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +22 -0
  16. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +431 -0
  17. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  18. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +1 -1
  19. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +1 -1
  20. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +17 -21
  21. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
  22. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +4 -1
  23. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +45 -19
  24. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
  25. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +1 -1
  26. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
  27. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +39 -17
  28. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  29. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +2 -2
  30. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +1 -1
  31. package/dist-client/pages/checklist/checklist-view.js +28 -3
  32. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  33. package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -1
  34. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +1 -1
  35. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +1 -1
  36. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +1 -1
  37. package/dist-client/pages/issue/issue-importer.d.ts +1 -1
  38. package/dist-client/pages/issue/issue-list-page.d.ts +1 -1
  39. package/dist-client/pages/project-report/project-report-importer.d.ts +1 -1
  40. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -1
  41. package/dist-client/pages/supervisor/supervisor-importer.d.ts +1 -1
  42. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -1
  43. package/dist-client/tsconfig.tsbuildinfo +1 -1
  44. package/dist-server/service/building-inspection/building-inspection-mutation.js +7 -2
  45. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  46. package/dist-server/service/building-inspection/building-inspection-query.js +7 -1
  47. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  48. package/dist-server/service/building-inspection/building-inspection-type.d.ts +2 -0
  49. package/dist-server/service/building-inspection/building-inspection-type.js +8 -0
  50. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  51. package/dist-server/service/building-inspection/building-inspection.d.ts +3 -0
  52. package/dist-server/service/building-inspection/building-inspection.js +10 -0
  53. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  54. package/dist-server/service/building-inspection/index.d.ts +1 -1
  55. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  56. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
  57. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  58. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +14 -0
  59. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +135 -0
  60. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  61. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +19 -0
  62. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +74 -0
  63. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  64. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +27 -0
  65. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +104 -0
  66. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  67. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  68. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  69. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  70. package/dist-server/service/checklist/checklist.d.ts +4 -1
  71. package/dist-server/service/checklist/checklist.js +15 -4
  72. package/dist-server/service/checklist/checklist.js.map +1 -1
  73. package/dist-server/service/index.d.ts +2 -1
  74. package/dist-server/service/index.js +6 -2
  75. package/dist-server/service/index.js.map +1 -1
  76. package/dist-server/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +5 -4
  78. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.d.ts +0 -21
  79. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js +0 -327
  80. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js.map +0 -1
  81. package/dist-client/pages/building-inspection/component/photo-album-popup.d.ts +0 -41
  82. package/dist-client/pages/building-inspection/component/photo-album-popup.js +0 -406
  83. 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8ET;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 inspectionResultDocumentNo\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"]}
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"]}
@@ -5,6 +5,6 @@ export declare class ActionPlanImporter extends LitElement {
5
5
  static styles: import("lit").CSSResult[];
6
6
  private actionPlans;
7
7
  private columns;
8
- render(): import("lit-html").TemplateResult<1>;
8
+ render(): import("lit").TemplateResult<1>;
9
9
  private save;
10
10
  }
@@ -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-html").TemplateResult<1>;
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-html").TemplateResult<1>;
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-html").TemplateResult<1>;
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
- const { memo } = e.detail;
201
- this.buildingInspection = Object.assign(Object.assign({}, this.buildingInspection), { memo });
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
- this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultStatus });
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
- this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultType });
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
- this.buildingInspection.checklist = Object.assign(Object.assign({}, this.buildingInspection.checklist), { inspectionResultMemo });
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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cesContent":["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,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM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AAE,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-html").TemplateResult<1>;
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>;
@@ -56,7 +56,7 @@ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing exte
56
56
  body
57
57
  @link-clicked=${async (e) => {
58
58
  const { link } = e.detail;
59
- const { id, type, symbol, box, dwgId } = JSON.parse(link);
59
+ const { id, type, symbol, box, dwgId } = JSON.parse(link) || {};
60
60
  const [x, y, width, height] = (box === null || box === void 0 ? void 0 : box.split(',').map(Number)) || [];
61
61
  this.linkUrl = `DWGID:${dwgId}`;
62
62
  this.linkShapes = [
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-drawing.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-drawing.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0CAA0C,CAAA;AACjD,OAAO,+CAA+C,CAAA;AAEtD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,eAAe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AC,cAAc,CAAC;;mEAAiB;AACtB;IAAhB,KAAK,CAAC,QAAQ,CAAC;8BAAU,iBAAiB;+DAAA;AA/ChC,+BAA+B;IAD3C,aAAa,CAAC,oCAAoC,CAAC;GACvC,+BAA+B,CAyQ3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/image-marker/ox-image-marker.js'\nimport '@operato/image-marker/ox-image-marker-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport { Shape } from '@operato/image-marker'\n\nimport { DrawingImageProvider } from '@dssp/drawing/dist-client/drawing-management/drawing-image-provider.js'\n\nimport './component/building-inspection-detail-header'\nimport { BuildingInspectionStatus } from './building-inspection-list'\n\n@customElement('building-inspection-detail-drawing')\nexport class BuildingInspectionDetailDrawing 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 div[body] {\n display: flex;\n justify-content: center;\n\n ox-image-marker-view {\n width: 100%;\n }\n }\n\n dialog ox-image-marker-view {\n width: 80vw;\n height: 80vh;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() imageUrl?: string\n @state() shapes: Shape[] = []\n @state() linkUrl?: string\n @state() linkShapes: Shape[] = []\n\n @state() drawingImageProvider: DrawingImageProvider = new DrawingImageProvider()\n // @consume({ context: OxUserPreferencesContext, subscribe: true })\n\n @query('#image-marker') imageMarker!: any\n @query('#link-viewer') linkViewer!: any\n @query('dialog') dialog!: HTMLDialogElement\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n requestAnimationFrame(() => {\n this.dialog.addEventListener('click', event => {\n const rect = this.dialog.getBoundingClientRect()\n const isInDialog =\n rect.top <= event.clientY && event.clientY <= rect.bottom && rect.left <= event.clientX && event.clientX <= rect.right\n\n // 다이아로그 내부를 클릭한 것이 아니면 다이아로그 닫기\n if (!isInDialog) {\n this.dialog.close()\n }\n })\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\n body\n @link-clicked=${async (e: CustomEvent) => {\n const { link } = e.detail\n const { id, type, symbol, box, dwgId } = JSON.parse(link)\n const [x, y, width, height] = box?.split(',').map(Number) || []\n\n this.linkUrl = `DWGID:${dwgId}`\n this.linkShapes = [\n {\n id: id!,\n type: 'link',\n x,\n y,\n width,\n height,\n link: '{}'\n }\n ]\n\n if (this.dialog) {\n this.dialog.showModal()\n\n requestAnimationFrame(() => {\n this.linkViewer.reset()\n })\n }\n }}\n >\n ${this.buildingInspection?.status == BuildingInspectionStatus.PASS\n ? html`<ox-image-marker-view\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>`\n : html` <ox-image-marker\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n @shapes-changed=${this.onClickMarkerSave}\n .currentMode=${'view'}\n ></ox-image-marker>`}\n </div>\n\n <dialog>\n <ox-image-marker-view\n id=\"link-viewer\"\n .imageUrl=${this.linkUrl}\n .shapes=${this.linkShapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>\n </dialog>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {\n if (changes.has('buildingInspection') && this.buildingInspection?.checklist) {\n // 1-1. 위치 정보 - 체크리스트에 들어가는 위치정보 텍스트\n const location_1 = this.buildingInspection.checklist?.location\n\n // 1-2. 위치 정보 - 실제 위치정보 텍스트 (동 + 층) - ID 필드를 사용하면 DB ID 필드입니다.\n const location_building = this.buildingInspection.buildingLevel.building.name\n const location_floor = this.buildingInspection.buildingLevel.floor\n\n // 2. 평면도 pdf 파일\n // mainDrawing {\n // id\n // name\n // fullpath\n // }\n const mainDrawing = this.buildingInspection.buildingLevel.mainDrawing\n\n // 3. 선택 도면\n const inspectionDrawingType = this.buildingInspection.checklist.inspectionDrawingType\n\n const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []\n const markers = await this.drawingImageProvider.getMarkers(inspectionDrawingType)\n\n this.imageUrl = String(inspectionDrawingType).normalize('NFC')\n this.shapes = [...shapes, ...markers]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n\n this.imageMarker?.reset()\n } else {\n this.dialog?.close()\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\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 drawingMarker\n checklist {\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\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 }\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 async onClickMarkerSave(e) {\n const response = await client.query({\n query: gql`\n mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {\n updateBuildingInspection(patch: $patch) {\n id\n drawingMarker\n }\n }\n `,\n variables: {\n patch: {\n id: this.buildingInspectionId,\n drawingMarker: JSON.stringify(e.detail)\n }\n }\n })\n\n if (response.errors) return\n\n notify({ message: '저장되었습니다.' })\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-drawing.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-drawing.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0CAA0C,CAAA;AACjD,OAAO,+CAA+C,CAAA;AAEtD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAGxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wEAAwE,CAAA;AAE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material/web/icon/icon.js'\nimport '@operato/image-marker/ox-image-marker.js'\nimport '@operato/image-marker/ox-image-marker-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport { Shape } from '@operato/image-marker'\n\nimport { DrawingImageProvider } from '@dssp/drawing/dist-client/drawing-management/drawing-image-provider.js'\n\nimport './component/building-inspection-detail-header'\nimport { BuildingInspectionStatus } from './building-inspection-list'\n\n@customElement('building-inspection-detail-drawing')\nexport class BuildingInspectionDetailDrawing 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 div[body] {\n display: flex;\n justify-content: center;\n\n ox-image-marker-view {\n width: 100%;\n }\n }\n\n dialog ox-image-marker-view {\n width: 80vw;\n height: 80vh;\n }\n `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() imageUrl?: string\n @state() shapes: Shape[] = []\n @state() linkUrl?: string\n @state() linkShapes: Shape[] = []\n\n @state() drawingImageProvider: DrawingImageProvider = new DrawingImageProvider()\n // @consume({ context: OxUserPreferencesContext, subscribe: true })\n\n @query('#image-marker') imageMarker!: any\n @query('#link-viewer') linkViewer!: any\n @query('dialog') dialog!: HTMLDialogElement\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n\n requestAnimationFrame(() => {\n this.dialog.addEventListener('click', event => {\n const rect = this.dialog.getBoundingClientRect()\n const isInDialog =\n rect.top <= event.clientY && event.clientY <= rect.bottom && rect.left <= event.clientX && event.clientX <= rect.right\n\n // 다이아로그 내부를 클릭한 것이 아니면 다이아로그 닫기\n if (!isInDialog) {\n this.dialog.close()\n }\n })\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\n body\n @link-clicked=${async (e: CustomEvent) => {\n const { link } = e.detail\n const { id, type, symbol, box, dwgId } = JSON.parse(link) || {}\n const [x, y, width, height] = box?.split(',').map(Number) || []\n\n this.linkUrl = `DWGID:${dwgId}`\n this.linkShapes = [\n {\n id: id!,\n type: 'link',\n x,\n y,\n width,\n height,\n link: '{}'\n }\n ]\n\n if (this.dialog) {\n this.dialog.showModal()\n\n requestAnimationFrame(() => {\n this.linkViewer.reset()\n })\n }\n }}\n >\n ${this.buildingInspection?.status == BuildingInspectionStatus.PASS\n ? html`<ox-image-marker-view\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>`\n : html` <ox-image-marker\n id=\"image-marker\"\n .imageUrl=${this.imageUrl}\n .shapes=${this.shapes}\n .imageProvider=${this.drawingImageProvider}\n @shapes-changed=${this.onClickMarkerSave}\n .currentMode=${'view'}\n ></ox-image-marker>`}\n </div>\n\n <dialog>\n <ox-image-marker-view\n id=\"link-viewer\"\n .imageUrl=${this.linkUrl}\n .shapes=${this.linkShapes}\n .imageProvider=${this.drawingImageProvider}\n ></ox-image-marker-view>\n </dialog>\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {\n if (changes.has('buildingInspection') && this.buildingInspection?.checklist) {\n // 1-1. 위치 정보 - 체크리스트에 들어가는 위치정보 텍스트\n const location_1 = this.buildingInspection.checklist?.location\n\n // 1-2. 위치 정보 - 실제 위치정보 텍스트 (동 + 층) - ID 필드를 사용하면 DB ID 필드입니다.\n const location_building = this.buildingInspection.buildingLevel.building.name\n const location_floor = this.buildingInspection.buildingLevel.floor\n\n // 2. 평면도 pdf 파일\n // mainDrawing {\n // id\n // name\n // fullpath\n // }\n const mainDrawing = this.buildingInspection.buildingLevel.mainDrawing\n\n // 3. 선택 도면\n const inspectionDrawingType = this.buildingInspection.checklist.inspectionDrawingType\n\n const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []\n const markers = await this.drawingImageProvider.getMarkers(inspectionDrawingType)\n\n this.imageUrl = String(inspectionDrawingType).normalize('NFC')\n this.shapes = [...shapes, ...markers]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n\n this.imageMarker?.reset()\n } else {\n this.dialog?.close()\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\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 drawingMarker\n checklist {\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\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 }\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 async onClickMarkerSave(e) {\n const response = await client.query({\n query: gql`\n mutation UpdateBuildingInspection($patch: UpdateBuildingInspection!) {\n updateBuildingInspection(patch: $patch) {\n id\n drawingMarker\n }\n }\n `,\n variables: {\n patch: {\n id: this.buildingInspectionId,\n drawingMarker: JSON.stringify(e.detail)\n }\n }\n })\n\n if (response.errors) return\n\n notify({ message: '저장되었습니다.' })\n }\n}\n"]}
@@ -1,13 +1,15 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import '@operato/data-grist';
3
+ import '@operato/image-marker/ox-image-marker-view.js';
3
4
  import { PageView } from '@operato/shell';
4
- import { TemplateResult } from 'lit';
5
5
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
6
6
  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,9 @@ 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;
53
+ dailyWorklog: any;
49
54
  private grist;
50
55
  private eventView;
51
56
  get context(): {
@@ -62,7 +67,7 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
62
67
  action: () => void;
63
68
  }[];
64
69
  };
65
- render(): TemplateResult<1>;
70
+ render(): import("lit").TemplateResult<1>;
66
71
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
67
72
  initProject(buildingLevelId?: string): Promise<void>;
68
73
  pageInitialized(lifecycle: any): Promise<void>;
@@ -77,5 +82,9 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
77
82
  _openPhotoAlbumPopup(checklistId: string): Promise<void>;
78
83
  _openInspectionRequestDocument(buildingInspectionId: string): Promise<void>;
79
84
  private _showNameListPreview;
85
+ private _openDailyWorklogPopup;
86
+ private _refreshCalendar;
87
+ private _fetchDailyWorklog;
88
+ private _openDrawingPopup;
80
89
  }
81
90
  export {};