@dssp/project 0.0.18 → 0.0.20

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 (51) hide show
  1. package/client/pages/project/project-completed-list.ts +281 -0
  2. package/client/pages/project/project-detail.ts +8 -2
  3. package/client/pages/project/project-list.ts +19 -16
  4. package/client/pages/project/project-plan-management.ts +0 -2
  5. package/client/pages/project/project-schedule-list.ts +5 -5
  6. package/client/pages/project/project-setting-list.ts +73 -4
  7. package/client/pages/resource/inspection-drawing-type-management.ts +54 -19
  8. package/client/route.ts +4 -4
  9. package/dist-client/pages/project/project-completed-list.d.ts +18 -0
  10. package/dist-client/pages/project/project-completed-list.js +294 -0
  11. package/dist-client/pages/project/project-completed-list.js.map +1 -0
  12. package/dist-client/pages/project/project-detail.js +8 -2
  13. package/dist-client/pages/project/project-detail.js.map +1 -1
  14. package/dist-client/pages/project/project-list.d.ts +1 -2
  15. package/dist-client/pages/project/project-list.js +24 -20
  16. package/dist-client/pages/project/project-list.js.map +1 -1
  17. package/dist-client/pages/project/project-plan-management.js +0 -1
  18. package/dist-client/pages/project/project-plan-management.js.map +1 -1
  19. package/dist-client/pages/project/project-schedule-list.d.ts +0 -1
  20. package/dist-client/pages/project/project-schedule-list.js +6 -5
  21. package/dist-client/pages/project/project-schedule-list.js.map +1 -1
  22. package/dist-client/pages/project/project-setting-list.d.ts +1 -1
  23. package/dist-client/pages/project/project-setting-list.js +74 -5
  24. package/dist-client/pages/project/project-setting-list.js.map +1 -1
  25. package/dist-client/pages/resource/inspection-drawing-type-management.d.ts +20 -6
  26. package/dist-client/pages/resource/inspection-drawing-type-management.js +54 -18
  27. package/dist-client/pages/resource/inspection-drawing-type-management.js.map +1 -1
  28. package/dist-client/route.d.ts +1 -1
  29. package/dist-client/route.js +3 -3
  30. package/dist-client/route.js.map +1 -1
  31. package/dist-client/tsconfig.tsbuildinfo +1 -1
  32. package/dist-server/migrations/1723861478420-seed-/bsample-project.js +1 -1
  33. package/dist-server/migrations/1723861478420-seed-/bsample-project.js.map +1 -1
  34. package/dist-server/service/project/project-mutation.js +3 -2
  35. package/dist-server/service/project/project-mutation.js.map +1 -1
  36. package/dist-server/service/project/project-query.js +1 -1
  37. package/dist-server/service/project/project-query.js.map +1 -1
  38. package/dist-server/service/project/project.d.ts +2 -2
  39. package/dist-server/service/project/project.js +7 -7
  40. package/dist-server/service/project/project.js.map +1 -1
  41. package/dist-server/tsconfig.tsbuildinfo +1 -1
  42. package/package.json +3 -3
  43. package/server/migrations/1723861478420-seed-/bsample-project.ts +2 -2
  44. package/server/service/project/project-mutation.ts +4 -3
  45. package/server/service/project/project-query.ts +1 -1
  46. package/server/service/project/project.ts +3 -3
  47. package/things-factory.config.js +0 -1
  48. package/client/pages/resource/manager-management.ts +0 -175
  49. package/dist-client/pages/resource/manager-management.d.ts +0 -31
  50. package/dist-client/pages/resource/manager-management.js +0 -169
  51. package/dist-client/pages/resource/manager-management.js.map +0 -1
@@ -0,0 +1,281 @@
1
+ import '@material/web/icon/icon.js'
2
+
3
+ import { PageView } from '@operato/shell'
4
+ import { css, html } from 'lit'
5
+ import { customElement, state } from 'lit/decorators.js'
6
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements'
7
+ import { client } from '@operato/graphql'
8
+ import gql from 'graphql-tag'
9
+ import { Project, ProjectState } from './project-list'
10
+
11
+ @customElement('project-completed-list')
12
+ export class ProjectCompletedListPage extends ScopedElementsMixin(PageView) {
13
+ static styles = [
14
+ css`
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ overflow-y: auto;
19
+
20
+ width: 100%;
21
+ height: 100%;
22
+ background-color: #f7f7f7;
23
+
24
+ --grid-record-emphasized-background-color: red;
25
+ --grid-record-emphasized-color: yellow;
26
+ }
27
+
28
+ div[header] {
29
+ display: flex;
30
+ height: 100px;
31
+ align-items: center;
32
+ background-color: #2ea4df1a;
33
+ border: 1px solid #2ea4df33;
34
+ margin: 15px 23px;
35
+ font-size: 18px;
36
+ padding: 7px;
37
+ border-radius: 5px;
38
+
39
+ md-filled-text-field[type='search'] {
40
+ margin-left: 5px;
41
+ margin-right: 26px;
42
+
43
+ --md-filled-text-field-container-shape: 0px;
44
+ --md-sys-color-primary: #006a6a;
45
+ --md-sys-color-surface-container-highest: transparent;
46
+ --md-filled-text-field-label-text-color: #999999;
47
+ --md-filled-text-field-input-text-color: #4e5055;
48
+ }
49
+
50
+ md-elevated-button[add-project] {
51
+ font-weight: bold;
52
+ font-size: 16px;
53
+ margin-left: 17px;
54
+ padding: 13px 20px;
55
+
56
+ --md-sys-color-surface-container-low: #24be7b;
57
+ --md-sys-color-primary: #ffffff;
58
+ --md-elevated-button-container-shape: 7px;
59
+ }
60
+ }
61
+
62
+ div[body] {
63
+ div[project-container] {
64
+ height: 140px;
65
+ margin: 17px 23px;
66
+ background-color: #ffffff;
67
+ border: 1px solid #cccccc80;
68
+ border-radius: 5px;
69
+
70
+ & > a {
71
+ display: flex;
72
+ width: 100%;
73
+ height: 100%;
74
+ text-decoration: none;
75
+ color: #000;
76
+ }
77
+
78
+ img[project-img] {
79
+ width: 285px;
80
+ background-color: #cccccc80;
81
+ }
82
+ img[project-img][no-image] {
83
+ object-fit: contain;
84
+ opacity: 0.5;
85
+ }
86
+
87
+ span[project-info] {
88
+ flex: 0.45;
89
+ padding: 6px 15px;
90
+ font-size: 16px;
91
+
92
+ white-space: nowrap;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+
96
+ div[name] {
97
+ color: #2e79be;
98
+ font-weight: bold;
99
+ font-size: 19px;
100
+ margin-bottom: 2px;
101
+ }
102
+ }
103
+
104
+ span[project-state] {
105
+ flex: 0.55;
106
+ padding: 10px 20px;
107
+
108
+ & > div {
109
+ margin-bottom: 3px;
110
+ }
111
+
112
+ div[progress] {
113
+ position: relative;
114
+
115
+ md-linear-progress {
116
+ --md-linear-progress-track-height: 18px;
117
+ --md-linear-progress-active-indicator-height: 18px;
118
+ --md-linear-progress-track-shape: 5px;
119
+ --md-sys-color-primary: #1bb40133;
120
+ --md-sys-color-surface-container-highest: #0595e533;
121
+ --md-linear-progress-track-color: #1bb4011a;
122
+ }
123
+
124
+ span {
125
+ position: absolute;
126
+ top: 0;
127
+ left: 12px;
128
+ font-size: 12px;
129
+ font-weight: bold;
130
+ color: #1bb401;
131
+
132
+ &:last-child {
133
+ left: unset;
134
+ right: 12px;
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ `
142
+ ]
143
+
144
+ get context() {
145
+ return {
146
+ title: '완료 프로젝트'
147
+ }
148
+ }
149
+
150
+ @state() private projectName: string = ''
151
+ @state() private projectList: Project[] = []
152
+ @state() private projectCount: number = 0
153
+
154
+ render() {
155
+ return html`
156
+ <div header>
157
+ <label>프로젝트 이름</label>
158
+ <md-filled-text-field
159
+ name="projectName"
160
+ type="search"
161
+ label="프로젝트 이름"
162
+ .value=${this.projectName}
163
+ @input=${this._onInputChange}
164
+ @keypress=${this._onKeypress}
165
+ >
166
+ <md-icon slot="leading-icon">search</md-icon>
167
+ </md-filled-text-field>
168
+
169
+ <strong>총 ${this.projectCount}개</strong>
170
+ </div>
171
+
172
+ <div body>
173
+ ${this.projectList?.map((project: Project) => {
174
+ return html`
175
+ <div project-container>
176
+ <a href=${`project-detail/${project.id}`}>
177
+ <img
178
+ ?no-image=${!project.mainPhoto?.fullpath}
179
+ project-img
180
+ src=${project.mainPhoto?.fullpath || '/assets/images/no-image.png'}
181
+ />
182
+
183
+ <span project-info>
184
+ <div name>${project.name}</div>
185
+ <div content>${project.buildingComplex.address}</div>
186
+ <div content>면적: ${project.buildingComplex?.area?.toLocaleString() || ''}㎡</div>
187
+ <div content>착공~준공: ${project.startDate} ~ ${project.endDate}</div>
188
+ <div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
189
+ </span>
190
+
191
+ <span project-state>
192
+ <div progress>
193
+ <md-linear-progress buffer="100" max="100" value=${project.totalProgress || 0}> </md-linear-progress>
194
+ <span>전체</span>
195
+ <span>${project.totalProgress || 0}%</span>
196
+ </div>
197
+ <div>시공사: ${project.buildingComplex.constructionCompany}</div>
198
+ <div>건설구분: ${project.buildingComplex.constructionType}</div>
199
+ <div>세대수: ${project.buildingComplex?.householdCount?.toLocaleString() || ''}세대</div>
200
+ <div>기타: ${project.buildingComplex.etc}</div>
201
+ </span>
202
+ </a>
203
+ </div>
204
+ `
205
+ })}
206
+ </div>
207
+ `
208
+ }
209
+
210
+ async pageUpdated(changes: any, lifecycle: any) {
211
+ if (this.active) {
212
+ this.getProjectList()
213
+ }
214
+ }
215
+
216
+ async getProjectList() {
217
+ const response = await client.query({
218
+ query: gql`
219
+ query Projects($filters: [Filter!]) {
220
+ projects(filters: $filters) {
221
+ items {
222
+ id
223
+ name
224
+ startDate
225
+ endDate
226
+ mainPhoto {
227
+ fullpath
228
+ }
229
+ totalProgress
230
+ weeklyProgress
231
+ kpi
232
+ inspPassRate
233
+ robotProgressRate
234
+ structuralSafetyRate
235
+ buildingComplex {
236
+ address
237
+ area
238
+ clientCompany
239
+ constructionCompany
240
+ constructionType
241
+ householdCount
242
+ etc
243
+ }
244
+ }
245
+ total
246
+ }
247
+ }
248
+ `,
249
+ variables: {
250
+ filters: [
251
+ {
252
+ name: 'name',
253
+ operator: 'search',
254
+ value: `%${this.projectName}%`
255
+ },
256
+ {
257
+ name: 'state',
258
+ operator: 'eq',
259
+ value: ProjectState.COMPLETED
260
+ }
261
+ ]
262
+ }
263
+ })
264
+
265
+ this.projectList = response.data.projects?.items || []
266
+ this.projectCount = response.data.projects?.total || 0
267
+ }
268
+
269
+ // Input 요소의 값이 변경될 때 호출되는 콜백 함수
270
+ private _onInputChange(event: InputEvent) {
271
+ const target = event.target as HTMLInputElement
272
+ this[target.name] = target.value
273
+ }
274
+
275
+ // 검색창에서 엔터입력시 검색
276
+ private _onKeypress(event: KeyboardEvent) {
277
+ if (event.code === 'Enter') {
278
+ this.getProjectList()
279
+ }
280
+ }
281
+ }
@@ -228,6 +228,12 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
228
228
  align-items: center;
229
229
  justify-content: center;
230
230
 
231
+ div[wait] {
232
+ color: #4e5055;
233
+ }
234
+ div[request] {
235
+ color: #2e79be;
236
+ }
231
237
  div[pass] {
232
238
  color: #1bb401;
233
239
  }
@@ -404,7 +410,7 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
404
410
  <div>
405
411
  <div row>
406
412
  <span>- 면적 : </span>
407
- <span>${this.project.buildingComplex?.area?.toLocaleString()}</span>
413
+ <span>${this.project.buildingComplex?.area?.toLocaleString()} ㎡</span>
408
414
  </div>
409
415
  <div row>
410
416
  <span>- 착공 ~ 준공 : </span>
@@ -574,7 +580,7 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
574
580
  <td>${inspection.checklist?.inspectionParts?.join(', ') || ''}</td>
575
581
  <td>${this._formatDate(inspection.requestDate)}</td>
576
582
  <td bold>${inspection.status && BUILDING_INSPECTION_STATUS[inspection.status]}</td>
577
- <td>ㅁㅁㅁㅁㅁㅁ</td>
583
+ <td></td>
578
584
  </tr>`
579
585
  })}
580
586
  </tbody>
@@ -9,7 +9,7 @@ import gql from 'graphql-tag'
9
9
  import { Attachment } from '@things-factory/attachment-base'
10
10
  import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
11
11
 
12
- export enum ProjectStatus {
12
+ export enum ProjectState {
13
13
  'ONGOING' = '10',
14
14
  'COMPLETED' = '20'
15
15
  }
@@ -293,8 +293,8 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
293
293
  <span project-info>
294
294
  <div name>${project.name}</div>
295
295
  <div content>${project.buildingComplex.address}</div>
296
- <div content>면적: ${project.buildingComplex.area}㎡</div>
297
- <div content>착공~준공: ${project.startDate}~${project.endDate}</div>
296
+ <div content>면적: ${project.buildingComplex?.area?.toLocaleString() || ''}㎡</div>
297
+ <div content>착공~준공: ${project.startDate} ~ ${project.endDate}</div>
298
298
  <div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
299
299
  </span>
300
300
 
@@ -338,12 +338,12 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
338
338
  `
339
339
  }
340
340
 
341
- async pageInitialized(lifecycle: any) {
342
- this.getProjectList()
341
+ async pageUpdated(changes: any, lifecycle: any) {
342
+ if (this.active) {
343
+ this.getProjectList()
344
+ }
343
345
  }
344
346
 
345
- async pageUpdated(changes: any, lifecycle: any) {}
346
-
347
347
  async getProjectList() {
348
348
  const response = await client.query({
349
349
  query: gql`
@@ -374,15 +374,18 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
374
374
  }
375
375
  `,
376
376
  variables: {
377
- filters: this.projectName
378
- ? [
379
- {
380
- name: 'name',
381
- operator: 'search',
382
- value: `%${this.projectName}%`
383
- }
384
- ]
385
- : []
377
+ filters: [
378
+ {
379
+ name: 'name',
380
+ operator: 'search',
381
+ value: `%${this.projectName}%`
382
+ },
383
+ {
384
+ name: 'state',
385
+ operator: 'eq',
386
+ value: ProjectState.ONGOING
387
+ }
388
+ ]
386
389
  }
387
390
  })
388
391
 
@@ -432,8 +432,6 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
432
432
  }
433
433
  }
434
434
 
435
- console.log('upload project :', this.project)
436
-
437
435
  const response = await client.mutate({
438
436
  mutation: gql`
439
437
  mutation UpdateProjectPlan($project: ProjectPatch!) {
@@ -182,7 +182,7 @@ export class ProjectScheduleListPage extends ScopedElementsMixin(PageView) {
182
182
  <span project-info>
183
183
  <div name>${project.name}</div>
184
184
  <div content>${project.buildingComplex.address}</div>
185
- <div content>면적: ${project.buildingComplex.area}㎡</div>
185
+ <div content>면적: ${project.buildingComplex?.area?.toLocaleString() || ''}㎡</div>
186
186
  <div content>착공~준공: ${project.startDate}~${project.endDate}</div>
187
187
  <div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
188
188
  </span>
@@ -227,12 +227,12 @@ export class ProjectScheduleListPage extends ScopedElementsMixin(PageView) {
227
227
  `
228
228
  }
229
229
 
230
- async pageInitialized(lifecycle: any) {
231
- this.getProjectList()
230
+ async pageUpdated(changes: any, lifecycle: any) {
231
+ if (this.active) {
232
+ this.getProjectList()
233
+ }
232
234
  }
233
235
 
234
- async pageUpdated(changes: any, lifecycle: any) {}
235
-
236
236
  async getProjectList() {
237
237
  const response = await client.query({
238
238
  query: gql`
@@ -32,6 +32,45 @@ export class ProjectSettingList extends ScopedElementsMixin(PageView) {
32
32
  --grid-record-emphasized-color: yellow;
33
33
  }
34
34
 
35
+ div[management-header-container] {
36
+ display: flex;
37
+ margin: 15px 23px 0px 23px;
38
+ gap: 13px;
39
+ overflow-x: auto;
40
+
41
+ a {
42
+ min-width: 140px;
43
+ text-align: center;
44
+ padding: 12px 15px;
45
+ background-color: #fff;
46
+ color: #586878;
47
+ font-weight: 700;
48
+ border-radius: 7px;
49
+ display: flex;
50
+ flex-direction: column;
51
+ justify-content: center;
52
+ align-items: center;
53
+ gap: 5px;
54
+ border: solid 1px #0000004d;
55
+ text-decoration: none;
56
+ cursor: pointer;
57
+
58
+ md-icon {
59
+ font-size: 40px;
60
+ width: auto;
61
+ height: auto;
62
+ }
63
+ div[label] {
64
+ font-size: 15px;
65
+ }
66
+ }
67
+
68
+ a[green] {
69
+ background-color: #24be7b;
70
+ color: #fff;
71
+ }
72
+ }
73
+
35
74
  div[header] {
36
75
  display: flex;
37
76
  height: 100px;
@@ -184,6 +223,35 @@ export class ProjectSettingList extends ScopedElementsMixin(PageView) {
184
223
 
185
224
  render() {
186
225
  return html`
226
+ <div management-header>
227
+ <div management-header-container>
228
+ <a @click=${this._openCreateProjectPopup} green>
229
+ <md-icon slot="leading-icon">add</md-icon>
230
+ <div label>신규 프로젝트 생성</div>
231
+ </a>
232
+ <a href="employee-list">
233
+ <md-icon slot="leading-icon">badge</md-icon>
234
+ <div label>인력 관리</div>
235
+ </a>
236
+ <a href="construction-type-management">
237
+ <md-icon slot="leading-icon">construction</md-icon>
238
+ <div label>공종 관리</div>
239
+ </a>
240
+ <a href="inspection-drawing-type-management">
241
+ <md-icon slot="leading-icon">stacks</md-icon>
242
+ <div label>도면타입/검측부위 관리</div>
243
+ </a>
244
+ <a href="checklist-type-management">
245
+ <md-icon slot="leading-icon">rule</md-icon>
246
+ <div label>체크리스트 구분 관리</div>
247
+ </a>
248
+ <a href="checklist-template-list">
249
+ <md-icon slot="leading-icon">fact_check</md-icon>
250
+ <div label>체크리스트 템플릿 관리</div>
251
+ </a>
252
+ </div>
253
+ </div>
254
+
187
255
  <div header>
188
256
  <label>프로젝트 이름</label>
189
257
  <md-filled-text-field
@@ -198,7 +266,6 @@ export class ProjectSettingList extends ScopedElementsMixin(PageView) {
198
266
  </md-filled-text-field>
199
267
 
200
268
  <strong>총 ${this.projectCount}개</strong>
201
- <md-elevated-button add-project @click=${this._openCreateProjectPopup}>+ 신규 프로젝트 추가</md-elevated-button>
202
269
  </div>
203
270
 
204
271
  <div body>
@@ -221,7 +288,7 @@ export class ProjectSettingList extends ScopedElementsMixin(PageView) {
221
288
  <span project-info>
222
289
  <div name>${project.name}</div>
223
290
  <div content>${project.buildingComplex.address}</div>
224
- <div content>면적: ${project.buildingComplex.area}㎡</div>
291
+ <div content>면적: ${project.buildingComplex?.area?.toLocaleString() || ''}㎡</div>
225
292
  <div content>착공~준공: ${project.startDate}~${project.endDate}</div>
226
293
  <div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
227
294
  </span>
@@ -250,8 +317,10 @@ export class ProjectSettingList extends ScopedElementsMixin(PageView) {
250
317
  `
251
318
  }
252
319
 
253
- async pageInitialized(lifecycle: any) {
254
- this.getProjectList()
320
+ async pageUpdated(changes: any, lifecycle: any) {
321
+ if (this.active) {
322
+ this.getProjectList()
323
+ }
255
324
  }
256
325
 
257
326
  async getProjectList() {
@@ -1,31 +1,42 @@
1
- import '@operato/data-grist'
1
+ import '@material/web/icon/icon.js'
2
2
  import '@operato/context/ox-context-page-toolbar.js'
3
+ import '@operato/data-grist'
3
4
 
4
- import { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
5
+ import { CommonGristStyles, CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
5
6
  import { PageView } from '@operato/shell'
6
7
  import { css, html } from 'lit'
7
8
  import { customElement, property, query } from 'lit/decorators.js'
8
- import { DataGrist } from '@operato/data-grist'
9
+ import { DataGrist, FetchOption } from '@operato/data-grist'
9
10
  import { client } from '@operato/graphql'
10
11
  import { notify, openPopup } from '@operato/layout'
11
12
  import gql from 'graphql-tag'
13
+ import { p13n } from '@operato/p13n'
14
+ import { i18next, localize } from '@operato/i18n'
12
15
  import './inspection-part-popup'
13
16
 
14
17
  @customElement('inspection-drawing-type-management')
15
- export class InspectionDrawingTypeManagement extends PageView {
18
+ export class InspectionDrawingTypeManagement extends p13n(localize(i18next)(PageView)) {
16
19
  static styles = [
17
20
  ScrollbarStyles,
18
21
  CommonGristStyles,
22
+ CommonHeaderStyles,
19
23
  css`
20
24
  :host {
21
25
  display: flex;
22
26
  flex-direction: column;
23
27
 
24
- width: 100%;
25
-
26
28
  --grid-record-emphasized-background-color: red;
27
29
  --grid-record-emphasized-color: yellow;
28
30
  }
31
+
32
+ ox-grist {
33
+ overflow-y: auto;
34
+ flex: 1;
35
+ }
36
+
37
+ .header {
38
+ grid-template-areas: 'filters actions';
39
+ }
29
40
  `
30
41
  ]
31
42
 
@@ -35,6 +46,17 @@ export class InspectionDrawingTypeManagement extends PageView {
35
46
  get context() {
36
47
  return {
37
48
  title: '도면 타입 관리',
49
+ search: {
50
+ handler: (search: string) => {
51
+ this.grist.searchText = search
52
+ },
53
+ value: this.grist?.searchText
54
+ },
55
+ filter: {
56
+ handler: () => {
57
+ this.grist.toggleHeadroom()
58
+ }
59
+ },
38
60
  actions: [
39
61
  {
40
62
  title: '저장',
@@ -46,13 +68,29 @@ export class InspectionDrawingTypeManagement extends PageView {
46
68
  action: this._deleteInspectionDrawingTypes.bind(this),
47
69
  ...CommonButtonStyles.delete
48
70
  }
49
- ]
71
+ ],
72
+ toolbar: false
50
73
  }
51
74
  }
52
75
 
53
76
  render() {
54
77
  return html`
55
- <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist>
78
+ <ox-grist
79
+ .mode=${'GRID'}
80
+ .config=${this.gristConfig}
81
+ .fetchHandler=${this.fetchHandler.bind(this)}
82
+ .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}
83
+ >
84
+ <div slot="headroom" class="header">
85
+ <div class="filters">
86
+ <ox-filters-form autofocus without-search></ox-filters-form>
87
+ </div>
88
+
89
+ <ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
90
+ </div>
91
+
92
+ <ox-grist-personalizer slot="setting"></ox-grist-personalizer>
93
+ </ox-grist>
56
94
  `
57
95
  }
58
96
 
@@ -92,6 +130,7 @@ export class InspectionDrawingTypeManagement extends PageView {
92
130
  record: {
93
131
  editable: true
94
132
  },
133
+ filter: 'search',
95
134
  width: 150
96
135
  },
97
136
  {
@@ -112,16 +151,16 @@ export class InspectionDrawingTypeManagement extends PageView {
112
151
  multiple: true
113
152
  }
114
153
  },
115
- sorters: [{ name: 'updatedAt', desc: true }],
154
+ sorters: [{ name: 'name', desc: true }],
116
155
  pagination: { infinite: true }
117
156
  }
118
157
  }
119
158
 
120
- async fetchHandler() {
159
+ async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
121
160
  const response = await client.query({
122
161
  query: gql`
123
- query InspectionDrawingTypes($sortings: [Sorting!]) {
124
- inspectionDrawingTypes(sortings: $sortings) {
162
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
163
+ inspectionDrawingTypes(filters: $filters, pagination: $pagination, sortings: $sortings) {
125
164
  items {
126
165
  id
127
166
  name
@@ -133,16 +172,12 @@ export class InspectionDrawingTypeManagement extends PageView {
133
172
  }
134
173
  `,
135
174
  variables: {
136
- sortings: [
137
- {
138
- name: 'name'
139
- }
140
- ]
175
+ filters,
176
+ pagination: { page, limit },
177
+ sortings
141
178
  }
142
179
  })
143
180
 
144
- if (response.errors) return {}
145
-
146
181
  return {
147
182
  total: response.data.inspectionDrawingTypes.total || 0,
148
183
  records: response.data.inspectionDrawingTypes.items || []
package/client/route.ts CHANGED
@@ -8,6 +8,10 @@ export default function route(page: string) {
8
8
  import('./pages/project/project-detail')
9
9
  return page
10
10
 
11
+ case 'project-completed-list':
12
+ import('./pages/project/project-completed-list')
13
+ return page
14
+
11
15
  case 'project-schedule-list':
12
16
  import('./pages/project/project-schedule-list')
13
17
  return page
@@ -28,10 +32,6 @@ export default function route(page: string) {
28
32
  import('./pages/project/project-plan-management')
29
33
  return page
30
34
 
31
- case 'manager-management':
32
- import('./pages/resource/manager-management')
33
- return page
34
-
35
35
  case 'worker-type-management':
36
36
  import('./pages/resource/worker-type-management')
37
37
  return page