Unify & translate initial role/user detail in init & bootstrap command (#10493)

* Unify initial role/user detail in init & bootstrap

* translate role descriptions

* translate data from system collections
This commit is contained in:
Azri Kahar
2021-12-14 22:33:44 +08:00
committed by GitHub
parent 549b9ee8e1
commit 31bb890496
6 changed files with 25 additions and 11 deletions

View File

@@ -66,6 +66,7 @@ import { Header as TableHeader } from '@/components/v-table/types';
import ValueNull from '@/views/private/components/value-null';
import { useRouter } from 'vue-router';
import { unexpectedError } from '@/utils/unexpected-error';
import { translate } from '@/utils/translate-object-values';
type Role = {
id: number;
@@ -155,7 +156,7 @@ export default defineComponent({
},
...response.data.data.map((role: any) => {
return {
...role,
...translate(role),
count: role.users[0]?.count.id || 0,
};
}),