This commit is contained in:
parent
82b53ea1aa
commit
c29dedaad7
|
@ -11,6 +11,12 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
|
||||
const { t } = useI18n();
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('id'),
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: primaryKey,
|
||||
|
@ -39,6 +45,19 @@ const columns = computed(() => [
|
|||
isPrimary: true,
|
||||
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;
|
||||
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>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue