@dssp/dkpi 1.0.0-alpha.80 → 1.0.0-alpha.82

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 (68) hide show
  1. package/dist-client/bootstrap.d.ts +1 -0
  2. package/dist-client/bootstrap.js +11 -0
  3. package/dist-client/bootstrap.js.map +1 -1
  4. package/dist-client/components/kpi-single-boxplot-chart.d.ts +3 -2
  5. package/dist-client/components/kpi-single-boxplot-chart.js +30 -23
  6. package/dist-client/components/kpi-single-boxplot-chart.js.map +1 -1
  7. package/dist-client/pages/component/project-update-header.d.ts +1 -0
  8. package/dist-client/pages/component/project-update-header.js +127 -0
  9. package/dist-client/pages/component/project-update-header.js.map +1 -0
  10. package/dist-client/pages/kpi-admin/kpi-system-guide.d.ts +1 -1
  11. package/dist-client/pages/kpi-admin/kpi-system-guide.js +29 -21
  12. package/dist-client/pages/kpi-admin/kpi-system-guide.js.map +1 -1
  13. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.d.ts +1 -1
  14. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js +1 -1
  15. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js.map +1 -1
  16. package/dist-client/pages/kpi-value/kpi-value-list-page.js +1 -1
  17. package/dist-client/pages/kpi-value/kpi-value-list-page.js.map +1 -1
  18. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.d.ts +21 -2
  19. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js +166 -134
  20. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js.map +1 -1
  21. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.d.ts +4 -2
  22. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js +109 -44
  23. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js.map +1 -1
  24. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.d.ts +3 -0
  25. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js +32 -4
  26. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js.map +1 -1
  27. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.d.ts +24 -0
  28. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js +365 -157
  29. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js.map +1 -1
  30. package/dist-client/pages/sv-project-complete.d.ts +4 -1
  31. package/dist-client/pages/sv-project-complete.js +43 -12
  32. package/dist-client/pages/sv-project-complete.js.map +1 -1
  33. package/dist-client/pages/sv-project-completed-list.js +3 -3
  34. package/dist-client/pages/sv-project-completed-list.js.map +1 -1
  35. package/dist-client/pages/sv-project-detail.d.ts +11 -0
  36. package/dist-client/pages/sv-project-detail.js +188 -46
  37. package/dist-client/pages/sv-project-detail.js.map +1 -1
  38. package/dist-client/pages/sv-project-list.d.ts +10 -0
  39. package/dist-client/pages/sv-project-list.js +96 -6
  40. package/dist-client/pages/sv-project-list.js.map +1 -1
  41. package/dist-client/pages/sv-project-update.d.ts +86 -0
  42. package/dist-client/pages/sv-project-update.js +1121 -0
  43. package/dist-client/pages/sv-project-update.js.map +1 -0
  44. package/dist-client/route.d.ts +1 -1
  45. package/dist-client/route.js +3 -0
  46. package/dist-client/route.js.map +1 -1
  47. package/dist-client/shared/complete-api.d.ts +10 -9
  48. package/dist-client/shared/complete-api.js +47 -19
  49. package/dist-client/shared/complete-api.js.map +1 -1
  50. package/dist-client/tsconfig.tsbuildinfo +1 -1
  51. package/dist-client/viewparts/menu-tools.js +47 -54
  52. package/dist-client/viewparts/menu-tools.js.map +1 -1
  53. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.d.ts +23 -0
  54. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js +72 -28
  55. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js.map +1 -1
  56. package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +9 -2
  57. package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +1 -1
  58. package/dist-server/service/kpi-stat/kpi-stat-query.js +19 -18
  59. package/dist-server/service/kpi-stat/kpi-stat-query.js.map +1 -1
  60. package/dist-server/service/kpi-value/kpi-value-query.js +2 -2
  61. package/dist-server/service/kpi-value/kpi-value-query.js.map +1 -1
  62. package/dist-server/tsconfig.tsbuildinfo +1 -1
  63. package/package.json +3 -3
  64. package/schema.graphql +13 -1
  65. package/things-factory.config.js +1 -0
  66. package/dist-client/shared/domain-context.d.ts +0 -7
  67. package/dist-client/shared/domain-context.js +0 -13
  68. package/dist-client/shared/domain-context.js.map +0 -1
@@ -7,7 +7,8 @@ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
7
7
  import { PROJECT_STATE } from './sv-project-list';
8
8
  import { client } from '@operato/graphql';
9
9
  import gql from 'graphql-tag';
10
- import { isProjectTypeDomain } from '../shared/domain-context';
10
+ import moment from 'moment-timezone';
11
+ import { isProjectTypeDomain, tenantHeaders } from '@dssp/project/dist-client/shared/domain-context';
11
12
  import '../components/kpi-boxplot-chart';
12
13
  import '../components/kpi-single-boxplot-chart';
13
14
  import '../components/kpi-radar-chart';
@@ -22,15 +23,19 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
22
23
  this.projectXKpiValues = [];
23
24
  this.showScoreDistribution = false;
24
25
  this.selectedKpi = null;
26
+ /** 이 프로젝트에 아직 한 번도 입력되지 않은 metric (active 한 manual/import 한정) */
27
+ this.pendingMetrics = [];
25
28
  }
26
29
  get context() {
27
30
  var _a;
28
31
  return {
29
- title: this.project ? `프로젝트 상세 정보 - ${(_a = this.project) === null || _a === void 0 ? void 0 : _a.name}` : '프로젝트 상세 정보'
32
+ title: !isProjectTypeDomain() && this.project
33
+ ? `프로젝트 상세 정보 - ${(_a = this.project) === null || _a === void 0 ? void 0 : _a.name}`
34
+ : '프로젝트 상세 정보'
30
35
  };
31
36
  }
32
37
  render() {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
38
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
34
39
  return html `
35
40
  <div content>
36
41
  <div left>
@@ -56,12 +61,24 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
56
61
  <div class="value status-value">${PROJECT_STATE[this.project.state]}</div>
57
62
  </div>
58
63
  <div class="row">
59
- <div class="label">• 요청상세</div>
60
- <div class="value bold">000</div>
64
+ <div class="label">• 유형</div>
65
+ <div class="value">
66
+ ${this.project.sectorType === 'PUBLIC'
67
+ ? '공공'
68
+ : this.project.sectorType === 'PRIVATE'
69
+ ? '민간'
70
+ : '-'}
71
+ </div>
61
72
  </div>
62
73
  <div class="row">
63
- <div class="label">• 알람</div>
64
- <div class="value">000</div>
74
+ <div class="label">• 용도</div>
75
+ <div class="value">
76
+ ${this.project.buildingUsage === 'RESIDENTIAL'
77
+ ? '주거'
78
+ : this.project.buildingUsage === 'NON_RESIDENTIAL'
79
+ ? '비주거'
80
+ : '-'}
81
+ </div>
65
82
  </div>
66
83
  </div>
67
84
  </div>
@@ -77,11 +94,15 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
77
94
  </div>
78
95
  <div class="grid-item row">
79
96
  <div class="label">• 용적률</div>
80
- <div class="value">000 %</div>
97
+ <div class="value">
98
+ ${((_h = (_g = this.project.buildingComplex) === null || _g === void 0 ? void 0 : _g.floorAreaRatio) === null || _h === void 0 ? void 0 : _h.toLocaleString()) || '-'} %
99
+ </div>
81
100
  </div>
82
101
  <div class="grid-item row">
83
102
  <div class="label">• 투입인력</div>
84
- <div class="value">000 명</div>
103
+ <div class="value">
104
+ ${((_k = (_j = this.project.buildingComplex) === null || _j === void 0 ? void 0 : _j.workerCount) === null || _k === void 0 ? void 0 : _k.toLocaleString()) || '-'} 명
105
+ </div>
85
106
  </div>
86
107
  </div>
87
108
  </div>
@@ -92,32 +113,30 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
92
113
  <div class="triangle"></div>
93
114
  </div>
94
115
  <div class="sub-desc">
95
- 현재 입력 기한이 도래했거나, 입력이 지연되고 있는 KPI 항목입니다. 해당 항목에 대한 데이터를 입력 해 주시기 바랍니다.
116
+ 프로젝트에 아직 입력되지 않은 KPI 항목입니다. 해당 항목에 대한 데이터를 입력 해 주시기 바랍니다.
96
117
  </div>
97
118
 
98
119
  <div class="list-block">
99
- <div class="list-title">• 입력 대기 중 2건</div>
100
- <div class="list-text"># 2033312-Y5.1 : 검수자재 불합격률</div>
101
- <div class="list-text"># 2033312-Y5.1 : 품질시험 불합격 건수</div>
102
- </div>
103
- <div class="list-block">
104
- <div class="list-title">• 입력 기한 초과 1건</div>
105
- <div class="list-text">
106
- # 2033312-Y5.2 : 검측 불합격률 <span class="warn">2026.2.12 <md-icon>report</md-icon></span>
107
- </div>
108
- </div>
109
- <div class="list-block">
110
- <div class="list-title">• 입력 예정 4건</div>
111
- <div class="list-text"># 2033320-Y4.32 : 연면적 대비 공기입력</div>
112
- <div class="list-text"># 2012345-Y4.32 : 책임감리원의 일정성과 수준 평가</div>
113
- <div class="list-text"># 2035641-Y5.22 : 설계 변경에 따른 공기 증감률</div>
114
- <div class="list-text"># 2096412-Y5.31 : 현장별 일정 이탈 수준</div>
115
- </div>
116
- <div class="list-block">
117
- <div class="list-title">• 입력 기한 없음 3건</div>
118
- <div class="list-text"># 2033320-Y4.32 : 연면적 대비 공기입력</div>
119
- <div class="list-text"># 2012345-Y4.32 : 책임감리원의 일정성과 수준 평가</div>
120
- <div class="list-text"># 2035641-Y5.22 : 설계 변경에 따른 공기 증감률</div>
120
+ <div class="list-title">• 미입력 ${this.pendingMetrics.length}건</div>
121
+ ${this.pendingMetrics.length === 0
122
+ ? html `<div class="list-text">모든 항목이 입력되었습니다.</div>`
123
+ : this.pendingMetrics.map(m => html `
124
+ <div
125
+ class="list-text"
126
+ style="cursor: pointer;"
127
+ @click=${async () => {
128
+ if (isProjectTypeDomain()) {
129
+ navigate('project-complete');
130
+ return;
131
+ }
132
+ const id = this.project.id || (await this._resolveProjectIdFromDomain());
133
+ if (id)
134
+ navigate(`project-complete/${id}`);
135
+ }}
136
+ >
137
+ # ${m.name}
138
+ </div>
139
+ `)}
121
140
  </div>
122
141
  </div>
123
142
  </div>
@@ -154,7 +173,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
154
173
  }}
155
174
  >
156
175
  <md-icon slot="">assignment_turned_in</md-icon>
157
- <div>프로젝트 완공 처리</div>
176
+ <div>KPI 데이타입력</div>
158
177
  </div>
159
178
  </div>
160
179
  `}
@@ -266,7 +285,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
266
285
  * ASSESSMENT: 5단계 게이지 (kpi-lookup-chart 자동 감지)
267
286
  */''}
268
287
  ${(this.selectedKpi.scoreType === 'CUSTOM' ||
269
- ((_g = this.selectedKpi.grades) === null || _g === void 0 ? void 0 : _g.type) === 'PROGRESS_DEVIATION_LOOKUP') &&
288
+ ((_l = this.selectedKpi.grades) === null || _l === void 0 ? void 0 : _l.type) === 'PROGRESS_DEVIATION_LOOKUP') &&
270
289
  this.selectedKpi.value !== null &&
271
290
  !(this.selectedKpi.value === Math.floor(this.selectedKpi.value) &&
272
291
  this.selectedKpi.value >= 1 &&
@@ -275,7 +294,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
275
294
  <kpi-2d-lookup-chart
276
295
  .grades=${this.selectedKpi.grades}
277
296
  .value=${this.selectedKpi.value}
278
- .progressRate=${(_j = (_h = this.project) === null || _h === void 0 ? void 0 : _h.totalProgress) !== null && _j !== void 0 ? _j : 50}
297
+ .progressRate=${(_o = (_m = this.project) === null || _m === void 0 ? void 0 : _m.totalProgress) !== null && _o !== void 0 ? _o : 50}
279
298
  unit="%"
280
299
  kpiName=${this.selectedKpi.kpiName || ''}
281
300
  ></kpi-2d-lookup-chart>
@@ -312,11 +331,39 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
312
331
  // initProject 의 GraphQL 응답을 기다리지 않고 project.id 를 즉시 채워서,
313
332
  // 링크의 `project-update/${project.id}` 가 절대 undefined 가 되지 않도록 보장.
314
333
  this.project = Object.assign(Object.assign({}, this.project), { id: projectId });
334
+ // 후속 query 들이 tenant 컨텍스트로 동작하도록 project.code 를 먼저 가볍게 resolve.
335
+ // (tenant 컨텍스트에서 진입한 경우는 헤더 불필요 — tenantHeaders 가 빈 객체 반환.)
336
+ if (!isProjectTypeDomain()) {
337
+ await this._resolveProjectCode(projectId);
338
+ }
315
339
  this.initProject(projectId);
316
340
  this.getKpiComprehensiveStats();
317
341
  this.getKpiYComprehensiveStats();
318
342
  this.getProjectXKpiValues(projectId);
319
343
  }
344
+ async _resolveProjectCode(projectId) {
345
+ var _a, _b;
346
+ try {
347
+ const resp = await client.query({
348
+ query: gql `
349
+ query ProjectCode($id: String!) {
350
+ project(id: $id) {
351
+ id
352
+ code
353
+ }
354
+ }
355
+ `,
356
+ variables: { id: projectId }
357
+ });
358
+ const code = (_b = (_a = resp.data) === null || _a === void 0 ? void 0 : _a.project) === null || _b === void 0 ? void 0 : _b.code;
359
+ if (code) {
360
+ this.project = Object.assign(Object.assign({}, this.project), { code });
361
+ }
362
+ }
363
+ catch (e) {
364
+ console.warn('[project-detail] project.code resolve 실패', e);
365
+ }
366
+ }
320
367
  async _resolveProjectIdFromDomain() {
321
368
  var _a, _b;
322
369
  const response = await client.query({
@@ -331,17 +378,20 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
331
378
  return ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.currentProject) === null || _b === void 0 ? void 0 : _b.id) || '';
332
379
  }
333
380
  async initProject(projectId = '') {
334
- var _a;
381
+ var _a, _b;
335
382
  const response = await client.query({
336
383
  query: gql `
337
384
  query Project($id: String!) {
338
385
  project(id: $id) {
339
386
  id
387
+ code
340
388
  name
341
389
  state
342
390
  startDate
343
391
  endDate
344
392
  projectType
393
+ sectorType
394
+ buildingUsage
345
395
  mainPhoto {
346
396
  fullpath
347
397
  }
@@ -362,6 +412,10 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
362
412
  latitude
363
413
  longitude
364
414
  area
415
+ coverageRatio
416
+ floorAreaRatio
417
+ siteType
418
+ workerCount
365
419
  clientCompany
366
420
  constructionCompany
367
421
  supervisoryCompany
@@ -387,14 +441,92 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
387
441
  }
388
442
  }
389
443
  `,
390
- variables: { id: projectId }
444
+ variables: { id: projectId },
445
+ context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
391
446
  });
392
447
  if (response.errors)
393
448
  return;
394
- this.project = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.project) || {};
449
+ this.project = ((_b = response.data) === null || _b === void 0 ? void 0 : _b.project) || {};
395
450
  this.updateContext();
451
+ this._loadPendingMetrics();
452
+ }
453
+ /**
454
+ * 이 프로젝트의 미입력 KPI metric 들을 조회 — Step 1/2 와 동일 기준.
455
+ * - 대상: active=true 인 manual/import metric (자동수집/외부API 제외)
456
+ * - 판정:
457
+ * · MONTH metric → 전월 row (periodType='MONTH', valueDate startsWith 전월) 없으면 pending
458
+ * · 그 외 → (metric, periodType) 매칭 row 없으면 pending
459
+ */
460
+ async _loadPendingMetrics() {
461
+ var _a, _b, _c, _d, _e, _f, _g;
462
+ if (!((_a = this.project) === null || _a === void 0 ? void 0 : _a.id)) {
463
+ this.pendingMetrics = [];
464
+ return;
465
+ }
466
+ try {
467
+ // 1) Active manual/import metric 정의 목록 (periodType 포함)
468
+ const metricsResp = await client.query({
469
+ query: gql `
470
+ query KpiMetrics {
471
+ kpiMetrics {
472
+ items {
473
+ id
474
+ name
475
+ description
476
+ periodType
477
+ collectType
478
+ active
479
+ }
480
+ }
481
+ }
482
+ `,
483
+ context: { headers: tenantHeaders((_b = this.project) === null || _b === void 0 ? void 0 : _b.code) }
484
+ });
485
+ // collectType 필터 제거 — Step 1/2 가 모든 metric 을 보여주므로 동일하게 전체 대상.
486
+ // active=false 인 metric 만 제외.
487
+ const targets = (((_d = (_c = metricsResp.data) === null || _c === void 0 ? void 0 : _c.kpiMetrics) === null || _d === void 0 ? void 0 : _d.items) || []).filter((m) => m.active);
488
+ if (targets.length === 0) {
489
+ this.pendingMetrics = [];
490
+ return;
491
+ }
492
+ // 2) 이 프로젝트의 모든 KpiMetricValue (value 도 가져와서 null/undefined 체크)
493
+ const valuesResp = await client.query({
494
+ query: gql `
495
+ query KpiMetricValues($filters: [Filter!]) {
496
+ kpiMetricValues(filters: $filters) {
497
+ items {
498
+ metricId
499
+ periodType
500
+ valueDate
501
+ value
502
+ }
503
+ }
504
+ }
505
+ `,
506
+ variables: { filters: [{ name: 'org', operator: 'eq', value: this.project.id }] },
507
+ context: { headers: tenantHeaders((_e = this.project) === null || _e === void 0 ? void 0 : _e.code) }
508
+ });
509
+ const values = ((_g = (_f = valuesResp.data) === null || _f === void 0 ? void 0 : _f.kpiMetricValues) === null || _g === void 0 ? void 0 : _g.items) || [];
510
+ const lastMonthYm = moment().tz('Asia/Seoul').subtract(1, 'month').format('YYYY-MM');
511
+ // 3) Step 1/2 와 동일 기준으로 미입력 판정 — row 존재 AND value 존재 (null/undefined 아님).
512
+ const hasValid = (v) => v.value !== null && v.value !== undefined;
513
+ this.pendingMetrics = targets.filter((m) => {
514
+ if (m.periodType === 'MONTH') {
515
+ return !values.some(v => v.metricId === m.id &&
516
+ v.periodType === 'MONTH' &&
517
+ (v.valueDate || '').startsWith(lastMonthYm) &&
518
+ hasValid(v));
519
+ }
520
+ return !values.some(v => v.metricId === m.id && v.periodType === m.periodType && hasValid(v));
521
+ });
522
+ }
523
+ catch (e) {
524
+ console.error('[입력 대기 중] 조회 실패', e);
525
+ this.pendingMetrics = [];
526
+ }
396
527
  }
397
528
  async getKpiComprehensiveStats() {
529
+ var _a;
398
530
  try {
399
531
  const response = await client.query({
400
532
  query: gql `
@@ -407,7 +539,8 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
407
539
  maxVal
408
540
  }
409
541
  }
410
- `
542
+ `,
543
+ context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
411
544
  });
412
545
  this.kpiComprehensiveStats = response.data.totalKpiZValueComprehensiveStats || [];
413
546
  }
@@ -417,6 +550,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
417
550
  }
418
551
  }
419
552
  async getKpiYComprehensiveStats() {
553
+ var _a;
420
554
  try {
421
555
  const response = await client.query({
422
556
  query: gql `
@@ -432,7 +566,8 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
432
566
  projectCount
433
567
  }
434
568
  }
435
- `
569
+ `,
570
+ context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
436
571
  });
437
572
  this.kpiYComprehensiveStats = response.data.totalKpiYValueComprehensiveStats || [];
438
573
  }
@@ -442,6 +577,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
442
577
  }
443
578
  }
444
579
  async getProjectXKpiValues(projectId) {
580
+ var _a;
445
581
  try {
446
582
  const response = await client.query({
447
583
  query: gql `
@@ -458,7 +594,8 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
458
594
  }
459
595
  }
460
596
  `,
461
- variables: { projectId }
597
+ variables: { projectId },
598
+ context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
462
599
  });
463
600
  this.projectXKpiValues = response.data.projectXKpiValues || [];
464
601
  }
@@ -479,7 +616,7 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
479
616
  this._fetchKpiWithGradesByPattern(kpiNamePattern, metric.label);
480
617
  }
481
618
  async _fetchKpiWithGradesByPattern(kpiNamePattern, displayName) {
482
- var _a, _b, _c;
619
+ var _a, _b, _c, _d;
483
620
  try {
484
621
  // X-KPI 이름 패턴으로 전체 이름 찾기 (projectXKpiValues에서)
485
622
  const kpiValue = this.projectXKpiValues.find(kv => { var _a; return ((_a = kv.kpi) === null || _a === void 0 ? void 0 : _a.name) && kv.kpi.name.includes(kpiNamePattern); });
@@ -501,9 +638,10 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
501
638
  }
502
639
  }
503
640
  `,
504
- variables: { id: kpiValue.kpi.id }
641
+ variables: { id: kpiValue.kpi.id },
642
+ context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
505
643
  });
506
- if (response.errors || !((_a = response.data) === null || _a === void 0 ? void 0 : _a.kpi)) {
644
+ if (response.errors || !((_b = response.data) === null || _b === void 0 ? void 0 : _b.kpi)) {
507
645
  console.error('KPI not found or error:', response.errors);
508
646
  return;
509
647
  }
@@ -518,8 +656,8 @@ let SvProjectDetailPage = class SvProjectDetailPage extends ScopedElementsMixin(
518
656
  grades: kpi.grades || [],
519
657
  scoreType: kpi.scoreType || '',
520
658
  valueType: kpi.valueType || '',
521
- value: (_b = kpiValue.value) !== null && _b !== void 0 ? _b : null,
522
- unit: ((_c = kpi.vizMeta) === null || _c === void 0 ? void 0 : _c.unit) || ''
659
+ value: (_c = kpiValue.value) !== null && _c !== void 0 ? _c : null,
660
+ unit: ((_d = kpi.vizMeta) === null || _d === void 0 ? void 0 : _d.unit) || ''
523
661
  };
524
662
  this.showScoreDistribution = true;
525
663
  }
@@ -1275,6 +1413,10 @@ __decorate([
1275
1413
  state(),
1276
1414
  __metadata("design:type", Object)
1277
1415
  ], SvProjectDetailPage.prototype, "selectedKpi", void 0);
1416
+ __decorate([
1417
+ state(),
1418
+ __metadata("design:type", Array)
1419
+ ], SvProjectDetailPage.prototype, "pendingMetrics", void 0);
1278
1420
  SvProjectDetailPage = __decorate([
1279
1421
  customElement('sv-project-detail')
1280
1422
  ], SvProjectDetailPage);