@dssp/project 1.0.0-alpha.17 → 1.0.0-alpha.19

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 (37) hide show
  1. package/dist-client/pages/project/popup/checklist/{attachment-list-popup.js → task-checklist-attachment-list-popup.js} +14 -14
  2. package/dist-client/pages/project/popup/checklist/task-checklist-attachment-list-popup.js.map +1 -0
  3. package/dist-client/pages/project/popup/checklist/{comment-list-popup.js → task-checklist-comment-list-popup.js} +18 -18
  4. package/dist-client/pages/project/popup/checklist/task-checklist-comment-list-popup.js.map +1 -0
  5. package/dist-client/pages/project/popup/checklist/{schedule-checklist-create-popup.d.ts → task-checklist-create-popup.d.ts} +0 -1
  6. package/dist-client/pages/project/popup/checklist/{schedule-checklist-create-popup.js → task-checklist-create-popup.js} +33 -37
  7. package/dist-client/pages/project/popup/checklist/task-checklist-create-popup.js.map +1 -0
  8. package/dist-client/pages/project/popup/checklist/{schedule-checklist-view.d.ts → task-checklist-view.d.ts} +2 -6
  9. package/dist-client/pages/project/popup/checklist/{schedule-checklist-view.js → task-checklist-view.js} +12 -17
  10. package/dist-client/pages/project/popup/checklist/task-checklist-view.js.map +1 -0
  11. package/dist-client/pages/project/popup/{popup-schedule-upload.d.ts → popup-task-upload.d.ts} +1 -1
  12. package/dist-client/pages/project/popup/{popup-schedule-upload.js → popup-task-upload.js} +9 -9
  13. package/dist-client/pages/project/popup/popup-task-upload.js.map +1 -0
  14. package/dist-client/pages/project/project-detail.js +1 -1
  15. package/dist-client/pages/project/project-detail.js.map +1 -1
  16. package/dist-client/pages/project/{project-schedule-list.d.ts → project-task-list.d.ts} +2 -2
  17. package/dist-client/pages/project/{project-schedule-list.js → project-task-list.js} +11 -11
  18. package/dist-client/pages/project/project-task-list.js.map +1 -0
  19. package/dist-client/pages/project/{project-schedule.d.ts → project-task.d.ts} +4 -4
  20. package/dist-client/pages/project/{project-schedule.js → project-task.js} +22 -22
  21. package/dist-client/pages/project/project-task.js.map +1 -0
  22. package/dist-client/route.d.ts +1 -1
  23. package/dist-client/route.js +4 -4
  24. package/dist-client/route.js.map +1 -1
  25. package/dist-client/tsconfig.tsbuildinfo +1 -1
  26. package/dist-server/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +3 -3
  28. package/things-factory.config.js +3 -3
  29. package/dist-client/pages/project/popup/checklist/attachment-list-popup.js.map +0 -1
  30. package/dist-client/pages/project/popup/checklist/comment-list-popup.js.map +0 -1
  31. package/dist-client/pages/project/popup/checklist/schedule-checklist-create-popup.js.map +0 -1
  32. package/dist-client/pages/project/popup/checklist/schedule-checklist-view.js.map +0 -1
  33. package/dist-client/pages/project/popup/popup-schedule-upload.js.map +0 -1
  34. package/dist-client/pages/project/project-schedule-list.js.map +0 -1
  35. package/dist-client/pages/project/project-schedule.js.map +0 -1
  36. /package/dist-client/pages/project/popup/checklist/{attachment-list-popup.d.ts → task-checklist-attachment-list-popup.d.ts} +0 -0
  37. /package/dist-client/pages/project/popup/checklist/{comment-list-popup.d.ts → task-checklist-comment-list-popup.d.ts} +0 -0
@@ -10,8 +10,8 @@ import { store, User } from '@operato/shell';
10
10
  import { connect } from 'pwa-helpers/connect-mixin.js';
11
11
  import { OxPrompt } from '@operato/popup/ox-prompt.js';
12
12
  import { openPopup } from '@operato/layout';
13
- import { BuildingInspectionStatus } from './schedule-checklist-view';
14
- let AttachmentListPopup = class AttachmentListPopup extends connect(store)(LitElement) {
13
+ import { BuildingInspectionStatus } from './task-checklist-view';
14
+ let TaskChecklistAttachmentListPopup = class TaskChecklistAttachmentListPopup extends connect(store)(LitElement) {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.checklistItemId = '';
@@ -195,7 +195,7 @@ let AttachmentListPopup = class AttachmentListPopup extends connect(store)(LitEl
195
195
  });
196
196
  }
197
197
  };
198
- AttachmentListPopup.styles = [
198
+ TaskChecklistAttachmentListPopup.styles = [
199
199
  ButtonContainerStyles,
200
200
  ScrollbarStyles,
201
201
  css `
@@ -278,32 +278,32 @@ AttachmentListPopup.styles = [
278
278
  __decorate([
279
279
  property({ type: String }),
280
280
  __metadata("design:type", String)
281
- ], AttachmentListPopup.prototype, "checklistItemId", void 0);
281
+ ], TaskChecklistAttachmentListPopup.prototype, "checklistItemId", void 0);
282
282
  __decorate([
283
283
  property({ type: String }),
284
284
  __metadata("design:type", String)
285
- ], AttachmentListPopup.prototype, "status", void 0);
285
+ ], TaskChecklistAttachmentListPopup.prototype, "status", void 0);
286
286
  __decorate([
287
287
  state(),
288
288
  __metadata("design:type", Object)
289
- ], AttachmentListPopup.prototype, "item", void 0);
289
+ ], TaskChecklistAttachmentListPopup.prototype, "item", void 0);
290
290
  __decorate([
291
291
  state(),
292
292
  __metadata("design:type", Object)
293
- ], AttachmentListPopup.prototype, "checklistItemAttachments", void 0);
293
+ ], TaskChecklistAttachmentListPopup.prototype, "checklistItemAttachments", void 0);
294
294
  __decorate([
295
295
  state(),
296
296
  __metadata("design:type", Number)
297
- ], AttachmentListPopup.prototype, "checklistItemAttachmentCount", void 0);
297
+ ], TaskChecklistAttachmentListPopup.prototype, "checklistItemAttachmentCount", void 0);
298
298
  __decorate([
299
299
  state(),
300
300
  __metadata("design:type", User)
301
- ], AttachmentListPopup.prototype, "user", void 0);
301
+ ], TaskChecklistAttachmentListPopup.prototype, "user", void 0);
302
302
  __decorate([
303
303
  query('div[attachment-container]'),
304
304
  __metadata("design:type", HTMLDivElement)
305
- ], AttachmentListPopup.prototype, "attachmentContainer", void 0);
306
- AttachmentListPopup = __decorate([
307
- customElement('attachment-list-popup')
308
- ], AttachmentListPopup);
309
- //# sourceMappingURL=attachment-list-popup.js.map
305
+ ], TaskChecklistAttachmentListPopup.prototype, "attachmentContainer", void 0);
306
+ TaskChecklistAttachmentListPopup = __decorate([
307
+ customElement('task-checklist-attachment-list-popup')
308
+ ], TaskChecklistAttachmentListPopup);
309
+ //# sourceMappingURL=task-checklist-attachment-list-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-checklist-attachment-list-popup.js","sourceRoot":"","sources":["../../../../../client/pages/project/popup/checklist/task-checklist-attachment-list-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGhE,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAAzE;;QAkF8B,oBAAe,GAAW,EAAE,CAAA;QAC5B,WAAM,GAA6B,wBAAwB,CAAC,IAAI,CAAA;QAEnF,SAAI,GAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;QACxB,6BAAwB,GAAQ,EAAE,CAAA;QAClC,iCAA4B,GAAW,CAAC,CAAA;QACxC,SAAI,GAAS,EAAE,CAAA;IAqM1B,CAAC;IAlMC,MAAM;QACJ,OAAO,IAAI,CAAA;;2BAEY,IAAI,CAAC,4BAA4B,IAAI,CAAC;;;YAGrD,IAAI,CAAC,wBAAwB,CAAC,GAAG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AAE,OAAO;YACb,KAAK,EAAE,MAAM;SACd,CAAC,CAAA;IACJ,CAAC;;AA3RM,uCAAM,GAAG;IACd,qBAAqB;IACrB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2EF;CACF,AA/EY,CA+EZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gEAAiE;AAEnF;IAAR,KAAK,EAAE;;8DAAyB;AACxB;IAAR,KAAK,EAAE;;kFAAmC;AAClC;IAAR,KAAK,EAAE;;sFAAyC;AACxC;IAAR,KAAK,EAAE;8BAAO,IAAI;8DAAK;AACY;IAAnC,KAAK,CAAC,2BAA2B,CAAC;8BAAuB,cAAc;6EAAA;AAzFpE,gCAAgC;IADrC,aAAa,CAAC,sCAAsC,CAAC;GAChD,gCAAgC,CA6RrC","sourcesContent":["import '@material/web/icon/icon.js'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { store, User } from '@operato/shell'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { openPopup } from '@operato/layout'\nimport { BuildingInspectionStatus } from './task-checklist-view'\n\n@customElement('task-checklist-attachment-list-popup')\nclass TaskChecklistAttachmentListPopup extends connect(store)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n background-color: var(--md-sys-color-surface);\n }\n\n div[body] {\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n div[attachment-container] {\n overflow-y: auto;\n gap: 10px;\n display: flex;\n flex-direction: column;\n flex: 1;\n\n div[attachment-row] {\n display: flex;\n flex-direction: column;\n\n div[creator-container] {\n display: flex;\n justify-content: space-between;\n\n span[creator] {\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 3px;\n }\n span[createdAt] {\n display: flex;\n align-items: center;\n gap: 3px;\n\n md-icon[delete] {\n cursor: pointer;\n }\n\n a[button-download] {\n display: flex;\n color: #000;\n }\n }\n }\n\n a[attachment] {\n margin-left: 20px;\n text-decoration: none;\n color: #000;\n }\n }\n }\n\n h3 {\n position: relative;\n color: rgb(5, 149, 229);\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0px;\n margin-bottom: 5px;\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n }\n `\n ]\n\n @property({ type: String }) checklistItemId: string = ''\n @property({ type: String }) status: BuildingInspectionStatus = BuildingInspectionStatus.WAIT\n\n @state() item: any = { count: 0 }\n @state() checklistItemAttachments: any = []\n @state() checklistItemAttachmentCount: number = 0\n @state() user: User = {}\n @query('div[attachment-container]') attachmentContainer!: HTMLDivElement\n\n render() {\n return html`\n <div body>\n <h3>제품검사에 대한 파일: ${this.checklistItemAttachmentCount || 0}건</h3>\n\n <div attachment-container>\n ${this.checklistItemAttachments.map(attachment => {\n return html`\n <div attachment-row>\n <div creator-container>\n <span creator><md-icon slot=\"icon\">account_circle</md-icon> ${attachment.creator.name}</span>\n <span createdAt>\n <md-icon slot=\"icon\">schedule</md-icon> ${this._formatDate(attachment.createdAt)}\n ${attachment.creator.email === this.user.email && this.status != BuildingInspectionStatus.PASS\n ? html` <md-icon delete slot=\"icon\" @click=${() => this._deleteAttachment(attachment.id)}>delete</md-icon>`\n : ''}\n <a button-download href=${attachment.fullpath} download=${attachment.name}>\n <md-icon slot=\"icon\">download</md-icon></a\n >\n </span>\n </div>\n <a attachment @click=${() => this._onClickPreview(attachment.fullpath)}>${attachment.name}</a>\n </div>\n `\n })}\n </div>\n\n <ox-input-file\n accept=\"*/*\"\n multiple=\"true\"\n hide-filelist\n ?disabled=${this.status == BuildingInspectionStatus.PASS}\n @change=${this.onCreateAttachment.bind(this)}\n ></ox-input-file>\n\n <div button-container>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소 </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async firstUpdated() {\n this.user = (store.getState() as any).auth?.user\n\n await this._loadAttachments()\n }\n\n private async _loadAttachments() {\n const response = await client.query({\n query: gql`\n query ChecklistItem($id: String!) {\n checklistItem(id: $id) {\n id\n checklistItemAttachmentCount\n checklistItemAttachments {\n id\n name\n fullpath\n creator {\n id\n name\n email\n }\n createdAt\n }\n }\n }\n `,\n variables: {\n id: this.checklistItemId\n }\n })\n\n if (response.errors) return\n\n this.checklistItemAttachments = response.data.checklistItem.checklistItemAttachments || []\n this.checklistItemAttachmentCount = response.data.checklistItem.checklistItemAttachmentCount\n }\n\n private async _deleteAttachment(attachmentId: string) {\n if (this.status == BuildingInspectionStatus.PASS) {\n notify({ message: '완료 상태인 검측정보를 변경할 수 없습니다.', level: 'error' })\n return\n }\n\n if (\n await OxPrompt.open({\n title: '첨부 자료를 삭제',\n text: '첨부 자료를 삭제 하시겠습니까?',\n confirmButton: { text: '삭제' },\n cancelButton: { text: '취소' }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation DeleteAttachment($deleteAttachmentId: String!) {\n deleteAttachment(id: $deleteAttachmentId)\n }\n `,\n variables: {\n deleteAttachmentId: attachmentId\n }\n })\n\n if (!response.errors) {\n this.checklistItemAttachments = [...this.checklistItemAttachments.filter(attachment => attachment.id != attachmentId)]\n notify({ message: '첨부 자료를 삭제하였습니다.', level: 'info' })\n } else {\n notify({ message: response.errors?.[0]?.message || '첨부 자료 삭제에 실패하였습니다.', level: 'error' })\n }\n\n this._dispatchEvent()\n }\n }\n\n private _close() {\n history.back()\n }\n\n // 파일 변경 시 파일을 저장할 핸들러\n private async onCreateAttachment(e: CustomEvent) {\n if (this.status == BuildingInspectionStatus.PASS) {\n notify({ message: '완료 상태인 검측정보를 변경할 수 없습니다.', level: 'error' })\n return\n }\n\n const files = e.detail\n\n await this._createAttachments(files)\n\n this._dispatchEvent()\n }\n\n async _createAttachments(files: File[]) {\n const checklistItemId = this.checklistItemId\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n name\n fullpath\n creator {\n id\n name\n email\n }\n createdAt\n }\n }\n `,\n variables: {\n attachments: files.map(file => {\n return { file, refBy: checklistItemId, refType: 'ChecklistItem' }\n })\n },\n context: {\n hasUpload: true\n }\n })\n\n const attachments = response.data.createAttachments\n\n this.checklistItemAttachments = [...attachments, ...this.checklistItemAttachments]\n this.checklistItemAttachmentCount = this.checklistItemAttachmentCount + attachments.length\n }\n\n private _formatDate(date) {\n const _date = new Date(date.toLocaleString('en-US', { timeZone: 'Asia/Seoul' }))\n\n const year = _date.getFullYear()\n const month = String(_date.getMonth() + 1).padStart(2, '0')\n const day = String(_date.getDate()).padStart(2, '0')\n const hours = String(_date.getHours()).padStart(2, '0')\n const minutes = String(_date.getMinutes()).padStart(2, '0')\n const seconds = String(_date.getSeconds()).padStart(2, '0')\n\n return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`\n }\n\n // 첨부 자료 변경 이벤트 디스패치\n _dispatchEvent() {\n this.dispatchEvent(new CustomEvent('change-attachment', { detail: { checklistItemId: this.checklistItemId } }))\n }\n\n private _onClickPreview(filepath: string) {\n openPopup(html` <file-preview-popup .filepath=${filepath}></file-preview-popup> `, {\n backdrop: true,\n size: 'large',\n title: '미리보기'\n })\n }\n}\n"]}
@@ -9,8 +9,8 @@ import { notify } from '@operato/layout';
9
9
  import { store, User } from '@operato/shell';
10
10
  import { connect } from 'pwa-helpers/connect-mixin.js';
11
11
  import { OxPrompt } from '@operato/popup/ox-prompt.js';
12
- import { BuildingInspectionStatus } from './schedule-checklist-view';
13
- let CommentListPopup = class CommentListPopup extends connect(store)(LitElement) {
12
+ import { BuildingInspectionStatus } from './task-checklist-view';
13
+ let TaskChecklistCommentListPopup = class TaskChecklistCommentListPopup extends connect(store)(LitElement) {
14
14
  constructor() {
15
15
  super(...arguments);
16
16
  this.checklistItemId = '';
@@ -215,7 +215,7 @@ let CommentListPopup = class CommentListPopup extends connect(store)(LitElement)
215
215
  this.dispatchEvent(new CustomEvent('change-comment', { detail: { checklistItemId: this.checklistItemId } }));
216
216
  }
217
217
  };
218
- CommentListPopup.styles = [
218
+ TaskChecklistCommentListPopup.styles = [
219
219
  ButtonContainerStyles,
220
220
  ScrollbarStyles,
221
221
  css `
@@ -310,48 +310,48 @@ CommentListPopup.styles = [
310
310
  __decorate([
311
311
  property({ type: String }),
312
312
  __metadata("design:type", String)
313
- ], CommentListPopup.prototype, "checklistItemId", void 0);
313
+ ], TaskChecklistCommentListPopup.prototype, "checklistItemId", void 0);
314
314
  __decorate([
315
315
  property({ type: String }),
316
316
  __metadata("design:type", String)
317
- ], CommentListPopup.prototype, "status", void 0);
317
+ ], TaskChecklistCommentListPopup.prototype, "status", void 0);
318
318
  __decorate([
319
319
  state(),
320
320
  __metadata("design:type", Object)
321
- ], CommentListPopup.prototype, "item", void 0);
321
+ ], TaskChecklistCommentListPopup.prototype, "item", void 0);
322
322
  __decorate([
323
323
  state(),
324
324
  __metadata("design:type", Object)
325
- ], CommentListPopup.prototype, "checklistItemComments", void 0);
325
+ ], TaskChecklistCommentListPopup.prototype, "checklistItemComments", void 0);
326
326
  __decorate([
327
327
  state(),
328
328
  __metadata("design:type", String)
329
- ], CommentListPopup.prototype, "comment", void 0);
329
+ ], TaskChecklistCommentListPopup.prototype, "comment", void 0);
330
330
  __decorate([
331
331
  state(),
332
332
  __metadata("design:type", Number)
333
- ], CommentListPopup.prototype, "checklistItemCommentCount", void 0);
333
+ ], TaskChecklistCommentListPopup.prototype, "checklistItemCommentCount", void 0);
334
334
  __decorate([
335
335
  state(),
336
336
  __metadata("design:type", User)
337
- ], CommentListPopup.prototype, "user", void 0);
337
+ ], TaskChecklistCommentListPopup.prototype, "user", void 0);
338
338
  __decorate([
339
339
  state(),
340
340
  __metadata("design:type", Number)
341
- ], CommentListPopup.prototype, "page", void 0);
341
+ ], TaskChecklistCommentListPopup.prototype, "page", void 0);
342
342
  __decorate([
343
343
  state(),
344
344
  __metadata("design:type", Boolean)
345
- ], CommentListPopup.prototype, "loading", void 0);
345
+ ], TaskChecklistCommentListPopup.prototype, "loading", void 0);
346
346
  __decorate([
347
347
  state(),
348
348
  __metadata("design:type", Boolean)
349
- ], CommentListPopup.prototype, "hasMoreComments", void 0);
349
+ ], TaskChecklistCommentListPopup.prototype, "hasMoreComments", void 0);
350
350
  __decorate([
351
351
  query('div[comments-container]'),
352
352
  __metadata("design:type", HTMLDivElement)
353
- ], CommentListPopup.prototype, "commentsContainer", void 0);
354
- CommentListPopup = __decorate([
355
- customElement('comment-list-popup')
356
- ], CommentListPopup);
357
- //# sourceMappingURL=comment-list-popup.js.map
353
+ ], TaskChecklistCommentListPopup.prototype, "commentsContainer", void 0);
354
+ TaskChecklistCommentListPopup = __decorate([
355
+ customElement('task-checklist-comment-list-popup')
356
+ ], TaskChecklistCommentListPopup);
357
+ //# sourceMappingURL=task-checklist-comment-list-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-checklist-comment-list-popup.js","sourceRoot":"","sources":["../../../../../client/pages/project/popup/checklist/task-checklist-comment-list-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KA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CAAC,aAAa;QACzB,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,iBAAiB,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAA;QACxE,CAAC,EAAE,GAAG,CAAC,CAAA;IACT,CAAC;IAED,mBAAmB;IACnB,cAAc;QACZ,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAA;IAC9G,CAAC;;AAxTM,oCAAM,GAAG;IACd,qBAAqB;IACrB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuFF;CACF,AA3FY,CA2FZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sEAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6DAAiE;AAEnF;IAAR,KAAK,EAAE;;2DAAyB;AACxB;IAAR,KAAK,EAAE;;4EAAgC;AAC/B;IAAR,KAAK,EAAE;;8DAAqB;AACpB;IAAR,KAAK,EAAE;;gFAAsC;AACrC;IAAR,KAAK,EAAE;8BAAO,IAAI;2DAAK;AACf;IAAR,KAAK,EAAE;;2DAAiB;AAChB;IAAR,KAAK,EAAE;;8DAAyB;AACxB;IAAR,KAAK,EAAE;;sEAAgC;AAEN;IAAjC,KAAK,CAAC,yBAAyB,CAAC;8BAAqB,cAAc;wEAAA;AA1GhE,6BAA6B;IADlC,aAAa,CAAC,mCAAmC,CAAC;GAC7C,6BAA6B,CA0TlC","sourcesContent":["import '@material/web/icon/icon.js'\nimport gql from 'graphql-tag'\nimport { client } from '@operato/graphql'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { store, User } from '@operato/shell'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { BuildingInspectionStatus } from './task-checklist-view'\n\n@customElement('task-checklist-comment-list-popup')\nclass TaskChecklistCommentListPopup extends connect(store)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n background-color: var(--md-sys-color-surface);\n }\n\n div[body] {\n height: 100%;\n display: flex;\n flex-direction: column;\n gap: 12px;\n }\n\n div[comments-container] {\n overflow-y: auto;\n gap: 10px;\n display: flex;\n flex-direction: column;\n flex: 1;\n\n div[comment-row] {\n display: flex;\n flex-direction: column;\n padding-right: 10px;\n\n div[creator-container] {\n display: flex;\n justify-content: space-between;\n\n span[creator] {\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 3px;\n }\n span[createdAt] {\n display: flex;\n align-items: center;\n gap: 3px;\n\n md-icon[delete] {\n cursor: pointer;\n }\n }\n }\n\n div[comment] {\n margin-left: 20px;\n }\n }\n }\n\n h3 {\n position: relative;\n color: rgb(5, 149, 229);\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0px;\n margin-bottom: 5px;\n }\n\n textarea {\n height: 75px;\n border: 1px solid #ccc;\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: String }) checklistItemId: string = ''\n @property({ type: String }) status: BuildingInspectionStatus = BuildingInspectionStatus.WAIT\n\n @state() item: any = { count: 0 }\n @state() checklistItemComments: any = []\n @state() comment: string = ''\n @state() checklistItemCommentCount: number = 0\n @state() user: User = {}\n @state() page: number = 1\n @state() loading: boolean = false\n @state() hasMoreComments: boolean = true\n\n @query('div[comments-container]') commentsContainer!: HTMLDivElement\n\n render() {\n return html`\n <div body>\n <h3>제품검사에 대한 확인: ${this.checklistItemCommentCount || 0}건</h3>\n\n <div comments-container @scroll=${this._onScroll}>\n ${this.checklistItemComments.map(comment => {\n return html`\n <div comment-row>\n <div creator-container>\n <span creator><md-icon slot=\"icon\">account_circle</md-icon> ${comment.creator.name}</span>\n <span createdAt>\n <md-icon slot=\"icon\">schedule</md-icon> ${this._formatDate(comment.createdAt)}\n ${comment.creator.email === this.user.email && this.status != BuildingInspectionStatus.PASS\n ? html` <md-icon delete slot=\"icon\" @click=${() => this._deleteComment(comment.id)}>delete</md-icon>`\n : ''}\n </span>\n </div>\n <div comment>${comment.comment}</div>\n </div>\n `\n })}\n </div>\n\n <textarea\n .value=${this.comment || ''}\n ?disabled=${this.status == BuildingInspectionStatus.PASS}\n @input=${this._onInputChange}\n ></textarea>\n\n <div button-container>\n <md-elevated-button blue ?disabled=${this.status == BuildingInspectionStatus.PASS} @click=${this._createComment}>\n <md-icon slot=\"icon\">task</md-icon>저장\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소 </md-elevated-button>\n </div>\n </div>\n `\n }\n\n async firstUpdated() {\n this.user = (store.getState() as any).auth?.user\n this.comment = ''\n this.page = 1\n await this._loadComments()\n this._scrollBottom()\n }\n\n private async _loadComments() {\n if (this.loading || !this.hasMoreComments) return\n\n this.loading = true\n\n const response = await client.query({\n query: gql`\n query ChecklistItemComments($pagination: Pagination!, $checklistItemId: String!) {\n checklistItemComments(pagination: $pagination, checklistItemId: $checklistItemId) {\n id\n comment\n creator {\n id\n email\n name\n }\n createdAt\n }\n\n checklistItem(id: $checklistItemId) {\n id\n checklistItemCommentCount\n }\n }\n `,\n variables: {\n checklistItemId: this.checklistItemId,\n pagination: {\n page: this.page,\n limit: 10\n }\n }\n })\n\n if (response.errors) return\n\n const items = response.data.checklistItemComments\n if (items.length < 10) this.hasMoreComments = false\n\n this.checklistItemComments = [...items.reverse(), ...this.checklistItemComments]\n this.page += 1\n this.checklistItemCommentCount = response.data.checklistItem.checklistItemCommentCount\n this.loading = false\n }\n\n // 스크롤이 맨 위에 가까울 때 데이터 요청\n private _onScroll() {\n const { scrollTop } = this.commentsContainer\n if (scrollTop <= 5) {\n this._loadComments()\n }\n }\n\n private async _createComment() {\n if (!this.comment) {\n notify({ message: '조치사항을 입력해주세요.', level: 'warn' })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateChecklistItemComment($checklistItemComment: NewChecklistItemComment!) {\n createChecklistItemComment(checklistItemComment: $checklistItemComment) {\n id\n comment\n creator {\n id\n email\n }\n createdAt\n }\n }\n `,\n variables: {\n checklistItemComment: {\n comment: this.comment,\n checklistItemId: this.checklistItemId\n }\n }\n })\n\n if (!response.errors) {\n this.comment = ''\n this.checklistItemComments = [...this.checklistItemComments, { ...response.data.createChecklistItemComment }]\n this._scrollBottom()\n this.checklistItemCommentCount++\n } else {\n notify({ message: response.errors?.[0]?.message || '조치사항 등록에 실패하였습니다.', level: 'error' })\n }\n\n this._dispatchEvent()\n }\n\n private async _deleteComment(commentId: string) {\n if (\n await OxPrompt.open({\n title: '조치 사항을 삭제',\n text: '조치 사항을 삭제 하시겠습니까?',\n confirmButton: { text: '삭제' },\n cancelButton: { text: '취소' }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation DeleteChecklistItemComment($id: String!) {\n deleteChecklistItemComment(id: $id)\n }\n `,\n variables: {\n id: commentId\n }\n })\n\n if (!response.errors) {\n this.checklistItemComments = [...this.checklistItemComments.filter(comment => comment.id != commentId)]\n notify({ message: '조치사항을 삭제하였습니다.', level: 'info' })\n } else {\n notify({ message: response.errors?.[0]?.message || '조치사항 삭제에 실패하였습니다.', level: 'error' })\n }\n\n this._dispatchEvent()\n }\n }\n\n private _close() {\n history.back()\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this.comment = target.value\n }\n\n private _formatDate(date) {\n const _date = new Date(date.toLocaleString('en-US', { timeZone: 'Asia/Seoul' }))\n\n const year = _date.getFullYear()\n const month = String(_date.getMonth() + 1).padStart(2, '0')\n const day = String(_date.getDate()).padStart(2, '0')\n const hours = String(_date.getHours()).padStart(2, '0')\n const minutes = String(_date.getMinutes()).padStart(2, '0')\n const seconds = String(_date.getSeconds()).padStart(2, '0')\n\n return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`\n }\n\n // 댓글 스크롤 맨 밑으로\n private async _scrollBottom() {\n setTimeout(() => {\n this.commentsContainer.scrollTop = this.commentsContainer.scrollHeight\n }, 100)\n }\n\n // 조치사항 변경 이벤트 디스패치\n _dispatchEvent() {\n this.dispatchEvent(new CustomEvent('change-comment', { detail: { checklistItemId: this.checklistItemId } }))\n }\n}\n"]}
@@ -1,2 +1 @@
1
- import '@material/web/icon/icon.js';
2
1
  import '@operato/data-grist/ox-grist.js';
@@ -1,5 +1,4 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import '@material/web/icon/icon.js';
3
2
  import '@operato/data-grist/ox-grist.js';
4
3
  import gql from 'graphql-tag';
5
4
  import { css, html, LitElement } from 'lit';
@@ -8,8 +7,8 @@ import { DataGrist } from '@operato/data-grist/ox-grist.js';
8
7
  import { client } from '@operato/graphql';
9
8
  import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
10
9
  import { notify } from '@operato/layout';
11
- import { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST, ChecklistReferenceType } from './schedule-checklist-view';
12
- let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends LitElement {
10
+ import { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from './task-checklist-view';
11
+ let TaskChecklistCreatePopup = class TaskChecklistCreatePopup extends LitElement {
13
12
  constructor() {
14
13
  super(...arguments);
15
14
  this.projectId = '';
@@ -113,7 +112,7 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
113
112
  </div>
114
113
 
115
114
  <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>
116
- <schedule-checklist-view .mode=${"VIEWER" /* ChecklistMode.VIEWER */} .checklist=${this.checklist}></schedule-checklist-view>
115
+ <task-checklist-view .mode=${"VIEWER" /* ChecklistMode.VIEWER */} .checklist=${this.checklist}></task-checklist-view>
117
116
  </div>
118
117
  </div>
119
118
 
@@ -221,8 +220,8 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
221
220
  // 그리드 셋팅
222
221
  this.setGristConfig();
223
222
  }
224
- requestRefresh(buildingInspectionId = '') {
225
- this.dispatchEvent(new CustomEvent('requestRefresh', { detail: { buildingInspectionId } }));
223
+ requestRefresh() {
224
+ this.dispatchEvent(new CustomEvent('requestRefresh'));
226
225
  }
227
226
  _close() {
228
227
  history.back();
@@ -381,7 +380,6 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
381
380
  constructionType: this.htmlSelectConstructionType.displayText,
382
381
  constructionDetailType: this.htmlSelectConstructionDetailType.displayText,
383
382
  inspectionParts: this.checklist.inspectionParts,
384
- checklistReferenceType: ChecklistReferenceType.SCHEDULE,
385
383
  taskCode: this.taskCode,
386
384
  projectId: this.projectId
387
385
  };
@@ -395,10 +393,8 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
395
393
  });
396
394
  const response = await client.mutate({
397
395
  mutation: gql `
398
- mutation CreateBuildingInspection($patch: NewBuildingInspection!) {
399
- createBuildingInspection(patch: $patch) {
400
- id
401
- }
396
+ mutation CreateTaskChecklist($patch: NewTaskChecklist!) {
397
+ createTaskChecklist(patch: $patch)
402
398
  }
403
399
  `,
404
400
  variables: {
@@ -407,7 +403,7 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
407
403
  });
408
404
  if (!response.errors) {
409
405
  notify({ message: '검측 요청서를 등록하였습니다.' });
410
- this.requestRefresh(response.data.createBuildingInspection.id);
406
+ this.requestRefresh();
411
407
  this._close();
412
408
  }
413
409
  else {
@@ -469,7 +465,7 @@ let ScheduleChecklistCreatePopup = class ScheduleChecklistCreatePopup extends Li
469
465
  return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionType) || {};
470
466
  }
471
467
  };
472
- ScheduleChecklistCreatePopup.styles = [
468
+ TaskChecklistCreatePopup.styles = [
473
469
  ButtonContainerStyles,
474
470
  ScrollbarStyles,
475
471
  css `
@@ -605,80 +601,80 @@ ScheduleChecklistCreatePopup.styles = [
605
601
  __decorate([
606
602
  property({ type: String }),
607
603
  __metadata("design:type", String)
608
- ], ScheduleChecklistCreatePopup.prototype, "projectId", void 0);
604
+ ], TaskChecklistCreatePopup.prototype, "projectId", void 0);
609
605
  __decorate([
610
606
  property({ type: String }),
611
607
  __metadata("design:type", String)
612
- ], ScheduleChecklistCreatePopup.prototype, "taskCode", void 0);
608
+ ], TaskChecklistCreatePopup.prototype, "taskCode", void 0);
613
609
  __decorate([
614
610
  state(),
615
611
  __metadata("design:type", Object)
616
- ], ScheduleChecklistCreatePopup.prototype, "gristConfig", void 0);
612
+ ], TaskChecklistCreatePopup.prototype, "gristConfig", void 0);
617
613
  __decorate([
618
614
  state(),
619
615
  __metadata("design:type", Object)
620
- ], ScheduleChecklistCreatePopup.prototype, "checklistDetailTypes", void 0);
616
+ ], TaskChecklistCreatePopup.prototype, "checklistDetailTypes", void 0);
621
617
  __decorate([
622
618
  state(),
623
619
  __metadata("design:type", String)
624
- ], ScheduleChecklistCreatePopup.prototype, "checklistTemplateId", void 0);
620
+ ], TaskChecklistCreatePopup.prototype, "checklistTemplateId", void 0);
625
621
  __decorate([
626
622
  state(),
627
623
  __metadata("design:type", Object)
628
- ], ScheduleChecklistCreatePopup.prototype, "constructionTypes", void 0);
624
+ ], TaskChecklistCreatePopup.prototype, "constructionTypes", void 0);
629
625
  __decorate([
630
626
  state(),
631
627
  __metadata("design:type", Object)
632
- ], ScheduleChecklistCreatePopup.prototype, "selectedConstructionType", void 0);
628
+ ], TaskChecklistCreatePopup.prototype, "selectedConstructionType", void 0);
633
629
  __decorate([
634
630
  state(),
635
631
  __metadata("design:type", Object)
636
- ], ScheduleChecklistCreatePopup.prototype, "selectedConstructionDetailType", void 0);
632
+ ], TaskChecklistCreatePopup.prototype, "selectedConstructionDetailType", void 0);
637
633
  __decorate([
638
634
  state(),
639
635
  __metadata("design:type", Object)
640
- ], ScheduleChecklistCreatePopup.prototype, "managers", void 0);
636
+ ], TaskChecklistCreatePopup.prototype, "managers", void 0);
641
637
  __decorate([
642
638
  state(),
643
639
  __metadata("design:type", Object)
644
- ], ScheduleChecklistCreatePopup.prototype, "selectedManager", void 0);
640
+ ], TaskChecklistCreatePopup.prototype, "selectedManager", void 0);
645
641
  __decorate([
646
642
  state(),
647
643
  __metadata("design:type", Object)
648
- ], ScheduleChecklistCreatePopup.prototype, "checklistTemplates", void 0);
644
+ ], TaskChecklistCreatePopup.prototype, "checklistTemplates", void 0);
649
645
  __decorate([
650
646
  state(),
651
647
  __metadata("design:type", Object)
652
- ], ScheduleChecklistCreatePopup.prototype, "checklist", void 0);
648
+ ], TaskChecklistCreatePopup.prototype, "checklist", void 0);
653
649
  __decorate([
654
650
  state(),
655
651
  __metadata("design:type", String)
656
- ], ScheduleChecklistCreatePopup.prototype, "activeTab", void 0);
652
+ ], TaskChecklistCreatePopup.prototype, "activeTab", void 0);
657
653
  __decorate([
658
654
  query('md-filled-select[checklistTemplate]'),
659
655
  __metadata("design:type", Object)
660
- ], ScheduleChecklistCreatePopup.prototype, "htmlSelectChecklistTemplate", void 0);
656
+ ], TaskChecklistCreatePopup.prototype, "htmlSelectChecklistTemplate", void 0);
661
657
  __decorate([
662
658
  query('md-filled-select[constructionType]'),
663
659
  __metadata("design:type", Object)
664
- ], ScheduleChecklistCreatePopup.prototype, "htmlSelectConstructionType", void 0);
660
+ ], TaskChecklistCreatePopup.prototype, "htmlSelectConstructionType", void 0);
665
661
  __decorate([
666
662
  query('md-filled-select[constructionDetailType]'),
667
663
  __metadata("design:type", Object)
668
- ], ScheduleChecklistCreatePopup.prototype, "htmlSelectConstructionDetailType", void 0);
664
+ ], TaskChecklistCreatePopup.prototype, "htmlSelectConstructionDetailType", void 0);
669
665
  __decorate([
670
666
  query('ox-grist'),
671
667
  __metadata("design:type", DataGrist)
672
- ], ScheduleChecklistCreatePopup.prototype, "grist", void 0);
668
+ ], TaskChecklistCreatePopup.prototype, "grist", void 0);
673
669
  __decorate([
674
670
  query('div[preview]'),
675
671
  __metadata("design:type", HTMLDivElement)
676
- ], ScheduleChecklistCreatePopup.prototype, "checklistViewContainer", void 0);
672
+ ], TaskChecklistCreatePopup.prototype, "checklistViewContainer", void 0);
677
673
  __decorate([
678
- query('schedule-checklist-view'),
674
+ query('task-checklist-view'),
679
675
  __metadata("design:type", HTMLElement)
680
- ], ScheduleChecklistCreatePopup.prototype, "checklistView", void 0);
681
- ScheduleChecklistCreatePopup = __decorate([
682
- customElement('schedule-checklist-create-popup')
683
- ], ScheduleChecklistCreatePopup);
684
- //# sourceMappingURL=schedule-checklist-create-popup.js.map
676
+ ], TaskChecklistCreatePopup.prototype, "checklistView", void 0);
677
+ TaskChecklistCreatePopup = __decorate([
678
+ customElement('task-checklist-create-popup')
679
+ ], TaskChecklistCreatePopup);
680
+ //# sourceMappingURL=task-checklist-create-popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-checklist-create-popup.js","sourceRoot":"","sources":["../../../../../client/pages/project/popup/checklist/task-checklist-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgIF;CACF,AApIY,CAoIZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2DAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DAAsB;AAExC;IAAR,KAAK,EAAE;;6DAAsB;AACrB;IAAR,KAAK,EAAE;;sEAA+B;AAC9B;IAAR,KAAK,EAAE;;qEAAiC;AAEhC;IAAR,KAAK,EAAE;;mEAA4B;AAC3B;IAAR,KAAK,EAAE;;0EAAmC;AAClC;IAAR,KAAK,EAAE;;gFAAyC;AAExC;IAAR,KAAK,EAAE;;0DAAmB;AAClB;IAAR,KAAK,EAAE;;iEAA0B;AAEzB;IAAR,KAAK,EAAE;;oEAA6B;AAC5B;IAAR,KAAK,EAAE;;2DAAoB;AAEnB;IAAR,KAAK,EAAE;;2DAAuC;AAED;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;6EAA4B;AAC5B;IAA5C,KAAK,CAAC,oCAAoC,CAAC;;4EAA2B;AACpB;IAAlD,KAAK,CAAC,0CAA0C,CAAC;;kFAAiC;AAChE;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;uDAAA;AAEb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;wEAAA;AAChC;IAA7B,KAAK,CAAC,qBAAqB,CAAC;8BAAiB,WAAW;+DAAA;AAhKrD,wBAAwB;IAD7B,aAAa,CAAC,6BAA6B,CAAC;GACvC,wBAAwB,CAioB7B","sourcesContent":["import '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST, ChecklistMode } from './task-checklist-view'\n\n@customElement('task-checklist-create-popup')\nclass TaskChecklistCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) taskCode: string = ''\n\n @state() gristConfig: any = {}\n @state() checklistDetailTypes: any = []\n @state() checklistTemplateId: string = ''\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() managers: any = []\n @state() selectedManager: any = {}\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('ox-grist') grist!: DataGrist\n\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('task-checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div manager>\n <h3>담당자</h3>\n\n <div data-row>\n <label>담당자</label>\n <md-filled-select manager @change=${this._onSelectManager}>\n <md-select-option></md-select-option>\n ${this.managers?.map((manager, idx) => {\n return html` <md-select-option .value=${manager.userId}>\n <div slot=\"headline\">${manager.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <task-checklist-view .mode=${ChecklistMode.VIEWER} .checklist=${this.checklist}></task-checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n\n managers {\n id\n phone\n position\n userId\n name\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n const constructionTypes = response.data?.constructionTypes?.items || []\n\n this.managers = response.data?.managers\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.constructionTypes = [...constructionTypes]\n this.checklistTemplates = [...checklistTemplates]\n\n this.selectedConstructionType = constructionTypes?.[0]\n\n // 세부 공종 리스트 가져오기\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n documentNo: '0000-000-000000',\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n requestRefresh() {\n this.dispatchEvent(new CustomEvent('requestRefresh'))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n private _onSelectManager(e) {\n const managerId = e.target.value\n this.selectedManager = this.managers.find(manager => manager.userId == managerId)\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.managerId = this.selectedManager.userId\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n inspectionParts: this.checklist.inspectionParts,\n taskCode: this.taskCode,\n projectId: this.projectId\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateTaskChecklist($patch: NewTaskChecklist!) {\n createTaskChecklist(patch: $patch)\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh()\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  import '@material/web/fab/fab.js';
2
2
  import '@material/web/icon/icon.js';
3
3
  import '@operato/input/ox-input-signature.js';
4
- import './comment-list-popup';
5
- import './attachment-list-popup';
4
+ import './task-checklist-comment-list-popup';
5
+ import './task-checklist-attachment-list-popup';
6
6
  export declare const enum ChecklistMode {
7
7
  VIEWER = "VIEWER",
8
8
  EDITOR = "EDITOR"
@@ -31,7 +31,3 @@ export declare const BUILDING_INSPECTION_STATUS_DISPLAY: {
31
31
  PASS: string;
32
32
  FAIL: string;
33
33
  };
34
- export declare enum ChecklistReferenceType {
35
- INSPECTION = "INSPECTION",// 검측
36
- SCHEDULE = "SCHEDULE"
37
- }
@@ -10,8 +10,8 @@ import '@operato/input/ox-input-signature.js';
10
10
  import { store } from '@operato/shell';
11
11
  import { connect } from 'pwa-helpers/connect-mixin.js';
12
12
  import { openPopup } from '@operato/layout';
13
- import './comment-list-popup';
14
- import './attachment-list-popup';
13
+ import './task-checklist-comment-list-popup';
14
+ import './task-checklist-attachment-list-popup';
15
15
  export var ChecklistTypeMainType;
16
16
  (function (ChecklistTypeMainType) {
17
17
  ChecklistTypeMainType["BASIC"] = "10";
@@ -38,12 +38,7 @@ export const BUILDING_INSPECTION_STATUS_DISPLAY = {
38
38
  [BuildingInspectionStatus.PASS]: '합격',
39
39
  [BuildingInspectionStatus.FAIL]: '불합격'
40
40
  };
41
- export var ChecklistReferenceType;
42
- (function (ChecklistReferenceType) {
43
- ChecklistReferenceType["INSPECTION"] = "INSPECTION";
44
- ChecklistReferenceType["SCHEDULE"] = "SCHEDULE"; // 공정표
45
- })(ChecklistReferenceType || (ChecklistReferenceType = {}));
46
- let ScheduleChecklistView = class ScheduleChecklistView extends connect(store)(LitElement) {
41
+ let TaskChecklistView = class TaskChecklistView extends connect(store)(LitElement) {
47
42
  constructor() {
48
43
  super(...arguments);
49
44
  this.mode = "VIEWER" /* ChecklistMode.VIEWER */;
@@ -387,7 +382,7 @@ let ScheduleChecklistView = class ScheduleChecklistView extends connect(store)(L
387
382
  this.requestUpdate();
388
383
  }
389
384
  };
390
- ScheduleChecklistView.styles = [
385
+ TaskChecklistView.styles = [
391
386
  ButtonContainerStyles,
392
387
  ScrollbarStyles,
393
388
  css `
@@ -608,20 +603,20 @@ ScheduleChecklistView.styles = [
608
603
  __decorate([
609
604
  property({ type: String }),
610
605
  __metadata("design:type", String)
611
- ], ScheduleChecklistView.prototype, "mode", void 0);
606
+ ], TaskChecklistView.prototype, "mode", void 0);
612
607
  __decorate([
613
608
  property({ type: Object }),
614
609
  __metadata("design:type", Object)
615
- ], ScheduleChecklistView.prototype, "checklist", void 0);
610
+ ], TaskChecklistView.prototype, "checklist", void 0);
616
611
  __decorate([
617
612
  property({ type: Object }),
618
613
  __metadata("design:type", Object)
619
- ], ScheduleChecklistView.prototype, "buildingComplex", void 0);
614
+ ], TaskChecklistView.prototype, "buildingComplex", void 0);
620
615
  __decorate([
621
616
  property({ type: String }),
622
617
  __metadata("design:type", String)
623
- ], ScheduleChecklistView.prototype, "status", void 0);
624
- ScheduleChecklistView = __decorate([
625
- customElement('schedule-checklist-view')
626
- ], ScheduleChecklistView);
627
- //# sourceMappingURL=schedule-checklist-view.js.map
618
+ ], TaskChecklistView.prototype, "status", void 0);
619
+ TaskChecklistView = __decorate([
620
+ customElement('task-checklist-view')
621
+ ], TaskChecklistView);
622
+ //# sourceMappingURL=task-checklist-view.js.map