refactor: refs #7553 requested changes and added keyup.enter
This commit is contained in:
parent
b728b7c5bd
commit
cd96003c0e
|
@ -433,13 +433,6 @@ function handleOnDataSaved(_) {
|
||||||
@click="stateStore.toggleRightDrawer()"
|
@click="stateStore.toggleRightDrawer()"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<!--TODO: este slot se carga los botones de mostrar tabla/card y columnas visibles
|
|
||||||
por lo que no es viable para el uso que se le quiere dar-->
|
|
||||||
<!-- <template #top>
|
|
||||||
<div class="full-width-slot">
|
|
||||||
<slot name="before-header" />
|
|
||||||
</div>
|
|
||||||
</template> -->
|
|
||||||
<template #header-cell="{ col }">
|
<template #header-cell="{ col }">
|
||||||
<QTh v-if="col.visible ?? true">
|
<QTh v-if="col.visible ?? true">
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -47,7 +47,6 @@ defineProps({ dataKey: { type: String, required: true } });
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<!--It's required to include the relation category !! There's 413 records in production-->
|
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="params.typeId"
|
v-model="params.typeId"
|
||||||
|
|
|
@ -249,7 +249,7 @@ watch(
|
||||||
@on-fetch="(data) => (orderSummary.vat = data)"
|
@on-fetch="(data) => (orderSummary.vat = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||||
<QCard
|
<QCard
|
||||||
class="order-lines-summary q-pa-lg"
|
class="order-lines-summary q-pa-lg"
|
||||||
v-if="orderSummary.vat && orderSummary.total"
|
v-if="orderSummary.vat && orderSummary.total"
|
||||||
|
|
|
@ -192,7 +192,7 @@ onMounted(() => {
|
||||||
:order="['landed DESC', 'clientFk ASC', 'id DESC']"
|
:order="['landed DESC', 'clientFk ASC', 'id DESC']"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Orders/new',
|
urlCreate: 'Orders/new',
|
||||||
title: 'Create Order',
|
title: t('module.cerateOrder'),
|
||||||
onDataSaved: (url) => {
|
onDataSaved: (url) => {
|
||||||
tableRef.redirect(url);
|
tableRef.redirect(url);
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,6 +10,7 @@ module:
|
||||||
total: Total
|
total: Total
|
||||||
salesPerson: Sales Person
|
salesPerson: Sales Person
|
||||||
address: Address
|
address: Address
|
||||||
|
cerateOrder: Create order
|
||||||
lines:
|
lines:
|
||||||
item: Item
|
item: Item
|
||||||
warehouse: Warehouse
|
warehouse: Warehouse
|
||||||
|
|
|
@ -10,6 +10,7 @@ module:
|
||||||
total: Total
|
total: Total
|
||||||
salesPerson: Comercial
|
salesPerson: Comercial
|
||||||
address: Dirección
|
address: Dirección
|
||||||
|
cerateOrder: Crear cesta
|
||||||
lines:
|
lines:
|
||||||
item: Artículo
|
item: Artículo
|
||||||
warehouse: Almacén
|
warehouse: Almacén
|
||||||
|
|
|
@ -144,7 +144,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
@on-fetch="(data) => (ticketUpdateActions = data)"
|
@on-fetch="(data) => (ticketUpdateActions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||||
<QCard
|
<QCard
|
||||||
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
||||||
bordered
|
bordered
|
||||||
|
|
|
@ -192,7 +192,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
@on-fetch="(data) => (components = data)"
|
@on-fetch="(data) => (components = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||||
<QCard class="q-pa-sm color-vn-text" bordered flat style="border-color: black">
|
<QCard class="q-pa-sm color-vn-text" bordered flat style="border-color: black">
|
||||||
<QCardSection horizontal>
|
<QCardSection horizontal>
|
||||||
<span class="text-weight-bold text-subtitle1 text-center full-width">
|
<span class="text-weight-bold text-subtitle1 text-center full-width">
|
||||||
|
|
|
@ -17,6 +17,7 @@ const ticketNotesCrudRef = ref(null);
|
||||||
const observationTypes = ref([]);
|
const observationTypes = ref([]);
|
||||||
const arrayData = useArrayData('TicketNotes');
|
const arrayData = useArrayData('TicketNotes');
|
||||||
const { store } = arrayData;
|
const { store } = arrayData;
|
||||||
|
const isSaving = ref(false);
|
||||||
|
|
||||||
const crudModelFilter = reactive({
|
const crudModelFilter = reactive({
|
||||||
where: { ticketFk: route.params.id },
|
where: { ticketFk: route.params.id },
|
||||||
|
@ -36,6 +37,14 @@ watch(
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
ticketNotesCrudRef.value.remove([row]);
|
ticketNotesCrudRef.value.remove([row]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleSave() {
|
||||||
|
if (!isSaving.value) {
|
||||||
|
isSaving.value = true;
|
||||||
|
await ticketNotesCrudRef.value?.saveChanges();
|
||||||
|
isSaving.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -76,6 +85,7 @@ function handleDelete(row) {
|
||||||
:label="t('ticketNotes.description')"
|
:label="t('ticketNotes.description')"
|
||||||
v-model="row.description"
|
v-model="row.description"
|
||||||
class="col"
|
class="col"
|
||||||
|
@keyup.enter="handleSave"
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
name="delete"
|
name="delete"
|
||||||
|
|
|
@ -585,7 +585,7 @@ watch(
|
||||||
</QBtnGroup>
|
</QBtnGroup>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||||
<div
|
<div
|
||||||
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
||||||
style="border: 2px solid black"
|
style="border: 2px solid black"
|
||||||
|
|
|
@ -25,7 +25,7 @@ const { notify } = useNotify();
|
||||||
|
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
const defaultTaxClass = ref(null);
|
const defaultTaxClass = ref(null);
|
||||||
|
const isSaving = ref(false);
|
||||||
const crudModelFilter = computed(() => ({
|
const crudModelFilter = computed(() => ({
|
||||||
where: { ticketFk: route.params.id },
|
where: { ticketFk: route.params.id },
|
||||||
}));
|
}));
|
||||||
|
@ -121,6 +121,14 @@ async function deleteService(row) {
|
||||||
ticketServiceCrudRef.value.reload();
|
ticketServiceCrudRef.value.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function handleSave() {
|
||||||
|
if (!isSaving.value) {
|
||||||
|
isSaving.value = true;
|
||||||
|
await ticketServiceCrudRef.value?.saveChanges();
|
||||||
|
isSaving.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -195,6 +203,7 @@ async function deleteService(row) {
|
||||||
v-model.number="row.price"
|
v-model.number="row.price"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
|
@keyup.enter="handleSave"
|
||||||
/>
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -109,7 +109,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
<QDrawer
|
<QDrawer
|
||||||
v-if="packingTypeVolume.length"
|
v-if="packingTypeVolume.length"
|
||||||
side="right"
|
side="right"
|
||||||
:width="270"
|
:width="265"
|
||||||
v-model="stateStore.rightDrawer"
|
v-model="stateStore.rightDrawer"
|
||||||
>
|
>
|
||||||
<QCard
|
<QCard
|
||||||
|
|
Loading…
Reference in New Issue