@dssp/supervision 0.0.18 → 0.0.20

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 (70) hide show
  1. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +16 -10
  2. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +17 -5
  3. package/client/pages/building-inspection/building-inspection-list.ts +152 -48
  4. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +4 -1
  5. package/client/pages/building-inspection/component/inspection-event-provider.ts +32 -0
  6. package/client/pages/building-inspection/inspection-create-popup.ts +186 -124
  7. package/client/pages/checklist/checklist-view.ts +13 -29
  8. package/client/pages/checklist-template/checklist-template-list.ts +106 -9
  9. package/client/pages/checklist-template/checklist-type-management.ts +34 -14
  10. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -3
  11. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +12 -8
  12. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  13. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +21 -10
  15. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
  16. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +5 -1
  17. package/dist-client/pages/building-inspection/building-inspection-list.js +151 -47
  18. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  19. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +4 -1
  20. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
  21. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +6 -0
  22. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +26 -0
  23. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -0
  24. package/dist-client/pages/building-inspection/inspection-create-popup.js +162 -97
  25. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
  26. package/dist-client/pages/checklist/checklist-view.js +9 -38
  27. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  28. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +10 -1
  29. package/dist-client/pages/checklist-template/checklist-template-list.js +99 -9
  30. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
  31. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +8 -1
  32. package/dist-client/pages/checklist-template/checklist-type-management.js +35 -14
  33. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
  34. package/dist-client/route.d.ts +1 -1
  35. package/dist-client/tsconfig.tsbuildinfo +1 -1
  36. package/dist-server/service/building-inspection/building-inspection-history.d.ts +1 -1
  37. package/dist-server/service/building-inspection/building-inspection-history.js +3 -5
  38. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
  39. package/dist-server/service/building-inspection/building-inspection-mutation.js +0 -1
  40. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  41. package/dist-server/service/building-inspection/building-inspection-query.d.ts +1 -0
  42. package/dist-server/service/building-inspection/building-inspection-query.js +32 -4
  43. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  44. package/dist-server/service/building-inspection/building-inspection-type.d.ts +1 -0
  45. package/dist-server/service/building-inspection/building-inspection-type.js +4 -0
  46. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  47. package/dist-server/service/building-inspection/building-inspection.d.ts +1 -1
  48. package/dist-server/service/building-inspection/building-inspection.js +3 -3
  49. package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
  50. package/dist-server/service/checklist/checklist-query.d.ts +2 -0
  51. package/dist-server/service/checklist/checklist-query.js +11 -0
  52. package/dist-server/service/checklist/checklist-query.js.map +1 -1
  53. package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +1 -0
  54. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +12 -0
  55. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
  56. package/dist-server/service/checklist-template-item/checklist-template-item.js +2 -1
  57. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  58. package/dist-server/service/checklist-type/checklist-type-query.js +1 -1
  59. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
  60. package/dist-server/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +4 -4
  62. package/server/service/building-inspection/building-inspection-history.ts +3 -5
  63. package/server/service/building-inspection/building-inspection-mutation.ts +0 -1
  64. package/server/service/building-inspection/building-inspection-query.ts +31 -4
  65. package/server/service/building-inspection/building-inspection-type.ts +3 -0
  66. package/server/service/building-inspection/building-inspection.ts +3 -4
  67. package/server/service/checklist/checklist-query.ts +6 -0
  68. package/server/service/checklist-template-item/checklist-template-item-query.ts +8 -3
  69. package/server/service/checklist-template-item/checklist-template-item.ts +2 -1
  70. package/server/service/checklist-type/checklist-type-query.ts +1 -1
@@ -1,23 +1,29 @@
1
1
  import '@material/web/icon/icon.js'
2
+ import '@operato/context/ox-context-page-toolbar.js'
2
3
  import '@operato/data-grist'
3
4
  import './checklist-template-item'
5
+ import '../checklist/checklist-view'
4
6
 
5
- import { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
7
+ import { CommonGristStyles, CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
6
8
  import { PageView } from '@operato/shell'
7
9
  import { css, html } from 'lit'
8
10
  import { customElement, query, state } from 'lit/decorators.js'
9
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
10
11
  import { DataGrist, FetchOption } from '@operato/data-grist'
11
12
  import { client } from '@operato/graphql'
12
13
  import { notify, openPopup } from '@operato/layout'
14
+ import { i18next, localize } from '@operato/i18n'
15
+ import { p13n } from '@operato/p13n'
13
16
 
14
17
  import gql from 'graphql-tag'
18
+ import { ChecklistMode } from '../checklist/checklist-view'
19
+ import { BuildingInspectionStatus } from '../building-inspection/building-inspection-list'
15
20
 
16
21
  @customElement('checklist-template-list')
17
- export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
22
+ export class ChecklistTemplateListPage extends p13n(localize(i18next)(PageView)) {
18
23
  static styles = [
19
24
  ScrollbarStyles,
20
25
  CommonGristStyles,
26
+ CommonHeaderStyles,
21
27
  css`
22
28
  :host {
23
29
  display: flex;
@@ -28,6 +34,15 @@ export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
28
34
  --grid-record-emphasized-background-color: red;
29
35
  --grid-record-emphasized-color: yellow;
30
36
  }
37
+
38
+ ox-grist {
39
+ overflow-y: auto;
40
+ flex: 1;
41
+ }
42
+
43
+ .header {
44
+ grid-template-areas: 'filters actions';
45
+ }
31
46
  `
32
47
  ]
33
48
 
@@ -42,7 +57,7 @@ export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
42
57
  handler: (search: string) => {
43
58
  this.grist.searchText = search
44
59
  },
45
- value: this.grist.searchText
60
+ value: this.grist?.searchText
46
61
  },
47
62
  filter: {
48
63
  handler: () => {
@@ -60,18 +75,28 @@ export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
60
75
  action: this.deleteChecklistTemplate.bind(this),
61
76
  ...CommonButtonStyles.delete
62
77
  }
63
- ]
78
+ ],
79
+ toolbar: false
64
80
  }
65
81
  }
66
82
 
67
83
  render() {
68
84
  return html`
69
- <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
70
- <div slot="headroom">
71
- <div id="filters">
72
- <ox-filters-form autofocus></ox-filters-form>
85
+ <ox-grist
86
+ .mode=${'GRID'}
87
+ .config=${this.gristConfig}
88
+ .fetchHandler=${this.fetchHandler.bind(this)}
89
+ .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}
90
+ >
91
+ <div slot="headroom" class="header">
92
+ <div class="filters">
93
+ <ox-filters-form autofocus without-search></ox-filters-form>
73
94
  </div>
95
+
96
+ <ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
74
97
  </div>
98
+
99
+ <ox-grist-personalizer slot="setting"></ox-grist-personalizer>
75
100
  </ox-grist>
76
101
  `
77
102
  }
@@ -112,6 +137,49 @@ export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
112
137
  }
113
138
  }
114
139
  },
140
+ {
141
+ type: 'gutter',
142
+ gutterName: 'button',
143
+ fixed: true,
144
+ icon: 'preview',
145
+ handlers: {
146
+ click: async (columns, data, column, record, rowIndex) => {
147
+ if (!record.id) return
148
+
149
+ const checklistItems = await this._getChecklistTemplateItems(record.id)
150
+
151
+ const checklist = {
152
+ name: record.name,
153
+ constructionType: '공종',
154
+ constructionDetailType: '세부 공종',
155
+ location: `xxx동 xxx층`,
156
+ documentNo: '0000-000-000000',
157
+ inspectionParts: ['창, 바닥, 천장'],
158
+ buildingInspection: {
159
+ status: BuildingInspectionStatus.WAIT
160
+ },
161
+ checklistItems: checklistItems
162
+ }
163
+
164
+ openPopup(
165
+ html`
166
+ <div style="overflow-y: auto;">
167
+ <checklist-view
168
+ .mode=${ChecklistMode.VIEWER}
169
+ .checklist=${checklist}
170
+ style="pointer-events: none;"
171
+ ></checklist-view>
172
+ </div>
173
+ `,
174
+ {
175
+ backdrop: true,
176
+ size: 'large',
177
+ title: '체크 리스트 미리보기'
178
+ }
179
+ )
180
+ }
181
+ }
182
+ },
115
183
  {
116
184
  type: 'string',
117
185
  name: 'name',
@@ -268,4 +336,33 @@ export class ChecklistTemplateListPage extends ScopedElementsMixin(PageView) {
268
336
  }
269
337
  }
270
338
  }
339
+
340
+ private async _getChecklistTemplateItems(checklistTemplateId) {
341
+ const response = await client.query({
342
+ query: gql`
343
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
344
+ checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {
345
+ items {
346
+ id
347
+ sequence
348
+ name
349
+ inspctionCriteria
350
+ mainType
351
+ detailType: detailTypeName
352
+ }
353
+ }
354
+ }
355
+ `,
356
+ variables: {
357
+ filters: {
358
+ name: 'checklistTemplateId',
359
+ value: checklistTemplateId,
360
+ operator: 'eq'
361
+ },
362
+ sortings: [{ name: 'mainType' }, { name: 'sequence' }]
363
+ }
364
+ })
365
+
366
+ return response.data.checklistTemplateItems.items || []
367
+ }
271
368
  }
@@ -1,15 +1,17 @@
1
1
  import '@material/web/icon/icon.js'
2
+ import '@operato/context/ox-context-page-toolbar.js'
2
3
  import '@operato/data-grist'
3
4
 
4
- import { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
5
- import { PageView } from '@operato/shell'
5
+ import gql from 'graphql-tag'
6
6
  import { css, html } from 'lit'
7
+ import { CommonGristStyles, CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
8
+ import { PageView } from '@operato/shell'
7
9
  import { customElement, query, state } from 'lit/decorators.js'
8
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
9
10
  import { DataGrist, FetchOption } from '@operato/data-grist'
10
11
  import { client } from '@operato/graphql'
11
12
  import { notify } from '@operato/layout'
12
- import gql from 'graphql-tag'
13
+ import { i18next, localize } from '@operato/i18n'
14
+ import { p13n } from '@operato/p13n'
13
15
 
14
16
  export enum ChecklistTypeMainType {
15
17
  BASIC = '10',
@@ -21,20 +23,28 @@ export const CHECKLIST_MAIN_TYPE_LIST = {
21
23
  }
22
24
 
23
25
  @customElement('checklist-type-management')
24
- export class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {
26
+ export class ChecklistTypeManagement extends p13n(localize(i18next)(PageView)) {
25
27
  static styles = [
26
28
  ScrollbarStyles,
27
29
  CommonGristStyles,
30
+ CommonHeaderStyles,
28
31
  css`
29
32
  :host {
30
33
  display: flex;
31
34
  flex-direction: column;
32
35
 
33
- width: 100%;
34
-
35
36
  --grid-record-emphasized-background-color: red;
36
37
  --grid-record-emphasized-color: yellow;
37
38
  }
39
+
40
+ ox-grist {
41
+ overflow-y: auto;
42
+ flex: 1;
43
+ }
44
+
45
+ .header {
46
+ grid-template-areas: 'filters actions';
47
+ }
38
48
  `
39
49
  ]
40
50
 
@@ -48,7 +58,7 @@ export class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {
48
58
  handler: (search: string) => {
49
59
  this.grist.searchText = search
50
60
  },
51
- value: this.grist.searchText
61
+ value: this.grist?.searchText
52
62
  },
53
63
  filter: {
54
64
  handler: () => {
@@ -66,18 +76,28 @@ export class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {
66
76
  action: this._deleteChecklistType.bind(this),
67
77
  ...CommonButtonStyles.delete
68
78
  }
69
- ]
79
+ ],
80
+ toolbar: false
70
81
  }
71
82
  }
72
83
 
73
84
  render() {
74
85
  return html`
75
- <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
76
- <div slot="headroom">
77
- <div id="filters">
78
- <ox-filters-form autofocus></ox-filters-form>
86
+ <ox-grist
87
+ .mode=${'GRID'}
88
+ .config=${this.gristConfig}
89
+ .fetchHandler=${this.fetchHandler.bind(this)}
90
+ .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}
91
+ >
92
+ <div slot="headroom" class="header">
93
+ <div class="filters">
94
+ <ox-filters-form autofocus without-search></ox-filters-form>
79
95
  </div>
96
+
97
+ <ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
80
98
  </div>
99
+
100
+ <ox-grist-personalizer slot="setting"></ox-grist-personalizer>
81
101
  </ox-grist>
82
102
  `
83
103
  }
@@ -97,7 +117,7 @@ export class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {
97
117
  Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))
98
118
  )
99
119
  },
100
- filter: 'search',
120
+ filter: true,
101
121
  sortable: true,
102
122
  width: 150
103
123
  },
@@ -4,8 +4,7 @@ import { PageView } from '@operato/shell';
4
4
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
5
5
  import './component/building-inspection-detail-header';
6
6
  import '../checklist/checklist-view';
7
- declare const BuildingInspectionDetailChecklist_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
8
- export declare class BuildingInspectionDetailChecklist extends BuildingInspectionDetailChecklist_base {
7
+ export declare class BuildingInspectionDetailChecklist extends PageView {
9
8
  static styles: import("lit").CSSResult[];
10
9
  project: any;
11
10
  buildingInspection: any;
@@ -19,4 +18,3 @@ export declare class BuildingInspectionDetailChecklist extends BuildingInspectio
19
18
  private _onClickModifyChecklist;
20
19
  private validateChecklist;
21
20
  }
22
- export {};
@@ -5,13 +5,13 @@ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
5
5
  import { PageView } from '@operato/shell';
6
6
  import { css, html } from 'lit';
7
7
  import { customElement, state } from 'lit/decorators.js';
8
- import { ScopedElementsMixin } from '@open-wc/scoped-elements';
8
+ import { keyed } from 'lit/directives/keyed.js';
9
9
  import { client } from '@operato/graphql';
10
10
  import { notify } from '@operato/layout';
11
11
  import gql from 'graphql-tag';
12
12
  import './component/building-inspection-detail-header';
13
13
  import '../checklist/checklist-view';
14
- let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist extends ScopedElementsMixin(PageView) {
14
+ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist extends PageView {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.project = {};
@@ -34,11 +34,13 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
34
34
  ></building-inspection-detail-header>
35
35
 
36
36
  <div body>
37
- <checklist-view
38
- .mode=${"EDITOR" /* ChecklistMode.EDITOR */}
39
- status=${this.buildingInspection.status}
40
- .checklist=${this.buildingInspection.checklist || {}}
41
- ></checklist-view>
37
+ ${keyed(this.buildingInspection.id, html `
38
+ <checklist-view
39
+ .mode=${"EDITOR" /* ChecklistMode.EDITOR */}
40
+ status=${this.buildingInspection.status}
41
+ .checklist=${this.buildingInspection.checklist || {}}
42
+ ></checklist-view>
43
+ `)}
42
44
 
43
45
  <div button-container>
44
46
  <md-elevated-button @click=${this._onClickModifyChecklist}>
@@ -77,6 +79,9 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
77
79
  taskConstructorSignature
78
80
  overallSupervisorySignature
79
81
  taskSupervisorySignature
82
+ buildingInspection {
83
+ status
84
+ }
80
85
  checklistItems {
81
86
  id
82
87
  name
@@ -137,7 +142,6 @@ let BuildingInspectionDetailChecklist = class BuildingInspectionDetailChecklist
137
142
  this.project = response.data.project;
138
143
  }
139
144
  _onClickModifyChecklist() {
140
- console.log('checklist : ', this.buildingInspection.checklist);
141
145
  this.validateChecklist(this.buildingInspection.checklist);
142
146
  }
143
147
  async validateChecklist(checklist) {
@@ -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;AAE/B,OAAO,EAAE,aAAa,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAG7B,OAAO,+CAA+C,CAAA;AACtD,OAAO,6BAA6B,CAAA;AAI7B,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAA7E;;QAwCI,YAAO,GAAQ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AC,CAAC;wBACnD,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,yBAAyB,EAAE,IAAI,CAAC,yBAAyB;wBACzD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;qBACxD,CAAC,CAAC;iBACJ;aACF;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACpB,MAAM,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,CAAA;YACtC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAA;SACxD;aAAM;YACL,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;SAC5F;IACH,CAAC;;AA7MM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;kEAAkB;AAC1B;IAAC,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CA+M7C;SA/MY,iCAAiC","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 { 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 { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\n\n@customElement('building-inspection-detail-checklist')\nexport class BuildingInspectionDetailChecklist extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\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 <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n ></checklist-view>\n\n <div button-container>\n <md-elevated-button @click=${this._onClickModifyChecklist}>\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 const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n comment\n }\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 _onClickModifyChecklist() {\n console.log('checklist : ', this.buildingInspection.checklist)\n\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\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 },\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"]}
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,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAG7B,OAAO,+CAA+C,CAAA;AACtD,OAAO,6BAA6B,CAAA;AAI7B,IAAM,iCAAiC,GAAvC,MAAM,iCAAkC,SAAQ,QAAQ;IAAxD;;QAwCI,YAAO,GAAQ,EAAE,CAAA;QACjB,uBAAkB,GAAQ,EAAE,CAAA;IA4KvC,CAAC;IA1KC,IAAI,OAAO;QACT,OAAO;YACL,KAAK,EAAE,qBAAqB;SAC7B,CAAA;IACH,CAAC;IAED,MAAM;;QACJ,OAAO,IAAI,CAAA;;gCAEiB,MAAA,IAAI,CAAC,kBAAkB,0CAAE,EAAE;2BAChC,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,aAAa,0CAAE,EAAE;uBAC9C,IAAI,CAAC,OAAO,CAAC,IAAI;wBAChB,MAAA,MAAA,MAAA,IAAI,CAAC,kBAAkB,0CAAE,aAA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EAAE,OAAO,EAAE,CAAA,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,OAAO,KAAI,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;SAC5F;IACH,CAAC;;AAnNM,wCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;kEAAkB;AAC1B;IAAC,KAAK,EAAE;;6EAA6B;AAzC1B,iCAAiC;IAD7C,aAAa,CAAC,sCAAsC,CAAC;GACzC,iCAAiC,CAqN7C;SArNY,iCAAiC","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 } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\nimport '../checklist/checklist-view'\nimport { ChecklistMode } from '../checklist/checklist-view'\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: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\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 this.buildingInspection.id,\n html`\n <checklist-view\n .mode=${ChecklistMode.EDITOR}\n status=${this.buildingInspection.status}\n .checklist=${this.buildingInspection.checklist || {}}\n ></checklist-view>\n `\n )}\n\n <div button-container>\n <md-elevated-button @click=${this._onClickModifyChecklist}>\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 const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n checklist {\n id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n documentNo\n constructionInspectionDate\n supervisorInspectionDate\n overallConstructorSignature\n taskConstructorSignature\n overallSupervisorySignature\n taskSupervisorySignature\n buildingInspection {\n status\n }\n checklistItems {\n id\n name\n sequence\n mainType\n detailType\n inspctionCriteria\n constructionConfirmStatus\n supervisoryConfirmStatus\n comment\n }\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 _onClickModifyChecklist() {\n this.validateChecklist(this.buildingInspection.checklist)\n }\n\n private async validateChecklist(checklist: any) {\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 },\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"]}
@@ -3,6 +3,7 @@ import { PageView } from '@operato/shell';
3
3
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
4
4
  import './component/building-inspection-detail-header';
5
5
  import '@operato/image-marker/ox-image-marker.js';
6
+ import '@operato/image-marker/ox-image-marker-view.js';
6
7
  declare const BuildingInspectionDetailDrawing_base: typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
7
8
  export declare class BuildingInspectionDetailDrawing extends BuildingInspectionDetailDrawing_base {
8
9
  static styles: import("lit").CSSResult[];
@@ -10,6 +10,8 @@ import { notify } from '@operato/layout';
10
10
  import gql from 'graphql-tag';
11
11
  import './component/building-inspection-detail-header';
12
12
  import '@operato/image-marker/ox-image-marker.js';
13
+ import '@operato/image-marker/ox-image-marker-view.js';
14
+ import { BuildingInspectionStatus } from './building-inspection-list';
13
15
  let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {
14
16
  constructor() {
15
17
  super(...arguments);
@@ -23,22 +25,27 @@ let BuildingInspectionDetailDrawing = class BuildingInspectionDetailDrawing exte
23
25
  };
24
26
  }
25
27
  render() {
26
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
28
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
29
+ const imageUrl = ((_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.buildingLevel) === null || _b === void 0 ? void 0 : _b.mainDrawingImage) || '/assets/images/img-drawing-default.png';
30
+ const shapes = JSON.parse(((_c = this.buildingInspection) === null || _c === void 0 ? void 0 : _c.drawingMarker) || null) || [];
27
31
  return html `
28
32
  <building-inspection-detail-header
29
- .buildingInspectionId=${(_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.id}
30
- .buildingLevelId=${(_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.buildingLevel) === null || _c === void 0 ? void 0 : _c.id}
33
+ .buildingInspectionId=${(_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.id}
34
+ .buildingLevelId=${(_f = (_e = this.buildingInspection) === null || _e === void 0 ? void 0 : _e.buildingLevel) === null || _f === void 0 ? void 0 : _f.id}
31
35
  .projectName=${this.project.name}
32
- .buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
33
- .buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
36
+ .buildingName=${(_j = (_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.building) === null || _j === void 0 ? void 0 : _j.name}
37
+ .buildingLevelFloor=${(_l = (_k = this.buildingInspection) === null || _k === void 0 ? void 0 : _k.buildingLevel) === null || _l === void 0 ? void 0 : _l.floor}
34
38
  ></building-inspection-detail-header>
35
39
 
36
40
  <div body>
37
- <ox-image-marker
38
- .imageUrl=${((_k = (_j = this.buildingInspection) === null || _j === void 0 ? void 0 : _j.buildingLevel) === null || _k === void 0 ? void 0 : _k.mainDrawingImage) || '/assets/images/img-drawing-default.png'}
39
- .shapes=${JSON.parse(((_l = this.buildingInspection) === null || _l === void 0 ? void 0 : _l.drawingMarker) || null) || []}
40
- @shapes-changed=${this.onClickMarkerSave}
41
- ></ox-image-marker>
41
+ ${((_m = this.buildingInspection) === null || _m === void 0 ? void 0 : _m.status) == BuildingInspectionStatus.PASS
42
+ ? html `<ox-image-marker-view .imageUrl=${imageUrl} .shapes=${shapes}></ox-image-marker-view>`
43
+ : html ` <ox-image-marker
44
+ .imageUrl=${imageUrl}
45
+ .shapes=${shapes}
46
+ @shapes-changed=${this.onClickMarkerSave}
47
+ .currentMode=${'view'}
48
+ ></ox-image-marker>`}
42
49
  </div>
43
50
  `;
44
51
  }
@@ -147,6 +154,10 @@ BuildingInspectionDetailDrawing.styles = [
147
154
  div[body] {
148
155
  display: flex;
149
156
  justify-content: center;
157
+
158
+ ox-image-marker-view {
159
+ width: 100%;
160
+ }
150
161
  }
151
162
  `
152
163
  ];
@@ -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,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AiB,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;OAOT;YACD,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,EAAE,EAAE,IAAI,CAAC,oBAAoB;oBAC7B,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;iBACxC;aACF;SACF,CAAC,CAAA;QAEF,IAAI,QAAQ,CAAC,MAAM;YAAE,OAAM;QAE3B,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;IACjC,CAAC;;AA/IM,sCAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;KAkBF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;gEAAkB;AAC1B;IAAC,KAAK,EAAE;;2EAA6B;AACrC;IAAC,KAAK,EAAE;;6EAAkC;AA3B/B,+BAA+B;IAD3C,aAAa,CAAC,oCAAoC,CAAC;GACvC,+BAA+B,CAiJ3C;SAjJY,+BAA+B","sourcesContent":["import '@material/web/icon/icon.js'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } 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 { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport './component/building-inspection-detail-header'\nimport '@operato/image-marker/ox-image-marker.js'\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: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\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 `\n ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\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 <ox-image-marker\n .imageUrl=${this.buildingInspection?.buildingLevel?.mainDrawingImage || '/assets/images/img-drawing-default.png'}\n .shapes=${JSON.parse(this.buildingInspection?.drawingMarker || null) || []}\n @shapes-changed=${this.onClickMarkerSave}\n ></ox-image-marker>\n </div>\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 }\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 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: UpdateBuildingInspectionDrawingMarker!) {\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,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,+CAA+C,CAAA;AACtD,OAAO,0CAA0C,CAAA;AACjD,OAAO,+CAA+C,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAG9D,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAA3E;;QA6BI,YAAO,GAAQ,EAAE,CAAA;QACjB,uBAAkB,GAAQ,EAAE,CAAA;QAC5B,yBAAoB,GAAW,EAAE,CAAA;IA4H5C,CAAC;I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IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;KAsBF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;gEAAkB;AAC1B;IAAC,KAAK,EAAE;;2EAA6B;AACrC;IAAC,KAAK,EAAE;;6EAAkC;AA/B/B,+BAA+B;IAD3C,aAAa,CAAC,oCAAoC,CAAC;GACvC,+BAA+B,CA2J3C;SA3JY,+BAA+B","sourcesContent":["import '@material/web/icon/icon.js'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } 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 { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport './component/building-inspection-detail-header'\nimport '@operato/image-marker/ox-image-marker.js'\nimport '@operato/image-marker/ox-image-marker-view.js'\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: 75px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: #f7f7f7;\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 ]\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n\n get context() {\n return {\n title: '검측 관리 상세 - 검측 도면'\n }\n }\n\n render() {\n const imageUrl = this.buildingInspection?.buildingLevel?.mainDrawingImage || '/assets/images/img-drawing-default.png'\n const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []\n\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 ${this.buildingInspection?.status == BuildingInspectionStatus.PASS\n ? html`<ox-image-marker-view .imageUrl=${imageUrl} .shapes=${shapes}></ox-image-marker-view>`\n : html` <ox-image-marker\n .imageUrl=${imageUrl}\n .shapes=${shapes}\n @shapes-changed=${this.onClickMarkerSave}\n .currentMode=${'view'}\n ></ox-image-marker>`}\n </div>\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 }\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 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: UpdateBuildingInspectionDrawingMarker!) {\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,10 +1,12 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import '@operato/data-grist';
3
3
  import { PageView } from '@operato/shell';
4
+ import { TemplateResult } from 'lit';
4
5
  import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view';
5
6
  import { FetchOption } from '@operato/data-grist';
6
7
  import './inspection-create-popup';
7
8
  import '@operato/event-view/ox-event-view.js';
9
+ import { EventProvider } from '@operato/event-view';
8
10
  export declare enum ChecklistTypeMainType {
9
11
  BASIC = "10",
10
12
  NON_BASIC = "20"
@@ -36,6 +38,7 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
36
38
  building: any;
37
39
  drawingImage: string;
38
40
  buildingInspectionSummary: any;
41
+ calendarData?: EventProvider;
39
42
  private grist;
40
43
  private eventView;
41
44
  get context(): {
@@ -52,7 +55,7 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
52
55
  action: () => void;
53
56
  }[];
54
57
  };
55
- render(): import("lit-html").TemplateResult<1>;
58
+ render(): TemplateResult<1>;
56
59
  pageUpdated(changes: any, lifecycle: PageLifecycle): Promise<void>;
57
60
  initProject(buildingLevelId?: string): Promise<void>;
58
61
  pageInitialized(lifecycle: any): Promise<void>;
@@ -63,5 +66,6 @@ export declare class BuildingInspectionList extends BuildingInspectionList_base
63
66
  private _deleteChecklistType;
64
67
  private _openCreateInspection;
65
68
  private _formatDate;
69
+ private getCalendarTemplate;
66
70
  }
67
71
  export {};