@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
|
@@ -28,11 +28,11 @@ export class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageVie
|
|
|
28
28
|
css`
|
|
29
29
|
:host {
|
|
30
30
|
display: grid;
|
|
31
|
-
grid-template-rows:
|
|
31
|
+
grid-template-rows: 55px auto;
|
|
32
32
|
color: #4e5055;
|
|
33
33
|
|
|
34
34
|
width: 100%;
|
|
35
|
-
background-color: #
|
|
35
|
+
background-color: var(--md-sys-color-background, #f6f6f6);
|
|
36
36
|
overflow-y: auto;
|
|
37
37
|
|
|
38
38
|
--grid-record-emphasized-background-color: red;
|
|
@@ -51,11 +51,11 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
51
51
|
css`
|
|
52
52
|
:host {
|
|
53
53
|
display: grid;
|
|
54
|
-
grid-template-rows:
|
|
54
|
+
grid-template-rows: 55px auto;
|
|
55
55
|
color: #4e5055;
|
|
56
56
|
|
|
57
57
|
width: 100%;
|
|
58
|
-
background-color: #
|
|
58
|
+
background-color: var(--md-sys-color-background, #f6f6f6);
|
|
59
59
|
overflow-y: auto;
|
|
60
60
|
|
|
61
61
|
--grid-record-emphasized-background-color: red;
|
|
@@ -71,8 +71,9 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
71
71
|
|
|
72
72
|
md-outlined-button {
|
|
73
73
|
--md-outlined-button-container-height: 30px;
|
|
74
|
-
--md-outlined-button-trailing-space:
|
|
75
|
-
--md-outlined-button-leading-space:
|
|
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,.20);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
*[bold] {
|
|
@@ -81,32 +82,35 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
81
82
|
|
|
82
83
|
div[header] {
|
|
83
84
|
display: flex;
|
|
84
|
-
margin: 0px
|
|
85
|
+
margin: 0px var(--spacing-large, 12px);
|
|
86
|
+
margin-bottom:var(--spacing-small, 5px);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
div[header] h2 {
|
|
88
90
|
flex: 0.5;
|
|
89
91
|
color: #3f71a0;
|
|
92
|
+
font-size:18px;
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
div[body] {
|
|
93
96
|
display: flex;
|
|
94
97
|
flex-direction: column;
|
|
95
|
-
margin:
|
|
96
|
-
|
|
98
|
+
margin: var(--spacing-large, 12px);
|
|
99
|
+
margin-top:0;
|
|
100
|
+
gap: var(--spacing-medium, 8px);
|
|
97
101
|
min-height: fit-content;
|
|
98
102
|
overflow-x: hidden;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
div[body] h3 {
|
|
102
106
|
color: #2e79be;
|
|
103
|
-
font-size:
|
|
107
|
+
font-size: 16px;
|
|
104
108
|
margin: 0px;
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
div[body] > div {
|
|
108
112
|
display: flex;
|
|
109
|
-
gap:
|
|
113
|
+
gap: var(--spacing-medium, 8px);
|
|
110
114
|
border-radius: 5px;
|
|
111
115
|
}
|
|
112
116
|
|
|
@@ -118,10 +122,10 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
div[drawing] {
|
|
121
|
-
flex:
|
|
125
|
+
flex: 1;
|
|
122
126
|
border: 1px solid #cccccc80;
|
|
123
|
-
background-color:
|
|
124
|
-
padding:
|
|
127
|
+
background-color: var(--md-sys-color-on-primary);
|
|
128
|
+
padding: var(--spacing-large, 12px);
|
|
125
129
|
border-radius: 5px;
|
|
126
130
|
|
|
127
131
|
img {
|
|
@@ -134,52 +138,65 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
div[inspection-container] {
|
|
137
|
-
flex:
|
|
138
|
-
gap:
|
|
141
|
+
flex: 1;
|
|
142
|
+
gap: var(--spacing-medium, 8px);
|
|
139
143
|
|
|
140
144
|
display: flex;
|
|
141
145
|
flex-direction: column;
|
|
142
146
|
|
|
143
147
|
div[inspection] {
|
|
144
148
|
display: grid;
|
|
145
|
-
grid-template-columns:
|
|
146
|
-
margin-top: 5px;
|
|
149
|
+
grid-template-columns: 90px 1fr 1fr 1fr 1fr;
|
|
147
150
|
background: #ebc8321a;
|
|
148
|
-
border-radius:
|
|
149
|
-
padding:
|
|
151
|
+
border-radius: 5px;
|
|
152
|
+
padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
|
|
150
153
|
|
|
151
|
-
& >
|
|
154
|
+
& > div {
|
|
152
155
|
display: flex;
|
|
153
156
|
flex-direction: column;
|
|
154
157
|
align-items: center;
|
|
155
158
|
justify-content: center;
|
|
156
159
|
|
|
157
|
-
|
|
158
|
-
|
|
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;
|
|
159
173
|
}
|
|
160
|
-
|
|
161
|
-
color: #3395f1;
|
|
174
|
+
span[status='request']::before {
|
|
175
|
+
background-color: #3395f1;
|
|
162
176
|
}
|
|
163
|
-
|
|
164
|
-
color: #1bb401;
|
|
177
|
+
span[status='pass']::before {
|
|
178
|
+
background-color: #1bb401;
|
|
165
179
|
}
|
|
166
|
-
|
|
167
|
-
color: #ff4444;
|
|
180
|
+
span[status='fail']::before {
|
|
181
|
+
background-color: #ff4444;
|
|
168
182
|
}
|
|
169
183
|
span[dot] {
|
|
170
184
|
font-size: 1.3em;
|
|
171
185
|
}
|
|
172
186
|
}
|
|
173
|
-
& >
|
|
187
|
+
& > div[name] {
|
|
174
188
|
flex-direction: row;
|
|
175
189
|
text-align: right;
|
|
176
|
-
gap:
|
|
190
|
+
gap: var(--spacing-small, 4px);
|
|
191
|
+
padding-right:var(--spacing-large, 12px);
|
|
177
192
|
border-right: 2px dotted #ccc;
|
|
193
|
+
max-width: 100%;
|
|
194
|
+
line-height:1.3;
|
|
178
195
|
|
|
179
196
|
md-icon {
|
|
180
197
|
width: 40px;
|
|
181
198
|
height: 40px;
|
|
182
|
-
border-radius:
|
|
199
|
+
border-radius: 5px;
|
|
183
200
|
color: #fff;
|
|
184
201
|
background: #f16154;
|
|
185
202
|
}
|
|
@@ -259,35 +276,35 @@ export class BuildingInspectionList extends ScopedElementsMixin(PageView) {
|
|
|
259
276
|
|
|
260
277
|
<div inspection-container>
|
|
261
278
|
<div inspection>
|
|
262
|
-
<
|
|
279
|
+
<div name bold>
|
|
263
280
|
<md-icon slot="icon">fact_check</md-icon>
|
|
264
|
-
|
|
265
|
-
</
|
|
266
|
-
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
<
|
|
270
|
-
|
|
271
|
-
</
|
|
272
|
-
</
|
|
273
|
-
<
|
|
274
|
-
<
|
|
275
|
-
<
|
|
276
|
-
|
|
277
|
-
</
|
|
278
|
-
</
|
|
279
|
-
<
|
|
280
|
-
<
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
</
|
|
284
|
-
</
|
|
285
|
-
<
|
|
286
|
-
<
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
</
|
|
290
|
-
</
|
|
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>
|
|
291
308
|
</div>
|
|
292
309
|
|
|
293
310
|
<ox-event-view
|
|
@@ -27,12 +27,13 @@ class BuildingInspectionDetailHeader extends LitElement {
|
|
|
27
27
|
|
|
28
28
|
div[header] {
|
|
29
29
|
display: flex;
|
|
30
|
-
margin: 0px
|
|
30
|
+
margin: 0px var(--spacing-large, 12px);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
h2 {
|
|
34
34
|
flex: 0.5;
|
|
35
35
|
color: #3f71a0;
|
|
36
|
+
font-size:18px;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
div[button-container] {
|
|
@@ -43,20 +44,23 @@ class BuildingInspectionDetailHeader extends LitElement {
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
md-elevated-button {
|
|
46
|
-
margin:
|
|
47
|
+
margin-left: var(--spacing-small, 4px);
|
|
47
48
|
|
|
48
|
-
--md-elevated-button-container-height:
|
|
49
|
+
--md-elevated-button-container-height: 32px;
|
|
49
50
|
--md-elevated-button-label-text-size: 16px;
|
|
50
51
|
--md-elevated-button-container-color: #0595e5;
|
|
51
52
|
|
|
52
|
-
--md-elevated-button-label-text-color:
|
|
53
|
-
--md-elevated-button-hover-label-text-color:
|
|
54
|
-
--md-elevated-button-pressed-label-text-color:
|
|
55
|
-
--md-elevated-button-focus-label-text-color:
|
|
56
|
-
--md-elevated-button-icon-color:
|
|
57
|
-
--md-elevated-button-hover-icon-color:
|
|
58
|
-
--md-elevated-button-pressed-icon-color:
|
|
59
|
-
--md-elevated-button-focus-icon-color:
|
|
53
|
+
--md-elevated-button-label-text-color: var(--md-sys-color-on-primary);
|
|
54
|
+
--md-elevated-button-hover-label-text-color: var(--md-sys-color-on-primary);
|
|
55
|
+
--md-elevated-button-pressed-label-text-color: var(--md-sys-color-on-primary);
|
|
56
|
+
--md-elevated-button-focus-label-text-color: var(--md-sys-color-on-primary);
|
|
57
|
+
--md-elevated-button-icon-color: var(--md-sys-color-on-primary);
|
|
58
|
+
--md-elevated-button-hover-icon-color: var(--md-sys-color-on-primary);
|
|
59
|
+
--md-elevated-button-pressed-icon-color: var(--md-sys-color-on-primary);
|
|
60
|
+
--md-elevated-button-focus-icon-color: var(--md-sys-color-on-primary);
|
|
61
|
+
|
|
62
|
+
--_with-leading-icon-leading-space: var(--spacing-medium, 8px);
|
|
63
|
+
--_with-leading-icon-trailing-space: var(--spacing-medium, 8px);
|
|
60
64
|
}
|
|
61
65
|
`
|
|
62
66
|
]
|
|
@@ -43,7 +43,7 @@ export class InspectionEventProvider implements EventProvider {
|
|
|
43
43
|
const calendarData = this.getCalendarTemplate(response.data?.buildingInspectionDateSummaryOfLevelAndPeriod)
|
|
44
44
|
|
|
45
45
|
calendar.forEach(({ date }) => {
|
|
46
|
-
const formattedDate = date.
|
|
46
|
+
const formattedDate = date.toLocaleDateString('en-CA') // 'en-CA'는 'YYYY-MM-DD' 형식으로 반환됩니다.
|
|
47
47
|
const template = calendarData[formattedDate]
|
|
48
48
|
|
|
49
49
|
if (!template) return
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js'
|
|
2
|
+
import gql from 'graphql-tag'
|
|
3
|
+
import { client } from '@operato/graphql'
|
|
2
4
|
import { css, html, LitElement } from 'lit'
|
|
3
5
|
import { customElement, property } from 'lit/decorators.js'
|
|
4
6
|
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
|
|
@@ -8,9 +10,10 @@ import {
|
|
|
8
10
|
BUILDING_INSPECTION_STATUS_DISPLAY
|
|
9
11
|
} from '../building-inspection/building-inspection-list'
|
|
10
12
|
import '@operato/input/ox-input-signature.js'
|
|
11
|
-
// import { BuildingComplex } from '@dssp/building-complex'
|
|
12
13
|
import { store } from '@operato/shell'
|
|
13
14
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
15
|
+
import { openPopup } from '@operato/layout'
|
|
16
|
+
import './comment-list-popup'
|
|
14
17
|
|
|
15
18
|
export const enum ChecklistMode {
|
|
16
19
|
VIEWER = 'VIEWER',
|
|
@@ -56,6 +59,7 @@ class ChecklistView extends connect(store)(LitElement) {
|
|
|
56
59
|
th {
|
|
57
60
|
border: 1px #999999 solid;
|
|
58
61
|
padding-inline: 8px;
|
|
62
|
+
vertical-align: middle;
|
|
59
63
|
}
|
|
60
64
|
th {
|
|
61
65
|
background-color: #efefef;
|
|
@@ -65,12 +69,8 @@ class ChecklistView extends connect(store)(LitElement) {
|
|
|
65
69
|
height: 35px;
|
|
66
70
|
&[radio] {
|
|
67
71
|
text-align: center;
|
|
68
|
-
vertical-align: middle;
|
|
69
72
|
width: 55px;
|
|
70
73
|
}
|
|
71
|
-
&[attachment] {
|
|
72
|
-
width: 90px;
|
|
73
|
-
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -117,6 +117,19 @@ class ChecklistView extends connect(store)(LitElement) {
|
|
|
117
117
|
text-align: center;
|
|
118
118
|
word-break: keep-all;
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
&[attachment] {
|
|
122
|
+
width: 90px;
|
|
123
|
+
text-align: center;
|
|
124
|
+
}
|
|
125
|
+
&[comment] {
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
text-align: center;
|
|
128
|
+
|
|
129
|
+
* {
|
|
130
|
+
vertical-align: middle;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
120
133
|
}
|
|
121
134
|
}
|
|
122
135
|
|
|
@@ -331,8 +344,11 @@ class ChecklistView extends connect(store)(LitElement) {
|
|
|
331
344
|
@change=${this._onChangeConfirmStatus}
|
|
332
345
|
></md-radio>
|
|
333
346
|
</td>
|
|
334
|
-
<td attachment></td>
|
|
335
|
-
<td
|
|
347
|
+
<td attachment><md-icon slot="icon">attach_file</md-icon></td>
|
|
348
|
+
<td comment @click=${() => this._onClickComment(item.id)}>
|
|
349
|
+
<md-icon slot="icon">chat</md-icon>
|
|
350
|
+
<span>${item?.checklistItemCommentCount || ''}</span>
|
|
351
|
+
</td>
|
|
336
352
|
</tr>`
|
|
337
353
|
})}
|
|
338
354
|
</tbody>
|
|
@@ -486,4 +502,44 @@ class ChecklistView extends connect(store)(LitElement) {
|
|
|
486
502
|
}
|
|
487
503
|
})
|
|
488
504
|
}
|
|
505
|
+
|
|
506
|
+
private _onClickComment(checklistItemId: string) {
|
|
507
|
+
openPopup(
|
|
508
|
+
html`
|
|
509
|
+
<comment-list-popup
|
|
510
|
+
.checklistItemId=${checklistItemId}
|
|
511
|
+
@change-comment=${this._refreshComment.bind(this)}
|
|
512
|
+
></comment-list-popup>
|
|
513
|
+
`,
|
|
514
|
+
{
|
|
515
|
+
backdrop: true,
|
|
516
|
+
size: 'medium',
|
|
517
|
+
title: '조치사항'
|
|
518
|
+
}
|
|
519
|
+
)
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
private async _refreshComment(e) {
|
|
523
|
+
const { checklistItemId } = e.detail
|
|
524
|
+
const response = await client.query({
|
|
525
|
+
query: gql`
|
|
526
|
+
query ChecklistItem($checklistItemId: String!) {
|
|
527
|
+
checklistItem(id: $checklistItemId) {
|
|
528
|
+
id
|
|
529
|
+
checklistItemCommentCount
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
`,
|
|
533
|
+
variables: {
|
|
534
|
+
checklistItemId: checklistItemId
|
|
535
|
+
}
|
|
536
|
+
})
|
|
537
|
+
|
|
538
|
+
const checklistItemCommentCount = response.data?.checklistItem?.checklistItemCommentCount || []
|
|
539
|
+
this.checklist.checklistItems = this.checklist.checklistItems.map(item => {
|
|
540
|
+
return item.id != checklistItemId ? item : { ...item, checklistItemCommentCount: checklistItemCommentCount }
|
|
541
|
+
})
|
|
542
|
+
|
|
543
|
+
this.requestUpdate()
|
|
544
|
+
}
|
|
489
545
|
}
|