diff --git a/src/pages/Worker/TranslationsVn.vue b/src/pages/Worker/TranslationsVn.vue index e29b503d8..f36407a9d 100644 --- a/src/pages/Worker/TranslationsVn.vue +++ b/src/pages/Worker/TranslationsVn.vue @@ -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); +// } +// }