@dssp/dkpi 1.0.0-alpha.39 → 1.0.0-alpha.41
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/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.d.ts +58 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js +731 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.d.ts +23 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js +76 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.d.ts +69 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js +385 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.d.ts +12 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js +174 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.d.ts +41 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js +191 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js.map +1 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.d.ts +23 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.js +93 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.js.map +1 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.d.ts +72 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.js +465 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +9 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/scripts/propagate-parent-kpi-values.d.ts +10 -0
- package/dist-server/scripts/propagate-parent-kpi-values.js +440 -0
- package/dist-server/scripts/propagate-parent-kpi-values.js.map +1 -0
- package/dist-server/service/index.d.ts +6 -0
- package/dist-server/service/index.js +21 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/kpi-metric-value/index.d.ts +3 -0
- package/dist-server/service/kpi-metric-value/index.js +7 -0
- package/dist-server/service/kpi-metric-value/index.js.map +1 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.d.ts +7 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +47 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +1 -0
- package/dist-server/service/kpi-value/index.d.ts +3 -0
- package/dist-server/service/kpi-value/index.js +7 -0
- package/dist-server/service/kpi-value/index.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value-query.d.ts +7 -0
- package/dist-server/service/kpi-value/kpi-value-query.js +47 -0
- package/dist-server/service/kpi-value/kpi-value-query.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/schema.graphql +2063 -18
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
3
|
+
import '@operato/data-grist/ox-grist.js';
|
|
4
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
5
|
+
import '@operato/data-grist/ox-record-creator.js';
|
|
6
|
+
import { PageView } from '@operato/shell';
|
|
7
|
+
import { FetchOption } from '@operato/data-grist';
|
|
8
|
+
import { KpiValueImporter } from './kpi-value-importer';
|
|
9
|
+
declare const KpiValueListPage_base: (new (...args: any[]) => {
|
|
10
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
stateChanged(_state: unknown): void;
|
|
14
|
+
readonly isConnected: boolean;
|
|
15
|
+
}) & (new (...args: any[]) => {
|
|
16
|
+
__preferenceProviders: {
|
|
17
|
+
[element: string]: import("@operato/p13n").PagePreferenceProvider;
|
|
18
|
+
};
|
|
19
|
+
getPagePreferenceProvider(element: string): import("@operato/p13n").PagePreferenceProvider | undefined;
|
|
20
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types").ScopedElementsHost>;
|
|
21
|
+
export declare class KpiValueListPage extends KpiValueListPage_base {
|
|
22
|
+
static styles: import("lit").CSSResult[];
|
|
23
|
+
static get scopedElements(): {
|
|
24
|
+
'kpi-value-importer': typeof KpiValueImporter;
|
|
25
|
+
};
|
|
26
|
+
gristConfig: any;
|
|
27
|
+
mode: 'CARD' | 'GRID' | 'LIST';
|
|
28
|
+
private grist;
|
|
29
|
+
get context(): {
|
|
30
|
+
title: string;
|
|
31
|
+
search: {
|
|
32
|
+
handler: (search: string) => void;
|
|
33
|
+
value: string;
|
|
34
|
+
};
|
|
35
|
+
filter: {
|
|
36
|
+
handler: () => void;
|
|
37
|
+
};
|
|
38
|
+
help: string;
|
|
39
|
+
actions: {
|
|
40
|
+
icon: string;
|
|
41
|
+
emphasis: {
|
|
42
|
+
raised: boolean;
|
|
43
|
+
outlined: boolean;
|
|
44
|
+
dense: boolean;
|
|
45
|
+
danger: boolean;
|
|
46
|
+
};
|
|
47
|
+
title: string;
|
|
48
|
+
action: () => Promise<void>;
|
|
49
|
+
}[];
|
|
50
|
+
exportable: {
|
|
51
|
+
name: string;
|
|
52
|
+
data: () => Promise<{}[]>;
|
|
53
|
+
};
|
|
54
|
+
importable: {
|
|
55
|
+
handler: (records: any) => Promise<void>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
59
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
60
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
61
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
62
|
+
total: any;
|
|
63
|
+
records: any;
|
|
64
|
+
}>;
|
|
65
|
+
_deleteKpiValue(): Promise<void>;
|
|
66
|
+
_updateKpiValue(): Promise<void>;
|
|
67
|
+
_recalculateKpiValue(kpiValue: any): Promise<void>;
|
|
68
|
+
creationCallback(kpiValue: any): Promise<boolean>;
|
|
69
|
+
exportHandler(): Promise<{}[]>;
|
|
70
|
+
importHandler(records: any): Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/elevated-button.js';
|
|
4
|
+
import '@operato/data-grist/ox-grist.js';
|
|
5
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
6
|
+
import '@operato/data-grist/ox-record-creator.js';
|
|
7
|
+
import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { PageView, store } from '@operato/shell';
|
|
9
|
+
import { css, html } from 'lit';
|
|
10
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
11
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
12
|
+
import { DataGrist } from '@operato/data-grist';
|
|
13
|
+
import { client } from '@operato/graphql';
|
|
14
|
+
import { i18next, localize } from '@operato/i18n';
|
|
15
|
+
import { notify, openPopup } from '@operato/layout';
|
|
16
|
+
import { OxPrompt } from '@operato/popup';
|
|
17
|
+
import { isMobileDevice } from '@operato/utils';
|
|
18
|
+
import { p13n } from '@operato/p13n';
|
|
19
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
|
20
|
+
import gql from 'graphql-tag';
|
|
21
|
+
import { KpiValueImporter } from './kpi-value-importer';
|
|
22
|
+
let KpiValueListPage = class KpiValueListPage extends connect(store)(p13n(localize(i18next)(ScopedElementsMixin(PageView)))) {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
26
|
+
}
|
|
27
|
+
static get scopedElements() {
|
|
28
|
+
return {
|
|
29
|
+
'kpi-value-importer': KpiValueImporter
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
get context() {
|
|
33
|
+
return {
|
|
34
|
+
title: i18next.t('title.kpi value list'),
|
|
35
|
+
search: {
|
|
36
|
+
handler: (search) => {
|
|
37
|
+
this.grist.searchText = search;
|
|
38
|
+
},
|
|
39
|
+
value: this.grist.searchText
|
|
40
|
+
},
|
|
41
|
+
filter: {
|
|
42
|
+
handler: () => {
|
|
43
|
+
this.grist.toggleHeadroom();
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
help: 'kpi/kpi-value',
|
|
47
|
+
actions: [
|
|
48
|
+
Object.assign({ title: i18next.t('button.save'), action: this._updateKpiValue.bind(this) }, CommonButtonStyles.save),
|
|
49
|
+
Object.assign({ title: i18next.t('button.delete'), action: this._deleteKpiValue.bind(this) }, CommonButtonStyles.delete)
|
|
50
|
+
],
|
|
51
|
+
exportable: {
|
|
52
|
+
name: i18next.t('title.kpi value list'),
|
|
53
|
+
data: this.exportHandler.bind(this)
|
|
54
|
+
},
|
|
55
|
+
importable: {
|
|
56
|
+
handler: this.importHandler.bind(this)
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
62
|
+
return html `
|
|
63
|
+
<ox-grist
|
|
64
|
+
.mode=${mode}
|
|
65
|
+
.config=${this.gristConfig}
|
|
66
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
67
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
|
68
|
+
>
|
|
69
|
+
<div slot="headroom" class="header">
|
|
70
|
+
<div class="filters">
|
|
71
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
72
|
+
|
|
73
|
+
<div id="modes">
|
|
74
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
75
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
76
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<ox-record-creator id="add" .callback=${this.creationCallback.bind(this)}>
|
|
80
|
+
<button>
|
|
81
|
+
<md-icon>add</md-icon>
|
|
82
|
+
</button>
|
|
83
|
+
</ox-record-creator>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
|
88
|
+
</ox-grist>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
async pageInitialized(lifecycle) {
|
|
92
|
+
this.gristConfig = {
|
|
93
|
+
list: {
|
|
94
|
+
fields: [
|
|
95
|
+
'kpi',
|
|
96
|
+
'version',
|
|
97
|
+
'valueDate',
|
|
98
|
+
'value',
|
|
99
|
+
'score',
|
|
100
|
+
'group',
|
|
101
|
+
'inputType',
|
|
102
|
+
'source',
|
|
103
|
+
'meta',
|
|
104
|
+
'createdAt',
|
|
105
|
+
'updatedAt',
|
|
106
|
+
'creator',
|
|
107
|
+
'updater'
|
|
108
|
+
],
|
|
109
|
+
details: [
|
|
110
|
+
'kpi',
|
|
111
|
+
'version',
|
|
112
|
+
'valueDate',
|
|
113
|
+
'value',
|
|
114
|
+
'score',
|
|
115
|
+
'group',
|
|
116
|
+
'inputType',
|
|
117
|
+
'source',
|
|
118
|
+
'meta',
|
|
119
|
+
'createdAt',
|
|
120
|
+
'updatedAt',
|
|
121
|
+
'creator',
|
|
122
|
+
'updater'
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
columns: [
|
|
126
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
127
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
128
|
+
// KPI Value 재계산 버튼 추가
|
|
129
|
+
{
|
|
130
|
+
type: 'gutter',
|
|
131
|
+
gutterName: 'button',
|
|
132
|
+
icon: 'refresh',
|
|
133
|
+
title: '재계산',
|
|
134
|
+
handlers: {
|
|
135
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
136
|
+
this._recalculateKpiValue(record);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'resource-object',
|
|
142
|
+
name: 'group',
|
|
143
|
+
header: '프로젝트',
|
|
144
|
+
record: {
|
|
145
|
+
editable: false,
|
|
146
|
+
options: {
|
|
147
|
+
title: i18next.t('title.lookup project'),
|
|
148
|
+
queryName: 'projects',
|
|
149
|
+
columns: [
|
|
150
|
+
{ name: 'id', hidden: true },
|
|
151
|
+
{ name: 'name', header: i18next.t('field.name'), filter: 'search' },
|
|
152
|
+
{ name: 'startDate', header: i18next.t('field.start-date') },
|
|
153
|
+
{ name: 'endDate', header: i18next.t('field.end-date') }
|
|
154
|
+
],
|
|
155
|
+
list: { fields: ['name', 'startDate', 'endDate'] },
|
|
156
|
+
filterValueField: 'id',
|
|
157
|
+
nameField: 'name',
|
|
158
|
+
descriptionField: ''
|
|
159
|
+
},
|
|
160
|
+
renderer: (value, column, record, rowIndex, field) => {
|
|
161
|
+
var _a;
|
|
162
|
+
return ((_a = record.project) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
filter: true,
|
|
166
|
+
width: 120
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'string',
|
|
170
|
+
name: 'kpi',
|
|
171
|
+
header: 'KPI',
|
|
172
|
+
record: { editable: false, renderer: (v, c, r) => { var _a; return (_a = r.kpi) === null || _a === void 0 ? void 0 : _a.name; } },
|
|
173
|
+
width: 150
|
|
174
|
+
},
|
|
175
|
+
{ type: 'number', name: 'version', header: '버전', record: { editable: false }, filter: true, width: 80 },
|
|
176
|
+
{ type: 'string', name: 'valueDate', header: '실적일', record: { editable: true }, width: 120 },
|
|
177
|
+
{ type: 'number', name: 'value', header: '실적값', record: { editable: true }, width: 120 },
|
|
178
|
+
{ type: 'number', name: 'score', header: '성과점수', record: { editable: false }, width: 120 },
|
|
179
|
+
{ type: 'string', name: 'inputType', header: '입력방식', record: { editable: false }, width: 100 },
|
|
180
|
+
{ type: 'string', name: 'source', header: '수집출처', record: { editable: false }, width: 120 },
|
|
181
|
+
{ type: 'object', name: 'meta', header: '메타', record: { editable: false }, width: 120 },
|
|
182
|
+
{ type: 'datetime', name: 'createdAt', header: '생성일', record: { editable: false }, width: 180 },
|
|
183
|
+
{ type: 'datetime', name: 'updatedAt', header: '수정일', record: { editable: false }, width: 180 },
|
|
184
|
+
{
|
|
185
|
+
type: 'resource-object',
|
|
186
|
+
name: 'creator',
|
|
187
|
+
header: '생성자',
|
|
188
|
+
record: { editable: false, renderer: (v, c, r) => { var _a; return (_a = r.creator) === null || _a === void 0 ? void 0 : _a.name; } },
|
|
189
|
+
width: 120
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: 'resource-object',
|
|
193
|
+
name: 'updater',
|
|
194
|
+
header: '수정자',
|
|
195
|
+
record: { editable: false, renderer: (v, c, r) => { var _a; return (_a = r.updater) === null || _a === void 0 ? void 0 : _a.name; } },
|
|
196
|
+
width: 120
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
rows: {
|
|
200
|
+
appendable: false,
|
|
201
|
+
selectable: {
|
|
202
|
+
multiple: true
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
sorters: [{ name: 'valueDate' }]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
async pageUpdated(changes, lifecycle) {
|
|
209
|
+
if (this.active) {
|
|
210
|
+
// do something here when this page just became as active
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
|
214
|
+
const response = await client.query({
|
|
215
|
+
query: gql `
|
|
216
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
217
|
+
responses: kpiValues(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
218
|
+
items {
|
|
219
|
+
id
|
|
220
|
+
kpi {
|
|
221
|
+
id
|
|
222
|
+
name
|
|
223
|
+
}
|
|
224
|
+
version
|
|
225
|
+
valueDate
|
|
226
|
+
value
|
|
227
|
+
score
|
|
228
|
+
inputType
|
|
229
|
+
source
|
|
230
|
+
meta
|
|
231
|
+
group
|
|
232
|
+
project {
|
|
233
|
+
id
|
|
234
|
+
name
|
|
235
|
+
}
|
|
236
|
+
updater {
|
|
237
|
+
id
|
|
238
|
+
name
|
|
239
|
+
}
|
|
240
|
+
updatedAt
|
|
241
|
+
creator {
|
|
242
|
+
id
|
|
243
|
+
name
|
|
244
|
+
}
|
|
245
|
+
createdAt
|
|
246
|
+
}
|
|
247
|
+
total
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
`,
|
|
251
|
+
variables: {
|
|
252
|
+
filters,
|
|
253
|
+
pagination: { page, limit },
|
|
254
|
+
sortings
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
return {
|
|
258
|
+
total: response.data.responses.total || 0,
|
|
259
|
+
records: response.data.responses.items || []
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
async _deleteKpiValue() {
|
|
263
|
+
if (await OxPrompt.open({
|
|
264
|
+
title: i18next.t('text.are_you_sure'),
|
|
265
|
+
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
266
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
267
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
268
|
+
})) {
|
|
269
|
+
const ids = this.grist.selected.map(record => record.id);
|
|
270
|
+
if (ids && ids.length > 0) {
|
|
271
|
+
const response = await client.mutate({
|
|
272
|
+
mutation: gql `
|
|
273
|
+
mutation ($ids: [String!]!) {
|
|
274
|
+
deleteKpiValues(ids: $ids)
|
|
275
|
+
}
|
|
276
|
+
`,
|
|
277
|
+
variables: {
|
|
278
|
+
ids
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
if (!response.errors) {
|
|
282
|
+
this.grist.fetch();
|
|
283
|
+
notify({
|
|
284
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
async _updateKpiValue() {
|
|
291
|
+
let patches = this.grist.dirtyRecords;
|
|
292
|
+
if (patches && patches.length) {
|
|
293
|
+
patches = patches.map(patch => {
|
|
294
|
+
let patchField = patch.id ? { id: patch.id } : {};
|
|
295
|
+
const dirtyFields = patch.__dirtyfields__;
|
|
296
|
+
for (let key in dirtyFields) {
|
|
297
|
+
patchField[key] = dirtyFields[key].after;
|
|
298
|
+
}
|
|
299
|
+
patchField.cuFlag = patch.__dirty__;
|
|
300
|
+
return patchField;
|
|
301
|
+
});
|
|
302
|
+
const response = await client.mutate({
|
|
303
|
+
mutation: gql `
|
|
304
|
+
mutation ($patches: [KpiValuePatch!]!) {
|
|
305
|
+
updateMultipleKpiValue(patches: $patches) {
|
|
306
|
+
id
|
|
307
|
+
kpi {
|
|
308
|
+
id
|
|
309
|
+
name
|
|
310
|
+
}
|
|
311
|
+
version
|
|
312
|
+
valueDate
|
|
313
|
+
value
|
|
314
|
+
score
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
`,
|
|
318
|
+
variables: {
|
|
319
|
+
patches
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
if (!response.errors) {
|
|
323
|
+
this.grist.fetch();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
async _recalculateKpiValue(kpiValue) {
|
|
328
|
+
try {
|
|
329
|
+
const response = await client.mutate({
|
|
330
|
+
mutation: gql `
|
|
331
|
+
mutation ($id: String!) {
|
|
332
|
+
recalculateKpiValue(id: $id) {
|
|
333
|
+
id
|
|
334
|
+
value
|
|
335
|
+
score
|
|
336
|
+
valueDate
|
|
337
|
+
project {
|
|
338
|
+
id
|
|
339
|
+
name
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
`,
|
|
344
|
+
variables: {
|
|
345
|
+
id: kpiValue.id
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
if (!response.errors) {
|
|
349
|
+
notify({ message: 'KPI Value가 성공적으로 재계산되었습니다.' });
|
|
350
|
+
this.grist.fetch();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
notify({ message: 'KPI Value 재계산 중 오류가 발생했습니다.' });
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
async creationCallback(kpiValue) {
|
|
358
|
+
try {
|
|
359
|
+
const response = await client.query({
|
|
360
|
+
query: gql `
|
|
361
|
+
mutation ($kpiValue: NewKpiValue!) {
|
|
362
|
+
createKpiValue(kpiValue: $kpiValue) {
|
|
363
|
+
id
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
`,
|
|
367
|
+
variables: {
|
|
368
|
+
kpiValue
|
|
369
|
+
},
|
|
370
|
+
context: {
|
|
371
|
+
hasUpload: true
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
if (!response.errors) {
|
|
375
|
+
this.grist.fetch();
|
|
376
|
+
document.dispatchEvent(new CustomEvent('notify', {
|
|
377
|
+
detail: {
|
|
378
|
+
message: i18next.t('text.data_created_successfully')
|
|
379
|
+
}
|
|
380
|
+
}));
|
|
381
|
+
}
|
|
382
|
+
return true;
|
|
383
|
+
}
|
|
384
|
+
catch (ex) {
|
|
385
|
+
console.error(ex);
|
|
386
|
+
document.dispatchEvent(new CustomEvent('notify', {
|
|
387
|
+
detail: {
|
|
388
|
+
type: 'error',
|
|
389
|
+
message: i18next.t('text.error')
|
|
390
|
+
}
|
|
391
|
+
}));
|
|
392
|
+
return false;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
async exportHandler() {
|
|
396
|
+
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
|
|
397
|
+
const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
|
|
398
|
+
return exportTargets.map(kpiValue => {
|
|
399
|
+
let tempObj = {};
|
|
400
|
+
for (const field of targetFieldSet) {
|
|
401
|
+
tempObj[field] = kpiValue[field];
|
|
402
|
+
}
|
|
403
|
+
return tempObj;
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
async importHandler(records) {
|
|
407
|
+
const popup = openPopup(html `
|
|
408
|
+
<kpi-value-importer
|
|
409
|
+
.kpiValues=${records}
|
|
410
|
+
@imported=${() => {
|
|
411
|
+
history.back();
|
|
412
|
+
this.grist.fetch();
|
|
413
|
+
}}
|
|
414
|
+
></kpi-value-importer>
|
|
415
|
+
`, {
|
|
416
|
+
backdrop: true,
|
|
417
|
+
size: 'large',
|
|
418
|
+
title: i18next.t('title.import kpi-value')
|
|
419
|
+
});
|
|
420
|
+
popup.onclosed = () => {
|
|
421
|
+
this.grist.fetch();
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
KpiValueListPage.styles = [
|
|
426
|
+
ScrollbarStyles,
|
|
427
|
+
CommonGristStyles,
|
|
428
|
+
CommonHeaderStyles,
|
|
429
|
+
css `
|
|
430
|
+
:host {
|
|
431
|
+
display: flex;
|
|
432
|
+
|
|
433
|
+
width: 100%;
|
|
434
|
+
|
|
435
|
+
--grid-record-emphasized-background-color: #8b0000;
|
|
436
|
+
--grid-record-emphasized-color: #ff6b6b;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
ox-grist {
|
|
440
|
+
overflow-y: auto;
|
|
441
|
+
flex: 1;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
ox-filters-form {
|
|
445
|
+
flex: 1;
|
|
446
|
+
}
|
|
447
|
+
`
|
|
448
|
+
];
|
|
449
|
+
__decorate([
|
|
450
|
+
property({ type: Object }),
|
|
451
|
+
__metadata("design:type", Object)
|
|
452
|
+
], KpiValueListPage.prototype, "gristConfig", void 0);
|
|
453
|
+
__decorate([
|
|
454
|
+
property({ type: String }),
|
|
455
|
+
__metadata("design:type", String)
|
|
456
|
+
], KpiValueListPage.prototype, "mode", void 0);
|
|
457
|
+
__decorate([
|
|
458
|
+
query('ox-grist'),
|
|
459
|
+
__metadata("design:type", DataGrist)
|
|
460
|
+
], KpiValueListPage.prototype, "grist", void 0);
|
|
461
|
+
KpiValueListPage = __decorate([
|
|
462
|
+
customElement('kpi-value-list-page')
|
|
463
|
+
], KpiValueListPage);
|
|
464
|
+
export { KpiValueListPage };
|
|
465
|
+
//# sourceMappingURL=kpi-value-list-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kpi-value-list-page.js","sourceRoot":"","sources":["../../../client/pages/kpi-value/kpi-value-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,0CAA0C,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5G,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO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AA;QACpB,CAAC,CAAA;IACH,CAAC;;AA9cM,uBAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;;;;;KAkBF;CACF,AAvBY,CAuBZ;AAQ2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAAoE;AAEpE;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;+CAAA;AAnCjC,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAgd5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport '@operato/data-grist/ox-grist.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-record-creator.js'\n\nimport { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup, OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\nimport { p13n } from '@operato/p13n'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\nimport { KpiValueImporter } from './kpi-value-importer'\n\n@customElement('kpi-value-list-page')\nexport class KpiValueListPage extends connect(store)(p13n(localize(i18next)(ScopedElementsMixin(PageView)))) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n\n ox-filters-form {\n flex: 1;\n }\n `\n ]\n\n static get scopedElements() {\n return {\n 'kpi-value-importer': KpiValueImporter\n }\n }\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.kpi value list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'kpi/kpi-value',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateKpiValue.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteKpiValue.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('title.kpi value list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n <ox-record-creator id=\"add\" .callback=${this.creationCallback.bind(this)}>\n <button>\n <md-icon>add</md-icon>\n </button>\n </ox-record-creator>\n </div>\n </div>\n\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: [\n 'kpi',\n 'version',\n 'valueDate',\n 'value',\n 'score',\n 'group',\n 'inputType',\n 'source',\n 'meta',\n 'createdAt',\n 'updatedAt',\n 'creator',\n 'updater'\n ],\n details: [\n 'kpi',\n 'version',\n 'valueDate',\n 'value',\n 'score',\n 'group',\n 'inputType',\n 'source',\n 'meta',\n 'createdAt',\n 'updatedAt',\n 'creator',\n 'updater'\n ]\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n // KPI Value 재계산 버튼 추가\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'refresh',\n title: '재계산',\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n this._recalculateKpiValue(record)\n }\n }\n },\n {\n type: 'resource-object',\n name: 'group',\n header: '프로젝트',\n record: {\n editable: false,\n options: {\n title: i18next.t('title.lookup project'),\n queryName: 'projects',\n columns: [\n { name: 'id', hidden: true },\n { name: 'name', header: i18next.t('field.name'), filter: 'search' },\n { name: 'startDate', header: i18next.t('field.start-date') },\n { name: 'endDate', header: i18next.t('field.end-date') }\n ],\n list: { fields: ['name', 'startDate', 'endDate'] },\n filterValueField: 'id',\n nameField: 'name',\n descriptionField: ''\n },\n renderer: (value, column, record, rowIndex, field) => {\n return record.project?.name || ''\n }\n },\n filter: true,\n width: 120\n },\n {\n type: 'string',\n name: 'kpi',\n header: 'KPI',\n record: { editable: false, renderer: (v, c, r) => r.kpi?.name },\n width: 150\n },\n { type: 'number', name: 'version', header: '버전', record: { editable: false }, filter: true, width: 80 },\n { type: 'string', name: 'valueDate', header: '실적일', record: { editable: true }, width: 120 },\n { type: 'number', name: 'value', header: '실적값', record: { editable: true }, width: 120 },\n { type: 'number', name: 'score', header: '성과점수', record: { editable: false }, width: 120 },\n { type: 'string', name: 'inputType', header: '입력방식', record: { editable: false }, width: 100 },\n { type: 'string', name: 'source', header: '수집출처', record: { editable: false }, width: 120 },\n { type: 'object', name: 'meta', header: '메타', record: { editable: false }, width: 120 },\n { type: 'datetime', name: 'createdAt', header: '생성일', record: { editable: false }, width: 180 },\n { type: 'datetime', name: 'updatedAt', header: '수정일', record: { editable: false }, width: 180 },\n {\n type: 'resource-object',\n name: 'creator',\n header: '생성자',\n record: { editable: false, renderer: (v, c, r) => r.creator?.name },\n width: 120\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: '수정자',\n record: { editable: false, renderer: (v, c, r) => r.updater?.name },\n width: 120\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n }\n },\n sorters: [{ name: 'valueDate' }]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: kpiValues(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n kpi {\n id\n name\n }\n version\n valueDate\n value\n score\n inputType\n source\n meta\n group\n project {\n id\n name\n }\n updater {\n id\n name\n }\n updatedAt\n creator {\n id\n name\n }\n createdAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async _deleteKpiValue() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteKpiValues(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n }\n\n async _updateKpiValue() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [KpiValuePatch!]!) {\n updateMultipleKpiValue(patches: $patches) {\n id\n kpi {\n id\n name\n }\n version\n valueDate\n value\n score\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n }\n }\n }\n\n async _recalculateKpiValue(kpiValue) {\n try {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n recalculateKpiValue(id: $id) {\n id\n value\n score\n valueDate\n project {\n id\n name\n }\n }\n }\n `,\n variables: {\n id: kpiValue.id\n }\n })\n if (!response.errors) {\n notify({ message: 'KPI Value가 성공적으로 재계산되었습니다.' })\n this.grist.fetch()\n }\n } catch (error) {\n notify({ message: 'KPI Value 재계산 중 오류가 발생했습니다.' })\n }\n }\n\n async creationCallback(kpiValue) {\n try {\n const response = await client.query({\n query: gql`\n mutation ($kpiValue: NewKpiValue!) {\n createKpiValue(kpiValue: $kpiValue) {\n id\n }\n }\n `,\n variables: {\n kpiValue\n },\n context: {\n hasUpload: true\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.data_created_successfully')\n }\n })\n )\n }\n\n return true\n } catch (ex) {\n console.error(ex)\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n type: 'error',\n message: i18next.t('text.error')\n }\n })\n )\n return false\n }\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'description', 'active'])\n\n return exportTargets.map(kpiValue => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = kpiValue[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n const popup = openPopup(\n html`\n <kpi-value-importer\n .kpiValues=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></kpi-value-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import kpi-value')\n }\n )\n\n popup.onclosed = () => {\n this.grist.fetch()\n }\n }\n}\n"]}
|
package/dist-client/route.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function route(page: string): "project-list" | "project-completed-list" | "users" | "/kpi-dashboard-map" | undefined;
|
|
1
|
+
export default function route(page: string): "project-list" | "project-completed-list" | "kpi-value-list" | "kpi-metric-value-list" | "kpi-metric-value-manual-entry" | "users" | "/kpi-dashboard-map" | undefined;
|
package/dist-client/route.js
CHANGED
|
@@ -11,6 +11,15 @@ export default function route(page) {
|
|
|
11
11
|
case 'project-completed-list':
|
|
12
12
|
import('./pages/sv-project-completed-list');
|
|
13
13
|
return page;
|
|
14
|
+
case 'kpi-value-list':
|
|
15
|
+
import('./pages/kpi-value/kpi-value-list-page');
|
|
16
|
+
return page;
|
|
17
|
+
case 'kpi-metric-value-list':
|
|
18
|
+
import('./pages/kpi-metric-value/kpi-metric-value-list-page');
|
|
19
|
+
return page;
|
|
20
|
+
case 'kpi-metric-value-manual-entry':
|
|
21
|
+
import('./pages/kpi-metric-value/kpi-metric-value-manual-entry-page');
|
|
22
|
+
return page;
|
|
14
23
|
}
|
|
15
24
|
}
|
|
16
25
|
//# sourceMappingURL=route.js.map
|
package/dist-client/route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,EAAE;YACL,OAAO,oBAAoB,CAAA;QAE7B,KAAK,OAAO;YACV,MAAM,CAAC,4BAA4B,CAAC,CAAA;YACpC,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,yBAAyB,CAAC,CAAA;YACjC,OAAO,IAAI,CAAA;QAEb,KAAK,wBAAwB;YAC3B,MAAM,CAAC,mCAAmC,CAAC,CAAA;YAC3C,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case '':\n return '/kpi-dashboard-map'\n\n case 'users':\n import('./pages/sv-user-management')\n return page\n\n case 'project-list':\n import('./pages/sv-project-list')\n return page\n\n case 'project-completed-list':\n import('./pages/sv-project-completed-list')\n return page\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,EAAE;YACL,OAAO,oBAAoB,CAAA;QAE7B,KAAK,OAAO;YACV,MAAM,CAAC,4BAA4B,CAAC,CAAA;YACpC,OAAO,IAAI,CAAA;QAEb,KAAK,cAAc;YACjB,MAAM,CAAC,yBAAyB,CAAC,CAAA;YACjC,OAAO,IAAI,CAAA;QAEb,KAAK,wBAAwB;YAC3B,MAAM,CAAC,mCAAmC,CAAC,CAAA;YAC3C,OAAO,IAAI,CAAA;QAEb,KAAK,gBAAgB;YACnB,MAAM,CAAC,uCAAuC,CAAC,CAAA;YAC/C,OAAO,IAAI,CAAA;QAEb,KAAK,uBAAuB;YAC1B,MAAM,CAAC,qDAAqD,CAAC,CAAA;YAC7D,OAAO,IAAI,CAAA;QAEb,KAAK,+BAA+B;YAClC,MAAM,CAAC,6DAA6D,CAAC,CAAA;YACrE,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case '':\n return '/kpi-dashboard-map'\n\n case 'users':\n import('./pages/sv-user-management')\n return page\n\n case 'project-list':\n import('./pages/sv-project-list')\n return page\n\n case 'project-completed-list':\n import('./pages/sv-project-completed-list')\n return page\n\n case 'kpi-value-list':\n import('./pages/kpi-value/kpi-value-list-page')\n return page\n\n case 'kpi-metric-value-list':\n import('./pages/kpi-metric-value/kpi-metric-value-list-page')\n return page\n\n case 'kpi-metric-value-manual-entry':\n import('./pages/kpi-metric-value/kpi-metric-value-manual-entry-page')\n return page\n }\n}\n"]}
|