feature/TicketSale #445

Merged
jsegarra merged 20 commits from :feature/TicketSale into dev 2024-06-25 12:19:59 +00:00
21 changed files with 191 additions and 19 deletions
Showing only changes of commit 603cbde09f - Show all commits

View File

@ -30,7 +30,7 @@ const props = defineProps({
const emit = defineEmits(['onFetch']); const emit = defineEmits(['onFetch']);
const route = useRoute(); const route = useRoute();
const isSummary = ref(); const isSummary = ref();
const arrayData = useArrayData(props.dataKey || route.meta.moduleName, { const arrayData = useArrayData(props.dataKey, {
url: props.url, url: props.url,
filter: props.filter, filter: props.filter,
skip: 0, skip: 0,

View File

@ -845,7 +845,7 @@ worker:
calendar: Calendar calendar: Calendar
timeControl: Time control timeControl: Time control
locker: Locker locker: Locker
formation: Formation
list: list:
name: Name name: Name
email: Email email: Email
@ -915,6 +915,16 @@ worker:
payMethods: Pay method payMethods: Pay method
iban: IBAN iban: IBAN
bankEntity: Swift / BIC bankEntity: Swift / BIC
formation:
tableVisibleColumns:
course: Curso
startDate: Fecha Inicio
endDate: Fecha Fin
center: Centro Formación
invoice: Factura
amount: Importe
remark: Bonficado
hasDiploma: Diploma
imageNotFound: Image not found imageNotFound: Image not found
wagon: wagon:
pageTitles: pageTitles:

View File

@ -841,6 +841,7 @@ worker:
calendar: Calendario calendar: Calendario
timeControl: Control de horario timeControl: Control de horario
locker: Taquilla locker: Taquilla
formation: Formación
list: list:
name: Nombre name: Nombre
email: Email email: Email
@ -901,6 +902,16 @@ worker:
payMethods: Método de pago payMethods: Método de pago
iban: IBAN iban: IBAN
bankEntity: Swift / BIC bankEntity: Swift / BIC
formation:
tableVisibleColumns:
course: Curso
startDate: Fecha Inicio
endDate: Fecha Fin
center: Centro Formación
invoice: Factura
amount: Importe
remark: Bonficado
hasDiploma: Diploma
imageNotFound: No se ha encontrado la imagen imageNotFound: No se ha encontrado la imagen
wagon: wagon:
pageTitles: pageTitles:

View File

@ -30,6 +30,7 @@ const filter = {
<template> <template>
<CardSummary <CardSummary
data-key="AccountSummary"
ref="AccountSummary" ref="AccountSummary"
url="VnUsers/preview" url="VnUsers/preview"
:filter="filter" :filter="filter"

View File

@ -14,7 +14,7 @@ const entityId = computed(() => $props.id || useRoute().params.id);
<template> <template>
<div class="q-pa-md"> <div class="q-pa-md">
<CardSummary :url="`Agencies/${entityId}`"> <CardSummary :url="`Agencies/${entityId}`" data-key="Agency">
<template #header="{ entity: agency }">{{ agency.name }}</template> <template #header="{ entity: agency }">{{ agency.name }}</template>
<template #body="{ entity: agency }"> <template #body="{ entity: agency }">
<QCard class="vn-one"> <QCard class="vn-one">

View File

@ -185,6 +185,7 @@ async function changeState(value) {
:url="`Claims/${entityId}/getSummary`" :url="`Claims/${entityId}/getSummary`"
:entity-id="entityId" :entity-id="entityId"
@on-fetch="getClaimDms" @on-fetch="getClaimDms"
data-key="claimSummary"
> >
<template #header="{ entity: { claim } }"> <template #header="{ entity: { claim } }">
{{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }}) {{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }})

View File

@ -61,7 +61,11 @@ const creditWarning = computed(() => {
</script> </script>
<template> <template>
<CardSummary ref="summary" :url="`Clients/${entityId}/summary`"> <CardSummary
ref="summary"
:url="`Clients/${entityId}/summary`"
data-key="CustomerSummary"
>
<template #body="{ entity }"> <template #body="{ entity }">
<QCard class="vn-one"> <QCard class="vn-one">
<VnTitle <VnTitle

View File

@ -161,6 +161,7 @@ const fetchEntryBuys = async () => {
ref="summaryRef" ref="summaryRef"
:url="`Entries/${entityId}/getEntry`" :url="`Entries/${entityId}/getEntry`"
@on-fetch="(data) => setEntryData(data)" @on-fetch="(data) => setEntryData(data)"
data-key="EntrySummary"
> >
<template #header-left> <template #header-left>
<router-link <router-link

View File

@ -106,6 +106,7 @@ const ticketsColumns = ref([
ref="summary" ref="summary"
:url="`InvoiceOuts/${entityId}/summary`" :url="`InvoiceOuts/${entityId}/summary`"
:entity-id="entityId" :entity-id="entityId"
data-key="InvoiceOutSummary"
> >
<template #header="{ entity: { invoiceOut } }"> <template #header="{ entity: { invoiceOut } }">
<div>{{ invoiceOut.ref }} - {{ invoiceOut.client?.socialName }}</div> <div>{{ invoiceOut.ref }} - {{ invoiceOut.client?.socialName }}</div>

View File

@ -33,7 +33,6 @@ const user = state.getUser();
const fixedPrices = ref([]); const fixedPrices = ref([]);
const fixedPricesOriginalData = ref([]); const fixedPricesOriginalData = ref([]);
const warehousesOptions = ref([]); const warehousesOptions = ref([]);
const itemsWithNameOptions = ref([]);
const rowsSelected = ref([]); const rowsSelected = ref([]);
const exprBuilder = (param, value) => { const exprBuilder = (param, value) => {
@ -371,12 +370,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
auto-load auto-load
@on-fetch="(data) => onWarehousesFetched(data)" @on-fetch="(data) => onWarehousesFetched(data)"
/> />
<FetchData
url="Items/withName"
:filter="{ fields: ['id', 'name'], order: 'id DESC' }"
auto-load
@on-fetch="(data) => (itemsWithNameOptions = data)"
/>
<RightMenu> <RightMenu>
<template #right-panel> <template #right-panel>
<ItemFixedPriceFilter <ItemFixedPriceFilter
@ -419,7 +412,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
<template #body-cell-itemId="props"> <template #body-cell-itemId="props">
<QTd> <QTd>
<VnSelect <VnSelect
:options="itemsWithNameOptions" url="Items/withName"
hide-selected hide-selected
option-label="id" option-label="id"
option-value="id" option-value="id"
@ -562,7 +555,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
</QTd> </QTd>
</template> </template>
</QTable> </QTable>
<QPageSticky v-if="rowsSelected.length > 0" :offset="[20, 20]"> <QPageSticky v-if="rowsSelected.length" :offset="[20, 20]">
<QBtn @click="openEditTableCellDialog()" color="primary" fab icon="edit" /> <QBtn @click="openEditTableCellDialog()" color="primary" fab icon="edit" />
<QTooltip> <QTooltip>
{{ t('Edit fixed price(s)') }} {{ t('Edit fixed price(s)') }}

View File

@ -51,7 +51,11 @@ const detailsColumns = ref([
<template> <template>
<div class="q-pa-md"> <div class="q-pa-md">
<CardSummary ref="summary" :url="`Orders/${entityId}/summary`"> <CardSummary
ref="summary"
:url="`Orders/${entityId}/summary`"
data-key="OrderSummary"
>
<template #header="{ entity }"> <template #header="{ entity }">
{{ t('order.summary.basket') }} #{{ entity?.id }} - {{ t('order.summary.basket') }} #{{ entity?.id }} -
{{ entity?.client?.name }} ({{ entity?.clientFk }}) {{ entity?.client?.name }} ({{ entity?.clientFk }})

View File

@ -30,6 +30,7 @@ const filter = {
:url="`Parkings/${entityId}`" :url="`Parkings/${entityId}`"
:filter="filter" :filter="filter"
@on-fetch="(data) => (parking = data)" @on-fetch="(data) => (parking = data)"
data-key="Parking"
> >
<template #header>{{ parking.code }}</template> <template #header>{{ parking.code }}</template>
<template #body> <template #body>

View File

@ -123,6 +123,7 @@ const ticketColumns = ref([
ref="summary" ref="summary"
:url="`Routes/${entityId}/summary`" :url="`Routes/${entityId}/summary`"
:entity-id="entityId" :entity-id="entityId"
data-key="RouteSummary"
> >
<template #header="{ entity }"> <template #header="{ entity }">
<span>{{ `${entity?.route.id} - ${entity?.route?.description}` }}</span> <span>{{ `${entity?.route.id} - ${entity?.route?.description}` }}</span>

View File

@ -36,7 +36,12 @@ const filter = {
<template> <template>
<div class="q-pa-md"> <div class="q-pa-md">
<CardSummary ref="summary" :url="`Shelvings/${entityId}`" :filter="filter"> <CardSummary
ref="summary"
:url="`Shelvings/${entityId}`"
:filter="filter"
data-key="ShelvingSummary"
>
<template #header="{ entity }"> <template #header="{ entity }">
<div>{{ entity.code }}</div> <div>{{ entity.code }}</div>
</template> </template>

View File

@ -48,6 +48,7 @@ function getUrl(section) {
ref="summaryRef" ref="summaryRef"
:url="`Suppliers/${entityId}/getSummary`" :url="`Suppliers/${entityId}/getSummary`"
@on-fetch="(data) => setData(data)" @on-fetch="(data) => setData(data)"
data-key="SupplierSummary"
> >
<template #header> <template #header>
<span>{{ supplier.name }} - {{ supplier.id }}</span> <span>{{ supplier.name }} - {{ supplier.id }}</span>

View File

@ -90,6 +90,7 @@ async function changeState(value) {
ref="summaryRef" ref="summaryRef"
:url="`Tickets/${entityId}/summary`" :url="`Tickets/${entityId}/summary`"
@on-fetch="(data) => setData(data)" @on-fetch="(data) => setData(data)"
data-key="TicketSummary"
> >
<template #header="{ entity }"> <template #header="{ entity }">
<div> <div>

View File

@ -237,6 +237,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
ref="summaryRef" ref="summaryRef"
:url="`Travels/${entityId}/getTravel`" :url="`Travels/${entityId}/getTravel`"
@on-fetch="(data) => setTravelData(data)" @on-fetch="(data) => setTravelData(data)"
data-key="TravelSummary"
> >
<template #header> <template #header>
<span>{{ travel.ref }} - {{ travel.id }}</span> <span>{{ travel.ref }} - {{ travel.id }}</span>

View File

@ -13,7 +13,7 @@ import useNotify from 'src/composables/useNotify.js';
import { toDate } from 'src/filters'; import { toDate } from 'src/filters';
import { downloadFile } from 'src/composables/downloadFile'; import { downloadFile } from 'src/composables/downloadFile';
const route = useRoute(); const {{id}} = useRoute();
const quasar = useQuasar(); const quasar = useQuasar();
const router = useRouter(); const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
@ -29,7 +29,7 @@ const thermographFilter = {
fields: ['id', 'name'], fields: ['id', 'name'],
}, },
}, },
where: { travelFk: route.params.id }, where: { travelFk: id },
order: ['created'], order: ['created'],
}; };
@ -137,7 +137,7 @@ const removeThermograph = async (id) => {
data-key="TravelThermographs" data-key="TravelThermographs"
url="TravelThermographs" url="TravelThermographs"
:filter="thermographFilter" :filter="thermographFilter"
:params="{ travelFk: route.params.id }" :params="{ travelFk: id }"
auto-load auto-load
> >
<template #body="{ rows }"> <template #body="{ rows }">

View File

@ -0,0 +1,121 @@
<script setup>
import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue';
const tableRef = ref();
const { t } = useI18n();
const route = useRoute();
const entityId = computed(() => route.params.id);
const courseFilter = {
include: [
{
relation: 'trainingCourseType',
scope: {
fields: ['id', 'name'],
},
},
{
relation: 'trainingCenter',
scope: {
fields: ['id', 'name'],
},
},
],
};
const columns = computed(() => [
{
align: 'left',
name: 'trainingCourseTypeFk',
label: t('worker.formation.tableVisibleColumns.course'),
isTitle: true,
create: true,
component: 'select',
attrs: {
url: 'TrainingCourseTypes',
fields: ['id', 'name'],
},
},
{
align: 'left',
name: 'started',
label: t('worker.formation.tableVisibleColumns.startDate'),
component: 'date',
field: 'started',
create: true,
cardVisible: true,
},
{
align: 'left',
name: 'ended',
label: t('worker.formation.tableVisibleColumns.endDate'),
component: 'date',
field: 'ended',
create: true,
},
{
align: 'left',
name: 'centerFk',
label: t('worker.formation.tableVisibleColumns.center'),
create: true,
component: 'select',
attrs: {
url: 'TrainingCenters',
fields: ['id', 'name'],
},
},
{
align: 'left',
name: 'invoice',
label: t('worker.formation.tableVisibleColumns.invoice'),
component: 'input',
field: 'invoice',
},
{
align: 'left',
name: 'amount',
label: t('worker.formation.tableVisibleColumns.amount'),
component: 'input',
field: 'amount',
create: true,
},
{
align: 'left',
name: 'remark',
label: t('worker.formation.tableVisibleColumns.remark'),
component: 'checkbox',
create: true,
},
{
align: 'left',
name: 'hasDiploma',
label: t('worker.formation.tableVisibleColumns.hasDiploma'),
create: true,
},
]);
</script>
<template>
<VnTable
ref="tableRef"
data-key="WorkerFormation"
:url="`Workers/${entityId}/trainingCourse`"
:url-create="`Workers/${entityId}/trainingCourse`"
save-url="TrainingCourses/crud"
:filter="courseFilter"
:create="{
urlCreate: 'trainingCourses',
title: 'Create trainingCourse',
onDataSaved: () => tableRef.reload(),
formInitialData: {
workerFk: entityId,
},
}"
order="id DESC"
:columns="columns"
default-mode="table"
auto-load
:right-search="false"
:is-editable="true"
:use-model="true"
/>
</template>

View File

@ -66,7 +66,12 @@ const filter = {
</script> </script>
<template> <template>
<CardSummary ref="summary" :url="`Workers/${entityId}`" :filter="filter"> <CardSummary
ref="summary"
:url="`Workers/${entityId}`"
:filter="filter"
data-key="WorkerSummary"
>
<template #header="{ entity }"> <template #header="{ entity }">
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div> <div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
</template> </template>

View File

@ -23,6 +23,7 @@ export default {
'WorkerDms', 'WorkerDms',
'WorkerTimeControl', 'WorkerTimeControl',
'WorkerLocker', 'WorkerLocker',
'WorkerFormation',
], ],
}, },
children: [ children: [
@ -176,6 +177,15 @@ export default {
}, },
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'), component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
}, },
{
name: 'WorkerFormation',
path: 'formation',
meta: {
title: 'formation',
icon: 'clinical_notes',
},
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
},
], ],
}, },
], ],