@dssp/project 1.0.0-alpha.5 → 1.0.0-alpha.8

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 (32) hide show
  1. package/dist-client/pages/lib/waether.d.ts +2 -1
  2. package/dist-client/pages/lib/waether.js +7 -3
  3. package/dist-client/pages/lib/waether.js.map +1 -1
  4. package/dist-client/pages/project/popup/popup-plan-export.d.ts +10 -0
  5. package/dist-client/pages/project/popup/popup-plan-export.js +236 -0
  6. package/dist-client/pages/project/popup/popup-plan-export.js.map +1 -0
  7. package/dist-client/pages/project/popup/popup-plan-upload.d.ts +3 -0
  8. package/dist-client/pages/project/popup/popup-plan-upload.js +130 -4
  9. package/dist-client/pages/project/popup/popup-plan-upload.js.map +1 -1
  10. package/dist-client/pages/project/project-detail.d.ts +2 -1
  11. package/dist-client/pages/project/project-detail.js +269 -80
  12. package/dist-client/pages/project/project-detail.js.map +1 -1
  13. package/dist-client/pages/project/project-list.d.ts +12 -0
  14. package/dist-client/pages/project/project-list.js +6 -0
  15. package/dist-client/pages/project/project-list.js.map +1 -1
  16. package/dist-client/pages/project/project-plan-management.js +29 -13
  17. package/dist-client/pages/project/project-plan-management.js.map +1 -1
  18. package/dist-client/pages/project/project-update.d.ts +1 -0
  19. package/dist-client/pages/project/project-update.js +128 -17
  20. package/dist-client/pages/project/project-update.js.map +1 -1
  21. package/dist-client/tsconfig.tsbuildinfo +1 -1
  22. package/dist-server/service/project/project-mutation.d.ts +1 -0
  23. package/dist-server/service/project/project-mutation.js +102 -3
  24. package/dist-server/service/project/project-mutation.js.map +1 -1
  25. package/dist-server/service/project/project-type.d.ts +1 -0
  26. package/dist-server/service/project/project-type.js +5 -1
  27. package/dist-server/service/project/project-type.js.map +1 -1
  28. package/dist-server/service/project/project.d.ts +3 -1
  29. package/dist-server/service/project/project.js +6 -0
  30. package/dist-server/service/project/project.js.map +1 -1
  31. package/dist-server/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +13 -12
@@ -10,7 +10,7 @@ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
10
10
  import { client } from '@operato/graphql';
11
11
  import { ScrollbarStyles } from '@operato/styles';
12
12
  import gql from 'graphql-tag';
13
- import { BUILDING_INSPECTION_STATUS } from './project-list';
13
+ import { BUILDING_INSPECTION_STATUS, ProjectType } from './project-list';
14
14
  import _getWeather from '../lib/waether';
15
15
  import '@operato/chart/ox-progress-circle.js';
16
16
  let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
@@ -42,7 +42,8 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
42
42
  rain: 0,
43
43
  temperature: 0,
44
44
  humidity: 0,
45
- wind: ''
45
+ windDirection: '',
46
+ windSpeed: 0
46
47
  };
47
48
  }
48
49
  get context() {
@@ -51,7 +52,8 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
51
52
  };
52
53
  }
53
54
  render() {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
55
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
56
+ let totalInspectionCount = this.inspectionSummary.pass + this.inspectionSummary.fail + this.inspectionSummary.request + this.inspectionSummary.wait;
55
57
  return html `
56
58
  <div header>
57
59
  <h2>${this.project.name}</h2>
@@ -147,56 +149,135 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
147
149
  <div>
148
150
  <div right-top>
149
151
  <h3>프로젝트 현황</h3>
152
+
153
+ <div kpi-header>
154
+ <span kpi-datetime
155
+ >${new Date().toLocaleDateString('ko-KR')}
156
+ ${new Date().toLocaleTimeString('ko-KR', { hour: '2-digit', minute: '2-digit', hour12: false })}</span
157
+ >
158
+ </div>
150
159
  <div state>
151
- <span progress>
152
- <ox-progress-circle
153
- .value=${this.project.totalProgress}
154
- titleText="전체"
155
- suffix="%"
156
- fontSize="27px"
157
- fontColor="#4E5055"
158
- borderStyle="none"
159
- innerCircleSize="28%"
160
- circleColor="#0595E5"
161
- shadow="#00000026 4px 4px 4px"
162
- background="#eaf5fd"
163
- ></ox-progress-circle>
164
- <div>전체공정율(%)</div>
165
- </span>
166
- <span progress>
167
- <ox-progress-circle
168
- .value=${this.project.weeklyProgress}
169
- titleText="주간"
170
- suffix="%"
171
- fontSize="27px"
172
- fontColor="#4E5055"
173
- borderStyle="none"
174
- innerCircleSize="28%"
175
- circleColor="#06B5AF"
176
- shadow="#00000026 4px 4px 4px"
177
- background="#eaf7f7"
178
- ></ox-progress-circle>
179
- <div week>주간공정율(%)</div>
180
- </span>
181
- <span weather>
182
- <div bold>현장현황</div>
183
- <div>
184
- <span><md-icon slot="icon">rainy</md-icon>강수확률</span>
185
- <span bold>${this.weather.rain}%</span>
160
+ <div kpi-container>
161
+ <div kpi-info-item kpi>
162
+ <ox-progress-circle
163
+ .value=${this.project.kpi || 0}
164
+ fontColor="transparent"
165
+ borderStyle="none"
166
+ innerCircleSize="30%"
167
+ circleColor="#E15757"
168
+ background="#f6f6f6"
169
+ size="120px"
170
+ ></ox-progress-circle>
171
+
172
+ <div kpi-info-label>
173
+ <span kpi-info-label>KPI 지수</span>
174
+ <span kpi-info-value bold>${this.project.kpi || 0}%</span>
175
+ </div>
186
176
  </div>
187
- <div>
188
- <span><md-icon slot="icon">humidity_percentage</md-icon> 습도</span>
189
- <span bold>${this.weather.humidity}%</span>
177
+ <div kpi-info-item>
178
+ <span kpi-info-label>검측 통과율</span>
179
+ <span kpi-info-value>
180
+ <span bold>${((_u = this.inspectionSummary.pass) === null || _u === void 0 ? void 0 : _u.toLocaleString()) || 0}</span>
181
+ <span small> / ${(totalInspectionCount === null || totalInspectionCount === void 0 ? void 0 : totalInspectionCount.toLocaleString()) || 0}</span>
182
+ </span>
190
183
  </div>
191
- <div>
192
- <span><md-icon slot="icon">thermostat</md-icon> 온도</span>
193
- <span bold>${this.weather.temperature}°C</span>
184
+ <div kpi-info-item>
185
+ <span kpi-info-label>작업 중 로봇</span>
186
+ <span kpi-info-value>
187
+ <span bold>${((_v = this.project.robotCount) === null || _v === void 0 ? void 0 : _v.toLocaleString()) || 0}</span>
188
+ <span small> 대</span>
189
+ </span>
194
190
  </div>
195
- <div>
196
- <span><md-icon slot="icon">air</md-icon> 풍향</span>
197
- <span bold>${this.weather.wind}</span>
191
+ <div kpi-info-item weather>
192
+ <div>
193
+ <span><md-icon slot="icon">rainy</md-icon>강수확률</span>
194
+ <span bold>${this.weather.rain}%</span>
195
+ </div>
196
+ <div>
197
+ <span><md-icon slot="icon">humidity_percentage</md-icon> 습도</span>
198
+ <span bold>${this.weather.humidity}%</span>
199
+ </div>
200
+ <div>
201
+ <span><md-icon slot="icon">thermostat</md-icon> 온도</span>
202
+ <span bold>${this.weather.temperature}°C</span>
203
+ </div>
204
+
205
+ <!--
206
+ <div>
207
+ <span><md-icon slot="icon">arrows_output</md-icon> 풍향</span>
208
+ <span bold>${this.weather.windDirection}</span>
209
+ </div>
210
+ <div>
211
+ <span><md-icon slot="icon">air</md-icon> 풍속</span>
212
+ <span bold>${this.weather.windSpeed} m/s</span>
213
+ </div>
214
+ -->
198
215
  </div>
199
- </span>
216
+ </div>
217
+
218
+ <div progress-container>
219
+ <span progress>
220
+ <ox-progress-circle
221
+ .value=${this.project.totalProgress}
222
+ titleText="전체"
223
+ suffix="%"
224
+ fontSize="27px"
225
+ fontColor="#4E5055"
226
+ borderStyle="none"
227
+ innerCircleSize="28%"
228
+ circleColor="#0595E5"
229
+ shadow="#00000026 4px 4px 4px"
230
+ background="#eaf5fd"
231
+ ></ox-progress-circle>
232
+ <div>전체공정율(%)</div>
233
+ </span>
234
+ <span progress>
235
+ <ox-progress-circle
236
+ .value=${this.project.weeklyProgress}
237
+ titleText="주간"
238
+ suffix="%"
239
+ fontSize="27px"
240
+ fontColor="#4E5055"
241
+ borderStyle="none"
242
+ innerCircleSize="28%"
243
+ circleColor="#06B5AF"
244
+ shadow="#00000026 4px 4px 4px"
245
+ background="#eaf7f7"
246
+ ></ox-progress-circle>
247
+ <div week>주간공정율(%)</div>
248
+ </span>
249
+
250
+ <span progress>
251
+ <ox-progress-circle
252
+ .value=${this.project.inspPassRate}
253
+ titleText="검측 통과"
254
+ suffix="%"
255
+ fontSize="27px"
256
+ fontColor="#4E5055"
257
+ borderStyle="none"
258
+ innerCircleSize="28%"
259
+ circleColor="#1BB401"
260
+ shadow="#00000026 4px 4px 4px"
261
+ background="#e8f7e5"
262
+ ></ox-progress-circle>
263
+ <div insp-pass-rate>통과 비율(%)</div>
264
+ </span>
265
+ <span progress>
266
+ <ox-progress-circle
267
+ .value=${this.project.robotProgressRate}
268
+ titleText="로봇작업"
269
+ suffix="%"
270
+ fontSize="27px"
271
+ fontColor="#4E5055"
272
+ borderStyle="none"
273
+ innerCircleSize="28%"
274
+ circleColor="#8957D8"
275
+ shadow="#00000026 4px 4px 4px"
276
+ background="#f3eefb"
277
+ ></ox-progress-circle>
278
+ <div robot-progress-rate>진행률(%)</div>
279
+ </span>
280
+ </div>
200
281
  </div>
201
282
  <div inspection>
202
283
  <span name bold>
@@ -244,13 +325,15 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
244
325
  <tbody>
245
326
  ${this.buildingInspections.map((inspection, idx) => {
246
327
  var _a, _b, _c, _d, _e, _f;
247
- return html ` <tr @click=${() => this._onClickInspection(inspection.id || '')}>
328
+ return html ` <tr @click=${() => this._onClickInspection(inspection)}>
248
329
  <td>${idx + 1}</td>
249
- <td>${(_b = (_a = inspection === null || inspection === void 0 ? void 0 : inspection.buildingLevel) === null || _a === void 0 ? void 0 : _a.building) === null || _b === void 0 ? void 0 : _b.name} ${(_c = inspection === null || inspection === void 0 ? void 0 : inspection.buildingLevel) === null || _c === void 0 ? void 0 : _c.floor}층</td>
330
+ <td>${(_b = (_a = inspection === null || inspection === void 0 ? void 0 : inspection.buildingLevel) === null || _a === void 0 ? void 0 : _a.building) === null || _b === void 0 ? void 0 : _b.name} ${(_c = inspection === null || inspection === void 0 ? void 0 : inspection.buildingLevel) === null || _c === void 0 ? void 0 : _c.floorDisplayName}층</td>
250
331
  <td bold>${(_d = inspection.checklist) === null || _d === void 0 ? void 0 : _d.constructionType}</td>
251
332
  <td>${((_f = (_e = inspection.checklist) === null || _e === void 0 ? void 0 : _e.inspectionParts) === null || _f === void 0 ? void 0 : _f.join(', ')) || ''}</td>
252
333
  <td>${this._formatDate(inspection.requestDate)}</td>
253
- <td bold>${inspection.status && BUILDING_INSPECTION_STATUS[inspection.status]}</td>
334
+ <td bold status=${inspection.status || ''}>
335
+ ${inspection.status && BUILDING_INSPECTION_STATUS[inspection.status]}
336
+ </td>
254
337
  </tr>`;
255
338
  })}
256
339
  </tbody>
@@ -278,6 +361,7 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
278
361
  name
279
362
  startDate
280
363
  endDate
364
+ projectType
281
365
  mainPhoto {
282
366
  fullpath
283
367
  }
@@ -287,6 +371,7 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
287
371
  inspPassRate
288
372
  robotProgressRate
289
373
  structuralSafetyRate
374
+ robotCount
290
375
  buildingComplex {
291
376
  id
292
377
  address
@@ -329,8 +414,11 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
329
414
  status
330
415
  requestDate
331
416
  buildingLevel {
417
+ id
332
418
  floor
419
+ floorDisplayName
333
420
  building {
421
+ id
334
422
  name
335
423
  }
336
424
  }
@@ -364,8 +452,15 @@ let ProjectDetail = class ProjectDetail extends ScopedElementsMixin(PageView) {
364
452
  this.weather = await _getWeather(latitude, longitude);
365
453
  }
366
454
  }
367
- _onClickInspection(buildingInspectionId) {
368
- navigate(`building-inspection-detail-drawing/${buildingInspectionId}`);
455
+ _onClickInspection(buildingInspection) {
456
+ var _a, _b, _c;
457
+ console.log('buildingInspection :', buildingInspection);
458
+ if (this.project.projectType === ProjectType.DSSP) {
459
+ navigate(`building-inspection-grid-detail/${this.project.id}?buildingId=${(_b = (_a = buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.buildingLevel) === null || _a === void 0 ? void 0 : _a.building) === null || _b === void 0 ? void 0 : _b.id}&levelId=${(_c = buildingInspection === null || buildingInspection === void 0 ? void 0 : buildingInspection.buildingLevel) === null || _c === void 0 ? void 0 : _c.id}`);
460
+ }
461
+ else if (this.project.projectType === ProjectType.DCSP) {
462
+ navigate(`building-inspection-detail-drawing/${buildingInspection.id}`);
463
+ }
369
464
  }
370
465
  _formatDate(date) {
371
466
  return date
@@ -398,7 +493,7 @@ ProjectDetail.styles = [
398
493
  --md-outlined-button-container-height: 30px;
399
494
  --md-outlined-button-trailing-space: var(--spacing-medium, 8px);
400
495
  --md-outlined-button-leading-space: var(--spacing-medium, 8px);
401
- --md-sys-color-outline: rgba(51,51,51,.20);
496
+ --md-sys-color-outline: rgba(51, 51, 51, 0.2);
402
497
  }
403
498
 
404
499
  *[bold] {
@@ -412,7 +507,7 @@ ProjectDetail.styles = [
412
507
  h2 {
413
508
  flex: 0.5;
414
509
  color: #3f71a0;
415
- font-size:18px;
510
+ font-size: 18px;
416
511
  }
417
512
 
418
513
  div[button-container] {
@@ -443,7 +538,7 @@ ProjectDetail.styles = [
443
538
  div[body] {
444
539
  display: flex;
445
540
  margin: var(--spacing-large, 12px);
446
- margin-top:0;
541
+ margin-top: 0;
447
542
  gap: var(--spacing-medium, 8px);
448
543
 
449
544
  h3 {
@@ -529,41 +624,55 @@ ProjectDetail.styles = [
529
624
  --md-outlined-button-container-height: 30px;
530
625
  --md-outlined-button-trailing-space: var(--spacing-medium, 8px);
531
626
  --md-outlined-button-leading-space: var(--spacing-medium, 8px);
532
- --md-sys-color-outline: rgba(51,51,51,.20);
627
+ --md-sys-color-outline: rgba(51, 51, 51, 0.2);
533
628
  }
534
629
  }
535
630
  }
536
631
 
537
632
  div[right-top] {
538
633
  div[state] {
539
- display: grid;
540
- grid-template-columns: 0.95fr 0.95fr 1.1fr;
634
+ display: flex;
635
+ flex-direction: column;
541
636
  gap: var(--spacing-large, 12px);
542
637
 
543
- span[progress] {
544
- max-width: 150px;
545
- text-align: center;
638
+ div[progress-container] {
546
639
  display: flex;
547
- justify-self: center;
548
- flex-direction: column;
549
- width: 100%;
640
+ justify-content: space-around;
641
+ gap: 8px;
550
642
 
551
- & > div {
552
- font-weight: bold;
553
- color: #2e79be;
554
- font-size: 12px;
555
- margin-top: var(--spacing-small, 4px);
556
- }
557
- & > div[week] {
558
- color: #06b5af;
643
+ span[progress] {
644
+ max-width: 165px;
645
+ text-align: center;
646
+ display: flex;
647
+ justify-self: center;
648
+ flex-direction: column;
649
+ width: 100%;
650
+ margin-inline: 12px;
651
+
652
+ & > div {
653
+ font-weight: bold;
654
+ color: #2e79be;
655
+ font-size: 16px;
656
+ margin-top: 9px;
657
+ }
658
+ & > div[week] {
659
+ color: #06b5af;
660
+ }
661
+ & > div[insp-pass-rate] {
662
+ color: #1bb401;
663
+ }
664
+ & > div[robot-progress-rate] {
665
+ color: #8957d8;
666
+ }
559
667
  }
560
668
  }
561
- span[weather] {
669
+
670
+ div[weather] {
562
671
  display: flex;
563
672
  flex-direction: column;
564
673
  gap: var(--spacing-small, 4px);
565
674
  margin-left: var(--spacing-medium, 8px);
566
- font-size:14px;
675
+ font-size: 14px;
567
676
 
568
677
  & > div {
569
678
  display: flex;
@@ -573,8 +682,8 @@ ProjectDetail.styles = [
573
682
 
574
683
  & > span {
575
684
  display: flex;
576
- align-item:center;
577
- var(--spacing-tiny, 2px);
685
+ align-items: center;
686
+ gap: var(--spacing-tiny, 2px);
578
687
  }
579
688
  }
580
689
  }
@@ -582,7 +691,7 @@ ProjectDetail.styles = [
582
691
  div[inspection] {
583
692
  display: grid;
584
693
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr 0.9fr;
585
- margin-top: var(--spacing-small, 4px);
694
+ margin-top: 10px;
586
695
  background: #f6f6f6;
587
696
  border-radius: 7px;
588
697
  padding: var(--spacing-small, 4px) 0px;
@@ -610,7 +719,7 @@ ProjectDetail.styles = [
610
719
  flex-direction: row;
611
720
  text-align: right;
612
721
  gap: var(--spacing-medium, 8px);
613
- line-height:1.3;
722
+ line-height: 1.3;
614
723
 
615
724
  md-icon {
616
725
  width: 40px;
@@ -621,6 +730,82 @@ ProjectDetail.styles = [
621
730
  }
622
731
  }
623
732
  }
733
+ div[kpi-container] {
734
+ display: flex;
735
+ gap: 8px;
736
+ margin-bottom: 8px;
737
+ align-items: center;
738
+
739
+ div[kpi-header] {
740
+ grid-column: 1 / -1;
741
+ display: flex;
742
+ justify-content: space-between;
743
+ align-items: center;
744
+ margin-bottom: var(--spacing-small, 4px);
745
+
746
+ span[kpi-title] {
747
+ font-weight: bold;
748
+ font-size: 16px;
749
+ color: #2e79be;
750
+ }
751
+
752
+ span[kpi-datetime] {
753
+ font-size: 12px;
754
+ color: #666;
755
+ }
756
+ }
757
+
758
+ div[kpi-info-item] {
759
+ display: flex;
760
+ flex: 1;
761
+ flex-direction: column;
762
+ align-items: center;
763
+ padding: 5px;
764
+ background: #f6f6f6;
765
+ border-radius: 4px;
766
+ min-height: 50px;
767
+ justify-content: center;
768
+ margin-inline: 12px;
769
+ border-radius: 7px;
770
+
771
+ span[kpi-info-label] {
772
+ font-size: 16px;
773
+ color: #4e5055;
774
+ margin-bottom: 2px;
775
+ }
776
+
777
+ span[kpi-info-value] {
778
+ font-size: 18px;
779
+
780
+ & > span[small] {
781
+ font-size: 17px;
782
+ }
783
+ }
784
+
785
+ &[weather] {
786
+ background: none;
787
+ align-items: flex-start;
788
+
789
+ & > div {
790
+ width: 100%;
791
+ }
792
+ }
793
+
794
+ &[kpi] {
795
+ flex-direction: row;
796
+ justify-content: space-around;
797
+
798
+ div[kpi-info-label] {
799
+ display: flex;
800
+ flex-direction: column;
801
+ }
802
+
803
+ ox-progress-circle {
804
+ width: 45px;
805
+ }
806
+ }
807
+ }
808
+ }
624
809
  div[notice] {
625
810
  margin-top: var(--spacing-medium, 8px);
626
811
 
@@ -679,7 +864,7 @@ ProjectDetail.styles = [
679
864
  }
680
865
 
681
866
  tbody td {
682
- border-bottom: 1px solid rgba(51,51,51,.20);
867
+ border-bottom: 1px solid rgba(51, 51, 51, 0.2);
683
868
  padding: var(--spacing-small, 4px);
684
869
  text-align: center;
685
870
  white-space: nowrap;
@@ -688,6 +873,10 @@ ProjectDetail.styles = [
688
873
  font-size: 13px;
689
874
  }
690
875
 
876
+ tbody td[status='FAIL'] {
877
+ color: #e15757;
878
+ }
879
+
691
880
  md-elevated-button {
692
881
  margin: 0 var(--spacing-small, 4px);
693
882