@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,147 +0,0 @@
1
- import { css, html, LitElement } from 'lit'
2
- import { customElement, property, state } from 'lit/decorators.js'
3
- import { client } from '@operato/graphql'
4
- import { notify } from '@operato/layout'
5
- import gql from 'graphql-tag'
6
- import '@material/web/textfield/outlined-text-field.js'
7
- import '@material/web/button/elevated-button.js'
8
-
9
- @customElement('popup-project-create')
10
- export class PopupProjectCreate extends LitElement {
11
- static styles = [
12
- css`
13
- :host {
14
- display: flex;
15
- flex-direction: column;
16
- background-color: #fff;
17
- width: 100%;
18
- }
19
-
20
- div[body] {
21
- flex: 1;
22
-
23
- label {
24
- color: #4e5055;
25
- font-size: 16px;
26
- }
27
-
28
- div[input-container] {
29
- display: flex;
30
- align-items: center;
31
- justify-content: center;
32
- margin-top: 22px;
33
-
34
- md-outlined-text-field {
35
- width: 60%;
36
- margin-left: 15px;
37
-
38
- --md-outlined-text-field-container-shape: 9px;
39
- --md-sys-color-primary: #586878;
40
- --md-sys-color-surface-container-highest: transparent;
41
- --md-outlined-text-field-label-text-color: #999999;
42
- --md-outlined-text-field-input-text-line-height: 20px;
43
- --md-outlined-text-field-input-text-size: 16px;
44
- --md-outlined-field-bottom-space: 10px;
45
- --md-outlined-field-top-space: 10px;
46
- }
47
- }
48
-
49
- div[button-container] {
50
- margin-top: 50px;
51
- margin-bottom: 20px;
52
- text-align: center;
53
-
54
- md-elevated-button {
55
- margin: 0px 5px;
56
-
57
- --md-elevated-button-container-height: 40px;
58
- --md-elevated-button-container-color: #fff;
59
- --md-elevated-button-label-text-size: 16px;
60
- }
61
- md-elevated-button:first-child {
62
- --md-elevated-button-container-color: #0595e5;
63
- --md-elevated-button-label-text-color: #fff;
64
- --md-elevated-button-hover-label-text-color: #fff;
65
- --md-elevated-button-pressed-label-text-color: #fff;
66
- --md-elevated-button-focus-label-text-color: #fff;
67
- --md-elevated-button-icon-color: #fff;
68
- --md-elevated-button-hover-icon-color: #fff;
69
- --md-elevated-button-pressed-icon-color: #fff;
70
- --md-elevated-button-focus-icon-color: #fff;
71
- }
72
- }
73
- }
74
- `
75
- ]
76
-
77
- @state() private projectName: string = ''
78
- @property({ type: Function }) private refreshFn!: Function
79
-
80
- render() {
81
- return html`
82
- <div body>
83
- <div input-container>
84
- <label>프로젝트 이름</label>
85
- <md-outlined-text-field
86
- name="projectName"
87
- type="text"
88
- placeholder="신규 프로젝트명"
89
- .value=${this.projectName}
90
- @input=${this._onInputChange}
91
- >
92
- </md-outlined-text-field>
93
- </div>
94
-
95
- <div button-container>
96
- <md-elevated-button @click=${this._createProject}>
97
- <md-icon slot="icon">add</md-icon>프로젝트 생성
98
- </md-elevated-button>
99
- <md-elevated-button @click=${this._close}> <md-icon slot="icon">close</md-icon>취소 </md-elevated-button>
100
- </div>
101
- </div>
102
- `
103
- }
104
-
105
- // 프로젝트 생성
106
- private async _createProject() {
107
- if (!this.projectName) {
108
- notify({ level: 'warn', message: '프로젝트 이름은 필수 값 입니다.' })
109
- return
110
- }
111
-
112
- const response = await client.mutate({
113
- mutation: gql`
114
- mutation CreateProject($project: NewProject!) {
115
- response: createProject(project: $project) {
116
- id
117
- }
118
- }
119
- `,
120
- variables: {
121
- project: {
122
- name: this.projectName
123
- }
124
- }
125
- })
126
-
127
- if (!response.errors) {
128
- notify({ message: '저장되었습니다.' })
129
- }
130
-
131
- // 설정 정보 리스트 다시 조회
132
- this.refreshFn()
133
-
134
- // 팝업 템플릿을 닫기 위한 동작
135
- history.back()
136
- }
137
-
138
- private _close() {
139
- history.back()
140
- }
141
-
142
- // Input 요소의 값이 변경될 때 호출되는 콜백 함수
143
- private _onInputChange(event: InputEvent) {
144
- const target = event.target as HTMLInputElement
145
- this.projectName = target.value
146
- }
147
- }
@@ -1,102 +0,0 @@
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
- }
@@ -1,281 +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 { 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
- }