@dssp/project 0.0.27 → 0.0.29

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 (49) hide show
  1. package/client/pages/lib/select2-component.ts +12 -1
  2. package/client/pages/project/component/project-update-header.ts +85 -0
  3. package/client/pages/project/popup/popup-schedule-upload.ts +102 -0
  4. package/client/pages/project/project-list.ts +31 -29
  5. package/client/pages/project/project-plan-management.ts +3 -54
  6. package/client/pages/project/project-schedule.ts +60 -13
  7. package/client/pages/project/project-setting-list.ts +46 -40
  8. package/client/pages/project/project-update.ts +4 -52
  9. package/dist-client/pages/lib/select2-component.js +12 -1
  10. package/dist-client/pages/lib/select2-component.js.map +1 -1
  11. package/dist-client/pages/project/component/project-update-header.d.ts +1 -0
  12. package/dist-client/pages/project/component/project-update-header.js +95 -0
  13. package/dist-client/pages/project/component/project-update-header.js.map +1 -0
  14. package/dist-client/pages/project/popup/popup-schedule-upload.d.ts +9 -0
  15. package/dist-client/pages/project/popup/popup-schedule-upload.js +105 -0
  16. package/dist-client/pages/project/popup/popup-schedule-upload.js.map +1 -0
  17. package/dist-client/pages/project/project-list.d.ts +1 -0
  18. package/dist-client/pages/project/project-list.js +30 -29
  19. package/dist-client/pages/project/project-list.js.map +1 -1
  20. package/dist-client/pages/project/project-plan-management.d.ts +1 -0
  21. package/dist-client/pages/project/project-plan-management.js +3 -53
  22. package/dist-client/pages/project/project-plan-management.js.map +1 -1
  23. package/dist-client/pages/project/project-schedule.d.ts +4 -0
  24. package/dist-client/pages/project/project-schedule.js +55 -12
  25. package/dist-client/pages/project/project-schedule.js.map +1 -1
  26. package/dist-client/pages/project/project-setting-list.js +46 -40
  27. package/dist-client/pages/project/project-setting-list.js.map +1 -1
  28. package/dist-client/pages/project/project-update.d.ts +1 -0
  29. package/dist-client/pages/project/project-update.js +4 -52
  30. package/dist-client/pages/project/project-update.js.map +1 -1
  31. package/dist-client/tsconfig.tsbuildinfo +1 -1
  32. package/dist-server/service/project/project-mutation.d.ts +2 -1
  33. package/dist-server/service/project/project-mutation.js +16 -0
  34. package/dist-server/service/project/project-mutation.js.map +1 -1
  35. package/dist-server/service/project/project-query.d.ts +1 -0
  36. package/dist-server/service/project/project-query.js +17 -0
  37. package/dist-server/service/project/project-query.js.map +1 -1
  38. package/dist-server/service/project/project-type.d.ts +4 -0
  39. package/dist-server/service/project/project-type.js +15 -1
  40. package/dist-server/service/project/project-type.js.map +1 -1
  41. package/dist-server/service/project/project.d.ts +1 -0
  42. package/dist-server/service/project/project.js +4 -0
  43. package/dist-server/service/project/project.js.map +1 -1
  44. package/dist-server/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +4 -4
  46. package/server/service/project/project-mutation.ts +16 -1
  47. package/server/service/project/project-query.ts +13 -0
  48. package/server/service/project/project-type.ts +9 -0
  49. package/server/service/project/project.ts +4 -0
@@ -8,6 +8,10 @@ export class Select2Component extends LitElement {
8
8
  position: relative;
9
9
  width: 300px;
10
10
  border: 1px solid #000;
11
+ border-radius: 6px;
12
+ padding: 4px 16px;
13
+ font-size: 14px;
14
+ color: var(--md-sys-color-primary);
11
15
  }
12
16
 
13
17
  div[dropdown] {
@@ -18,6 +22,8 @@ export class Select2Component extends LitElement {
18
22
 
19
23
  div[options] {
20
24
  position: absolute;
25
+ left: 0;
26
+ top: 30px;
21
27
  width: 100%;
22
28
  border: 1px solid #ccc;
23
29
  background-color: white;
@@ -30,6 +36,10 @@ export class Select2Component extends LitElement {
30
36
  div[option] {
31
37
  padding: 10px;
32
38
  cursor: pointer;
39
+ border-bottom: 1px solid #ccc;
40
+ }
41
+ div[option]:last-child {
42
+ border-bottom: none;
33
43
  }
34
44
 
35
45
  div[option]:hover {
@@ -48,10 +58,11 @@ export class Select2Component extends LitElement {
48
58
  }
49
59
 
50
60
  div[tag] {
51
- background-color: #007bff;
61
+ background-color: #2e79be;
52
62
  color: white;
53
63
  padding: 5px 10px;
54
64
  border-radius: 20px;
65
+ font-size: 13px;
55
66
  display: inline-flex;
56
67
  align-items: center;
57
68
  cursor: pointer;
@@ -0,0 +1,85 @@
1
+ import '@material/web/icon/icon.js'
2
+ import { css, html, LitElement } from 'lit'
3
+ import { customElement, property } from 'lit/decorators.js'
4
+ import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
5
+
6
+ @customElement('project-update-header')
7
+ class ProjectUpdateHeader extends LitElement {
8
+ static styles = [
9
+ ButtonContainerStyles,
10
+ ScrollbarStyles,
11
+ css`
12
+ div[header] {
13
+ display: flex;
14
+ margin: 0px 20px;
15
+
16
+ h2 {
17
+ flex: 0.5;
18
+ color: #3f71a0;
19
+ }
20
+ }
21
+
22
+ div[button-container] {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: end;
26
+ flex: 0.5;
27
+
28
+ md-elevated-button {
29
+ margin: 0px 3px;
30
+
31
+ --md-elevated-button-container-height: 35px;
32
+ --md-elevated-button-label-text-size: 16px;
33
+ --md-elevated-button-container-color: #0595e5;
34
+
35
+ --md-elevated-button-label-text-color: #fff;
36
+ --md-elevated-button-hover-label-text-color: #fff;
37
+ --md-elevated-button-pressed-label-text-color: #fff;
38
+ --md-elevated-button-focus-label-text-color: #fff;
39
+ --md-elevated-button-icon-color: #fff;
40
+ --md-elevated-button-hover-icon-color: #fff;
41
+ --md-elevated-button-pressed-icon-color: #fff;
42
+ --md-elevated-button-focus-icon-color: #fff;
43
+
44
+ &[green] {
45
+ --md-elevated-button-container-color: #42b382;
46
+ }
47
+ }
48
+ }
49
+ `
50
+ ]
51
+
52
+ @property({ type: String }) projectId: string = ''
53
+ @property({ type: String }) title: string = ''
54
+
55
+ render() {
56
+ const path = window.location.pathname
57
+
58
+ return html`
59
+ <div header>
60
+ <h2>${this.title}</h2>
61
+ <div button-container>
62
+ <md-elevated-button green @click=${this._dispatchEvent} ?disabled=${!this.projectId}>
63
+ <md-icon slot="icon">save</md-icon>정보 저장
64
+ </md-elevated-button>
65
+ <md-elevated-button
66
+ href=${`project-update/${this.projectId}`}
67
+ ?disabled=${!this.projectId || path.includes('project-update/')}
68
+ >
69
+ <md-icon slot="icon">assignment</md-icon>프로젝트 정보 수정
70
+ </md-elevated-button>
71
+ <md-elevated-button
72
+ href=${`project-plan-management/${this.projectId}`}
73
+ ?disabled=${!this.projectId || path.includes('project-plan-management/')}
74
+ >
75
+ <md-icon slot="icon">description</md-icon>도면 관리
76
+ </md-elevated-button>
77
+ </div>
78
+ </div>
79
+ `
80
+ }
81
+
82
+ private _dispatchEvent() {
83
+ this.dispatchEvent(new CustomEvent('custom-click'))
84
+ }
85
+ }
@@ -0,0 +1,102 @@
1
+ import { css, html, LitElement } from 'lit'
2
+ import { customElement, property } from 'lit/decorators.js'
3
+ import { client } from '@operato/graphql'
4
+ import { notify } from '@operato/layout'
5
+ import gql from 'graphql-tag'
6
+ import { Attachment } from '@things-factory/attachment-base'
7
+
8
+ @customElement('popup-schedule-upload')
9
+ export class PopupScheduleUpload extends LitElement {
10
+ static styles = [
11
+ css`
12
+ :host {
13
+ display: flex;
14
+ flex-direction: column;
15
+ background-color: #fff;
16
+ width: 100%;
17
+ }
18
+
19
+ div[body] {
20
+ flex: 1;
21
+
22
+ div[input-container] {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ gap: 25px;
27
+ background-color: #f7f7f7;
28
+ padding: 35px 27px 27px 27px;
29
+
30
+ ox-input-file {
31
+ height: 100px;
32
+ width: 120px;
33
+ line-height: 100%;
34
+ }
35
+ }
36
+
37
+ div[button-container] {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ margin-top: 20px;
42
+ }
43
+ }
44
+ `
45
+ ]
46
+
47
+ @property({ type: Object }) private scheduleTable: Attachment | undefined
48
+ @property({ type: String }) private projectId: string | undefined
49
+
50
+ render() {
51
+ const icon = this.scheduleTable ? '' : 'upload'
52
+ const description = this.scheduleTable?.name ? ' ' : '공정표 업로드'
53
+
54
+ return html`
55
+ <div body>
56
+ <div input-container>
57
+ <ox-input-file
58
+ icon=${icon}
59
+ label=${this.scheduleTable?.name || ''}
60
+ description=${description}
61
+ @change=${this._onChangeAttachment.bind(this)}
62
+ ></ox-input-file>
63
+ </div>
64
+
65
+ <div button-container>
66
+ <md-outlined-button @click=${this._close}><md-icon slot="icon">cancel</md-icon>취소</md-outlined-button>
67
+ </div>
68
+ </div>
69
+ `
70
+ }
71
+
72
+ private _close() {
73
+ history.back()
74
+ }
75
+
76
+ // 공정표 업로드
77
+ async _onChangeAttachment(e: CustomEvent) {
78
+ const file = e.detail[0] || null
79
+
80
+ const response = await client.mutate({
81
+ mutation: gql`
82
+ mutation UploadProjectScheduleTable($param: UploadProjectScheduleTable!) {
83
+ uploadProjectScheduleTable(param: $param)
84
+ }
85
+ `,
86
+ variables: {
87
+ param: {
88
+ projectId: this.projectId,
89
+ scheduleTable: file
90
+ }
91
+ },
92
+ context: {
93
+ hasUpload: true
94
+ }
95
+ })
96
+
97
+ if (!response.errors) {
98
+ notify({ message: '공정표가 업로드 되었습니다.' })
99
+ this.dispatchEvent(new CustomEvent('uploaded'))
100
+ }
101
+ }
102
+ }
@@ -43,6 +43,7 @@ export interface Project {
43
43
  inspPassRate?: number
44
44
  robotProgressRate?: number
45
45
  structuralSafetyRate?: number
46
+ scheduleTable?: Attachment
46
47
  buildingComplex: BuildingComplex
47
48
  }
48
49
  export interface BuildingComplex {
@@ -138,7 +139,7 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
138
139
 
139
140
  width: 100%;
140
141
  height: 100%;
141
- background-color: #f7f7f7;
142
+ background-color: var(--md-sys-color-background, #f6f6f6);
142
143
 
143
144
  --grid-record-emphasized-background-color: red;
144
145
  --grid-record-emphasized-color: yellow;
@@ -146,24 +147,24 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
146
147
 
147
148
  div[header] {
148
149
  display: flex;
149
- height: 100px;
150
150
  align-items: center;
151
151
  background-color: #2ea4df1a;
152
152
  border: 1px solid #2ea4df33;
153
- margin: 15px 23px;
154
- font-size: 18px;
155
- padding: 7px;
156
- border-radius: 5px;
153
+ margin: var(--spacing-large, 12px);
154
+ margin-bottom:var(--spacing-small, 5px);
155
+ padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
156
+ border-radius: var(--md-sys-shape-corner-small, 5px);
157
157
 
158
158
  md-filled-text-field[type='search'] {
159
- margin-left: 5px;
160
- margin-right: 26px;
161
-
162
159
  --md-filled-text-field-container-shape: 0px;
163
- --md-sys-color-primary: #006a6a;
160
+ --md-sys-color-primary: #2e79be;
164
161
  --md-sys-color-surface-container-highest: transparent;
165
162
  --md-filled-text-field-label-text-color: #999999;
166
- --md-filled-text-field-input-text-color: #4e5055;
163
+ }
164
+ strong{
165
+ flex:1;
166
+ padding-right:var(--spacing-medium, 8px);
167
+ text-align:right
167
168
  }
168
169
 
169
170
  md-elevated-button[add-project] {
@@ -181,13 +182,15 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
181
182
  div[body] {
182
183
  div[project-container] {
183
184
  height: 140px;
184
- margin: 17px 23px;
185
- background-color: #ffffff;
185
+ margin: var(--spacing-large, 12px);
186
+ background-color: var(--md-sys-color-on-primary);
186
187
  border: 1px solid #cccccc80;
187
- border-radius: 5px;
188
+ border-radius: var(--md-sys-shape-corner-small, 5px);
189
+ overflow:hidden;
188
190
 
189
191
  & > a {
190
192
  display: flex;
193
+ gap:0 var(--spacing-large, 12px);
191
194
  width: 100%;
192
195
  height: 100%;
193
196
  text-decoration: none;
@@ -195,7 +198,7 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
195
198
  }
196
199
 
197
200
  img[project-img] {
198
- width: 285px;
201
+ width: 240px;
199
202
  background-color: #cccccc80;
200
203
  }
201
204
  img[project-img][no-image] {
@@ -204,9 +207,9 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
204
207
  }
205
208
 
206
209
  span[project-info] {
207
- flex: 0.45;
208
- padding: 6px 15px;
209
- font-size: 16px;
210
+ flex: 0.55;
211
+ padding: var(--spacing-small, 4px);
212
+ font-size: 14px;
210
213
 
211
214
  white-space: nowrap;
212
215
  overflow: hidden;
@@ -215,17 +218,17 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
215
218
  div[name] {
216
219
  color: #2e79be;
217
220
  font-weight: bold;
218
- font-size: 19px;
219
- margin-bottom: 2px;
221
+ font-size: 18px;
222
+ margin: var(--spacing-small, 4px);
220
223
  }
221
224
  }
222
225
 
223
226
  span[project-state] {
224
- flex: 0.55;
225
- padding: 10px 20px;
227
+ flex: 0.45;
228
+ padding: var(--spacing-medium, 8px);
226
229
 
227
230
  & > div {
228
- margin-bottom: 3px;
231
+ margin: var(--spacing-tiny, 2px);
229
232
  }
230
233
 
231
234
  div[progress] {
@@ -235,21 +238,21 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
235
238
  --md-linear-progress-track-height: 18px;
236
239
  --md-linear-progress-active-indicator-height: 18px;
237
240
  --md-linear-progress-track-shape: 5px;
238
- --md-sys-color-primary: #0595e51a;
239
- --md-sys-color-surface-container-highest: #0595e533;
241
+ --md-sys-color-primary: #0595e526;
242
+ --md-sys-color-surface-container-highest: #0595e52a;
240
243
  }
241
244
 
242
245
  span {
243
246
  position: absolute;
244
247
  top: 0;
245
- left: 12px;
248
+ left: var(--spacing-large, 12px);
246
249
  font-size: 12px;
247
250
  font-weight: bold;
248
251
  color: #2e79be;
249
252
 
250
253
  &:last-child {
251
254
  left: unset;
252
- right: 12px;
255
+ right: var(--spacing-large, 12px);
253
256
  }
254
257
  }
255
258
  }
@@ -272,11 +275,10 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
272
275
  render() {
273
276
  return html`
274
277
  <div header>
275
- <label>프로젝트 이름</label>
276
278
  <md-filled-text-field
277
279
  name="projectName"
278
280
  type="search"
279
- label="프로젝트 이름"
281
+ label="프로젝트명"
280
282
  .value=${this.projectName}
281
283
  @input=${this._onInputChange}
282
284
  @keypress=${this._onKeypress}
@@ -16,6 +16,7 @@ import { openPopup } from '@operato/layout'
16
16
  import gql from 'graphql-tag'
17
17
  import { Building, BuildingLevel, Project } from './project-list'
18
18
  import './popup/popup-plan-upload'
19
+ import './component/project-update-header'
19
20
 
20
21
  @customElement('project-plan-management')
21
22
  export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
@@ -53,44 +54,6 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
53
54
  font-weight: bold;
54
55
  }
55
56
 
56
- div[header] {
57
- display: flex;
58
- margin: 0px 20px;
59
-
60
- h2 {
61
- flex: 0.5;
62
- color: #3f71a0;
63
- }
64
-
65
- div[button-container] {
66
- display: flex;
67
- align-items: center;
68
- justify-content: end;
69
- flex: 0.5;
70
-
71
- md-elevated-button {
72
- margin: 0px 3px;
73
-
74
- --md-elevated-button-container-height: 35px;
75
- --md-elevated-button-label-text-size: 16px;
76
- --md-elevated-button-container-color: #0595e5;
77
-
78
- --md-elevated-button-label-text-color: #fff;
79
- --md-elevated-button-hover-label-text-color: #fff;
80
- --md-elevated-button-pressed-label-text-color: #fff;
81
- --md-elevated-button-focus-label-text-color: #fff;
82
- --md-elevated-button-icon-color: #fff;
83
- --md-elevated-button-hover-icon-color: #fff;
84
- --md-elevated-button-pressed-icon-color: #fff;
85
- --md-elevated-button-focus-icon-color: #fff;
86
-
87
- &[green] {
88
- --md-elevated-button-container-color: #42b382;
89
- }
90
- }
91
- }
92
- }
93
-
94
57
  div[body] {
95
58
  display: grid;
96
59
  grid-template-rows: 240px 1fr 60px;
@@ -247,20 +210,8 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
247
210
 
248
211
  render() {
249
212
  return html`
250
- <div header>
251
- <h2>도면 관리</h2>
252
- <div button-container>
253
- <md-elevated-button green @click=${this._saveProject}>
254
- <md-icon slot="icon">save</md-icon>정보 저장
255
- </md-elevated-button>
256
- <md-elevated-button href=${`project-update/${this.project.id}`}>
257
- <md-icon slot="icon">assignment</md-icon>프로젝트 정보 수정
258
- </md-elevated-button>
259
- <md-elevated-button href=${`project-task-update/${this.project.id}`}>
260
- <md-icon slot="icon">event_note</md-icon>공정표 관리
261
- </md-elevated-button>
262
- </div>
263
- </div>
213
+ <project-update-header .projectId=${this.project.id || ''} title="도면 관리" @custom-click=${this._saveProject}>
214
+ </project-update-header>
264
215
 
265
216
  <div body>
266
217
  <div building-container>
@@ -415,8 +366,6 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
415
366
  })
416
367
 
417
368
  this.project = response.data?.project
418
-
419
- console.log('init project : ', this.project)
420
369
  }
421
370
 
422
371
  private async _saveProject() {
@@ -11,10 +11,13 @@ import { customElement, query, state } from 'lit/decorators.js'
11
11
  import { ScopedElementsMixin } from '@open-wc/scoped-elements'
12
12
  import { client } from '@operato/graphql'
13
13
  import { i18next } from '@operato/i18n'
14
-
14
+ import { openPopup } from '@operato/layout'
15
15
  import gql from 'graphql-tag'
16
16
  import { Project } from './project-list'
17
+ import { keyed } from 'lit/directives/keyed.js'
18
+ import { ScrollbarStyles } from '@operato/styles'
17
19
  import '@operato/gantt/ox-gantt.js'
20
+ import './popup/popup-schedule-upload'
18
21
 
19
22
  const TaskFragment = gql`
20
23
  fragment TaskFragment on Task {
@@ -36,6 +39,7 @@ const TaskFragment = gql`
36
39
  @customElement('project-schedule')
37
40
  export class ProjectSchedule extends ScopedElementsMixin(PageView) {
38
41
  static styles = [
42
+ ScrollbarStyles,
39
43
  css`
40
44
  :host {
41
45
  display: flex;
@@ -137,11 +141,25 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
137
141
  }
138
142
  }
139
143
 
140
- div[button] {
144
+ div[construction-list-container] {
141
145
  flex: 1;
146
+ display: flex;
142
147
  border-radius: 5px;
143
148
  border: 1px solid #cccccc80;
144
149
  background-color: #fff;
150
+ padding: 8px 10px;
151
+ gap: 10px;
152
+ overflow-x: auto;
153
+
154
+ md-outlined-button {
155
+ --md-outlined-button-container-height: 30px;
156
+ --md-outlined-button-trailing-space: 15px;
157
+ --md-outlined-button-leading-space: 15px;
158
+ --md-outlined-button-label-text-color: #586878;
159
+ box-shadow: 1px 1px 1px #0000001a;
160
+ padding: 8px 16px;
161
+ font-weight: 700;
162
+ }
145
163
  }
146
164
  }
147
165
  }
@@ -171,6 +189,7 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
171
189
  @state() project: Project = { ...this.defaultProject }
172
190
  @state() selectedBuildingIdx: number = 0
173
191
  @state() tasks
192
+ @state() constructionTypeList = []
174
193
 
175
194
  @state() private fromDate = '2024-01-01'
176
195
  @state() private toDate = '2024-12-31'
@@ -213,13 +232,7 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
213
232
  <div header>
214
233
  <h2>${this.project.name}</h2>
215
234
  <div button-container>
216
- <md-elevated-button href=${`project-update/${this.project.id}`}>
217
- <md-icon slot="icon">assignment</md-icon>프로젝트 정보 수정
218
- </md-elevated-button>
219
- <md-elevated-button href=${`project-plan-management/${this.project.id}`}>
220
- <md-icon slot="icon">description</md-icon>도면 관리
221
- </md-elevated-button>
222
- <md-elevated-button href=${`project-task-update/${this.project.id}`}>
235
+ <md-elevated-button @click=${this._openUploadSchedulePopup}>
223
236
  <md-icon slot="icon">event_note</md-icon>공정표 관리
224
237
  </md-elevated-button>
225
238
  </div>
@@ -231,9 +244,7 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
231
244
  to-date=${new Date(this.toDate).toISOString().split('T')[0]}
232
245
  .timeScale=${this.timeScale}
233
246
  .tasks=${this.tasks}
234
- @date-range-selected=${(e: CustomEvent) => {
235
- console.log('date-range-selected', e.detail)
236
- }}
247
+ @date-range-selected=${this.onRangeSelected}
237
248
  @task-clicked=${(e: CustomEvent) => {
238
249
  console.log('task-clicked', e.detail)
239
250
  }}
@@ -253,7 +264,12 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
253
264
  <input type="date" name="endDate" project .value=${this.project.endDate || ''} max="9999-12-31" />
254
265
  </div>
255
266
  </div>
256
- <div button></div>
267
+ <div construction-list-container>
268
+ ${this.constructionTypeList?.map(
269
+ (constructionType: any) =>
270
+ html` <md-outlined-button id=${constructionType.id}>${constructionType.title}</md-outlined-button>`
271
+ )}
272
+ </div>
257
273
  </div>
258
274
  </div>
259
275
  `
@@ -286,6 +302,10 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
286
302
  }
287
303
  }
288
304
  }
305
+ scheduleTable {
306
+ id
307
+ name
308
+ }
289
309
  buildingComplex {
290
310
  id
291
311
  planXScale
@@ -333,4 +353,31 @@ export class ProjectSchedule extends ScopedElementsMixin(PageView) {
333
353
  this.fromDate = this.inputStartDate.value
334
354
  this.toDate = this.inputEndDate.value
335
355
  }
356
+
357
+ onRangeSelected(e: CustomEvent) {
358
+ const selectedFromDate = new Date(e.detail.start + 'T00:00:00.000Z')
359
+ const selectedToDate = new Date(e.detail.end + 'T23:59:59.000Z')
360
+
361
+ this.constructionTypeList = this.tasks.filter(constuction => {
362
+ const constuctionStartDate = new Date(constuction.startDate)
363
+ const constuctionEndDate = new Date(constuction.endDate)
364
+
365
+ return constuctionStartDate <= selectedToDate && constuctionEndDate >= selectedFromDate
366
+ })
367
+ }
368
+
369
+ private _openUploadSchedulePopup() {
370
+ openPopup(
371
+ html`<popup-schedule-upload
372
+ .projectId=${this.projectId}
373
+ .scheduleTable=${this.project?.scheduleTable}
374
+ @uploaded=${() => this.initProject(this.projectId)}
375
+ ></popup-schedule-upload>`,
376
+ {
377
+ backdrop: true,
378
+ size: 'medium',
379
+ title: `공정표 업로드`
380
+ }
381
+ )
382
+ }
336
383
  }