fix: refs #4774 front remove
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-10-28 11:52:39 +01:00
parent 82b53ea1aa
commit c29dedaad7
1 changed files with 29 additions and 0 deletions

View File

@ -11,6 +11,12 @@ import VnInput from 'src/components/common/VnInput.vue';
const { t } = useI18n(); const { t } = useI18n();
const columns = computed(() => [ const columns = computed(() => [
{
align: 'left',
name: 'id',
label: t('id'),
visible: false,
},
{ {
align: 'left', align: 'left',
name: primaryKey, name: primaryKey,
@ -39,6 +45,19 @@ const columns = computed(() => [
isPrimary: true, isPrimary: true,
disable: (row) => !row.hasChanges, disable: (row) => !row.hasChanges,
}, },
{
title: t('globals.delete'),
icon: 'delete',
isPrimary: true,
action: (row) =>
openConfirmationModal(
t('You are going to delete this ticket purchase request'),
t(
'This ticket will be removed from ticket purchase requests! Continue anyway?'
),
() => removeLine(row.id)
),
},
], ],
}, },
]); ]);
@ -97,6 +116,16 @@ async function upsertI18n(data) {
originalData.value[index] = data; originalData.value[index] = data;
data.hasChanges = false; data.hasChanges = false;
} }
// async function removeLine(id) {
// try {
// await axios.delete(`TicketRequests/${id}`);
// notify(t('globals.dataSaved'), 'positive');
// location.reload();
// } catch (err) {
// console.error('Error ', err);
// }
// }
</script> </script>
<template> <template>