# Pull Request Template ## Description This PR includes, 1. Adjusting the inbox settings page layout width from 3xl to 4xl for the collaborators, configuration, and bot configuration sections. 2. Adding a dynamic max-width for inbox settings banners based on the selected tab. 3. Making the sender name preview layout responsive. 4. Reordering automation rule row buttons so Clone appears before Delete. 5. Update the Gmail icon ratio. 6. Fix height issues with team/inbox pages 7. The delete button changes to red on hover 8. Add border to conversation header when no dashboard apps present ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
78 lines
2.0 KiB
Vue
78 lines
2.0 KiB
Vue
<script setup>
|
|
import { useI18n } from 'vue-i18n';
|
|
import { getI18nKey } from 'dashboard/routes/dashboard/settings/helper/settingsHelper';
|
|
|
|
import Button from 'dashboard/components-next/button/Button.vue';
|
|
import { BaseTableRow, BaseTableCell } from 'dashboard/components-next/table';
|
|
|
|
defineProps({
|
|
roles: {
|
|
type: Array,
|
|
required: true,
|
|
},
|
|
loading: {
|
|
type: Object,
|
|
default: () => ({}),
|
|
},
|
|
});
|
|
|
|
const emit = defineEmits(['edit', 'delete']);
|
|
|
|
const { t } = useI18n();
|
|
|
|
const getFormattedPermissions = role => {
|
|
return role.permissions
|
|
.map(event => t(getI18nKey('CUSTOM_ROLE.PERMISSIONS', event)))
|
|
.join(', ');
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<BaseTableRow
|
|
v-for="customRole in roles"
|
|
:key="customRole.id"
|
|
:item="customRole"
|
|
>
|
|
<template #default>
|
|
<BaseTableCell>
|
|
<span class="text-body-main text-n-slate-12 truncate block">
|
|
{{ customRole.name }}
|
|
</span>
|
|
</BaseTableCell>
|
|
|
|
<BaseTableCell>
|
|
<span class="text-body-main text-n-slate-11 truncate block">
|
|
{{ customRole.description }}
|
|
</span>
|
|
</BaseTableCell>
|
|
|
|
<BaseTableCell>
|
|
<span class="text-body-main text-n-slate-11 block">
|
|
{{ getFormattedPermissions(customRole) }}
|
|
</span>
|
|
</BaseTableCell>
|
|
|
|
<BaseTableCell align="end" class="w-24">
|
|
<div class="flex gap-3 justify-end flex-shrink-0">
|
|
<Button
|
|
v-tooltip.top="$t('CUSTOM_ROLE.EDIT.BUTTON_TEXT')"
|
|
icon="i-woot-edit-pen"
|
|
slate
|
|
sm
|
|
@click="emit('edit', customRole)"
|
|
/>
|
|
<Button
|
|
v-tooltip.top="$t('CUSTOM_ROLE.DELETE.BUTTON_TEXT')"
|
|
icon="i-woot-bin"
|
|
slate
|
|
sm
|
|
class="hover:enabled:text-n-ruby-11 hover:enabled:bg-n-ruby-2"
|
|
:is-loading="loading[customRole.id]"
|
|
@click="emit('delete', customRole)"
|
|
/>
|
|
</div>
|
|
</BaseTableCell>
|
|
</template>
|
|
</BaseTableRow>
|
|
</template>
|