@dssp/project 1.0.0-alpha.0 → 1.0.0-alpha.1

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 (97) hide show
  1. package/dist-client/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +3 -3
  3. package/client/bootstrap.ts +0 -0
  4. package/client/index.ts +0 -0
  5. package/client/pages/lib/select2-component.ts +0 -175
  6. package/client/pages/lib/waether.ts +0 -159
  7. package/client/pages/project/component/project-update-header.ts +0 -88
  8. package/client/pages/project/popup/popup-plan-upload.ts +0 -138
  9. package/client/pages/project/popup/popup-project-create.ts +0 -147
  10. package/client/pages/project/popup/popup-schedule-upload.ts +0 -102
  11. package/client/pages/project/project-completed-list.ts +0 -281
  12. package/client/pages/project/project-detail.ts +0 -738
  13. package/client/pages/project/project-list.ts +0 -418
  14. package/client/pages/project/project-plan-management.ts +0 -476
  15. package/client/pages/project/project-schedule-list.ts +0 -294
  16. package/client/pages/project/project-schedule.ts +0 -393
  17. package/client/pages/project/project-setting-list.ts +0 -393
  18. package/client/pages/project/project-update.ts +0 -876
  19. package/client/pages/resource/construction-detail-type-popup.ts +0 -201
  20. package/client/pages/resource/construction-type-management.ts +0 -212
  21. package/client/pages/resource/inspection-drawing-type-management.ts +0 -245
  22. package/client/pages/resource/inspection-part-popup.ts +0 -201
  23. package/client/pages/resource/resource-importer.ts +0 -97
  24. package/client/pages/resource/resource-list-page.ts +0 -356
  25. package/client/pages/resource/worker-type-management.ts +0 -192
  26. package/client/pages/task/task-importer.ts +0 -94
  27. package/client/pages/task/task-list-page.ts +0 -340
  28. package/client/pages/task-resource/task-resource-importer.ts +0 -97
  29. package/client/pages/task-resource/task-resource-list-page.ts +0 -356
  30. package/client/route.ts +0 -55
  31. package/client/tsconfig.json +0 -11
  32. package/server/controllers/export-tasks.ts +0 -40
  33. package/server/controllers/import-task.ts +0 -134
  34. package/server/controllers/index.ts +0 -0
  35. package/server/controllers/parse-excel.ts +0 -86
  36. package/server/controllers/types.ts +0 -20
  37. package/server/index.ts +0 -4
  38. package/server/middlewares/index.ts +0 -3
  39. package/server/migrations/1723861466413-seed-roles.ts +0 -128
  40. package/server/migrations/1723861466414-seed-codes.ts +0 -157
  41. package/server/migrations/1723861476419-seed-resources.ts +0 -62
  42. package/server/migrations/1723861478420-seed-/bsample-project.ts +0 -87
  43. package/server/migrations/1723861478421-seed-/bsample-tasks.ts +0 -194
  44. package/server/migrations/index.ts +0 -9
  45. package/server/routes.ts +0 -108
  46. package/server/service/construction-detail-type/construction-detail-type-mutation.ts +0 -57
  47. package/server/service/construction-detail-type/construction-detail-type-query.ts +0 -31
  48. package/server/service/construction-detail-type/construction-detail-type-type.ts +0 -26
  49. package/server/service/construction-detail-type/construction-detail-type.ts +0 -52
  50. package/server/service/construction-detail-type/index.ts +0 -6
  51. package/server/service/construction-type/construction-type-mutation.ts +0 -66
  52. package/server/service/construction-type/construction-type-query.ts +0 -56
  53. package/server/service/construction-type/construction-type-type.ts +0 -26
  54. package/server/service/construction-type/construction-type.ts +0 -74
  55. package/server/service/construction-type/index.ts +0 -6
  56. package/server/service/index.ts +0 -56
  57. package/server/service/inspection-drawing-type/index.ts +0 -6
  58. package/server/service/inspection-drawing-type/inspection-drawing-type-mutation.ts +0 -69
  59. package/server/service/inspection-drawing-type/inspection-drawing-type-query.ts +0 -55
  60. package/server/service/inspection-drawing-type/inspection-drawing-type-type.ts +0 -23
  61. package/server/service/inspection-drawing-type/inspection-drawing-type.ts +0 -68
  62. package/server/service/inspection-part/index.ts +0 -6
  63. package/server/service/inspection-part/inspection-part-mutation.ts +0 -52
  64. package/server/service/inspection-part/inspection-part-query.ts +0 -41
  65. package/server/service/inspection-part/inspection-part-type.ts +0 -26
  66. package/server/service/inspection-part/inspection-part.ts +0 -51
  67. package/server/service/manager/index.ts +0 -6
  68. package/server/service/manager/manager-mutation.ts +0 -42
  69. package/server/service/manager/manager-query.ts +0 -28
  70. package/server/service/manager/manager-type.ts +0 -40
  71. package/server/service/manager/manager.ts +0 -29
  72. package/server/service/project/index.ts +0 -6
  73. package/server/service/project/project-mutation.ts +0 -255
  74. package/server/service/project/project-query.ts +0 -105
  75. package/server/service/project/project-type.ts +0 -72
  76. package/server/service/project/project.ts +0 -134
  77. package/server/service/resource/index.ts +0 -7
  78. package/server/service/resource/resource-mutation.ts +0 -137
  79. package/server/service/resource/resource-query.ts +0 -50
  80. package/server/service/resource/resource-type.ts +0 -41
  81. package/server/service/resource/resource.ts +0 -82
  82. package/server/service/task/index.ts +0 -6
  83. package/server/service/task/task-mutation.ts +0 -135
  84. package/server/service/task/task-query.ts +0 -169
  85. package/server/service/task/task-type.ts +0 -75
  86. package/server/service/task/task.ts +0 -130
  87. package/server/service/task-resource/index.ts +0 -7
  88. package/server/service/task-resource/task-resource-mutation.ts +0 -140
  89. package/server/service/task-resource/task-resource-query.ts +0 -36
  90. package/server/service/task-resource/task-resource-type.ts +0 -41
  91. package/server/service/task-resource/task-resource.ts +0 -51
  92. package/server/service/worker-type/index.ts +0 -6
  93. package/server/service/worker-type/worker-type-mutation.ts +0 -66
  94. package/server/service/worker-type/worker-type-query.ts +0 -47
  95. package/server/service/worker-type/worker-type-type.ts +0 -26
  96. package/server/service/worker-type/worker-type.ts +0 -68
  97. package/server/tsconfig.json +0 -10
@@ -1,418 +0,0 @@
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 { Attachment } from '@things-factory/attachment-base'
10
- import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
11
-
12
- export enum ProjectState {
13
- 'ONGOING' = '10',
14
- 'COMPLETED' = '20'
15
- }
16
- export enum BuildingInspectionStatus {
17
- WAIT = 'WAIT',
18
- OVERALL_WAIT = 'OVERALL_WAIT',
19
- REQUEST = 'REQUEST',
20
- OVERALL_REQUEST = 'OVERALL_REQUEST',
21
- PASS = 'PASS',
22
- FAIL = 'FAIL'
23
- }
24
- export const BUILDING_INSPECTION_STATUS = {
25
- [BuildingInspectionStatus.WAIT]: '검측 대기',
26
- [BuildingInspectionStatus.OVERALL_WAIT]: '검측 대기',
27
- [BuildingInspectionStatus.REQUEST]: '검측 요청',
28
- [BuildingInspectionStatus.OVERALL_REQUEST]: '검측 요청',
29
- [BuildingInspectionStatus.PASS]: '합격',
30
- [BuildingInspectionStatus.FAIL]: '불합격'
31
- }
32
-
33
- export interface Project {
34
- id?: string
35
- name: string
36
- startDate?: string
37
- endDate?: string
38
- mainPhoto?: Attachment
39
- mainPhotoUpload?: FileUpload
40
- totalProgress?: number
41
- weeklyProgress?: number
42
- kpi?: number
43
- inspPassRate?: number
44
- robotProgressRate?: number
45
- structuralSafetyRate?: number
46
- scheduleTable?: Attachment
47
- buildingComplex: BuildingComplex
48
- }
49
- export interface BuildingComplex {
50
- id?: string
51
- address?: string
52
- latitude?: number
53
- longitude?: number
54
- area?: number
55
- constructionCompany?: string
56
- clientCompany?: string
57
- designCompany?: string
58
- supervisoryCompany?: string
59
- drawing?: Attachment
60
- drawingUpload?: FileUpload
61
- constructionType?: string
62
- constructionCost?: number
63
- etc?: string
64
- householdCount?: number
65
- buildingCount?: number
66
- notice?: string
67
- planXScale?: number
68
- planYScale?: number
69
- overallConstructorEmails?: string[]
70
- taskConstructorEmails?: string[]
71
- overallSupervisoryEmails?: string[]
72
- taskSupervisoryEmails?: string[]
73
- buildings?: Building[]
74
- }
75
- export interface Building {
76
- id?: string
77
- name: string | undefined
78
- floorCount: number | undefined
79
- drawing?: Attachment
80
- drawingUpload?: FileUpload
81
- buildingLevels?: BuildingLevel[]
82
- }
83
-
84
- export interface BuildingLevel {
85
- id?: string
86
- floor?: number
87
- mainDrawing?: Attachment
88
- mainDrawingImage?: string
89
- mainDrawingThumbnail?: string
90
- mainDrawingUpload?: FileUpload
91
- elevationDrawing?: Attachment
92
- elevationDrawingThumbnail?: string
93
- elevationDrawingUpload?: FileUpload
94
- rebarDistributionDrawing?: Attachment
95
- rebarDistributionDrawingThumbnail?: string
96
- rebarDistributionDrawingUpload?: FileUpload
97
- building?: Building
98
- buildingInspections?: BuildingInspection[]
99
- }
100
-
101
- export interface BuildingInspection {
102
- id?: string
103
- attatchments?: Attachment[]
104
- // buildingInspectionAttachments?: BuildingInspectionAttachment[]
105
- status?: BuildingInspectionStatus
106
- requestDate?: Date
107
- buildingLevel?: BuildingLevel
108
- checklist?: Checklist
109
- createdAt?: Date
110
- updatedAt?: Date
111
- deletedAt?: Date
112
- }
113
-
114
- export interface Checklist {
115
- id: string
116
- name?: string
117
- documentNo?: string
118
- constructionType?: string
119
- constructionDetailType?: string
120
- location?: string
121
- constructionInspectorDate?: Date
122
- supervisorInspectorDate?: Date
123
- overallConstructorSignature?: string
124
- taskConstructorSignature?: string
125
- overallSupervisorySignature?: string
126
- taskSupervisorySignature?: string
127
- inspectionParts?: string[]
128
- // checklistItems?: ChecklistItem[]
129
- }
130
-
131
- @customElement('project-list')
132
- export class ProjectListPage extends ScopedElementsMixin(PageView) {
133
- static styles = [
134
- css`
135
- :host {
136
- display: flex;
137
- flex-direction: column;
138
- overflow-y: auto;
139
-
140
- width: 100%;
141
- height: 100%;
142
- background-color: var(--md-sys-color-background, #f6f6f6);
143
-
144
- --grid-record-emphasized-background-color: red;
145
- --grid-record-emphasized-color: yellow;
146
- }
147
-
148
- div[header] {
149
- display: flex;
150
- align-items: center;
151
- background-color: #2ea4df1a;
152
- border: 1px solid #2ea4df33;
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
-
158
- md-filled-text-field[type='search'] {
159
- --md-filled-text-field-container-shape: 0px;
160
- --md-sys-color-primary: #2e79be;
161
- --md-sys-color-surface-container-highest: transparent;
162
- --md-filled-text-field-label-text-color: #999999;
163
- }
164
- strong{
165
- flex:1;
166
- padding-right:var(--spacing-medium, 8px);
167
- text-align:right
168
- }
169
-
170
- md-elevated-button[add-project] {
171
- font-weight: bold;
172
- font-size: 16px;
173
- margin-left: 17px;
174
- padding: 13px 20px;
175
-
176
- --md-sys-color-surface-container-low: #24be7b;
177
- --md-sys-color-primary: #ffffff;
178
- --md-elevated-button-container-shape: 7px;
179
- }
180
- }
181
-
182
- div[body] {
183
- div[project-container] {
184
- height: 140px;
185
- margin: var(--spacing-large, 12px);
186
- background-color: var(--md-sys-color-on-primary);
187
- border: 1px solid #cccccc80;
188
- border-radius: var(--md-sys-shape-corner-small, 5px);
189
- overflow:hidden;
190
-
191
- & > a {
192
- display: flex;
193
- gap:0 var(--spacing-large, 12px);
194
- width: 100%;
195
- height: 100%;
196
- text-decoration: none;
197
- color: #000;
198
- }
199
-
200
- img[project-img] {
201
- width: 240px;
202
- background-color: #cccccc80;
203
- }
204
- img[project-img][no-image] {
205
- object-fit: contain;
206
- opacity: 0.5;
207
- }
208
-
209
- span[project-info] {
210
- flex: 0.55;
211
- padding: var(--spacing-small, 4px);
212
- font-size: 14px;
213
-
214
- white-space: nowrap;
215
- overflow: hidden;
216
- text-overflow: ellipsis;
217
-
218
- div[name] {
219
- color: #2e79be;
220
- font-weight: bold;
221
- font-size: 18px;
222
- margin: var(--spacing-small, 4px);
223
- }
224
- }
225
-
226
- span[project-state] {
227
- flex: 0.45;
228
- padding: var(--spacing-medium, 8px);
229
-
230
- & > div {
231
- margin: var(--spacing-tiny, 2px);
232
- }
233
-
234
- div[progress] {
235
- position: relative;
236
-
237
- md-linear-progress {
238
- --md-linear-progress-track-height: 18px;
239
- --md-linear-progress-active-indicator-height: 18px;
240
- --md-linear-progress-track-shape: 5px;
241
- --md-sys-color-primary: #0595e526;
242
- --md-sys-color-surface-container-highest: #0595e52a;
243
- }
244
-
245
- span {
246
- position: absolute;
247
- top: 0;
248
- left: var(--spacing-large, 12px);
249
- font-size: 12px;
250
- font-weight: bold;
251
- color: #2e79be;
252
-
253
- &:last-child {
254
- left: unset;
255
- right: var(--spacing-large, 12px);
256
- }
257
- }
258
- }
259
- }
260
- }
261
- }
262
- `
263
- ]
264
-
265
- get context() {
266
- return {
267
- title: '진행중 프로젝트'
268
- }
269
- }
270
-
271
- @state() private projectName: string = ''
272
- @state() private projectList: Project[] = []
273
- @state() private projectCount: number = 0
274
-
275
- render() {
276
- return html`
277
- <div header>
278
- <md-filled-text-field
279
- name="projectName"
280
- type="search"
281
- label="프로젝트명"
282
- .value=${this.projectName}
283
- @input=${this._onInputChange}
284
- @keypress=${this._onKeypress}
285
- >
286
- <md-icon slot="leading-icon">search</md-icon>
287
- </md-filled-text-field>
288
-
289
- <strong>총 ${this.projectCount}개</strong>
290
- </div>
291
-
292
- <div body>
293
- ${this.projectList?.map((project: Project) => {
294
- return html`
295
- <div project-container>
296
- <a href=${`project-detail/${project.id}`}>
297
- <img
298
- ?no-image=${!project.mainPhoto?.fullpath}
299
- project-img
300
- src=${project.mainPhoto?.fullpath || '/assets/images/no-image.png'}
301
- />
302
-
303
- <span project-info>
304
- <div name>${project.name}</div>
305
- <div content>${project.buildingComplex.address}</div>
306
- <div content>면적: ${project.buildingComplex?.area?.toLocaleString() || ''}㎡</div>
307
- <div content>착공~준공: ${project.startDate} ~ ${project.endDate}</div>
308
- <div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
309
- </span>
310
-
311
- <span project-state>
312
- <div progress>
313
- <md-linear-progress buffer="100" max="100" value=${project.totalProgress || 0}> </md-linear-progress>
314
- <span>전체</span>
315
- <span>${project.totalProgress || 0}%</span>
316
- </div>
317
- <div progress>
318
- <md-linear-progress buffer="100" max="100" value=${project.weeklyProgress || 0}> </md-linear-progress>
319
- <span>주간</span>
320
- <span>${project.weeklyProgress || 0}%</span>
321
- </div>
322
- <div progress>
323
- <md-linear-progress buffer="100" max="100" value=${project.kpi || 0}> </md-linear-progress>
324
- <span>KPI</span>
325
- <span>${project.kpi || 0}%</span>
326
- </div>
327
- <div progress>
328
- <md-linear-progress buffer="100" max="100" value=${project.inspPassRate || 0}> </md-linear-progress>
329
- <span>Inspection Passing Rate</span>
330
- <span>${project.inspPassRate || 0}%</span>
331
- </div>
332
- <div progress>
333
- <md-linear-progress buffer="100" max="100" value=${project.robotProgressRate || 0}> </md-linear-progress>
334
- <span>Robot Progress</span>
335
- <span>${project.robotProgressRate || 0}%</span>
336
- </div>
337
- <div progress>
338
- <md-linear-progress buffer="100" max="100" value=${project.structuralSafetyRate || 0}> </md-linear-progress>
339
- <span>Structural safety</span>
340
- <span>${project.structuralSafetyRate || 0}%</span>
341
- </div>
342
- </span>
343
- </a>
344
- </div>
345
- `
346
- })}
347
- </div>
348
- `
349
- }
350
-
351
- async pageUpdated(changes: any, lifecycle: any) {
352
- if (this.active) {
353
- this.getProjectList()
354
- }
355
- }
356
-
357
- async getProjectList() {
358
- const response = await client.query({
359
- query: gql`
360
- query Projects($filters: [Filter!]) {
361
- projects(filters: $filters) {
362
- items {
363
- id
364
- name
365
- startDate
366
- endDate
367
- mainPhoto {
368
- fullpath
369
- }
370
- totalProgress
371
- weeklyProgress
372
- kpi
373
- inspPassRate
374
- robotProgressRate
375
- structuralSafetyRate
376
- buildingComplex {
377
- address
378
- area
379
- clientCompany
380
- }
381
- }
382
- total
383
- }
384
- }
385
- `,
386
- variables: {
387
- filters: [
388
- {
389
- name: 'name',
390
- operator: 'search',
391
- value: `%${this.projectName}%`
392
- },
393
- {
394
- name: 'state',
395
- operator: 'eq',
396
- value: ProjectState.ONGOING
397
- }
398
- ]
399
- }
400
- })
401
-
402
- this.projectList = response.data.projects?.items || []
403
- this.projectCount = response.data.projects?.total || 0
404
- }
405
-
406
- // Input 요소의 값이 변경될 때 호출되는 콜백 함수
407
- private _onInputChange(event: InputEvent) {
408
- const target = event.target as HTMLInputElement
409
- this[target.name] = target.value
410
- }
411
-
412
- // 검색창에서 엔터입력시 검색
413
- private _onKeypress(event: KeyboardEvent) {
414
- if (event.code === 'Enter') {
415
- this.getProjectList()
416
- }
417
- }
418
- }