0
0
Fork 0

refs #6321 perf: i18n

This commit is contained in:
Javier Segarra 2024-04-03 08:41:20 +02:00
parent 75e02bf328
commit 5a497289da
3 changed files with 19 additions and 15 deletions

View File

@ -234,17 +234,12 @@ function rowsHasSelected({ keys }) {
const resultSplit = ref([]);
const split = async ({ simple }, data = []) => {
openConfirmationModal(
t('Confirm splitAll'),
t('Are you sure you want to split all tickets?'),
null,
() => {
const body = simple ? data : selectedRows.value;
axios.post(`Tickets/split`, body).then((data) => {
resultSplit.value = data;
});
}
);
openConfirmationModal(t('Confirm split selected'), t('splitQuestion'), null, () => {
const body = simple ? data : selectedRows.value;
axios.post(`Tickets/split`, body).then((data) => {
resultSplit.value = data;
});
});
};
defineExpose({ split });
@ -336,3 +331,12 @@ function getIcon(key, prop) {
</template>
</VnPaginate>
</template>
<i18n>
en:
splitQuestion: Are you sure you want to split all tickets?
Confirm split selected: Confirm split selected
es:
splitQuestion: ¿Estás seguro de separar los tickets seleccionados?
Confirm split selected: Confirmar separar tickets seleccionados
</i18n>

View File

@ -22,7 +22,7 @@ const token = session.getTokenMultimedia();
const ticketRef = ref(null);
const hasRowsSelected = ref(false);
async function splitAll() {
async function splitSelected() {
ticketRef.value.split({ all: true });
}
</script>
@ -48,12 +48,12 @@ async function splitAll() {
<QBtn
round
color="primary"
@click="splitAll()"
@click="splitSelected()"
:disabled="!hasRowsSelected"
>
<QIcon name="call_split"></QIcon>
<QTooltip>
{{ t('globals.splitAll') }}
{{ t('globals.split') }}
</QTooltip>
</QBtn>
<QBtn icon="close" flat round dense v-close-popup />

View File

@ -35,7 +35,7 @@ export default {
path: 'negative',
meta: {
title: 'negative',
icon: 'view_lists',
icon: 'view_list',
},
component: () =>
import('src/pages/Ticket/Negative/TicketLackList.vue'),