0
0
Fork 0

refs #6321 updates

This commit is contained in:
Javier Segarra 2024-03-28 07:17:06 +01:00
parent 3a024e81b5
commit 30a32ad17d
3 changed files with 35 additions and 5 deletions

View File

@ -51,7 +51,7 @@ async function confirm() {
}
</script>
<template>
<QDialog ref="dialogRef">
<QDialog ref="dialogRef" persistent>
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<QAvatar

View File

@ -10,6 +10,9 @@ import VnSelectFilter from 'components/common/VnSelectFilter.vue';
import VnInput from 'src/components/common/VnInput.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import { toDate, toHour } from 'src/filters';
import { useVnConfirm } from 'composables/useVnConfirm';
const { openConfirmationModal } = useVnConfirm();
import VnConfirm from 'components/ui/VnConfirm.vue';
import { useDialogPluginComponent } from 'quasar';
const { t } = useI18n();
@ -64,6 +67,7 @@ const saveChange = async (field, { rowIndex, row }) => {
// Buscador_Ticket (vNewTicketFk)
// Call Form_Requery
await split({ simple: true });
break;
case 'code':
// Call ticketChangeState(ticketFk, stateFk)
@ -323,6 +327,13 @@ function rowsHasSelected({ keys }) {
emit('selection', keys);
}
const split = async (options) => {
openConfirmationModal(
t('Confirm splitAll'),
t('Are you sure you want to split all tickets?'),
null,
() => console.log('')
);
let body = [];
// if (options.simple) {
body = selectedRows.value;
@ -379,7 +390,12 @@ defineExpose({ split });
</QTd>
<QTd v-for="col in props.cols" :key="col.name">
<template v-if="col.name == 'actions'">
<QBtn round v-close-popup color="primary">
<QBtn
round
v-close-popup
color="primary"
@click="saveChange('split', props)"
>
<QIcon name="call_split"></QIcon>
<QTooltip>
{{ t('components.leftMenu.removeFromPinned') }}
@ -422,6 +438,11 @@ defineExpose({ split });
</QTable>
</template>
</VnPaginate>
<VnConfirm
model="confirmationModal"
:title="t('Confirm splitAll')"
:message="t('Are you sure you want to split all tickets?')"
></VnConfirm>
</template>
<style lang="scss"></style>

View File

@ -2,8 +2,9 @@
import { toRefs, ref } from 'vue';
import TicketLackDialog from './TicketLackDialog.vue';
import { useSession } from 'src/composables/useSession';
import { useVnConfirm } from 'composables/useVnConfirm';
// import { useVnConfirm } from 'composables/useVnConfirm';
import { useI18n } from 'vue-i18n';
// import VnConfirm from 'components/ui/VnConfirm.vue';
const { t } = useI18n();
const $props = defineProps({
@ -20,10 +21,12 @@ const { ticket } = toRefs($props);
const session = useSession();
const token = session.getTokenMultimedia();
const { openConfirmationModal } = useVnConfirm();
// const { openConfirmationModal } = useVnConfirm();
const ticketRef = ref(null);
const hasRowsSelected = ref(false);
// const confirmationModal = ref(false);
async function splitAll() {
// confirmationModal.value = true;
ticketRef.value.split({ all: true });
// openConfirmationModal(
// t('Confirm splitAll'),
@ -34,7 +37,12 @@ async function splitAll() {
}
</script>
<template>
<QDialog ref="dialogRef" full-width>
<QDialog
persistent
ref="dialogLackRef"
full-width
@before-show="() => (hasRowsSelected = false)"
>
<QCard class="q-pa-sm">
<QCardSection class="row items-center q-pb-none">
<QImg
@ -70,4 +78,5 @@ async function splitAll() {
@selection="(rows) => (hasRowsSelected = rows.length > 0)"
/> </QCardSection></QCard
></QDialog>
<!-- <VnConfirm v-if="confirmationModal"></VnConfirm> -->
</template>