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

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 (76) hide show
  1. package/dist-client/graphql/building-inspection.js +6 -0
  2. package/dist-client/graphql/building-inspection.js.map +1 -1
  3. package/dist-client/pages/action-plan/action-plan-importer.d.ts +1 -1
  4. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -1
  5. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +1 -1
  6. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +1 -1
  7. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +25 -11
  8. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
  9. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -1
  10. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +5 -0
  11. package/dist-client/pages/building-inspection/building-inspection-list.js +64 -8
  12. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  13. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +17 -0
  14. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +354 -0
  15. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  16. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +1 -1
  17. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +1 -1
  18. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +17 -21
  19. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -1
  20. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +4 -1
  21. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +45 -19
  22. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -1
  23. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +1 -1
  24. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +2 -2
  25. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +1 -1
  26. package/dist-client/pages/checklist/checklist-view.js +28 -3
  27. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  28. package/dist-client/pages/checklist/inspection-info-popup.d.ts +1 -1
  29. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +1 -1
  30. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +1 -1
  31. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +1 -1
  32. package/dist-client/pages/issue/issue-importer.d.ts +1 -1
  33. package/dist-client/pages/issue/issue-list-page.d.ts +1 -1
  34. package/dist-client/pages/project-report/project-report-importer.d.ts +1 -1
  35. package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -1
  36. package/dist-client/pages/supervisor/supervisor-importer.d.ts +1 -1
  37. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -1
  38. package/dist-client/route.d.ts +1 -1
  39. package/dist-client/tsconfig.tsbuildinfo +1 -1
  40. package/dist-server/service/building-inspection/building-inspection-mutation.js +7 -2
  41. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
  42. package/dist-server/service/building-inspection/building-inspection-query.js +7 -1
  43. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  44. package/dist-server/service/building-inspection/building-inspection-type.d.ts +2 -0
  45. package/dist-server/service/building-inspection/building-inspection-type.js +8 -0
  46. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  47. package/dist-server/service/building-inspection/index.d.ts +1 -1
  48. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +8 -0
  49. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +98 -0
  50. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  51. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +12 -0
  52. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +85 -0
  53. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  54. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +12 -0
  55. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +47 -0
  56. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  57. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +25 -0
  58. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +98 -0
  59. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  60. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  61. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  62. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  63. package/dist-server/service/checklist/checklist.d.ts +4 -1
  64. package/dist-server/service/checklist/checklist.js +15 -4
  65. package/dist-server/service/checklist/checklist.js.map +1 -1
  66. package/dist-server/service/index.d.ts +2 -1
  67. package/dist-server/service/index.js +6 -2
  68. package/dist-server/service/index.js.map +1 -1
  69. package/dist-server/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +4 -3
  71. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.d.ts +0 -21
  72. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js +0 -327
  73. package/dist-client/pages/building-inspection/component/inspection-document/name-list-upload-popup.js.map +0 -1
  74. package/dist-client/pages/building-inspection/component/photo-album-popup.d.ts +0 -41
  75. package/dist-client/pages/building-inspection/component/photo-album-popup.js +0 -406
  76. package/dist-client/pages/building-inspection/component/photo-album-popup.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ import '@material/web/button/elevated-button.js';
2
+ import '@material/web/icon/icon.js';
3
+ import { LitElement } from 'lit';
4
+ export declare class DailyWorklogPopup extends LitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ date?: string;
7
+ project?: any;
8
+ private dailyWorklog;
9
+ render(): import("lit").TemplateResult<1>;
10
+ connectedCallback(): void;
11
+ private _fetch;
12
+ private _formatSelectedDate;
13
+ private _updateWorklogs;
14
+ private _addRow;
15
+ private _remove;
16
+ private _close;
17
+ }
@@ -0,0 +1,354 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/button/elevated-button.js';
3
+ import '@material/web/icon/icon.js';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, state, property } from 'lit/decorators.js';
6
+ import { ScrollbarStyles } from '@operato/styles';
7
+ import gql from 'graphql-tag';
8
+ import { client } from '@operato/graphql';
9
+ import moment from 'moment-timezone';
10
+ let DailyWorklogPopup = class DailyWorklogPopup extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.dailyWorklog = {};
14
+ this._addRow = () => {
15
+ this.dailyWorklog.worklogs = [
16
+ ...this.dailyWorklog.worklogs,
17
+ { constructionType: '', supervisoryTitle: '', supervisorContent: '' }
18
+ ];
19
+ };
20
+ }
21
+ render() {
22
+ var _a, _b, _c;
23
+ return html `
24
+ <div class="container">
25
+ <div class="sheet">
26
+ <div class="title">공사감리일지</div>
27
+ <div class="body">
28
+ <table class="header-table">
29
+ <tr>
30
+ <th>문서번호</th>
31
+ <td colspan="3">${((_a = this.dailyWorklog) === null || _a === void 0 ? void 0 : _a.documentNo) || ''}</td>
32
+ </tr>
33
+ <tr>
34
+ <th>공종별 감리 책임자</th>
35
+ <td></td>
36
+ <th>총괄 감리 책임자</th>
37
+ <td></td>
38
+ </tr>
39
+ <tr>
40
+ <th>공사명</th>
41
+ <td colspan="3">
42
+ <span class="construction-name">${((_b = this.project) === null || _b === void 0 ? void 0 : _b.name) || ''}</span>
43
+ <span class="date-display">${this.dailyWorklog.date || this._formatSelectedDate()}</span>
44
+ </td>
45
+ </tr>
46
+ </table>
47
+
48
+ <div class="work-section">
49
+ <div class="left-title">작업사항</div>
50
+ <table class="work-table">
51
+ <thead>
52
+ <tr>
53
+ <th class="col-job">공종</th>
54
+ <th>감리확인사항</th>
55
+ <th>감리내용</th>
56
+ <th style="width:60px">삭제</th>
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ ${(_c = this.dailyWorklog.worklogs) === null || _c === void 0 ? void 0 : _c.map((r, i) => html `
61
+ <tr>
62
+ <td>
63
+ <input
64
+ type="text"
65
+ .value=${r.constructionType}
66
+ @input=${(e) => this._updateWorklogs(i, 'constructionType', e.target.value)}
67
+ />
68
+ </td>
69
+ <td>
70
+ <input
71
+ type="text"
72
+ .value=${r.supervisoryTitle}
73
+ @input=${(e) => this._updateWorklogs(i, 'supervisoryTitle', e.target.value)}
74
+ />
75
+ </td>
76
+ <td>
77
+ <input
78
+ type="text"
79
+ .value=${r.supervisorContent}
80
+ @input=${(e) => this._updateWorklogs(i, 'supervisorContent', e.target.value)}
81
+ />
82
+ </td>
83
+ <td style="text-align:center">
84
+ <md-icon @click=${() => this._remove(i)} style="cursor:pointer">delete</md-icon>
85
+ </td>
86
+ </tr>
87
+ `)}
88
+ <tr>
89
+ <td colspan="4" style="text-align:center; background:#fafafa">
90
+ <md-elevated-button @click=${this._addRow}><md-icon slot="icon">add</md-icon>행 추가</md-elevated-button>
91
+ </td>
92
+ </tr>
93
+ </tbody>
94
+ </table>
95
+ </div>
96
+
97
+ <div>
98
+ <div class="section-title">특기사항</div>
99
+ <textarea
100
+ class="small"
101
+ placeholder="특기사항을 입력하세요."
102
+ .value=${this.dailyWorklog.memo || ''}
103
+ @input=${(e) => (this.dailyWorklog.memo = e.target.value)}
104
+ ></textarea>
105
+ </div>
106
+
107
+ <div>
108
+ <div class="section-title">지적사항 및 처리결과</div>
109
+ <textarea
110
+ class="small"
111
+ placeholder="지적사항 및 처리결과를 입력하세요."
112
+ .value=${this.dailyWorklog.directiveMemo || ''}
113
+ @input=${(e) => (this.dailyWorklog.directiveMemo = e.target.value)}
114
+ ></textarea>
115
+ </div>
116
+ </div>
117
+ </div>
118
+
119
+ <div class="footer">
120
+ <md-elevated-button @click=${this._close}><md-icon slot="icon">close</md-icon>닫기</md-elevated-button>
121
+ </div>
122
+ </div>
123
+ `;
124
+ }
125
+ connectedCallback() {
126
+ super.connectedCallback();
127
+ this._fetch();
128
+ }
129
+ async _fetch() {
130
+ var _a, _b;
131
+ if (!((_a = this.project) === null || _a === void 0 ? void 0 : _a.id) || !this.date)
132
+ return;
133
+ const response = await client.query({
134
+ query: gql `
135
+ query ($projectId: String!, $date: String!) {
136
+ buildingInspectionDailyWorklogByProjectIdAndDate(projectId: $projectId, date: $date) {
137
+ id
138
+ date
139
+ documentNo
140
+ worklogs
141
+ memo
142
+ directiveMemo
143
+ }
144
+ }
145
+ `,
146
+ variables: { projectId: this.project.id, date: this.date }
147
+ });
148
+ const data = (_b = response.data) === null || _b === void 0 ? void 0 : _b.buildingInspectionDailyWorklogByProjectIdAndDate;
149
+ if (!data)
150
+ return;
151
+ this.dailyWorklog = data;
152
+ }
153
+ _formatSelectedDate() {
154
+ return moment.tz(this.date, 'Asia/Seoul').locale('ko').format('YYYY-MM-DD (dddd)');
155
+ }
156
+ _updateWorklogs(index, field, value) {
157
+ const newWorklogs = [...this.dailyWorklog.worklogs];
158
+ newWorklogs[index] = Object.assign(Object.assign({}, newWorklogs[index]), { [field]: value });
159
+ this.dailyWorklog.worklogs = newWorklogs;
160
+ }
161
+ _remove(index) {
162
+ const newWorklogs = [...this.dailyWorklog.worklogs];
163
+ newWorklogs.splice(index, 1);
164
+ this.dailyWorklog.worklogs = newWorklogs;
165
+ }
166
+ _close() {
167
+ this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }));
168
+ history.back();
169
+ }
170
+ };
171
+ DailyWorklogPopup.styles = [
172
+ ScrollbarStyles,
173
+ css `
174
+ :host {
175
+ display: block;
176
+ background: #fff;
177
+ width: 100%;
178
+ height: 100%;
179
+ overflow: hidden;
180
+ }
181
+
182
+ .container {
183
+ display: flex;
184
+ flex-direction: column;
185
+ gap: 12px;
186
+ padding: 20px;
187
+ height: 100%;
188
+ box-sizing: border-box;
189
+ }
190
+
191
+ .sheet {
192
+ flex: 1;
193
+ overflow: auto;
194
+ background: #fff;
195
+ border: 2px solid #333;
196
+ }
197
+
198
+ .title {
199
+ text-align: center;
200
+ padding: 16px 12px;
201
+ border-bottom: 1px solid #333;
202
+ font-weight: 800;
203
+ font-size: 18px;
204
+ letter-spacing: 1px;
205
+ }
206
+
207
+ .body {
208
+ padding: 16px;
209
+ display: flex;
210
+ flex-direction: column;
211
+ gap: 14px;
212
+ }
213
+
214
+ .header-table,
215
+ .work-table {
216
+ width: 100%;
217
+ border-collapse: collapse;
218
+ }
219
+
220
+ .header-table th,
221
+ .header-table td {
222
+ border: 1px solid #333;
223
+ padding: 8px;
224
+ font-size: 14px;
225
+ text-align: left;
226
+ }
227
+
228
+ .header-table th {
229
+ width: 140px;
230
+ background-color: #f5f5f5;
231
+ white-space: nowrap;
232
+ }
233
+
234
+ .inline {
235
+ display: grid;
236
+ grid-template-columns: 1fr 1fr;
237
+ gap: 8px;
238
+ }
239
+
240
+ .inline > * {
241
+ width: 100%;
242
+ }
243
+
244
+ .inline.readonly {
245
+ align-items: center;
246
+ grid-template-columns: auto;
247
+ }
248
+
249
+ .field {
250
+ display: flex;
251
+ flex-direction: column;
252
+ gap: 4px;
253
+ }
254
+
255
+ .field label {
256
+ font-size: 12px;
257
+ font-weight: 600;
258
+ color: #333;
259
+ }
260
+
261
+ .work-table th,
262
+ .work-table td {
263
+ border: 1px solid #333;
264
+ padding: 8px;
265
+ vertical-align: top;
266
+ }
267
+
268
+ .work-table thead th {
269
+ background-color: #f5f5f5;
270
+ text-align: center;
271
+ }
272
+
273
+ .work-table .col-job {
274
+ width: 140px;
275
+ }
276
+
277
+ .work-section {
278
+ display: grid;
279
+ grid-template-columns: 40px 1fr;
280
+ gap: 0;
281
+ align-items: stretch;
282
+ }
283
+
284
+ .left-title {
285
+ display: flex;
286
+ align-items: center;
287
+ justify-content: center;
288
+ border: 1px solid #333;
289
+ border-right: none;
290
+ background-color: #f5f5f5;
291
+ writing-mode: vertical-rl;
292
+ text-orientation: upright;
293
+ font-weight: 600;
294
+ letter-spacing: 2px;
295
+ }
296
+
297
+ .construction-name {
298
+ width: 50% !important;
299
+ }
300
+
301
+ .date-display {
302
+ font-size: 15px;
303
+ font-weight: 700;
304
+ margin-left: 15px;
305
+ }
306
+
307
+ input[type='text'],
308
+ input[type='date'],
309
+ textarea {
310
+ width: 100%;
311
+ box-sizing: border-box;
312
+ border: 1px solid #ddd;
313
+ padding: 8px;
314
+ font-size: 14px;
315
+ border-radius: 4px;
316
+ background: #fff;
317
+ }
318
+
319
+ textarea.small {
320
+ min-height: 80px;
321
+ resize: vertical;
322
+ }
323
+
324
+ .section-title {
325
+ font-weight: bold;
326
+ margin-top: 4px;
327
+ margin-bottom: 4px;
328
+ }
329
+
330
+ .footer {
331
+ display: flex;
332
+ justify-content: center;
333
+ padding: 12px 0;
334
+ border-top: 1px solid #ddd;
335
+ }
336
+ `
337
+ ];
338
+ __decorate([
339
+ property({ type: String }),
340
+ __metadata("design:type", String)
341
+ ], DailyWorklogPopup.prototype, "date", void 0);
342
+ __decorate([
343
+ property({ type: Object }),
344
+ __metadata("design:type", Object)
345
+ ], DailyWorklogPopup.prototype, "project", void 0);
346
+ __decorate([
347
+ state(),
348
+ __metadata("design:type", Object)
349
+ ], DailyWorklogPopup.prototype, "dailyWorklog", void 0);
350
+ DailyWorklogPopup = __decorate([
351
+ customElement('daily-worklog-popup')
352
+ ], DailyWorklogPopup);
353
+ export { DailyWorklogPopup };
354
+ //# sourceMappingURL=daily-worklog-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-worklog-popup.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection/component/daily-worklog-popup.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmKF;CACF,AAtKY,CAsKZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAc;AAExB;IAAhB,KAAK,EAAE;;uDAA+B;AA5K5B,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAiV7B","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, state, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\nimport moment from 'moment-timezone'\n\n@customElement('daily-worklog-popup')\nexport class DailyWorklogPopup extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n background: #fff;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 20px;\n height: 100%;\n box-sizing: border-box;\n }\n\n .sheet {\n flex: 1;\n overflow: auto;\n background: #fff;\n border: 2px solid #333;\n }\n\n .title {\n text-align: center;\n padding: 16px 12px;\n border-bottom: 1px solid #333;\n font-weight: 800;\n font-size: 18px;\n letter-spacing: 1px;\n }\n\n .body {\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 14px;\n }\n\n .header-table,\n .work-table {\n width: 100%;\n border-collapse: collapse;\n }\n\n .header-table th,\n .header-table td {\n border: 1px solid #333;\n padding: 8px;\n font-size: 14px;\n text-align: left;\n }\n\n .header-table th {\n width: 140px;\n background-color: #f5f5f5;\n white-space: nowrap;\n }\n\n .inline {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n }\n\n .inline > * {\n width: 100%;\n }\n\n .inline.readonly {\n align-items: center;\n grid-template-columns: auto;\n }\n\n .field {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .field label {\n font-size: 12px;\n font-weight: 600;\n color: #333;\n }\n\n .work-table th,\n .work-table td {\n border: 1px solid #333;\n padding: 8px;\n vertical-align: top;\n }\n\n .work-table thead th {\n background-color: #f5f5f5;\n text-align: center;\n }\n\n .work-table .col-job {\n width: 140px;\n }\n\n .work-section {\n display: grid;\n grid-template-columns: 40px 1fr;\n gap: 0;\n align-items: stretch;\n }\n\n .left-title {\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid #333;\n border-right: none;\n background-color: #f5f5f5;\n writing-mode: vertical-rl;\n text-orientation: upright;\n font-weight: 600;\n letter-spacing: 2px;\n }\n\n .construction-name {\n width: 50% !important;\n }\n\n .date-display {\n font-size: 15px;\n font-weight: 700;\n margin-left: 15px;\n }\n\n input[type='text'],\n input[type='date'],\n textarea {\n width: 100%;\n box-sizing: border-box;\n border: 1px solid #ddd;\n padding: 8px;\n font-size: 14px;\n border-radius: 4px;\n background: #fff;\n }\n\n textarea.small {\n min-height: 80px;\n resize: vertical;\n }\n\n .section-title {\n font-weight: bold;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n\n .footer {\n display: flex;\n justify-content: center;\n padding: 12px 0;\n border-top: 1px solid #ddd;\n }\n `\n ]\n\n @property({ type: String }) date?: string\n @property({ type: Object }) project?: any\n\n @state() private dailyWorklog: any = {}\n\n render() {\n return html`\n <div class=\"container\">\n <div class=\"sheet\">\n <div class=\"title\">공사감리일지</div>\n <div class=\"body\">\n <table class=\"header-table\">\n <tr>\n <th>문서번호</th>\n <td colspan=\"3\">${this.dailyWorklog?.documentNo || ''}</td>\n </tr>\n <tr>\n <th>공종별 감리 책임자</th>\n <td></td>\n <th>총괄 감리 책임자</th>\n <td></td>\n </tr>\n <tr>\n <th>공사명</th>\n <td colspan=\"3\">\n <span class=\"construction-name\">${this.project?.name || ''}</span>\n <span class=\"date-display\">${this.dailyWorklog.date || this._formatSelectedDate()}</span>\n </td>\n </tr>\n </table>\n\n <div class=\"work-section\">\n <div class=\"left-title\">작업사항</div>\n <table class=\"work-table\">\n <thead>\n <tr>\n <th class=\"col-job\">공종</th>\n <th>감리확인사항</th>\n <th>감리내용</th>\n <th style=\"width:60px\">삭제</th>\n </tr>\n </thead>\n <tbody>\n ${this.dailyWorklog.worklogs?.map(\n (r, i) => html`\n <tr>\n <td>\n <input\n type=\"text\"\n .value=${r.constructionType}\n @input=${(e: any) => this._updateWorklogs(i, 'constructionType', e.target.value)}\n />\n </td>\n <td>\n <input\n type=\"text\"\n .value=${r.supervisoryTitle}\n @input=${(e: any) => this._updateWorklogs(i, 'supervisoryTitle', e.target.value)}\n />\n </td>\n <td>\n <input\n type=\"text\"\n .value=${r.supervisorContent}\n @input=${(e: any) => this._updateWorklogs(i, 'supervisorContent', e.target.value)}\n />\n </td>\n <td style=\"text-align:center\">\n <md-icon @click=${() => this._remove(i)} style=\"cursor:pointer\">delete</md-icon>\n </td>\n </tr>\n `\n )}\n <tr>\n <td colspan=\"4\" style=\"text-align:center; background:#fafafa\">\n <md-elevated-button @click=${this._addRow}><md-icon slot=\"icon\">add</md-icon>행 추가</md-elevated-button>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div>\n <div class=\"section-title\">특기사항</div>\n <textarea\n class=\"small\"\n placeholder=\"특기사항을 입력하세요.\"\n .value=${this.dailyWorklog.memo || ''}\n @input=${(e: any) => (this.dailyWorklog.memo = e.target.value)}\n ></textarea>\n </div>\n\n <div>\n <div class=\"section-title\">지적사항 및 처리결과</div>\n <textarea\n class=\"small\"\n placeholder=\"지적사항 및 처리결과를 입력하세요.\"\n .value=${this.dailyWorklog.directiveMemo || ''}\n @input=${(e: any) => (this.dailyWorklog.directiveMemo = e.target.value)}\n ></textarea>\n </div>\n </div>\n </div>\n\n <div class=\"footer\">\n <md-elevated-button @click=${this._close}><md-icon slot=\"icon\">close</md-icon>닫기</md-elevated-button>\n </div>\n </div>\n `\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n this._fetch()\n }\n\n private async _fetch() {\n if (!this.project?.id || !this.date) return\n\n const response = await client.query({\n query: gql`\n query ($projectId: String!, $date: String!) {\n buildingInspectionDailyWorklogByProjectIdAndDate(projectId: $projectId, date: $date) {\n id\n date\n documentNo\n worklogs\n memo\n directiveMemo\n }\n }\n `,\n variables: { projectId: this.project.id, date: this.date }\n })\n\n const data = response.data?.buildingInspectionDailyWorklogByProjectIdAndDate\n if (!data) return\n\n this.dailyWorklog = data\n }\n\n private _formatSelectedDate(): string {\n return moment.tz(this.date, 'Asia/Seoul').locale('ko').format('YYYY-MM-DD (dddd)')\n }\n\n private _updateWorklogs(index: number, field: string, value: string) {\n const newWorklogs = [...this.dailyWorklog.worklogs]\n newWorklogs[index] = { ...newWorklogs[index], [field]: value }\n this.dailyWorklog.worklogs = newWorklogs\n }\n\n private _addRow = () => {\n this.dailyWorklog.worklogs = [\n ...this.dailyWorklog.worklogs,\n { constructionType: '', supervisoryTitle: '', supervisorContent: '' }\n ]\n }\n\n private _remove(index: number) {\n const newWorklogs = [...this.dailyWorklog.worklogs]\n newWorklogs.splice(index, 1)\n this.dailyWorklog.worklogs = newWorklogs\n }\n\n private _close() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
@@ -5,7 +5,7 @@ export declare class ImagePreviewPopup extends LitElement {
5
5
  static styles: import("lit").CSSResult[];
6
6
  images: any[];
7
7
  currentIndex: number;
8
- render(): import("lit-html").TemplateResult<1>;
8
+ render(): import("lit").TemplateResult<1>;
9
9
  private _previousImage;
10
10
  private _nextImage;
11
11
  private _close;
@@ -12,7 +12,7 @@ export declare class InspectionRequestDocument extends LitElement {
12
12
  checklist: any;
13
13
  buildingInspection: any;
14
14
  mode: InspectionMode;
15
- render(): import("lit-html").TemplateResult<1>;
15
+ render(): import("lit").TemplateResult<1>;
16
16
  private _formatDate;
17
17
  private _onInspectionMemoChange;
18
18
  private _onNameListUpload;
@@ -20,9 +20,9 @@ let InspectionRequestDocument = class InspectionRequestDocument extends LitEleme
20
20
  }
21
21
  render() {
22
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
23
- const today = this._formatDate(new Date());
23
+ const headerDate = this._formatDate(new Date(((_a = this.checklist) === null || _a === void 0 ? void 0 : _a.inspectionRequestUpdatedAt) || Date.now()));
24
24
  const requestDate = this._formatDate(new Date(this.buildingInspection.requestDate));
25
- const attachmentCount = (_c = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) === null || _b === void 0 ? void 0 : _b.checklistItems) === null || _c === void 0 ? void 0 : _c.reduce((acc, item) => {
25
+ const attachmentCount = (_d = (_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.checklist) === null || _c === void 0 ? void 0 : _c.checklistItems) === null || _d === void 0 ? void 0 : _d.reduce((acc, item) => {
26
26
  return acc + item.checklistItemAttachmentCount;
27
27
  }, 0);
28
28
  return html `
@@ -32,17 +32,17 @@ let InspectionRequestDocument = class InspectionRequestDocument extends LitEleme
32
32
  </div>
33
33
 
34
34
  <div class="document-body">
35
- <div class="date-section">${today}</div>
35
+ <div class="date-section">${headerDate}</div>
36
36
 
37
37
  <div class="request-info">
38
38
  <div class="recipient-section">
39
39
  <div class="recipient-item">
40
40
  <span class="recipient-label">문서 번호:</span>
41
- <span>${((_d = this.checklist) === null || _d === void 0 ? void 0 : _d.inspectionRequestDocumentNo) || ''}</span>
41
+ <span>${((_e = this.checklist) === null || _e === void 0 ? void 0 : _e.inspectionRequestDocumentNo) || ''}</span>
42
42
  </div>
43
43
  <div class="recipient-item">
44
44
  <span class="recipient-label">수신:</span>
45
- <span>${(_h = (_g = (_f = (_e = this.buildingInspection) === null || _e === void 0 ? void 0 : _e.buildingLevel) === null || _f === void 0 ? void 0 : _f.building) === null || _g === void 0 ? void 0 : _g.buildingComplex) === null || _h === void 0 ? void 0 : _h.supervisoryCompany}</span>
45
+ <span>${(_j = (_h = (_g = (_f = this.buildingInspection) === null || _f === void 0 ? void 0 : _f.buildingLevel) === null || _g === void 0 ? void 0 : _g.building) === null || _h === void 0 ? void 0 : _h.buildingComplex) === null || _j === void 0 ? void 0 : _j.supervisoryCompany}</span>
46
46
  </div>
47
47
  </div>
48
48
 
@@ -51,11 +51,11 @@ let InspectionRequestDocument = class InspectionRequestDocument extends LitEleme
51
51
  <table class="request-table">
52
52
  <tr>
53
53
  <th>위치 및 공종</th>
54
- <td>${(((_j = this.checklist) === null || _j === void 0 ? void 0 : _j.location) || '') + ' - ' + (((_k = this.checklist) === null || _k === void 0 ? void 0 : _k.constructionType) || '')}</td>
54
+ <td>${(((_k = this.checklist) === null || _k === void 0 ? void 0 : _k.location) || '') + ' - ' + (((_l = this.checklist) === null || _l === void 0 ? void 0 : _l.constructionType) || '')}</td>
55
55
  </tr>
56
56
  <tr>
57
57
  <th>검측 부위</th>
58
- <td>${((_m = (_l = this.checklist) === null || _l === void 0 ? void 0 : _l.inspectionParts) === null || _m === void 0 ? void 0 : _m.join(', ')) || ''}</td>
58
+ <td>${((_o = (_m = this.checklist) === null || _m === void 0 ? void 0 : _m.inspectionParts) === null || _o === void 0 ? void 0 : _o.join(', ')) || ''}</td>
59
59
  </tr>
60
60
  <tr>
61
61
  <th>검측 요구일시</th>
@@ -64,18 +64,14 @@ let InspectionRequestDocument = class InspectionRequestDocument extends LitEleme
64
64
  <tr>
65
65
  <th>검측 사항</th>
66
66
  <td>
67
- ${this.mode === InspectionMode.EDIT
68
- ? html `
69
- <input
70
- type="text"
71
- name="memo"
72
- class="inspection-memo-input"
73
- .value=${((_o = this.buildingInspection) === null || _o === void 0 ? void 0 : _o.memo) || ''}
74
- @input=${this._onInspectionMemoChange}
75
- placeholder="검측사항을 입력하세요."
76
- />
77
- `
78
- : html ` <div class="inspection-memo-text">${(_p = this.buildingInspection) === null || _p === void 0 ? void 0 : _p.memo}</div> `}
67
+ <input
68
+ type="text"
69
+ class="inspection-memo-input"
70
+ .value=${((_p = this.checklist) === null || _p === void 0 ? void 0 : _p.inspectionRequestMemo) || ''}
71
+ @input=${this._onInspectionMemoChange}
72
+ ?disabled=${this.mode === InspectionMode.VIEW}
73
+ placeholder="검측사항을 입력하세요."
74
+ />
79
75
  </td>
80
76
  </tr>
81
77
  </table>
@@ -141,10 +137,10 @@ let InspectionRequestDocument = class InspectionRequestDocument extends LitEleme
141
137
  }
142
138
  _onInspectionMemoChange(e) {
143
139
  const target = e.target;
144
- this.buildingInspection = Object.assign(Object.assign({}, this.buildingInspection), { memo: target.value });
140
+ this.checklist = Object.assign(Object.assign({}, this.checklist), { inspectionRequestMemo: target.value });
145
141
  // 부모 컴포넌트에 변경사항 전달
146
142
  this.dispatchEvent(new CustomEvent('inspection-memo-change', {
147
- detail: { memo: target.value },
143
+ detail: { inspectionRequestMemo: target.value },
148
144
  bubbles: true
149
145
  }));
150
146
  }
@@ -1 +1 @@
1
- {"version":3,"file":"inspection-request-document.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-request-document.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAIjD,OAAO,qBAAqB,CAAA;AAE5B,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAGM,IAA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/web/icon/icon.js'\nimport '@material/web/button/outlined-button.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { openPopup } from '@operato/layout'\nimport { client } from '@operato/graphql'\nimport gql from 'graphql-tag'\nimport './photo-album-popup'\n\nexport enum InspectionMode {\n EDIT = 'EDIT',\n VIEW = 'VIEW'\n}\n\n@customElement('inspection-request-document')\nexport class InspectionRequestDocument extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .request-info {\n margin-bottom: 20px;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .inspection-items {\n margin: 20px 0;\n }\n\n .inspection-items textarea {\n width: 100%;\n min-height: 100px;\n border: 1px solid #ddd;\n padding: 10px;\n font-family: inherit;\n resize: vertical;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .attachment-item.upload {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .attachment-item.upload md-outlined-button {\n --md-outlined-button-container-height: 24px;\n --md-outlined-button-label-text-size: 12px;\n --md-outlined-button-outline-color: #666;\n --md-outlined-button-label-text-color: #666;\n }\n\n .attachment-item.upload span {\n color: #666;\n font-size: 12px;\n }\n\n .attachment-icon {\n display: none;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .form-row {\n display: flex;\n align-items: flex-start;\n margin-bottom: 10px;\n }\n\n .form-label {\n font-weight: bold;\n width: 100px;\n margin-right: 10px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .inspection-memo-input {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .inspection-memo-text {\n padding: 10px;\n font-size: 15px;\n color: #495057;\n border: 1px solid #e9ecef;\n border-radius: 5px;\n min-height: 20px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: String }) mode: InspectionMode = InspectionMode.VIEW\n\n render() {\n const today = this._formatDate(new Date())\n const requestDate = this._formatDate(new Date(this.buildingInspection.requestDate))\n const attachmentCount = this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0)\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측요청서</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${today}</div>\n\n <div class=\"request-info\">\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionRequestDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.supervisoryCompany}</span>\n </div>\n </div>\n\n <div style=\"margin: 15px 0;\">다음과 같은 세부공종에 대하여 검측요청 하오니 검사 후 승인하여 주시 기 바랍니다.</div>\n\n <table class=\"request-table\">\n <tr>\n <th>위치 및 공종</th>\n <td>${(this.checklist?.location || '') + ' - ' + (this.checklist?.constructionType || '')}</td>\n </tr>\n <tr>\n <th>검측 부위</th>\n <td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>\n </tr>\n <tr>\n <th>검측 요구일시</th>\n <td>${requestDate}</td>\n </tr>\n <tr>\n <th>검측 사항</th>\n <td>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <input\n type=\"text\"\n name=\"memo\"\n class=\"inspection-memo-input\"\n .value=${this.buildingInspection?.memo || ''}\n @input=${this._onInspectionMemoChange}\n placeholder=\"검측사항을 입력하세요.\"\n />\n `\n : html` <div class=\"inspection-memo-text\">${this.buildingInspection?.memo}</div> `}\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"attachment-item upload\">\n 실명부\n <md-outlined-button @click=${this._onNameListUpload.bind(this)}>\n ${this.checklist?.nameListAttachment ? '다시 업로드' : '업로드'}\n </md-outlined-button>\n ${this.checklist?.nameListAttachment ? html`<span>(업로드 완료)</span>` : ''}\n </div>\n `\n : this.checklist?.nameListAttachment\n ? html`<div class=\"attachment-item\">실명부</div>`\n : ''}\n ${attachmentCount > 0 ? html`<div class=\"attachment-item\">첨부 사진 ${attachmentCount}개</div>` : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 시공 관리자</div>\n <div class=\"signature-name\">${this.checklist?.taskConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 시공 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n : ''}\n `\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _onInspectionMemoChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.buildingInspection = { ...this.buildingInspection, memo: target.value }\n\n // 부모 컴포넌트에 변경사항 전달\n this.dispatchEvent(\n new CustomEvent('inspection-memo-change', {\n detail: { memo: target.value },\n bubbles: true\n })\n )\n }\n\n // 실명부 업로드\n private _onNameListUpload() {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = '.pdf,.doc,.docx,.jpg,.jpeg,.png'\n input.onchange = (e: any) => {\n const file = e.target.files[0]\n if (file) {\n // checklist에 파일과 업로드 플래그 저장\n this.checklist = {\n ...this.checklist,\n nameListAttachment: file,\n isNameListAttachmentUploaded: true\n }\n\n // 부모 컴포넌트에 변경사항 알림\n this.dispatchEvent(new CustomEvent('name-list-file-selected', { detail: { file } }))\n this.requestUpdate()\n }\n }\n input.click()\n }\n\n // 확인 버튼\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
1
+ {"version":3,"file":"inspection-request-document.js","sourceRoot":"","sources":["../../../../../client/pages/building-inspection/component/inspection-document/inspection-request-document.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,qBAAqB,CAAA;AAE5B,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAGM,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAwPuB,cAAS,GAAQ,EAAE,CAAA;QACnB,uBAAkB,GAAQ,EAAE,CA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I,WAAW,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;gBACpF,IAAI,CAAC,aAAa,EAAE,CAAA;YACtB,CAAC;QACH,CAAC,CAAA;QACD,KAAK,CAAC,KAAK,EAAE,CAAA;IACf,CAAC;IAED,QAAQ;IACA,UAAU;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QACrE,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AA1ZM,gCAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkPF;CACF,AArPY,CAqPZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAA2C;AA1P3D,yBAAyB;IADrC,aAAa,CAAC,6BAA6B,CAAC;GAChC,yBAAyB,CA4ZrC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/outlined-button.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport './photo-album-popup'\n\nexport enum InspectionMode {\n EDIT = 'EDIT',\n VIEW = 'VIEW'\n}\n\n@customElement('inspection-request-document')\nexport class InspectionRequestDocument extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n padding: 20px;\n font-family: 'Noto Sans KR', sans-serif;\n line-height: 1.4;\n overflow-y: auto;\n }\n\n .document-container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n border: 2px solid #333;\n }\n\n .document-header {\n text-align: center;\n padding: 15px;\n border-bottom: 1px solid #333;\n }\n\n .document-title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: 10px;\n }\n\n .document-body {\n padding: 20px;\n }\n\n .request-info {\n margin-bottom: 20px;\n }\n\n .request-table {\n width: 100%;\n border-collapse: collapse;\n margin-bottom: 20px;\n }\n\n .request-table th,\n .request-table td {\n border: 1px solid #333;\n padding: 8px;\n text-align: left;\n }\n\n .request-table th {\n background-color: #f5f5f5;\n font-weight: bold;\n width: 120px;\n }\n\n .inspection-items {\n margin: 20px 0;\n }\n\n .inspection-items textarea {\n width: 100%;\n min-height: 100px;\n border: 1px solid #ddd;\n padding: 10px;\n font-family: inherit;\n resize: vertical;\n }\n\n .signature-section {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 15px;\n }\n\n .signature-box {\n display: flex;\n align-items: center;\n gap: 15px;\n text-align: right;\n }\n\n .signature-title {\n font-size: 14px;\n font-weight: bold;\n color: #333;\n min-width: 120px;\n }\n\n .signature-name {\n font-size: 14px;\n color: #333;\n }\n\n .signature-container {\n position: relative;\n min-width: 100px;\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .signature-container::after {\n content: '(인)';\n position: absolute;\n bottom: 5px;\n right: 5px;\n font-size: 12px;\n color: #333;\n font-weight: bold;\n z-index: 2;\n }\n\n .signature-image {\n max-width: 140px;\n max-height: 60px;\n width: auto;\n height: auto;\n }\n\n .attachment-section {\n margin-top: 30px;\n margin-bottom: 30px;\n }\n\n .attachment-title {\n font-weight: bold;\n font-size: 14px;\n color: #333;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .attachment-list {\n margin-left: 30px;\n }\n\n .attachment-item {\n margin-bottom: 5px;\n color: #2196f3;\n font-size: 14px;\n line-height: 1.5;\n }\n\n .attachment-item.upload {\n display: flex;\n align-items: center;\n gap: 10px;\n }\n\n .attachment-item.upload md-outlined-button {\n --md-outlined-button-container-height: 24px;\n --md-outlined-button-label-text-size: 12px;\n --md-outlined-button-outline-color: #666;\n --md-outlined-button-label-text-color: #666;\n }\n\n .attachment-item.upload span {\n color: #666;\n font-size: 12px;\n }\n\n .attachment-icon {\n display: none;\n }\n\n .date-section {\n text-align: right;\n margin-bottom: 20px;\n font-size: 14px;\n }\n\n .form-row {\n display: flex;\n align-items: flex-start;\n margin-bottom: 10px;\n }\n\n .form-label {\n font-weight: bold;\n width: 100px;\n margin-right: 10px;\n }\n\n .recipient-section {\n margin-bottom: 30px;\n }\n\n .recipient-item {\n display: flex;\n margin-bottom: 5px;\n }\n\n .recipient-label {\n font-weight: bold;\n margin-right: 18px;\n }\n\n .inspection-memo-input {\n width: 100%;\n max-width: -webkit-fill-available;\n height: 40px;\n border: 1px solid #ddd;\n padding: 10px;\n font-size: 15px;\n border-radius: 5px;\n }\n\n .inspection-memo-text {\n padding: 10px;\n font-size: 15px;\n color: #495057;\n border: 1px solid #e9ecef;\n border-radius: 5px;\n min-height: 20px;\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n padding: 15px 0;\n border-top: 1px solid #ddd;\n }\n\n .button-container md-elevated-button {\n background-color: #3498db;\n color: white;\n padding: 12px 30px;\n font-size: 16px;\n font-weight: bold;\n border-radius: 8px;\n }\n\n .document-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n `\n ]\n\n @property({ type: Object }) checklist: any = {}\n @property({ type: Object }) buildingInspection: any = {}\n @property({ type: String }) mode: InspectionMode = InspectionMode.VIEW\n\n render() {\n const headerDate = this._formatDate(new Date(this.checklist?.inspectionRequestUpdatedAt || Date.now()))\n const requestDate = this._formatDate(new Date(this.buildingInspection.requestDate))\n const attachmentCount = this.buildingInspection?.checklist?.checklistItems?.reduce((acc, item) => {\n return acc + item.checklistItemAttachmentCount\n }, 0)\n\n return html`\n <div class=\"document-container\">\n <div class=\"document-header\">\n <div class=\"document-title\">검측요청서</div>\n </div>\n\n <div class=\"document-body\">\n <div class=\"date-section\">${headerDate}</div>\n\n <div class=\"request-info\">\n <div class=\"recipient-section\">\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">문서 번호:</span>\n <span>${this.checklist?.inspectionRequestDocumentNo || ''}</span>\n </div>\n <div class=\"recipient-item\">\n <span class=\"recipient-label\">수신:</span>\n <span>${this.buildingInspection?.buildingLevel?.building?.buildingComplex?.supervisoryCompany}</span>\n </div>\n </div>\n\n <div style=\"margin: 15px 0;\">다음과 같은 세부공종에 대하여 검측요청 하오니 검사 후 승인하여 주시 기 바랍니다.</div>\n\n <table class=\"request-table\">\n <tr>\n <th>위치 및 공종</th>\n <td>${(this.checklist?.location || '') + ' - ' + (this.checklist?.constructionType || '')}</td>\n </tr>\n <tr>\n <th>검측 부위</th>\n <td>${this.checklist?.inspectionParts?.join(', ') || ''}</td>\n </tr>\n <tr>\n <th>검측 요구일시</th>\n <td>${requestDate}</td>\n </tr>\n <tr>\n <th>검측 사항</th>\n <td>\n <input\n type=\"text\"\n class=\"inspection-memo-input\"\n .value=${this.checklist?.inspectionRequestMemo || ''}\n @input=${this._onInspectionMemoChange}\n ?disabled=${this.mode === InspectionMode.VIEW}\n placeholder=\"검측사항을 입력하세요.\"\n />\n </td>\n </tr>\n </table>\n </div>\n\n <div class=\"document-footer\">\n <div class=\"attachment-section\">\n <div class=\"attachment-title\">첨부 파일</div>\n <div class=\"attachment-list\">\n <div class=\"attachment-item\">시공자의 검측 체크리스트</div>\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"attachment-item upload\">\n 실명부\n <md-outlined-button @click=${this._onNameListUpload.bind(this)}>\n ${this.checklist?.nameListAttachment ? '다시 업로드' : '업로드'}\n </md-outlined-button>\n ${this.checklist?.nameListAttachment ? html`<span>(업로드 완료)</span>` : ''}\n </div>\n `\n : this.checklist?.nameListAttachment\n ? html`<div class=\"attachment-item\">실명부</div>`\n : ''}\n ${attachmentCount > 0 ? html`<div class=\"attachment-item\">첨부 사진 ${attachmentCount}개</div>` : ''}\n </div>\n </div>\n\n <div class=\"signature-section\">\n <div class=\"signature-box\">\n <div class=\"signature-title\">공종별 시공 관리자</div>\n <div class=\"signature-name\">${this.checklist?.taskConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.taskConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.taskConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n <div class=\"signature-box\">\n <div class=\"signature-title\">총괄 시공 책임자</div>\n <div class=\"signature-name\">${this.checklist?.overallConstructor?.name}</div>\n <div class=\"signature-container\">\n ${this.checklist?.overallConstructorSignature\n ? html`<img class=\"signature-image\" src=\"${this.checklist.overallConstructorSignature}\" alt=\"서명\" />`\n : ''}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n ${this.mode === InspectionMode.EDIT\n ? html`\n <div class=\"button-container\">\n <md-elevated-button @click=${this._onConfirm}> 확인 </md-elevated-button>\n </div>\n `\n : ''}\n `\n }\n\n private _formatDate(date: Date): string {\n return `${date.getFullYear()}. ${String(date.getMonth() + 1).padStart(2, '0')}. ${String(date.getDate()).padStart(2, '0')}.`\n }\n\n private _onInspectionMemoChange(e: Event) {\n const target = e.target as HTMLInputElement\n this.checklist = { ...this.checklist, inspectionRequestMemo: target.value }\n\n // 부모 컴포넌트에 변경사항 전달\n this.dispatchEvent(\n new CustomEvent('inspection-memo-change', {\n detail: { inspectionRequestMemo: target.value },\n bubbles: true\n })\n )\n }\n\n // 실명부 업로드\n private _onNameListUpload() {\n const input = document.createElement('input')\n input.type = 'file'\n input.accept = '.pdf,.doc,.docx,.jpg,.jpeg,.png'\n input.onchange = (e: any) => {\n const file = e.target.files[0]\n if (file) {\n // checklist에 파일과 업로드 플래그 저장\n this.checklist = {\n ...this.checklist,\n nameListAttachment: file,\n isNameListAttachmentUploaded: true\n }\n\n // 부모 컴포넌트에 변경사항 알림\n this.dispatchEvent(new CustomEvent('name-list-file-selected', { detail: { file } }))\n this.requestUpdate()\n }\n }\n input.click()\n }\n\n // 확인 버튼\n private _onConfirm() {\n this.dispatchEvent(new CustomEvent('popup-close', { bubbles: true }))\n history.back()\n }\n}\n"]}
@@ -3,6 +3,7 @@ import '@material/web/icon/icon.js';
3
3
  import '@material/web/radio/radio.js';
4
4
  import '@material/web/textfield/outlined-text-field.js';
5
5
  import { LitElement } from 'lit';
6
+ import { InspectionMode } from './inspection-request-document';
6
7
  export declare enum InspectionResultStatus {
7
8
  PASS = "PASS",// 합격
8
9
  FAIL = "FAIL"
@@ -17,7 +18,9 @@ export declare class InspectionResultNotification extends LitElement {
17
18
  checklist: any;
18
19
  buildingInspection: any;
19
20
  project: any;
20
- render(): import("lit-html").TemplateResult<1>;
21
+ mode: InspectionMode;
22
+ render(): import("lit").TemplateResult<1>;
23
+ protected updated(): void;
21
24
  private _formatDate;
22
25
  private _getAttachmentCount;
23
26
  private _getOverallResult;