fix(frontend) : ERP-26/27 - review fixes: shared types, accents i18n, escape key, self-edit refresh, row-clickable guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
:columns="columns"
|
||||
:items="roleItems"
|
||||
:total-items="roles.length"
|
||||
:row-clickable="true"
|
||||
:row-clickable="canManage"
|
||||
:empty-message="t('admin.roles.noRoles')"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
@@ -76,26 +76,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface Permission {
|
||||
id: number
|
||||
code: string
|
||||
label: string
|
||||
module: string
|
||||
orphan: boolean
|
||||
}
|
||||
|
||||
interface Role {
|
||||
id: number
|
||||
code: string
|
||||
label: string
|
||||
description: string | null
|
||||
isSystem: boolean
|
||||
permissions: (Permission | string)[]
|
||||
}
|
||||
import type { Role } from '~/shared/types/rbac'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApi()
|
||||
const { can } = usePermissions()
|
||||
const canManage = can('core.roles.manage')
|
||||
|
||||
useHead({ title: t('admin.roles.title') })
|
||||
|
||||
|
||||
@@ -48,13 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface UserListItem {
|
||||
id: number
|
||||
username: string
|
||||
isAdmin: boolean
|
||||
roles: string[]
|
||||
directPermissions: string[]
|
||||
}
|
||||
import type { UserListItem } from '~/shared/types/rbac'
|
||||
|
||||
const { t } = useI18n()
|
||||
const api = useApi()
|
||||
|
||||
Reference in New Issue
Block a user