forked from verdnatura/salix-front
Merge branch 'dev' into 6943-customer_migration_subsection-v2
This commit is contained in:
commit
dafa8cdebd
88
CHANGELOG.md
88
CHANGELOG.md
|
@ -1,3 +1,91 @@
|
||||||
|
# Version 24.32 - 2024-08-06
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- chore: refs #7197 drop space by:jorgep
|
||||||
|
- chore: refs #7197 drop useless attr by:jorgep
|
||||||
|
- chore: refs #7197 fix test by:jorgep
|
||||||
|
- chore: refs #7197 fix tests by:jorgep
|
||||||
|
- chore: refs #7197 fix unit tests by:jorgep
|
||||||
|
- chore: refs #7197 idrop useless class by:jorgep
|
||||||
|
- chore: refs #7197 improve form filling in Cypress tests by:jorgep
|
||||||
|
- chore: refs #7197 remove unused import by:jorgep
|
||||||
|
- feat: customerPayments card view by:alexm
|
||||||
|
- feat: refs #6943 lock grid mode by:jorgep
|
||||||
|
- feat: refs #6943 wip consumption filter by:jorgep
|
||||||
|
- feat: refs #7197 add correcting filter by:jorgep
|
||||||
|
- feat: refs #7197 add supplier activities filter option by:jorgep
|
||||||
|
- feat: refs #7197 summary responsive by:jorgep
|
||||||
|
- feat: refs #7323 fix descriptors, added VnTable and minor changes by:Jon
|
||||||
|
- feat: refs #7323 fixed tests, changed calendar styles and fix workerCreate by:Jon
|
||||||
|
- feat: refs #7356 list & weekly to VnTable and style fixes by:Jon
|
||||||
|
- feat: refs #7401 add menu options by:pablone
|
||||||
|
- feat: SalesClientTable by:Javier Segarra
|
||||||
|
- feat: salesOrderTable by:Javier Segarra
|
||||||
|
- feat: salesTicketTable by:Javier Segarra
|
||||||
|
- feat: VnTable SalesTicketTable by:Javier Segarra
|
||||||
|
- fix: columns style by:alexm
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- perf: LeftMenu show/hide by:Javier Segarra
|
||||||
|
- perf: refs #7356 TicketList state column by:Jon
|
||||||
|
- perf: VnFilterPanel (origin/7323_WorkerMigration_End) by:Javier Segarra
|
||||||
|
- perf: width SalesTicketsTable by:Javier Segarra
|
||||||
|
- refactor: #6943 wip use vnTable CustomerCredits by:jorgep
|
||||||
|
- refactor: CustomerNotifications use VnTable by:alexm
|
||||||
|
- refactor: CustomerPayments use VnTable by:alexm
|
||||||
|
- refactor: refs #7014 deleted main files and changed route files by:Jon
|
||||||
|
- refactor: refs #7014 improved route.js & deleted RouteMain by:Jon
|
||||||
|
- refactor: refs #7014 refactor <module>Main.vue by:Jon
|
||||||
|
- refactor: refs #7014 refactor ZoneCard, deleted ZoneMain & created basic tests for functionality by:Jon
|
||||||
|
- refactor: refs #7197 use invoiceInSearchbar & queryParams by:jorgep
|
||||||
|
- refactor: refs #7323 hidden column filter proposal by:Jon
|
||||||
|
- refactor: refs #7356 fixed VnTable filters by:Jon
|
||||||
|
- refactor: refs #7356 requested changes by:Jon
|
||||||
|
- refactor: wip use vnTable CustomerCredits by:jorgep
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- chore: refs #7197 fix test by:jorgep
|
||||||
|
- chore: refs #7197 fix tests by:jorgep
|
||||||
|
- chore: refs #7197 fix unit tests by:jorgep
|
||||||
|
- feat: refs #7323 fix descriptors, added VnTable and minor changes by:Jon
|
||||||
|
- feat: refs #7323 fixed tests, changed calendar styles and fix workerCreate by:Jon
|
||||||
|
- feat: refs #7356 list & weekly to VnTable and style fixes by:Jon
|
||||||
|
- fix(claim): small details (6336-claim-v6) by:alexm
|
||||||
|
- fix: columns style by:alexm
|
||||||
|
- fix: customer defaulter add amount order (6943-fixCustomer) by:alexm
|
||||||
|
- fix: customerDefaulter correct functionality by:alexm
|
||||||
|
- fix: customerNotifications filter by:alexm
|
||||||
|
- fix: fix conflicts by:Jon
|
||||||
|
- fix: refs #6101 fix TicketList by:Jon
|
||||||
|
- fix: refs #6891 worker tests by:jorgep
|
||||||
|
- fix: refs #6943 drop padding-left checkbox & create wrap mode vnRow by:jorgep
|
||||||
|
- fix: refs #6943 prevent undefined by:jorgep
|
||||||
|
- fix: refs #7014 fix tests by:Jon
|
||||||
|
- fix: refs #7014 fix wagon module by:Jon
|
||||||
|
- fix: refs #7197 add url InvoiceInSearchbar by:jorgep
|
||||||
|
- fix: refs #7197 amount reactivity by:jorgep
|
||||||
|
- fix: refs #7197 drop character by:jorgep
|
||||||
|
- fix: refs #7197 reactivity invoiceCorrection by:jorgep
|
||||||
|
- fix: refs #7197 responsive summary layout by:jorgep
|
||||||
|
- fix: refs #7197 rollback by:jorgep
|
||||||
|
- fix: refs #7197 rollback crudModel by:jorgep
|
||||||
|
- fix: refs #7197 setInvoiceInCorrecition by:jorgep
|
||||||
|
- fix: refs #7197 vat, intrastat, filter and list sections by:jorgep
|
||||||
|
- fix: refs #7323 fix department & email table filter by:Jon
|
||||||
|
- fix: refs #7323 fixed left filter by:Jon
|
||||||
|
- fix: refs #7323 fix workerTimeControl form by:Jon
|
||||||
|
- fix: refs #7401 fix routeForm by:pablone
|
||||||
|
- fix: refs #7401 remove console.log by:pablone
|
||||||
|
- fix: refs CAU 207504 fix itemDiary and logs by:Jon
|
||||||
|
- fix: workerCreate form street field to be always upperCase by:Jon
|
||||||
|
- hotfix: refs CAU #207614 fix sale.concept field by:Jon
|
||||||
|
- refactor: refs #7356 fixed VnTable filters by:Jon
|
||||||
|
- refs #6898 fix by:carlossa
|
||||||
|
- Ticket expedition initial load fix by:wbuezas
|
||||||
|
|
||||||
# Version 24.28 - 2024-07-09
|
# Version 24.28 - 2024-07-09
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -382,7 +382,6 @@ defineExpose({
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="$props.rightSearch"
|
v-if="$props.rightSearch"
|
||||||
icon="filter_alt"
|
icon="filter_alt"
|
||||||
title="asd"
|
|
||||||
class="bg-vn-section-color q-ml-md"
|
class="bg-vn-section-color q-ml-md"
|
||||||
dense
|
dense
|
||||||
@click="stateStore.toggleRightDrawer()"
|
@click="stateStore.toggleRightDrawer()"
|
||||||
|
|
|
@ -23,6 +23,7 @@ const props = defineProps({
|
||||||
searchCustomRouteRedirect: { type: String, default: undefined },
|
searchCustomRouteRedirect: { type: String, default: undefined },
|
||||||
searchRedirect: { type: Boolean, default: true },
|
searchRedirect: { type: Boolean, default: true },
|
||||||
searchMakeFetch: { type: Boolean, default: true },
|
searchMakeFetch: { type: Boolean, default: true },
|
||||||
|
searchUrlQuery: { type: String, default: undefined },
|
||||||
});
|
});
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -70,6 +71,7 @@ if (props.baseUrl) {
|
||||||
:url="props.searchUrl"
|
:url="props.searchUrl"
|
||||||
:label="props.searchbarLabel"
|
:label="props.searchbarLabel"
|
||||||
:info="props.searchbarInfo"
|
:info="props.searchbarInfo"
|
||||||
|
:search-url="props.searchUrlQuery"
|
||||||
:custom-route-redirect-name="searchCustomRouteRedirect"
|
:custom-route-redirect-name="searchCustomRouteRedirect"
|
||||||
:redirect="searchRedirect"
|
:redirect="searchRedirect"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -50,7 +50,7 @@ const formattedTime = computed({
|
||||||
}
|
}
|
||||||
if (!props.timeOnly) {
|
if (!props.timeOnly) {
|
||||||
const [hh, mm] = time.split(':');
|
const [hh, mm] = time.split(':');
|
||||||
const date = model.value ?? Date.vnNew();
|
const date = new Date(model.value ? model.value : null);
|
||||||
date.setHours(hh, mm, 0);
|
date.setHours(hh, mm, 0);
|
||||||
time = date?.toISOString();
|
time = date?.toISOString();
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ const formattedTime = computed({
|
||||||
function dateToTime(newDate) {
|
function dateToTime(newDate) {
|
||||||
return date.formatDate(new Date(newDate), dateFormat);
|
return date.formatDate(new Date(newDate), dateFormat);
|
||||||
}
|
}
|
||||||
const timeField = ref();
|
|
||||||
watch(
|
watch(
|
||||||
() => model.value,
|
() => model.value,
|
||||||
(val) => (formattedTime.value = val),
|
(val) => (formattedTime.value = val),
|
||||||
|
@ -153,4 +153,3 @@ watch(
|
||||||
es:
|
es:
|
||||||
Open time: Abrir tiempo
|
Open time: Abrir tiempo
|
||||||
</i18n>
|
</i18n>
|
||||||
, nextTick
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ watch(
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => [props.url, props.filter],
|
() => [props.url, props.filter],
|
||||||
([url, filter]) => fetch({ url, filter })
|
([url, filter]) => mounted.value && fetch({ url, filter })
|
||||||
);
|
);
|
||||||
|
|
||||||
const addFilter = async (filter, params) => {
|
const addFilter = async (filter, params) => {
|
||||||
|
|
|
@ -67,6 +67,10 @@ const props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
searchUrl: {
|
||||||
|
type: String,
|
||||||
|
default: 'params',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const searchText = ref('');
|
const searchText = ref('');
|
||||||
|
|
|
@ -28,7 +28,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
delete params.filter;
|
delete params.filter;
|
||||||
store.userParams = { ...params, ...store.userParams };
|
store.userParams = { ...params, ...store.userParams };
|
||||||
store.userFilter = { ...filter, ...store.userFilter };
|
store.userFilter = { ...filter, ...store.userFilter };
|
||||||
if (filter.order) store.order = filter.order;
|
if (filter?.order) store.order = filter.order;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ const fetchMailAliases = async () => {
|
||||||
paginateRef.value.fetch();
|
paginateRef.value.fetch();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAccountData = async () => {
|
const getAccountData = async (reload = true) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
hasAccount.value = await fetchAccountExistence();
|
hasAccount.value = await fetchAccountExistence();
|
||||||
if (!hasAccount.value) {
|
if (!hasAccount.value) {
|
||||||
|
@ -93,7 +93,7 @@ const getAccountData = async () => {
|
||||||
store.data = [];
|
store.data = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await fetchMailAliases();
|
reload && (await fetchMailAliases());
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,13 +102,11 @@ const openCreateMailAliasForm = () => createMailAliasDialogRef.value.show();
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
() => {
|
() => {
|
||||||
store.url = urlPath;
|
|
||||||
store.filter = filter.value;
|
|
||||||
getAccountData();
|
getAccountData();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => await getAccountData());
|
onMounted(async () => await getAccountData(false));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -20,20 +20,22 @@ const workers = ref([]);
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
const saveButtonRef = ref();
|
const saveButtonRef = ref();
|
||||||
|
|
||||||
const developmentsFilter = {
|
const developmentsFilter = computed(() => {
|
||||||
fields: [
|
return {
|
||||||
'id',
|
fields: [
|
||||||
'claimFk',
|
'id',
|
||||||
'claimReasonFk',
|
'claimFk',
|
||||||
'claimResultFk',
|
'claimReasonFk',
|
||||||
'claimResponsibleFk',
|
'claimResultFk',
|
||||||
'workerFk',
|
'claimResponsibleFk',
|
||||||
'claimRedeliveryFk',
|
'workerFk',
|
||||||
],
|
'claimRedeliveryFk',
|
||||||
where: {
|
],
|
||||||
claimFk: route.params.id,
|
where: {
|
||||||
},
|
claimFk: route.params.id,
|
||||||
};
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -142,9 +144,9 @@ const columns = computed(() => [
|
||||||
ref="claimDevelopmentForm"
|
ref="claimDevelopmentForm"
|
||||||
:data-required="{ claimFk: route.params.id }"
|
:data-required="{ claimFk: route.params.id }"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
auto-load
|
|
||||||
@save-changes="$router.push(`/claim/${route.params.id}/action`)"
|
@save-changes="$router.push(`/claim/${route.params.id}/action`)"
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
|
auto-load
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
|
|
|
@ -100,7 +100,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
color="primary"
|
color="primary"
|
||||||
:to="{
|
:to="{
|
||||||
name: 'TicketList',
|
name: 'TicketList',
|
||||||
query: { q: ticketFilter(entity) },
|
query: { table: ticketFilter(entity) },
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('invoiceOut.card.ticketList') }}</QTooltip>
|
<QTooltip>{{ t('invoiceOut.card.ticketList') }}</QTooltip>
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { toCurrency, toDate } from 'src/filters/index';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
import { watchEffect } from 'vue';
|
import { watchEffect } from 'vue';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -214,6 +215,12 @@ watchEffect(selectedRows);
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
<template #column-clientSocialName="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.clientSocialName }}
|
||||||
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Tickets"
|
url="Tickets"
|
||||||
|
|
|
@ -6,6 +6,9 @@ import { toCurrency } from 'src/filters';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
|
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -168,6 +171,24 @@ const downloadCSV = async () => {
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
>
|
>
|
||||||
|
<template #column-clientId="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.clientId }}
|
||||||
|
<CustomerDescriptorProxy :id="row.clientId" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-ticketFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.ticketFk }}
|
||||||
|
<TicketDescriptorProxy :id="row.ticketFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-workerName="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.workerName }}
|
||||||
|
<WorkerDescriptorProxy :id="row.comercialId" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
@ -16,39 +14,9 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['search']);
|
const emit = defineEmits(['search']);
|
||||||
|
|
||||||
const workerList = ref([]);
|
|
||||||
const agencyList = ref([]);
|
|
||||||
const vehicleList = ref([]);
|
|
||||||
const warehouseList = ref([]);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
url="Workers/search"
|
|
||||||
:filter="{ fields: ['id', 'nickname'] }"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (workerList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
url="AgencyModes/isActive"
|
|
||||||
:filter="{ fields: ['id', 'name'] }"
|
|
||||||
sort-by="name ASC"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (agencyList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
url="Vehicles"
|
|
||||||
:filter="{ fields: ['id', 'numberPlate'] }"
|
|
||||||
sort-by="numberPlate ASC"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (vehicleList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData url="Warehouses" @on-fetch="(data) => (warehouseList = data)" auto-load />
|
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
|
@ -62,19 +30,17 @@ const warehouseList = ref([]);
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params }">
|
<template #body="{ params }">
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection v-if="workerList">
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Worker')"
|
:label="t('Worker')"
|
||||||
v-model="params.workerFk"
|
v-model="params.workerFk"
|
||||||
:options="workerList"
|
url="Workers/search"
|
||||||
|
sort-by="nickname ASC"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
>
|
||||||
<template #option="{ itemProps, opt }">
|
<template #option="{ itemProps, opt }">
|
||||||
|
@ -91,19 +57,17 @@ const warehouseList = ref([]);
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection v-if="agencyList">
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Agency')"
|
:label="t('Agency')"
|
||||||
v-model="params.agencyModeFk"
|
v-model="params.agencyModeFk"
|
||||||
:options="agencyList"
|
url="AgencyModes/isActive"
|
||||||
|
sort-by="name ASC"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -147,19 +111,17 @@ const warehouseList = ref([]);
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection v-if="vehicleList">
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Vehicle')"
|
:label="t('Vehicle')"
|
||||||
v-model="params.vehicleFk"
|
v-model="params.vehicleFk"
|
||||||
:options="vehicleList"
|
url="Vehicles"
|
||||||
|
sort-by="numberPlate ASC"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="numberPlate"
|
option-label="numberPlate"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -170,19 +132,16 @@ const warehouseList = ref([]);
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection v-if="vehicleList">
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Warehouse')"
|
:label="t('Warehouse')"
|
||||||
v-model="params.warehouseFk"
|
v-model="params.warehouseFk"
|
||||||
:options="warehouseList"
|
url="Warehouses"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
|
@ -26,9 +26,6 @@ const defaultInitialData = {
|
||||||
isOk: false,
|
isOk: false,
|
||||||
};
|
};
|
||||||
const maxDistance = ref();
|
const maxDistance = ref();
|
||||||
const workerList = ref([]);
|
|
||||||
const agencyList = ref([]);
|
|
||||||
const vehicleList = ref([]);
|
|
||||||
|
|
||||||
const routeFilter = {
|
const routeFilter = {
|
||||||
fields: [
|
fields: [
|
||||||
|
@ -79,30 +76,6 @@ const onSave = (data, response) => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnSubToolbar v-if="isNew" />
|
<VnSubToolbar v-if="isNew" />
|
||||||
<FetchData
|
|
||||||
url="Workers/search"
|
|
||||||
:filter="{ fields: ['id', 'nickname'] }"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (workerList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
url="AgencyModes/isActive"
|
|
||||||
:filter="{ fields: ['id', 'name'] }"
|
|
||||||
sort-by="name"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (agencyList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
url="Vehicles"
|
|
||||||
:filter="{ fields: ['id', 'numberPlate'] }"
|
|
||||||
sort-by="numberPlate ASC"
|
|
||||||
limit="30"
|
|
||||||
@on-fetch="(data) => (vehicleList = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="RouteConfigs/findOne"
|
url="RouteConfigs/findOne"
|
||||||
@on-fetch="({ kmMax }) => (maxDistance = kmMax)"
|
@on-fetch="({ kmMax }) => (maxDistance = kmMax)"
|
||||||
|
@ -124,12 +97,10 @@ const onSave = (data, response) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Worker')"
|
:label="t('Worker')"
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
:options="workerList"
|
url="Workers/search"
|
||||||
|
sort-by="nickname ASC"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
>
|
||||||
<template #option="{ itemProps, opt }">
|
<template #option="{ itemProps, opt }">
|
||||||
|
@ -146,12 +117,10 @@ const onSave = (data, response) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Vehicle')"
|
:label="t('Vehicle')"
|
||||||
v-model="data.vehicleFk"
|
v-model="data.vehicleFk"
|
||||||
:options="vehicleList"
|
url="Vehicles"
|
||||||
|
sort-by="numberPlate ASC"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="numberPlate"
|
option-label="numberPlate"
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
@ -159,12 +128,10 @@ const onSave = (data, response) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Agency')"
|
:label="t('Agency')"
|
||||||
v-model="data.agencyModeFk"
|
v-model="data.agencyModeFk"
|
||||||
:options="agencyList"
|
url="AgencyModes/isActive"
|
||||||
|
sort-by="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
<VnInputDate v-model="data.created" :label="t('Created')" />
|
<VnInputDate v-model="data.created" :label="t('Created')" />
|
||||||
|
@ -178,7 +145,7 @@ const onSave = (data, response) => {
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) =>
|
(val) =>
|
||||||
val < maxDistance ||
|
val < maxDistance ||
|
||||||
t('Distance must be lesser than 4000'),
|
t('Distance must be lesser than', { maxDistance }),
|
||||||
]"
|
]"
|
||||||
clearable
|
clearable
|
||||||
type="number"
|
type="number"
|
||||||
|
@ -227,5 +194,7 @@ es:
|
||||||
Description: Descripción
|
Description: Descripción
|
||||||
Is served: Se ha servido
|
Is served: Se ha servido
|
||||||
Created: Creado
|
Created: Creado
|
||||||
Distance must be lesser than {maxDistance}: La distancia debe ser inferior a {maxDistance}
|
Distance must be lesser than: La distancia debe ser inferior a {maxDistance}
|
||||||
|
en:
|
||||||
|
Distance must be lesser than: Distance must be lesser than {maxDistance}
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -9,10 +9,9 @@ const { t } = useI18n();
|
||||||
data-key="RouteList"
|
data-key="RouteList"
|
||||||
:label="t('Search route')"
|
:label="t('Search route')"
|
||||||
:info="t('You can search by route reference')"
|
:info="t('You can search by route reference')"
|
||||||
|
url="Routes/filter"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Search route: Buscar rutas
|
Search route: Buscar rutas
|
||||||
|
|
|
@ -11,6 +11,8 @@ import axios from 'axios';
|
||||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||||
import RouteListTicketsDialog from 'pages/Route/Card/RouteListTicketsDialog.vue';
|
import RouteListTicketsDialog from 'pages/Route/Card/RouteListTicketsDialog.vue';
|
||||||
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||||
|
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
@ -118,8 +120,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'to',
|
name: 'from',
|
||||||
label: t('To'),
|
label: t('From'),
|
||||||
visible: false,
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -128,8 +130,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'from',
|
name: 'to',
|
||||||
label: t('From'),
|
label: t('To'),
|
||||||
visible: false,
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -271,13 +273,18 @@ const openTicketsDialog = (id) => {
|
||||||
</QCard>
|
</QCard>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<VnSubToolbar />
|
<VnSubToolbar />
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<RouteFilter data-key="RouteList" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
class="route-list"
|
class="route-list"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="RouteList"
|
data-key="RouteList"
|
||||||
url="Routes/filter"
|
url="Routes/filter"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="true"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:filter="routeFilter"
|
:filter="routeFilter"
|
||||||
redirect="route"
|
redirect="route"
|
||||||
|
|
|
@ -301,6 +301,7 @@ const openSmsDialog = async () => {
|
||||||
data-key="RouteTicketList"
|
data-key="RouteTicketList"
|
||||||
url="Routes/getTickets"
|
url="Routes/getTickets"
|
||||||
:filter="{ id: route.params.id }"
|
:filter="{ id: route.params.id }"
|
||||||
|
:limit="0"
|
||||||
:order="['priority ASC']"
|
:order="['priority ASC']"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (ticketList = data)"
|
@on-fetch="(data) => (ticketList = data)"
|
||||||
|
|
|
@ -12,5 +12,6 @@ import SupplierListFilter from '../SupplierListFilter.vue';
|
||||||
search-data-key="SupplierList"
|
search-data-key="SupplierList"
|
||||||
search-url="Suppliers/filter"
|
search-url="Suppliers/filter"
|
||||||
searchbar-label="Search suppliers"
|
searchbar-label="Search suppliers"
|
||||||
|
search-url-query="table"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -19,9 +19,6 @@ const columns = computed(() => [
|
||||||
label: t('supplier.list.tableVisibleColumns.name'),
|
label: t('supplier.list.tableVisibleColumns.name'),
|
||||||
name: 'socialName',
|
name: 'socialName',
|
||||||
create: true,
|
create: true,
|
||||||
columnCreate: {
|
|
||||||
component: 'input',
|
|
||||||
},
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
name: 'search',
|
name: 'search',
|
||||||
},
|
},
|
||||||
|
@ -93,6 +90,11 @@ const columns = computed(() => [
|
||||||
title: t('Create Supplier'),
|
title: t('Create Supplier'),
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
|
mapper: (data) => {
|
||||||
|
data.name = data.socialName;
|
||||||
|
delete data.socialName;
|
||||||
|
return data;
|
||||||
|
},
|
||||||
}"
|
}"
|
||||||
order="id ASC"
|
order="id ASC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
|
|
@ -181,7 +181,7 @@ async function changeState(value) {
|
||||||
<span :class="{ link: ticket.refFk }">
|
<span :class="{ link: ticket.refFk }">
|
||||||
{{ dashIfEmpty(ticket.refFk) }}
|
{{ dashIfEmpty(ticket.refFk) }}
|
||||||
<InvoiceOutDescriptorProxy
|
<InvoiceOutDescriptorProxy
|
||||||
:id="ticket.id"
|
:id="ticket.invoiceOut.id"
|
||||||
v-if="ticket.refFk"
|
v-if="ticket.refFk"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue