@tager/admin-administrators 1.0.1 → 1.0.2
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/dev/App.vue.d.ts +4 -3
- package/dist/index.mjs +560 -634
- package/dist/services/requests.d.ts +8 -8
- package/dist/style.css +1 -1
- package/dist/typings/model.d.ts +5 -5
- package/dist/views/AdminForm/AdminForm.helpers.d.ts +6 -6
- package/dist/views/AdminForm/AdminForm.vue.d.ts +1847 -372
- package/dist/views/AdminList/AdminList.vue.d.ts +5 -4
- package/dist/views/RoleForm/RoleForm.helpers.d.ts +5 -5
- package/dist/views/RoleForm/RoleForm.vue.d.ts +6 -5
- package/dist/views/RoleList/RoleList.vue.d.ts +7 -7
- package/package.json +20 -24
- package/src/dev/App.vue +2 -3
- package/src/dev/env.ts +11 -11
- package/src/services/requests.ts +5 -5
- package/src/typings/model.ts +1 -1
- package/src/views/AdminForm/AdminForm.helpers.ts +6 -6
- package/src/views/AdminForm/AdminForm.vue +11 -11
- package/src/views/AdminList/AdminList.vue +4 -4
- package/src/views/RoleForm/RoleForm.helpers.ts +5 -5
- package/src/views/RoleForm/RoleForm.vue +7 -10
- package/src/views/RoleList/RoleList.vue +2 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ColumnDefinition } from '@tager/admin-ui';
|
|
2
|
-
import { AdminType } from '../../typings/model';
|
|
1
|
+
import { type ColumnDefinition } from '@tager/admin-ui';
|
|
2
|
+
import { type AdminType } from '../../typings/model';
|
|
3
3
|
import { getAdminFormUrl } from '../../utils/paths';
|
|
4
|
-
declare const _default:
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
5
7
|
t: import("i18next").TFunction;
|
|
6
8
|
columnDefs: ColumnDefinition<AdminType>[];
|
|
7
9
|
rowData: import("vue").Ref<AdminType[]>;
|
|
@@ -11,4 +13,3 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
11
13
|
handleAdminDelete: (entityId: string | number) => void;
|
|
12
14
|
getAdminFormUrl: typeof getAdminFormUrl;
|
|
13
15
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
14
|
-
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType } from '@tager/admin-ui';
|
|
3
|
-
import { RoleType, ScopeGroupsData } from '../../typings/model';
|
|
4
|
-
import { RoleCreationPayload, RoleUpdatePayload } from '../../services/requests';
|
|
5
|
-
export
|
|
1
|
+
import { type Nullable } from '@tager/admin-services';
|
|
2
|
+
import { type OptionType } from '@tager/admin-ui';
|
|
3
|
+
import { type RoleType, type ScopeGroupsData } from '../../typings/model';
|
|
4
|
+
import { type RoleCreationPayload, type RoleUpdatePayload } from '../../services/requests';
|
|
5
|
+
export type FormValues = {
|
|
6
6
|
name: string;
|
|
7
7
|
scopes: Array<OptionType>;
|
|
8
8
|
isSuperAdmin: boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType, TagerFormSubmitEvent } from '@tager/admin-ui';
|
|
3
|
-
import { RoleType } from '../../typings/model';
|
|
4
|
-
declare const _default:
|
|
1
|
+
import { type Nullable } from '@tager/admin-services';
|
|
2
|
+
import { type OptionType, type TagerFormSubmitEvent } from '@tager/admin-ui';
|
|
3
|
+
import { type RoleType } from '../../typings/model';
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
5
7
|
backButtonUrl: "/roles";
|
|
6
8
|
values: import("vue").Ref<{
|
|
7
9
|
name: string;
|
|
@@ -21,4 +23,3 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
21
23
|
isCreation: import("vue").ComputedRef<boolean>;
|
|
22
24
|
scopeOptionList: import("vue").ComputedRef<OptionType<string>[]>;
|
|
23
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
24
|
-
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
1
|
import { type ColumnDefinition } from "@tager/admin-ui";
|
|
3
|
-
import { RoleType, ScopeType } from '../../typings/model';
|
|
2
|
+
import { type RoleType, type ScopeType } from '../../typings/model';
|
|
4
3
|
import { getRoleFormUrl } from '../../utils/paths';
|
|
5
|
-
declare const _default:
|
|
4
|
+
declare const _default: typeof __VLS_export;
|
|
5
|
+
export default _default;
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
6
7
|
columnDefs: ColumnDefinition<RoleType>[];
|
|
7
8
|
rowData: import("vue").Ref<RoleType[]>;
|
|
8
9
|
isRowDataLoading: import("vue").ComputedRef<boolean>;
|
|
@@ -10,11 +11,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
10
11
|
isBusy: (roleId: number) => boolean;
|
|
11
12
|
handleRoleDelete: (entityId: string | number) => void;
|
|
12
13
|
getRoleFormUrl: typeof getRoleFormUrl;
|
|
13
|
-
getScopeGroupList: (scopes: Array<ScopeType>) => {
|
|
14
|
+
getScopeGroupList: (scopes: Array<ScopeType>) => Array<{
|
|
14
15
|
module: string;
|
|
15
|
-
scopes: ScopeType
|
|
16
|
-
}
|
|
16
|
+
scopes: Array<ScopeType>;
|
|
17
|
+
}>;
|
|
17
18
|
getRestScopesText: (restPrivilegesCount: number) => string;
|
|
18
19
|
scopesPerModuleCount: number;
|
|
19
20
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
20
|
-
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tager/admin-administrators",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build:js": "vite build",
|
|
19
|
-
"build:package": "
|
|
19
|
+
"build:package": "yarn build:js && (yarn emit-declarations || echo 'vue-tsc: type errors found, declarations emitted anyway')",
|
|
20
20
|
"emit-declarations": "vue-tsc --project tsconfig.json --emitDeclarationOnly",
|
|
21
|
-
"start": "
|
|
21
|
+
"start": "vite",
|
|
22
22
|
"prepare": "yarn build:package",
|
|
23
|
-
"tager:update": "yarn upgrade --latest --scope @tager"
|
|
23
|
+
"tager:update": "yarn upgrade --latest --scope @tager",
|
|
24
|
+
"lint": "eslint .",
|
|
25
|
+
"format": "prettier --write src"
|
|
24
26
|
},
|
|
25
27
|
"dependencies": {
|
|
26
28
|
"lodash.isequal": "^4.5.0",
|
|
@@ -29,9 +31,7 @@
|
|
|
29
31
|
"path-to-regexp": "^6.1.0"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@babel/eslint-parser": "^7.17.0",
|
|
34
|
-
"@rushstack/eslint-patch": "^1.1.2",
|
|
34
|
+
"@eslint/js": "^9.39.5",
|
|
35
35
|
"@tager/admin-dynamic-field": "^1.0.0",
|
|
36
36
|
"@tager/admin-layout": "^1.0.6",
|
|
37
37
|
"@tager/admin-services": "^1.1.3",
|
|
@@ -39,29 +39,25 @@
|
|
|
39
39
|
"@types/lodash.isequal": "^4.5.6",
|
|
40
40
|
"@types/lodash.pick": "^4.4.7",
|
|
41
41
|
"@types/node": "16.x",
|
|
42
|
-
"@
|
|
43
|
-
"@typescript
|
|
44
|
-
"@vitejs/plugin-vue": "^2.3.1",
|
|
45
|
-
"@vue/cli-plugin-babel": "^5.0.4",
|
|
46
|
-
"@vue/cli-plugin-typescript": "^5.0.4",
|
|
47
|
-
"@vue/cli-service": "~5.0.0",
|
|
48
|
-
"@vue/eslint-config-prettier": "^7.0.0",
|
|
49
|
-
"@vue/eslint-config-typescript": "^10.0.0",
|
|
50
|
-
"concurrently": "^7.1.0",
|
|
42
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
43
|
+
"@vue/eslint-config-typescript": "^14.9.0",
|
|
51
44
|
"core-js": "^3.22.3",
|
|
52
|
-
"eslint": "^
|
|
53
|
-
"eslint-config-prettier": "^
|
|
54
|
-
"eslint-
|
|
55
|
-
"eslint-plugin-
|
|
56
|
-
"eslint-plugin-vue": "^
|
|
45
|
+
"eslint": "^9.39.5",
|
|
46
|
+
"eslint-config-prettier": "^10.1.8",
|
|
47
|
+
"eslint-import-resolver-typescript": "^4.4.5",
|
|
48
|
+
"eslint-plugin-import": "^2.32.0",
|
|
49
|
+
"eslint-plugin-vue": "^10.12.0",
|
|
50
|
+
"globals": "^16.5.0",
|
|
57
51
|
"pinia": "^2.0.18",
|
|
52
|
+
"prettier": "^3.9.10",
|
|
58
53
|
"sass": "^1.51.0",
|
|
59
54
|
"sass-loader": "^12.6.0",
|
|
60
|
-
"typescript": "^
|
|
61
|
-
"vite": "^
|
|
55
|
+
"typescript": "^5.9.3",
|
|
56
|
+
"vite": "^6.4.5",
|
|
62
57
|
"vue": "^3.2.31",
|
|
58
|
+
"vue-eslint-parser": "^10.4.1",
|
|
63
59
|
"vue-router": "^4.0.14",
|
|
64
|
-
"vue-tsc": "^
|
|
60
|
+
"vue-tsc": "^3.3.14"
|
|
65
61
|
},
|
|
66
62
|
"peerDependencies": {
|
|
67
63
|
"@tager/admin-layout": "^1.0.0",
|
package/src/dev/App.vue
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import {defineComponent} from 'vue';
|
|
9
9
|
|
|
10
|
-
import {MenuItemType, PageLayout} from "@tager/admin-layout";
|
|
11
|
-
|
|
10
|
+
import {type MenuItemType, PageLayout} from "@tager/admin-layout";
|
|
12
11
|
import {ViewListIcon} from "@tager/admin-ui";
|
|
12
|
+
import {useI18n} from "@tager/admin-services";
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
getAdminFormUrl,
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
getRoleFormUrl,
|
|
18
18
|
getRoleListUrl,
|
|
19
19
|
} from '../utils/paths';
|
|
20
|
-
import {useI18n} from "@tager/admin-services";
|
|
21
20
|
|
|
22
21
|
export default defineComponent({
|
|
23
22
|
name: 'App',
|
package/src/dev/env.ts
CHANGED
|
@@ -2,16 +2,16 @@ import { initializeEnvironment } from "@tager/admin-services";
|
|
|
2
2
|
|
|
3
3
|
export function populateEnvironment() {
|
|
4
4
|
initializeEnvironment({
|
|
5
|
-
publicPath:
|
|
6
|
-
appEnv:
|
|
7
|
-
apiUrl:
|
|
8
|
-
accessToken:
|
|
9
|
-
websiteUrl:
|
|
10
|
-
websiteButtonUrl:
|
|
11
|
-
sentryDsn:
|
|
12
|
-
sentryEnv:
|
|
13
|
-
baseUrl:
|
|
14
|
-
nodeEnv:
|
|
15
|
-
version:
|
|
5
|
+
publicPath: import.meta.env.VUE_APP_PUBLIC_PATH,
|
|
6
|
+
appEnv: import.meta.env.VUE_APP_ENV,
|
|
7
|
+
apiUrl: import.meta.env.VUE_APP_API_URL,
|
|
8
|
+
accessToken: import.meta.env.VUE_APP_ACCESS_TOKEN,
|
|
9
|
+
websiteUrl: import.meta.env.VUE_APP_WEBSITE_URL,
|
|
10
|
+
websiteButtonUrl: import.meta.env.VUE_APP_WEBSITE_BUTTON_URL,
|
|
11
|
+
sentryDsn: import.meta.env.VUE_APP_SENTRY_DSN,
|
|
12
|
+
sentryEnv: import.meta.env.VUE_APP_SENTRY_ENVIRONMENT,
|
|
13
|
+
baseUrl: import.meta.env.BASE_URL,
|
|
14
|
+
nodeEnv: import.meta.env.MODE,
|
|
15
|
+
version: import.meta.env.VUE_APP_VERSION,
|
|
16
16
|
});
|
|
17
17
|
}
|
package/src/services/requests.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { request, ResponseBody } from '@tager/admin-services';
|
|
1
|
+
import { request, type ResponseBody } from '@tager/admin-services';
|
|
2
2
|
import {
|
|
3
|
-
FieldConfigUnion,
|
|
4
|
-
FieldShortType,
|
|
5
|
-
OutgoingValueUnion,
|
|
3
|
+
type FieldConfigUnion,
|
|
4
|
+
type FieldShortType,
|
|
5
|
+
type OutgoingValueUnion,
|
|
6
6
|
} from '@tager/admin-dynamic-field';
|
|
7
7
|
|
|
8
|
-
import { AdminType, RoleType, ScopeGroupsData } from '../typings/model';
|
|
8
|
+
import { type AdminType, type RoleType, type ScopeGroupsData } from '../typings/model';
|
|
9
9
|
|
|
10
10
|
type SuccessData = { success: boolean };
|
|
11
11
|
|
package/src/typings/model.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Nullable, createId } from '@tager/admin-services';
|
|
2
|
-
import { OptionType } from '@tager/admin-ui';
|
|
3
|
-
import { FieldUnion, universalFieldUtils } from '@tager/admin-dynamic-field';
|
|
1
|
+
import { type Nullable, createId } from '@tager/admin-services';
|
|
2
|
+
import { type OptionType } from '@tager/admin-ui';
|
|
3
|
+
import { type FieldUnion, universalFieldUtils } from '@tager/admin-dynamic-field';
|
|
4
4
|
|
|
5
|
-
import { AdminType, RoleType } from '../../typings/model';
|
|
5
|
+
import { type AdminType, type RoleType } from '../../typings/model';
|
|
6
6
|
import {
|
|
7
|
-
AdminCreationPayload,
|
|
8
|
-
AdminUpdatePayload,
|
|
7
|
+
type AdminCreationPayload,
|
|
8
|
+
type AdminUpdatePayload,
|
|
9
9
|
} from '../../services/requests';
|
|
10
10
|
|
|
11
11
|
export type FormValues = {
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
defineComponent,
|
|
63
63
|
onMounted,
|
|
64
64
|
ref,
|
|
65
|
-
SetupContext,
|
|
65
|
+
type SetupContext,
|
|
66
66
|
watch,
|
|
67
67
|
} from 'vue';
|
|
68
68
|
import { useRoute, useRouter } from 'vue-router';
|
|
@@ -72,30 +72,30 @@ import {
|
|
|
72
72
|
convertRequestErrorToMap,
|
|
73
73
|
navigateBack,
|
|
74
74
|
notEmpty,
|
|
75
|
-
Nullable,
|
|
75
|
+
type Nullable,
|
|
76
76
|
useResource,
|
|
77
77
|
useToast,
|
|
78
78
|
} from '@tager/admin-services';
|
|
79
79
|
import {
|
|
80
|
-
OptionType,
|
|
80
|
+
type OptionType,
|
|
81
81
|
FormFooter,
|
|
82
|
-
TagerFormSubmitEvent,
|
|
82
|
+
type TagerFormSubmitEvent,
|
|
83
83
|
FormField,
|
|
84
84
|
FormFieldMultiSelect,
|
|
85
|
-
TabType,
|
|
85
|
+
type TabType,
|
|
86
86
|
TabList,
|
|
87
87
|
} from '@tager/admin-ui';
|
|
88
88
|
import { useI18n } from '@tager/admin-services';
|
|
89
89
|
import {
|
|
90
90
|
DynamicField,
|
|
91
|
-
FieldConfigUnion,
|
|
92
|
-
FieldShortType,
|
|
93
|
-
FieldUnion,
|
|
94
|
-
IncomingValueUnion,
|
|
91
|
+
type FieldConfigUnion,
|
|
92
|
+
type FieldShortType,
|
|
93
|
+
type FieldUnion,
|
|
94
|
+
type IncomingValueUnion,
|
|
95
95
|
universalFieldUtils,
|
|
96
96
|
} from '@tager/admin-dynamic-field';
|
|
97
97
|
|
|
98
|
-
import { AdminType, RoleType } from '../../typings/model';
|
|
98
|
+
import { type AdminType, type RoleType } from '../../typings/model';
|
|
99
99
|
import {
|
|
100
100
|
createAdmin,
|
|
101
101
|
getAdmin,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
convertFormValuesToAdminUpdatePayload,
|
|
111
111
|
convertAdminToFormValues,
|
|
112
112
|
convertRoleListToOptions,
|
|
113
|
-
FormValues,
|
|
113
|
+
type FormValues,
|
|
114
114
|
} from './AdminForm.helpers';
|
|
115
115
|
|
|
116
116
|
export default defineComponent({
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:loading="isRowDataLoading"
|
|
15
15
|
:error-message="errorMessage"
|
|
16
16
|
>
|
|
17
|
-
<template
|
|
17
|
+
<template #cell(roles)="{ row }">
|
|
18
18
|
<ul>
|
|
19
19
|
<li v-for="role of row.roles" :key="role.id">
|
|
20
20
|
{{ role.name }}
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
import {defineComponent, onMounted} from 'vue';
|
|
50
50
|
|
|
51
51
|
import {useResourceDelete} from '@tager/admin-services';
|
|
52
|
-
import {ColumnDefinition, DataTable, BaseButton, DeleteIcon, EditIcon, useDataTable} from '@tager/admin-ui';
|
|
52
|
+
import {type ColumnDefinition, DataTable, BaseButton, DeleteIcon, EditIcon, useDataTable} from '@tager/admin-ui';
|
|
53
53
|
import {useI18n} from "@tager/admin-services";
|
|
54
|
+
import {Page} from "@tager/admin-layout";
|
|
54
55
|
|
|
55
|
-
import {AdminType} from '../../typings/model';
|
|
56
|
+
import {type AdminType} from '../../typings/model';
|
|
56
57
|
import {deleteAdmin, getAdminList} from '../../services/requests';
|
|
57
58
|
import {getAdminFormUrl} from '../../utils/paths';
|
|
58
59
|
|
|
59
|
-
import {Page} from "@tager/admin-layout";
|
|
60
60
|
|
|
61
61
|
export default defineComponent({
|
|
62
62
|
name: 'AdminList',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Nullable } from '@tager/admin-services';
|
|
2
|
-
import { OptionType } from '@tager/admin-ui';
|
|
1
|
+
import { type Nullable } from '@tager/admin-services';
|
|
2
|
+
import { type OptionType } from '@tager/admin-ui';
|
|
3
3
|
|
|
4
|
-
import { RoleType, ScopeGroupsData } from '../../typings/model';
|
|
4
|
+
import { type RoleType, type ScopeGroupsData } from '../../typings/model';
|
|
5
5
|
import {
|
|
6
|
-
RoleCreationPayload,
|
|
7
|
-
RoleUpdatePayload,
|
|
6
|
+
type RoleCreationPayload,
|
|
7
|
+
type RoleUpdatePayload,
|
|
8
8
|
} from '../../services/requests';
|
|
9
9
|
|
|
10
10
|
export type FormValues = {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
<template #footer>
|
|
21
21
|
<FormFooter
|
|
22
22
|
:back-href="backButtonUrl"
|
|
23
|
-
@submit="submitForm"
|
|
24
23
|
:is-submitting="isSubmitting"
|
|
25
24
|
:is-creation="isCreation"
|
|
26
25
|
:can-create-another="isCreation"
|
|
26
|
+
@submit="submitForm"
|
|
27
27
|
/>
|
|
28
28
|
</template>
|
|
29
29
|
</Page>
|
|
@@ -37,21 +37,19 @@ import {
|
|
|
37
37
|
ref,
|
|
38
38
|
watch,
|
|
39
39
|
} from 'vue';
|
|
40
|
+
import {useRoute, useRouter} from "vue-router";
|
|
40
41
|
|
|
41
42
|
import {Page} from "@tager/admin-layout";
|
|
42
|
-
|
|
43
43
|
import {
|
|
44
44
|
convertRequestErrorToMap, navigateBack,
|
|
45
|
-
Nullable,
|
|
45
|
+
type Nullable,
|
|
46
46
|
useResource, useToast,
|
|
47
47
|
} from '@tager/admin-services';
|
|
48
|
-
|
|
49
48
|
import {useI18n} from "@tager/admin-services";
|
|
50
|
-
|
|
51
49
|
import {
|
|
52
|
-
OptionType,
|
|
50
|
+
type OptionType,
|
|
53
51
|
FormFooter,
|
|
54
|
-
TagerFormSubmitEvent,
|
|
52
|
+
type TagerFormSubmitEvent,
|
|
55
53
|
FormField, FormFieldMultiSelect
|
|
56
54
|
} from '@tager/admin-ui';
|
|
57
55
|
|
|
@@ -61,7 +59,7 @@ import {
|
|
|
61
59
|
getScopes,
|
|
62
60
|
updateRole,
|
|
63
61
|
} from '../../services/requests';
|
|
64
|
-
import {RoleType, ScopeGroupsData} from '../../typings/model';
|
|
62
|
+
import {type RoleType, type ScopeGroupsData} from '../../typings/model';
|
|
65
63
|
import {getRoleFormUrl, getRoleListUrl} from '../../utils/paths';
|
|
66
64
|
|
|
67
65
|
import {
|
|
@@ -69,9 +67,8 @@ import {
|
|
|
69
67
|
convertFormValuesToRoleUpdatePayload,
|
|
70
68
|
convertRoleToFormValues,
|
|
71
69
|
convertScopeDataToOptions,
|
|
72
|
-
FormValues,
|
|
70
|
+
type FormValues,
|
|
73
71
|
} from './RoleForm.helpers';
|
|
74
|
-
import {useRoute, useRouter} from "vue-router";
|
|
75
72
|
|
|
76
73
|
export default defineComponent({
|
|
77
74
|
name: 'RoleForm',
|
|
@@ -79,7 +79,6 @@ import {defineComponent, onMounted} from "vue";
|
|
|
79
79
|
|
|
80
80
|
import {useResourceDelete, useI18n} from '@tager/admin-services';
|
|
81
81
|
import {Page} from "@tager/admin-layout";
|
|
82
|
-
|
|
83
82
|
import {
|
|
84
83
|
BaseButton,
|
|
85
84
|
type ColumnDefinition,
|
|
@@ -89,7 +88,7 @@ import {
|
|
|
89
88
|
useDataTable,
|
|
90
89
|
} from "@tager/admin-ui";
|
|
91
90
|
|
|
92
|
-
import {RoleType, ScopeType} from '../../typings/model';
|
|
91
|
+
import {type RoleType, type ScopeType} from '../../typings/model';
|
|
93
92
|
import {deleteRole, getRoleList} from '../../services/requests';
|
|
94
93
|
import {getRoleFormUrl} from '../../utils/paths';
|
|
95
94
|
|
|
@@ -136,7 +135,7 @@ export default defineComponent({
|
|
|
136
135
|
|
|
137
136
|
function getScopeGroupList(
|
|
138
137
|
scopes: Array<ScopeType>
|
|
139
|
-
): Array<{ module: string; scopes: ScopeType }> {
|
|
138
|
+
): Array<{ module: string; scopes: Array<ScopeType> }> {
|
|
140
139
|
const map = new Map();
|
|
141
140
|
scopes.forEach((scope) => {
|
|
142
141
|
const key = scope.module;
|