0
0
Fork 0

refacotr: refs #7553 refactor sales, purchaseRequest and saleTracking

This commit is contained in:
Jon Elias 2024-08-02 13:55:51 +02:00
parent 3330e43e25
commit 954a6ff6c0
4 changed files with 303 additions and 286 deletions

View File

@ -303,7 +303,7 @@ const columns = computed(() => [
{ {
title: t('salesTicketsTable.goToLines'), title: t('salesTicketsTable.goToLines'),
icon: 'vn:lines', icon: 'vn:lines',
color: 'priamry', color: 'primary',
action: (row) => redirectToSales(row.id), action: (row) => redirectToSales(row.id),
isPrimary: true, isPrimary: true,
attrs: { attrs: {
@ -314,7 +314,7 @@ const columns = computed(() => [
{ {
title: t('salesTicketsTable.preview'), title: t('salesTicketsTable.preview'),
icon: 'preview', icon: 'preview',
color: 'priamry', color: 'primary',
action: (row) => viewSummary(row.id, TicketSummary), action: (row) => viewSummary(row.id, TicketSummary),
isPrimary: true, isPrimary: true,
attrs: { attrs: {

View File

@ -1,27 +1,32 @@
<script setup> <script setup>
import { ref, computed, watch, reactive } from 'vue'; import { ref, computed, watch, reactive } from 'vue';
import axios from 'axios';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import VnInput from 'src/components/common/VnInput.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import CrudModel from 'src/components/CrudModel.vue';
import TicketCreateRequest from './TicketCreateRequest.vue';
import { dashIfEmpty } from 'src/filters'; import { dashIfEmpty } from 'src/filters';
import { toDateFormat } from 'src/filters/date.js'; import { toDateFormat } from 'src/filters/date.js';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import FetchData from 'src/components/FetchData.vue';
import { useVnConfirm } from 'composables/useVnConfirm';
import useNotify from 'src/composables/useNotify.js';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
const createTicketRequestDialogRef = ref(null); const tableRef = ref();
const crudModelRef = ref(null); const attendersOptions = ref([]);
const { openConfirmationModal } = useVnConfirm();
const { notify } = useNotify();
watch( watch(
() => route.params.id, () => route.params.id,
async (val) => { async (val) => {
crudModelFilter.where.ticketFk = val; crudModelFilter.where.ticketFk = val;
crudModelRef.value.reload(); tableRef.value.reload();
} }
); );
@ -72,64 +77,90 @@ const crudModelFilter = reactive({
const columns = computed(() => [ const columns = computed(() => [
{ {
align: 'left',
label: t('purchaseRequest.id'), label: t('purchaseRequest.id'),
name: 'id', name: 'id',
field: 'id', chip: {
align: 'left', condition: () => true,
columnFilter: null, },
isId: true,
hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.description'), label: t('purchaseRequest.description'),
name: 'description', name: 'description',
field: 'description', columnClass: 'expand',
align: 'left', hidden: true,
format: (val) => dashIfEmpty(val),
}, },
{ {
align: 'left',
label: t('purchaseRequest.created'), label: t('purchaseRequest.created'),
name: 'created', name: 'created',
field: 'created', format: (row) => toDateFormat(row.created),
align: 'left', cardVisible: true,
format: (val) => toDateFormat(val), hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.requester'), label: t('purchaseRequest.requester'),
name: 'requester', name: 'requesterFk',
align: 'left', cardVisible: true,
sortable: true, format: (row) => dashIfEmpty(row.requester?.user?.nickname),
hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.atender'), label: t('purchaseRequest.atender'),
name: 'atender', name: 'attenderFk',
align: 'left', cardVisible: true,
format: (row) => dashIfEmpty(row.atender?.user?.nickname),
hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.quantity'), label: t('purchaseRequest.quantity'),
name: 'quantity', name: 'quantity',
align: 'left', hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.price'), label: t('purchaseRequest.price'),
name: 'price', name: 'price',
align: 'left', hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.saleFk'), label: t('purchaseRequest.saleFk'),
name: 'saleFk', name: 'saleFk',
align: 'left', cardVisible: true,
hidden: true,
}, },
{ {
align: 'left',
label: t('purchaseRequest.state'), label: t('purchaseRequest.state'),
name: 'state', name: 'isOk',
field: 'isOk', cardVisible: true,
align: 'left', isHidden: true,
format: (val) => t(getRequestState(val)),
}, },
{ {
label: '', align: 'right',
name: 'actions', name: 'tableActions',
align: 'left', actions: [
columnFilter: null, {
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)
),
},
],
}, },
]); ]);
@ -140,131 +171,114 @@ const getRequestState = (state) => {
case false: case false:
return 'Denied'; return 'Denied';
case true: case true:
return 'Acepted'; return 'Accepted';
} }
}; };
const isEditable = (isOk) => isOk !== null; const isEditable = (isOk) => isOk !== null;
const removeLine = async (row) => crudModelRef.value.remove([row]); async function removeLine(id) {
try {
const openCreateModal = () => createTicketRequestDialogRef.value.show(); await axios.delete(`TicketRequests/${id}`);
notify(t('globals.dataSaved'), 'positive');
location.reload();
} catch (err) {
console.error('Error ', err);
}
}
</script> </script>
<template> <template>
<QPage class="column items-center q-pa-md"> <FetchData
<CrudModel url="TicketRequests/getItemTypeWorker"
:filter="{ fields: ['id', 'nickname'], order: 'nickname ASC' }"
auto-load
@on-fetch="(data) => (attendersOptions = data)"
/>
<VnTable
ref="tableRef"
data-key="PurchaseRequests" data-key="PurchaseRequests"
url="TicketRequests" url="TicketRequests"
ref="crudModelRef" :create="{
urlCreate: 'TicketRequests',
title: t('Create request'),
onDataSaved: ({ id }) => tableRef.reload(id),
formInitialData: {
ticketFk: route.params.id,
},
}"
save-url="TicketRequests/crud"
:filter="crudModelFilter" :filter="crudModelFilter"
:order="['created ASC']" :columns="columns"
:default-remove="false" :is-editable="true"
:default-save="false" :right-search="false"
:default-reset="false"
:limit="0"
auto-load auto-load
> >
<template #body="{ rows }"> <template #column-description="{ row }">
<QTable <VnInput v-model="row.description" :disable="isEditable(row.isOk)" />
:rows="rows"
:columns="columns"
row-key="id"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
:no-data-label="t('globals.noResults')"
@row-click="(_, row) => redirectToTicketSummary(row.ticketFk)"
>
<template #body-cell-description="{ row }">
<QTd @click.stop>
<VnInput
v-model="row.description"
@blur="crudModelRef.saveChanges()"
:disable="isEditable(row.isOk)"
/>
</QTd>
</template> </template>
<template #body-cell-requester="{ row }"> <template #column-requesterFk="{ row }">
<QTd @click.stop> <span class="link" @click.stop>
<span class="link">
<QBtn flat>
{{ row.requester?.user?.nickname }} {{ row.requester?.user?.nickname }}
<WorkerDescriptorProxy :id="row.requesterFk" /> <WorkerDescriptorProxy :id="row.requesterFk" />
</QBtn>
</span> </span>
</QTd>
</template> </template>
<template #body-cell-atender="{ row }"> <template #column-attenderFk="{ row }">
<QTd @click.stop> <span class="link" @click.stop>
<span class="link">
<QBtn flat>
{{ row.atender?.user?.nickname }} {{ row.atender?.user?.nickname }}
<WorkerDescriptorProxy :id="row.attenderFk" /> <WorkerDescriptorProxy :id="row.attenderFk" />
</QBtn>
</span> </span>
</QTd>
</template> </template>
<template #body-cell-quantity="{ row }"> <template #column-quantity="{ row }">
<QTd @click.stop> <VnInput v-model="row.quantity" :disable="isEditable(row.isOk)" />
<VnInput
v-model="row.quantity"
@blur="crudModelRef.saveChanges()"
:disable="isEditable(row.isOk)"
/>
</QTd>
</template> </template>
<template #body-cell-price="{ row }"> <template #column-price="{ row }">
<QTd @click.stop> <span @click.stop>
<VnInput <VnInput v-model="row.price" :disable="isEditable(row.isOk)">
v-model="row.price" {{ row.price }}
@blur="crudModelRef.saveChanges()" </VnInput>
:disable="isEditable(row.isOk)"
/>
</QTd>
</template>
<template #body-cell-saleFk="{ row }">
<QTd @click.stop>
<span class="link">
<QBtn v-if="row.saleFk" flat>
{{ row.sale.itemFk }}
<ItemDescriptorProxy :id="row.sale.itemFk" />
</QBtn>
</span> </span>
</QTd>
</template> </template>
<template #body-cell-actions="{ row }"> <template #column-saleFk="{ row }">
<QTd> <QTd style="width: 3%">
<QIcon <span class="link" @click.stop>
@click.stop="removeLine(row)" {{ dashIfEmpty(row.sale?.itemFk) }}
class="q-ml-sm cursor-pointer" <ItemDescriptorProxy :id="row.sale?.itemFk" /> </span
color="primary" ></QTd>
name="delete"
size="sm"
>
<QTooltip>
{{ t('globals.delete') }}
</QTooltip>
</QIcon>
</QTd>
</template> </template>
</QTable> <template #column-isOk="{ row }">
{{ t(getRequestState(row.isOk)) }}
</template> </template>
</CrudModel>
<QDialog <template #more-create-dialog="{ data }">
ref="createTicketRequestDialogRef" <VnInput
transition-show="scale" v-model="data.description"
transition-hide="scale" :label="t('purchaseRequest.description')"
> />
<TicketCreateRequest @on-request-created="crudModelRef.reload()" /> <VnSelect
</QDialog> :label="t('purchaseRequest.atender')"
<QPageSticky :offset="[20, 20]"> v-model="data.attenderFk"
<QBtn @click="openCreateModal()" color="primary" fab icon="add" /> :options="attendersOptions"
<QTooltip class="text-no-wrap"> hide-selected
{{ t('purchaseRequest.newRequest') }} option-label="nickname"
</QTooltip> option-value="id"
</QPageSticky> />
</QPage> <VnInput
v-model="data.quantity"
:label="t('purchaseRequest.quantity')"
type="number"
min="1"
/>
<VnInput
v-model="data.price"
:label="t('purchaseRequest.price')"
type="number"
min="0"
/>
</template>
</VnTable>
</template> </template>
<i18n> <i18n>
es: es:
New: Nueva New: Nueva

View File

@ -16,11 +16,12 @@ import TicketSaleMoreActions from './TicketSaleMoreActions.vue';
import TicketTransfer from './TicketTransfer.vue'; import TicketTransfer from './TicketTransfer.vue';
import { useStateStore } from 'stores/useStateStore'; import { useStateStore } from 'stores/useStateStore';
import { toCurrency, toPercentage, dashIfEmpty } from 'src/filters'; import { toCurrency, toPercentage } from 'src/filters';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
import { useVnConfirm } from 'composables/useVnConfirm'; import { useVnConfirm } from 'composables/useVnConfirm';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import axios from 'axios'; import axios from 'axios';
import VnTable from 'src/components/VnTable/VnTable.vue';
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -33,7 +34,8 @@ const stateBtnDropdownRef = ref(null);
const arrayData = useArrayData('ticketData'); const arrayData = useArrayData('ticketData');
const { store } = arrayData; const { store } = arrayData;
const selectedRows = ref([]);
const hasSelectedRows = computed(() => selectedRows.value.length > 0);
const ticketConfig = ref(null); const ticketConfig = ref(null);
const isLocked = ref(false); const isLocked = ref(false);
const isTicketEditable = ref(false); const isTicketEditable = ref(false);
@ -56,86 +58,104 @@ watch(
const columns = computed(() => [ const columns = computed(() => [
{ {
label: '', align: 'left',
name: 'statusIcons', name: 'statusIcons',
align: 'left', hidden: true,
}, },
{ {
label: '', align: 'center',
name: 'picture', label: t('lines.image'),
align: 'left', name: 'image',
columnField: {
component: VnImg,
attrs: (id) => {
return {
id,
width: '50px',
};
},
},
columnFilter: false,
}, },
{ {
align: 'left',
label: t('ticketSale.visible'), label: t('ticketSale.visible'),
name: 'visible', name: 'visible',
field: 'visible', format: (row, dashIfEmpty) => dashIfEmpty(row.visible),
align: 'left', hidden: true,
sortable: true,
}, },
{ {
align: 'left',
label: t('ticketSale.available'), label: t('ticketSale.available'),
name: 'available', name: 'available',
field: 'available', format: (row, dashIfEmpty) => dashIfEmpty(row.available),
align: 'left', hidden: true,
sortable: true,
}, },
{ {
align: 'left',
label: t('ticketSale.id'), label: t('ticketSale.id'),
name: 'itemFk', name: 'itemFk',
field: 'itemFk', hidden: true,
align: 'left',
sortable: true,
}, },
{ {
align: 'left',
label: t('ticketSale.quantity'), label: t('ticketSale.quantity'),
name: 'quantity', name: 'quantity',
field: 'quantity', cardVisible: true,
align: 'left', format: (row) => toCurrency(row.quantity),
sortable: true, hidden: true,
}, },
{ {
align: 'left',
label: t('ticketSale.item'), label: t('ticketSale.item'),
name: 'item', name: 'item',
field: 'item', format: (row) => row?.item?.name,
align: 'left', columnClass: 'expand',
sortable: true, cardVisible: true,
hidden: true,
}, },
{ {
align: 'left',
label: t('ticketSale.price'), label: t('ticketSale.price'),
name: 'price', name: 'price',
field: 'price', cardVisible: true,
align: 'left', format: (row) => toCurrency(row.price),
sortable: true, hidden: true,
format: (val) => toCurrency(val),
}, },
{ {
align: 'left',
label: t('ticketSale.discount'), label: t('ticketSale.discount'),
name: 'discount', name: 'discount',
field: 'discount', cardVisible: true,
align: 'left', format: (row) => toPercentage(row.discount),
sortable: true, hidden: true,
}, },
{ {
align: 'left',
label: t('ticketSale.amount'), label: t('ticketSale.amount'),
name: 'amount', name: 'amount',
field: 'amount', format: (row) => parseInt(row.amount * row.quantity),
align: 'left', hidden: true,
sortable: true,
format: (val) => toCurrency(val),
}, },
{ {
align: 'left',
label: t('ticketSale.packaging'), label: t('ticketSale.packaging'),
name: 'itemPackingTypeFk', name: 'itemPackingTypeFk',
field: 'item', cardVisible: true,
align: 'left', format: (row, dashIfEmpty) => dashIfEmpty(row?.item?.itemPackingTypeFk),
sortable: true, hidden: true,
format: (val) => dashIfEmpty(val?.itemPackingTypeFk),
}, },
{ {
label: '', align: 'right',
name: 'history', name: 'tableActions',
align: 'left', actions: [
columnFilter: null, {
title: t('ticketSale.history'),
icon: 'history',
isPrimary: true,
action: (row) => goToLog(row.id),
},
],
}, },
]); ]);
@ -478,7 +498,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:ticket="store.data" :ticket="store.data"
:is-ticket-editable="isTicketEditable" :is-ticket-editable="isTicketEditable"
:sales="selectedValidSales" :sales="selectedValidSales"
:disable="!selectedSales.length" :disable="!hasSelectedRows"
:mana="mana" :mana="mana"
:ticket-config="ticketConfig" :ticket-config="ticketConfig"
@get-mana="getMana()" @get-mana="getMana()"
@ -487,7 +507,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<QBtn <QBtn
color="primary" color="primary"
icon="delete" icon="delete"
:disable="!isTicketEditable || !selectedSales.length" :disable="!isTicketEditable || !hasSelectedRows"
@click=" @click="
openConfirmationModal( openConfirmationModal(
t('Continue anyway?'), t('Continue anyway?'),
@ -501,7 +521,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<QBtn <QBtn
color="primary" color="primary"
icon="vn:splitline" icon="vn:splitline"
:disable="!isTicketEditable || !selectedSales.length" :disable="!isTicketEditable || !hasSelectedRows"
@click="setTransferParams()" @click="setTransferParams()"
> >
<QTooltip>{{ t('Transfer lines') }}</QTooltip> <QTooltip>{{ t('Transfer lines') }}</QTooltip>
@ -540,17 +560,21 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QCardSection> </QCardSection>
</div></QDrawer </div></QDrawer
> >
<QTable <!-- TODO: el botón de añadir filas como está en salix-->
:rows="sales" <VnTable
ref="tableRef"
data-key="TicketSales"
:url="`Tickets/${route.params.id}/getSales`"
:columns="columns" :columns="columns"
row-key="id" v-model:selected="selectedRows"
:pagination="{ rowsPerPage: 0 }" :table="{
class="full-width q-mt-md" 'row-key': 'id',
selection="multiple" selection: 'multiple',
v-model:selected="selectedSales" }"
:no-data-label="t('globals.noResults')" :right-search="false"
auto-load
> >
<template #body-cell-statusIcons="{ row }"> <template #column-statusIcons="{ row }">
<QTd class="q-gutter-x-xs"> <QTd class="q-gutter-x-xs">
<router-link <router-link
v-if="row.claim?.claimFk" v-if="row.claim?.claimFk"
@ -595,58 +619,40 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QIcon> </QIcon>
</QTd> </QTd>
</template> </template>
<template #body-cell-picture="{ row }"> <template #column-image="{ row }">
<QTd>
<div class="image-wrapper"> <div class="image-wrapper">
<VnImg :id="row.itemFk" class="rounded" /> <VnImg :id="parseInt(row?.item?.id)" class="rounded" />
</div> </div>
</QTd>
</template> </template>
<template #body-cell-visible="{ row }"> <template #column-visible="{ row }">
<QTd @click.stop> <QBadge :color="row.available < 0 ? 'alert' : 'transparent'" dense>
<QBadge :color="row.visible < 0 ? 'alert' : 'transparent'" dense>
{{ row.visible }} {{ row.visible }}
</QBadge> </QBadge>
</QTd>
</template> </template>
<template #body-cell-available="{ row }"> <template #column-available="{ row }">
<QTd @click.stop>
<QBadge :color="row.available < 0 ? 'alert' : 'transparent'" dense> <QBadge :color="row.available < 0 ? 'alert' : 'transparent'" dense>
{{ row.available }} {{ row.available }}
</QBadge> </QBadge>
</QTd>
</template> </template>
<template #body-cell-itemFk="{ row }"> <template #column-itemFk="{ row }">
<QTd @click.stop> <span class="link" @click.stop>
<div v-if="row.id"> {{ row?.itemFk }}
<span class="link"> <ItemDescriptorProxy :id="row?.itemFk" />
<QBtn flat dense>
{{ row.itemFk }}
</QBtn>
<ItemDescriptorProxy :id="row.itemFk" />
</span> </span>
</template>
<template #column-item="{ row }">
<div class="row column full-width justify-between items-start">
{{ row?.item?.name }}
<div v-if="row?.item?.subName" class="subName">
{{ row?.item?.subName.toUpperCase() }}
</div> </div>
<VnSelect </div>
v-else <FetchedTags :item="row?.item" :max-length="6" />
:options="itemsWithNameOptions" <QPopupProxy v-if="row.id && isTicketEditable">
hide-selected <VnInput v-model="row.concept" @change="updateConcept(row)" />
option-label="name" </QPopupProxy>
option-value="id"
@update:model-value="changeQuantity(row)"
v-model="row.itemFk"
>
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel> #{{ scope.opt?.id }} </QItemLabel>
<QItemLabel caption>{{ scope.opt?.name }}</QItemLabel>
</QItemSection>
</QItem>
</template> </template>
</VnSelect> <template #column-quantity="{ row }">
</QTd>
</template>
<template #body-cell-quantity="{ row }">
<QTd @click.stop> <QTd @click.stop>
<VnInput <VnInput
v-if="isTicketEditable" v-if="isTicketEditable"
@ -658,19 +664,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<span v-else>{{ row.quantity }}</span> <span v-else>{{ row.quantity }}</span>
</QTd> </QTd>
</template> </template>
<template #body-cell-item="{ row }"> <template #column-price="{ row }">
<QTd class="col">
<div class="column">
<span>{{ row.concept }}</span>
<span class="color-vn-label">{{ row.item?.subName }}</span>
<FetchedTags v-if="row.item" :item="row.item" :max-length="6" />
<QPopupProxy v-if="row.id && isTicketEditable">
<VnInput v-model="row.concept" @change="updateConcept(row)" />
</QPopupProxy>
</div>
</QTd>
</template>
<template #body-cell-price="{ row }">
<QTd> <QTd>
<template v-if="isTicketEditable && row.id"> <template v-if="isTicketEditable && row.id">
<QBtn flat color="primary" dense @click="onOpenEditPricePopover(row)"> <QBtn flat color="primary" dense @click="onOpenEditPricePopover(row)">
@ -692,7 +686,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<span v-else>{{ toCurrency(row.price) }}</span> <span v-else>{{ toCurrency(row.price) }}</span>
</QTd> </QTd>
</template> </template>
<template #body-cell-discount="{ row }"> <template #column-discount="{ row }">
<QTd> <QTd>
<template v-if="!isLocked && row.id"> <template v-if="!isLocked && row.id">
<QBtn <QBtn
@ -718,21 +712,8 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<span v-else>{{ toPercentage(row.discount / 100) }}</span> <span v-else>{{ toPercentage(row.discount / 100) }}</span>
</QTd> </QTd>
</template> </template>
<template #body-cell-history="{ row }"> <template #column-amount="{ row }">
<QTd> {{ toCurrency(row.quantity * row.price) }}
<QBtn
v-if="row.$hasLogs"
@click.stop="goToLog(row.id)"
color="primary"
icon="history"
size="md"
flat
>
<QTooltip class="text-no-wrap">
{{ t('ticketSale.history') }}
</QTooltip>
</QBtn>
</QTd>
</template> </template>
<template #bottom-row> <template #bottom-row>
<QBtn <QBtn
@ -750,7 +731,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QTooltip> </QTooltip>
</QBtn> </QBtn>
</template> </template>
</QTable> </VnTable>
<QPageSticky :offset="[20, 20]"> <QPageSticky :offset="[20, 20]">
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" /> <QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" />
@ -760,6 +741,18 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QPageSticky> </QPageSticky>
</template> </template>
<style lang="scss" scoped>
.image-wrapper {
height: 50px;
width: 50px;
}
.subName {
text-transform: uppercase;
color: var(--vn-label-color);
}
</style>
<i18n> <i18n>
es: es:
New item: Nuevo artículo New item: Nuevo artículo

View File

@ -345,7 +345,7 @@ const qCheckBoxController = (sale, action) => {
:no-data-label="t('globals.noResults')" :no-data-label="t('globals.noResults')"
> >
<template #body-cell-isChecked="{ row }"> <template #body-cell-isChecked="{ row }">
<QTd @click.stop> <QTd @click.stop style="width: 20%">
<QCheckbox <QCheckbox
:model-value="!!row.hasSaleGroupDetail" :model-value="!!row.hasSaleGroupDetail"
color="pink" color="pink"
@ -404,7 +404,7 @@ const qCheckBoxController = (sale, action) => {
</QTd> </QTd>
</template> </template>
<template #body-cell-item="{ row }"> <template #body-cell-item="{ row }">
<QTd @click.stop> <QTd @click.stop style="width: 20%">
<div> <div>
<span class="link"> <span class="link">
<QBtn flat> <QBtn flat>
@ -426,8 +426,18 @@ const qCheckBoxController = (sale, action) => {
</div> </div>
</QTd> </QTd>
</template> </template>
<template #body-cell-quantity="{ row }">
<QTd style="width: 10%">
{{ row.quantity }}
</QTd>
</template>
<template #body-cell-parking="{ row }">
<QTd style="width: 10%">
{{ dashIfEmpty(row.parkingFk) }}
</QTd>
</template>
<template #body-cell-actions="{ row }"> <template #body-cell-actions="{ row }">
<QTd> <QTd style="width: 20%">
<QBtn <QBtn
@click.stop="showLog(row)" @click.stop="showLog(row)"
color="primary" color="primary"