@dssp/dkpi 1.0.0-alpha.10 → 1.0.0-alpha.100

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 (264) hide show
  1. package/KPI-STATISTICS-SERVICE.md +233 -0
  2. package/_index.html +4 -9
  3. package/assets/favicon.ico +0 -0
  4. package/assets/helps/index.md +1 -1
  5. package/assets/images/project-image.png +0 -0
  6. package/assets/manifest/apple-1024.png +0 -0
  7. package/assets/manifest/apple-120.png +0 -0
  8. package/assets/manifest/apple-152.png +0 -0
  9. package/assets/manifest/apple-167.png +0 -0
  10. package/assets/manifest/apple-180.png +0 -0
  11. package/assets/manifest/apple-touch-icon.png +0 -0
  12. package/assets/manifest/badge-128x128.png +0 -0
  13. package/assets/manifest/chrome-splashscreen-icon-384x384.png +0 -0
  14. package/assets/manifest/chrome-touch-icon-192x192.png +0 -0
  15. package/assets/manifest/icon-128x128.png +0 -0
  16. package/assets/manifest/icon-192x192.png +0 -0
  17. package/assets/manifest/icon-512x512.png +0 -0
  18. package/assets/manifest/icon-72x72.png +0 -0
  19. package/assets/manifest/icon-96x96.png +0 -0
  20. package/assets/manifest/image-metaog.png +0 -0
  21. package/assets/manifest/maskable_icon.png +0 -0
  22. package/assets/manifest/ms-icon-144x144.png +0 -0
  23. package/assets/manifest/ms-touch-icon-144x144-precomposed.png +0 -0
  24. package/assets/manifest.json +2 -2
  25. package/assets/videos/intro.mp4 +0 -0
  26. package/config/config.development.js +2 -1
  27. package/config/config.production.js +2 -1
  28. package/dist-client/bootstrap.d.ts +1 -0
  29. package/dist-client/bootstrap.js +28 -0
  30. package/dist-client/bootstrap.js.map +1 -1
  31. package/dist-client/components/kpi-2d-lookup-chart.d.ts +50 -0
  32. package/dist-client/components/kpi-2d-lookup-chart.js +263 -0
  33. package/dist-client/components/kpi-2d-lookup-chart.js.map +1 -0
  34. package/dist-client/components/kpi-boxplot-chart.d.ts +31 -0
  35. package/dist-client/components/kpi-boxplot-chart.js +306 -0
  36. package/dist-client/components/kpi-boxplot-chart.js.map +1 -0
  37. package/dist-client/components/kpi-lookup-chart.d.ts +58 -0
  38. package/dist-client/components/kpi-lookup-chart.js +464 -0
  39. package/dist-client/components/kpi-lookup-chart.js.map +1 -0
  40. package/dist-client/components/kpi-mini-trend-chart.d.ts +14 -0
  41. package/dist-client/components/kpi-mini-trend-chart.js +180 -0
  42. package/dist-client/components/kpi-mini-trend-chart.js.map +1 -0
  43. package/dist-client/components/kpi-radar-chart.d.ts +17 -0
  44. package/dist-client/components/kpi-radar-chart.js +259 -0
  45. package/dist-client/components/kpi-radar-chart.js.map +1 -0
  46. package/dist-client/components/kpi-single-boxplot-chart.d.ts +36 -0
  47. package/dist-client/components/kpi-single-boxplot-chart.js +417 -0
  48. package/dist-client/components/kpi-single-boxplot-chart.js.map +1 -0
  49. package/dist-client/components/kpi-step-lookup-chart.d.ts +33 -0
  50. package/dist-client/components/kpi-step-lookup-chart.js +181 -0
  51. package/dist-client/components/kpi-step-lookup-chart.js.map +1 -0
  52. package/dist-client/components/kpi-trend-chart.d.ts +25 -0
  53. package/dist-client/components/kpi-trend-chart.js +241 -0
  54. package/dist-client/components/kpi-trend-chart.js.map +1 -0
  55. package/dist-client/components/sv-pagenation-control.d.ts +18 -0
  56. package/dist-client/components/sv-pagenation-control.js +142 -0
  57. package/dist-client/components/sv-pagenation-control.js.map +1 -0
  58. package/dist-client/entries/auth/checkin.d.ts +38 -0
  59. package/dist-client/entries/auth/checkin.js +551 -0
  60. package/dist-client/entries/auth/checkin.js.map +1 -0
  61. package/dist-client/google-map/common-google-map.d.ts +35 -0
  62. package/dist-client/google-map/common-google-map.js +349 -0
  63. package/dist-client/google-map/common-google-map.js.map +1 -0
  64. package/dist-client/google-map/google-map-loader.d.ts +6 -0
  65. package/dist-client/google-map/google-map-loader.js +23 -0
  66. package/dist-client/google-map/google-map-loader.js.map +1 -0
  67. package/dist-client/icons/menu-icons.d.ts +6 -0
  68. package/dist-client/icons/menu-icons.js +42 -0
  69. package/dist-client/icons/menu-icons.js.map +1 -1
  70. package/dist-client/pages/component/project-update-header.d.ts +1 -0
  71. package/dist-client/pages/component/project-update-header.js +127 -0
  72. package/dist-client/pages/component/project-update-header.js.map +1 -0
  73. package/dist-client/pages/kpi-admin/dssp-kpi-list-page.d.ts +22 -0
  74. package/dist-client/pages/kpi-admin/dssp-kpi-list-page.js +57 -0
  75. package/dist-client/pages/kpi-admin/dssp-kpi-list-page.js.map +1 -0
  76. package/dist-client/pages/kpi-admin/dssp-kpi-overview.d.ts +47 -0
  77. package/dist-client/pages/kpi-admin/dssp-kpi-overview.js +393 -0
  78. package/dist-client/pages/kpi-admin/dssp-kpi-overview.js.map +1 -0
  79. package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.d.ts +20 -0
  80. package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.js +445 -0
  81. package/dist-client/pages/kpi-admin/kpi-grade-2d-editor.js.map +1 -0
  82. package/dist-client/pages/kpi-admin/kpi-system-guide.d.ts +18 -0
  83. package/dist-client/pages/kpi-admin/kpi-system-guide.js +696 -0
  84. package/dist-client/pages/kpi-admin/kpi-system-guide.js.map +1 -0
  85. package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.d.ts +18 -0
  86. package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js +259 -0
  87. package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js.map +1 -0
  88. package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.d.ts +22 -0
  89. package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js +346 -0
  90. package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js.map +1 -0
  91. package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.d.ts +26 -0
  92. package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js +433 -0
  93. package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js.map +1 -0
  94. package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.d.ts +8 -0
  95. package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js +78 -0
  96. package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js.map +1 -0
  97. package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.d.ts +46 -0
  98. package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js +945 -0
  99. package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js.map +1 -0
  100. package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.d.ts +34 -0
  101. package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js +238 -0
  102. package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js.map +1 -0
  103. package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.d.ts +37 -0
  104. package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js +689 -0
  105. package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js.map +1 -0
  106. package/dist-client/pages/kpi-dashboard/kpi-alert-panel.d.ts +18 -0
  107. package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js +131 -0
  108. package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js.map +1 -0
  109. package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.d.ts +57 -0
  110. package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js +866 -0
  111. package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js.map +1 -0
  112. package/dist-client/pages/kpi-dashboard/kpi-dashboard.d.ts +63 -0
  113. package/dist-client/pages/kpi-dashboard/kpi-dashboard.js +1097 -0
  114. package/dist-client/pages/kpi-dashboard/kpi-dashboard.js.map +1 -0
  115. package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.d.ts +12 -0
  116. package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js +82 -0
  117. package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js.map +1 -0
  118. package/dist-client/pages/kpi-dashboard/kpi-history-viewer.d.ts +11 -0
  119. package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js +65 -0
  120. package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js.map +1 -0
  121. package/dist-client/pages/kpi-dashboard/kpi-list-summary.d.ts +13 -0
  122. package/dist-client/pages/kpi-dashboard/kpi-list-summary.js +115 -0
  123. package/dist-client/pages/kpi-dashboard/kpi-list-summary.js.map +1 -0
  124. package/dist-client/pages/kpi-dashboard/kpi-performance-summary.d.ts +15 -0
  125. package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js +147 -0
  126. package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js.map +1 -0
  127. package/dist-client/pages/kpi-dashboard/kpi-value-entry.d.ts +7 -0
  128. package/dist-client/pages/kpi-dashboard/kpi-value-entry.js +86 -0
  129. package/dist-client/pages/kpi-dashboard/kpi-value-entry.js.map +1 -0
  130. package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.d.ts +57 -0
  131. package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js +719 -0
  132. package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js.map +1 -0
  133. package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.d.ts +23 -0
  134. package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js +76 -0
  135. package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js.map +1 -0
  136. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.d.ts +68 -0
  137. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js +394 -0
  138. package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js.map +1 -0
  139. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.d.ts +12 -0
  140. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js +174 -0
  141. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js.map +1 -0
  142. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.d.ts +40 -0
  143. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js +190 -0
  144. package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js.map +1 -0
  145. package/dist-client/pages/kpi-value/kpi-value-importer.d.ts +23 -0
  146. package/dist-client/pages/kpi-value/kpi-value-importer.js +93 -0
  147. package/dist-client/pages/kpi-value/kpi-value-importer.js.map +1 -0
  148. package/dist-client/pages/kpi-value/kpi-value-list-page.d.ts +71 -0
  149. package/dist-client/pages/kpi-value/kpi-value-list-page.js +454 -0
  150. package/dist-client/pages/kpi-value/kpi-value-list-page.js.map +1 -0
  151. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.d.ts +69 -0
  152. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js +790 -0
  153. package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js.map +1 -0
  154. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.d.ts +22 -0
  155. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js +344 -0
  156. package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js.map +1 -0
  157. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.d.ts +21 -0
  158. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js +335 -0
  159. package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js.map +1 -0
  160. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.d.ts +51 -0
  161. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js +674 -0
  162. package/dist-client/pages/project-complete-tabs/pc-tab4-monthly.js.map +1 -0
  163. package/dist-client/pages/sv-project-complete.d.ts +31 -0
  164. package/dist-client/pages/sv-project-complete.js +359 -0
  165. package/dist-client/pages/sv-project-complete.js.map +1 -0
  166. package/dist-client/pages/sv-project-completed-list.d.ts +27 -0
  167. package/dist-client/pages/sv-project-completed-list.js +416 -0
  168. package/dist-client/pages/sv-project-completed-list.js.map +1 -0
  169. package/dist-client/pages/sv-project-detail.d.ts +73 -0
  170. package/dist-client/pages/sv-project-detail.js +1501 -0
  171. package/dist-client/pages/sv-project-detail.js.map +1 -0
  172. package/dist-client/pages/sv-project-list.d.ts +175 -0
  173. package/dist-client/pages/sv-project-list.js +581 -0
  174. package/dist-client/pages/sv-project-list.js.map +1 -0
  175. package/dist-client/pages/sv-project-update.d.ts +91 -0
  176. package/dist-client/pages/sv-project-update.js +1150 -0
  177. package/dist-client/pages/sv-project-update.js.map +1 -0
  178. package/dist-client/pages/sv-user-management.d.ts +1 -0
  179. package/dist-client/pages/sv-user-management.js +5 -0
  180. package/dist-client/pages/sv-user-management.js.map +1 -1
  181. package/dist-client/route.d.ts +1 -1
  182. package/dist-client/route.js +50 -2
  183. package/dist-client/route.js.map +1 -1
  184. package/dist-client/shared/complete-api.d.ts +45 -0
  185. package/dist-client/shared/complete-api.js +272 -0
  186. package/dist-client/shared/complete-api.js.map +1 -0
  187. package/dist-client/shared/func.d.ts +2 -0
  188. package/dist-client/shared/func.js +22 -0
  189. package/dist-client/shared/func.js.map +1 -0
  190. package/dist-client/shared/geo-group-mapping.d.ts +25 -0
  191. package/dist-client/shared/geo-group-mapping.js +189 -0
  192. package/dist-client/shared/geo-group-mapping.js.map +1 -0
  193. package/dist-client/shared/integration-fetch.d.ts +35 -0
  194. package/dist-client/shared/integration-fetch.js +53 -0
  195. package/dist-client/shared/integration-fetch.js.map +1 -0
  196. package/dist-client/shared/kpi-project-sync.d.ts +16 -0
  197. package/dist-client/shared/kpi-project-sync.js +129 -0
  198. package/dist-client/shared/kpi-project-sync.js.map +1 -0
  199. package/dist-client/themes/dark.css +24 -24
  200. package/dist-client/themes/light.css +23 -23
  201. package/dist-client/tsconfig.tsbuildinfo +1 -1
  202. package/dist-client/viewparts/menu-tools.d.ts +40 -5
  203. package/dist-client/viewparts/menu-tools.js +317 -52
  204. package/dist-client/viewparts/menu-tools.js.map +1 -1
  205. package/dist-server/index.d.ts +2 -0
  206. package/dist-server/index.js +5 -0
  207. package/dist-server/index.js.map +1 -1
  208. package/dist-server/migrations/index.d.ts +1 -0
  209. package/dist-server/migrations/index.js +12 -0
  210. package/dist-server/migrations/index.js.map +1 -0
  211. package/dist-server/scripts/calculate-kpi-scores.d.ts +10 -0
  212. package/dist-server/scripts/calculate-kpi-scores.js +333 -0
  213. package/dist-server/scripts/calculate-kpi-scores.js.map +1 -0
  214. package/dist-server/scripts/load-grade-data-migration.d.ts +14 -0
  215. package/dist-server/scripts/load-grade-data-migration.js +279 -0
  216. package/dist-server/scripts/load-grade-data-migration.js.map +1 -0
  217. package/dist-server/scripts/propagate-parent-kpi-values.d.ts +14 -0
  218. package/dist-server/scripts/propagate-parent-kpi-values.js +786 -0
  219. package/dist-server/scripts/propagate-parent-kpi-values.js.map +1 -0
  220. package/dist-server/scripts/recalculate-by-project-name.d.ts +2 -0
  221. package/dist-server/scripts/recalculate-by-project-name.js +72 -0
  222. package/dist-server/scripts/recalculate-by-project-name.js.map +1 -0
  223. package/dist-server/service/index.d.ts +4 -0
  224. package/dist-server/service/index.js +20 -0
  225. package/dist-server/service/index.js.map +1 -0
  226. package/dist-server/service/kpi-metric-value/index.d.ts +4 -0
  227. package/dist-server/service/kpi-metric-value/index.js +8 -0
  228. package/dist-server/service/kpi-metric-value/index.js.map +1 -0
  229. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.d.ts +171 -0
  230. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js +993 -0
  231. package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js.map +1 -0
  232. package/dist-server/service/kpi-metric-value/kpi-metric-value-query.d.ts +12 -0
  233. package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +56 -0
  234. package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +1 -0
  235. package/dist-server/service/kpi-stat/index.d.ts +4 -0
  236. package/dist-server/service/kpi-stat/index.js +8 -0
  237. package/dist-server/service/kpi-stat/index.js.map +1 -0
  238. package/dist-server/service/kpi-stat/kpi-stat-query.d.ts +13 -0
  239. package/dist-server/service/kpi-stat/kpi-stat-query.js +751 -0
  240. package/dist-server/service/kpi-stat/kpi-stat-query.js.map +1 -0
  241. package/dist-server/service/kpi-stat/kpi-stat-types.d.ts +32 -0
  242. package/dist-server/service/kpi-stat/kpi-stat-types.js +180 -0
  243. package/dist-server/service/kpi-stat/kpi-stat-types.js.map +1 -0
  244. package/dist-server/service/kpi-value/index.d.ts +3 -0
  245. package/dist-server/service/kpi-value/index.js +7 -0
  246. package/dist-server/service/kpi-value/index.js.map +1 -0
  247. package/dist-server/service/kpi-value/kpi-value-query.d.ts +8 -0
  248. package/dist-server/service/kpi-value/kpi-value-query.js +90 -0
  249. package/dist-server/service/kpi-value/kpi-value-query.js.map +1 -0
  250. package/dist-server/tsconfig.tsbuildinfo +1 -1
  251. package/kpi-module-service-tests.md +1286 -0
  252. package/kpi-module-test-report.md +676 -0
  253. package/kpi-module-unit-test-detailed-report.md +925 -0
  254. package/kpi-module-unit-tests-detailed.md +1452 -0
  255. package/openapi/unstable.yaml +2 -2
  256. package/package.json +69 -55
  257. package/recalculate-batch.sh +64 -0
  258. package/recalculate-projects-range.sh +98 -0
  259. package/schema.graphql +3497 -454
  260. package/things-factory.config.js +12 -1
  261. package/translations/en.json +5 -1
  262. package/translations/ko.json +5 -1
  263. package/views/auth-page.html +4 -5
  264. package/views/public/home.html +5 -6
@@ -0,0 +1,674 @@
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