@dssp/dkpi 1.0.0-alpha.99 → 1.0.0
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.
- package/package.json +55 -55
- package/dist-client/bootstrap.d.ts +0 -9
- package/dist-client/bootstrap.js +0 -272
- package/dist-client/bootstrap.js.map +0 -1
- package/dist-client/components/kpi-2d-lookup-chart.d.ts +0 -50
- package/dist-client/components/kpi-2d-lookup-chart.js +0 -263
- package/dist-client/components/kpi-2d-lookup-chart.js.map +0 -1
- package/dist-client/components/kpi-boxplot-chart.d.ts +0 -31
- package/dist-client/components/kpi-boxplot-chart.js +0 -306
- package/dist-client/components/kpi-boxplot-chart.js.map +0 -1
- package/dist-client/components/kpi-lookup-chart.d.ts +0 -58
- package/dist-client/components/kpi-lookup-chart.js +0 -464
- package/dist-client/components/kpi-lookup-chart.js.map +0 -1
- package/dist-client/components/kpi-mini-trend-chart.d.ts +0 -14
- package/dist-client/components/kpi-mini-trend-chart.js +0 -180
- package/dist-client/components/kpi-mini-trend-chart.js.map +0 -1
- package/dist-client/components/kpi-radar-chart.d.ts +0 -17
- package/dist-client/components/kpi-radar-chart.js +0 -259
- package/dist-client/components/kpi-radar-chart.js.map +0 -1
- package/dist-client/components/kpi-single-boxplot-chart.d.ts +0 -36
- package/dist-client/components/kpi-single-boxplot-chart.js +0 -417
- package/dist-client/components/kpi-single-boxplot-chart.js.map +0 -1
- package/dist-client/components/kpi-step-lookup-chart.d.ts +0 -33
- package/dist-client/components/kpi-step-lookup-chart.js +0 -181
- package/dist-client/components/kpi-step-lookup-chart.js.map +0 -1
- package/dist-client/components/kpi-trend-chart.d.ts +0 -25
- package/dist-client/components/kpi-trend-chart.js +0 -241
- package/dist-client/components/kpi-trend-chart.js.map +0 -1
- package/dist-client/components/sv-pagenation-control.d.ts +0 -18
- package/dist-client/components/sv-pagenation-control.js +0 -142
- package/dist-client/components/sv-pagenation-control.js.map +0 -1
- package/dist-client/entries/auth/checkin.d.ts +0 -38
- package/dist-client/entries/auth/checkin.js +0 -551
- package/dist-client/entries/auth/checkin.js.map +0 -1
- package/dist-client/entries/public/home.d.ts +0 -8
- package/dist-client/entries/public/home.js +0 -97
- package/dist-client/entries/public/home.js.map +0 -1
- package/dist-client/google-map/common-google-map.d.ts +0 -35
- package/dist-client/google-map/common-google-map.js +0 -349
- package/dist-client/google-map/common-google-map.js.map +0 -1
- package/dist-client/google-map/google-map-loader.d.ts +0 -6
- package/dist-client/google-map/google-map-loader.js +0 -23
- package/dist-client/google-map/google-map-loader.js.map +0 -1
- package/dist-client/icons/menu-icons.d.ts +0 -11
- package/dist-client/icons/menu-icons.js +0 -126
- package/dist-client/icons/menu-icons.js.map +0 -1
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +0 -2
- package/dist-client/index.js.map +0 -1
- package/dist-client/menu.d.ts +0 -23
- package/dist-client/menu.js +0 -59
- package/dist-client/menu.js.map +0 -1
- package/dist-client/pages/component/project-update-header.d.ts +0 -1
- package/dist-client/pages/component/project-update-header.js +0 -127
- package/dist-client/pages/component/project-update-header.js.map +0 -1
- package/dist-client/pages/kpi-admin/dssp-kpi-list-page.d.ts +0 -22
- package/dist-client/pages/kpi-admin/dssp-kpi-list-page.js +0 -57
- package/dist-client/pages/kpi-admin/dssp-kpi-list-page.js.map +0 -1
- package/dist-client/pages/kpi-admin/dssp-kpi-overview.d.ts +0 -47
- package/dist-client/pages/kpi-admin/dssp-kpi-overview.js +0 -393
- package/dist-client/pages/kpi-admin/dssp-kpi-overview.js.map +0 -1
- package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.d.ts +0 -20
- package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.js +0 -445
- package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.js.map +0 -1
- package/dist-client/pages/kpi-admin/kpi-system-guide.d.ts +0 -18
- package/dist-client/pages/kpi-admin/kpi-system-guide.js +0 -696
- package/dist-client/pages/kpi-admin/kpi-system-guide.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.d.ts +0 -18
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js +0 -259
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.d.ts +0 -22
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js +0 -346
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.d.ts +0 -26
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js +0 -433
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.d.ts +0 -8
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js +0 -78
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.d.ts +0 -46
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js +0 -945
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.d.ts +0 -34
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js +0 -238
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.d.ts +0 -37
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js +0 -689
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.d.ts +0 -18
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js +0 -131
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.d.ts +0 -57
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js +0 -866
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.d.ts +0 -63
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.js +0 -1097
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.d.ts +0 -12
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js +0 -82
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.d.ts +0 -11
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js +0 -65
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.d.ts +0 -13
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.js +0 -115
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.d.ts +0 -15
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js +0 -147
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js.map +0 -1
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.d.ts +0 -7
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.js +0 -86
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.js.map +0 -1
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.d.ts +0 -57
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js +0 -719
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js.map +0 -1
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.d.ts +0 -23
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js +0 -76
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js.map +0 -1
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.d.ts +0 -68
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js +0 -394
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js.map +0 -1
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.d.ts +0 -12
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js +0 -174
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js.map +0 -1
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.d.ts +0 -40
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js +0 -190
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js.map +0 -1
- package/dist-client/pages/kpi-value/kpi-value-importer.d.ts +0 -23
- package/dist-client/pages/kpi-value/kpi-value-importer.js +0 -93
- package/dist-client/pages/kpi-value/kpi-value-importer.js.map +0 -1
- package/dist-client/pages/kpi-value/kpi-value-list-page.d.ts +0 -71
- package/dist-client/pages/kpi-value/kpi-value-list-page.js +0 -454
- package/dist-client/pages/kpi-value/kpi-value-list-page.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.d.ts +0 -69
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js +0 -790
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab2-rating.d.ts +0 -22
- package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js +0 -344
- package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab3-upload.d.ts +0 -21
- package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js +0 -335
- package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.d.ts +0 -51
- package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js +0 -674
- package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js.map +0 -1
- package/dist-client/pages/sv-project-complete.d.ts +0 -31
- package/dist-client/pages/sv-project-complete.js +0 -359
- package/dist-client/pages/sv-project-complete.js.map +0 -1
- package/dist-client/pages/sv-project-completed-list.d.ts +0 -27
- package/dist-client/pages/sv-project-completed-list.js +0 -416
- package/dist-client/pages/sv-project-completed-list.js.map +0 -1
- package/dist-client/pages/sv-project-detail.d.ts +0 -73
- package/dist-client/pages/sv-project-detail.js +0 -1501
- package/dist-client/pages/sv-project-detail.js.map +0 -1
- package/dist-client/pages/sv-project-list.d.ts +0 -175
- package/dist-client/pages/sv-project-list.js +0 -581
- package/dist-client/pages/sv-project-list.js.map +0 -1
- package/dist-client/pages/sv-project-update.d.ts +0 -91
- package/dist-client/pages/sv-project-update.js +0 -1150
- package/dist-client/pages/sv-project-update.js.map +0 -1
- package/dist-client/pages/sv-user-management.d.ts +0 -6
- package/dist-client/pages/sv-user-management.js +0 -224
- package/dist-client/pages/sv-user-management.js.map +0 -1
- package/dist-client/route.d.ts +0 -1
- package/dist-client/route.js +0 -58
- package/dist-client/route.js.map +0 -1
- package/dist-client/shared/complete-api.d.ts +0 -45
- package/dist-client/shared/complete-api.js +0 -272
- package/dist-client/shared/complete-api.js.map +0 -1
- package/dist-client/shared/func.d.ts +0 -2
- package/dist-client/shared/func.js +0 -22
- package/dist-client/shared/func.js.map +0 -1
- package/dist-client/shared/geo-group-mapping.d.ts +0 -25
- package/dist-client/shared/geo-group-mapping.js +0 -189
- package/dist-client/shared/geo-group-mapping.js.map +0 -1
- package/dist-client/shared/integration-fetch.d.ts +0 -35
- package/dist-client/shared/integration-fetch.js +0 -53
- package/dist-client/shared/integration-fetch.js.map +0 -1
- package/dist-client/shared/kpi-project-sync.d.ts +0 -16
- package/dist-client/shared/kpi-project-sync.js +0 -129
- package/dist-client/shared/kpi-project-sync.js.map +0 -1
- package/dist-client/themes/dark.css +0 -51
- package/dist-client/themes/light.css +0 -51
- package/dist-client/tsconfig.tsbuildinfo +0 -1
- package/dist-client/viewparts/menu-tools.d.ts +0 -62
- package/dist-client/viewparts/menu-tools.js +0 -554
- package/dist-client/viewparts/menu-tools.js.map +0 -1
- package/dist-client/viewparts/user-circle.d.ts +0 -5
- package/dist-client/viewparts/user-circle.js +0 -26
- package/dist-client/viewparts/user-circle.js.map +0 -1
- package/dist-server/index.d.ts +0 -2
- package/dist-server/index.js +0 -6
- package/dist-server/index.js.map +0 -1
- package/dist-server/migrations/index.d.ts +0 -1
- package/dist-server/migrations/index.js +0 -12
- package/dist-server/migrations/index.js.map +0 -1
- package/dist-server/scripts/calculate-kpi-scores.d.ts +0 -10
- package/dist-server/scripts/calculate-kpi-scores.js +0 -333
- package/dist-server/scripts/calculate-kpi-scores.js.map +0 -1
- package/dist-server/scripts/load-grade-data-migration.d.ts +0 -14
- package/dist-server/scripts/load-grade-data-migration.js +0 -279
- package/dist-server/scripts/load-grade-data-migration.js.map +0 -1
- package/dist-server/scripts/propagate-parent-kpi-values.d.ts +0 -14
- package/dist-server/scripts/propagate-parent-kpi-values.js +0 -786
- package/dist-server/scripts/propagate-parent-kpi-values.js.map +0 -1
- package/dist-server/scripts/recalculate-by-project-name.d.ts +0 -2
- package/dist-server/scripts/recalculate-by-project-name.js +0 -72
- package/dist-server/scripts/recalculate-by-project-name.js.map +0 -1
- package/dist-server/service/index.d.ts +0 -4
- package/dist-server/service/index.js +0 -20
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/kpi-metric-value/index.d.ts +0 -4
- package/dist-server/service/kpi-metric-value/index.js +0 -8
- package/dist-server/service/kpi-metric-value/index.js.map +0 -1
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.d.ts +0 -171
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js +0 -993
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js.map +0 -1
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.d.ts +0 -12
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +0 -56
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +0 -1
- package/dist-server/service/kpi-stat/index.d.ts +0 -4
- package/dist-server/service/kpi-stat/index.js +0 -8
- package/dist-server/service/kpi-stat/index.js.map +0 -1
- package/dist-server/service/kpi-stat/kpi-stat-query.d.ts +0 -13
- package/dist-server/service/kpi-stat/kpi-stat-query.js +0 -751
- package/dist-server/service/kpi-stat/kpi-stat-query.js.map +0 -1
- package/dist-server/service/kpi-stat/kpi-stat-types.d.ts +0 -32
- package/dist-server/service/kpi-stat/kpi-stat-types.js +0 -180
- package/dist-server/service/kpi-stat/kpi-stat-types.js.map +0 -1
- package/dist-server/service/kpi-value/index.d.ts +0 -3
- package/dist-server/service/kpi-value/index.js +0 -7
- package/dist-server/service/kpi-value/index.js.map +0 -1
- package/dist-server/service/kpi-value/kpi-value-query.d.ts +0 -8
- package/dist-server/service/kpi-value/kpi-value-query.js +0 -90
- package/dist-server/service/kpi-value/kpi-value-query.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
|
@@ -1,674 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
|
-
import { client } from '@operato/graphql';
|
|
5
|
-
import { gql } from '@apollo/client';
|
|
6
|
-
import { notify } from '@operato/layout';
|
|
7
|
-
import { OxPrompt } from '@operato/popup';
|
|
8
|
-
import { hasPrivilege } from '@things-factory/auth-base/dist-client';
|
|
9
|
-
import moment from 'moment-timezone';
|
|
10
|
-
import { tenantHeaders } from '@dssp/project/dist-client/shared/domain-context';
|
|
11
|
-
import { ProjectState } from '../sv-project-list';
|
|
12
|
-
import '@things-factory/kpi/dist-client/viewparts/kpi-metric-input';
|
|
13
|
-
/**
|
|
14
|
-
* 프로젝트 완공 처리 탭 4 — 월별 KPI 데이터 그리드.
|
|
15
|
-
*
|
|
16
|
-
* 데이터 source = `KpiMetric` (periodType=MONTH) + `KpiMetricValue` (그 metric 의
|
|
17
|
-
* 월별 값들). 이전 버전 (DataSet/DataSample) 폐기. KpiMetricValue 의 unique
|
|
18
|
-
* 인덱스 (domain, metric, valueDate, org) 가 (도메인, 프로젝트, 메트릭, 월) 단일 row
|
|
19
|
-
* 정책을 보장.
|
|
20
|
-
*
|
|
21
|
-
* 단방향 흐름:
|
|
22
|
-
* - 탭1/탭2 의 metric 저장 (valueDate=YYYY-MM-01) → 그 월 row 가 여기 자동 노출
|
|
23
|
-
* - 여기서 cell 수정 → 그 metric × 그 월 row 만 update (탭1/탭2 의 "현재값" 영향 없음 —
|
|
24
|
-
* 탭1/탭2 는 KpiMetricValueProvider 가 latest 또는 valueDate-based lookup 으로 동작)
|
|
25
|
-
*/
|
|
26
|
-
/** rating 셀렉트로 표시할 metric 인지 판단 — 이름에 '평가' 또는 '이탈' 포함되면 1~5 rating. */
|
|
27
|
-
function isRating(metricName) {
|
|
28
|
-
return /평가|이탈/.test(metricName || '');
|
|
29
|
-
}
|
|
30
|
-
let SvProjectCompleteTab4Monthly = class SvProjectCompleteTab4Monthly extends LitElement {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.project = {};
|
|
34
|
-
/** 월별 metric 목록 (periodType=MONTH). KpiMetric admin 에 등록된 것 기준. */
|
|
35
|
-
this.monthlyMetrics = [];
|
|
36
|
-
/** monthRows: { workDate:'YYYY-MM', values:{[metricId]:value}, originalValues, dirty }[] */
|
|
37
|
-
this.monthRows = [];
|
|
38
|
-
this.addYear = new Date().getFullYear();
|
|
39
|
-
this.addMonth = new Date().getMonth() + 1;
|
|
40
|
-
/** kpi:input — Step4 월별 데이터 저장 권한 (cumulative 와 같은 권한) */
|
|
41
|
-
this.canSave = false;
|
|
42
|
-
}
|
|
43
|
-
async connectedCallback() {
|
|
44
|
-
super.connectedCallback();
|
|
45
|
-
this.canSave = await hasPrivilege({
|
|
46
|
-
category: 'kpi',
|
|
47
|
-
privilege: 'input',
|
|
48
|
-
domainOwnerGranted: true,
|
|
49
|
-
superUserGranted: true
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
const years = this._getYearRange();
|
|
54
|
-
return html `
|
|
55
|
-
<div class="title">
|
|
56
|
-
프로젝트 수행 기간 동안의 월별 데이터를 입력합니다.<br />
|
|
57
|
-
공정률, 감리자 정성 평가(1~5) 등의 항목을 월 단위로 기록하여 성과 추세 분석에 활용합니다.
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
${this.isCompleted
|
|
61
|
-
? html `<div class="toolbar">
|
|
62
|
-
<span class="locked-note">🔒 종료된 프로젝트 — 월 추가 불가, 기존 월 데이터만 수정할 수 있습니다.</span>
|
|
63
|
-
</div>`
|
|
64
|
-
: html `<div class="toolbar">
|
|
65
|
-
<select
|
|
66
|
-
.value=${String(this.addYear)}
|
|
67
|
-
@change=${(e) => (this.addYear = Number(e.target.value))}
|
|
68
|
-
>
|
|
69
|
-
${years.map(y => html `<option value=${y} ?selected=${y === this.addYear}>${y}년</option>`)}
|
|
70
|
-
</select>
|
|
71
|
-
<select
|
|
72
|
-
.value=${String(this.addMonth)}
|
|
73
|
-
@change=${(e) => (this.addMonth = Number(e.target.value))}
|
|
74
|
-
>
|
|
75
|
-
${[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map(m => html `<option value=${m} ?selected=${m === this.addMonth}>${m}월</option>`)}
|
|
76
|
-
</select>
|
|
77
|
-
<div class="add-btn" @click=${this._addMonth}>+ 월 추가</div>
|
|
78
|
-
</div>`}
|
|
79
|
-
|
|
80
|
-
${this.monthlyMetrics.length === 0
|
|
81
|
-
? html `<div class="empty-msg">
|
|
82
|
-
월별 metric (periodType=MONTH) 이 등록되어 있지 않습니다. KPI 관리자에서 먼저 등록해주세요.
|
|
83
|
-
</div>`
|
|
84
|
-
: this.monthRows.length === 0
|
|
85
|
-
? html `<div class="empty-msg">등록된 월별 데이터가 없습니다. 위에서 월을 추가해주세요.</div>`
|
|
86
|
-
: html `
|
|
87
|
-
<div class="grid-wrapper">
|
|
88
|
-
<table>
|
|
89
|
-
<thead>
|
|
90
|
-
<tr>
|
|
91
|
-
<th>월</th>
|
|
92
|
-
${this.monthlyMetrics.map(m => html `
|
|
93
|
-
<th
|
|
94
|
-
class=${this._isMetricNeverEntered(m.id) ? 'pending' : ''}
|
|
95
|
-
title=${this._isMetricNeverEntered(m.id) ? '한 번도 입력된 적 없는 metric' : ''}
|
|
96
|
-
>
|
|
97
|
-
${m.name}${m.unit ? ` (${m.unit})` : ''}
|
|
98
|
-
</th>
|
|
99
|
-
`)}
|
|
100
|
-
<th>상태</th>
|
|
101
|
-
<th></th>
|
|
102
|
-
</tr>
|
|
103
|
-
</thead>
|
|
104
|
-
<tbody>
|
|
105
|
-
${this.monthRows.map((row, rowIdx) => html `
|
|
106
|
-
<tr>
|
|
107
|
-
<td class="month-cell ${this._isCurrentMonth(row.workDate) ? 'current' : ''}">${row.workDate}</td>
|
|
108
|
-
${this.monthlyMetrics.map(m => {
|
|
109
|
-
var _a;
|
|
110
|
-
const pending = this._isCellPending(row, m.id);
|
|
111
|
-
// 위젯은 metric.meta.input 선언으로 결정(이름추측 isRating 제거).
|
|
112
|
-
return html `
|
|
113
|
-
<td class=${pending ? 'pending' : ''}>
|
|
114
|
-
<kpi-metric-input
|
|
115
|
-
.metric=${this._withInputHint(m)}
|
|
116
|
-
.value=${(_a = row.values[m.id]) !== null && _a !== void 0 ? _a : null}
|
|
117
|
-
?disabled=${!this.canSave}
|
|
118
|
-
@metric-input-change=${(e) => this._setCell(rowIdx, m.id, e.detail.value)}
|
|
119
|
-
></kpi-metric-input>
|
|
120
|
-
</td>
|
|
121
|
-
`;
|
|
122
|
-
})}
|
|
123
|
-
<td>
|
|
124
|
-
${row.dirty
|
|
125
|
-
? html `<span class="status-unsaved">수정됨</span>`
|
|
126
|
-
: row.isAuto
|
|
127
|
-
? html `<span class="status-pending">미입력</span>`
|
|
128
|
-
: row.isNew
|
|
129
|
-
? html `<span class="status-new">신규</span>`
|
|
130
|
-
: html `<span class="status-saved">저장됨</span>`}
|
|
131
|
-
</td>
|
|
132
|
-
<td>
|
|
133
|
-
<span class="delete-btn" title="삭제" @click=${() => this._removeMonth(rowIdx)}>✕</span>
|
|
134
|
-
</td>
|
|
135
|
-
</tr>
|
|
136
|
-
`)}
|
|
137
|
-
</tbody>
|
|
138
|
-
</table>
|
|
139
|
-
</div>
|
|
140
|
-
`}
|
|
141
|
-
|
|
142
|
-
<div class="button-line">
|
|
143
|
-
<div class="ghost-btn" @click=${this._reset}>초기화</div>
|
|
144
|
-
<div
|
|
145
|
-
class="ghost-btn secondary ${this.canSave ? '' : 'disabled'}"
|
|
146
|
-
title=${this.canSave ? '' : 'kpi:input 권한 필요'}
|
|
147
|
-
@click=${() => this.canSave && this._save()}
|
|
148
|
-
>
|
|
149
|
-
저장
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
`;
|
|
153
|
-
}
|
|
154
|
-
willUpdate(changedProperties) {
|
|
155
|
-
var _a;
|
|
156
|
-
super.willUpdate(changedProperties);
|
|
157
|
-
if (changedProperties.has('project') && ((_a = this.project) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
158
|
-
this._loadData();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
_getYearRange() {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
const startYear = ((_a = this.project) === null || _a === void 0 ? void 0 : _a.startDate) ? new Date(this.project.startDate).getFullYear() : new Date().getFullYear() - 2;
|
|
164
|
-
const endYear = ((_b = this.project) === null || _b === void 0 ? void 0 : _b.endDate) ? new Date(this.project.endDate).getFullYear() + 1 : new Date().getFullYear() + 1;
|
|
165
|
-
const years = [];
|
|
166
|
-
for (let y = startYear; y <= endYear; y++)
|
|
167
|
-
years.push(y);
|
|
168
|
-
return years;
|
|
169
|
-
}
|
|
170
|
-
_isCurrentMonth(workDate) {
|
|
171
|
-
return workDate === moment().tz('Asia/Seoul').format('YYYY-MM');
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 월별 metric 정의 + 그 프로젝트의 월별 KpiMetricValue 들을 조회해 그리드 row 구성.
|
|
175
|
-
*
|
|
176
|
-
* 1) KpiMetric where periodType=MONTH → monthlyMetrics
|
|
177
|
-
* 2) KpiMetricValue where org=projectId → 월별로 그룹핑하여 monthRows
|
|
178
|
-
*/
|
|
179
|
-
async _loadData() {
|
|
180
|
-
var _a, _b, _c, _d, _e, _f;
|
|
181
|
-
try {
|
|
182
|
-
// 1) 월별 metric 목록
|
|
183
|
-
const metricsResp = await client.query({
|
|
184
|
-
query: gql `
|
|
185
|
-
query KpiMetrics {
|
|
186
|
-
kpiMetrics {
|
|
187
|
-
items {
|
|
188
|
-
id
|
|
189
|
-
name
|
|
190
|
-
unit
|
|
191
|
-
periodType
|
|
192
|
-
rank
|
|
193
|
-
meta
|
|
194
|
-
collectType
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
`,
|
|
199
|
-
context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
|
|
200
|
-
});
|
|
201
|
-
const all = ((_c = (_b = metricsResp.data) === null || _b === void 0 ? void 0 : _b.kpiMetrics) === null || _c === void 0 ? void 0 : _c.items) || [];
|
|
202
|
-
// periodType=MONTH 만, rank 오름차순(미지정 null 은 뒤로, 동률은 기존 순서 유지).
|
|
203
|
-
this.monthlyMetrics = all
|
|
204
|
-
.filter((m) => m.periodType === 'MONTH')
|
|
205
|
-
.map((m, i) => ({ m, i }))
|
|
206
|
-
.sort((a, b) => {
|
|
207
|
-
var _a, _b;
|
|
208
|
-
const ra = (_a = a.m.rank) !== null && _a !== void 0 ? _a : Number.POSITIVE_INFINITY;
|
|
209
|
-
const rb = (_b = b.m.rank) !== null && _b !== void 0 ? _b : Number.POSITIVE_INFINITY;
|
|
210
|
-
return ra !== rb ? ra - rb : a.i - b.i;
|
|
211
|
-
})
|
|
212
|
-
.map((x) => x.m);
|
|
213
|
-
if (this.monthlyMetrics.length === 0) {
|
|
214
|
-
this.monthRows = [];
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
// 2) 프로젝트의 KpiMetricValue 들 (org=projectId). 월별 metric 만 client 측에서 필터.
|
|
218
|
-
const monthlyMetricIds = new Set(this.monthlyMetrics.map((m) => m.id));
|
|
219
|
-
const valuesResp = await client.query({
|
|
220
|
-
query: gql `
|
|
221
|
-
query KpiMetricValues($filters: [Filter!]) {
|
|
222
|
-
kpiMetricValues(filters: $filters) {
|
|
223
|
-
items {
|
|
224
|
-
id
|
|
225
|
-
value
|
|
226
|
-
unit
|
|
227
|
-
periodType
|
|
228
|
-
valueDate
|
|
229
|
-
metricId
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
`,
|
|
234
|
-
variables: { filters: [{ name: 'org', operator: 'eq', value: this.project.id }] },
|
|
235
|
-
context: { headers: tenantHeaders((_d = this.project) === null || _d === void 0 ? void 0 : _d.code) }
|
|
236
|
-
});
|
|
237
|
-
const allValues = ((_f = (_e = valuesResp.data) === null || _e === void 0 ? void 0 : _e.kpiMetricValues) === null || _f === void 0 ? void 0 : _f.items) || [];
|
|
238
|
-
// periodType='MONTH' 만 그리드에 — 비월별 row 가 valueDate prefix 로 잘못 묶이지 않도록.
|
|
239
|
-
const monthlyValues = allValues.filter((v) => monthlyMetricIds.has(v.metricId) && v.periodType === 'MONTH');
|
|
240
|
-
// 월별 그룹핑 — valueDate YYYY-MM-DD 의 앞 7자리. id 도 보존 (삭제 시 사용).
|
|
241
|
-
// 현재월(=this month) row 는 운영 원칙상 표시 대상 아님 → 아예 bucket 제외.
|
|
242
|
-
const currentYm = moment().tz('Asia/Seoul').format('YYYY-MM');
|
|
243
|
-
const byMonth = new Map();
|
|
244
|
-
for (const v of monthlyValues) {
|
|
245
|
-
const ym = (v.valueDate || '').slice(0, 7);
|
|
246
|
-
if (!ym)
|
|
247
|
-
continue;
|
|
248
|
-
if (ym === currentYm)
|
|
249
|
-
continue; // 현재월 record 무시 (DB 에 우연히 있더라도)
|
|
250
|
-
if (!byMonth.has(ym))
|
|
251
|
-
byMonth.set(ym, { workDate: ym, values: {}, originalValues: {}, valueIds: {}, dirty: false });
|
|
252
|
-
const row = byMonth.get(ym);
|
|
253
|
-
row.values[v.metricId] = v.value;
|
|
254
|
-
row.originalValues[v.metricId] = v.value;
|
|
255
|
-
row.valueIds[v.metricId] = v.id;
|
|
256
|
-
}
|
|
257
|
-
// project.startDate ~ 현재월 사이 누락된 월 placeholder row 자동 추가.
|
|
258
|
-
// 사용자가 값을 입력하지 않으면 dirty 가 안 되므로 저장 시 무시되어 spurious patch 없음.
|
|
259
|
-
for (const ym of this._generateExpectedMonths()) {
|
|
260
|
-
if (!byMonth.has(ym)) {
|
|
261
|
-
byMonth.set(ym, {
|
|
262
|
-
workDate: ym,
|
|
263
|
-
values: {},
|
|
264
|
-
originalValues: {},
|
|
265
|
-
valueIds: {},
|
|
266
|
-
dirty: false,
|
|
267
|
-
isAuto: true
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
this.monthRows = Array.from(byMonth.values()).sort((a, b) => b.workDate.localeCompare(a.workDate));
|
|
272
|
-
}
|
|
273
|
-
catch (e) {
|
|
274
|
-
console.error('Failed to load monthly data:', e);
|
|
275
|
-
this.monthRows = [];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
/** project.startDate (YYYY-MM) ~ **전월** (YYYY-MM) 까지 매월 문자열 배열.
|
|
279
|
-
* 현재월은 의도적으로 제외 — 운영 원칙상 "이번달 데이터는 아직 입력 대상이 아님". */
|
|
280
|
-
_generateExpectedMonths() {
|
|
281
|
-
var _a;
|
|
282
|
-
const startStr = (((_a = this.project) === null || _a === void 0 ? void 0 : _a.startDate) || '').slice(0, 7);
|
|
283
|
-
if (!startStr || !/^\d{4}-\d{2}$/.test(startStr))
|
|
284
|
-
return [];
|
|
285
|
-
const tz = 'Asia/Seoul';
|
|
286
|
-
let cur = moment.tz(startStr, 'YYYY-MM', tz);
|
|
287
|
-
const end = moment.tz(moment().tz(tz).subtract(1, 'month').format('YYYY-MM'), 'YYYY-MM', tz);
|
|
288
|
-
if (!cur.isValid() || cur.isAfter(end))
|
|
289
|
-
return [];
|
|
290
|
-
const months = [];
|
|
291
|
-
while (cur.isSameOrBefore(end)) {
|
|
292
|
-
months.push(cur.format('YYYY-MM'));
|
|
293
|
-
cur = cur.add(1, 'month');
|
|
294
|
-
}
|
|
295
|
-
return months;
|
|
296
|
-
}
|
|
297
|
-
/** 셀 미입력 여부 — 값 없음 AND 그 월이 **전월** (직전 한 달) 인 경우만 pending.
|
|
298
|
-
* 과월 전체가 아니라 전월 한 달에 한해서만 강조 — 사용자 입력 흐름(이번 달에 지난달 데이터)과 일치. */
|
|
299
|
-
_isCellPending(row, metricId) {
|
|
300
|
-
var _a;
|
|
301
|
-
const v = (_a = row.values) === null || _a === void 0 ? void 0 : _a[metricId];
|
|
302
|
-
if (v !== undefined && v !== null && v !== '')
|
|
303
|
-
return false;
|
|
304
|
-
const lastMonth = moment().tz('Asia/Seoul').subtract(1, 'month').format('YYYY-MM');
|
|
305
|
-
return row.workDate === lastMonth;
|
|
306
|
-
}
|
|
307
|
-
/** metric 컬럼이 전 row 통틀어 한 번도 값이 없으면 헤더 강조. */
|
|
308
|
-
_isMetricNeverEntered(metricId) {
|
|
309
|
-
return !this.monthRows.some(r => {
|
|
310
|
-
var _a;
|
|
311
|
-
const v = (_a = r.values) === null || _a === void 0 ? void 0 : _a[metricId];
|
|
312
|
-
return v !== undefined && v !== null && v !== '';
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
/** 종료(COMPLETED) 프로젝트 — 신규 월 추가 금지, 기존 월만 수정 가능. */
|
|
316
|
-
get isCompleted() {
|
|
317
|
-
var _a;
|
|
318
|
-
return ((_a = this.project) === null || _a === void 0 ? void 0 : _a.state) === ProjectState.COMPLETED;
|
|
319
|
-
}
|
|
320
|
-
_addMonth() {
|
|
321
|
-
// 종료된 프로젝트는 새 월을 추가할 수 없다 (기존 월 데이터 수정만 허용).
|
|
322
|
-
if (this.isCompleted) {
|
|
323
|
-
notify({ message: '종료된 프로젝트는 월을 추가할 수 없습니다. 기존 월 데이터만 수정할 수 있습니다.' });
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
const workDate = `${this.addYear}-${String(this.addMonth).padStart(2, '0')}`;
|
|
327
|
-
// 현재월 row 는 추가 금지 — 운영 원칙상 이번달 데이터는 입력 대상 아님.
|
|
328
|
-
const currentYm = moment().tz('Asia/Seoul').format('YYYY-MM');
|
|
329
|
-
if (workDate === currentYm) {
|
|
330
|
-
notify({ message: '현재월(이번 달) 데이터는 입력 대상이 아닙니다.' });
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
// 미래월도 차단
|
|
334
|
-
if (workDate > currentYm) {
|
|
335
|
-
notify({ message: '미래월은 입력 대상이 아닙니다.' });
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
if (this.monthRows.some(r => r.workDate === workDate)) {
|
|
339
|
-
notify({ message: `${workDate}은 이미 존재합니다.` });
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
const newRow = { workDate, values: {}, originalValues: {}, valueIds: {}, dirty: true, isNew: true };
|
|
343
|
-
const rows = [...this.monthRows, newRow];
|
|
344
|
-
rows.sort((a, b) => b.workDate.localeCompare(a.workDate));
|
|
345
|
-
this.monthRows = rows;
|
|
346
|
-
}
|
|
347
|
-
async _removeMonth(rowIdx) {
|
|
348
|
-
var _a;
|
|
349
|
-
const row = this.monthRows[rowIdx];
|
|
350
|
-
// 신규 row (DB 미반영) — 메모리에서만 제거
|
|
351
|
-
if (row.isNew) {
|
|
352
|
-
this.monthRows = this.monthRows.filter((_, i) => i !== rowIdx);
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
// 저장된 row — 그 월의 모든 KpiMetricValue id 들을 한 번에 삭제.
|
|
356
|
-
// 권한: things-factory 의 deleteKpiMetricValues 는 category="kpi", privilege="mutation"
|
|
357
|
-
// (superUser/도메인 owner 자동 통과, 일반 사용자는 별도 grant 필요).
|
|
358
|
-
const ids = Object.values(row.valueIds || {}).filter(Boolean);
|
|
359
|
-
if (ids.length === 0) {
|
|
360
|
-
this.monthRows = this.monthRows.filter((_, i) => i !== rowIdx);
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
const ok = await OxPrompt.open({
|
|
364
|
-
title: `${row.workDate} 의 월별 데이터를 삭제하시겠습니까?`,
|
|
365
|
-
confirmButton: { text: '삭제' },
|
|
366
|
-
cancelButton: { text: '취소' }
|
|
367
|
-
});
|
|
368
|
-
if (!ok)
|
|
369
|
-
return;
|
|
370
|
-
try {
|
|
371
|
-
const response = await client.mutate({
|
|
372
|
-
mutation: gql `
|
|
373
|
-
mutation DeleteKpiMetricValues($ids: [String!]!) {
|
|
374
|
-
deleteKpiMetricValues(ids: $ids)
|
|
375
|
-
}
|
|
376
|
-
`,
|
|
377
|
-
variables: { ids },
|
|
378
|
-
context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
|
|
379
|
-
});
|
|
380
|
-
if (response.errors) {
|
|
381
|
-
throw new Error(response.errors.map((e) => e.message).join('\n'));
|
|
382
|
-
}
|
|
383
|
-
notify({ message: `${row.workDate} 월별 데이터 ${ids.length}건 삭제되었습니다.` });
|
|
384
|
-
await this._loadData();
|
|
385
|
-
}
|
|
386
|
-
catch (e) {
|
|
387
|
-
console.error('Failed to delete monthly values:', e);
|
|
388
|
-
notify({ message: '삭제 중 오류가 발생했습니다. 권한을 확인해주세요.' });
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* metric 입력 힌트 결정: DB 선언(meta.input) 우선. 없으면 전환용 파생(DB meta 미도입 동안).
|
|
393
|
-
* 향후 metric.meta.input 이 채워지면 이 파생 분기(및 isRating)는 제거한다.
|
|
394
|
-
*/
|
|
395
|
-
_withInputHint(m) {
|
|
396
|
-
var _a, _b;
|
|
397
|
-
// 유효 힌트: DB 선언(meta.input) 우선, 없으면 전환용 파생.
|
|
398
|
-
const input = ((_a = m === null || m === void 0 ? void 0 : m.meta) === null || _a === void 0 ? void 0 : _a.input)
|
|
399
|
-
? m.meta.input
|
|
400
|
-
: isRating(m === null || m === void 0 ? void 0 : m.name)
|
|
401
|
-
? { widget: 'rating', max: 5, step: 1 }
|
|
402
|
-
: { widget: 'number', step: 1, min: 0 };
|
|
403
|
-
// 월별 그리드는 조밀해 별표 시인성이 떨어지므로, rating 은 1~N 셀렉터로 "표현"만 오버라이드.
|
|
404
|
-
// (metric 설정=별표 는 그대로. 넓은 완료평가 화면은 별표 유지)
|
|
405
|
-
if (input.widget === 'rating') {
|
|
406
|
-
const max = (_b = input.max) !== null && _b !== void 0 ? _b : 5;
|
|
407
|
-
const options = Array.from({ length: max }, (_, i) => ({ value: i + 1, label: String(i + 1) }));
|
|
408
|
-
return Object.assign(Object.assign({}, m), { meta: Object.assign(Object.assign({}, ((m === null || m === void 0 ? void 0 : m.meta) || {})), { input: { widget: 'select', options } }) });
|
|
409
|
-
}
|
|
410
|
-
return Object.assign(Object.assign({}, m), { meta: Object.assign(Object.assign({}, ((m === null || m === void 0 ? void 0 : m.meta) || {})), { input }) });
|
|
411
|
-
}
|
|
412
|
-
/** <kpi-metric-input> 이 방출하는 (이미 타입된) 값을 그대로 저장. */
|
|
413
|
-
_setCell(rowIdx, metricId, value) {
|
|
414
|
-
this.monthRows = this.monthRows.map((row, i) => i !== rowIdx ? row : Object.assign(Object.assign({}, row), { values: Object.assign(Object.assign({}, row.values), { [metricId]: value }), dirty: true }));
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* 저장 — dirty row 들 안의 변경된 cell 들을 KpiMetricValuePatch 로 모아
|
|
418
|
-
* updateKpiMetricValuesCumulative 한 번 호출 (backend upsert 가 unique 조합 처리).
|
|
419
|
-
*/
|
|
420
|
-
async _save() {
|
|
421
|
-
var _a;
|
|
422
|
-
const patches = [];
|
|
423
|
-
for (const row of this.monthRows) {
|
|
424
|
-
if (!row.dirty)
|
|
425
|
-
continue;
|
|
426
|
-
for (const m of this.monthlyMetrics) {
|
|
427
|
-
const value = row.values[m.id];
|
|
428
|
-
const original = row.originalValues[m.id];
|
|
429
|
-
if (value === undefined || value === null)
|
|
430
|
-
continue; // 빈 값은 skip (기존 유지)
|
|
431
|
-
if (value === original)
|
|
432
|
-
continue; // 변화 없으면 skip
|
|
433
|
-
patches.push({
|
|
434
|
-
metricId: m.id,
|
|
435
|
-
value,
|
|
436
|
-
unit: m.unit || '',
|
|
437
|
-
org: this.project.id,
|
|
438
|
-
periodType: 'MONTH',
|
|
439
|
-
valueDate: `${row.workDate}-01`
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
if (patches.length === 0) {
|
|
444
|
-
notify({ message: '변경된 데이터가 없습니다.' });
|
|
445
|
-
return;
|
|
446
|
-
}
|
|
447
|
-
try {
|
|
448
|
-
const response = await client.mutate({
|
|
449
|
-
mutation: gql `
|
|
450
|
-
mutation UpdateKpiMetricValuesCumulative($patches: [KpiMetricValuePatch!]!) {
|
|
451
|
-
updateKpiMetricValuesCumulative(patches: $patches) {
|
|
452
|
-
id
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
`,
|
|
456
|
-
variables: { patches },
|
|
457
|
-
context: { headers: tenantHeaders((_a = this.project) === null || _a === void 0 ? void 0 : _a.code) }
|
|
458
|
-
});
|
|
459
|
-
if (response.errors) {
|
|
460
|
-
throw new Error(response.errors.map((e) => e.message).join('\n'));
|
|
461
|
-
}
|
|
462
|
-
notify({ message: `${patches.length}건 저장되었습니다.` });
|
|
463
|
-
await this._loadData();
|
|
464
|
-
}
|
|
465
|
-
catch (e) {
|
|
466
|
-
console.error('Failed to save monthly values:', e);
|
|
467
|
-
notify({ message: '저장 중 오류가 발생했습니다.' });
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
_reset() {
|
|
471
|
-
this._loadData();
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
SvProjectCompleteTab4Monthly.styles = [
|
|
475
|
-
css `
|
|
476
|
-
:host {
|
|
477
|
-
display: block;
|
|
478
|
-
}
|
|
479
|
-
.title {
|
|
480
|
-
color: #212529;
|
|
481
|
-
font-size: 13px;
|
|
482
|
-
font-weight: 400;
|
|
483
|
-
line-height: 24px;
|
|
484
|
-
text-align: center;
|
|
485
|
-
margin-bottom: 8px;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
.toolbar {
|
|
489
|
-
display: flex;
|
|
490
|
-
align-items: center;
|
|
491
|
-
justify-content: center;
|
|
492
|
-
gap: 12px;
|
|
493
|
-
margin-bottom: 12px;
|
|
494
|
-
}
|
|
495
|
-
.toolbar select {
|
|
496
|
-
padding: 5px 8px;
|
|
497
|
-
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
498
|
-
border-radius: 5px;
|
|
499
|
-
font-size: 14px;
|
|
500
|
-
color: #212529;
|
|
501
|
-
}
|
|
502
|
-
.toolbar .add-btn {
|
|
503
|
-
display: inline-flex;
|
|
504
|
-
align-items: center;
|
|
505
|
-
gap: 4px;
|
|
506
|
-
padding: 5px 10px;
|
|
507
|
-
background: #35618e;
|
|
508
|
-
color: #fff;
|
|
509
|
-
border-radius: 5px;
|
|
510
|
-
cursor: pointer;
|
|
511
|
-
font-size: 13px;
|
|
512
|
-
}
|
|
513
|
-
.toolbar .locked-note {
|
|
514
|
-
font-size: 13px;
|
|
515
|
-
color: #6c757d;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.grid-wrapper {
|
|
519
|
-
overflow-x: auto;
|
|
520
|
-
padding: 0 6px;
|
|
521
|
-
}
|
|
522
|
-
table {
|
|
523
|
-
width: 100%;
|
|
524
|
-
border-collapse: collapse;
|
|
525
|
-
font-size: 13px;
|
|
526
|
-
}
|
|
527
|
-
thead th {
|
|
528
|
-
background: #f3f3fa;
|
|
529
|
-
border-top: 2px solid #0c4da2;
|
|
530
|
-
color: #212529;
|
|
531
|
-
text-align: center;
|
|
532
|
-
padding: 8px 6px;
|
|
533
|
-
white-space: nowrap;
|
|
534
|
-
font-weight: 500;
|
|
535
|
-
}
|
|
536
|
-
tbody td {
|
|
537
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
|
538
|
-
text-align: center;
|
|
539
|
-
padding: 6px 4px;
|
|
540
|
-
vertical-align: middle;
|
|
541
|
-
}
|
|
542
|
-
tbody tr:hover {
|
|
543
|
-
background: #f8fafc;
|
|
544
|
-
}
|
|
545
|
-
.month-cell {
|
|
546
|
-
color: #35618e;
|
|
547
|
-
font-weight: 600;
|
|
548
|
-
white-space: nowrap;
|
|
549
|
-
}
|
|
550
|
-
.month-cell.current {
|
|
551
|
-
color: #16a085;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
input[type='number'] {
|
|
555
|
-
width: 70px;
|
|
556
|
-
padding: 4px 6px;
|
|
557
|
-
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
558
|
-
border-radius: 4px;
|
|
559
|
-
text-align: center;
|
|
560
|
-
font-size: 13px;
|
|
561
|
-
}
|
|
562
|
-
input[type='number']:focus {
|
|
563
|
-
outline: none;
|
|
564
|
-
border-color: #35618e;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.rating-select {
|
|
568
|
-
padding: 4px 6px;
|
|
569
|
-
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
570
|
-
border-radius: 4px;
|
|
571
|
-
font-size: 13px;
|
|
572
|
-
text-align: center;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.status-saved {
|
|
576
|
-
color: #16a085;
|
|
577
|
-
font-size: 12px;
|
|
578
|
-
}
|
|
579
|
-
.status-unsaved {
|
|
580
|
-
color: #e67e22;
|
|
581
|
-
font-size: 12px;
|
|
582
|
-
}
|
|
583
|
-
.status-new {
|
|
584
|
-
color: #3498db;
|
|
585
|
-
font-size: 12px;
|
|
586
|
-
}
|
|
587
|
-
.status-pending {
|
|
588
|
-
color: #e74c3c;
|
|
589
|
-
font-size: 12px;
|
|
590
|
-
font-weight: 600;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
/* 미입력 셀 — 과월/현재월 row 에서 값이 비어있을 때 강조 */
|
|
594
|
-
td.pending input[type='number'],
|
|
595
|
-
td.pending .rating-select {
|
|
596
|
-
border-color: #e74c3c;
|
|
597
|
-
background-color: #fff5f5;
|
|
598
|
-
}
|
|
599
|
-
/* 한 번도 입력된 적 없는 metric 컬럼 — 헤더 강조 */
|
|
600
|
-
th.pending {
|
|
601
|
-
background: #fdecec;
|
|
602
|
-
color: #c0392b;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.button-line {
|
|
606
|
-
display: flex;
|
|
607
|
-
justify-content: center;
|
|
608
|
-
gap: 10px;
|
|
609
|
-
margin-top: 16px;
|
|
610
|
-
}
|
|
611
|
-
.ghost-btn {
|
|
612
|
-
display: inline-flex;
|
|
613
|
-
align-items: center;
|
|
614
|
-
gap: 6px;
|
|
615
|
-
padding: 6px 10px;
|
|
616
|
-
background: #35618e;
|
|
617
|
-
color: #ffffff;
|
|
618
|
-
border-radius: 5px;
|
|
619
|
-
cursor: pointer;
|
|
620
|
-
}
|
|
621
|
-
.ghost-btn.secondary {
|
|
622
|
-
background: #24be7b;
|
|
623
|
-
}
|
|
624
|
-
.ghost-btn.disabled {
|
|
625
|
-
opacity: 0.45;
|
|
626
|
-
cursor: not-allowed;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
.delete-btn {
|
|
630
|
-
cursor: pointer;
|
|
631
|
-
color: #999;
|
|
632
|
-
font-size: 18px;
|
|
633
|
-
}
|
|
634
|
-
.delete-btn:hover {
|
|
635
|
-
color: #e74c3c;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.empty-msg {
|
|
639
|
-
text-align: center;
|
|
640
|
-
color: #999;
|
|
641
|
-
padding: 40px 0;
|
|
642
|
-
font-size: 14px;
|
|
643
|
-
}
|
|
644
|
-
`
|
|
645
|
-
];
|
|
646
|
-
__decorate([
|
|
647
|
-
property({ type: Object }),
|
|
648
|
-
__metadata("design:type", Object)
|
|
649
|
-
], SvProjectCompleteTab4Monthly.prototype, "project", void 0);
|
|
650
|
-
__decorate([
|
|
651
|
-
state(),
|
|
652
|
-
__metadata("design:type", Array)
|
|
653
|
-
], SvProjectCompleteTab4Monthly.prototype, "monthlyMetrics", void 0);
|
|
654
|
-
__decorate([
|
|
655
|
-
state(),
|
|
656
|
-
__metadata("design:type", Array)
|
|
657
|
-
], SvProjectCompleteTab4Monthly.prototype, "monthRows", void 0);
|
|
658
|
-
__decorate([
|
|
659
|
-
state(),
|
|
660
|
-
__metadata("design:type", Number)
|
|
661
|
-
], SvProjectCompleteTab4Monthly.prototype, "addYear", void 0);
|
|
662
|
-
__decorate([
|
|
663
|
-
state(),
|
|
664
|
-
__metadata("design:type", Number)
|
|
665
|
-
], SvProjectCompleteTab4Monthly.prototype, "addMonth", void 0);
|
|
666
|
-
__decorate([
|
|
667
|
-
state(),
|
|
668
|
-
__metadata("design:type", Object)
|
|
669
|
-
], SvProjectCompleteTab4Monthly.prototype, "canSave", void 0);
|
|
670
|
-
SvProjectCompleteTab4Monthly = __decorate([
|
|
671
|
-
customElement('sv-pc-tab4-monthly')
|
|
672
|
-
], SvProjectCompleteTab4Monthly);
|
|
673
|
-
export { SvProjectCompleteTab4Monthly };
|
|
674
|
-
//# sourceMappingURL=pc-tab4-monthly.js.map
|