forked from verdnatura/salix-front
Merge remote-tracking branch 'origin/dev' into 6321_negative_tickets
This commit is contained in:
commit
f52ba11f42
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
|
@ -10,6 +10,7 @@ import VnPaginate from 'components/ui/VnPaginate.vue';
|
|||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import SkeletonTable from 'components/ui/SkeletonTable.vue';
|
||||
import { tMobile } from 'src/composables/tMobile';
|
||||
import VnSubToolbar from './ui/VnSubToolbar.vue';
|
||||
|
||||
const { push } = useRouter();
|
||||
const quasar = useQuasar();
|
||||
|
@ -67,7 +68,7 @@ const $props = defineProps({
|
|||
default: '',
|
||||
description: 'It is used for redirect on click "save and continue"',
|
||||
},
|
||||
hasSubtoolbar: {
|
||||
hasSubToolbar: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
|
@ -313,8 +314,11 @@ watch(formUrl, async () => {
|
|||
></slot>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
<SkeletonTable v-if="!formData" :columns="$attrs.columns?.length" />
|
||||
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubtoolbar">
|
||||
<SkeletonTable
|
||||
v-if="!formData && $attrs.autoLoad"
|
||||
:columns="$attrs.columns?.length"
|
||||
/>
|
||||
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown() && hasSubToolbar">
|
||||
<QBtnGroup push style="column-gap: 10px">
|
||||
<slot name="moreBeforeActions" />
|
||||
<QBtn
|
||||
|
|
|
@ -90,7 +90,7 @@ const $props = defineProps({
|
|||
});
|
||||
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||
const modelValue = computed(
|
||||
() => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`
|
||||
() => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`,
|
||||
).value;
|
||||
const componentIsRendered = ref(false);
|
||||
const arrayData = useArrayData(modelValue);
|
||||
|
@ -137,7 +137,7 @@ onMounted(async () => {
|
|||
JSON.stringify(newVal) !== JSON.stringify(originalData.value);
|
||||
isResetting.value = false;
|
||||
},
|
||||
{ deep: true }
|
||||
{ deep: true },
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -145,7 +145,7 @@ onMounted(async () => {
|
|||
if (!$props.url)
|
||||
watch(
|
||||
() => arrayData.store.data,
|
||||
(val) => updateAndEmit('onFetch', val)
|
||||
(val) => updateAndEmit('onFetch', val),
|
||||
);
|
||||
|
||||
watch(formUrl, async () => {
|
||||
|
@ -206,11 +206,11 @@ async function save() {
|
|||
|
||||
updateAndEmit('onDataSaved', formData.value, response?.data);
|
||||
if ($props.reload) await arrayData.fetch({});
|
||||
hasChanges.value = false;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
hasChanges.value = false;
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ function filter(value, update, filterOptions) {
|
|||
(ref) => {
|
||||
ref.setOptionIndex(-1);
|
||||
ref.moveOptionSelection(1, true);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ function addChildren(module, route, parent) {
|
|||
}
|
||||
|
||||
const items = ref([]);
|
||||
|
||||
function getRoutes() {
|
||||
if (props.source === 'main') {
|
||||
const modules = Object.assign([], navigation.getModules().value);
|
||||
|
@ -66,9 +67,8 @@ function getRoutes() {
|
|||
const moduleDef = routes.find(
|
||||
(route) => toLowerCamel(route.name) === item.module
|
||||
);
|
||||
item.children = [];
|
||||
|
||||
if (!moduleDef) continue;
|
||||
item.children = [];
|
||||
|
||||
addChildren(item.module, moduleDef, item.children);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ const itemComputed = computed(() => {
|
|||
</script>
|
||||
<template>
|
||||
<QItem
|
||||
active-class="bg-hover"
|
||||
active-class="bg-vn-hover"
|
||||
class="min-height"
|
||||
:to="{ name: itemComputed.name }"
|
||||
clickable
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
<script setup>
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useQuasar } from 'quasar';
|
||||
import PinnedModules from './PinnedModules.vue';
|
||||
import UserPanel from 'components/UserPanel.vue';
|
||||
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
const quasar = useQuasar();
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const { getTokenMultimedia } = useSession();
|
||||
const token = getTokenMultimedia();
|
||||
const appName = 'Lilium';
|
||||
|
||||
onMounted(() => stateStore.setMounted());
|
||||
|
@ -83,11 +81,12 @@ const pinnedModulesRef = ref();
|
|||
id="user"
|
||||
>
|
||||
<QAvatar size="lg">
|
||||
<QImg
|
||||
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
||||
spinner-color="primary"
|
||||
>
|
||||
</QImg>
|
||||
<VnImg
|
||||
:id="user.id"
|
||||
collection="user"
|
||||
size="160x160"
|
||||
:zoom-size="null"
|
||||
/>
|
||||
</QAvatar>
|
||||
<QTooltip bottom>
|
||||
{{ t('globals.userPanel') }}
|
||||
|
|
|
@ -12,12 +12,14 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import FetchData from 'components/FetchData.vue';
|
||||
import { useClipboard } from 'src/composables/useClipboard';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
|
||||
const state = useState();
|
||||
const session = useSession();
|
||||
const router = useRouter();
|
||||
const { t, locale } = useI18n();
|
||||
const { copyText } = useClipboard();
|
||||
|
||||
const userLocale = computed({
|
||||
get() {
|
||||
return locale.value;
|
||||
|
@ -99,6 +101,7 @@ function saveUserData(param, value) {
|
|||
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||
localUserData();
|
||||
}
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -109,12 +112,14 @@ function saveUserData(param, value) {
|
|||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
v-if="isEmployee"
|
||||
url="Companies"
|
||||
order="name"
|
||||
@on-fetch="(data) => (companiesData = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
v-if="isEmployee"
|
||||
url="Accountings"
|
||||
order="name"
|
||||
@on-fetch="(data) => (accountBankData = data)"
|
||||
|
|
|
@ -48,6 +48,7 @@ const defaultComponents = {
|
|||
component: markRaw(VnInput),
|
||||
attrs: {
|
||||
disable: !$props.isEditable,
|
||||
class: 'fit',
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
|
@ -57,6 +58,7 @@ const defaultComponents = {
|
|||
component: markRaw(VnInput),
|
||||
attrs: {
|
||||
disable: !$props.isEditable,
|
||||
class: 'fit',
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
|
@ -68,6 +70,7 @@ const defaultComponents = {
|
|||
readonly: true,
|
||||
disable: !$props.isEditable,
|
||||
style: 'min-width: 125px',
|
||||
class: 'fit',
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
|
@ -79,7 +82,7 @@ const defaultComponents = {
|
|||
const defaultAttrs = {
|
||||
disable: !$props.isEditable,
|
||||
'model-value': Boolean(prop),
|
||||
class: 'no-padding',
|
||||
class: 'no-padding fit',
|
||||
};
|
||||
|
||||
if (typeof prop == 'number') {
|
||||
|
@ -96,6 +99,7 @@ const defaultComponents = {
|
|||
component: markRaw(VnSelect),
|
||||
attrs: {
|
||||
disable: !$props.isEditable,
|
||||
class: 'fit',
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
|
@ -147,7 +151,7 @@ const col = computed(() => {
|
|||
const components = computed(() => $props.components ?? defaultComponents);
|
||||
</script>
|
||||
<template>
|
||||
<div class="row no-wrap fit">
|
||||
<div class="row no-wrap">
|
||||
<VnComponent
|
||||
v-if="col.before"
|
||||
:prop="col.before"
|
||||
|
|
|
@ -7,6 +7,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
import VnTableColumn from 'components/VnTable/VnColumn.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -39,7 +40,7 @@ const enterEvent = {
|
|||
|
||||
const defaultAttrs = {
|
||||
filled: !$props.showTitle,
|
||||
class: 'q-px-sm q-pb-xs q-pt-none',
|
||||
class: 'q-px-sm q-pb-xs q-pt-none fit',
|
||||
dense: true,
|
||||
};
|
||||
|
||||
|
@ -75,12 +76,23 @@ const components = {
|
|||
},
|
||||
forceAttrs,
|
||||
},
|
||||
time: {
|
||||
component: markRaw(VnInputTime),
|
||||
event: updateEvent,
|
||||
attrs: {
|
||||
...defaultAttrs,
|
||||
disable: !$props.isEditable,
|
||||
},
|
||||
forceAttrs: {
|
||||
label: $props.showLabel && $props.column.label,
|
||||
},
|
||||
},
|
||||
checkbox: {
|
||||
component: markRaw(QCheckbox),
|
||||
event: updateEvent,
|
||||
attrs: {
|
||||
dense: true,
|
||||
class: $props.showTitle ? 'q-py-sm q-mt-md' : 'q-px-md q-py-xs',
|
||||
class: $props.showTitle ? 'q-py-sm q-mt-md' : 'q-px-md q-py-xs fit',
|
||||
'toggle-indeterminate': true,
|
||||
},
|
||||
forceAttrs,
|
||||
|
@ -89,7 +101,7 @@ const components = {
|
|||
component: markRaw(VnSelect),
|
||||
event: updateEvent,
|
||||
attrs: {
|
||||
class: 'q-px-md q-pb-xs q-pt-none',
|
||||
class: 'q-px-md q-pb-xs q-pt-none fit',
|
||||
dense: true,
|
||||
filled: !$props.showTitle,
|
||||
},
|
||||
|
|
|
@ -59,10 +59,14 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hasSubtoolbar: {
|
||||
hasSubToolbar: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
disableOption: {
|
||||
type: Object,
|
||||
default: () => ({ card: false, table: false }),
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -84,11 +88,13 @@ const tableModes = [
|
|||
icon: 'view_column',
|
||||
title: t('table view'),
|
||||
value: TABLE_MODE,
|
||||
disable: $props.disableOption?.table,
|
||||
},
|
||||
{
|
||||
icon: 'grid_view',
|
||||
title: t('grid view'),
|
||||
value: DEFAULT_MODE,
|
||||
disable: $props.disableOption?.card,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -232,7 +238,7 @@ defineExpose({
|
|||
:search-url="searchUrl"
|
||||
:disable-infinite-scroll="mode == TABLE_MODE"
|
||||
@save-changes="reload"
|
||||
:has-subtoolbar="$attrs['hasSubtoolbar'] ?? isEditable"
|
||||
:has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable"
|
||||
>
|
||||
<template
|
||||
v-for="(_, slotName) in $slots"
|
||||
|
@ -418,9 +424,9 @@ defineExpose({
|
|||
>
|
||||
<VnLv
|
||||
:label="
|
||||
!col.component &&
|
||||
col.label &&
|
||||
`${col.label}:`
|
||||
!col.component && col.label
|
||||
? `${col.label}:`
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<template #value>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import { onBeforeMount, computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, onBeforeRouteUpdate } from 'vue-router';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import useCardSize from 'src/composables/useCardSize';
|
||||
|
@ -41,6 +41,15 @@ onBeforeMount(async () => {
|
|||
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
||||
await arrayData.fetch({ append: false });
|
||||
});
|
||||
|
||||
if (props.baseUrl) {
|
||||
onBeforeRouteUpdate(async (to, from) => {
|
||||
if (to.params.id !== from.params.id) {
|
||||
arrayData.store.url = `${props.baseUrl}/${to.params.id}`;
|
||||
await arrayData.fetch({ append: false, updateRouter: false });
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<QDrawer
|
||||
|
|
|
@ -12,7 +12,7 @@ const $props = defineProps({
|
|||
default: () => {},
|
||||
},
|
||||
value: {
|
||||
type: [Object, Number, String],
|
||||
type: [Object, Number, String, Boolean],
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
@ -54,7 +54,6 @@ function toValueAttrs(attrs) {
|
|||
v-bind="mix(toComponent).attrs"
|
||||
v-on="mix(toComponent).event ?? {}"
|
||||
v-model="model"
|
||||
class="fit"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
|
|
|
@ -1,84 +1,31 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { onMounted, watch, computed, ref } from 'vue';
|
||||
import { date } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import isValidDate from 'filters/isValidDate';
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
const model = defineModel({ type: String });
|
||||
const $props = defineProps({
|
||||
isOutlined: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
emitDateFormat: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const hover = ref(false);
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const joinDateAndTime = (date, time) => {
|
||||
if (!date) {
|
||||
return null;
|
||||
}
|
||||
if (!time) {
|
||||
return new Date(date).toISOString();
|
||||
}
|
||||
const [year, month, day] = date.split('/');
|
||||
return new Date(`${year}-${month}-${day}T${time}`).toISOString();
|
||||
};
|
||||
const dateFormat = 'DD/MM/YYYY';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
const mask = ref();
|
||||
|
||||
const time = computed(() => (props.modelValue ? props.modelValue.split('T')?.[1] : null));
|
||||
const value = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
emit(
|
||||
'update:modelValue',
|
||||
props.emitDateFormat ? new Date(value) : joinDateAndTime(value, time.value)
|
||||
);
|
||||
},
|
||||
onMounted(() => {
|
||||
// fix quasar bug
|
||||
mask.value = '##/##/####';
|
||||
});
|
||||
|
||||
const isPopupOpen = ref(false);
|
||||
|
||||
const onDateUpdate = (date) => {
|
||||
value.value = date;
|
||||
isPopupOpen.value = false;
|
||||
};
|
||||
|
||||
const padDate = (value) => value.toString().padStart(2, '0');
|
||||
const formatDate = (dateString) => {
|
||||
const date = new Date(dateString || '');
|
||||
return `${date.getFullYear()}/${padDate(date.getMonth() + 1)}/${padDate(
|
||||
date.getDate()
|
||||
)}`;
|
||||
};
|
||||
const displayDate = (dateString) => {
|
||||
if (!dateString || !isValidDate(dateString)) {
|
||||
return '';
|
||||
}
|
||||
return new Date(dateString).toLocaleDateString([], {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
});
|
||||
};
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return props.isOutlined
|
||||
return $props.isOutlined
|
||||
? {
|
||||
dense: true,
|
||||
outlined: true,
|
||||
|
@ -86,42 +33,101 @@ const styleAttrs = computed(() => {
|
|||
}
|
||||
: {};
|
||||
});
|
||||
|
||||
const formattedDate = computed({
|
||||
get() {
|
||||
if (!model.value) return model.value;
|
||||
return date.formatDate(new Date(model.value), dateFormat);
|
||||
},
|
||||
set(value) {
|
||||
if (value == model.value) return;
|
||||
let newDate;
|
||||
if (value) {
|
||||
// parse input
|
||||
if (value.includes('/') && value.length >= 10) {
|
||||
if (value.at(2) == '/') value = value.split('/').reverse().join('/');
|
||||
value = date.formatDate(
|
||||
new Date(value).toISOString(),
|
||||
'YYYY-MM-DDTHH:mm:ss.SSSZ'
|
||||
);
|
||||
}
|
||||
let ymd = value.split('-').map((e) => parseInt(e));
|
||||
newDate = new Date(ymd[0], ymd[1] - 1, ymd[2]);
|
||||
if (model.value) {
|
||||
const orgDate =
|
||||
model.value instanceof Date ? model.value : new Date(model.value);
|
||||
|
||||
newDate.setHours(
|
||||
orgDate.getHours(),
|
||||
orgDate.getMinutes(),
|
||||
orgDate.getSeconds(),
|
||||
orgDate.getMilliseconds()
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!isNaN(newDate)) model.value = newDate.toISOString();
|
||||
},
|
||||
});
|
||||
|
||||
const popupDate = computed(() =>
|
||||
model.value ? date.formatDate(new Date(model.value), 'YYYY/MM/DD') : model.value
|
||||
);
|
||||
|
||||
watch(
|
||||
() => model.value,
|
||||
(val) => (formattedDate.value = val),
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
v-model="formattedDate"
|
||||
class="vn-input-date"
|
||||
readonly
|
||||
:model-value="displayDate(value)"
|
||||
:mask="mask"
|
||||
placeholder="dd/mm/aaaa"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
@click="isPopupOpen = true"
|
||||
:clearable="false"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
name="close"
|
||||
size="xs"
|
||||
v-if="hover && value && !readonly"
|
||||
@click="onDateUpdate(null)"
|
||||
></QIcon>
|
||||
<QIcon name="event" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
v-model="isPopupOpen"
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
:no-parent-event="props.readonly"
|
||||
>
|
||||
<QDate
|
||||
:today-btn="true"
|
||||
:model-value="formatDate(value)"
|
||||
@update:model-value="onDateUpdate"
|
||||
/>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
v-if="
|
||||
($attrs.clearable == undefined || $attrs.clearable) &&
|
||||
hover &&
|
||||
model &&
|
||||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
/>
|
||||
<QIcon name="event" class="cursor-pointer" />
|
||||
</template>
|
||||
<QMenu
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
anchor="bottom left"
|
||||
self="top start"
|
||||
:no-focus="true"
|
||||
>
|
||||
<QDate
|
||||
v-model="popupDate"
|
||||
:today-btn="true"
|
||||
@update:model-value="
|
||||
(date) => {
|
||||
formattedDate = date;
|
||||
isPopupOpen = false;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</QMenu>
|
||||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { watch, computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import isValidDate from 'filters/isValidDate';
|
||||
import { date } from 'quasar';
|
||||
|
||||
const model = defineModel({ type: String });
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
readonly: {
|
||||
timeOnly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
|
@ -17,43 +14,12 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const value = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
},
|
||||
set(value) {
|
||||
const [hours, minutes] = value.split(':');
|
||||
const date = new Date(props.modelValue);
|
||||
date.setHours(Number.parseInt(hours) || 0, Number.parseInt(minutes) || 0, 0, 0);
|
||||
emit('update:modelValue', value ? date.toISOString() : null);
|
||||
},
|
||||
});
|
||||
|
||||
const isPopupOpen = ref(false);
|
||||
const onDateUpdate = (date) => {
|
||||
internalValue.value = date;
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
value.value = internalValue.value;
|
||||
};
|
||||
const formatTime = (dateString) => {
|
||||
if (!dateString || !isValidDate(dateString)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const date = new Date(dateString || '');
|
||||
return date.toLocaleTimeString([], {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
};
|
||||
|
||||
const internalValue = ref(formatTime(value));
|
||||
const dateFormat = 'HH:mm';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return props.isOutlined
|
||||
|
@ -64,54 +30,87 @@ const styleAttrs = computed(() => {
|
|||
}
|
||||
: {};
|
||||
});
|
||||
|
||||
const formattedTime = computed({
|
||||
get() {
|
||||
if (!model.value || model.value?.length <= 5) return model.value;
|
||||
return dateToTime(model.value);
|
||||
},
|
||||
set(value) {
|
||||
if (value == model.value) return;
|
||||
let time = value;
|
||||
if (time) {
|
||||
if (time?.length > 5) time = dateToTime(time);
|
||||
if (!props.timeOnly) {
|
||||
const hours = time.split(':');
|
||||
const date = new Date();
|
||||
date.setHours(hours[0], hours[1], 0);
|
||||
time = date.toISOString();
|
||||
}
|
||||
}
|
||||
model.value = time;
|
||||
},
|
||||
});
|
||||
|
||||
function dateToTime(newDate) {
|
||||
return date.formatDate(new Date(newDate), dateFormat);
|
||||
}
|
||||
|
||||
watch(
|
||||
() => model.value,
|
||||
(val) => (formattedTime.value = val),
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QInput
|
||||
class="vn-input-time"
|
||||
readonly
|
||||
:model-value="formatTime(value)"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
@click="isPopupOpen = true"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="Schedule" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
v-model="isPopupOpen"
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
:no-parent-event="props.readonly"
|
||||
>
|
||||
<QTime
|
||||
:format24h="false"
|
||||
:model-value="formatTime(value)"
|
||||
@update:model-value="onDateUpdate"
|
||||
>
|
||||
<div class="row items-center justify-end q-gutter-sm">
|
||||
<QBtn
|
||||
:label="t('Cancel')"
|
||||
color="primary"
|
||||
flat
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
label="Ok"
|
||||
color="primary"
|
||||
flat
|
||||
@click="save"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</QTime>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QInput>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
class="vn-input-time"
|
||||
mask="##:##"
|
||||
placeholder="--:--"
|
||||
v-model="formattedTime"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
style="min-width: 100px"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
name="close"
|
||||
size="xs"
|
||||
v-if="
|
||||
($attrs.clearable == undefined || $attrs.clearable) &&
|
||||
hover &&
|
||||
model &&
|
||||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
/>
|
||||
<QIcon name="Schedule" class="cursor-pointer" />
|
||||
</template>
|
||||
<QMenu
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
v-model="isPopupOpen"
|
||||
anchor="bottom left"
|
||||
self="top start"
|
||||
:no-focus="true"
|
||||
>
|
||||
<QTime
|
||||
:format24h="false"
|
||||
v-model="formattedTime"
|
||||
mask="HH:mm"
|
||||
landscape
|
||||
now-btn
|
||||
/>
|
||||
</QMenu>
|
||||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.vn-input-time.q-field--standard.q-field--readonly .q-field__control:before {
|
||||
border-bottom-style: solid;
|
||||
|
@ -121,8 +120,3 @@ const styleAttrs = computed(() => {
|
|||
border-style: solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Cancel: Cancelar
|
||||
</i18n>
|
||||
|
|
|
@ -49,6 +49,7 @@ const filter = {
|
|||
'changedModelId',
|
||||
'changedModelValue',
|
||||
'description',
|
||||
'summaryId',
|
||||
],
|
||||
include: [
|
||||
{
|
||||
|
@ -459,12 +460,12 @@ onUnmounted(() => {
|
|||
:style="{
|
||||
backgroundColor: useColor(modelLog.model),
|
||||
}"
|
||||
:title="modelLog.model"
|
||||
:title="`${modelLog.model} #${modelLog.id}`"
|
||||
>
|
||||
{{ t(modelLog.modelI18n) }}
|
||||
</QChip>
|
||||
<span class="model-id" v-if="modelLog.id"
|
||||
>#{{ modelLog.id }}</span
|
||||
<span class="model-id" v-if="modelLog.summaryId"
|
||||
>#{{ modelLog.summaryId }}</span
|
||||
>
|
||||
<span class="model-value" :title="modelLog.showValue">
|
||||
{{ modelLog.showValue }}
|
||||
|
|
|
@ -46,7 +46,7 @@ let arrayData;
|
|||
let store;
|
||||
let entity;
|
||||
const isLoading = ref(false);
|
||||
|
||||
const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
|
||||
defineExpose({ getData });
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
@ -58,10 +58,12 @@ onBeforeMount(async () => {
|
|||
store = arrayData.store;
|
||||
entity = computed(() => (Array.isArray(store.data) ? store.data[0] : store.data));
|
||||
// It enables to load data only once if the module is the same as the dataKey
|
||||
if ($props.dataKey !== route.meta.moduleName || !route.params.id) await getData();
|
||||
if (!isSameDataKey.value || !route.params.id) await getData();
|
||||
watch(
|
||||
() => [$props.url, $props.filter],
|
||||
async () => await getData()
|
||||
async () => {
|
||||
if (!isSameDataKey.value) await getData();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -77,14 +79,50 @@ async function getData() {
|
|||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function getValueFromPath(path) {
|
||||
if (!path) return;
|
||||
const keys = path.toString().split('.');
|
||||
let current = entity.value;
|
||||
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
if (current[keys[i]] === undefined) return undefined;
|
||||
else current = current[keys[i]];
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
const emit = defineEmits(['onFetch']);
|
||||
|
||||
const iconModule = computed(() => route.matched[1].meta.icon);
|
||||
const toModule = computed(() =>
|
||||
route.matched[1].path.split('/').length > 2
|
||||
? route.matched[1].redirect
|
||||
: route.matched[1].children[0].redirect
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="descriptor">
|
||||
<template v-if="entity && !isLoading">
|
||||
<div class="header bg-primary q-pa-sm justify-between">
|
||||
<slot name="header-extra-action" />
|
||||
<slot name="header-extra-action"
|
||||
><QBtn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
:icon="iconModule"
|
||||
color="white"
|
||||
class="link"
|
||||
:to="toModule"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('globals.goToModuleIndex') }}
|
||||
</QTooltip>
|
||||
</QBtn></slot
|
||||
>
|
||||
|
||||
<QBtn
|
||||
@click.stop="viewSummary(entity.id, $props.summary)"
|
||||
round
|
||||
|
@ -139,8 +177,8 @@ const emit = defineEmits(['onFetch']);
|
|||
<QList dense>
|
||||
<QItemLabel header class="ellipsis text-h5" :lines="1">
|
||||
<div class="title">
|
||||
<span v-if="$props.title" :title="$props.title">
|
||||
{{ entity[title] ?? $props.title }}
|
||||
<span v-if="$props.title" :title="getValueFromPath(title)">
|
||||
{{ getValueFromPath(title) ?? $props.title }}
|
||||
</span>
|
||||
<slot v-else name="description" :entity="entity">
|
||||
<span :title="entity.name">
|
||||
|
@ -151,7 +189,7 @@ const emit = defineEmits(['onFetch']);
|
|||
</QItemLabel>
|
||||
<QItem dense>
|
||||
<QItemLabel class="subtitle" caption>
|
||||
#{{ $props.subtitle ?? entity.id }}
|
||||
#{{ getValueFromPath(subtitle) ?? entity.id }}
|
||||
</QItemLabel>
|
||||
</QItem>
|
||||
</QList>
|
||||
|
|
|
@ -114,6 +114,7 @@ async function search(evt) {
|
|||
store.userParamsChanged = true;
|
||||
store.filter.skip = 0;
|
||||
store.skip = 0;
|
||||
store.page = 1;
|
||||
const { params: newParams } = await arrayData.addFilter({ params: userParams.value });
|
||||
userParams.value = newParams;
|
||||
|
||||
|
@ -126,7 +127,8 @@ async function search(evt) {
|
|||
async function reload() {
|
||||
isLoading.value = true;
|
||||
const params = Object.values(userParams.value).filter((param) => param);
|
||||
|
||||
store.skip = 0;
|
||||
store.page = 1;
|
||||
await arrayData.fetch({ append: false });
|
||||
if (!$props.showAll && !params.length) store.data = [];
|
||||
isLoading.value = false;
|
||||
|
@ -138,6 +140,7 @@ async function clearFilters() {
|
|||
store.userParamsChanged = true;
|
||||
store.filter.skip = 0;
|
||||
store.skip = 0;
|
||||
store.page = 1;
|
||||
// Filtrar los params no removibles
|
||||
const removableFilters = Object.keys(userParams.value).filter((param) =>
|
||||
$props.unremovableParams.includes(param)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -28,21 +28,29 @@ const $props = defineProps({
|
|||
const show = ref(false);
|
||||
const token = useSession().getTokenMultimedia();
|
||||
const timeStamp = ref(`timestamp=${Date.now()}`);
|
||||
const url = computed(
|
||||
() =>
|
||||
`/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
||||
);
|
||||
import noImage from '/public/no-user.png';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
const url = computed(() => {
|
||||
const isEmployee = useRole().isEmployee();
|
||||
return isEmployee
|
||||
? `/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}`
|
||||
: noImage;
|
||||
});
|
||||
const reload = () => {
|
||||
timeStamp.value = `timestamp=${Date.now()}`;
|
||||
};
|
||||
defineExpose({
|
||||
reload,
|
||||
});
|
||||
|
||||
onMounted(() => {});
|
||||
</script>
|
||||
<template>
|
||||
<QImg :src="url" v-bind="$attrs" @click="show = !show" spinner-color="primary" />
|
||||
<QImg
|
||||
:class="{ zoomIn: $props.zoomSize }"
|
||||
:src="url"
|
||||
v-bind="$attrs"
|
||||
@click="show = !show"
|
||||
spinner-color="primary"
|
||||
/>
|
||||
<QDialog v-model="show" v-if="$props.zoomSize">
|
||||
<QImg
|
||||
:src="url"
|
||||
|
@ -56,7 +64,9 @@ onMounted(() => {});
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.q-img {
|
||||
cursor: zoom-in;
|
||||
&.zoomIn {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
min-width: 50px;
|
||||
}
|
||||
.rounded {
|
||||
|
|
|
@ -104,6 +104,7 @@ async function search() {
|
|||
([key, value]) => value && (props.staticParams || []).includes(key)
|
||||
);
|
||||
store.skip = 0;
|
||||
store.page = 1;
|
||||
|
||||
if (props.makeFetch)
|
||||
await arrayData.applyFilter({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { onMounted, onBeforeUnmount, ref, nextTick } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const actions = ref(null);
|
||||
const data = ref(null);
|
||||
|
@ -24,9 +25,7 @@ onMounted(() => {
|
|||
if (data.value) observer.observe(data.value, opts);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
stateStore.toggleSubToolbar();
|
||||
});
|
||||
onBeforeUnmount(() => stateStore.toggleSubToolbar());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { onMounted, ref, computed } from 'vue';
|
||||
import { onMounted, computed } from 'vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { useArrayDataStore } from 'stores/useArrayDataStore';
|
||||
|
@ -16,12 +16,9 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
const router = useRouter();
|
||||
let canceller = null;
|
||||
|
||||
const page = ref(1);
|
||||
|
||||
onMounted(() => {
|
||||
setOptions();
|
||||
store.skip = 0;
|
||||
|
||||
const query = route.query;
|
||||
const searchUrl = store.searchUrl;
|
||||
if (query[searchUrl]) {
|
||||
|
@ -87,13 +84,13 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
}
|
||||
|
||||
Object.assign(filter, store.userFilter, exprFilter);
|
||||
Object.assign(store.filter, { ...filter, skip: store.skip });
|
||||
const params = {
|
||||
filter: JSON.stringify(store.filter),
|
||||
};
|
||||
Object.assign(store.filter, filter);
|
||||
const params = { filter: store.filter };
|
||||
|
||||
Object.assign(params, userParams);
|
||||
params.filter.skip = store.skip;
|
||||
|
||||
params.filter = JSON.stringify(params.filter);
|
||||
store.currentFilter = params;
|
||||
store.isLoading = true;
|
||||
const response = await axios.get(store.url, {
|
||||
|
@ -154,8 +151,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
store.userParams = userParams;
|
||||
store.skip = 0;
|
||||
store.filter.skip = 0;
|
||||
page.value = 1;
|
||||
|
||||
store.page = 1;
|
||||
await fetch({ append: false });
|
||||
return { filter, params };
|
||||
}
|
||||
|
@ -187,10 +183,11 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
async function loadMore() {
|
||||
if (!store.hasMoreData) return;
|
||||
|
||||
store.skip = store.limit * page.value;
|
||||
page.value += 1;
|
||||
store.skip = store.limit * store.page;
|
||||
store.page += 1;
|
||||
|
||||
await fetch({ append: true });
|
||||
updateStateParams();
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
|
|
|
@ -36,8 +36,12 @@ export function useRole() {
|
|||
|
||||
return false;
|
||||
}
|
||||
function isEmployee() {
|
||||
return hasAny(['employee']);
|
||||
}
|
||||
|
||||
return {
|
||||
isEmployee,
|
||||
fetch,
|
||||
hasAny,
|
||||
likeAny,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
body.body--light {
|
||||
--font-color: black;
|
||||
--vn-section-color: #e0e0e0;
|
||||
--vn-section-hover-color: #b9b9b9;
|
||||
--vn-page-color: #ffffff;
|
||||
--vn-text-color: var(--font-color);
|
||||
--vn-label-color: #5f5f5f;
|
||||
|
@ -19,6 +20,7 @@ body.body--light {
|
|||
body.body--dark {
|
||||
--vn-page-color: #222;
|
||||
--vn-section-color: #3d3d3d;
|
||||
--vn-section-hover-color: #747474;
|
||||
--vn-text-color: white;
|
||||
--vn-label-color: #a8a8a8;
|
||||
--vn-accent-color: #424242;
|
||||
|
@ -71,8 +73,9 @@ select:-webkit-autofill {
|
|||
.bg-vn-section-color {
|
||||
background-color: var(--vn-section-color);
|
||||
}
|
||||
.bg-hover {
|
||||
background-color: #666666;
|
||||
|
||||
.bg-vn-hover {
|
||||
background-color: var(--vn-section-hover-color);
|
||||
}
|
||||
|
||||
.color-vn-label {
|
||||
|
@ -183,8 +186,6 @@ select:-webkit-autofill {
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
/* q-notification row items-stretch q-notification--standard bg-negative text-white */
|
||||
|
||||
.q-card,
|
||||
.q-table,
|
||||
.q-table__bottom,
|
||||
|
|
|
@ -95,6 +95,7 @@ globals:
|
|||
send: Send
|
||||
code: Code
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
log: Logs
|
||||
|
@ -105,13 +106,143 @@ globals:
|
|||
modes: Modes
|
||||
zones: Zones
|
||||
zonesList: Zones
|
||||
deliveryList: Delivery days
|
||||
upcomingList: Upcoming deliveries
|
||||
deliveryDays: Delivery days
|
||||
upcomingDeliveries: Upcoming deliveries
|
||||
role: Role
|
||||
alias: Alias
|
||||
aliasUsers: Users
|
||||
subRoles: Subroles
|
||||
inheritedRoles: Inherited Roles
|
||||
customers: Customers
|
||||
list: List
|
||||
webPayments: Web Payments
|
||||
extendedList: Extended list
|
||||
notifications: Notifications
|
||||
defaulter: Defaulter
|
||||
customerCreate: New customer
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
notes: Notes
|
||||
credits: Credits
|
||||
greuges: Greuges
|
||||
balance: Balance
|
||||
recoveries: Recoveries
|
||||
webAccess: Web access
|
||||
sms: Sms
|
||||
creditManagement: Credit management
|
||||
creditContracts: Credit contracts
|
||||
creditOpinion: Credit opinion
|
||||
others: Others
|
||||
samples: Samples
|
||||
consumption: Consumption
|
||||
mandates: Mandates
|
||||
contacts: Contacts
|
||||
webPayment: Web payment
|
||||
fileManagement: File management
|
||||
unpaid: Unpaid
|
||||
entries: Entries
|
||||
buys: Buys
|
||||
dms: File management
|
||||
entryCreate: New entry
|
||||
latestBuys: Latest buys
|
||||
tickets: Tickets
|
||||
ticketCreate: New Tickets
|
||||
boxing: Boxing
|
||||
sale: Sale
|
||||
claims: Claims
|
||||
claimCreate: New claim
|
||||
lines: Lines
|
||||
photos: Photos
|
||||
development: Development
|
||||
action: Action
|
||||
invoiceOuts: Invoice out
|
||||
negativeBases: Negative Bases
|
||||
globalInvoicing: Global invoicing
|
||||
invoiceOutCreate: Create invoice out
|
||||
shelving: Shelving
|
||||
shelvingList: Shelving List
|
||||
shelvingCreate: New shelving
|
||||
invoiceIns: Invoices In
|
||||
invoiceInCreate: Create invoice in
|
||||
vat: VAT
|
||||
dueDay: Due day
|
||||
intrastat: Intrastat
|
||||
corrective: Corrective
|
||||
order: Orders
|
||||
orderList: List
|
||||
orderCreate: New order
|
||||
catalog: Catalog
|
||||
volume: Volume
|
||||
workers: Workers
|
||||
workerCreate: New worker
|
||||
department: Department
|
||||
pda: PDA
|
||||
pbx: Private Branch Exchange
|
||||
calendar: Calendar
|
||||
timeControl: Time control
|
||||
locker: Locker
|
||||
wagons: Wagons
|
||||
wagonsList: Wagons List
|
||||
wagonCreate: Create wagon
|
||||
wagonEdit: Edit wagon
|
||||
typesList: Types List
|
||||
typeCreate: Create type
|
||||
typeEdit: Edit type
|
||||
wagonCounter: Trolley counter
|
||||
roadmap: Roadmap
|
||||
stops: Stops
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
RouteList: List
|
||||
routeCreate: New route
|
||||
RouteRoadmap: Roadmaps
|
||||
RouteRoadmapCreate: Create roadmap
|
||||
autonomous: Autonomous
|
||||
suppliers: Suppliers
|
||||
supplier: Supplier
|
||||
labeler: Labeler
|
||||
supplierCreate: New supplier
|
||||
accounts: Accounts
|
||||
addresses: Addresses
|
||||
agencyTerm: Agency agreement
|
||||
travel: Travels
|
||||
extraCommunity: Extra community
|
||||
travelCreate: New travel
|
||||
history: Log
|
||||
thermographs: Thermograph
|
||||
items: Items
|
||||
diary: Diary
|
||||
tags: Tags
|
||||
create: Create
|
||||
buyRequest: Buy requests
|
||||
fixedPrice: Fixed prices
|
||||
wasteBreakdown: Waste breakdown
|
||||
itemCreate: New item
|
||||
barcode: Barcodes
|
||||
tax: Tax
|
||||
botanical: Botanical
|
||||
itemTypeCreate: New item type
|
||||
family: Item Type
|
||||
lastEntries: Last entries
|
||||
itemType: Item type
|
||||
monitors: Monitors
|
||||
dashboard: Dashboard
|
||||
users: Users
|
||||
createTicket: Create ticket
|
||||
ticketAdvance: Advance tickets
|
||||
futureTickets: Future tickets
|
||||
purchaseRequest: Purchase request
|
||||
weeklyTickets: Weekly tickets
|
||||
formation: Formation
|
||||
locations: Locations
|
||||
warehouses: Warehouses
|
||||
roles: Roles
|
||||
connections: Connections
|
||||
acls: ACLs
|
||||
mailForwarding: Mail forwarding
|
||||
mailAlias: Mail alias
|
||||
privileges: Privileges
|
||||
created: Created
|
||||
worker: Worker
|
||||
now: Now
|
||||
|
@ -119,6 +250,7 @@ globals:
|
|||
new: New
|
||||
comment: Comment
|
||||
observations: Observations
|
||||
goToModuleIndex: Go to module index
|
||||
errors:
|
||||
statusUnauthorized: Access denied
|
||||
statusInternalServerError: An internal server error has ocurred
|
||||
|
@ -137,8 +269,6 @@ login:
|
|||
loginError: Invalid username or password
|
||||
fieldRequired: This field is required
|
||||
twoFactorRequired: Two-factor verification required
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
twoFactor:
|
||||
code: Code
|
||||
validate: Validate
|
||||
|
@ -153,40 +283,8 @@ verifyEmail:
|
|||
verifyEmail: Email verification
|
||||
dashboard:
|
||||
pageTitles:
|
||||
dashboard: Dashboard
|
||||
|
||||
customer:
|
||||
pageTitles:
|
||||
customers: Customers
|
||||
list: List
|
||||
webPayments: Web Payments
|
||||
extendedList: Extended list
|
||||
notifications: Notifications
|
||||
defaulter: Defaulter
|
||||
customerCreate: New customer
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
notes: Notes
|
||||
credits: Credits
|
||||
greuges: Greuges
|
||||
balance: Balance
|
||||
recoveries: Recoveries
|
||||
webAccess: Web access
|
||||
log: Log
|
||||
sms: Sms
|
||||
creditManagement: Credit management
|
||||
creditContracts: Credit contracts
|
||||
creditOpinion: Credit opinion
|
||||
others: Others
|
||||
samples: Samples
|
||||
consumption: Consumption
|
||||
mandates: Mandates
|
||||
contacts: Contacts
|
||||
webPayment: Web payment
|
||||
fileManagement: File management
|
||||
unpaid: Unpaid
|
||||
list:
|
||||
phone: Phone
|
||||
email: Email
|
||||
|
@ -316,17 +414,6 @@ customer:
|
|||
hasCoreVnl: VNL core received
|
||||
hasSepaVnl: VNL B2B received
|
||||
entry:
|
||||
pageTitles:
|
||||
entries: Entries
|
||||
list: List
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
buys: Buys
|
||||
notes: Notes
|
||||
dms: File management
|
||||
log: Log
|
||||
entryCreate: New entry
|
||||
latestBuys: Latest buys
|
||||
list:
|
||||
newEntry: New entry
|
||||
landed: Landed
|
||||
|
@ -335,6 +422,18 @@ entry:
|
|||
booked: Booked
|
||||
confirmed: Confirmed
|
||||
ordered: Ordered
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
reference: Reference
|
||||
created: Creation
|
||||
supplierFk: Supplier
|
||||
isBooked: Booked
|
||||
isConfirmed: Confirmed
|
||||
isOrdered: Ordered
|
||||
companyFk: Company
|
||||
travelFk: Travel
|
||||
isExcludedFromAvailable: Inventory
|
||||
isRaid: Raid
|
||||
summary:
|
||||
commission: Commission
|
||||
currency: Currency
|
||||
|
@ -410,34 +509,37 @@ entry:
|
|||
landed: Landed
|
||||
warehouseOut: Warehouse Out
|
||||
latestBuys:
|
||||
picture: Picture
|
||||
itemFk: Item ID
|
||||
packing: Packing
|
||||
grouping: Grouping
|
||||
quantity: Quantity
|
||||
size: Size
|
||||
tags: Tags
|
||||
type: Type
|
||||
intrastat: Intrastat
|
||||
origin: Origin
|
||||
weightByPiece: Weight/Piece
|
||||
isActive: Active
|
||||
family: Family
|
||||
entryFk: Entry
|
||||
buyingValue: Buying value
|
||||
freightValue: Freight value
|
||||
comissionValue: Commission value
|
||||
description: Description
|
||||
packageValue: Package value
|
||||
isIgnored: Is ignored
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
weight: Weight
|
||||
packagingFk: Package
|
||||
packingOut: Package out
|
||||
landing: Landing
|
||||
tableVisibleColumns:
|
||||
image: Picture
|
||||
itemFk: Item ID
|
||||
packing: Packing
|
||||
grouping: Grouping
|
||||
quantity: Quantity
|
||||
size: Size
|
||||
tags: Tags
|
||||
type: Type
|
||||
intrastat: Intrastat
|
||||
origin: Origin
|
||||
weightByPiece: Weight/Piece
|
||||
isActive: Active
|
||||
family: Family
|
||||
entryFk: Entry
|
||||
buyingValue: Buying value
|
||||
freightValue: Freight value
|
||||
comissionValue: Commission value
|
||||
description: Description
|
||||
packageValue: Package value
|
||||
isIgnored: Is ignored
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
weight: Weight
|
||||
packagingFk: Package
|
||||
packingOut: Package out
|
||||
landing: Landing
|
||||
isExcludedFromAvailable: Es inventory
|
||||
isRaid: Raid
|
||||
ticket:
|
||||
pageTitles:
|
||||
tickets: Tickets
|
||||
|
@ -532,18 +634,6 @@ ticket:
|
|||
warehouse: Warehouse
|
||||
agency: Agency
|
||||
claim:
|
||||
pageTitles:
|
||||
claims: Claims
|
||||
list: List
|
||||
claimCreate: New claim
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
lines: Lines
|
||||
photos: Photos
|
||||
development: Development
|
||||
log: Audit logs
|
||||
notes: Notes
|
||||
action: Action
|
||||
list:
|
||||
customer: Customer
|
||||
assignedTo: Assigned
|
||||
|
@ -607,14 +697,6 @@ claim:
|
|||
noData: 'There are no images/videos, click here or drag and drop the file'
|
||||
dragDrop: Drag and drop it here
|
||||
invoiceOut:
|
||||
pageTitles:
|
||||
invoiceOuts: Invoice out
|
||||
list: List
|
||||
negativeBases: Negative Bases
|
||||
globalInvoicing: Global invoicing
|
||||
invoiceOutCreate: Create invoice out
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
list:
|
||||
ref: Reference
|
||||
issued: Issued
|
||||
|
@ -682,13 +764,6 @@ invoiceOut:
|
|||
errors:
|
||||
downloadCsvFailed: CSV download failed
|
||||
shelving:
|
||||
pageTitles:
|
||||
shelving: Shelving
|
||||
shelvingList: Shelving List
|
||||
shelvingCreate: New shelving
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
log: Logs
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Priority
|
||||
|
@ -715,17 +790,6 @@ parking:
|
|||
info: You can search by parking code
|
||||
label: Search parking...
|
||||
invoiceIn:
|
||||
pageTitles:
|
||||
invoiceIns: Invoices In
|
||||
list: List
|
||||
invoiceInCreate: Create invoice in
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
vat: VAT
|
||||
dueDay: Due day
|
||||
intrastat: Intrastat
|
||||
corrective: Corrective
|
||||
log: Logs
|
||||
list:
|
||||
ref: Reference
|
||||
supplier: Supplier
|
||||
|
@ -776,15 +840,6 @@ invoiceIn:
|
|||
stems: Stems
|
||||
country: Country
|
||||
order:
|
||||
pageTitles:
|
||||
order: Orders
|
||||
orderList: List
|
||||
orderCreate: New order
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
catalog: Catalog
|
||||
volume: Volume
|
||||
lines: Lines
|
||||
field:
|
||||
salesPersonFk: Sales Person
|
||||
clientFk: Client
|
||||
|
@ -860,7 +915,6 @@ worker:
|
|||
timeControl: Time control
|
||||
locker: Locker
|
||||
balance: Balance
|
||||
formation: Formation
|
||||
list:
|
||||
name: Name
|
||||
email: Email
|
||||
|
@ -949,15 +1003,6 @@ worker:
|
|||
credit: Have
|
||||
concept: Concept
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Wagons
|
||||
wagonsList: Wagons List
|
||||
wagonCreate: Create wagon
|
||||
wagonEdit: Edit wagon
|
||||
typesList: Types List
|
||||
typeCreate: Create type
|
||||
typeEdit: Edit type
|
||||
wagonCounter: Trolley counter
|
||||
type:
|
||||
name: Name
|
||||
submit: Submit
|
||||
|
@ -986,20 +1031,9 @@ wagon:
|
|||
minHeightBetweenTrays: 'The minimum height between trays is '
|
||||
maxWagonHeight: 'The maximum height of the wagon is '
|
||||
uncompleteTrays: There are incomplete trays
|
||||
route/roadmap:
|
||||
pageTitles:
|
||||
roadmap: Roadmap
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
stops: Stops
|
||||
roadmap:
|
||||
pageTitles:
|
||||
roadmap: Roadmap
|
||||
summary: Summary
|
||||
basicData: Basic Data
|
||||
stops: Stops
|
||||
route:
|
||||
pageTitles:
|
||||
agency: Agency List
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
RouteList: List
|
||||
|
@ -1038,28 +1072,20 @@ route:
|
|||
volume: Volume
|
||||
finished: Finished
|
||||
supplier:
|
||||
pageTitles:
|
||||
suppliers: Suppliers
|
||||
supplier: Supplier
|
||||
list: List
|
||||
supplierCreate: New supplier
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
log: Log
|
||||
accounts: Accounts
|
||||
contacts: Contacts
|
||||
addresses: Addresses
|
||||
consumption: Consumption
|
||||
agencyTerm: Agency agreement
|
||||
dms: File management
|
||||
list:
|
||||
payMethod: Pay method
|
||||
payDeadline: Pay deadline
|
||||
payDay: Pay day
|
||||
account: Account
|
||||
newSupplier: New supplier
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
name: Name
|
||||
nif: NIF/CIF
|
||||
nickname: Alias
|
||||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
@ -1145,15 +1171,16 @@ supplier:
|
|||
date: Date
|
||||
reference: Reference
|
||||
travel:
|
||||
pageTitles:
|
||||
travel: Travels
|
||||
list: List
|
||||
summary: Summary
|
||||
extraCommunity: Extra community
|
||||
travelCreate: New travel
|
||||
basicData: Basic data
|
||||
history: Log
|
||||
thermographs: Thermograph
|
||||
travelList:
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
ref: Reference
|
||||
agency: Agency
|
||||
shipped: Shipped
|
||||
landed: Landed
|
||||
warehouseIn: Warehouse in
|
||||
warehouseOut: Warehouse out
|
||||
totalEntries: Total entries
|
||||
summary:
|
||||
confirmed: Confirmed
|
||||
entryId: Entry Id
|
||||
|
@ -1200,24 +1227,6 @@ travel:
|
|||
travelFileDescription: 'Travel id { travelId }'
|
||||
file: File
|
||||
item:
|
||||
pageTitles:
|
||||
items: Items
|
||||
list: List
|
||||
diary: Diary
|
||||
tags: Tags
|
||||
create: Create
|
||||
buyRequest: Buy requests
|
||||
fixedPrice: Fixed prices
|
||||
wasteBreakdown: Waste breakdown
|
||||
itemCreate: New item
|
||||
barcode: Barcodes
|
||||
tax: Tax
|
||||
log: Log
|
||||
botanical: Botanical
|
||||
shelving: Shelving
|
||||
itemTypeCreate: New item type
|
||||
family: Item Type
|
||||
lastEntries: Last entries
|
||||
descriptor:
|
||||
item: Item
|
||||
buyer: Buyer
|
||||
|
@ -1303,22 +1312,6 @@ item:
|
|||
minSalesQuantity: 'Cantidad mínima de venta'
|
||||
genus: 'Genus'
|
||||
specie: 'Specie'
|
||||
item/itemType:
|
||||
pageTitles:
|
||||
itemType: Item type
|
||||
basicData: Basic data
|
||||
summary: Summary
|
||||
monitor:
|
||||
pageTitles:
|
||||
monitors: Monitors
|
||||
list: List
|
||||
zone:
|
||||
pageTitles:
|
||||
zones: Zones
|
||||
zonesList: Zones
|
||||
deliveryList: Delivery days
|
||||
upcomingList: Upcoming deliveries
|
||||
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -96,6 +96,7 @@ globals:
|
|||
send: Enviar
|
||||
code: Código
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
log: Historial
|
||||
|
@ -106,14 +107,144 @@ globals:
|
|||
modes: Modos
|
||||
zones: Zonas
|
||||
zonesList: Zonas
|
||||
deliveryList: Días de entrega
|
||||
upcomingList: Próximos repartos
|
||||
deliveryDays: Días de entrega
|
||||
upcomingDeliveries: Próximos repartos
|
||||
role: Role
|
||||
alias: Alias
|
||||
aliasUsers: Usuarios
|
||||
subRoles: Subroles
|
||||
inheritedRoles: Roles heredados
|
||||
customers: Clientes
|
||||
customerCreate: Nuevo cliente
|
||||
list: Listado
|
||||
webPayments: Pagos Web
|
||||
extendedList: Listado extendido
|
||||
notifications: Notificaciones
|
||||
defaulter: Morosos
|
||||
createCustomer: Crear cliente
|
||||
fiscalData: Datos fiscales
|
||||
billingData: Forma de pago
|
||||
consignees: Consignatarios
|
||||
notes: Notas
|
||||
credits: Créditos
|
||||
greuges: Greuges
|
||||
balance: Balance
|
||||
recoveries: Recobros
|
||||
webAccess: Acceso web
|
||||
sms: Sms
|
||||
creditManagement: Gestión de crédito
|
||||
creditContracts: Contratos de crédito
|
||||
creditOpinion: Opinión de crédito
|
||||
others: Otros
|
||||
samples: Plantillas
|
||||
consumption: Consumo
|
||||
mandates: Mandatos
|
||||
contacts: Contactos
|
||||
webPayment: Pago web
|
||||
fileManagement: Gestión documental
|
||||
unpaid: Impago
|
||||
entries: Entradas
|
||||
buys: Compras
|
||||
dms: Gestión documental
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
tickets: Tickets
|
||||
ticketCreate: Nuevo ticket
|
||||
boxing: Encajado
|
||||
sale: Lineas del pedido
|
||||
claims: Reclamaciones
|
||||
claimCreate: Crear reclamación
|
||||
lines: Líneas
|
||||
development: Trazabilidad
|
||||
photos: Fotos
|
||||
action: Acción
|
||||
invoiceOuts: Fact. emitidas
|
||||
negativeBases: Bases Negativas
|
||||
globalInvoicing: Facturación global
|
||||
invoiceOutCreate: Crear fact. emitida
|
||||
order: Cesta
|
||||
orderList: Listado
|
||||
orderCreate: Nueva orden
|
||||
catalog: Catálogo
|
||||
volume: Volumen
|
||||
shelving: Carros
|
||||
shelvingList: Listado de carros
|
||||
shelvingCreate: Nuevo carro
|
||||
invoiceIns: Fact. recibidas
|
||||
invoiceInCreate: Crear fact. recibida
|
||||
vat: IVA
|
||||
labeler: Etiquetas
|
||||
dueDay: Vencimiento
|
||||
intrastat: Intrastat
|
||||
corrective: Rectificativa
|
||||
workers: Trabajadores
|
||||
workerCreate: Nuevo trabajador
|
||||
department: Departamentos
|
||||
pda: PDA
|
||||
pbx: Centralita
|
||||
calendar: Calendario
|
||||
timeControl: Control de horario
|
||||
locker: Taquilla
|
||||
wagons: Vagones
|
||||
wagonsList: Listado vagones
|
||||
wagonCreate: Crear tipo
|
||||
wagonEdit: Editar tipo
|
||||
typesList: Listado tipos
|
||||
typeCreate: Crear tipo
|
||||
typeEdit: Editar tipo
|
||||
wagonCounter: Contador de carros
|
||||
roadmap: Troncales
|
||||
stops: Paradas
|
||||
routes: Rutas
|
||||
cmrsList: Listado de CMRs
|
||||
RouteList: Listado
|
||||
routeCreate: Nueva ruta
|
||||
RouteRoadmap: Troncales
|
||||
RouteRoadmapCreate: Crear troncal
|
||||
autonomous: Autónomos
|
||||
suppliers: Proveedores
|
||||
supplier: Proveedor
|
||||
supplierCreate: Nuevo proveedor
|
||||
accounts: Cuentas
|
||||
addresses: Direcciones
|
||||
agencyTerm: Acuerdo agencia
|
||||
travel: Envíos
|
||||
create: Crear
|
||||
extraCommunity: Extra comunitarios
|
||||
travelCreate: Nuevo envío
|
||||
history: Historial
|
||||
thermographs: Termógrafos
|
||||
items: Artículos
|
||||
diary: Histórico
|
||||
tags: Etiquetas
|
||||
fixedPrice: Precios fijados
|
||||
buyRequest: Peticiones de compra
|
||||
wasteBreakdown: Deglose de mermas
|
||||
itemCreate: Nuevo artículo
|
||||
tax: 'IVA'
|
||||
botanical: 'Botánico'
|
||||
barcode: 'Código de barras'
|
||||
itemTypeCreate: Nueva familia
|
||||
family: Familia
|
||||
lastEntries: Últimas entradas
|
||||
itemType: Familia
|
||||
monitors: Monitores
|
||||
dashboard: Tablón
|
||||
users: Usuarios
|
||||
createTicket: Crear ticket
|
||||
ticketAdvance: Adelantar tickets
|
||||
futureTickets: Tickets a futuro
|
||||
purchaseRequest: Petición de compra
|
||||
weeklyTickets: Tickets programados
|
||||
formation: Formación
|
||||
locations: Ubicaciones
|
||||
warehouses: Almacenes
|
||||
roles: Roles
|
||||
connections: Conexiones
|
||||
acls: ACLs
|
||||
mailForwarding: Reenvío de correo
|
||||
mailAlias: Alias de correo
|
||||
privileges: Privilegios
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
now: Ahora
|
||||
|
@ -121,6 +252,7 @@ globals:
|
|||
new: Nuevo
|
||||
comment: Comentario
|
||||
observations: Observaciones
|
||||
goToModuleIndex: Ir al índice del módulo
|
||||
errors:
|
||||
statusUnauthorized: Acceso denegado
|
||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||
|
@ -139,8 +271,6 @@ login:
|
|||
loginError: Nombre de usuario o contraseña incorrectos
|
||||
fieldRequired: Este campo es obligatorio
|
||||
twoFactorRequired: Verificación de doble factor requerida
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
twoFactor:
|
||||
code: Código
|
||||
validate: Validar
|
||||
|
@ -153,41 +283,8 @@ verifyEmail:
|
|||
verifyEmail: Verificación de correo
|
||||
dashboard:
|
||||
pageTitles:
|
||||
dashboard: Tablón
|
||||
|
||||
customer:
|
||||
pageTitles:
|
||||
customers: Clientes
|
||||
customerCreate: Nuevo cliente
|
||||
list: Listado
|
||||
webPayments: Pagos Web
|
||||
extendedList: Listado extendido
|
||||
notifications: Notificaciones
|
||||
defaulter: Morosos
|
||||
createCustomer: Crear cliente
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
fiscalData: Datos fiscales
|
||||
billingData: Forma de pago
|
||||
consignees: Consignatarios
|
||||
notes: Notas
|
||||
credits: Créditos
|
||||
greuges: Greuges
|
||||
balance: Balance
|
||||
recoveries: Recobros
|
||||
webAccess: Acceso web
|
||||
log: Historial
|
||||
sms: Sms
|
||||
creditManagement: Gestión de crédito
|
||||
creditContracts: Contratos de crédito
|
||||
creditOpinion: Opinión de crédito
|
||||
others: Otros
|
||||
samples: Plantillas
|
||||
consumption: Consumo
|
||||
mandates: Mandatos
|
||||
contacts: Contactos
|
||||
webPayment: Pago web
|
||||
fileManagement: Gestión documental
|
||||
unpaid: Impago
|
||||
list:
|
||||
phone: Teléfono
|
||||
email: Email
|
||||
|
@ -316,17 +413,6 @@ customer:
|
|||
hasCoreVnl: Recibido core VNL
|
||||
hasSepaVnl: Recibido B2B VNL
|
||||
entry:
|
||||
pageTitles:
|
||||
entries: Entradas
|
||||
list: Listado
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
buys: Compras
|
||||
notes: Notas
|
||||
dms: Gestión documental
|
||||
log: Historial
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
list:
|
||||
newEntry: Nueva entrada
|
||||
landed: F. entrega
|
||||
|
@ -335,6 +421,18 @@ entry:
|
|||
booked: Asentado
|
||||
confirmed: Confirmado
|
||||
ordered: Pedida
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
reference: Referencia
|
||||
created: Creación
|
||||
supplierFk: Proveedor
|
||||
isBooked: Asentado
|
||||
isConfirmed: Confirmado
|
||||
isOrdered: Pedida
|
||||
companyFk: Empresa
|
||||
travelFk: Envio
|
||||
isExcludedFromAvailable: Inventario
|
||||
isRaid: Redada
|
||||
summary:
|
||||
commission: Comisión
|
||||
currency: Moneda
|
||||
|
@ -410,34 +508,37 @@ entry:
|
|||
landed: F. entrega
|
||||
warehouseOut: Alm. salida
|
||||
latestBuys:
|
||||
picture: Foto
|
||||
itemFk: ID Artículo
|
||||
packing: Packing
|
||||
grouping: Grouping
|
||||
quantity: Cantidad
|
||||
size: Medida
|
||||
tags: Etiquetas
|
||||
type: Tipo
|
||||
intrastat: Intrastat
|
||||
origin: Origen
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
isActive: Activo
|
||||
family: Familia
|
||||
entryFk: Entrada
|
||||
buyingValue: Coste
|
||||
freightValue: Porte
|
||||
comissionValue: Comisión
|
||||
description: Descripción
|
||||
packageValue: Embalaje
|
||||
isIgnored: Ignorado
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
weight: Peso
|
||||
packagingFk: Embalaje
|
||||
packingOut: Embalaje envíos
|
||||
landing: Llegada
|
||||
tableVisibleColumns:
|
||||
image: Foto
|
||||
itemFk: Id Artículo
|
||||
packing: packing
|
||||
grouping: Grouping
|
||||
quantity: Cantidad
|
||||
size: Medida
|
||||
tags: Etiquetas
|
||||
type: Tipo
|
||||
intrastat: Intrastat
|
||||
origin: Origen
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
isActive: Activo
|
||||
family: Familia
|
||||
entryFk: Entrada
|
||||
buyingValue: Coste
|
||||
freightValue: Porte
|
||||
comissionValue: Comisión
|
||||
description: Descripción
|
||||
packageValue: Embalaje
|
||||
isIgnored: Ignorado
|
||||
price2: Grouping
|
||||
price3: Packing
|
||||
minPrice: Min
|
||||
ektFk: Ekt
|
||||
weight: Peso
|
||||
packagingFk: Embalaje
|
||||
packingOut: Embalaje envíos
|
||||
landing: Llegada
|
||||
isExcludedFromAvailable: Es inventario
|
||||
isRaid: Redada
|
||||
ticket:
|
||||
pageTitles:
|
||||
tickets: Tickets
|
||||
|
@ -532,18 +633,6 @@ ticket:
|
|||
warehouse: Almacén
|
||||
agency: Agencia
|
||||
claim:
|
||||
pageTitles:
|
||||
claims: Reclamaciones
|
||||
list: Listado
|
||||
claimCreate: Crear reclamación
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
lines: Líneas
|
||||
development: Trazabilidad
|
||||
photos: Fotos
|
||||
log: Historial
|
||||
notes: Notas
|
||||
action: Acción
|
||||
list:
|
||||
customer: Cliente
|
||||
assignedTo: Asignada a
|
||||
|
@ -607,14 +696,6 @@ claim:
|
|||
noData: No hay imágenes/videos haz click aquí o arrastra y suelta el archivo
|
||||
dragDrop: Arrástralo y sueltalo aquí
|
||||
invoiceOut:
|
||||
pageTitles:
|
||||
invoiceOuts: Fact. emitidas
|
||||
list: Listado
|
||||
negativeBases: Bases Negativas
|
||||
globalInvoicing: Facturación global
|
||||
invoiceOutCreate: Crear fact. emitida
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
list:
|
||||
ref: Referencia
|
||||
issued: Fecha emisión
|
||||
|
@ -682,15 +763,6 @@ invoiceOut:
|
|||
errors:
|
||||
downloadCsvFailed: Error al descargar CSV
|
||||
order:
|
||||
pageTitles:
|
||||
order: Cesta
|
||||
orderList: Listado
|
||||
orderCreate: Nueva orden
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
catalog: Catálogo
|
||||
volume: Volumen
|
||||
lines: Líneas
|
||||
field:
|
||||
salesPersonFk: Comercial
|
||||
clientFk: Cliente
|
||||
|
@ -732,13 +804,6 @@ order:
|
|||
price: Precio
|
||||
amount: Monto
|
||||
shelving:
|
||||
pageTitles:
|
||||
shelving: Carros
|
||||
shelvingList: Listado de carros
|
||||
shelvingCreate: Nuevo carro
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
log: Historial
|
||||
list:
|
||||
parking: Parking
|
||||
priority: Prioridad
|
||||
|
@ -764,17 +829,6 @@ parking:
|
|||
info: Puedes buscar por código de parking
|
||||
label: Buscar parking...
|
||||
invoiceIn:
|
||||
pageTitles:
|
||||
invoiceIns: Fact. recibidas
|
||||
list: Listado
|
||||
invoiceInCreate: Crear fact. recibida
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
vat: IVA
|
||||
dueDay: Vencimiento
|
||||
intrastat: Intrastat
|
||||
corrective: Rectificativa
|
||||
log: Historial
|
||||
list:
|
||||
ref: Referencia
|
||||
supplier: Proveedor
|
||||
|
@ -857,7 +911,6 @@ worker:
|
|||
timeControl: Control de horario
|
||||
locker: Taquilla
|
||||
balance: Balance
|
||||
formation: Formación
|
||||
list:
|
||||
name: Nombre
|
||||
email: Email
|
||||
|
@ -937,15 +990,6 @@ worker:
|
|||
credit: Haber
|
||||
concept: Concepto
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Vagones
|
||||
wagonsList: Listado vagones
|
||||
wagonCreate: Crear tipo
|
||||
wagonEdit: Editar tipo
|
||||
typesList: Listado tipos
|
||||
typeCreate: Crear tipo
|
||||
typeEdit: Editar tipo
|
||||
wagonCounter: Contador de carros
|
||||
type:
|
||||
name: Nombre
|
||||
submit: Guardar
|
||||
|
@ -974,36 +1018,12 @@ wagon:
|
|||
minHeightBetweenTrays: 'La distancia mínima entre bandejas es '
|
||||
maxWagonHeight: 'La altura máxima del vagón es '
|
||||
uncompleteTrays: Hay bandejas sin completar
|
||||
route/roadmap:
|
||||
pageTitles:
|
||||
roadmap: Troncales
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
stops: Paradas
|
||||
roadmap:
|
||||
pageTitles:
|
||||
roadmap: Troncales
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
stops: Paradas
|
||||
route:
|
||||
pageTitles:
|
||||
routes: Rutas
|
||||
cmrsList: Listado de CMRs
|
||||
RouteList: Listado
|
||||
routeCreate: Nueva ruta
|
||||
basicData: Datos básicos
|
||||
summary: Resumen
|
||||
RouteRoadmap: Troncales
|
||||
RouteRoadmapCreate: Crear troncal
|
||||
tickets: Tickets
|
||||
log: Historial
|
||||
autonomous: Autónomos
|
||||
cmr:
|
||||
list:
|
||||
results: resultados
|
||||
cmrFk: Id CMR
|
||||
hasCmrDms: Adjuntado en gestdoc
|
||||
hasCmrDms: Gestdoc
|
||||
'true': Sí
|
||||
'false': 'No'
|
||||
ticketFk: Id ticket
|
||||
|
@ -1026,28 +1046,20 @@ route:
|
|||
volume: Volumen
|
||||
finished: Finalizada
|
||||
supplier:
|
||||
pageTitles:
|
||||
suppliers: Proveedores
|
||||
supplier: Proveedor
|
||||
list: Listado
|
||||
supplierCreate: Nuevo proveedor
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
fiscalData: Datos fiscales
|
||||
billingData: Forma de pago
|
||||
log: Historial
|
||||
accounts: Cuentas
|
||||
contacts: Contactos
|
||||
addresses: Direcciones
|
||||
consumption: Consumo
|
||||
agencyTerm: Acuerdo agencia
|
||||
dms: Gestión documental
|
||||
list:
|
||||
payMethod: Método de pago
|
||||
payDeadline: Plazo de pago
|
||||
payDay: Día de pago
|
||||
account: Cuenta
|
||||
newSupplier: Nuevo proveedor
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
name: Nombre
|
||||
nif: NIF/CIF
|
||||
nickname: Alias
|
||||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
@ -1133,16 +1145,16 @@ supplier:
|
|||
date: Fecha
|
||||
reference: Referencia
|
||||
travel:
|
||||
pageTitles:
|
||||
travel: Envíos
|
||||
list: Listado
|
||||
create: Crear
|
||||
summary: Resumen
|
||||
extraCommunity: Extra comunitarios
|
||||
travelCreate: Nuevo envío
|
||||
basicData: Datos básicos
|
||||
history: Historial
|
||||
thermographs: Termógrafos
|
||||
travelList:
|
||||
tableVisibleColumns:
|
||||
id: Id
|
||||
ref: Referencia
|
||||
agency: Agencia
|
||||
shipped: Enviado
|
||||
landed: Llegada
|
||||
warehouseIn: Almacén de salida
|
||||
warehouseOut: Almacén de entrada
|
||||
totalEntries: Total de entradas
|
||||
summary:
|
||||
confirmed: Confirmado
|
||||
entryId: Id entrada
|
||||
|
@ -1189,24 +1201,6 @@ travel:
|
|||
travelFileDescription: 'Id envío { travelId }'
|
||||
file: Fichero
|
||||
item:
|
||||
pageTitles:
|
||||
items: Artículos
|
||||
list: Listado
|
||||
diary: Histórico
|
||||
tags: Etiquetas
|
||||
fixedPrice: Precios fijados
|
||||
buyRequest: Peticiones de compra
|
||||
wasteBreakdown: Deglose de mermas
|
||||
itemCreate: Nuevo artículo
|
||||
basicData: 'Datos básicos'
|
||||
tax: 'IVA'
|
||||
botanical: 'Botánico'
|
||||
barcode: 'Código de barras'
|
||||
log: Historial
|
||||
shelving: Carros
|
||||
itemTypeCreate: Nueva familia
|
||||
family: Familia
|
||||
lastEntries: Últimas entradas
|
||||
descriptor:
|
||||
item: Artículo
|
||||
buyer: Comprador
|
||||
|
@ -1292,27 +1286,6 @@ item:
|
|||
achieved: 'Conseguido'
|
||||
concept: 'Concepto'
|
||||
state: 'Estado'
|
||||
item/itemType:
|
||||
pageTitles:
|
||||
itemType: Familia
|
||||
basicData: Datos básicos
|
||||
summary: Resumen
|
||||
zone:
|
||||
pageTitles:
|
||||
zones: Zonas
|
||||
list: Zonas
|
||||
deliveryList: Días de entrega
|
||||
upcomingList: Próximos repartos
|
||||
role:
|
||||
pageTitles:
|
||||
zones: Zonas
|
||||
list: Zonas
|
||||
deliveryList: Días de entrega
|
||||
upcomingList: Próximos repartos
|
||||
monitor:
|
||||
pageTitles:
|
||||
monitors: Monitores
|
||||
list: Listado
|
||||
components:
|
||||
topbar: {}
|
||||
itemsFilterPanel:
|
||||
|
|
|
@ -49,20 +49,6 @@ const hasAccount = ref(false);
|
|||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
size="md"
|
||||
color="white"
|
||||
icon="face"
|
||||
:to="{ name: 'AccountList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to module index') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu>
|
||||
<AccountDescriptorMenu :has-account="hasAccount" />
|
||||
</template>
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<script setup>
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
function navigate(id) {
|
||||
router.push({ path: `/agency/${id}` });
|
||||
}
|
||||
function exprBuilder(param, value) {
|
||||
if (!value) return;
|
||||
if (param !== 'search') return;
|
||||
|
||||
if (!isNaN(value)) return { id: value };
|
||||
|
||||
return { name: { like: `%${value}%` } };
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by name')"
|
||||
:label="t('Search agency')"
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
/>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
order="name"
|
||||
:expr-builder="exprBuilder"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
:id="row.id"
|
||||
:key="row.id"
|
||||
:title="row.name"
|
||||
@click="navigate(row.id)"
|
||||
v-for="row of rows"
|
||||
>
|
||||
<template #list-items>
|
||||
<QCheckbox
|
||||
:label="t('isOwn')"
|
||||
v-model="row.isOwn"
|
||||
:disable="true"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('isAnyVolumeAllowed')"
|
||||
v-model="row.isAnyVolumeAllowed"
|
||||
:disable="true"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
</QPage>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
</i18n>
|
|
@ -56,8 +56,7 @@ onMounted(async () => {
|
|||
:url="`Claims/${entityId}`"
|
||||
:filter="filter"
|
||||
module="Claim"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
title="client.name"
|
||||
@on-fetch="setData"
|
||||
data-key="Claim"
|
||||
>
|
||||
|
|
|
@ -224,7 +224,7 @@ async function changeState(value) {
|
|||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/claim/${entityId}/basic-data`"
|
||||
:text="t('claim.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('claim.summary.created')"
|
||||
|
|
|
@ -69,7 +69,7 @@ const filterOptions = {
|
|||
<template #form="{ data, validate, filter }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<VnInput
|
||||
:label="t('Comercial name')"
|
||||
:label="t('globals.name')"
|
||||
:rules="validate('client.socialName')"
|
||||
autofocus
|
||||
clearable
|
||||
|
|
|
@ -45,20 +45,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
|||
:summary="$props.summary"
|
||||
data-key="customerData"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
size="sm"
|
||||
icon="vn:Person"
|
||||
color="white"
|
||||
:to="{ name: 'CustomerList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to module index') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<CustomerDescriptorMenu :customer="entity" />
|
||||
</template>
|
||||
|
|
|
@ -73,7 +73,7 @@ const creditWarning = computed(() => {
|
|||
:text="t('customer.summary.basicData')"
|
||||
/>
|
||||
<VnLv :label="t('customer.summary.customerId')" :value="entity.id" />
|
||||
<VnLv :label="t('customer.summary.name')" :value="entity.name" />
|
||||
<VnLv :label="t('globals.name')" :value="entity.name" />
|
||||
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
|
||||
<VnLv :value="entity.phone">
|
||||
<template #label>
|
||||
|
|
|
@ -38,7 +38,7 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('customer.extendedList.tableVisibleColumns.name'),
|
||||
label: t('globals.name'),
|
||||
name: 'name',
|
||||
isTitle: true,
|
||||
create: true,
|
||||
|
@ -408,6 +408,7 @@ function handleLocation(data, location) {
|
|||
default-mode="table"
|
||||
redirect="customer"
|
||||
auto-load
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnLocation
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
@ -10,6 +10,7 @@ import useCardDescription from 'src/composables/useCardDescription';
|
|||
import { useState } from 'src/composables/useState';
|
||||
import { toDate } from 'src/filters';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -17,10 +18,6 @@ const $props = defineProps({
|
|||
required: false,
|
||||
default: null,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
@ -28,6 +25,7 @@ const { t } = useI18n();
|
|||
const { openReport } = usePrintService();
|
||||
const state = useState();
|
||||
const entryDescriptorRef = ref(null);
|
||||
const url = ref();
|
||||
|
||||
const entryFilter = {
|
||||
include: [
|
||||
|
@ -69,6 +67,9 @@ const entryFilter = {
|
|||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
onMounted(async () => {
|
||||
url.value = await getUrl('');
|
||||
});
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
const setData = (entity) =>
|
||||
|
@ -114,6 +115,7 @@ watch;
|
|||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
data-key="entry"
|
||||
:summary="$attrs"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<QItem v-ripple clickable @click="showEntryReport(entity)">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import EntryDescriptor from './EntryDescriptor.vue';
|
||||
import EntrySummary from './EntrySummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -11,6 +12,6 @@ const $props = defineProps({
|
|||
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<EntryDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<EntryDescriptor v-if="$props.id" :id="$props.id" :summary="EntrySummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -11,8 +11,6 @@ import { toDate, toCurrency } from 'src/filters';
|
|||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
|
||||
onUpdated(() => summaryRef.value.fetch());
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { QBtn } from 'quasar';
|
||||
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
const { openReport } = usePrintService();
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
const entriesTableColumns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'itemFk',
|
||||
field: 'itemFk',
|
||||
label: t('globals.id'),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'item',
|
||||
label: t('entry.summary.item'),
|
||||
field: (row) => row.item.name,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'packagingFk',
|
||||
label: t('entry.summary.package'),
|
||||
field: 'packagingFk',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'stickers',
|
||||
label: t('entry.summary.stickers'),
|
||||
field: 'stickers',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'packing',
|
||||
label: t('entry.summary.packing'),
|
||||
field: 'packing',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'grouping',
|
||||
label: t('entry.summary.grouping'),
|
||||
field: 'grouping',
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QDialog ref="dialogRef">
|
||||
<QCard style="min-width: 800px">
|
||||
<QCardSection class="row items-center q-pb-none">
|
||||
<QAvatar
|
||||
:icon="icon"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
size="xl"
|
||||
v-if="icon"
|
||||
/>
|
||||
<span class="text-h6 text-grey">{{ title }}</span>
|
||||
<QSpace />
|
||||
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
||||
</QCardSection>
|
||||
<QCardActions align="right">
|
||||
<QBtn
|
||||
:label="t('Print buys')"
|
||||
color="primary"
|
||||
icon="print"
|
||||
:loading="isLoading"
|
||||
@click="openReport(`Entries/${entityId}/buy-label`)"
|
||||
unelevated
|
||||
autofocus
|
||||
/>
|
||||
</QCardActions>
|
||||
<QCardSection class="row items-center">
|
||||
<VnPaginate
|
||||
ref="entryBuysPaginateRef"
|
||||
:limit="0"
|
||||
data-key="EntryBuys"
|
||||
:url="`Entries/${entityId}/getBuys`"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<QTable
|
||||
:rows="rows"
|
||||
:columns="entriesTableColumns"
|
||||
row-key="id"
|
||||
flat
|
||||
dense
|
||||
class="q-ml-lg"
|
||||
:grid="$q.screen.lt.md"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
>
|
||||
<template #body="props">
|
||||
<QTr>
|
||||
<QTd v-for="col in props.cols" :key="col.name">
|
||||
{{ col.value }}
|
||||
</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
</template>
|
|
@ -1,759 +1,200 @@
|
|||
<script setup>
|
||||
import { onMounted, ref, computed, reactive, onUnmounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
import EntryDescriptorProxy from './Card/EntryDescriptorProxy.vue';
|
||||
import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue';
|
||||
import EditTableCellValueForm from 'src/components/EditTableCellValueForm.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import ItemDescriptorProxy from '../Item/Card/ItemDescriptorProxy.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
// import { useSession } from 'composables/useSession';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
||||
const router = useRouter();
|
||||
// const { getTokenMultimedia } = useSession();
|
||||
// const token = getTokenMultimedia();
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
import { toDate } from 'src/filters';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
const rowsFetchDataRef = ref(null);
|
||||
const itemTypesOptions = ref([]);
|
||||
const originsOptions = ref([]);
|
||||
const itemFamiliesOptions = ref([]);
|
||||
const intrastatOptions = ref([]);
|
||||
const packagingsOptions = ref([]);
|
||||
const editTableCellDialogRef = ref(null);
|
||||
const visibleColumns = ref([]);
|
||||
const allColumnNames = ref([]);
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
switch (param) {
|
||||
case 'id':
|
||||
case 'size':
|
||||
case 'weightByPiece':
|
||||
case 'isActive':
|
||||
case 'family':
|
||||
case 'minPrice':
|
||||
case 'packingOut':
|
||||
return { [`i.${param}`]: value };
|
||||
case 'name':
|
||||
case 'description':
|
||||
return { [`i.${param}`]: { like: `%${value}%` } };
|
||||
case 'code':
|
||||
return { 'it.code': value };
|
||||
case 'intrastat':
|
||||
return { 'intr.description': value };
|
||||
case 'origin':
|
||||
return { 'ori.code': value };
|
||||
case 'landing':
|
||||
return { [`lb.${param}`]: value };
|
||||
case 'packing':
|
||||
case 'grouping':
|
||||
case 'quantity':
|
||||
case 'entryFk':
|
||||
case 'buyingValue':
|
||||
case 'freightValue':
|
||||
case 'comissionValue':
|
||||
case 'packageValue':
|
||||
case 'isIgnored':
|
||||
case 'price2':
|
||||
case 'price3':
|
||||
case 'ektFk':
|
||||
case 'weight':
|
||||
case 'packagingFk':
|
||||
return { [`b.${param}`]: value };
|
||||
}
|
||||
};
|
||||
|
||||
const params = reactive({});
|
||||
const arrayData = useArrayData('EntryLatestBuys', {
|
||||
url: 'Buys/latestBuysFilter',
|
||||
order: ['itemFk DESC'],
|
||||
exprBuilder: exprBuilder,
|
||||
});
|
||||
const store = arrayData.store;
|
||||
const rows = computed(() => store.data);
|
||||
const rowsSelected = ref([]);
|
||||
|
||||
const getInputEvents = (col) => {
|
||||
return col.columnFilter.type === 'select'
|
||||
? { 'update:modelValue': () => applyColumnFilter(col) }
|
||||
: {
|
||||
'keyup.enter': () => applyColumnFilter(col),
|
||||
};
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
const columns = [
|
||||
{
|
||||
label: t('entry.latestBuys.picture'),
|
||||
name: 'picture',
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.image'),
|
||||
name: 'image',
|
||||
columnField: {
|
||||
component: VnImg,
|
||||
attrs: (id) => {
|
||||
return {
|
||||
id,
|
||||
width: '50px',
|
||||
};
|
||||
},
|
||||
},
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.itemFk'),
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.itemFk'),
|
||||
name: 'itemFk',
|
||||
field: 'itemFk',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.packing'),
|
||||
field: 'packing',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.packing'),
|
||||
name: 'packing',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.grouping'),
|
||||
field: 'grouping',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.grouping'),
|
||||
name: 'grouping',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.quantity'),
|
||||
field: 'quantity',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.quantity'),
|
||||
name: 'quantity',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.description'),
|
||||
field: 'description',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.description'),
|
||||
name: 'description',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.size'),
|
||||
field: 'size',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.size'),
|
||||
name: 'size',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.tags'),
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.tags'),
|
||||
name: 'tags',
|
||||
align: 'left',
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.type'),
|
||||
field: 'code',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.type'),
|
||||
name: 'type',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnSelect,
|
||||
type: 'select',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
options: itemTypesOptions.value,
|
||||
'option-value': 'code',
|
||||
'option-label': 'code',
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.intrastat'),
|
||||
field: 'intrastat',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.intrastat'),
|
||||
name: 'intrastat',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnSelect,
|
||||
type: 'select',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
options: intrastatOptions.value,
|
||||
'option-value': 'description',
|
||||
'option-label': 'description',
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.origin'),
|
||||
field: 'origin',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.origin'),
|
||||
name: 'origin',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnSelect,
|
||||
type: 'select',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
options: originsOptions.value,
|
||||
'option-value': 'code',
|
||||
'option-label': 'code',
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.weightByPiece'),
|
||||
field: 'weightByPiece',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'),
|
||||
name: 'weightByPiece',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.isActive'),
|
||||
field: 'isActive',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.isActive'),
|
||||
name: 'isActive',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.family'),
|
||||
field: 'family',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.family'),
|
||||
name: 'family',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnSelect,
|
||||
type: 'select',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
options: itemFamiliesOptions.value,
|
||||
'option-value': 'code',
|
||||
'option-label': 'code',
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.entryFk'),
|
||||
field: 'entryFk',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.entryFk'),
|
||||
name: 'entryFk',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.buyingValue'),
|
||||
field: 'buyingValue',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.buyingValue'),
|
||||
name: 'buyingValue',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.freightValue'),
|
||||
field: 'freightValue',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.freightValue'),
|
||||
name: 'freightValue',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.comissionValue'),
|
||||
field: 'comissionValue',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.comissionValue'),
|
||||
name: 'comissionValue',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.packageValue'),
|
||||
field: 'packageValue',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.packageValue'),
|
||||
name: 'packageValue',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.isIgnored'),
|
||||
field: 'isIgnored',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.isIgnored'),
|
||||
name: 'isIgnored',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.price2'),
|
||||
field: 'price2',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.price2'),
|
||||
name: 'price2',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.price3'),
|
||||
field: 'price3',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.price3'),
|
||||
name: 'price3',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.minPrice'),
|
||||
field: 'minPrice',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.minPrice'),
|
||||
name: 'minPrice',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => toCurrency(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.ektFk'),
|
||||
field: 'ektFk',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.ektFk'),
|
||||
name: 'ektFk',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.weight'),
|
||||
field: 'weight',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.weight'),
|
||||
name: 'weight',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.packagingFk'),
|
||||
field: 'packagingFk',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.packagingFk'),
|
||||
name: 'packagingFk',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnSelect,
|
||||
type: 'select',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
options: packagingsOptions.value,
|
||||
'option-value': 'id',
|
||||
'option-label': 'id',
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.packingOut'),
|
||||
field: 'packingOut',
|
||||
align: 'left',
|
||||
label: t('entry.latestBuys.tableVisibleColumns.packingOut'),
|
||||
name: 'packingOut',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
},
|
||||
format: (val) => dashIfEmpty(val),
|
||||
},
|
||||
{
|
||||
label: t('entry.latestBuys.landing'),
|
||||
field: 'landing',
|
||||
name: 'landing',
|
||||
align: 'left',
|
||||
sortable: true,
|
||||
columnFilter: {
|
||||
component: VnInput,
|
||||
type: 'text',
|
||||
filterValue: null,
|
||||
event: getInputEvents,
|
||||
attrs: {
|
||||
dense: true,
|
||||
},
|
||||
label: t('entry.latestBuys.tableVisibleColumns.landing'),
|
||||
name: 'landing',
|
||||
component: 'date',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (val) => toDate(val),
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landing)),
|
||||
},
|
||||
]);
|
||||
|
||||
const editTableCellFormFieldsOptions = [
|
||||
{ field: 'packing', label: t('entry.latestBuys.packing') },
|
||||
{ field: 'grouping', label: t('entry.latestBuys.grouping') },
|
||||
{ field: 'packageValue', label: t('entry.latestBuys.packageValue') },
|
||||
{ field: 'weight', label: t('entry.latestBuys.weight') },
|
||||
{ field: 'description', label: t('globals.description') },
|
||||
{ field: 'size', label: t('entry.latestBuys.size') },
|
||||
{ field: 'weightByPiece', label: t('entry.latestBuys.weightByPiece') },
|
||||
{ field: 'packingOut', label: t('entry.latestBuys.packingOut') },
|
||||
{ field: 'landing', label: t('entry.latestBuys.landing') },
|
||||
];
|
||||
|
||||
const openEditTableCellDialog = () => {
|
||||
editTableCellDialogRef.value.show();
|
||||
};
|
||||
|
||||
const onEditCellDataSaved = async () => {
|
||||
rowsSelected.value = [];
|
||||
await rowsFetchDataRef.value.fetch();
|
||||
};
|
||||
|
||||
const redirectToEntryBuys = (entryFk) => {
|
||||
router.push({ name: 'EntryBuys', params: { id: entryFk } });
|
||||
};
|
||||
|
||||
const applyColumnFilter = async (col) => {
|
||||
try {
|
||||
params[col.field] = col.columnFilter.filterValue;
|
||||
await arrayData.addFilter({ params });
|
||||
} catch (err) {
|
||||
console.error('Error applying column filter', err);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
const filteredColumns = columns.value.filter((col) => col.name !== 'picture');
|
||||
allColumnNames.value = filteredColumns.map((col) => col.name);
|
||||
await arrayData.fetch({ append: false });
|
||||
});
|
||||
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="ItemTypes"
|
||||
:filter="{ fields: ['code'], order: 'code ASC', limit: 30 }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (itemTypesOptions = data)"
|
||||
/>
|
||||
<FetchData
|
||||
url="Origins"
|
||||
:filter="{ fields: ['code'], order: 'code ASC', limit: 30 }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (originsOptions = data)"
|
||||
/>
|
||||
<FetchData
|
||||
url="ItemFamilies"
|
||||
:filter="{ fields: ['code'], order: 'code ASC', limit: 30 }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (itemFamiliesOptions = data)"
|
||||
/>
|
||||
<FetchData
|
||||
url="Packagings"
|
||||
:filter="{ fields: ['id'], order: 'id ASC', limit: 30 }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (packagingsOptions = data)"
|
||||
/>
|
||||
<FetchData
|
||||
url="Intrastats"
|
||||
:filter="{ fields: ['description'], order: 'description ASC', limit: 30 }"
|
||||
auto-load
|
||||
@on-fetch="(data) => (intrastatOptions = data)"
|
||||
/>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<TableVisibleColumns
|
||||
:all-columns="allColumnNames"
|
||||
table-code="latestBuys"
|
||||
labels-traductions-path="entry.latestBuys"
|
||||
@on-config-saved="visibleColumns = ['picture', ...$event]"
|
||||
/>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<EntryLatestBuysFilter data-key="EntryLatestBuys" />
|
||||
<EntryLatestBuysFilter data-key="LatestBuys" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<Teleport to="#actions-append">
|
||||
<div class="row q-gutter-x-sm">
|
||||
<QBtn flat @click="stateStore.toggleRightDrawer()" round dense icon="menu">
|
||||
<QTooltip bottom anchor="bottom right">
|
||||
{{ t('globals.collapseMenu') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</div>
|
||||
</Teleport>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<QTable
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
selection="multiple"
|
||||
row-key="id"
|
||||
class="full-width q-mt-md"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:selected="rowsSelected"
|
||||
:no-data-label="t('globals.noResults')"
|
||||
@row-click="(_, row) => redirectToEntryBuys(row.entryFk)"
|
||||
>
|
||||
<template #top-row="{ cols }">
|
||||
<QTr>
|
||||
<QTd />
|
||||
<QTd
|
||||
v-for="(col, index) in cols"
|
||||
:key="index"
|
||||
style="max-width: 100px"
|
||||
>
|
||||
<component
|
||||
:is="col.columnFilter.component"
|
||||
v-if="col.name !== 'picture'"
|
||||
v-model="col.columnFilter.filterValue"
|
||||
v-bind="col.columnFilter.attrs"
|
||||
v-on="col.columnFilter.event(col)"
|
||||
dense
|
||||
/>
|
||||
</QTd>
|
||||
</QTr>
|
||||
</template>
|
||||
<template #body-cell-picture="{ row }">
|
||||
<QTd>
|
||||
<VnImg :id="row.itemFk" size="50x50" class="image" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-itemFk="{ row }">
|
||||
<QTd @click.stop>
|
||||
<QBtn flat color="primary">
|
||||
{{ row.itemFk }}
|
||||
</QBtn>
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-tags="{ row }">
|
||||
<QTd>
|
||||
<FetchedTags :item="row" :max-length="6" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-entryFk="{ row }">
|
||||
<QTd @click.stop>
|
||||
<QBtn flat color="primary">
|
||||
<EntryDescriptorProxy :id="row.entryFk" />
|
||||
{{ row.entryFk }}
|
||||
</QBtn>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-isIgnored="{ row }">
|
||||
<QTd>
|
||||
<QIcon
|
||||
:name="row.isIgnored ? `check` : `close`"
|
||||
:color="row.isIgnored ? `positive` : `negative`"
|
||||
size="sm"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-isActive="{ row }">
|
||||
<QTd>
|
||||
<QIcon
|
||||
:name="row.isActive ? `check` : `close`"
|
||||
:color="row.isActive ? `positive` : `negative`"
|
||||
size="sm"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
<QPageSticky v-if="rowsSelected.length > 0" :offset="[20, 20]">
|
||||
<QBtn @click="openEditTableCellDialog()" color="primary" fab icon="edit" />
|
||||
<QTooltip>
|
||||
{{ t('Edit buy(s)') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
<QDialog ref="editTableCellDialogRef">
|
||||
<EditTableCellValueForm
|
||||
edit-url="Buys/editLatestBuys"
|
||||
:rows="rowsSelected"
|
||||
:fields-options="editTableCellFormFieldsOptions"
|
||||
@on-data-saved="onEditCellDataSaved()"
|
||||
/>
|
||||
</QDialog>
|
||||
</QPage>
|
||||
<VnSubToolbar />
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="LatestBuys"
|
||||
url="Buys/latestBuysFilter"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="entry"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -1,31 +1,178 @@
|
|||
<script setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { onMounted, ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import EntrySummary from './Card/EntrySummary.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import EntryFilter from './EntryFilter.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters/index';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => route.params.id);
|
||||
const tableRef = ref();
|
||||
|
||||
function navigate(id) {
|
||||
router.push({ path: `/entry/${id}` });
|
||||
}
|
||||
|
||||
const redirectToCreateView = () => {
|
||||
router.push({ name: 'EntryCreate' });
|
||||
const entryFilter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'suppliers',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'travels',
|
||||
scope: {
|
||||
fields: ['id', 'ref'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'companies',
|
||||
scope: {
|
||||
fields: ['id', 'code'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.id'),
|
||||
name: 'id',
|
||||
isTitle: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.reference'),
|
||||
name: 'reference',
|
||||
isTitle: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.created'),
|
||||
name: 'created',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
component: 'date',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.created)),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.supplierFk'),
|
||||
name: 'supplierFk',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'suppliers',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.supplierName),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.isBooked'),
|
||||
name: 'isBooked',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
component: 'checkbox',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.isConfirmed'),
|
||||
name: 'isConfirmed',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
component: 'checkbox',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.isOrdered'),
|
||||
name: 'isOrdered',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
component: 'checkbox',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.companyFk'),
|
||||
name: 'companyFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'companies',
|
||||
fields: ['id', 'code'],
|
||||
optionLabel: 'code',
|
||||
optionValue: 'id',
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
create: true,
|
||||
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.companyCode),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.travelFk'),
|
||||
name: 'travelFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'travels',
|
||||
fields: ['id', 'ref'],
|
||||
optionLabel: 'ref',
|
||||
optionValue: 'id',
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
create: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.isExcludedFromAvailable'),
|
||||
name: 'isExcludedFromAvailable',
|
||||
chip: {
|
||||
color: null,
|
||||
condition: (value) => value,
|
||||
icon: 'vn:inventory',
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('entry.list.tableVisibleColumns.isRaid'),
|
||||
name: 'isRaid',
|
||||
chip: {
|
||||
color: null,
|
||||
condition: (value) => value,
|
||||
icon: 'vn:net',
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
]);
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
@ -42,83 +189,24 @@ onMounted(async () => {
|
|||
<EntryFilter data-key="EntryList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="EntryList"
|
||||
url="Entries/filter"
|
||||
:order="['landed DESC', 'id DESC']"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:title="row.reference"
|
||||
@click="navigate(row.id)"
|
||||
:id="row.id"
|
||||
:has-info-icons="!!row.isExcludedFromAvailable || !!row.isRaid"
|
||||
>
|
||||
<template #info-icons>
|
||||
<QIcon
|
||||
v-if="row.isExcludedFromAvailable"
|
||||
name="vn:inventory"
|
||||
color="primary"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>{{ t('Inventory entry') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
v-if="row.isRaid"
|
||||
name="vn:net"
|
||||
color="primary"
|
||||
size="xs"
|
||||
>
|
||||
<QTooltip>{{ t('Virtual entry') }}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
<template #list-items>
|
||||
<VnLv :label="t('landed')" :value="toDate(row.landed)" />
|
||||
<VnLv
|
||||
:label="t('entry.list.booked')"
|
||||
:value="!!row.isBooked"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('entry.list.invoiceNumber')"
|
||||
:value="row.invoiceNumber"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('entry.list.confirmed')"
|
||||
:value="!!row.isConfirmed"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('entry.list.supplier')"
|
||||
:value="row.supplierName"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('entry.list.ordered')"
|
||||
:value="!!row.isOrdered"
|
||||
/>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, EntrySummary)"
|
||||
color="primary"
|
||||
type="submit"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
</QPage>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<QBtn fab icon="add" color="primary" @click="redirectToCreateView()" />
|
||||
<QTooltip>
|
||||
{{ t('entry.list.newEntry') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="EntryList"
|
||||
url="Entries/filter"
|
||||
:filter="entryFilter"
|
||||
:create="{
|
||||
urlCreate: 'Entries',
|
||||
title: 'Create entry',
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="entry"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
<script setup>
|
||||
import { computed, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters/index';
|
||||
import { useQuasar } from 'quasar';
|
||||
import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('customer.extendedList.tableVisibleColumns.id'),
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
isTitle: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('shipped'),
|
||||
name: 'shipped',
|
||||
isTitle: false,
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('landed'),
|
||||
name: 'landed',
|
||||
isTitle: false,
|
||||
create: true,
|
||||
cardVisible: false,
|
||||
format: ({ landed }) => toDate(landed),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.wareHouseIn'),
|
||||
name: 'warehouseInName',
|
||||
isTitle: false,
|
||||
cardVisible: true,
|
||||
create: false,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
name: 'tableActions',
|
||||
computed,
|
||||
actions: [
|
||||
{
|
||||
title: t('printBuys'),
|
||||
icon: 'print',
|
||||
action: (row) => printBuys(row.id),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
const printBuys = (rowId) => {
|
||||
quasar.dialog({
|
||||
component: EntryBuysTableDialog,
|
||||
componentProps: {
|
||||
id: rowId,
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="EntryList"
|
||||
url="Entries/filter"
|
||||
:label="t('Search entries')"
|
||||
:info="t('You can search by entry reference')"
|
||||
/>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnTable
|
||||
ref="myEntriesRef"
|
||||
data-key="myEntriesList"
|
||||
url="Entries/filter"
|
||||
:order="['landed DESC', 'id DESC']"
|
||||
:columns="columns"
|
||||
default-mode="card"
|
||||
auto-load
|
||||
>
|
||||
</VnTable>
|
||||
</div>
|
||||
</QPage>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Search entries: Buscar entradas
|
||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||
</i18n>
|
|
@ -8,3 +8,4 @@ entryFilter:
|
|||
reference: Reference
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
printBuys: Print buys
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Search entries: Buscar entradas
|
||||
You can search by entry reference: Puedes buscar por referencia de la entrada
|
||||
|
||||
entryList:
|
||||
list:
|
||||
inventoryEntry: Es inventario
|
||||
|
@ -11,3 +12,4 @@ entryFilter:
|
|||
|
||||
landed: F. llegada
|
||||
shipped: F. salida
|
||||
Print buys: Imprimir etiquetas
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import InvoiceInDescriptor from "pages/InvoiceIn/Card/InvoiceInDescriptor.vue";
|
||||
import InvoiceInDescriptor from 'pages/InvoiceIn/Card/InvoiceInDescriptor.vue';
|
||||
import InvoiceInSummary from './InvoiceInSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -10,6 +11,10 @@ const $props = defineProps({
|
|||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<InvoiceInDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<InvoiceInDescriptor
|
||||
v-if="$props.id"
|
||||
:id="$props.id"
|
||||
:summary="InvoiceInSummary"
|
||||
/>
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -209,7 +209,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('invoiceIn.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
|
@ -240,7 +240,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('invoiceIn.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
|
@ -265,7 +265,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('invoiceIn.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv
|
||||
|
@ -289,7 +289,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('invoiceIn.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<QCardSection class="q-pa-none">
|
||||
|
|
|
@ -200,16 +200,10 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
<VnInputDate
|
||||
:label="t('lastEntries.since')"
|
||||
dense
|
||||
emit-date-format
|
||||
v-model="from"
|
||||
class="q-mr-lg"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('lastEntries.to')"
|
||||
dense
|
||||
emit-date-format
|
||||
v-model="to"
|
||||
/>
|
||||
<VnInputDate :label="t('lastEntries.to')" dense v-model="to" />
|
||||
</div>
|
||||
<QSpace />
|
||||
<div id="st-actions"></div>
|
||||
|
|
|
@ -192,7 +192,6 @@ const decrement = (paramsObj, key) => {
|
|||
v-model="params.from"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
emit-date-format
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
|
@ -203,7 +202,6 @@ const decrement = (paramsObj, key) => {
|
|||
v-model="params.to"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
emit-date-format
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
|
|
|
@ -51,20 +51,6 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
@on-fetch="setData"
|
||||
data-key="entry"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
size="sm"
|
||||
icon="vn:item"
|
||||
color="white"
|
||||
:to="{ name: 'ItemTypeList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to module index') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('shared.code')" :value="entity.code" />
|
||||
<VnLv :label="t('shared.name')" :value="entity.name" />
|
||||
|
|
|
@ -169,7 +169,6 @@ const columns = computed(() => [
|
|||
<VnInputDate
|
||||
:label="t('salesClientsTable.from')"
|
||||
dense
|
||||
emit-date-format
|
||||
v-model="from"
|
||||
class="q-mr-lg"
|
||||
style="width: 150px"
|
||||
|
@ -177,7 +176,6 @@ const columns = computed(() => [
|
|||
<VnInputDate
|
||||
:label="t('salesClientsTable.to')"
|
||||
dense
|
||||
emit-date-format
|
||||
v-model="to"
|
||||
style="width: 150px"
|
||||
/>
|
||||
|
|
|
@ -37,6 +37,10 @@ const selectedOrder = ref(null);
|
|||
const selectedOrderField = ref(null);
|
||||
const moreFields = ref([]);
|
||||
const moreFieldsOrder = ref([]);
|
||||
const selectedTag = ref(null);
|
||||
const tagValues = ref([{}]);
|
||||
const tagOptions = ref([]);
|
||||
|
||||
const createValue = (val, done) => {
|
||||
if (val.length > 2) {
|
||||
if (!tagOptions.value.includes(val)) {
|
||||
|
@ -95,10 +99,6 @@ function exprBuilder(param, value) {
|
|||
}
|
||||
}
|
||||
|
||||
const selectedTag = ref(null);
|
||||
const tagValues = ref([{}]);
|
||||
const tagOptions = ref([]);
|
||||
|
||||
const applyTagFilter = (params, search) => {
|
||||
if (!tagValues.value?.length) {
|
||||
params.tagGroups = null;
|
||||
|
@ -139,34 +139,22 @@ const onOrderChange = (value, params) => {
|
|||
};
|
||||
|
||||
const onOrderFieldChange = (value, params) => {
|
||||
const tagObj = JSON.parse(params.orderBy); // esto donde va
|
||||
const fields = {
|
||||
Relevancy: (value) => value + ' DESC, name',
|
||||
ColorAndPrice: 'showOrder, price',
|
||||
Name: 'name',
|
||||
Price: 'price',
|
||||
};
|
||||
let tagField = fields[value];
|
||||
if (!tagField) return;
|
||||
|
||||
if (typeof tagField === 'function') tagField = tagField(value);
|
||||
tagObj.field = tagField;
|
||||
params.orderBy = JSON.stringify(tagObj);
|
||||
const tagObj = JSON.parse(params.orderBy);
|
||||
switch (value) {
|
||||
case 'Relevancy':
|
||||
tagObj.field = value + ' DESC, name';
|
||||
tagObj.name = value + ' DESC, name';
|
||||
params.orderBy = JSON.stringify(tagObj);
|
||||
break;
|
||||
case 'ColorAndPrice':
|
||||
tagObj.field = 'showOrder, price';
|
||||
tagObj.name = 'showOrder, price';
|
||||
params.orderBy = JSON.stringify(tagObj);
|
||||
break;
|
||||
case 'Name':
|
||||
tagObj.field = 'name';
|
||||
tagObj.name = 'name';
|
||||
params.orderBy = JSON.stringify(tagObj);
|
||||
break;
|
||||
case 'Price':
|
||||
tagObj.field = 'price';
|
||||
tagObj.name = 'price';
|
||||
params.orderBy = JSON.stringify(tagObj);
|
||||
break;
|
||||
}
|
||||
|
@ -308,6 +296,7 @@ const useLang = (values) => {
|
|||
v-model="selectedOrder"
|
||||
:options="moreFields"
|
||||
option-label="label"
|
||||
option-value="way"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
|
|
|
@ -27,7 +27,7 @@ const dialog = ref(null);
|
|||
<div class="container order-catalog-item overflow-hidden">
|
||||
<QCard class="card shadow-6">
|
||||
<div class="img-wrapper">
|
||||
<VnImg :id="item.id" class="image" />
|
||||
<VnImg :id="item.id" zoom-size="lg" class="image" />
|
||||
<div v-if="item.hex" class="item-color-container">
|
||||
<div
|
||||
class="item-color"
|
||||
|
|
|
@ -7,6 +7,8 @@ import VnLv from 'components/ui/VnLv.vue';
|
|||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -62,6 +64,10 @@ const detailsColumns = ref([
|
|||
</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/order/${entity.id}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv label="ID" :value="entity.id" />
|
||||
<VnLv :label="t('order.summary.nickname')" dash>
|
||||
<template #value>
|
||||
|
@ -81,6 +87,10 @@ const detailsColumns = ref([
|
|||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle
|
||||
:url="`#/order/${entity.id}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('order.summary.created')"
|
||||
:value="toDateHourMinSec(entity?.created)"
|
||||
|
@ -116,14 +126,13 @@ const detailsColumns = ref([
|
|||
/>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<p class="header">
|
||||
{{ t('order.summary.notes') }}
|
||||
</p>
|
||||
<VnTitle :text="t('globals.pageTitles.notes')" />
|
||||
<p v-if="entity?.note" class="no-margin">
|
||||
{{ entity?.note }}
|
||||
</p>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<VnTitle :text="t('order.summary.total')" />
|
||||
<VnLv>
|
||||
<template #label>
|
||||
<span class="text-h6">{{ t('order.summary.subtotal') }}</span>
|
||||
|
@ -152,9 +161,7 @@ const detailsColumns = ref([
|
|||
</VnLv>
|
||||
</QCard>
|
||||
<QCard>
|
||||
<p class="header">
|
||||
{{ t('order.summary.details') }}
|
||||
</p>
|
||||
<VnTitle :text="t('order.summary.details')" />
|
||||
<QTable :columns="detailsColumns" :rows="entity?.rows" flat>
|
||||
<template #header="props">
|
||||
<QTr :props="props">
|
||||
|
@ -168,7 +175,10 @@ const detailsColumns = ref([
|
|||
<template #body="props">
|
||||
<QTr :props="props">
|
||||
<QTd key="item" :props="props" class="item">
|
||||
{{ props.row.item?.id }}
|
||||
<span class="link">
|
||||
{{ props.row.item?.id }}
|
||||
<ItemDescriptorProxy :id="props.row.item?.id" />
|
||||
</span>
|
||||
</QTd>
|
||||
<QTd key="description" :props="props" class="description">
|
||||
<div class="name">
|
||||
|
|
|
@ -70,6 +70,7 @@ function extractValueTags(items) {
|
|||
:user-params="catalogParams"
|
||||
auto-load
|
||||
@on-fetch="extractTags"
|
||||
:update-router="false"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<div class="catalog-list">
|
||||
|
|
|
@ -9,7 +9,7 @@ import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
|
|||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import OrderSearchbar from 'pages/Order/Card/OrderSearchbar.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import OrderFilter from 'pages/Order/Card/OrderFilter.vue';
|
||||
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
@ -28,7 +28,11 @@ function navigate(id) {
|
|||
}
|
||||
</script>
|
||||
<template>
|
||||
<OrderSearchbar />
|
||||
<VnSearchbar
|
||||
data-key="OrderList"
|
||||
:label="t('Search order')"
|
||||
:info="t('You can search orders by reference')"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<OrderFilter data-key="OrderList" />
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import { computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
|
||||
|
@ -17,8 +16,7 @@ const props = defineProps({
|
|||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => props.id || route.params.id);
|
||||
const { store } = useArrayData('Parking');
|
||||
const parking = computed(() => store.data);
|
||||
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
|
@ -29,15 +27,13 @@ const filter = {
|
|||
module="Parking"
|
||||
data-key="Parking"
|
||||
:url="`Parkings/${entityId}`"
|
||||
:title="parking?.code"
|
||||
:subtitle="parking?.id"
|
||||
title="code"
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (parking = data)"
|
||||
>
|
||||
<template #body>
|
||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
||||
<VnLv :label="t('parking.pickingOrder')" :value="parking.pickingOrder" />
|
||||
<VnLv :label="t('parking.sector')" :value="parking.sector?.description" />
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||
<VnLv :label="t('parking.pickingOrder')" :value="entity.pickingOrder" />
|
||||
<VnLv :label="t('parking.sector')" :value="entity.sector?.description" />
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -15,9 +14,7 @@ const $props = defineProps({
|
|||
const router = useRoute();
|
||||
const { t } = useI18n();
|
||||
const entityId = computed(() => $props.id || router.params.id);
|
||||
const { store } = useArrayData('Parking');
|
||||
|
||||
const parking = ref(store.data);
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
|
@ -26,14 +23,9 @@ const filter = {
|
|||
|
||||
<template>
|
||||
<div class="q-pa-md">
|
||||
<CardSummary
|
||||
:url="`Parkings/${entityId}`"
|
||||
:filter="filter"
|
||||
@on-fetch="(data) => (parking = data)"
|
||||
data-key="Parking"
|
||||
>
|
||||
<template #header>{{ parking.code }}</template>
|
||||
<template #body>
|
||||
<CardSummary :url="`Parkings/${entityId}`" data-key="Parking" :filter="filter">
|
||||
<template #header="{ entity }">{{ entity.code }}</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<a
|
||||
|
@ -44,17 +36,17 @@ const filter = {
|
|||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.code')" :value="parking.code" />
|
||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||
<VnLv
|
||||
:label="t('parking.pickingOrder')"
|
||||
:value="parking.pickingOrder"
|
||||
:value="entity.pickingOrder"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('parking.sector')"
|
||||
:value="parking.sector?.description"
|
||||
:value="entity.sector?.description"
|
||||
/>
|
||||
<VnLv :label="t('parking.row')" :value="parking.row" />
|
||||
<VnLv :label="t('parking.column')" :value="parking.column" />
|
||||
<VnLv :label="t('parking.row')" :value="entity.row" />
|
||||
<VnLv :label="t('parking.column')" :value="entity.column" />
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
function navigate(id) {
|
||||
router.push({ path: `/agency/${id}` });
|
||||
}
|
||||
const exprBuilder = (param, value) => {
|
||||
if (!value) return;
|
||||
if (param !== 'search') return;
|
||||
if (!isNaN(value)) return { id: value };
|
||||
|
||||
return { name: { like: `%${value}%` } };
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.name'),
|
||||
name: 'name',
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('isOwn'),
|
||||
name: 'isOwn',
|
||||
component: 'checkbox',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('isAnyVolumeAllowed'),
|
||||
name: 'isAnyVolumeAllowed',
|
||||
component: 'checkbox',
|
||||
cardVisible: true,
|
||||
disable: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: '',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('Client ticket list'),
|
||||
icon: 'preview',
|
||||
action: (row) => navigate(row.id),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
:info="t('You can search by name')"
|
||||
:label="t('Search agency')"
|
||||
data-key="AgencyList"
|
||||
:expr-builder="exprBuilder"
|
||||
/>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="AgencyList"
|
||||
url="Agencies"
|
||||
order="name"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
</i18n>
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import AgencyDescriptor from 'pages/Agency/Card/AgencyDescriptor.vue';
|
||||
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
</script>
|
||||
<template>
|
|
@ -18,12 +18,10 @@ const entityId = computed(() => $props.id || useRoute().params.id);
|
|||
<template #header="{ entity: agency }">{{ agency.name }}</template>
|
||||
<template #body="{ entity: agency }">
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="`#/agency/${entityId}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnTitle
|
||||
:url="`#/agency/${entityId}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
<VnLv :label="t('globals.name')" :value="agency.name" />
|
||||
<QCheckbox
|
||||
:label="t('agency.isOwn')"
|
|
@ -74,8 +74,9 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
:filter="filter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
data-key="Routes"
|
||||
data-key="routeData"
|
||||
@on-fetch="setData"
|
||||
:summary="$attrs"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('Date')" :value="toDate(entity?.created)" />
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
|
||||
import RouteSummary from './RouteSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -10,6 +11,6 @@ const $props = defineProps({
|
|||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<RouteDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<RouteDescriptor v-if="$props.id" :id="$props.id" :summary="RouteSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -9,7 +9,6 @@ const { t } = useI18n();
|
|||
data-key="RouteList"
|
||||
:label="t('Search route')"
|
||||
:info="t('You can search by route reference')"
|
||||
custom-route-redirect-name="RouteList"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ const warehouses = ref();
|
|||
es:
|
||||
params:
|
||||
cmrFk: Id cmr
|
||||
hasCmrDms: Adjuntado en gestdoc
|
||||
hasCmrDms: Gestdoc
|
||||
ticketFk: Id ticket
|
||||
country: País
|
||||
clientFk: Id cliente
|
||||
|
|
|
@ -12,6 +12,8 @@ import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy
|
|||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import { useStateStore } from 'src/stores/useStateStore';
|
||||
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { getTokenMultimedia } = useSession();
|
||||
const token = getTokenMultimedia();
|
||||
|
@ -107,88 +109,15 @@ function downloadPdfs() {
|
|||
}
|
||||
</script>
|
||||
<template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CmrFilter data-key="CmrList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<div class="column items-center">
|
||||
<div class="list">
|
||||
<VnPaginate data-key="CmrList" :url="`Routes/cmrs`" order="cmrFk DESC">
|
||||
<template #body="{ rows }">
|
||||
<QTable
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:dense="$q.screen.lt.md"
|
||||
row-key="cmrFk"
|
||||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:grid="$q.screen.lt.md"
|
||||
auto-load
|
||||
>
|
||||
<template #top>
|
||||
<div style="width: 100%; display: table">
|
||||
<div style="float: right; color: lightgray">
|
||||
{{ `${rows.length} ${t('route.cmr.list.results')}` }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #body-cell-hasCmrDms="{ value }">
|
||||
<QTd align="center">
|
||||
<QBadge
|
||||
text-color="black"
|
||||
:id="value ? 'true' : 'false'"
|
||||
:label="
|
||||
value
|
||||
? t('route.cmr.list.true')
|
||||
: t('route.cmr.list.false')
|
||||
"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-ticketFk="{ value }">
|
||||
<QTd align="right" class="text-primary">
|
||||
<span class="text-primary link">{{ value }}</span>
|
||||
<TicketDescriptorProxy :id="value" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-clientFk="{ value }">
|
||||
<QTd align="right" class="text-primary">
|
||||
<span class="text-primary link">{{ value }}</span>
|
||||
<CustomerDescriptorProxy :id="value" />
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-warehouseFk="{ value }">
|
||||
<QTd align="center">
|
||||
{{ warehouses.find(({ id }) => id === value)?.name }}
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-icons="{ value }">
|
||||
<QTd align="center">
|
||||
<a :href="getCmrUrl(value)" target="_blank">
|
||||
<QIcon
|
||||
name="visibility"
|
||||
color="primary"
|
||||
size="md"
|
||||
class="q-mr-sm q-ml-sm"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ t('route.cmr.list.viewCmr') }}
|
||||
</QTooltip>
|
||||
</a>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<QBtn @click="downloadPdfs" fab icon="cloud_download" color="primary" />
|
||||
<QTooltip>
|
||||
{{ t('route.cmr.list.downloadCmrs') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</div>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="CmrList"
|
||||
url="Routes/cmrs"
|
||||
order="cmrFk DESC"
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
|
|
|
@ -1,29 +1,32 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { dashIfEmpty, toHour } from 'src/filters';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useValidator } from 'composables/useValidator';
|
||||
import { useSession } from 'composables/useSession';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import axios from 'axios';
|
||||
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue';
|
||||
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||
import RouteListTicketsDialog from 'pages/Route/Card/RouteListTicketsDialog.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue';
|
||||
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { useStateStore } from 'src/stores/useStateStore';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { validate } = useValidator();
|
||||
|
@ -40,90 +43,100 @@ const allColumnNames = ref([]);
|
|||
const confirmationDialog = ref(false);
|
||||
const startingDate = ref(null);
|
||||
const refreshKey = ref(0);
|
||||
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
const columns = computed(() => [
|
||||
{
|
||||
name: 'Id',
|
||||
label: t('Id'),
|
||||
field: (row) => row.id,
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
columnFilter: {
|
||||
name: 'search',
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'worker',
|
||||
label: t('Worker'),
|
||||
field: (row) => row.workerUserName,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'payrollComponents',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'agency',
|
||||
label: t('Agency'),
|
||||
field: (row) => row.agencyName,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
isTitle: true,
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
name: 'vehicle',
|
||||
label: t('Vehicle'),
|
||||
field: (row) => row.vehiclePlateNumber,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
name: 'date',
|
||||
label: t('Date'),
|
||||
field: (row) => row.created,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
name: 'volume',
|
||||
label: 'm³',
|
||||
field: (row) => dashIfEmpty(row.m3),
|
||||
sortable: true,
|
||||
align: 'center',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
label: t('Description'),
|
||||
field: (row) => row.description,
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
isTitle: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
name: 'started',
|
||||
label: t('hourStarted'),
|
||||
field: (row) => toHour(row.started),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'finished',
|
||||
label: t('hourFinished'),
|
||||
field: (row) => toHour(row.finished),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'isServed',
|
||||
label: t('Served'),
|
||||
field: (row) => Boolean(row.isOk),
|
||||
sortable: true,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
label: '',
|
||||
sortable: false,
|
||||
align: 'right',
|
||||
label: 'asdasd',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('Client ticket list'),
|
||||
icon: 'preview',
|
||||
action: (row) => navigate(row.id),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
const arrayData = useArrayData('EntryLatestBuys', {
|
||||
url: 'Buys/latestBuysFilter',
|
||||
order: ['itemFk DESC'],
|
||||
});
|
||||
function navigate(id) {
|
||||
router.push({ path: `/route/${id}` });
|
||||
}
|
||||
|
||||
const updateRoute = async (route) => {
|
||||
try {
|
||||
|
@ -181,20 +194,10 @@ const openTicketsDialog = (id) => {
|
|||
})
|
||||
.onOk(() => refreshKey.value++);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
allColumnNames.value = columns.value.map((col) => col.name);
|
||||
await arrayData.fetch({ append: false });
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RouteSearchbar />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<RouteFilter data-key="RouteList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QDialog v-model="confirmationDialog">
|
||||
<QCard style="min-width: 350px">
|
||||
<QCardSection>
|
||||
|
@ -227,256 +230,53 @@ onMounted(async () => {
|
|||
/>
|
||||
<FetchData url="AgencyModes" @on-fetch="(data) => (agencyList = data)" auto-load />
|
||||
<FetchData url="Vehicles" @on-fetch="(data) => (vehicleList = data)" auto-load />
|
||||
<QPage class="column items-center">
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<TableVisibleColumns
|
||||
class="LeftIcon"
|
||||
:all-columns="allColumnNames"
|
||||
table-code="routesList"
|
||||
labels-traductions-path="route.columnLabels"
|
||||
@on-config-saved="visibleColumns = [...$event]"
|
||||
/>
|
||||
</template>
|
||||
<template #st-actions>
|
||||
<QBtn
|
||||
icon="vn:clone"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="confirmationDialog = true"
|
||||
>
|
||||
<QTooltip>{{ t('Clone Selected Routes') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="cloud_download"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="showRouteReport"
|
||||
>
|
||||
<QTooltip>{{ t('Download selected routes as PDF') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="check"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="markAsServed()"
|
||||
>
|
||||
<QTooltip>{{ t('Mark as served') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<div class="route-list">
|
||||
<VnPaginate
|
||||
:key="refreshKey"
|
||||
data-key="RouteList"
|
||||
url="Routes/filter"
|
||||
:order="['created ASC', 'started ASC', 'id ASC']"
|
||||
:limit="20"
|
||||
<VnSubToolbar />
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="RouteList"
|
||||
url="Routes/filter"
|
||||
:columns="columns"
|
||||
:right-search="true"
|
||||
default-mode="table"
|
||||
:is-editable="true"
|
||||
:create="{
|
||||
urlCreate: 'Routes',
|
||||
title: t('Create route'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
}"
|
||||
save-url="routes"
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #moreBeforeActions>
|
||||
<QBtn
|
||||
icon="vn:clone"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="confirmationDialog = true"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<div class="q-pa-md route-table">
|
||||
<QTable
|
||||
v-model:selected="selectedRows"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
flat
|
||||
row-key="id"
|
||||
selection="multiple"
|
||||
:rows-per-page-options="[0]"
|
||||
:visible-columns="visibleColumns"
|
||||
hide-pagination
|
||||
:no-data-label="t('globals.noResults')"
|
||||
style="max-height: 82vh"
|
||||
>
|
||||
<template #body-cell-worker="{ row }">
|
||||
<QTd class="table-input-cell">
|
||||
<VnSelect
|
||||
:label="t('Worker')"
|
||||
v-model="row.workerFk"
|
||||
:options="workers"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
hide-selected
|
||||
dense
|
||||
:emit-value="false"
|
||||
:rules="validate('Route.workerFk')"
|
||||
:is-clearable="false"
|
||||
@update:model-value="updateRoute(row)"
|
||||
>
|
||||
<template #option="{ opt, itemProps }">
|
||||
<QItem
|
||||
v-bind="itemProps"
|
||||
class="q-pa-xs row items-center"
|
||||
>
|
||||
<QItemSection
|
||||
class="col-9 justify-center"
|
||||
>
|
||||
<span>{{ opt.name }}</span>
|
||||
<span class="text-grey">{{
|
||||
opt.nickname
|
||||
}}</span>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-agency="{ row }">
|
||||
<QTd class="table-input-cell">
|
||||
<VnSelect
|
||||
:label="t('Agency')"
|
||||
v-model="row.agencyModeFk"
|
||||
:options="agencyList"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
hide-selected
|
||||
dense
|
||||
:emit-value="false"
|
||||
:rules="validate('route.agencyFk')"
|
||||
:is-clearable="false"
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-vehicle="{ row }">
|
||||
<QTd class="table-input-cell small-column">
|
||||
<VnSelect
|
||||
:label="t('Vehicle')"
|
||||
v-model="row.vehicleFk"
|
||||
:options="vehicleList"
|
||||
option-value="id"
|
||||
option-label="numberPlate"
|
||||
hide-selected
|
||||
dense
|
||||
:emit-value="false"
|
||||
:rules="validate('route.vehicleFk')"
|
||||
:is-clearable="false"
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-date="{ row }">
|
||||
<QTd class="table-input-cell small-column">
|
||||
<VnInputDate
|
||||
v-model="row.created"
|
||||
hide-bottom-space
|
||||
dense
|
||||
:label="t('Date')"
|
||||
:rules="validate('route.created')"
|
||||
:is-clearable="false"
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-description="{ row }">
|
||||
<QTd class="table-input-cell">
|
||||
<VnInput
|
||||
v-model="row.description"
|
||||
:label="t('Description')"
|
||||
:rules="validate('route.description')"
|
||||
:is-clearable="false"
|
||||
dense
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-started="{ row }">
|
||||
<QTd class="table-input-cell small-column">
|
||||
<VnInputTime
|
||||
v-model="row.started"
|
||||
:label="t('hourStarted')"
|
||||
:rules="validate('route.started')"
|
||||
:is-clearable="false"
|
||||
hide-bottom-space
|
||||
dense
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-finished="{ row }">
|
||||
<QTd class="table-input-cell small-column">
|
||||
<VnInputTime
|
||||
v-model="row.finished"
|
||||
autofocus
|
||||
:label="t('hourFinished')"
|
||||
:rules="validate('route.finished')"
|
||||
:is-clearable="false"
|
||||
hide-bottom-space
|
||||
dense
|
||||
@update:model-value="updateRoute(row)"
|
||||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-isServed="props">
|
||||
<QTd class="table-input-cell small-column">
|
||||
<QCheckbox v-model="props.value" disable>
|
||||
<QTooltip>
|
||||
{{
|
||||
props.value
|
||||
? t('Route is closed')
|
||||
: t('Route is not served')
|
||||
}}
|
||||
</QTooltip>
|
||||
</QCheckbox>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-actions="props">
|
||||
<QTd :props="props">
|
||||
<div class="flex items-center no-wrap table-actions">
|
||||
<QIcon
|
||||
name="vn:ticketAdd"
|
||||
size="sm"
|
||||
color="primary"
|
||||
class="cursor-pointer"
|
||||
@click="openTicketsDialog(props?.row?.id)"
|
||||
>
|
||||
<QTooltip>{{ t('Add ticket') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
name="preview"
|
||||
size="sm"
|
||||
color="primary"
|
||||
@click="
|
||||
viewSummary(props?.row?.id, RouteSummary)
|
||||
"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<QTooltip>{{ t('Preview') }}</QTooltip>
|
||||
</QIcon>
|
||||
<RouterLink
|
||||
:to="{
|
||||
name: 'RouteSummary',
|
||||
params: { id: props?.row?.id },
|
||||
}"
|
||||
>
|
||||
<QIcon
|
||||
name="vn:eye"
|
||||
size="xs"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('Summary') }}</QTooltip>
|
||||
</QIcon>
|
||||
</RouterLink>
|
||||
</div>
|
||||
</QTd>
|
||||
</template>
|
||||
</QTable>
|
||||
</div>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<RouterLink :to="{ name: 'RouteCreate' }">
|
||||
<QBtn fab icon="add" color="primary" />
|
||||
<QTooltip>
|
||||
{{ t('newRoute') }}
|
||||
</QTooltip>
|
||||
</RouterLink>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
<QTooltip>{{ t('Clone Selected Routes') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="cloud_download"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="showRouteReport"
|
||||
>
|
||||
<QTooltip>{{ t('Download selected routes as PDF') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="check"
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
:disable="!selectedRows?.length"
|
||||
@click="markAsServed()"
|
||||
>
|
||||
<QTooltip>{{ t('Mark as served') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import LeftMenu from 'src/components/LeftMenu.vue';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
const stateStore = useStateStore();
|
||||
onMounted(() => (stateStore.leftDrawer = false));
|
||||
</script>
|
||||
|
|
|
@ -51,6 +51,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
:subtitle="data.subtitle"
|
||||
data-key="Shelvings"
|
||||
@on-fetch="setData"
|
||||
:summary="$attrs"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('shelving.summary.code')" :value="entity.code" />
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import ShelvingDescriptor from "pages/Shelving/Card/ShelvingDescriptor.vue";
|
||||
import ShelvingDescriptor from 'pages/Shelving/Card/ShelvingDescriptor.vue';
|
||||
import ShelvingSummary from './ShelvingSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -10,6 +11,6 @@ const $props = defineProps({
|
|||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<ShelvingDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<ShelvingDescriptor v-if="$props.id" :id="$props.id" :summary="ShelvingSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -51,7 +51,7 @@ const filter = {
|
|||
class="header header-link"
|
||||
:to="{ name: 'ShelvingBasicData', params: { id: entityId } }"
|
||||
>
|
||||
{{ t('shelving.pageTitles.basicData') }}
|
||||
{{ t('globals.pageTitles.basicData') }}
|
||||
<QIcon name="open_in_new" />
|
||||
</RouterLink>
|
||||
<VnLv :label="t('shelving.summary.code')" :value="entity.code" />
|
||||
|
|
|
@ -112,22 +112,6 @@ const getEntryQueryParams = (supplier) => {
|
|||
data-key="supplier"
|
||||
:summary="$props.summary"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
icon="vn:supplier"
|
||||
color="white"
|
||||
class="link"
|
||||
:to="{ name: 'SupplierList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to module index') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('supplier.summary.taxNumber')" :value="entity.nif" />
|
||||
<VnLv label="Alias" :value="entity.nickname" />
|
||||
|
|
|
@ -8,8 +8,6 @@ import { useRole } from 'src/composables/useRole';
|
|||
import { dashIfEmpty } from 'src/filters';
|
||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||
|
||||
onUpdated(() => summaryRef.value.fetch());
|
||||
|
||||
const route = useRoute();
|
||||
const roleState = useRole();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,26 +1,81 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import SupplierSummary from './Card/SupplierSummary.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import RightMenu from 'components/common/RightMenu.vue';
|
||||
import SupplierListFilter from './SupplierListFilter.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref();
|
||||
|
||||
function navigate(id) {
|
||||
router.push({ path: `/supplier/${id}` });
|
||||
}
|
||||
|
||||
const redirectToCreateView = () => {
|
||||
router.push({ name: 'SupplierCreate' });
|
||||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.id'),
|
||||
name: 'id',
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.name'),
|
||||
name: 'socialName',
|
||||
create: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.nif'),
|
||||
name: 'nif',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.nickname'),
|
||||
name: 'alias',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.account'),
|
||||
name: 'account',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.payMethod'),
|
||||
name: 'payMethod',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'payMethods',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('supplier.list.tableVisibleColumns.payDay'),
|
||||
name: 'payDat',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -30,56 +85,25 @@ const redirectToCreateView = () => {
|
|||
<SupplierListFilter data-key="SuppliersList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate data-key="SuppliersList" url="Suppliers/filter">
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:title="row.socialName"
|
||||
:id="row.id"
|
||||
@click="navigate(row.id)"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv label="NIF/CIF" :value="row.nif" />
|
||||
<VnLv label="Alias" :value="row.alias" />
|
||||
<VnLv
|
||||
:label="t('supplier.list.payMethod')"
|
||||
:value="row.payMethod"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.payDeadline')"
|
||||
:title-label="t('invoiceOut.list.created')"
|
||||
:value="row.payDem"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.payDay')"
|
||||
:value="row.payDay"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('supplier.list.account')"
|
||||
:value="row.account"
|
||||
/>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, SupplierSummary)"
|
||||
color="primary"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<QBtn fab icon="add" color="primary" @click="redirectToCreateView()" />
|
||||
<QTooltip>
|
||||
{{ t('supplier.list.newSupplier') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="SuppliersList"
|
||||
url="Suppliers/filter"
|
||||
save-url="Suppliers/crud"
|
||||
redirect="supplier"
|
||||
:create="{
|
||||
urlCreate: 'Suppliers/newSupplier',
|
||||
title: t('Create Supplier'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {},
|
||||
}"
|
||||
order="id ASC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -70,8 +70,6 @@ const filter = {
|
|||
};
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
const setData = (entity) =>
|
||||
(data.value = useCardDescription(entity.client?.name, entity.id));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -82,7 +80,6 @@ const setData = (entity) =>
|
|||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
data-key="ticketData"
|
||||
@on-fetch="setData"
|
||||
>
|
||||
<template #menu="{ entity }">
|
||||
<TicketDescriptorMenu :ticket="entity" />
|
||||
|
@ -153,4 +150,5 @@ const setData = (entity) =>
|
|||
<i18n>
|
||||
es:
|
||||
This ticket is deleted: Este ticket está eliminado
|
||||
Go to module index: Ir al índice del modulo
|
||||
</i18n>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import TicketDescriptor from './TicketDescriptor.vue';
|
||||
import TicketSummary from './TicketSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -10,6 +11,6 @@ const $props = defineProps({
|
|||
</script>
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<TicketDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<TicketDescriptor v-if="$props.id" :id="$props.id" :summary="TicketSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -17,15 +17,6 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const from = Date.vnNew();
|
||||
const to = Date.vnNew();
|
||||
to.setDate(to.getDate() + 1);
|
||||
|
||||
const defaultParams = {
|
||||
from: toDateString(from),
|
||||
to: toDateString(to),
|
||||
};
|
||||
|
||||
const workers = ref();
|
||||
const provinces = ref();
|
||||
const states = ref();
|
||||
|
@ -44,11 +35,7 @@ const warehouses = ref();
|
|||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:params="defaultParams"
|
||||
:search-button="true"
|
||||
>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
|
|
|
@ -26,8 +26,8 @@ const to = Date.vnNew();
|
|||
to.setDate(to.getDate() + 1);
|
||||
|
||||
const userParams = {
|
||||
from: toDateString(from),
|
||||
to: toDateString(to),
|
||||
from: from.toISOString(),
|
||||
to: to.toISOString(),
|
||||
};
|
||||
|
||||
function navigate(id) {
|
||||
|
|
|
@ -33,8 +33,12 @@ const filter = {
|
|||
<template>
|
||||
<VnCard
|
||||
data-key="Travel"
|
||||
:filter="filter"
|
||||
base-url="Travels"
|
||||
search-data-key="TravelList"
|
||||
searchbar-label="Search travel"
|
||||
searchbar-info="You can search by travel id or name"
|
||||
search-url="Travels"
|
||||
:filter="filter"
|
||||
:descriptor="TravelDescriptor"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
|
@ -51,32 +52,22 @@ const filter = {
|
|||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.id));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CardDescriptor
|
||||
module="Travel"
|
||||
:url="`Travels/${entityId}`"
|
||||
title="ref"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
:filter="filter"
|
||||
data-key="Travel"
|
||||
data-key="travelData"
|
||||
:summary="$attrs"
|
||||
@on-fetch="setData"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
icon="local_airport"
|
||||
color="white"
|
||||
class="link"
|
||||
:to="{ name: 'TravelList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to module index') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<TravelDescriptorMenuItems :travel="entity" />
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import TravelDescriptor from './TravelDescriptor.vue';
|
||||
import TravelSummary from './TravelSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -11,6 +12,6 @@ const $props = defineProps({
|
|||
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<TravelDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<TravelDescriptor v-if="$props.id" :id="$props.id" :summary="TravelSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -12,8 +12,6 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
import { toDate, toCurrency } from 'src/filters';
|
||||
import axios from 'axios';
|
||||
|
||||
onUpdated(() => summaryRef.value.fetch());
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
|
@ -49,7 +47,7 @@ const entriesTableColumns = computed(() => {
|
|||
showValue: false,
|
||||
},
|
||||
{
|
||||
label: t('supplier.pageTitles.supplier'),
|
||||
label: t('globals.pageTitles.supplier'),
|
||||
field: 'supplierName',
|
||||
name: 'supplierName',
|
||||
align: 'left',
|
||||
|
@ -248,7 +246,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('travel.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.shipped')" :value="toDate(travel.shipped)" />
|
||||
|
@ -266,7 +264,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('travel.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(travel.landed)" />
|
||||
|
@ -284,7 +282,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QCardSection class="q-pa-none">
|
||||
<VnTitle
|
||||
:url="getLink('basic-data')"
|
||||
:text="t('travel.pageTitles.basicData')"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />
|
||||
|
|
|
@ -140,7 +140,7 @@ const columns = computed(() => [
|
|||
sortable: true,
|
||||
},
|
||||
{
|
||||
label: t('supplier.pageTitles.supplier'),
|
||||
label: t('globals.pageTitles.supplier'),
|
||||
field: 'cargoSupplierNickname',
|
||||
name: 'cargoSupplierNickname',
|
||||
align: 'left',
|
||||
|
|
|
@ -218,7 +218,7 @@ warehouses();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
:label="t('supplier.pageTitles.supplier')"
|
||||
:label="t('globals.pageTitles.supplier')"
|
||||
v-model="params.cargoSupplierFk"
|
||||
:options="suppliersOptions"
|
||||
option-value="id"
|
||||
|
|
|
@ -2,31 +2,27 @@
|
|||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import TravelSummary from './Card/TravelSummary.vue';
|
||||
import TravelFilter from './TravelFilter.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters/index';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
import { computed } from 'vue';
|
||||
import TravelSummary from './Card/TravelSummary.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { dashIfEmpty, toDate } from 'src/filters';
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
||||
const warehouses = ref([]);
|
||||
|
||||
const navigateToTravelId = (id) => {
|
||||
router.push({ path: `/travel/${id}` });
|
||||
};
|
||||
|
||||
const route = useRoute();
|
||||
const tableRef = ref();
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
const cloneTravel = (travelData) => {
|
||||
const stringifiedTravelData = JSON.stringify(travelData);
|
||||
redirectToCreateView(stringifiedTravelData);
|
||||
|
@ -40,125 +36,170 @@ const redirectCreateEntryView = (travelData) => {
|
|||
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
||||
};
|
||||
|
||||
const getWarehouseName = (id) => {
|
||||
return warehouses.value.find((warehouse) => warehouse.id === id).name;
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('travel.travelList.tableVisibleColumns.id'),
|
||||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'ref',
|
||||
label: t('travel.travelList.tableVisibleColumns.ref'),
|
||||
field: 'ref',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'agencyModeFk',
|
||||
label: t('travel.travelList.tableVisibleColumns.agency'),
|
||||
field: 'agencyModeFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'agencyModes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'shipped',
|
||||
label: t('travel.travelList.tableVisibleColumns.shipped'),
|
||||
field: 'shipped',
|
||||
component: 'date',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'landed',
|
||||
label: t('travel.travelList.tableVisibleColumns.landed'),
|
||||
field: 'landed',
|
||||
component: 'date',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landed)),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'warehouseInFk',
|
||||
label: t('travel.travelList.tableVisibleColumns.warehouseIn'),
|
||||
field: 'warehouseInFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'warehouseOutFk',
|
||||
label: t('travel.travelList.tableVisibleColumns.warehouseOut'),
|
||||
field: 'warehouseOutFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'totalEntries',
|
||||
label: t('travel.travelList.tableVisibleColumns.totalEntries'),
|
||||
field: 'totalEntries',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: '',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('Clone'),
|
||||
icon: 'vn:clone',
|
||||
action: cloneTravel,
|
||||
isPrimary: true,
|
||||
},
|
||||
{
|
||||
title: t('Add entry'),
|
||||
icon: 'contact_support',
|
||||
action: redirectCreateEntryView,
|
||||
},
|
||||
{
|
||||
title: t('View Summary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, TravelSummary),
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
:filter="{ fields: ['id', 'name'] }"
|
||||
order="name"
|
||||
@on-fetch="(data) => (warehouses = data)"
|
||||
auto-load
|
||||
<VnSearchbar
|
||||
:info="t('You can search by travel id or name')"
|
||||
:label="t('Search travel')"
|
||||
data-key="TravelList"
|
||||
/>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="TravelList"
|
||||
url="Travels/filter"
|
||||
:create="{
|
||||
urlCreate: 'Travels',
|
||||
title: t('Create Travels'),
|
||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||
formInitialData: {
|
||||
editorFk: entityId,
|
||||
},
|
||||
}"
|
||||
order="landed DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
redirect="travel"
|
||||
:right-search="false"
|
||||
:is-editable="false"
|
||||
:use-model="true"
|
||||
/>
|
||||
<VnSearchbar data-key="TravelList" :limit="20" :label="t('searchByIdOrReference')" />
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<TravelFilter data-key="TravelList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="TravelList"
|
||||
url="Travels/filter"
|
||||
auto-load
|
||||
order="shipped DESC, landed DESC"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
v-for="row of rows"
|
||||
:key="row.id"
|
||||
:title="row.ref"
|
||||
:id="row.id"
|
||||
@click="navigateToTravelId(row.id)"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv
|
||||
:label="t('globals.agency')"
|
||||
:value="row.agencyModeName"
|
||||
/>
|
||||
<VnLv
|
||||
v-if="warehouses.length > 0"
|
||||
:label="t('globals.wareHouseOut')"
|
||||
:value="getWarehouseName(row.warehouseOutFk)"
|
||||
/>
|
||||
<VnLv :label="t('globals.shipped')">
|
||||
<template #value>
|
||||
<QBadge
|
||||
text-color="black"
|
||||
v-if="getDateQBadgeColor(row.shipped)"
|
||||
:color="getDateQBadgeColor(row.shipped)"
|
||||
class="q-ma-none"
|
||||
dense
|
||||
style="font-size: 14px"
|
||||
>
|
||||
{{ toDate(row.shipped) }}
|
||||
</QBadge>
|
||||
<span v-else>{{ toDate(row.shipped) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv :label="t('globals.landed')">
|
||||
<template #value>
|
||||
<QBadge
|
||||
text-color="black"
|
||||
v-if="getDateQBadgeColor(row.landed)"
|
||||
:color="getDateQBadgeColor(row.landed)"
|
||||
class="q-ma-none"
|
||||
dense
|
||||
style="font-size: 14px"
|
||||
>
|
||||
{{ toDate(row.landed) }}
|
||||
</QBadge>
|
||||
<span v-else>{{ toDate(row.landed) }}</span>
|
||||
</template>
|
||||
</VnLv>
|
||||
<VnLv
|
||||
v-if="warehouses.length > 0"
|
||||
:label="t('globals.wareHouseIn')"
|
||||
:value="getWarehouseName(row.warehouseInFk)"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('globals.totalEntries')"
|
||||
:value="row.totalEntries"
|
||||
/>
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.clone')"
|
||||
@click.stop="cloneTravel(row)"
|
||||
outline
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('addEntry')"
|
||||
@click.stop="redirectCreateEntryView(row)"
|
||||
outline
|
||||
style="margin-top: 15px"
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, TravelSummary)"
|
||||
color="primary"
|
||||
style="margin-top: 15px"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[20, 20]">
|
||||
<QBtn fab icon="add" color="primary" @click="redirectToCreateView()" />
|
||||
<QTooltip>
|
||||
{{ t('supplier.list.newSupplier') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
|
@ -169,4 +210,6 @@ en:
|
|||
es:
|
||||
addEntry: Añadir entrada
|
||||
searchByIdOrReference: Buscar por ID o por referencia
|
||||
You can search by travel id or name: Buscar por envio por id o nombre
|
||||
Search travel: Buscar envio
|
||||
</i18n>
|
||||
|
|
|
@ -17,10 +17,6 @@ const $props = defineProps({
|
|||
required: false,
|
||||
default: null,
|
||||
},
|
||||
summary: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
|
@ -115,7 +111,7 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
|||
:filter="filter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
:summary="$props.summary"
|
||||
:summary="$attrs"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
worker = data;
|
||||
|
|
|
@ -74,7 +74,7 @@ const agencyOptions = ref([]);
|
|||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
<VnInputTime v-model="data.hour" :label="t('Closing')" clearable />
|
||||
<VnInputTime v-model="data.hour" :label="t('Closing')" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
|
|
@ -38,7 +38,6 @@ const entityId = computed(() => {
|
|||
});
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
|
||||
const setData = (entity) => {
|
||||
data.value = useCardDescription(entity.ref, entity.id);
|
||||
};
|
||||
|
@ -53,23 +52,8 @@ const setData = (entity) => {
|
|||
:filter="filter"
|
||||
@on-fetch="setData"
|
||||
data-key="zoneData"
|
||||
:summary="$attrs"
|
||||
>
|
||||
<template #header-extra-action>
|
||||
<QBtn
|
||||
round
|
||||
flat
|
||||
dense
|
||||
size="md"
|
||||
icon="vn:zone"
|
||||
color="white"
|
||||
class="link"
|
||||
:to="{ name: 'ZoneList' }"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Summary') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #menu="{ entity }">
|
||||
<ZoneDescriptorMenuItems :zone="entity" />
|
||||
</template>
|
||||
|
@ -82,3 +66,8 @@ const setData = (entity) => {
|
|||
</template>
|
||||
</CardDescriptor>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Go to module index: Ir al índice del módulo
|
||||
</i18n>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import ZoneDescriptor from './ZoneDescriptor.vue';
|
||||
import ZoneSummary from './ZoneSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -11,6 +12,6 @@ const $props = defineProps({
|
|||
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<ZoneDescriptor v-if="$props.id" :id="$props.id" />
|
||||
<ZoneDescriptor v-if="$props.id" :id="$props.id" :summary="ZoneSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
||||
|
|
|
@ -11,7 +11,6 @@ import { useState } from 'src/composables/useState';
|
|||
import { useSession } from 'src/composables/useSession';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
import { useUserConfig } from 'src/composables/useUserConfig';
|
||||
import { toLowerCamel } from 'src/filters';
|
||||
import { useTokenConfig } from 'src/composables/useTokenConfig';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
|
||||
|
@ -79,13 +78,11 @@ export default route(function (/* { store, ssrContext } */) {
|
|||
let title = t(`login.title`);
|
||||
|
||||
const matches = to.matched;
|
||||
let moduleName;
|
||||
if (matches && matches.length > 1) {
|
||||
const module = matches[1];
|
||||
const moduleTitle = module.meta && module.meta.title;
|
||||
moduleName = toLowerCamel(module.name);
|
||||
if (moduleTitle) {
|
||||
title = t(`${moduleName}.pageTitles.${moduleTitle}`);
|
||||
title = t(`globals.pageTitles.${moduleTitle}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +91,7 @@ export default route(function (/* { store, ssrContext } */) {
|
|||
if (childPageTitle && matches.length > 2) {
|
||||
if (title != '') title += ': ';
|
||||
|
||||
const moduleLocale = `${moduleName}.pageTitles.${childPageTitle}`;
|
||||
const moduleLocale = `globals.pageTitles.${childPageTitle}`;
|
||||
const pageTitle = te(moduleLocale)
|
||||
? t(moduleLocale)
|
||||
: t(`globals.pageTitles.${childPageTitle}`);
|
||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
|||
{
|
||||
path: '/agency/:id',
|
||||
name: 'AgencyCard',
|
||||
component: () => import('src/pages/Agency/Card/AgencyCard.vue'),
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyCard.vue'),
|
||||
redirect: { name: 'AgencySummary' },
|
||||
children: [
|
||||
{
|
||||
|
@ -28,7 +28,8 @@ export default {
|
|||
title: 'summary',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Agency/Card/AgencySummary.vue'),
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/Card/AgencySummary.vue'),
|
||||
},
|
||||
{
|
||||
name: 'AgencyBasicData',
|
||||
|
@ -37,7 +38,8 @@ export default {
|
|||
title: 'basicData',
|
||||
icon: 'vn:settings',
|
||||
},
|
||||
component: () => import('pages/Agency/Card/AgencyBasicData.vue'),
|
||||
component: () =>
|
||||
import('pages/Route/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
|
@ -52,7 +54,9 @@ export default {
|
|||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Agency/Card/AgencyWorkcenter.vue'),
|
||||
import(
|
||||
'src/pages/Route/Agency/Card/AgencyWorkcenter.vue'
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -69,7 +73,7 @@ export default {
|
|||
title: 'modes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Agency/Card/AgencyModes.vue'),
|
||||
import('src/pages/Route/Agency/Card/AgencyModes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -80,7 +84,7 @@ export default {
|
|||
title: 'log',
|
||||
icon: 'history',
|
||||
},
|
||||
component: () => import('src/pages/Agency/Card/AgencyLog.vue'),
|
||||
component: () => import('src/pages/Route/Agency/Card/AgencyLog.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
|||
component: RouterView,
|
||||
redirect: { name: 'EntryMain' },
|
||||
menus: {
|
||||
main: ['EntryList', 'EntryLatestBuys'],
|
||||
main: ['EntryList', 'MyEntries', 'EntryLatestBuys'],
|
||||
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
||||
},
|
||||
children: [
|
||||
|
@ -30,6 +30,15 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Entry/EntryList.vue'),
|
||||
},
|
||||
{
|
||||
path: 'my',
|
||||
name: 'MyEntries',
|
||||
meta: {
|
||||
title: 'labeler',
|
||||
icon: 'sell',
|
||||
},
|
||||
component: () => import('src/pages/Entry/MyEntries.vue'),
|
||||
},
|
||||
{
|
||||
path: 'create',
|
||||
name: 'EntryCreate',
|
||||
|
|
|
@ -201,15 +201,6 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Item/Card/ItemLog.vue'),
|
||||
},
|
||||
{
|
||||
path: 'botanical',
|
||||
name: 'ItemBotanical',
|
||||
meta: {
|
||||
title: 'botanical',
|
||||
icon: 'vn:botanical',
|
||||
},
|
||||
component: () => import('src/pages/Item/Card/ItemBotanical.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -86,7 +86,8 @@ export default {
|
|||
title: 'agencyList',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Agency/AgencyList.vue'),
|
||||
component: () =>
|
||||
import('src/pages/Route/Agency/AgencyList.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue