Merge branch 'dev' into 6242-AddHasRoundingField
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
fe4a681894
|
@ -104,12 +104,14 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
|
||||
store.hasMoreData = limit && response.data.length >= limit;
|
||||
|
||||
processData(response.data, { map: !!store.mapKey, append });
|
||||
if (!append && !isDialogOpened()) updateRouter && updateStateParams();
|
||||
|
||||
if (!append && !isDialogOpened() && updateRouter) {
|
||||
if (updateStateParams(response.data)?.redirect) return;
|
||||
}
|
||||
store.isLoading = false;
|
||||
canceller = null;
|
||||
|
||||
processData(response.data, { map: !!store.mapKey, append });
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
@ -239,7 +241,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
if (Object.values(store.userParams).length) await fetch({});
|
||||
}
|
||||
|
||||
function updateStateParams() {
|
||||
function updateStateParams(data) {
|
||||
if (!route?.path) return;
|
||||
const newUrl = { path: route.path, query: { ...(route.query ?? {}) } };
|
||||
if (store?.searchUrl)
|
||||
|
@ -256,15 +258,15 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
const { path } = matches.at(-1);
|
||||
|
||||
const to =
|
||||
store?.data?.length === 1
|
||||
? path.replace(/\/(list|:id)|-list/, `/${store.data[0].id}`)
|
||||
data?.length === 1
|
||||
? path.replace(/\/(list|:id)|-list/, `/${data[0].id}`)
|
||||
: path.replace(/:id.*/, '');
|
||||
|
||||
if (route.path != to) {
|
||||
const pushUrl = { path: to };
|
||||
if (to.endsWith('/list') || to.endsWith('/'))
|
||||
pushUrl.query = newUrl.query;
|
||||
return router.push(pushUrl);
|
||||
return router.push(pushUrl) && { redirect: true };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export default function toDateHourMin(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
if (!date) return date;
|
||||
return new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
|
@ -7,5 +8,4 @@ export default function toDateHourMin(date) {
|
|||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
return dateHour;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export default function toDateHourMinSec(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
if (!date) return date;
|
||||
return new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
|
@ -8,5 +9,4 @@ export default function toDateHourMinSec(date) {
|
|||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
return dateHour;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
|
|||
:url="`Suppliers/${entityId}/getSummary`"
|
||||
@on-fetch="(data) => setData(data)"
|
||||
data-key="SupplierSummary"
|
||||
module-name="Supplier"
|
||||
>
|
||||
<template #header>
|
||||
<span>{{ supplier.id }} - {{ supplier.name }}</span>
|
||||
|
|
|
@ -201,7 +201,7 @@ const getExpeditionState = async (expedition) => {
|
|||
|
||||
const openGrafana = (expeditionFk) => {
|
||||
useOpenURL(
|
||||
`https://grafana.verdnatura.es/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`
|
||||
`https://grafana.verdnatura.es/d/de1njb6p5answd/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ const getColor = (percentage) => {
|
|||
v-if="entry.isCustomInspectionRequired"
|
||||
name="warning"
|
||||
color="negative"
|
||||
size="xs"
|
||||
size="md"
|
||||
:title="t('requiresInspection')"
|
||||
>
|
||||
</QIcon>
|
||||
|
@ -627,7 +627,7 @@ const getColor = (percentage) => {
|
|||
<QBtn
|
||||
v-if="entry.evaNotes"
|
||||
icon="comment"
|
||||
size="sm"
|
||||
size="md"
|
||||
flat
|
||||
color="primary"
|
||||
>
|
||||
|
|
|
@ -345,7 +345,7 @@ const getMailStates = async (date) => {
|
|||
const prevMonth = month == 1 ? 12 : month - 1;
|
||||
const params = {
|
||||
month,
|
||||
year: selectedDateYear.value,
|
||||
year: date.getFullYear(),
|
||||
};
|
||||
|
||||
const curMonthStates = (await axios.get(url, { params })).data;
|
||||
|
|
|
@ -102,8 +102,7 @@ const getWorkWeekElements = () => {
|
|||
};
|
||||
|
||||
const paintWorkWeeks = async () => {
|
||||
for (var i = 0; i < workWeeksElements.value.length; i++) {
|
||||
const element = workWeeksElements.value[i];
|
||||
for (const element of workWeeksElements.value) {
|
||||
const week = Number(element.innerHTML);
|
||||
const weekState = workerTimeControlMailsMap.value.get(week);
|
||||
const { className, title } = stateClasses[weekState] || {};
|
||||
|
|
|
@ -4,7 +4,7 @@ import WorkerDepartmentTree from './WorkerDepartmentTree.vue';
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<VnSection data-key="WorkerDepartment">
|
||||
<VnSection data-key="WorkerDepartment" :search-bar="false">
|
||||
<template #body>
|
||||
<div class="flex flex-center q-pa-md">
|
||||
<WorkerDepartmentTree />
|
||||
|
|
Loading…
Reference in New Issue