@dssp/supervision 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/building-inspection/building-inspection-detail-checklist.ts +1 -1
- package/client/pages/building-inspection/building-inspection-detail-drawing.ts +2 -2
- package/client/pages/building-inspection/building-inspection-list.ts +75 -58
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +15 -11
- package/client/pages/building-inspection/component/inspection-event-provider.ts +1 -1
- package/client/pages/checklist/checklist-view.ts +63 -7
- package/client/pages/checklist/comment-list-popup.ts +318 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +2 -2
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.js +75 -58
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +15 -11
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +1 -0
- package/dist-client/pages/checklist/checklist-view.js +57 -7
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.d.ts +2 -0
- package/dist-client/pages/checklist/comment-list-popup.js +343 -0
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +3 -0
- package/dist-server/service/checklist-item/checklist-item-query.js +21 -0
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item.d.ts +2 -1
- package/dist-server/service/checklist-item/checklist-item.js +5 -4
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.d.ts +16 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +83 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +7 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +69 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.d.ts +7 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +49 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.d.ts +14 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +53 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.d.ts +12 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js +57 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -0
- package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-item-comment/event-subscriber.js +21 -0
- package/dist-server/service/checklist-item-comment/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-item-comment/index.d.ts +7 -0
- package/dist-server/service/checklist-item-comment/index.js +12 -0
- package/dist-server/service/checklist-item-comment/index.js.map +1 -0
- package/dist-server/service/index.d.ts +2 -1
- package/dist-server/service/index.js +6 -1
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/server/service/checklist-item/checklist-item-query.ts +11 -0
- package/server/service/checklist-item/checklist-item.ts +6 -3
- package/server/service/checklist-item-comment/checklist-item-comment-history.ts +69 -0
- package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +60 -0
- package/server/service/checklist-item-comment/checklist-item-comment-query.ts +36 -0
- package/server/service/checklist-item-comment/checklist-item-comment-type.ts +32 -0
- package/server/service/checklist-item-comment/checklist-item-comment.ts +56 -0
- package/server/service/checklist-item-comment/event-subscriber.ts +17 -0
- package/server/service/checklist-item-comment/index.ts +9 -0
- package/server/service/index.ts +10 -1
|
@@ -80,35 +80,35 @@ let BuildingInspectionList = class BuildingInspectionList extends ScopedElements
|
|
|
80
80
|
|
|
81
81
|
<div inspection-container>
|
|
82
82
|
<div inspection>
|
|
83
|
-
<
|
|
83
|
+
<div name bold>
|
|
84
84
|
<md-icon slot="icon">fact_check</md-icon>
|
|
85
|
-
|
|
86
|
-
</
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
</
|
|
93
|
-
</
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
</
|
|
99
|
-
</
|
|
100
|
-
<
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
</
|
|
105
|
-
</
|
|
106
|
-
<
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
</
|
|
111
|
-
</
|
|
85
|
+
검측 현황
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div>
|
|
89
|
+
<label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</label>
|
|
90
|
+
<span bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>
|
|
91
|
+
${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}
|
|
92
|
+
</span>
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</label>
|
|
96
|
+
<span bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>
|
|
97
|
+
${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
<div>
|
|
101
|
+
<label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</label>
|
|
102
|
+
<span bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>
|
|
103
|
+
${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}
|
|
104
|
+
</span>
|
|
105
|
+
</div>
|
|
106
|
+
<div>
|
|
107
|
+
<label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</label>
|
|
108
|
+
<span bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>
|
|
109
|
+
${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}
|
|
110
|
+
</span>
|
|
111
|
+
</div>
|
|
112
112
|
</div>
|
|
113
113
|
|
|
114
114
|
<ox-event-view
|
|
@@ -352,11 +352,11 @@ BuildingInspectionList.styles = [
|
|
|
352
352
|
css `
|
|
353
353
|
:host {
|
|
354
354
|
display: grid;
|
|
355
|
-
grid-template-rows:
|
|
355
|
+
grid-template-rows: 55px auto;
|
|
356
356
|
color: #4e5055;
|
|
357
357
|
|
|
358
358
|
width: 100%;
|
|
359
|
-
background-color: #
|
|
359
|
+
background-color: var(--md-sys-color-background, #f6f6f6);
|
|
360
360
|
overflow-y: auto;
|
|
361
361
|
|
|
362
362
|
--grid-record-emphasized-background-color: red;
|
|
@@ -372,8 +372,9 @@ BuildingInspectionList.styles = [
|
|
|
372
372
|
|
|
373
373
|
md-outlined-button {
|
|
374
374
|
--md-outlined-button-container-height: 30px;
|
|
375
|
-
--md-outlined-button-trailing-space:
|
|
376
|
-
--md-outlined-button-leading-space:
|
|
375
|
+
--md-outlined-button-trailing-space: var(--spacing-medium, 8px);
|
|
376
|
+
--md-outlined-button-leading-space: var(--spacing-medium, 8px);
|
|
377
|
+
--md-sys-color-outline: rgba(51,51,51,.20);
|
|
377
378
|
}
|
|
378
379
|
|
|
379
380
|
*[bold] {
|
|
@@ -382,32 +383,35 @@ BuildingInspectionList.styles = [
|
|
|
382
383
|
|
|
383
384
|
div[header] {
|
|
384
385
|
display: flex;
|
|
385
|
-
margin: 0px
|
|
386
|
+
margin: 0px var(--spacing-large, 12px);
|
|
387
|
+
margin-bottom:var(--spacing-small, 5px);
|
|
386
388
|
}
|
|
387
389
|
|
|
388
390
|
div[header] h2 {
|
|
389
391
|
flex: 0.5;
|
|
390
392
|
color: #3f71a0;
|
|
393
|
+
font-size:18px;
|
|
391
394
|
}
|
|
392
395
|
|
|
393
396
|
div[body] {
|
|
394
397
|
display: flex;
|
|
395
398
|
flex-direction: column;
|
|
396
|
-
margin:
|
|
397
|
-
|
|
399
|
+
margin: var(--spacing-large, 12px);
|
|
400
|
+
margin-top:0;
|
|
401
|
+
gap: var(--spacing-medium, 8px);
|
|
398
402
|
min-height: fit-content;
|
|
399
403
|
overflow-x: hidden;
|
|
400
404
|
}
|
|
401
405
|
|
|
402
406
|
div[body] h3 {
|
|
403
407
|
color: #2e79be;
|
|
404
|
-
font-size:
|
|
408
|
+
font-size: 16px;
|
|
405
409
|
margin: 0px;
|
|
406
410
|
}
|
|
407
411
|
|
|
408
412
|
div[body] > div {
|
|
409
413
|
display: flex;
|
|
410
|
-
gap:
|
|
414
|
+
gap: var(--spacing-medium, 8px);
|
|
411
415
|
border-radius: 5px;
|
|
412
416
|
}
|
|
413
417
|
|
|
@@ -419,10 +423,10 @@ BuildingInspectionList.styles = [
|
|
|
419
423
|
}
|
|
420
424
|
|
|
421
425
|
div[drawing] {
|
|
422
|
-
flex:
|
|
426
|
+
flex: 1;
|
|
423
427
|
border: 1px solid #cccccc80;
|
|
424
|
-
background-color:
|
|
425
|
-
padding:
|
|
428
|
+
background-color: var(--md-sys-color-on-primary);
|
|
429
|
+
padding: var(--spacing-large, 12px);
|
|
426
430
|
border-radius: 5px;
|
|
427
431
|
|
|
428
432
|
img {
|
|
@@ -435,52 +439,65 @@ BuildingInspectionList.styles = [
|
|
|
435
439
|
}
|
|
436
440
|
|
|
437
441
|
div[inspection-container] {
|
|
438
|
-
flex:
|
|
439
|
-
gap:
|
|
442
|
+
flex: 1;
|
|
443
|
+
gap: var(--spacing-medium, 8px);
|
|
440
444
|
|
|
441
445
|
display: flex;
|
|
442
446
|
flex-direction: column;
|
|
443
447
|
|
|
444
448
|
div[inspection] {
|
|
445
449
|
display: grid;
|
|
446
|
-
grid-template-columns:
|
|
447
|
-
margin-top: 5px;
|
|
450
|
+
grid-template-columns: 90px 1fr 1fr 1fr 1fr;
|
|
448
451
|
background: #ebc8321a;
|
|
449
|
-
border-radius:
|
|
450
|
-
padding:
|
|
452
|
+
border-radius: 5px;
|
|
453
|
+
padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
|
|
451
454
|
|
|
452
|
-
& >
|
|
455
|
+
& > div {
|
|
453
456
|
display: flex;
|
|
454
457
|
flex-direction: column;
|
|
455
458
|
align-items: center;
|
|
456
459
|
justify-content: center;
|
|
457
460
|
|
|
458
|
-
|
|
459
|
-
|
|
461
|
+
span::before{
|
|
462
|
+
display: inline-block;
|
|
463
|
+
position: relative;
|
|
464
|
+
content: "";
|
|
465
|
+
width: 10px;
|
|
466
|
+
height: 10px;
|
|
467
|
+
border-radius: 6px;
|
|
468
|
+
top: -1px;
|
|
469
|
+
margin-right: 2px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
span[status='wait']::before{
|
|
473
|
+
background-color: #4e5055;
|
|
460
474
|
}
|
|
461
|
-
|
|
462
|
-
color: #3395f1;
|
|
475
|
+
span[status='request']::before {
|
|
476
|
+
background-color: #3395f1;
|
|
463
477
|
}
|
|
464
|
-
|
|
465
|
-
color: #1bb401;
|
|
478
|
+
span[status='pass']::before {
|
|
479
|
+
background-color: #1bb401;
|
|
466
480
|
}
|
|
467
|
-
|
|
468
|
-
color: #ff4444;
|
|
481
|
+
span[status='fail']::before {
|
|
482
|
+
background-color: #ff4444;
|
|
469
483
|
}
|
|
470
484
|
span[dot] {
|
|
471
485
|
font-size: 1.3em;
|
|
472
486
|
}
|
|
473
487
|
}
|
|
474
|
-
& >
|
|
488
|
+
& > div[name] {
|
|
475
489
|
flex-direction: row;
|
|
476
490
|
text-align: right;
|
|
477
|
-
gap:
|
|
491
|
+
gap: var(--spacing-small, 4px);
|
|
492
|
+
padding-right:var(--spacing-large, 12px);
|
|
478
493
|
border-right: 2px dotted #ccc;
|
|
494
|
+
max-width: 100%;
|
|
495
|
+
line-height:1.3;
|
|
479
496
|
|
|
480
497
|
md-icon {
|
|
481
498
|
width: 40px;
|
|
482
499
|
height: 40px;
|
|
483
|
-
border-radius:
|
|
500
|
+
border-radius: 5px;
|
|
484
501
|
color: #fff;
|
|
485
502
|
background: #f16154;
|
|
486
503
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-list.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAC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BAAsB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, navigate } from '@operato/shell'\nimport { css, html, TemplateResult } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\nimport './inspection-create-popup'\nimport '@operato/event-view/ox-event-view.js'\nimport { InspectionEventProvider } from './component/inspection-event-provider'\nimport { EventProvider } from '@operato/event-view'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\nexport const CHECKLIST_MAIN_TYPE_LIST = {\n [ChecklistTypeMainType.BASIC]: '기본 업무',\n [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'\n}\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport const BUILDING_INSPECTION_STATUS_DISPLAY = {\n [BuildingInspectionStatus.WAIT]: '검측 대기',\n [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',\n [BuildingInspectionStatus.REQUEST]: '검측 요청',\n [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',\n [BuildingInspectionStatus.PASS]: '합격',\n [BuildingInspectionStatus.FAIL]: '불합격'\n}\n\n@customElement('building-inspection-list')\nexport class BuildingInspectionList extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 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 md-filled-button {\n --md-filled-button-container-color: #0595e5;\n --md-filled-button-container-height: 30px;\n --md-filled-button-trailing-space: 15px;\n --md-filled-button-leading-space: 15px;\n }\n\n md-outlined-button {\n --md-outlined-button-container-height: 30px;\n --md-outlined-button-trailing-space: 15px;\n --md-outlined-button-leading-space: 15px;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[header] {\n display: flex;\n margin: 0px 20px;\n }\n\n div[header] h2 {\n flex: 0.5;\n color: #3f71a0;\n }\n\n div[body] {\n display: flex;\n flex-direction: column;\n margin: 0px 25px 0px 25px;\n gap: 10px;\n min-height: fit-content;\n overflow-x: hidden;\n }\n\n div[body] h3 {\n color: #2e79be;\n font-size: 18px;\n margin: 0px;\n }\n\n div[body] > div {\n display: flex;\n gap: 10px;\n border-radius: 5px;\n }\n\n div[top] {\n flex: 1;\n\n display: flex;\n background-color: #f7f7f7;\n }\n\n div[drawing] {\n flex: 0.4;\n border: 1px solid #cccccc80;\n background-color: #fff;\n padding: 10px;\n border-radius: 5px;\n\n img {\n width: 100%;\n\n display: block;\n object-fit: contain;\n object-position: center;\n }\n }\n\n div[inspection-container] {\n flex: 0.6;\n gap: 5px;\n\n display: flex;\n flex-direction: column;\n\n div[inspection] {\n display: grid;\n grid-template-columns: 120px 0.9fr 0.9fr 0.9fr 0.9fr;\n margin-top: 5px;\n background: #ebc8321a;\n border-radius: 7px;\n padding: 7px 0px;\n\n & > span {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n div[status='wait'] {\n color: #4e5055;\n }\n div[status='request'] {\n color: #3395f1;\n }\n div[status='pass'] {\n color: #1bb401;\n }\n div[status='fail'] {\n color: #ff4444;\n }\n span[dot] {\n font-size: 1.3em;\n }\n }\n & > span[name] {\n flex-direction: row;\n text-align: right;\n gap: 10px;\n border-right: 2px dotted #ccc;\n\n md-icon {\n width: 40px;\n height: 40px;\n border-radius: 7px;\n color: #fff;\n background: #f16154;\n }\n }\n }\n }\n\n ox-event-view {\n flex: 1;\n }\n\n div[bottom] {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 300px;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n private defaultProject = {\n name: '',\n buildingComplex: {\n buildings: []\n }\n }\n\n @state() private gristConfig: any\n @state() buildingLevelId: string = ''\n @state() project: any = { ...this.defaultProject }\n @state() location: string = ''\n @state() building: any = {}\n @state() drawingImage: string = ''\n @state() buildingInspectionSummary: any = {}\n @state() calendarData?: EventProvider\n\n @query('ox-grist') private grist!: DataGrist\n @query('ox-event-view') private eventView!: HTMLElement\n\n get context() {\n return {\n title: '검측 관리',\n actions: [\n {\n title: '검측 등록',\n action: this._openCreateInspection.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._deleteChecklistType.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n return html`\n <div header>\n <h2>${this.project.name}</h2>\n </div>\n\n <div body>\n <div top>\n <div drawing>\n <h3>도면: ${this.location}</h3>\n <img src=${this.drawingImage || '/assets/images/img-drawing-default.png'} />\n </div>\n\n <div inspection-container>\n <div inspection>\n <span name bold>\n <md-icon slot=\"icon\">fact_check</md-icon>\n 검측<br />현황\n </span>\n\n <span>\n <div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</div>\n <div bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>\n <span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}\n </div>\n </span>\n <span>\n <div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</div>\n <div bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>\n <span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}\n </div>\n </span>\n <span>\n <div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</div>\n <div bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>\n <span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}\n </div>\n </span>\n <span>\n <div>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</div>\n <div bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>\n <span dot>●</span> ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}\n </div>\n </span>\n </div>\n\n <ox-event-view\n .mode=${'monthly'}\n .eventProvider=${this.calendarData}\n @select-date=${(e: CustomEvent) => {\n console.log('select-date', e.detail)\n }}\n >\n </ox-event-view>\n </div>\n </div>\n\n <div bottom>\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingLevelId = lifecycle.resourceId || ''\n\n await this.initProject(this.buildingLevelId)\n this.grist.fetch()\n }\n }\n\n async initProject(buildingLevelId: string = '') {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingLevelId($buildingLevelId: String!) {\n projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {\n id\n name\n mainPhoto {\n fullpath\n }\n buildingComplex {\n id\n drawing {\n id\n name\n fullpath\n }\n buildings {\n id\n name\n }\n }\n }\n\n buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data?.projectByBuildingLevelId\n this.buildingInspectionSummary = response.data?.buildingInspectionSummaryOfBuildingLevel\n\n this.calendarData = new InspectionEventProvider(buildingLevelId)\n\n // 캘린더 최소 높이 속성 수정\n this.eventView.style.setProperty('--calendar-monthly-date-min-height', '50px')\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'location',\n header: '위치',\n width: 150\n },\n {\n type: 'string',\n name: 'constructionType',\n header: '공종',\n width: 120\n },\n {\n type: 'string',\n name: 'inspectionParts',\n header: '검측 부위',\n record: {\n renderer: value => value?.join(', ') || ''\n },\n width: 200\n },\n {\n type: 'string',\n name: 'requestDate',\n header: '검측 요청일',\n width: 120\n },\n {\n type: 'string',\n name: 'status',\n header: '검측 결과',\n record: {\n renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]\n },\n width: 120\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n appendable: false,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n navigate(`building-inspection-detail-drawing/${record.id}`)\n }\n }\n },\n sorters: [{ name: 'requestDate' }]\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n if (!this.buildingLevelId) return\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionsOfBuildingLevel($params: BuildingInspectionsOfBuildingLevel!, $buildingLevelId: String!) {\n buildingInspectionsOfBuildingLevel(params: $params) {\n items {\n id\n status\n requestDate\n checklist {\n checklistId: id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n }\n }\n total\n }\n\n buildingLevel(id: $buildingLevelId) {\n id\n floor\n building {\n id\n name\n }\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n `,\n variables: {\n params: {\n buildingLevelId: this.buildingLevelId,\n limit: 0\n },\n buildingLevelId: this.buildingLevelId\n }\n })\n\n let items = response.data?.buildingInspectionsOfBuildingLevel?.items || []\n items = items.map(item => ({\n ...item,\n ...item.checklist,\n requestDate: this._formatDate(item.requestDate)\n }))\n const buildingLevel = response.data?.buildingLevel\n\n this.location = `${buildingLevel.building.name} ${buildingLevel.floor}층` || ''\n this.drawingImage = buildingLevel?.mainDrawingImage || ''\n this.building = buildingLevel?.building || {}\n\n return {\n total: response.data?.buildingInspectionsOfBuildingLevel?.total || 0,\n records: items\n }\n }\n\n private async _deleteChecklistType() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteBuildingInspections(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private _openCreateInspection() {\n openPopup(\n html`\n <inspection-create-popup\n .projectId=${this.project.id}\n .selectedBuildingId=${this.building.id}\n .selectedBuildingLevelId=${this.buildingLevelId}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></inspection-create-popup>\n `,\n {\n backdrop: true,\n size: 'large',\n title: '검측 요청서 등록'\n }\n )\n }\n\n private _formatDate(date: Date | undefined) {\n return date\n ? new Intl.DateTimeFormat('en-CA', {\n timeZone: 'Asia/Seoul',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit'\n }).format(new Date(date))\n : ''\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"building-inspection-list.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;A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;AAC5C;IAAC,KAAK,EAAE;;4DAA6B;AAErC;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;qDAAA;AAC5C;IAAC,KAAK,CAAC,eAAe,CAAC;8BAAqB,WAAW;yDAAA;AArM5C,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAqgBlC;SArgBY,sBAAsB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, navigate } from '@operato/shell'\nimport { css, html, TemplateResult } from 'lit'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\nimport { openPopup } from '@operato/layout'\nimport './inspection-create-popup'\nimport '@operato/event-view/ox-event-view.js'\nimport { InspectionEventProvider } from './component/inspection-event-provider'\nimport { EventProvider } from '@operato/event-view'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\nexport const CHECKLIST_MAIN_TYPE_LIST = {\n [ChecklistTypeMainType.BASIC]: '기본 업무',\n [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'\n}\n\nexport enum BuildingInspectionStatus {\n WAIT = 'WAIT',\n OVERALL_WAIT = 'OVERALL_WAIT',\n REQUEST = 'REQUEST',\n OVERALL_REQUEST = 'OVERALL_REQUEST',\n PASS = 'PASS',\n FAIL = 'FAIL'\n}\nexport const BUILDING_INSPECTION_STATUS_DISPLAY = {\n [BuildingInspectionStatus.WAIT]: '검측 대기',\n [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',\n [BuildingInspectionStatus.REQUEST]: '검측 요청',\n [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',\n [BuildingInspectionStatus.PASS]: '합격',\n [BuildingInspectionStatus.FAIL]: '불합격'\n}\n\n@customElement('building-inspection-list')\nexport class BuildingInspectionList extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 55px auto;\n color: #4e5055;\n\n width: 100%;\n background-color: var(--md-sys-color-background, #f6f6f6);\n overflow-y: auto;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n\n md-filled-button {\n --md-filled-button-container-color: #0595e5;\n --md-filled-button-container-height: 30px;\n --md-filled-button-trailing-space: 15px;\n --md-filled-button-leading-space: 15px;\n }\n\n md-outlined-button {\n --md-outlined-button-container-height: 30px;\n --md-outlined-button-trailing-space: var(--spacing-medium, 8px);\n --md-outlined-button-leading-space: var(--spacing-medium, 8px);\n --md-sys-color-outline: rgba(51,51,51,.20);\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[header] {\n display: flex;\n margin: 0px var(--spacing-large, 12px);\n margin-bottom:var(--spacing-small, 5px);\n }\n\n div[header] h2 {\n flex: 0.5;\n color: #3f71a0;\n font-size:18px;\n }\n\n div[body] {\n display: flex;\n flex-direction: column;\n margin: var(--spacing-large, 12px);\n margin-top:0;\n gap: var(--spacing-medium, 8px);\n min-height: fit-content;\n overflow-x: hidden;\n }\n\n div[body] h3 {\n color: #2e79be;\n font-size: 16px;\n margin: 0px;\n }\n\n div[body] > div {\n display: flex;\n gap: var(--spacing-medium, 8px);\n border-radius: 5px;\n }\n\n div[top] {\n flex: 1;\n\n display: flex;\n background-color: #f7f7f7;\n }\n\n div[drawing] {\n flex: 1;\n border: 1px solid #cccccc80;\n background-color: var(--md-sys-color-on-primary);\n padding: var(--spacing-large, 12px);\n border-radius: 5px;\n\n img {\n width: 100%;\n\n display: block;\n object-fit: contain;\n object-position: center;\n }\n }\n\n div[inspection-container] {\n flex: 1;\n gap: var(--spacing-medium, 8px);\n\n display: flex;\n flex-direction: column;\n\n div[inspection] {\n display: grid;\n grid-template-columns: 90px 1fr 1fr 1fr 1fr;\n background: #ebc8321a;\n border-radius: 5px;\n padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);\n\n & > div {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n\n span::before{\n display: inline-block;\n position: relative;\n content: \"\";\n width: 10px;\n height: 10px;\n border-radius: 6px;\n top: -1px;\n margin-right: 2px;\n }\n\n span[status='wait']::before{\n background-color: #4e5055;\n }\n span[status='request']::before {\n background-color: #3395f1;\n }\n span[status='pass']::before {\n background-color: #1bb401;\n }\n span[status='fail']::before {\n background-color: #ff4444;\n }\n span[dot] {\n font-size: 1.3em;\n }\n }\n & > div[name] {\n flex-direction: row;\n text-align: right;\n gap: var(--spacing-small, 4px);\n padding-right:var(--spacing-large, 12px);\n border-right: 2px dotted #ccc;\n max-width: 100%;\n line-height:1.3; \n\n md-icon {\n width: 40px;\n height: 40px;\n border-radius: 5px;\n color: #fff;\n background: #f16154;\n }\n }\n }\n }\n\n ox-event-view {\n flex: 1;\n }\n\n div[bottom] {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n overflow: hidden;\n min-height: 300px;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n private defaultProject = {\n name: '',\n buildingComplex: {\n buildings: []\n }\n }\n\n @state() private gristConfig: any\n @state() buildingLevelId: string = ''\n @state() project: any = { ...this.defaultProject }\n @state() location: string = ''\n @state() building: any = {}\n @state() drawingImage: string = ''\n @state() buildingInspectionSummary: any = {}\n @state() calendarData?: EventProvider\n\n @query('ox-grist') private grist!: DataGrist\n @query('ox-event-view') private eventView!: HTMLElement\n\n get context() {\n return {\n title: '검측 관리',\n actions: [\n {\n title: '검측 등록',\n action: this._openCreateInspection.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._deleteChecklistType.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n return html`\n <div header>\n <h2>${this.project.name}</h2>\n </div>\n\n <div body>\n <div top>\n <div drawing>\n <h3>도면: ${this.location}</h3>\n <img src=${this.drawingImage || '/assets/images/img-drawing-default.png'} />\n </div>\n\n <div inspection-container>\n <div inspection>\n <div name bold>\n <md-icon slot=\"icon\">fact_check</md-icon>\n 검측 현황\n </div>\n\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.WAIT]}</label>\n <span bold status=${BuildingInspectionStatus.WAIT.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.WAIT.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.REQUEST]}</label>\n <span bold status=${BuildingInspectionStatus.REQUEST.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.REQUEST.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.PASS]}</label>\n <span bold status=${BuildingInspectionStatus.PASS.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.PASS.toLowerCase()]}\n </span>\n </div>\n <div>\n <label>${BUILDING_INSPECTION_STATUS_DISPLAY[BuildingInspectionStatus.FAIL]}</label>\n <span bold status=${BuildingInspectionStatus.FAIL.toLowerCase()}>\n ${this.buildingInspectionSummary[BuildingInspectionStatus.FAIL.toLowerCase()]}\n </span>\n </div>\n </div>\n\n <ox-event-view\n .mode=${'monthly'}\n .eventProvider=${this.calendarData}\n @select-date=${(e: CustomEvent) => {\n console.log('select-date', e.detail)\n }}\n >\n </ox-event-view>\n </div>\n </div>\n\n <div bottom>\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>\n </div>\n </div>\n `\n }\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this.buildingLevelId = lifecycle.resourceId || ''\n\n await this.initProject(this.buildingLevelId)\n this.grist.fetch()\n }\n }\n\n async initProject(buildingLevelId: string = '') {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingLevelId($buildingLevelId: String!) {\n projectByBuildingLevelId(buildingLevelId: $buildingLevelId) {\n id\n name\n mainPhoto {\n fullpath\n }\n buildingComplex {\n id\n drawing {\n id\n name\n fullpath\n }\n buildings {\n id\n name\n }\n }\n }\n\n buildingInspectionSummaryOfBuildingLevel(buildingLevelId: $buildingLevelId) {\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data?.projectByBuildingLevelId\n this.buildingInspectionSummary = response.data?.buildingInspectionSummaryOfBuildingLevel\n\n this.calendarData = new InspectionEventProvider(buildingLevelId)\n\n // 캘린더 최소 높이 속성 수정\n this.eventView.style.setProperty('--calendar-monthly-date-min-height', '50px')\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'location',\n header: '위치',\n width: 150\n },\n {\n type: 'string',\n name: 'constructionType',\n header: '공종',\n width: 120\n },\n {\n type: 'string',\n name: 'inspectionParts',\n header: '검측 부위',\n record: {\n renderer: value => value?.join(', ') || ''\n },\n width: 200\n },\n {\n type: 'string',\n name: 'requestDate',\n header: '검측 요청일',\n width: 120\n },\n {\n type: 'string',\n name: 'status',\n header: '검측 결과',\n record: {\n renderer: value => BUILDING_INSPECTION_STATUS_DISPLAY[value]\n },\n width: 120\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n appendable: false,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n navigate(`building-inspection-detail-drawing/${record.id}`)\n }\n }\n },\n sorters: [{ name: 'requestDate' }]\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n if (!this.buildingLevelId) return\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionsOfBuildingLevel($params: BuildingInspectionsOfBuildingLevel!, $buildingLevelId: String!) {\n buildingInspectionsOfBuildingLevel(params: $params) {\n items {\n id\n status\n requestDate\n checklist {\n checklistId: id\n name\n constructionType\n constructionDetailType\n location\n inspectionParts\n }\n }\n total\n }\n\n buildingLevel(id: $buildingLevelId) {\n id\n floor\n building {\n id\n name\n }\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n `,\n variables: {\n params: {\n buildingLevelId: this.buildingLevelId,\n limit: 0\n },\n buildingLevelId: this.buildingLevelId\n }\n })\n\n let items = response.data?.buildingInspectionsOfBuildingLevel?.items || []\n items = items.map(item => ({\n ...item,\n ...item.checklist,\n requestDate: this._formatDate(item.requestDate)\n }))\n const buildingLevel = response.data?.buildingLevel\n\n this.location = `${buildingLevel.building.name} ${buildingLevel.floor}층` || ''\n this.drawingImage = buildingLevel?.mainDrawingImage || ''\n this.building = buildingLevel?.building || {}\n\n return {\n total: response.data?.buildingInspectionsOfBuildingLevel?.total || 0,\n records: items\n }\n }\n\n private async _deleteChecklistType() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteBuildingInspections(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private _openCreateInspection() {\n openPopup(\n html`\n <inspection-create-popup\n .projectId=${this.project.id}\n .selectedBuildingId=${this.building.id}\n .selectedBuildingLevelId=${this.buildingLevelId}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></inspection-create-popup>\n `,\n {\n backdrop: true,\n size: 'large',\n title: '검측 요청서 등록'\n }\n )\n }\n\n private _formatDate(date: Date | undefined) {\n return date\n ? new Intl.DateTimeFormat('en-CA', {\n timeZone: 'Asia/Seoul',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit'\n }).format(new Date(date))\n : ''\n }\n}\n"]}
|
package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js
CHANGED
|
@@ -77,12 +77,13 @@ BuildingInspectionDetailHeader.styles = [
|
|
|
77
77
|
|
|
78
78
|
div[header] {
|
|
79
79
|
display: flex;
|
|
80
|
-
margin: 0px
|
|
80
|
+
margin: 0px var(--spacing-large, 12px);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
h2 {
|
|
84
84
|
flex: 0.5;
|
|
85
85
|
color: #3f71a0;
|
|
86
|
+
font-size:18px;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
div[button-container] {
|
|
@@ -93,20 +94,23 @@ BuildingInspectionDetailHeader.styles = [
|
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
md-elevated-button {
|
|
96
|
-
margin:
|
|
97
|
+
margin-left: var(--spacing-small, 4px);
|
|
97
98
|
|
|
98
|
-
--md-elevated-button-container-height:
|
|
99
|
+
--md-elevated-button-container-height: 32px;
|
|
99
100
|
--md-elevated-button-label-text-size: 16px;
|
|
100
101
|
--md-elevated-button-container-color: #0595e5;
|
|
101
102
|
|
|
102
|
-
--md-elevated-button-label-text-color:
|
|
103
|
-
--md-elevated-button-hover-label-text-color:
|
|
104
|
-
--md-elevated-button-pressed-label-text-color:
|
|
105
|
-
--md-elevated-button-focus-label-text-color:
|
|
106
|
-
--md-elevated-button-icon-color:
|
|
107
|
-
--md-elevated-button-hover-icon-color:
|
|
108
|
-
--md-elevated-button-pressed-icon-color:
|
|
109
|
-
--md-elevated-button-focus-icon-color:
|
|
103
|
+
--md-elevated-button-label-text-color: var(--md-sys-color-on-primary);
|
|
104
|
+
--md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);
|
|
105
|
+
--md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);
|
|
106
|
+
--md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);
|
|
107
|
+
--md-elevated-button-icon-color: var(--md-sys-color-on-primary);
|
|
108
|
+
--md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);
|
|
109
|
+
--md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);
|
|
110
|
+
--md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);
|
|
111
|
+
|
|
112
|
+
--_with-leading-icon-leading-space: var(--spacing-medium, 8px);
|
|
113
|
+
--_with-leading-icon-trailing-space: var(--spacing-medium, 8px);
|
|
110
114
|
}
|
|
111
115
|
`
|
|
112
116
|
];
|
package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"building-inspection-detail-header.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/building-inspection-detail-header.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGxE,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,UAAU;IAAvD;;
|
|
1
|
+
{"version":3,"file":"building-inspection-detail-header.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/building-inspection-detail-header.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGxE,IAAM,8BAA8B,GAApC,MAAM,8BA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EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mEAAyB;AACpD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oEAA0B;AACrD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0EAAgC;AAjEvD,8BAA8B;IADnC,aAAa,CAAC,mCAAmC,CAAC;GAC7C,8BAA8B,CA8GnC","sourcesContent":["import '@material/web/icon/icon.js'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('building-inspection-detail-header')\nclass BuildingInspectionDetailHeader extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n md-filled-button {\n --md-filled-button-container-color: #0595e5;\n --md-filled-button-container-height: 30px;\n --md-filled-button-trailing-space: 15px;\n --md-filled-button-leading-space: 15px;\n }\n md-outlined-button {\n --md-outlined-button-container-height: 30px;\n --md-outlined-button-trailing-space: 15px;\n --md-outlined-button-leading-space: 15px;\n }\n\n *[bold] {\n font-weight: bold;\n }\n\n div[header] {\n display: flex;\n margin: 0px var(--spacing-large, 12px);\n }\n\n h2 {\n flex: 0.5;\n color: #3f71a0;\n font-size:18px;\n }\n\n div[button-container] {\n display: flex;\n align-items: center;\n justify-content: end;\n flex: 0.5;\n }\n\n md-elevated-button {\n margin-left: var(--spacing-small, 4px);\n\n --md-elevated-button-container-height: 32px;\n --md-elevated-button-label-text-size: 16px;\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: var(--md-sys-color-on-primary);\n --md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);\n --md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);\n --md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);\n --md-elevated-button-icon-color: var(--md-sys-color-on-primary);\n --md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);\n --md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);\n --md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);\n\n --_with-leading-icon-leading-space: var(--spacing-medium, 8px);\n --_with-leading-icon-trailing-space: var(--spacing-medium, 8px);\n }\n `\n ]\n\n @property({ type: String }) buildingInspectionId: string = ''\n @property({ type: String }) buildingLevelId: string = ''\n @property({ type: String }) projectName: string = ''\n @property({ type: String }) buildingName: string = ''\n @property({ type: String }) buildingLevelFloor: string = ''\n\n render() {\n const path = window.location.pathname\n\n return html`\n <div header>\n <h2>${this.projectName || ''} ${this.buildingName || ''} ${this.buildingLevelFloor || ''}층</h2>\n <div button-container>\n <md-elevated-button\n ?disabled=${path.includes('building-inspection-list/')}\n href=${`building-inspection-list/${this.buildingLevelId}`}\n >\n <md-icon slot=\"icon\">assignment</md-icon>검측 리스트\n </md-elevated-button>\n <md-elevated-button\n ?disabled=${path.includes('building-inspection-detail-drawing/')}\n href=${`building-inspection-detail-drawing/${this.buildingInspectionId}`}\n >\n <md-icon slot=\"icon\">assignment</md-icon>검측도면\n </md-elevated-button>\n <md-elevated-button\n ?disabled=${path.includes('building-inspection-detail-checklist/')}\n href=${`building-inspection-detail-checklist/${this.buildingInspectionId}`}\n >\n <md-icon slot=\"icon\">description</md-icon>검측 체크리스트\n </md-elevated-button>\n <md-elevated-button\n ?disabled=${path.includes('building-inspection-detail-camera/')}\n href=${`building-inspection-detail-camera/${this.buildingInspectionId}`}\n disabled\n >\n <md-icon slot=\"icon\">description</md-icon>사진촬영\n </md-elevated-button>\n <md-elevated-button\n ?disabled=${path.includes('building-inspection-detail-history/')}\n href=${`building-inspection-detail-history/${this.buildingInspectionId}`}\n disabled\n >\n <md-icon slot=\"icon\">description</md-icon>감리이력\n </md-elevated-button>\n </div>\n </div>\n `\n }\n}\n"]}
|
|
@@ -36,7 +36,7 @@ export class InspectionEventProvider {
|
|
|
36
36
|
// if (response.errors) return null
|
|
37
37
|
const calendarData = this.getCalendarTemplate((_b = response.data) === null || _b === void 0 ? void 0 : _b.buildingInspectionDateSummaryOfLevelAndPeriod);
|
|
38
38
|
calendar.forEach(({ date }) => {
|
|
39
|
-
const formattedDate = date.
|
|
39
|
+
const formattedDate = date.toLocaleDateString('en-CA'); // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.
|
|
40
40
|
const template = calendarData[formattedDate];
|
|
41
41
|
if (!template)
|
|
42
42
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,OAAO,uBAAuB;IAGlC,YAAY,kBAA0B,EAAE;QAFxC,oBAAe,GAAG,EAAE,CAAA;QAGlB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAkB;;QAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACjE,MAAM,OAAO,GAAG,MAAA,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,0CAAG,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAErE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;OAcT;YACD,SAAS,EAAE;gBACT,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,SAAS;gBACT,OAAO;aACR;SACF,CAAC,CAAA;QAEF,mCAAmC;QAEnC,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAA,QAAQ,CAAC,IAAI,0CAAE,6CAA6C,CAAC,CAAA;QAE3G,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"inspection-event-provider.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/inspection-event-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,MAAM,OAAO,uBAAuB;IAGlC,YAAY,kBAA0B,EAAE;QAFxC,oBAAe,GAAG,EAAE,CAAA;QAGlB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAkB;;QAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAA;QAC1C,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACjE,MAAM,OAAO,GAAG,MAAA,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,0CAAG,MAAM,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QAErE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;OAcT;YACD,SAAS,EAAE;gBACT,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,SAAS;gBACT,OAAO;aACR;SACF,CAAC,CAAA;QAEF,mCAAmC;QAEnC,M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C,CAAC,EAAE;YAC5G,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA,gEAAgE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;;OAEjH,CAAA;SACF;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF","sourcesContent":["import { BizEvent, CALENDAR, EventProvider } from '@operato/event-view'\nimport { html, TemplateResult } from 'lit'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\n\nexport class InspectionEventProvider implements EventProvider {\n buildingLevelId = {}\n\n constructor(buildingLevelId: string = '') {\n this.buildingLevelId = buildingLevelId\n }\n\n async fetchEventsForCalendar(calendar: CALENDAR): Promise<Map<Date, BizEvent[]>> {\n const result = new Map<Date, BizEvent[]>()\n const startDate = calendar[0]['date'].toISOString().split('T')[0]\n const endDate = calendar.at(-1)?.['date'].toISOString().split('T')[0]\n\n const response = await client.query({\n query: gql`\n query BuildingInspectionDateSummaryOfLevelAndPeriod($buildingLevelId: String!, $startDate: String!, $endDate: String!) {\n buildingInspectionDateSummaryOfLevelAndPeriod(\n buildingLevelId: $buildingLevelId\n startDate: $startDate\n endDate: $endDate\n ) {\n requestDate\n wait\n request\n pass\n fail\n }\n }\n `,\n variables: {\n buildingLevelId: this.buildingLevelId,\n startDate,\n endDate\n }\n })\n\n // if (response.errors) return null\n\n const calendarData = this.getCalendarTemplate(response.data?.buildingInspectionDateSummaryOfLevelAndPeriod)\n\n calendar.forEach(({ date }) => {\n const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.\n const template = calendarData[formattedDate]\n\n if (!template) return\n\n result.set(date, [\n {\n due: formattedDate,\n template: template,\n title: '',\n color: '',\n clickEvent: e => console.log('e :', e, template)\n }\n ])\n })\n\n return result\n }\n\n // 검측 개수가 있는 데이터들만 날짜별로 템플릿 만들기\n private getCalendarTemplate(inspectionData: any[] = []): { [date: string]: TemplateResult } {\n const template = {}\n for (let date of inspectionData) {\n template[date.requestDate] = html`\n <div style=\"display: grid; grid-template-columns: repeat(2, 1fr); padding-inline: 7px;\">\n ${date.wait !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #4e5055\">●</span> ${date.wait}</div>` : ''}\n ${date.request !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #3395f1\">●</span> ${date.request}</div>` : ''}\n ${date.pass !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #1bb401\">●</span> ${date.pass}</div>` : ''}\n ${date.fail !== 0 ? html`<div><span style=\"font-size: 1.3em; color: #ff4444\">●</span> ${date.fail}</div>` : ''}\n </div>\n `\n }\n\n return template\n }\n}\n"]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@material/web/icon/icon.js';
|
|
3
|
+
import gql from 'graphql-tag';
|
|
4
|
+
import { client } from '@operato/graphql';
|
|
3
5
|
import { css, html, LitElement } from 'lit';
|
|
4
6
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
7
|
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
6
8
|
import { CHECKLIST_MAIN_TYPE_LIST, BuildingInspectionStatus, BUILDING_INSPECTION_STATUS_DISPLAY } from '../building-inspection/building-inspection-list';
|
|
7
9
|
import '@operato/input/ox-input-signature.js';
|
|
8
|
-
// import { BuildingComplex } from '@dssp/building-complex'
|
|
9
10
|
import { store } from '@operato/shell';
|
|
10
11
|
import { connect } from 'pwa-helpers/connect-mixin.js';
|
|
12
|
+
import { openPopup } from '@operato/layout';
|
|
13
|
+
import './comment-list-popup';
|
|
11
14
|
let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
|
|
12
15
|
constructor() {
|
|
13
16
|
super(...arguments);
|
|
@@ -168,8 +171,11 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
|
|
|
168
171
|
@change=${this._onChangeConfirmStatus}
|
|
169
172
|
></md-radio>
|
|
170
173
|
</td>
|
|
171
|
-
<td attachment></td>
|
|
172
|
-
<td
|
|
174
|
+
<td attachment><md-icon slot="icon">attach_file</md-icon></td>
|
|
175
|
+
<td comment @click=${() => this._onClickComment(item.id)}>
|
|
176
|
+
<md-icon slot="icon">chat</md-icon>
|
|
177
|
+
<span>${(item === null || item === void 0 ? void 0 : item.checklistItemCommentCount) || ''}</span>
|
|
178
|
+
</td>
|
|
173
179
|
</tr>`;
|
|
174
180
|
})}
|
|
175
181
|
</tbody>
|
|
@@ -307,6 +313,40 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
|
|
|
307
313
|
};
|
|
308
314
|
});
|
|
309
315
|
}
|
|
316
|
+
_onClickComment(checklistItemId) {
|
|
317
|
+
openPopup(html `
|
|
318
|
+
<comment-list-popup
|
|
319
|
+
.checklistItemId=${checklistItemId}
|
|
320
|
+
@change-comment=${this._refreshComment.bind(this)}
|
|
321
|
+
></comment-list-popup>
|
|
322
|
+
`, {
|
|
323
|
+
backdrop: true,
|
|
324
|
+
size: 'medium',
|
|
325
|
+
title: '조치사항'
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
async _refreshComment(e) {
|
|
329
|
+
var _a, _b;
|
|
330
|
+
const { checklistItemId } = e.detail;
|
|
331
|
+
const response = await client.query({
|
|
332
|
+
query: gql `
|
|
333
|
+
query ChecklistItem($checklistItemId: String!) {
|
|
334
|
+
checklistItem(id: $checklistItemId) {
|
|
335
|
+
id
|
|
336
|
+
checklistItemCommentCount
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
`,
|
|
340
|
+
variables: {
|
|
341
|
+
checklistItemId: checklistItemId
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
const checklistItemCommentCount = ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.checklistItem) === null || _b === void 0 ? void 0 : _b.checklistItemCommentCount) || [];
|
|
345
|
+
this.checklist.checklistItems = this.checklist.checklistItems.map(item => {
|
|
346
|
+
return item.id != checklistItemId ? item : Object.assign(Object.assign({}, item), { checklistItemCommentCount: checklistItemCommentCount });
|
|
347
|
+
});
|
|
348
|
+
this.requestUpdate();
|
|
349
|
+
}
|
|
310
350
|
};
|
|
311
351
|
ChecklistView.styles = [
|
|
312
352
|
ButtonContainerStyles,
|
|
@@ -345,6 +385,7 @@ ChecklistView.styles = [
|
|
|
345
385
|
th {
|
|
346
386
|
border: 1px #999999 solid;
|
|
347
387
|
padding-inline: 8px;
|
|
388
|
+
vertical-align: middle;
|
|
348
389
|
}
|
|
349
390
|
th {
|
|
350
391
|
background-color: #efefef;
|
|
@@ -354,12 +395,8 @@ ChecklistView.styles = [
|
|
|
354
395
|
height: 35px;
|
|
355
396
|
&[radio] {
|
|
356
397
|
text-align: center;
|
|
357
|
-
vertical-align: middle;
|
|
358
398
|
width: 55px;
|
|
359
399
|
}
|
|
360
|
-
&[attachment] {
|
|
361
|
-
width: 90px;
|
|
362
|
-
}
|
|
363
400
|
}
|
|
364
401
|
}
|
|
365
402
|
|
|
@@ -406,6 +443,19 @@ ChecklistView.styles = [
|
|
|
406
443
|
text-align: center;
|
|
407
444
|
word-break: keep-all;
|
|
408
445
|
}
|
|
446
|
+
|
|
447
|
+
&[attachment] {
|
|
448
|
+
width: 90px;
|
|
449
|
+
text-align: center;
|
|
450
|
+
}
|
|
451
|
+
&[comment] {
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
text-align: center;
|
|
454
|
+
|
|
455
|
+
* {
|
|
456
|
+
vertical-align: middle;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
409
459
|
}
|
|
410
460
|
}
|
|
411
461
|
|