fix: adiciona botão de notificações na listagem de unidades
Sem o botão na tela de Units, não havia como chegar até a página de templates de notificação (captain/units/:unitId/notifications). Adiciona ícone de sino com rota correta + chave i18n PT/EN.
This commit is contained in:
parent
44908f32d1
commit
de62e7d68c
@ -109,6 +109,7 @@
|
|||||||
"ADD_UNIT": "Add Unit",
|
"ADD_UNIT": "Add Unit",
|
||||||
"EDIT_UNIT": "Edit Unit",
|
"EDIT_UNIT": "Edit Unit",
|
||||||
"DELETE_UNIT": "Delete Unit",
|
"DELETE_UNIT": "Delete Unit",
|
||||||
|
"NOTIFICATIONS_UNIT": "Notifications",
|
||||||
"LIST": {
|
"LIST": {
|
||||||
"TABLE_HEADER": [
|
"TABLE_HEADER": [
|
||||||
"Pix Key",
|
"Pix Key",
|
||||||
|
|||||||
@ -109,6 +109,7 @@
|
|||||||
"ADD_UNIT": "Adicionar Unidade",
|
"ADD_UNIT": "Adicionar Unidade",
|
||||||
"EDIT_UNIT": "Editar Unidade",
|
"EDIT_UNIT": "Editar Unidade",
|
||||||
"DELETE_UNIT": "Deletar Unidade",
|
"DELETE_UNIT": "Deletar Unidade",
|
||||||
|
"NOTIFICATIONS_UNIT": "Notificações",
|
||||||
"LIST": {
|
"LIST": {
|
||||||
"TABLE_HEADER": [
|
"TABLE_HEADER": [
|
||||||
"Pix Key",
|
"Pix Key",
|
||||||
|
|||||||
@ -39,6 +39,13 @@ const goToEdit = unit => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const goToNotifications = unit => {
|
||||||
|
router.push({
|
||||||
|
name: 'captain_settings_notifications',
|
||||||
|
params: { unitId: unit.id },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const openDeleteDialog = unit => {
|
const openDeleteDialog = unit => {
|
||||||
unitToDelete.value = unit;
|
unitToDelete.value = unit;
|
||||||
deleteDialogRef.value?.open();
|
deleteDialogRef.value?.open();
|
||||||
@ -176,6 +183,13 @@ const confirmDelete = async () => {
|
|||||||
</td>
|
</td>
|
||||||
<td class="py-4">
|
<td class="py-4">
|
||||||
<div class="flex justify-end gap-2">
|
<div class="flex justify-end gap-2">
|
||||||
|
<Button
|
||||||
|
icon="i-lucide-bell"
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
:label="t('CAPTAIN_SETTINGS.UNITS.NOTIFICATIONS_UNIT')"
|
||||||
|
@click="goToNotifications(unit)"
|
||||||
|
/>
|
||||||
<Button
|
<Button
|
||||||
icon="i-lucide-pencil"
|
icon="i-lucide-pencil"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user