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()"
|
||||
/>
|
||||
</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 }">
|
||||
<QTh v-if="col.visible ?? true">
|
||||
<div
|
||||
|
|
|
@ -47,7 +47,6 @@ defineProps({ dataKey: { type: String, required: true } });
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<!--It's required to include the relation category !! There's 413 records in production-->
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.typeId"
|
||||
|
|
|
@ -249,7 +249,7 @@ watch(
|
|||
@on-fetch="(data) => (orderSummary.vat = data)"
|
||||
auto-load
|
||||
/>
|
||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
||||
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||
<QCard
|
||||
class="order-lines-summary q-pa-lg"
|
||||
v-if="orderSummary.vat && orderSummary.total"
|
||||
|
|
|
@ -192,7 +192,7 @@ onMounted(() => {
|
|||
:order="['landed DESC', 'clientFk ASC', 'id DESC']"
|
||||
:create="{
|
||||
urlCreate: 'Orders/new',
|
||||
title: 'Create Order',
|
||||
title: t('module.cerateOrder'),
|
||||
onDataSaved: (url) => {
|
||||
tableRef.redirect(url);
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ module:
|
|||
total: Total
|
||||
salesPerson: Sales Person
|
||||
address: Address
|
||||
cerateOrder: Create order
|
||||
lines:
|
||||
item: Item
|
||||
warehouse: Warehouse
|
||||
|
|
|
@ -10,6 +10,7 @@ module:
|
|||
total: Total
|
||||
salesPerson: Comercial
|
||||
address: Dirección
|
||||
cerateOrder: Crear cesta
|
||||
lines:
|
||||
item: Artículo
|
||||
warehouse: Almacén
|
||||
|
|
|
@ -144,7 +144,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
@on-fetch="(data) => (ticketUpdateActions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
||||
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||
<QCard
|
||||
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
||||
bordered
|
||||
|
|
|
@ -192,7 +192,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
@on-fetch="(data) => (components = data)"
|
||||
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">
|
||||
<QCardSection horizontal>
|
||||
<span class="text-weight-bold text-subtitle1 text-center full-width">
|
||||
|
|
|
@ -17,6 +17,7 @@ const ticketNotesCrudRef = ref(null);
|
|||
const observationTypes = ref([]);
|
||||
const arrayData = useArrayData('TicketNotes');
|
||||
const { store } = arrayData;
|
||||
const isSaving = ref(false);
|
||||
|
||||
const crudModelFilter = reactive({
|
||||
where: { ticketFk: route.params.id },
|
||||
|
@ -36,6 +37,14 @@ watch(
|
|||
function handleDelete(row) {
|
||||
ticketNotesCrudRef.value.remove([row]);
|
||||
}
|
||||
|
||||
async function handleSave() {
|
||||
if (!isSaving.value) {
|
||||
isSaving.value = true;
|
||||
await ticketNotesCrudRef.value?.saveChanges();
|
||||
isSaving.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -76,6 +85,7 @@ function handleDelete(row) {
|
|||
:label="t('ticketNotes.description')"
|
||||
v-model="row.description"
|
||||
class="col"
|
||||
@keyup.enter="handleSave"
|
||||
/>
|
||||
<QIcon
|
||||
name="delete"
|
||||
|
|
|
@ -585,7 +585,7 @@ watch(
|
|||
</QBtnGroup>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<QDrawer side="right" :width="270" v-model="stateStore.rightDrawer">
|
||||
<QDrawer side="right" :width="265" v-model="stateStore.rightDrawer">
|
||||
<div
|
||||
class="q-pa-md q-mb-md q-ma-md color-vn-text"
|
||||
style="border: 2px solid black"
|
||||
|
|
|
@ -25,7 +25,7 @@ const { notify } = useNotify();
|
|||
|
||||
const selected = ref([]);
|
||||
const defaultTaxClass = ref(null);
|
||||
|
||||
const isSaving = ref(false);
|
||||
const crudModelFilter = computed(() => ({
|
||||
where: { ticketFk: route.params.id },
|
||||
}));
|
||||
|
@ -121,6 +121,14 @@ async function deleteService(row) {
|
|||
ticketServiceCrudRef.value.reload();
|
||||
}
|
||||
}
|
||||
|
||||
async function handleSave() {
|
||||
if (!isSaving.value) {
|
||||
isSaving.value = true;
|
||||
await ticketServiceCrudRef.value?.saveChanges();
|
||||
isSaving.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -195,6 +203,7 @@ async function deleteService(row) {
|
|||
v-model.number="row.price"
|
||||
type="number"
|
||||
min="0"
|
||||
@keyup.enter="handleSave"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
|
|
|
@ -109,7 +109,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
<QDrawer
|
||||
v-if="packingTypeVolume.length"
|
||||
side="right"
|
||||
:width="270"
|
||||
:width="265"
|
||||
v-model="stateStore.rightDrawer"
|
||||
>
|
||||
<QCard
|
||||
|
|
Loading…
Reference in New Issue