Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 2x | import type { SystemField } from '@/types/systemField'
/**
* Field schema for the Role list. See src/types/systemField.ts.
* fieldId values are read directly off `Role` (stores/roles.ts), except
* `createdByDisplay` which is derived — see
* utils/systemListViewModels.ts:toRoleViewModel.
*/
export const ROLE_SCHEMA: SystemField[] = [
{
fieldId: 'name',
name: { en: 'Name', fr: 'Nom' },
type: 'text',
width: 3
},
{
fieldId: 'isSystemRole',
name: { en: 'System', fr: 'Système' },
type: 'badge',
width: 1,
badgeOptions: [{ value: 'true', label: { en: 'System', fr: 'Système' }, color: 'warning' }],
hideWhenNoMatch: true
},
{
fieldId: 'description',
name: { en: 'Description', fr: 'Description' },
type: 'text',
width: 3
},
{
fieldId: 'permissions',
name: { en: 'Permissions', fr: 'Permissions' },
type: 'chips',
width: 3,
chipsShowCount: true,
chipsMaxVisible: 3,
chipsOverflowLabel: { en: '+{n}', fr: '+{n}' },
chipsDefaultColor: 'secondary'
},
{
fieldId: 'createdAt',
name: { en: 'Created', fr: 'Créé' },
type: 'date',
width: 1
},
{
fieldId: 'createdByDisplay',
name: { en: 'Created By', fr: 'Créé par' },
type: 'text',
width: 1
}
]
|