@dssp/supervision 1.0.0-alpha.0 → 1.0.0-alpha.1

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 (99) hide show
  1. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +1 -1
  2. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  3. package/dist-client/route.d.ts +1 -1
  4. package/dist-client/tsconfig.tsbuildinfo +1 -1
  5. package/package.json +5 -5
  6. package/client/bootstrap.ts +0 -1
  7. package/client/index.ts +0 -0
  8. package/client/pages/action-plan/action-plan-importer.ts +0 -94
  9. package/client/pages/action-plan/action-plan-list-page.ts +0 -340
  10. package/client/pages/building-inspection/building-inspection-detail-camera.ts +0 -277
  11. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +0 -258
  12. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +0 -288
  13. package/client/pages/building-inspection/building-inspection-list.ts +0 -565
  14. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +0 -123
  15. package/client/pages/building-inspection/component/inspection-event-provider.ts +0 -81
  16. package/client/pages/building-inspection/inspection-create-popup.ts +0 -785
  17. package/client/pages/checklist/attachment-list-popup.ts +0 -301
  18. package/client/pages/checklist/checklist-view.ts +0 -581
  19. package/client/pages/checklist/comment-list-popup.ts +0 -328
  20. package/client/pages/checklist/file-preview-popup.ts +0 -70
  21. package/client/pages/checklist-template/checklist-template-item.ts +0 -240
  22. package/client/pages/checklist-template/checklist-template-list.ts +0 -368
  23. package/client/pages/checklist-template/checklist-type-management.ts +0 -262
  24. package/client/pages/issue/issue-importer.ts +0 -94
  25. package/client/pages/issue/issue-list-page.ts +0 -340
  26. package/client/pages/project-report/project-report-importer.ts +0 -94
  27. package/client/pages/project-report/project-report-list-page.ts +0 -340
  28. package/client/pages/supervisor/supervisor-importer.ts +0 -94
  29. package/client/pages/supervisor/supervisor-list-page.ts +0 -340
  30. package/client/route.ts +0 -27
  31. package/client/tsconfig.json +0 -11
  32. package/server/controllers/index.ts +0 -0
  33. package/server/index.ts +0 -4
  34. package/server/middlewares/index.ts +0 -3
  35. package/server/migrations/index.ts +0 -9
  36. package/server/routes.ts +0 -28
  37. package/server/service/action-plan/action-plan-mutation.ts +0 -198
  38. package/server/service/action-plan/action-plan-query.ts +0 -62
  39. package/server/service/action-plan/action-plan-type.ts +0 -61
  40. package/server/service/action-plan/action-plan.ts +0 -103
  41. package/server/service/action-plan/index.ts +0 -7
  42. package/server/service/building-inspection/building-inspection-history.ts +0 -72
  43. package/server/service/building-inspection/building-inspection-mutation.ts +0 -276
  44. package/server/service/building-inspection/building-inspection-query.ts +0 -242
  45. package/server/service/building-inspection/building-inspection-type.ts +0 -145
  46. package/server/service/building-inspection/building-inspection.ts +0 -108
  47. package/server/service/building-inspection/event-subscriber.ts +0 -20
  48. package/server/service/building-inspection/index.ts +0 -11
  49. package/server/service/checklist/checklist-history.ts +0 -96
  50. package/server/service/checklist/checklist-mutation.ts +0 -103
  51. package/server/service/checklist/checklist-query.ts +0 -58
  52. package/server/service/checklist/checklist-type.ts +0 -49
  53. package/server/service/checklist/checklist.ts +0 -127
  54. package/server/service/checklist/event-subscriber.ts +0 -17
  55. package/server/service/checklist/index.ts +0 -9
  56. package/server/service/checklist-item/checklist-item-mutation.ts +0 -5
  57. package/server/service/checklist-item/checklist-item-query.ts +0 -84
  58. package/server/service/checklist-item/checklist-item-type.ts +0 -12
  59. package/server/service/checklist-item/checklist-item.ts +0 -103
  60. package/server/service/checklist-item/index.ts +0 -7
  61. package/server/service/checklist-item-comment/checklist-item-comment-history.ts +0 -69
  62. package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +0 -80
  63. package/server/service/checklist-item-comment/checklist-item-comment-query.ts +0 -36
  64. package/server/service/checklist-item-comment/checklist-item-comment-type.ts +0 -32
  65. package/server/service/checklist-item-comment/checklist-item-comment.ts +0 -56
  66. package/server/service/checklist-item-comment/event-subscriber.ts +0 -17
  67. package/server/service/checklist-item-comment/index.ts +0 -9
  68. package/server/service/checklist-template/checklist-template-mutation.ts +0 -66
  69. package/server/service/checklist-template/checklist-template-query.ts +0 -39
  70. package/server/service/checklist-template/checklist-template-type.ts +0 -23
  71. package/server/service/checklist-template/checklist-template.ts +0 -71
  72. package/server/service/checklist-template/index.ts +0 -6
  73. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +0 -64
  74. package/server/service/checklist-template-item/checklist-template-item-query.ts +0 -44
  75. package/server/service/checklist-template-item/checklist-template-item-type.ts +0 -39
  76. package/server/service/checklist-template-item/checklist-template-item.ts +0 -68
  77. package/server/service/checklist-template-item/index.ts +0 -6
  78. package/server/service/checklist-type/checklist-type-mutation.ts +0 -66
  79. package/server/service/checklist-type/checklist-type-query.ts +0 -39
  80. package/server/service/checklist-type/checklist-type-type.ts +0 -26
  81. package/server/service/checklist-type/checklist-type.ts +0 -64
  82. package/server/service/checklist-type/index.ts +0 -6
  83. package/server/service/index.ts +0 -88
  84. package/server/service/issue/index.ts +0 -7
  85. package/server/service/issue/issue-mutation.ts +0 -198
  86. package/server/service/issue/issue-query.ts +0 -62
  87. package/server/service/issue/issue-type.ts +0 -61
  88. package/server/service/issue/issue.ts +0 -100
  89. package/server/service/project-report/index.ts +0 -7
  90. package/server/service/project-report/project-report-mutation.ts +0 -198
  91. package/server/service/project-report/project-report-query.ts +0 -62
  92. package/server/service/project-report/project-report-type.ts +0 -61
  93. package/server/service/project-report/project-report.ts +0 -113
  94. package/server/service/supervisor/index.ts +0 -7
  95. package/server/service/supervisor/supervisor-mutation.ts +0 -198
  96. package/server/service/supervisor/supervisor-query.ts +0 -62
  97. package/server/service/supervisor/supervisor-type.ts +0 -61
  98. package/server/service/supervisor/supervisor.ts +0 -108
  99. package/server/tsconfig.json +0 -10
@@ -1,565 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import '@operato/data-grist'
3
-
4
- import { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
5
- import { PageView, navigate } from '@operato/shell'
6
- import { css, html, TemplateResult } from 'lit'
7
- import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'
8
- import { customElement, query, state } from 'lit/decorators.js'
9
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
10
- import { DataGrist, FetchOption } from '@operato/data-grist'
11
- import { client } from '@operato/graphql'
12
- import { notify } from '@operato/layout'
13
- import gql from 'graphql-tag'
14
- import { openPopup } from '@operato/layout'
15
- import './inspection-create-popup'
16
- import '@operato/event-view/ox-event-view.js'
17
- import { InspectionEventProvider } from './component/inspection-event-provider'
18
- import { EventProvider } from '@operato/event-view'
19
-
20
- export enum ChecklistTypeMainType {
21
- BASIC = '10',
22
- NON_BASIC = '20'
23
- }
24
- export const CHECKLIST_MAIN_TYPE_LIST = {
25
- [ChecklistTypeMainType.BASIC]: '기본 업무',
26
- [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'
27
- }
28
-
29
- export enum BuildingInspectionStatus {
30
- WAIT = 'WAIT',
31
- OVERALL_WAIT = 'OVERALL_WAIT',
32
- REQUEST = 'REQUEST',
33
- OVERALL_REQUEST = 'OVERALL_REQUEST',
34
- PASS = 'PASS',
35
- FAIL = 'FAIL'
36
- }
37
- export const BUILDING_INSPECTION_STATUS_DISPLAY = {
38
- [BuildingInspectionStatus.WAIT]: '검측 대기',
39
- [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',
40
- [BuildingInspectionStatus.REQUEST]: '검측 요청',
41
- [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',
42
- [BuildingInspectionStatus.PASS]: '합격',
43
- [BuildingInspectionStatus.FAIL]: '불합격'
44
- }
45
-
46
- @customElement('building-inspection-list')
47
- export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
48
- static styles = [
49
- ScrollbarStyles,
50
- CommonGristStyles,
51
- css`
52
- :host {
53
- display: grid;
54
- grid-template-rows: 55px auto;
55
- color: #4e5055;
56
-
57
- width: 100%;
58
- background-color: var(--md-sys-color-background, #f6f6f6);
59
- overflow-y: auto;
60
-
61
- --grid-record-emphasized-background-color: red;
62
- --grid-record-emphasized-color: yellow;
63
- }
64
-
65
- md-filled-button {
66
- --md-filled-button-container-color: #0595e5;
67
- --md-filled-button-container-height: 30px;
68
- --md-filled-button-trailing-space: 15px;
69
- --md-filled-button-leading-space: 15px;
70
- }
71
-
72
- md-outlined-button {
73
- --md-outlined-button-container-height: 30px;
74
- --md-outlined-button-trailing-space: var(--spacing-medium, 8px);
75
- --md-outlined-button-leading-space: var(--spacing-medium, 8px);
76
- --md-sys-color-outline: rgba(51, 51, 51, 0.2);
77
- }
78
-
79
- *[bold] {
80
- font-weight: bold;
81
- }
82
-
83
- div[header] {
84
- display: flex;
85
- margin: 0px var(--spacing-large, 12px);
86
- margin-bottom: var(--spacing-small, 5px);
87
- }
88
-
89
- div[header] h2 {
90
- flex: 0.5;
91
- color: #3f71a0;
92
- font-size: 18px;
93
- }
94
-
95
- div[body] {
96
- display: flex;
97
- flex-direction: column;
98
- margin: var(--spacing-large, 12px);
99
- margin-top: 0;
100
- gap: var(--spacing-medium, 8px);
101
- min-height: fit-content;
102
- overflow-x: hidden;
103
- }
104
-
105
- div[body] h3 {
106
- color: #2e79be;
107
- font-size: 16px;
108
- margin: 0px;
109
- }
110
-
111
- div[body] > div {
112
- display: flex;
113
- gap: var(--spacing-medium, 8px);
114
- border-radius: 5px;
115
- }
116
-
117
- div[top] {
118
- flex: 1;
119
-
120
- display: flex;
121
- background-color: #f7f7f7;
122
- }
123
-
124
- div[drawing] {
125
- flex: 1;
126
- border: 1px solid #cccccc80;
127
- background-color: var(--md-sys-color-on-primary);
128
- padding: var(--spacing-large, 12px);
129
- border-radius: 5px;
130
-
131
- img {
132
- width: 100%;
133
-
134
- display: block;
135
- object-fit: contain;
136
- object-position: center;
137
- }
138
- }
139
-
140
- div[inspection-container] {
141
- flex: 1;
142
- gap: var(--spacing-medium, 8px);
143
-
144
- display: flex;
145
- flex-direction: column;
146
-
147
- div[inspection] {
148
- display: grid;
149
- grid-template-columns: 90px 1fr 1fr 1fr 1fr;
150
- background: #ebc8321a;
151
- border-radius: 5px;
152
- padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
153
-
154
- & > div {
155
- display: flex;
156
- flex-direction: column;
157
- align-items: center;
158
- justify-content: center;
159
-
160
- span::before {
161
- display: inline-block;
162
- position: relative;
163
- content: '';
164
- width: 10px;
165
- height: 10px;
166
- border-radius: 6px;
167
- top: -1px;
168
- margin-right: 2px;
169
- }
170
-
171
- span[status='wait']::before {
172
- background-color: #4e5055;
173
- }
174
- span[status='request']::before {
175
- background-color: #3395f1;
176
- }
177
- span[status='pass']::before {
178
- background-color: #1bb401;
179
- }
180
- span[status='fail']::before {
181
- background-color: #ff4444;
182
- }
183
- span[dot] {
184
- font-size: 1.3em;
185
- }
186
- }
187
- & > div[name] {
188
- flex-direction: row;
189
- text-align: right;
190
- gap: var(--spacing-small, 4px);
191
- padding-right: var(--spacing-large, 12px);
192
- border-right: 2px dotted #ccc;
193
- max-width: 100%;
194
- line-height: 1.3;
195
-
196
- md-icon {
197
- width: 40px;
198
- height: 40px;
199
- border-radius: 5px;
200
- color: #fff;
201
- background: #f16154;
202
- }
203
- }
204
- }
205
- }
206
-
207
- ox-event-view {
208
- flex: 1;
209
- }
210
-
211
- div[bottom] {
212
- flex: 1;
213
-
214
- display: flex;
215
- flex-direction: column;
216
- overflow: hidden;
217
- min-height: 300px;
218
- }
219
-
220
- ox-grist {
221
- overflow-y: auto;
222
- flex: 1;
223
- }
224
- `
225
- ]
226
-
227
- private defaultProject = {
228
- name: '',
229
- buildingComplex: {
230
- buildings: []
231
- }
232
- }
233
-
234
- @state() private gristConfig: any
235
- @state() buildingLevelId: string = ''
236
- @state() project: any = { ...this.defaultProject }
237
- @state() location: string = ''
238
- @state() building: any = {}
239
- @state() drawingImage: string = ''
240
- @state() buildingInspectionSummary: any = {}
241
- @state() calendarData?: EventProvider
242
-
243
- @query('ox-grist') private grist!: DataGrist
244
- @query('ox-event-view') private eventView!: HTMLElement
245
-
246
- get context() {
247
- return {
248
- title: '검측 관리',
249
- actions: [
250
- {
251
- title: '검측 등록',
252
- action: this._openCreateInspection.bind(this),
253
- ...CommonButtonStyles.submit
254
- },
255
- {
256
- title: '삭제',
257
- action: this._deleteChecklistType.bind(this),
258
- ...CommonButtonStyles.delete
259
- }
260
- ]
261
- }
262
- }
263
-
264
- render() {
265
- return html`
266
- <div header>
267
- <h2>${this.project.name}</h2>
268
- </div>
269
-
270
- <div body>
271
- <div top>
272
- <div drawing>
273
- <h3>도면: ${this.location}</h3>
274
- <img src=${this.drawingImage || '/assets/images/img-drawing-default.png'} />
275
- </div>
276
-
277
- <div inspection-container>
278
- <div inspection>
279
- <div name bold>
280
- <md-icon slot="icon">fact_check</md-icon>
281
- 검측 현황
282
- </div>
283
-
284
- <div>
285
- <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</label>
286
- <span bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>
287
- ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}
288
- </span>
289
- </div>
290
- <div>
291
- <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</label>
292
- <span bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>
293
- ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}
294
- </span>
295
- </div>
296
- <div>
297
- <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</label>
298
- <span bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>
299
- ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}
300
- </span>
301
- </div>
302
- <div>
303
- <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</label>
304
- <span bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>
305
- ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}
306
- </span>
307
- </div>
308
- </div>
309
-
310
- <ox-event-view
311
- .mode=${'monthly'}
312
- .eventProvider=${this.calendarData}
313
- @select-date=${(e: CustomEvent) => {
314
- // TODO 선택된 날짜의 검측데이터만 그리드에 보여야함
315
- console.log('select-date', e.detail)
316
- }}
317
- >
318
- </ox-event-view>
319
- </div>
320
- </div>
321
-
322
- <div bottom>
323
- <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>
324
- </div>
325
- </div>
326
- `
327
- }
328
-
329
- async pageUpdated(changes: any, lifecycle: PageLifecycle) {
330
- if (this.active) {
331
- this.buildingLevelId = lifecycle.resourceId || ''
332
-
333
- await this.initProject(this.buildingLevelId)
334
- this.grist.fetch()
335
- }
336
- }
337
-
338
- async initProject(buildingLevelId: string = '') {
339
- const response = await client.query({
340
- query: gql`
341
- query ProjectByBuildingLevelId($buildingLevelId: String!) {
342
- projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {
343
- id
344
- name
345
- mainPhoto {
346
- fullpath
347
- }
348
- buildingComplex {
349
- id
350
- drawing {
351
- id
352
- name
353
- fullpath
354
- }
355
- buildings {
356
- id
357
- name
358
- }
359
- }
360
- }
361
-
362
- buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {
363
- wait
364
- request
365
- pass
366
- fail
367
- }
368
- }
369
- `,
370
- variables: {
371
- buildingLevelId
372
- }
373
- })
374
-
375
- if (response.errors) return
376
-
377
- this.project = response.data?.projectByBuildingLevelId
378
- this.buildingInspectionSummary = response.data?.buildingInspectionSummaryOfBuildingLevel
379
-
380
- this.calendarData = new InspectionEventProvider(buildingLevelId)
381
-
382
- // 캘린더 최소 높이 속성 수정
383
- this.eventView.style.setProperty('--calendar-monthly-date-min-height', '50px')
384
- }
385
-
386
- async pageInitialized(lifecycle: any) {
387
- this.gristConfig = {
388
- columns: [
389
- { type: 'gutter', gutterName: 'sequence' },
390
- { type: 'gutter', gutterName: 'row-selector', multiple: true },
391
- {
392
- type: 'string',
393
- name: 'id',
394
- hidden: true
395
- },
396
- {
397
- type: 'string',
398
- name: 'location',
399
- header: '위치',
400
- width: 150
401
- },
402
- {
403
- type: 'string',
404
- name: 'constructionType',
405
- header: '공종',
406
- width: 120
407
- },
408
- {
409
- type: 'string',
410
- name: 'inspectionParts',
411
- header: '검측 부위',
412
- record: {
413
- renderer: value => value?.join(', ') || ''
414
- },
415
- width: 200
416
- },
417
- {
418
- type: 'string',
419
- name: 'requestDate',
420
- header: '검측 요청일',
421
- width: 120
422
- },
423
- {
424
- type: 'string',
425
- name: 'status',
426
- header: '검측 결과',
427
- record: {
428
- renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]
429
- },
430
- width: 120
431
- }
432
- ],
433
- rows: {
434
- selectable: {
435
- multiple: true
436
- },
437
- appendable: false,
438
- handlers: {
439
- click: (columns, data, column, record, rowIndex) => {
440
- navigate(`building-inspection-detail-drawing/${record.id}`)
441
- }
442
- }
443
- },
444
- sorters: [{ name: 'requestDate' }]
445
- }
446
- }
447
-
448
- async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
449
- if (!this.buildingLevelId) return
450
-
451
- const response = await client.query({
452
- query: gql`
453
- query BuildingInspectionsOfBuildingLevel($params: BuildingInspectionsOfBuildingLevel!, $buildingLevelId: String!) {
454
- buildingInspectionsOfBuildingLevel(params: $params) {
455
- items {
456
- id
457
- status
458
- requestDate
459
- checklist {
460
- checklistId: id
461
- name
462
- constructionType
463
- constructionDetailType
464
- location
465
- inspectionParts
466
- }
467
- }
468
- total
469
- }
470
-
471
- buildingLevel(id: $buildingLevelId) {
472
- id
473
- floor
474
- building {
475
- id
476
- name
477
- }
478
- mainDrawing {
479
- id
480
- name
481
- fullpath
482
- }
483
- mainDrawingImage
484
- }
485
- }
486
- `,
487
- variables: {
488
- params: {
489
- buildingLevelId: this.buildingLevelId,
490
- limit: 0
491
- },
492
- buildingLevelId: this.buildingLevelId
493
- }
494
- })
495
-
496
- let items = response.data?.buildingInspectionsOfBuildingLevel?.items || []
497
- items = items.map(item => ({
498
- ...item,
499
- ...item.checklist,
500
- requestDate: this._formatDate(item.requestDate)
501
- }))
502
- const buildingLevel = response.data?.buildingLevel
503
-
504
- this.location = `${buildingLevel.building.name} ${buildingLevel.floor}층` || ''
505
- this.drawingImage = buildingLevel?.mainDrawingImage || ''
506
- this.building = buildingLevel?.building || {}
507
-
508
- return {
509
- total: response.data?.buildingInspectionsOfBuildingLevel?.total || 0,
510
- records: items
511
- }
512
- }
513
-
514
- private async _deleteChecklistType() {
515
- if (confirm('삭제하시겠습니까?')) {
516
- const ids = this.grist.selected.map(record => record.id)
517
- if (ids && ids.length > 0) {
518
- const response = await client.mutate({
519
- mutation: gql`
520
- mutation ($ids: [String!]!) {
521
- deleteBuildingInspections(ids: $ids)
522
- }
523
- `,
524
- variables: {
525
- ids
526
- }
527
- })
528
-
529
- if (!response.errors) {
530
- this.grist.fetch()
531
- notify({ message: '삭제되었습니다.' })
532
- }
533
- }
534
- }
535
- }
536
-
537
- private _openCreateInspection() {
538
- openPopup(
539
- html`
540
- <inspection-create-popup
541
- .projectId=${this.project.id}
542
- .selectedBuildingId=${this.building.id}
543
- .selectedBuildingLevelId=${this.buildingLevelId}
544
- @requestRefresh="${() => this.grist.fetch()}"
545
- ></inspection-create-popup>
546
- `,
547
- {
548
- backdrop: true,
549
- size: 'large',
550
- title: '검측 요청서 등록'
551
- }
552
- )
553
- }
554
-
555
- private _formatDate(date: Date | undefined) {
556
- return date
557
- ? new Intl.DateTimeFormat('en-CA', {
558
- timeZone: 'Asia/Seoul',
559
- year: 'numeric',
560
- month: '2-digit',
561
- day: '2-digit'
562
- }).format(new Date(date))
563
- : ''
564
- }
565
- }
@@ -1,123 +0,0 @@
1
- import '@material/web/icon/icon.js'
2
- import { css, html, LitElement } from 'lit'
3
- import { customElement, property, state } from 'lit/decorators.js'
4
- import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
5
-
6
- @customElement('building-inspection-detail-header')
7
- class BuildingInspectionDetailHeader extends LitElement {
8
- static styles = [
9
- ButtonContainerStyles,
10
- ScrollbarStyles,
11
- css`
12
- md-filled-button {
13
- --md-filled-button-container-color: #0595e5;
14
- --md-filled-button-container-height: 30px;
15
- --md-filled-button-trailing-space: 15px;
16
- --md-filled-button-leading-space: 15px;
17
- }
18
- md-outlined-button {
19
- --md-outlined-button-container-height: 30px;
20
- --md-outlined-button-trailing-space: 15px;
21
- --md-outlined-button-leading-space: 15px;
22
- }
23
-
24
- *[bold] {
25
- font-weight: bold;
26
- }
27
-
28
- div[header] {
29
- display: flex;
30
- margin: 0px var(--spacing-large, 12px);
31
- }
32
-
33
- h2 {
34
- flex: 0.5;
35
- color: #3f71a0;
36
- font-size:18px;
37
- }
38
-
39
- div[button-container] {
40
- display: flex;
41
- align-items: center;
42
- justify-content: end;
43
- flex: 0.5;
44
- }
45
-
46
- md-elevated-button {
47
- margin-left: var(--spacing-small, 4px);
48
- letter-spacing: -1px;
49
-
50
- --md-elevated-button-container-height: 32px;
51
- --md-elevated-button-label-text-size: 16px;
52
- --md-elevated-button-container-color: #0595e5;
53
-
54
- --md-elevated-button-label-text-color: var(--md-sys-color-on-primary);
55
- --md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);
56
- --md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);
57
- --md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);
58
- --md-elevated-button-icon-color: var(--md-sys-color-on-primary);
59
- --md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);
60
- --md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);
61
- --md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);
62
- --_leading-space:var(--spacing-tiny, 2px);
63
-
64
- --_with-leading-icon-leading-space: var(--spacing-medium, 8px);
65
- --_with-leading-icon-trailing-space: var(--spacing-medium, 8px);
66
-
67
- md-icon{
68
- margin-right: -2px;
69
- }
70
- }
71
- `
72
- ]
73
-
74
- @property({ type: String }) buildingInspectionId: string = ''
75
- @property({ type: String }) buildingLevelId: string = ''
76
- @property({ type: String }) projectName: string = ''
77
- @property({ type: String }) buildingName: string = ''
78
- @property({ type: String }) buildingLevelFloor: string = ''
79
-
80
- render() {
81
- const path = window.location.pathname
82
-
83
- return html`
84
- <div header>
85
- <h2>${this.projectName || ''} ${this.buildingName || ''} ${this.buildingLevelFloor || ''}층</h2>
86
- <div button-container>
87
- <md-elevated-button
88
- ?disabled=${path.includes('building-inspection-list/')}
89
- href=${`building-inspection-list/${this.buildingLevelId}`}
90
- >
91
- <md-icon slot="icon">list_alt</md-icon>검측 리스트
92
- </md-elevated-button>
93
- <md-elevated-button
94
- ?disabled=${path.includes('building-inspection-detail-drawing/')}
95
- href=${`building-inspection-detail-drawing/${this.buildingInspectionId}`}
96
- >
97
- <md-icon slot="icon">fact_check</md-icon>검측도면
98
- </md-elevated-button>
99
- <md-elevated-button
100
- ?disabled=${path.includes('building-inspection-detail-checklist/')}
101
- href=${`building-inspection-detail-checklist/${this.buildingInspectionId}`}
102
- >
103
- <md-icon slot="icon">task</md-icon>검측 체크리스트
104
- </md-elevated-button>
105
- <md-elevated-button
106
- ?disabled=${path.includes('building-inspection-detail-camera/')}
107
- href=${`building-inspection-detail-camera/${this.buildingInspectionId}`}
108
- disabled
109
- >
110
- <md-icon slot="icon">photo_camera</md-icon>사진촬영
111
- </md-elevated-button>
112
- <md-elevated-button
113
- ?disabled=${path.includes('building-inspection-detail-history/')}
114
- href=${`building-inspection-detail-history/${this.buildingInspectionId}`}
115
- disabled
116
- >
117
- <md-icon slot="icon">pending_actions</md-icon>감리이력
118
- </md-elevated-button>
119
- </div>
120
- </div>
121
- `
122
- }
123
- }