| 
 | 1 | +<template>  | 
 | 2 | +	<PkpTable>  | 
 | 3 | +		<template #label>{{ t('manager.contributorRoles.title') }}</template>  | 
 | 4 | +		<template #top-controls>  | 
 | 5 | +			<PkpButton @click="contributorRoleManagerStore.roleAdd">  | 
 | 6 | +				{{ t('manager.contributorRoles.add') }}  | 
 | 7 | +			</PkpButton>  | 
 | 8 | +		</template>  | 
 | 9 | +		<TableHeader>  | 
 | 10 | +			<TableColumn>  | 
 | 11 | +				<span>  | 
 | 12 | +					{{ t('manager.contributorRoles.name') }}  | 
 | 13 | +				</span>  | 
 | 14 | +			</TableColumn>  | 
 | 15 | +			<TableColumn>  | 
 | 16 | +				<span>  | 
 | 17 | +					{{ t('manager.contributorRoles.identifier') }}  | 
 | 18 | +				</span>  | 
 | 19 | +			</TableColumn>  | 
 | 20 | +			<TableColumn></TableColumn>  | 
 | 21 | +		</TableHeader>  | 
 | 22 | + | 
 | 23 | +		<TableBody>  | 
 | 24 | +			<TableRow  | 
 | 25 | +				v-for="(role, roleId) in contributorRoleManagerStore.roles"  | 
 | 26 | +				:key="roleId"  | 
 | 27 | +			>  | 
 | 28 | +				<TableCell>  | 
 | 29 | +					<span>  | 
 | 30 | +						{{ localize(role.name) }}  | 
 | 31 | +					</span>  | 
 | 32 | +				</TableCell>  | 
 | 33 | +				<TableCell>  | 
 | 34 | +					<span>  | 
 | 35 | +						{{ role.identifier }}  | 
 | 36 | +					</span>  | 
 | 37 | +				</TableCell>  | 
 | 38 | +				<TableCell>  | 
 | 39 | +					<div  | 
 | 40 | +						class="flex justify-end"  | 
 | 41 | +						:style="{'padding-inline-end': `${depth + 0.5}rem`}"  | 
 | 42 | +					>  | 
 | 43 | +						<DropdownActions  | 
 | 44 | +							:label="t('common.moreActions')"  | 
 | 45 | +							button-variant="ellipsis"  | 
 | 46 | +							:actions="contributorRoleManagerStore.getItemActions()"  | 
 | 47 | +							@action="  | 
 | 48 | +								(actionName) =>  | 
 | 49 | +									contributorRoleManagerStore[actionName](role, roleId)  | 
 | 50 | +							"  | 
 | 51 | +						/>  | 
 | 52 | +					</div>  | 
 | 53 | +				</TableCell>  | 
 | 54 | +			</TableRow>  | 
 | 55 | +		</TableBody>  | 
 | 56 | +	</PkpTable>  | 
 | 57 | +</template>  | 
 | 58 | + | 
 | 59 | +<script setup>  | 
 | 60 | +import PkpTable from '@/components/Table/Table.vue';  | 
 | 61 | +import TableHeader from '@/components/Table/TableHeader.vue';  | 
 | 62 | +import TableColumn from '@/components/Table/TableColumn.vue';  | 
 | 63 | +import TableBody from '@/components/Table/TableBody.vue';  | 
 | 64 | +import TableRow from '@/components/Table/TableRow.vue';  | 
 | 65 | +import TableCell from '@/components/Table/TableCell.vue';  | 
 | 66 | +import DropdownActions from '@/components/DropdownActions/DropdownActions.vue';  | 
 | 67 | +import PkpButton from '@/components/Button/Button.vue';  | 
 | 68 | +import {localize} from '@/utils/i18n.js';  | 
 | 69 | +import {useContributorRoleManagerStore} from '@/managers/ContributorRoleManager/contributorRoleManagerStore.js';  | 
 | 70 | +
  | 
 | 71 | +const props = defineProps({});  | 
 | 72 | +
  | 
 | 73 | +const contributorRoleManagerStore = useContributorRoleManagerStore(props);  | 
 | 74 | +</script>  | 
0 commit comments