Merge branch 'dev' into 6321_negative_tickets
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
fea760d2f9
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.40.0",
|
"version": "24.42.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers';
|
||||||
import qFormMixin from './qformMixin';
|
import qFormMixin from './qformMixin';
|
||||||
import mainShortcutMixin from './mainShortcutMixin';
|
import mainShortcutMixin from './mainShortcutMixin';
|
||||||
import keyShortcut from './keyShortcut';
|
import keyShortcut from './keyShortcut';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
export default boot(({ app }) => {
|
export default boot(({ app }) => {
|
||||||
app.mixin(qFormMixin);
|
app.mixin(qFormMixin);
|
||||||
app.mixin(mainShortcutMixin);
|
app.mixin(mainShortcutMixin);
|
||||||
app.directive('shortcut', keyShortcut);
|
app.directive('shortcut', keyShortcut);
|
||||||
|
app.config.errorHandler = function (err) {
|
||||||
|
console.error(err);
|
||||||
|
notify('globals.error', 'negative', 'error');
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -297,11 +297,12 @@ const removeTag = (index, params, search) => {
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mt-lg">
|
<QItem class="q-mt-lg">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="fill-icon-on-hover q-px-xs"
|
class="fill-icon-on-hover q-px-xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="sm"
|
|
||||||
@click="tagValues.push({})"
|
@click="tagValues.push({})"
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -69,10 +69,7 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
disableInfiniteScroll: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
hasSubToolbar: {
|
hasSubToolbar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -150,7 +147,7 @@ onMounted(() => {
|
||||||
quasar.platform.is.mobile && !$props.disableOption?.card
|
quasar.platform.is.mobile && !$props.disableOption?.card
|
||||||
? CARD_MODE
|
? CARD_MODE
|
||||||
: $props.defaultMode;
|
: $props.defaultMode;
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = quasar.screen.gt.xs;
|
||||||
columnsVisibilitySkipped.value = [
|
columnsVisibilitySkipped.value = [
|
||||||
...splittedColumns.value.columns
|
...splittedColumns.value.columns
|
||||||
.filter((c) => c.visible == false)
|
.filter((c) => c.visible == false)
|
||||||
|
@ -305,6 +302,7 @@ defineExpose({
|
||||||
redirect: redirectFn,
|
redirect: redirectFn,
|
||||||
selected,
|
selected,
|
||||||
CrudModelRef,
|
CrudModelRef,
|
||||||
|
params,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleOnDataSaved(_) {
|
function handleOnDataSaved(_) {
|
||||||
|
@ -372,7 +370,7 @@ function handleOnDataSaved(_) {
|
||||||
ref="CrudModelRef"
|
ref="CrudModelRef"
|
||||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||||
:search-url="searchUrl"
|
:search-url="searchUrl"
|
||||||
:disable-infinite-scroll="$attrs['disableInfiniteScroll']"
|
:disable-infinite-scroll="isTableMode"
|
||||||
@save-changes="reload"
|
@save-changes="reload"
|
||||||
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
||||||
:auto-load="hasParams || $attrs['auto-load']"
|
:auto-load="hasParams || $attrs['auto-load']"
|
||||||
|
@ -392,7 +390,7 @@ function handleOnDataSaved(_) {
|
||||||
card-container-class="grid-three"
|
card-container-class="grid-three"
|
||||||
flat
|
flat
|
||||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||||
virtual-scroll
|
:virtual-scroll="!isTableMode"
|
||||||
@virtual-scroll="
|
@virtual-scroll="
|
||||||
(event) =>
|
(event) =>
|
||||||
event.index > rows.length - 2 &&
|
event.index > rows.length - 2 &&
|
||||||
|
@ -428,7 +426,7 @@ function handleOnDataSaved(_) {
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="$props.rightSearch"
|
v-if="$props.rightSearch"
|
||||||
icon="filter_alt"
|
icon="filter_alt"
|
||||||
class="bg-vn-section-color q-ml-md"
|
class="bg-vn-section-color q-ml-sm"
|
||||||
dense
|
dense
|
||||||
@click="stateStore.toggleRightDrawer()"
|
@click="stateStore.toggleRightDrawer()"
|
||||||
/>
|
/>
|
||||||
|
@ -515,8 +513,12 @@ function handleOnDataSaved(_) {
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="btn.title"
|
:title="btn.title"
|
||||||
:icon="btn.icon"
|
:icon="btn.icon"
|
||||||
class="q-px-sm text-primary-light"
|
class="q-pa-xs"
|
||||||
flat
|
flat
|
||||||
|
dense
|
||||||
|
:class="
|
||||||
|
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||||
|
"
|
||||||
:style="`visibility: ${
|
:style="`visibility: ${
|
||||||
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
||||||
}`"
|
}`"
|
||||||
|
@ -647,18 +649,10 @@ function handleOnDataSaved(_) {
|
||||||
:key="col?.id"
|
:key="col?.id"
|
||||||
class="text-center"
|
class="text-center"
|
||||||
>
|
>
|
||||||
<div
|
<slot
|
||||||
v-if="col?.summation"
|
:name="`column-footer-${col.name}`"
|
||||||
:class="`text-${col?.align ?? 'left'}`"
|
:class="getColAlign(col)"
|
||||||
class="text-bold q-pa-sm"
|
/>
|
||||||
>
|
|
||||||
{{
|
|
||||||
rows.reduce(
|
|
||||||
(sum, currentRow) => sum + currentRow[col.name],
|
|
||||||
0
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</QTh>
|
</QTh>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
@ -775,10 +769,16 @@ es:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-table th {
|
.q-table {
|
||||||
padding: 0;
|
th {
|
||||||
}
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__top {
|
||||||
|
padding: 12px 0px;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
.vnTable {
|
.vnTable {
|
||||||
thead tr th {
|
thead tr th {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
|
|
@ -135,7 +135,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense>
|
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
|
||||||
<QPopupProxy ref="popupProxyRef">
|
<QPopupProxy ref="popupProxyRef">
|
||||||
<QCard class="column q-pa-md">
|
<QCard class="column q-pa-md">
|
||||||
<QIcon name="info" size="sm" class="info-icon">
|
<QIcon name="info" size="sm" class="info-icon">
|
||||||
|
|
|
@ -400,7 +400,14 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="showFormDialog()" class="fill-icon">
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
@click="showFormDialog()"
|
||||||
|
class="fill-icon"
|
||||||
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Upload file') }}
|
{{ t('Upload file') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -14,11 +14,11 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const modelValue = ref(
|
const modelValue = ref(
|
||||||
props.location
|
props.location
|
||||||
? `${props.location?.postcode} - ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
|
? `${props.location?.postcode}, ${props.location?.city}(${props.location?.province?.name}), ${props.location?.country?.name}`
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
function showLabel(data) {
|
function showLabel(data) {
|
||||||
return `${data.code} - ${data.town}(${data.province}), ${data.country}`;
|
return `${data.code}, ${data.town}(${data.province}), ${data.country}`;
|
||||||
}
|
}
|
||||||
const handleModelValue = (data) => {
|
const handleModelValue = (data) => {
|
||||||
emit('update:model-value', data);
|
emit('update:model-value', data);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import LeftMenu from 'components/LeftMenu.vue';
|
import LeftMenu from 'components/LeftMenu.vue';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -10,7 +11,9 @@ const $props = defineProps({
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
onMounted(
|
||||||
|
() => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false)
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -38,6 +38,10 @@ const $props = defineProps({
|
||||||
type: [Array],
|
type: [Array],
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
exprBuilder: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
isClearable: {
|
isClearable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
@ -183,6 +187,7 @@ async function fetchFilter(val) {
|
||||||
}, {});
|
}, {});
|
||||||
} else defaultWhere = { [key]: getVal(val) };
|
} else defaultWhere = { [key]: getVal(val) };
|
||||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||||
|
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||||
const fetchOptions = { where, include, limit };
|
const fetchOptions = { where, include, limit };
|
||||||
if (fields) fetchOptions.fields = fields;
|
if (fields) fetchOptions.fields = fields;
|
||||||
if (sortBy) fetchOptions.order = sortBy;
|
if (sortBy) fetchOptions.order = sortBy;
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
<script setup>
|
||||||
|
import { onBeforeMount, ref, useAttrs } from 'vue';
|
||||||
|
import axios from 'axios';
|
||||||
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
|
|
||||||
|
const { schema, table, column, translation, defaultOptions } = defineProps({
|
||||||
|
schema: {
|
||||||
|
type: String,
|
||||||
|
default: 'vn',
|
||||||
|
},
|
||||||
|
table: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
translation: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
defaultOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const $attrs = useAttrs();
|
||||||
|
const options = ref([]);
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
options.value = [].concat(defaultOptions);
|
||||||
|
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||||
|
params: { schema, table, column },
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const value of data)
|
||||||
|
options.value.push({
|
||||||
|
[$attrs['option-value'] ?? 'id']: value,
|
||||||
|
[$attrs['option-label'] ?? 'name']: translation ? translation(value) : value,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<VnSelect
|
||||||
|
v-bind="$attrs"
|
||||||
|
:options="options"
|
||||||
|
:key="options.length"
|
||||||
|
:input-debounce="0"
|
||||||
|
/>
|
||||||
|
</template>
|
|
@ -135,9 +135,8 @@ async function fetch(params) {
|
||||||
useArrayData(props.dataKey, params);
|
useArrayData(props.dataKey, params);
|
||||||
arrayData.reset(['filter.skip', 'skip']);
|
arrayData.reset(['filter.skip', 'skip']);
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
if (!store.hasMoreData) {
|
if (!store.hasMoreData) isLoading.value = false;
|
||||||
isLoading.value = false;
|
|
||||||
}
|
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
return store.data;
|
return store.data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import { useSession } from './useSession';
|
import { useSession } from './useSession';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
export function usePrintService() {
|
export function usePrintService() {
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
const { getTokenMultimedia } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
|
|
||||||
function sendEmail(path, params) {
|
function sendEmail(path, params) {
|
||||||
return axios.post(path, params).then(() =>
|
return axios.post(path, params).then(() =>
|
||||||
quasar.notify({
|
quasar.notify({
|
||||||
message: 'Notification sent',
|
message: t('globals.notificationSent'),
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
})
|
})
|
||||||
|
|
|
@ -278,6 +278,7 @@ input::-webkit-inner-spin-button {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-photo-btn {
|
.edit-photo-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
|
@ -290,3 +291,10 @@ input::-webkit-inner-spin-button {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-date {
|
||||||
|
&__today {
|
||||||
|
border: 2px solid $info;
|
||||||
|
color: $info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -36,7 +36,6 @@ $color-font-secondary: #777;
|
||||||
.bg-success {
|
.bg-success {
|
||||||
background-color: $positive;
|
background-color: $positive;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-notice {
|
.bg-notice {
|
||||||
background-color: $info;
|
background-color: $info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ globals:
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
campaign: Campaign
|
campaign: Campaign
|
||||||
weight: Weight
|
weight: Weight
|
||||||
|
error: Ups! Something went wrong
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -906,6 +907,7 @@ supplier:
|
||||||
account: Account
|
account: Account
|
||||||
payMethod: Pay Method
|
payMethod: Pay Method
|
||||||
payDay: Pay Day
|
payDay: Pay Day
|
||||||
|
country: Country
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsible
|
responsible: Responsible
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
@ -1079,7 +1081,7 @@ item:
|
||||||
producer: Producer
|
producer: Producer
|
||||||
landed: Landed
|
landed: Landed
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemId: Item ID
|
itemFk: Item ID
|
||||||
groupingPrice: Grouping price
|
groupingPrice: Grouping price
|
||||||
packingPrice: Packing price
|
packingPrice: Packing price
|
||||||
hasMinPrice: Has min price
|
hasMinPrice: Has min price
|
||||||
|
|
|
@ -110,6 +110,7 @@ globals:
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
campaign: Campaña
|
campaign: Campaña
|
||||||
weight: Peso
|
weight: Peso
|
||||||
|
error: ¡Ups! Algo salió mal
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -167,6 +168,7 @@ globals:
|
||||||
dms: Gestión documental
|
dms: Gestión documental
|
||||||
entryCreate: Nueva entrada
|
entryCreate: Nueva entrada
|
||||||
latestBuys: Últimas compras
|
latestBuys: Últimas compras
|
||||||
|
reserves: Reservas
|
||||||
tickets: Tickets
|
tickets: Tickets
|
||||||
ticketCreate: Nuevo ticket
|
ticketCreate: Nuevo ticket
|
||||||
boxing: Encajado
|
boxing: Encajado
|
||||||
|
@ -890,6 +892,7 @@ supplier:
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
payMethod: Método de pago
|
payMethod: Método de pago
|
||||||
payDay: Dia de pago
|
payDay: Dia de pago
|
||||||
|
country: País
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsable
|
responsible: Responsable
|
||||||
notes: Notas
|
notes: Notas
|
||||||
|
@ -1063,7 +1066,7 @@ item:
|
||||||
producer: Productor
|
producer: Productor
|
||||||
landed: F. entrega
|
landed: F. entrega
|
||||||
fixedPrice:
|
fixedPrice:
|
||||||
itemId: ID Artículo
|
itemFk: ID Artículo
|
||||||
groupingPrice: Precio grouping
|
groupingPrice: Precio grouping
|
||||||
packingPrice: Precio packing
|
packingPrice: Precio packing
|
||||||
hasMinPrice: Tiene precio mínimo
|
hasMinPrice: Tiene precio mínimo
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
@ -24,7 +25,7 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
ref="formModelRef"
|
ref="formModelRef"
|
||||||
:url="`VnUsers/preview`"
|
url="VnUsers/preview"
|
||||||
:url-update="`VnUsers/${route.params.id}/update-user`"
|
:url-update="`VnUsers/${route.params.id}/update-user`"
|
||||||
:filter="accountFilter"
|
:filter="accountFilter"
|
||||||
model="Accounts"
|
model="Accounts"
|
||||||
|
@ -43,6 +44,15 @@ watch(
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
/>
|
/>
|
||||||
|
<VnSelectEnum
|
||||||
|
schema="account"
|
||||||
|
table="user"
|
||||||
|
column="twoFactor"
|
||||||
|
v-model="data.twoFactor"
|
||||||
|
:label="t('account.card.twoFactor')"
|
||||||
|
option-value="code"
|
||||||
|
option-label="code"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
|
@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) =>
|
||||||
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn fab icon="add" color="primary" @click="openCreateSubRoleForm()">
|
<QBtn
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
color="primary"
|
||||||
|
@click="openCreateSubRoleForm()"
|
||||||
|
>
|
||||||
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
|
|
|
@ -35,6 +35,7 @@ account:
|
||||||
willDeactivated: User will be deactivated
|
willDeactivated: User will be deactivated
|
||||||
activated: User activated!
|
activated: User activated!
|
||||||
deactivated: User deactivated!
|
deactivated: User deactivated!
|
||||||
|
twoFactor: Two factor
|
||||||
actions:
|
actions:
|
||||||
setPassword: Set password
|
setPassword: Set password
|
||||||
disableAccount:
|
disableAccount:
|
||||||
|
|
|
@ -32,6 +32,7 @@ account:
|
||||||
activated: ¡Usuario activado!
|
activated: ¡Usuario activado!
|
||||||
deactivated: ¡Usuario desactivado!
|
deactivated: ¡Usuario desactivado!
|
||||||
newUser: Nuevo usuario
|
newUser: Nuevo usuario
|
||||||
|
twoFactor: Doble factor
|
||||||
privileges:
|
privileges:
|
||||||
delegate: Puede delegar privilegios
|
delegate: Puede delegar privilegios
|
||||||
actions:
|
actions:
|
||||||
|
|
|
@ -3,58 +3,18 @@ import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
|
||||||
import axios from 'axios';
|
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const claimStates = ref([]);
|
|
||||||
const claimStatesCopy = ref([]);
|
|
||||||
const optionsList = ref([]);
|
|
||||||
|
|
||||||
const workersOptions = ref([]);
|
const workersOptions = ref([]);
|
||||||
|
|
||||||
function setClaimStates(data) {
|
|
||||||
claimStates.value = data;
|
|
||||||
claimStatesCopy.value = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getEnumValues() {
|
|
||||||
optionsList.value = [{ id: null, description: t('claim.null') }];
|
|
||||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
|
||||||
params: {
|
|
||||||
schema: 'vn',
|
|
||||||
table: 'claim',
|
|
||||||
column: 'pickup',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
for (let value of data)
|
|
||||||
optionsList.value.push({ id: value, description: t(`claim.${value}`) });
|
|
||||||
}
|
|
||||||
|
|
||||||
getEnumValues();
|
|
||||||
|
|
||||||
const statesFilter = {
|
|
||||||
options: claimStates,
|
|
||||||
filterFn: (options, value) => {
|
|
||||||
const search = value.toLowerCase();
|
|
||||||
|
|
||||||
if (value === '') return claimStatesCopy.value;
|
|
||||||
|
|
||||||
return options.value.filter((row) => {
|
|
||||||
const description = row.description.toLowerCase();
|
|
||||||
|
|
||||||
return description.indexOf(search) > -1;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -70,7 +30,7 @@ const statesFilter = {
|
||||||
auto-load
|
auto-load
|
||||||
:reload="true"
|
:reload="true"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate, filter }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.client.name"
|
v-model="data.client.name"
|
||||||
|
@ -101,20 +61,14 @@ const statesFilter = {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
<QSelect
|
<VnSelect
|
||||||
v-model="data.claimStateFk"
|
v-model="data.claimStateFk"
|
||||||
:options="claimStates"
|
url="ClaimStates"
|
||||||
option-value="id"
|
|
||||||
option-label="description"
|
|
||||||
emit-value
|
|
||||||
:label="t('claim.state')"
|
:label="t('claim.state')"
|
||||||
map-options
|
option-label="description"
|
||||||
use-input
|
|
||||||
@filter="(value, update) => filter(value, update, statesFilter)"
|
|
||||||
:rules="validate('claim.claimStateFk')"
|
:rules="validate('claim.claimStateFk')"
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
/>
|
||||||
</QSelect>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QInput
|
<QInput
|
||||||
|
@ -123,16 +77,14 @@ const statesFilter = {
|
||||||
:rules="validate('claim.packages')"
|
:rules="validate('claim.packages')"
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
<QSelect
|
<VnSelectEnum
|
||||||
v-model="data.pickup"
|
v-model="data.pickup"
|
||||||
:options="optionsList"
|
|
||||||
option-value="id"
|
|
||||||
option-label="description"
|
|
||||||
emit-value
|
|
||||||
:label="t('claim.pickup')"
|
:label="t('claim.pickup')"
|
||||||
map-options
|
table="claim"
|
||||||
use-input
|
column="pickup"
|
||||||
:input-debounce="0"
|
option-label="description"
|
||||||
|
:translation="(value) => t(`claim.${value}`)"
|
||||||
|
:default-options="[{ id: null, description: t('claim.null') }]"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -317,7 +317,7 @@ async function saveWhenHasChanges() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="showImportDialog()" />
|
<QBtn fab color="primary" shortcut="+" icon="add" @click="showImportDialog()" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,13 @@ function onDrag() {
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<label for="fileInput">
|
<label for="fileInput">
|
||||||
<QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary">
|
<QBtn
|
||||||
|
fab
|
||||||
|
@click="inputFile.nativeEl.click()"
|
||||||
|
shortcut="+"
|
||||||
|
icon="add"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<QInput
|
<QInput
|
||||||
ref="inputFile"
|
ref="inputFile"
|
||||||
type="file"
|
type="file"
|
||||||
|
|
|
@ -16,7 +16,7 @@ import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
|
||||||
import VnFilter from 'components/VnTable/VnFilter.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
||||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||||
|
@ -33,9 +33,9 @@ const stateStore = useStateStore();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
|
|
||||||
const clientRisk = ref([]);
|
const clientRisk = ref([]);
|
||||||
|
const companies = ref([]);
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const companyId = ref(user.value.companyFk);
|
const companyId = ref(user.value.companyFk);
|
||||||
const companyLastId = ref(user.value.companyFk);
|
|
||||||
const balances = ref([]);
|
const balances = ref([]);
|
||||||
const vnFilterRef = ref({});
|
const vnFilterRef = ref({});
|
||||||
const filter = computed(() => {
|
const filter = computed(() => {
|
||||||
|
@ -45,33 +45,6 @@ const filter = computed(() => {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const companyFilterColumn = {
|
|
||||||
align: 'left',
|
|
||||||
name: 'companyId',
|
|
||||||
label: t('Company'),
|
|
||||||
component: 'select',
|
|
||||||
attrs: {
|
|
||||||
url: 'Companies',
|
|
||||||
optionLabel: 'code',
|
|
||||||
sortBy: 'code',
|
|
||||||
limit: 0,
|
|
||||||
},
|
|
||||||
columnFilter: {
|
|
||||||
event: {
|
|
||||||
remove: () => (companyId.value = null),
|
|
||||||
'update:modelValue': (newCompanyFk) => {
|
|
||||||
if (!newCompanyFk) return;
|
|
||||||
vnFilterRef.value.addFilter(newCompanyFk);
|
|
||||||
companyLastId.value = newCompanyFk;
|
|
||||||
},
|
|
||||||
blur: () =>
|
|
||||||
!companyId.value &&
|
|
||||||
(companyId.value = companyLastId.value ?? user.value.companyFk),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
visible: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
@ -166,6 +139,11 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getCurrentBalance(data) {
|
async function getCurrentBalance(data) {
|
||||||
|
currentBalance.value[companyId.value] = {
|
||||||
|
amount: 0,
|
||||||
|
code: companies.value.find((c) => c.id === companyId.value)?.code,
|
||||||
|
};
|
||||||
|
|
||||||
for (const balance of data) {
|
for (const balance of data) {
|
||||||
currentBalance.value[balance.companyFk] = {
|
currentBalance.value[balance.companyFk] = {
|
||||||
code: balance.company.code,
|
code: balance.company.code,
|
||||||
|
@ -192,14 +170,21 @@ const showBalancePdf = ({ id }) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
url="Companies"
|
||||||
|
auto-load
|
||||||
|
@on-fetch="(data) => (companies = data)"
|
||||||
|
></FetchData>
|
||||||
|
<FetchData
|
||||||
|
v-if="companies.length > 0"
|
||||||
url="clientRisks"
|
url="clientRisks"
|
||||||
:filter="{
|
:filter="{
|
||||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||||
where: { clientFk: route.params.id, companyFk: companyId },
|
where: { clientFk: route.params.id },
|
||||||
}"
|
}"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="getCurrentBalance"
|
@on-fetch="getCurrentBalance"
|
||||||
></FetchData>
|
></FetchData>
|
||||||
|
|
||||||
<VnSubToolbar class="q-mb-md">
|
<VnSubToolbar class="q-mb-md">
|
||||||
<template #st-data>
|
<template #st-data>
|
||||||
<div class="column justify-center q-px-md q-py-sm">
|
<div class="column justify-center q-px-md q-py-sm">
|
||||||
|
@ -212,13 +197,15 @@ const showBalancePdf = ({ id }) => {
|
||||||
</template>
|
</template>
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<div>
|
<div>
|
||||||
<VnFilter
|
<VnSelect
|
||||||
|
:label="t('Company')"
|
||||||
ref="vnFilterRef"
|
ref="vnFilterRef"
|
||||||
v-model="companyId"
|
v-model="companyId"
|
||||||
data-key="CustomerBalance"
|
data-key="CustomerBalance"
|
||||||
:column="companyFilterColumn"
|
:options="companies"
|
||||||
search-url="balance"
|
option-label="code"
|
||||||
/>
|
option-value="id"
|
||||||
|
></VnSelect>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
|
|
|
@ -16,6 +16,19 @@ const { t } = useI18n();
|
||||||
const businessTypes = ref([]);
|
const businessTypes = ref([]);
|
||||||
const contactChannels = ref([]);
|
const contactChannels = ref([]);
|
||||||
const title = ref();
|
const title = ref();
|
||||||
|
const handleSalesModelValue = (val) => ({
|
||||||
|
or: [
|
||||||
|
{ name: val },
|
||||||
|
{ nickname: { like: '%' + val + '%' } },
|
||||||
|
{ code: { like: `${val}%` } },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
const exprBuilder = (param, value) => {
|
||||||
|
return {
|
||||||
|
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||||
|
};
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -34,7 +47,7 @@ const title = ref();
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.name')"
|
:label="t('globals.name')"
|
||||||
:rules="validate('client.socialName')"
|
:rules="validate('client.name')"
|
||||||
autofocus
|
autofocus
|
||||||
clearable
|
clearable
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
|
@ -98,7 +111,10 @@ const title = ref();
|
||||||
}"
|
}"
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
|
option-label="nickname"
|
||||||
|
option-value="id"
|
||||||
:rules="validate('client.salesPersonFk')"
|
:rules="validate('client.salesPersonFk')"
|
||||||
|
:expr-builder="exprBuilder"
|
||||||
emit-value
|
emit-value
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
|
|
@ -56,17 +56,18 @@ const customerContactsRef = ref(null);
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="customerContactsRef.insert()"
|
@click="customerContactsRef.insert()"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add contact') }}
|
{{ t('Add contact') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -206,6 +206,18 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
v-if="entity.supplier"
|
||||||
|
:to="{
|
||||||
|
name: 'SupplierSummary',
|
||||||
|
params: { id: entity.supplier.id },
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
icon="vn:supplier"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Go to supplier') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
|
@ -220,6 +232,7 @@ es:
|
||||||
Customer ticket list: Listado de tickets del cliente
|
Customer ticket list: Listado de tickets del cliente
|
||||||
Customer invoice out list: Listado de facturas del cliente
|
Customer invoice out list: Listado de facturas del cliente
|
||||||
Go to user: Ir al usuario
|
Go to user: Ir al usuario
|
||||||
|
Go to supplier: Ir al proveedor
|
||||||
Customer unpaid: Cliente impago
|
Customer unpaid: Cliente impago
|
||||||
Unpaid: Impagado
|
Unpaid: Impagado
|
||||||
unpaidDated: 'Fecha {dated}'
|
unpaidDated: 'Fecha {dated}'
|
||||||
|
|
|
@ -236,6 +236,7 @@ const toCustomerFileManagementCreate = () => {
|
||||||
@click.stop="toCustomerFileManagementCreate()"
|
@click.stop="toCustomerFileManagementCreate()"
|
||||||
color="primary"
|
color="primary"
|
||||||
fab
|
fab
|
||||||
|
shortcut="+"
|
||||||
icon="add"
|
icon="add"
|
||||||
/>
|
/>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
|
|
@ -134,15 +134,17 @@ function handleLocation(data, location) {
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
|
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('Electronic invoice')"
|
:label="t('Electronic invoice')"
|
||||||
v-model="data.hasElectronicInvoice"
|
v-model="data.hasElectronicInvoice"
|
||||||
|
/><QCheckbox
|
||||||
|
:label="t('Verified data')"
|
||||||
|
v-model="data.isTaxDataChecked"
|
||||||
/>
|
/>
|
||||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
|
@ -99,7 +99,13 @@ const tableRef = ref();
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerSamplesCreate()" color="primary" fab icon="add" />
|
<QBtn
|
||||||
|
@click.stop="toCustomerSamplesCreate()"
|
||||||
|
color="primary"
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
/>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Send sample') }}
|
{{ t('Send sample') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -1,35 +1,20 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
defineProps({
|
||||||
dataKey: {
|
dataKey: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const provinces = ref();
|
|
||||||
const workers = ref();
|
|
||||||
const zones = ref();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="Provinces" @on-fetch="(data) => (provinces = data)" auto-load />
|
<VnFilterPanel :data-key="dataKey" :search-button="true" search-url="table">
|
||||||
<FetchData url="Zones" @on-fetch="(data) => (zones = data)" auto-load />
|
|
||||||
<FetchData
|
|
||||||
url="Workers/activeWithInheritedRole"
|
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
|
||||||
@on-fetch="(data) => (workers = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" search-url="table">
|
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
|
@ -65,15 +50,14 @@ const zones = ref();
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection v-if="!workers">
|
<QItemSection>
|
||||||
<QSkeleton type="QInput" class="full-width" />
|
|
||||||
</QItemSection>
|
|
||||||
<QItemSection v-if="workers">
|
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
url="Workers/activeWithInheritedRole"
|
||||||
|
:filter="{ where: { role: 'salesPerson' } }"
|
||||||
|
auto-load
|
||||||
:label="t('Salesperson')"
|
:label="t('Salesperson')"
|
||||||
v-model="params.salesPersonFk"
|
v-model="params.salesPersonFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="workers"
|
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
|
@ -88,15 +72,12 @@ const zones = ref();
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection v-if="!provinces">
|
<QItemSection
|
||||||
<QSkeleton type="QInput" class="full-width" />
|
><VnSelect
|
||||||
</QItemSection>
|
url="Provinces"
|
||||||
<QItemSection v-if="provinces">
|
|
||||||
<VnSelect
|
|
||||||
:label="t('Province')"
|
:label="t('Province')"
|
||||||
v-model="params.provinceFk"
|
v-model="params.provinceFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="provinces"
|
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
|
@ -105,6 +86,7 @@ const zones = ref();
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
auto-load
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -135,25 +117,21 @@ const zones = ref();
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection v-if="!zones">
|
<VnSelect
|
||||||
<QSkeleton type="QInput" class="full-width" />
|
url="Zones"
|
||||||
</QItemSection>
|
:label="t('Zone')"
|
||||||
<QItemSection v-if="zones">
|
v-model="params.zoneFk"
|
||||||
<VnSelect
|
@update:model-value="searchFn()"
|
||||||
:label="t('Zone')"
|
option-value="id"
|
||||||
v-model="params.zoneFk"
|
option-label="name"
|
||||||
@update:model-value="searchFn()"
|
emit-value
|
||||||
:options="zones"
|
map-options
|
||||||
option-value="id"
|
hide-selected
|
||||||
option-label="name"
|
dense
|
||||||
emit-value
|
outlined
|
||||||
map-options
|
rounded
|
||||||
hide-selected
|
auto-load
|
||||||
dense
|
/>
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
|
|
|
@ -8,10 +8,10 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
|
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
import CustomerFilter from './CustomerFilter.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -397,6 +397,11 @@ function handleLocation(data, location) {
|
||||||
:label="t('Search customer')"
|
:label="t('Search customer')"
|
||||||
data-key="Customer"
|
data-key="Customer"
|
||||||
/>
|
/>
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<CustomerFilter data-key="Customer" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="Customer"
|
data-key="Customer"
|
||||||
|
@ -413,6 +418,7 @@ function handleLocation(data, location) {
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
redirect="customer"
|
redirect="customer"
|
||||||
|
:right-search="false"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
|
@ -423,9 +429,10 @@ function handleLocation(data, location) {
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
|
option-label="nickname"
|
||||||
|
option-value="id"
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
:use-like="false"
|
|
||||||
emit-value
|
emit-value
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
|
|
@ -134,6 +134,7 @@ function handleLocation(data, location) {
|
||||||
option-label="fiscalName"
|
option-label="fiscalName"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.customsAgentFk"
|
v-model="data.customsAgentFk"
|
||||||
|
:tooltip="t('Create a new expense')"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
||||||
|
|
|
@ -11,7 +11,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||||
import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -226,9 +226,10 @@ function handleLocation(data, location) {
|
||||||
option-label="fiscalName"
|
option-label="fiscalName"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.customsAgentFk"
|
v-model="data.customsAgentFk"
|
||||||
|
:tooltip="t('New customs agent')"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CustomsNewCustomsAgent />
|
<CustomerNewCustomsAgent />
|
||||||
</template>
|
</template>
|
||||||
</VnSelectDialog>
|
</VnSelectDialog>
|
||||||
</div>
|
</div>
|
||||||
|
@ -272,16 +273,17 @@ function handleLocation(data, location) {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<QIcon
|
<QBtn
|
||||||
@click.stop="addNote()"
|
@click.stop="addNote()"
|
||||||
class="cursor-pointer add-icon q-mt-md"
|
class="cursor-pointer add-icon q-mt-md"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add note') }}
|
{{ t('Add note') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
@ -308,6 +310,7 @@ es:
|
||||||
Mobile: Movíl
|
Mobile: Movíl
|
||||||
Incoterms: Incoterms
|
Incoterms: Incoterms
|
||||||
Customs agent: Agente de aduanas
|
Customs agent: Agente de aduanas
|
||||||
|
New customs agent: Nuevo agente de aduanas
|
||||||
Notes: Notas
|
Notes: Notas
|
||||||
Observation type: Tipo de observación
|
Observation type: Tipo de observación
|
||||||
Description: Descripción
|
Description: Descripción
|
||||||
|
|
|
@ -46,7 +46,6 @@ const onSubmit = async () => {
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
|
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
|
||||||
await $props.promise();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notify('errors.create', 'negative');
|
notify('errors.create', 'negative');
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -35,6 +35,7 @@ const filter = {
|
||||||
],
|
],
|
||||||
where: { clientFk: route.params.id },
|
where: { clientFk: route.params.id },
|
||||||
order: ['shipped DESC', 'id'],
|
order: ['shipped DESC', 'id'],
|
||||||
|
limit: 30,
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -149,7 +150,6 @@ const setShippedColor = (date) => {
|
||||||
auto-load
|
auto-load
|
||||||
order="shipped DESC, id"
|
order="shipped DESC, id"
|
||||||
:disable-option="{ card: true, table: true }"
|
:disable-option="{ card: true, table: true }"
|
||||||
limit="5"
|
|
||||||
class="full-width"
|
class="full-width"
|
||||||
:disable-infinite-scroll="true"
|
:disable-infinite-scroll="true"
|
||||||
>
|
>
|
||||||
|
|
|
@ -58,7 +58,7 @@ customer:
|
||||||
vies: VIES
|
vies: VIES
|
||||||
payMethod: Método de pago
|
payMethod: Método de pago
|
||||||
bankAccount: Cuenta bancaria
|
bankAccount: Cuenta bancaria
|
||||||
dueDay: Día de pago
|
dueDay: Vencimiento
|
||||||
hasLcr: Recibido LCR
|
hasLcr: Recibido LCR
|
||||||
hasCoreVnl: Recibido core VNL
|
hasCoreVnl: Recibido core VNL
|
||||||
hasB2BVnl: Recibido B2B VNL
|
hasB2BVnl: Recibido B2B VNL
|
||||||
|
|
|
@ -138,7 +138,13 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="entryObservationsRef.insert()" />
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
@click="entryObservationsRef.insert()"
|
||||||
|
/>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
|
||||||
import { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
|
||||||
>
|
>
|
||||||
<template #header-left>
|
<template #header-left>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="route.name !== 'EntrySummary'"
|
v-if="route?.name !== 'EntrySummary'"
|
||||||
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
||||||
class="header link"
|
class="header link"
|
||||||
:href="entryUrl"
|
:href="entryUrl"
|
||||||
|
@ -184,7 +185,10 @@ const fetchEntryBuys = async () => {
|
||||||
<QIcon name="open_in_new" />
|
<QIcon name="open_in_new" />
|
||||||
</router-link>
|
</router-link>
|
||||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||||
<VnLv :label="t('entry.summary.currency')" :value="entry.currency.name" />
|
<VnLv
|
||||||
|
:label="t('entry.summary.currency')"
|
||||||
|
:value="entry.currency?.name"
|
||||||
|
/>
|
||||||
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
||||||
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -210,12 +214,12 @@ const fetchEntryBuys = async () => {
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.travelAgency')"
|
:label="t('entry.summary.travelAgency')"
|
||||||
:value="entry.travel.agency.name"
|
:value="entry.travel.agency?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('shipped')" :value="toDate(entry.travel.shipped)" />
|
<VnLv :label="t('shipped')" :value="toDate(entry.travel.shipped)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.travelWarehouseOut')"
|
:label="t('entry.summary.travelWarehouseOut')"
|
||||||
:value="entry.travel.warehouseOut.name"
|
:value="entry.travel.warehouseOut?.name"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('entry.summary.travelDelivered')"
|
:label="t('entry.summary.travelDelivered')"
|
||||||
|
@ -225,7 +229,7 @@ const fetchEntryBuys = async () => {
|
||||||
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.travelWarehouseIn')"
|
:label="t('entry.summary.travelWarehouseIn')"
|
||||||
:value="entry.travel.warehouseIn.name"
|
:value="entry.travel.warehouseIn?.name"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('entry.summary.travelReceived')"
|
:label="t('entry.summary.travelReceived')"
|
||||||
|
@ -281,17 +285,17 @@ const fetchEntryBuys = async () => {
|
||||||
>
|
>
|
||||||
<template #body="{ cols, row, rowIndex }">
|
<template #body="{ cols, row, rowIndex }">
|
||||||
<QTr no-hover>
|
<QTr no-hover>
|
||||||
<QTd v-for="col in cols" :key="col.name">
|
<QTd v-for="col in cols" :key="col?.name">
|
||||||
<component
|
<component
|
||||||
:is="tableColumnComponents[col.name].component(props)"
|
:is="tableColumnComponents[col?.name].component()"
|
||||||
v-bind="tableColumnComponents[col.name].props(props)"
|
v-bind="tableColumnComponents[col?.name].props()"
|
||||||
@click="tableColumnComponents[col.name].event(props)"
|
@click="tableColumnComponents[col?.name].event()"
|
||||||
class="col-content"
|
class="col-content"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
col.name !== 'observation' &&
|
col?.name !== 'observation' &&
|
||||||
col.name !== 'isConfirmed'
|
col?.name !== 'isConfirmed'
|
||||||
"
|
"
|
||||||
>{{ col.value }}</template
|
>{{ col.value }}</template
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, onUnmounted, ref } from 'vue';
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
|
||||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { toDate } from 'src/filters';
|
||||||
|
|
||||||
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||||
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
import VnImg from 'src/components/ui/VnImg.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
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 columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ defineProps({
|
||||||
|
|
||||||
const itemTypeWorkersOptions = ref([]);
|
const itemTypeWorkersOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
|
const tagValues = ref([]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -54,10 +54,9 @@ const columns = [
|
||||||
create: true,
|
create: true,
|
||||||
component: 'number',
|
component: 'number',
|
||||||
summation: true,
|
summation: true,
|
||||||
cardVisible: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'center',
|
||||||
label: t('Bought'),
|
label: t('Bought'),
|
||||||
name: 'bought',
|
name: 'bought',
|
||||||
summation: true,
|
summation: true,
|
||||||
|
@ -101,14 +100,9 @@ const travel = ref(null);
|
||||||
const userParams = ref({
|
const userParams = ref({
|
||||||
dated: Date.vnNew(),
|
dated: Date.vnNew(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = ref({
|
const filter = ref({
|
||||||
where: {
|
fields: ['id', 'm3', 'warehouseInFk'],
|
||||||
shipped: (userParams.value.dated
|
|
||||||
? new Date(userParams.value.dated)
|
|
||||||
: Date.vnNew()
|
|
||||||
).setHours(0, 0, 0, 0),
|
|
||||||
m3: { neq: null },
|
|
||||||
},
|
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
relation: 'warehouseIn',
|
relation: 'warehouseIn',
|
||||||
|
@ -117,6 +111,13 @@ const filter = ref({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
where: {
|
||||||
|
shipped: (userParams.value.dated
|
||||||
|
? new Date(userParams.value.dated)
|
||||||
|
: Date.vnNew()
|
||||||
|
).setHours(0, 0, 0, 0),
|
||||||
|
m3: { neq: null },
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const setUserParams = async ({ dated }) => {
|
const setUserParams = async ({ dated }) => {
|
||||||
|
@ -128,6 +129,18 @@ const setUserParams = async ({ dated }) => {
|
||||||
function openDialog() {
|
function openDialog() {
|
||||||
travelDialogRef.value = true;
|
travelDialogRef.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setFooter(data) {
|
||||||
|
const footer = {
|
||||||
|
bought: 0,
|
||||||
|
reserve: 0,
|
||||||
|
};
|
||||||
|
data.forEach((row) => {
|
||||||
|
footer.bought += row?.bought;
|
||||||
|
footer.reserve += row?.reserve;
|
||||||
|
});
|
||||||
|
tableRef.value.footer = footer;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnSubToolbar>
|
<VnSubToolbar>
|
||||||
|
@ -139,7 +152,7 @@ function openDialog() {
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
(data) => {
|
(data) => {
|
||||||
travel = data.filter((data) => data.warehouseIn.code === 'VNH');
|
travel = data.find((data) => data.warehouseIn.code === 'VNH');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -149,10 +162,10 @@ function openDialog() {
|
||||||
{{ t('Booked trucks') }}:
|
{{ t('Booked trucks') }}:
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{{ travel[0]?.m3 }}
|
{{ travel?.m3 }}
|
||||||
</span>
|
</span>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="travel[0]?.m3"
|
v-if="travel?.m3"
|
||||||
style="max-width: 20%"
|
style="max-width: 20%"
|
||||||
flat
|
flat
|
||||||
icon="edit"
|
icon="edit"
|
||||||
|
@ -166,10 +179,10 @@ function openDialog() {
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:url-update="`Travels/${travel[0].id}`"
|
:url-update="`Travels/${travel?.id}`"
|
||||||
model="travel"
|
model="travel"
|
||||||
:title="t('Travel m3')"
|
:title="t('Travel m3')"
|
||||||
:form-initial-data="{ id: travel[0].id, m3: travel[0].m3 }"
|
:form-initial-data="{ id: travel?.id, m3: travel?.m3 }"
|
||||||
@on-data-saved="fetchDataRef.fetch()"
|
@on-data-saved="fetchDataRef.fetch()"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
|
@ -192,51 +205,80 @@ function openDialog() {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<QPage class="column items-center q-pa-md">
|
<div class="table-container">
|
||||||
<VnTable
|
<QPage class="column items-center q-pa-md">
|
||||||
ref="tableRef"
|
<VnTable
|
||||||
data-key="StockBoughts"
|
ref="tableRef"
|
||||||
url="StockBoughts/getStockBought"
|
data-key="StockBoughts"
|
||||||
save-url="StockBoughts/crud"
|
url="StockBoughts/getStockBought"
|
||||||
order="reserve DESC"
|
save-url="StockBoughts/crud"
|
||||||
:right-search="false"
|
order="reserve DESC"
|
||||||
:is-editable="true"
|
:right-search="false"
|
||||||
:create="{
|
:is-editable="true"
|
||||||
urlCreate: 'StockBoughts',
|
@on-fetch="(data) => setFooter(data)"
|
||||||
title: t('Reserve some space'),
|
:create="{
|
||||||
onDataSaved: () => tableRef.reload(),
|
urlCreate: 'StockBoughts',
|
||||||
formInitialData: {
|
title: t('Reserve some space'),
|
||||||
workerFk: user.id,
|
onDataSaved: () => tableRef.reload(),
|
||||||
dated: Date.vnNow(),
|
formInitialData: {
|
||||||
},
|
workerFk: user.id,
|
||||||
}"
|
dated: Date.vnNow(),
|
||||||
:columns="columns"
|
},
|
||||||
:user-params="userParams"
|
}"
|
||||||
:footer="true"
|
:columns="columns"
|
||||||
auto-load
|
:user-params="userParams"
|
||||||
>
|
:footer="true"
|
||||||
<template #column-workerFk="{ row }">
|
auto-load
|
||||||
<span class="link" @click.stop>
|
>
|
||||||
{{ row?.worker?.user?.name }}
|
<template #column-workerFk="{ row }">
|
||||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
<span class="link" @click.stop>
|
||||||
</span>
|
{{ row?.worker?.user?.name }}
|
||||||
</template>
|
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||||
</VnTable>
|
</span>
|
||||||
</QPage>
|
</template>
|
||||||
|
<template #column-bought="{ row }">
|
||||||
|
<span :class="{ 'text-negative': row.reserve < row.bought }">
|
||||||
|
{{ row?.bought }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-footer-reserve>
|
||||||
|
<span>
|
||||||
|
{{ tableRef.footer.reserve }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-footer-bought>
|
||||||
|
<span
|
||||||
|
:class="{
|
||||||
|
'text-negative':
|
||||||
|
tableRef.footer.reserve < tableRef.footer.bought,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ tableRef.footer.bought }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnTable>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="css" scoped>
|
<style lang="scss" scoped>
|
||||||
.travel {
|
.travel {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
.table-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
.text-negative {
|
||||||
|
color: $negative !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
|
||||||
Buyer: Buyer
|
|
||||||
Reserve: Reserve
|
|
||||||
Bought: Bought
|
|
||||||
More: More
|
|
||||||
Date: Date
|
|
||||||
This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
|
|
||||||
es:
|
es:
|
||||||
Edit travel: Editar envío
|
Edit travel: Editar envío
|
||||||
Travel: Envíos
|
Travel: Envíos
|
||||||
|
|
|
@ -22,7 +22,7 @@ const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Entry',
|
label: t('Entry'),
|
||||||
name: 'entryFk',
|
name: 'entryFk',
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
isId: true,
|
isId: true,
|
||||||
|
@ -41,29 +41,33 @@ const columns = [
|
||||||
create: true,
|
create: true,
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'volume',
|
name: 'volume',
|
||||||
label: t('Volume'),
|
label: t('Volume'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('Packaging'),
|
label: t('Packaging'),
|
||||||
name: 'packagingFk',
|
name: 'packagingFk',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Packing',
|
label: 'Packing',
|
||||||
name: 'packing',
|
name: 'packing',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDialog :maximized="true">
|
<QDialog>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@ -73,18 +77,26 @@ const columns = [
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:disable-infinite-scroll="true"
|
:disable-infinite-scroll="true"
|
||||||
:disable-option="{ card: true }"
|
|
||||||
:limit="0"
|
:limit="0"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
|
<template #top-left>
|
||||||
|
<QBtn
|
||||||
|
flat
|
||||||
|
icon="Close"
|
||||||
|
color="primary"
|
||||||
|
class="bg-vn-section-color q-pa-xs"
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #column-entryFk="{ row }">
|
<template #column-entryFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link">
|
||||||
{{ row?.entryFk }}
|
{{ row?.entryFk }}
|
||||||
<EntryDescriptorProxy :id="row.entryFk" />
|
<EntryDescriptorProxy :id="row.entryFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-itemName="{ row }">
|
<template #column-itemName="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link">
|
||||||
{{ row?.itemName }}
|
{{ row?.itemName }}
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
<ItemDescriptorProxy :id="row.itemFk" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -93,11 +105,10 @@ const columns = [
|
||||||
</div>
|
</div>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
<style lang="css">
|
<style lang="css" scoped>
|
||||||
.q-dialog__inner {
|
.container {
|
||||||
max-width: 50vw;
|
max-width: 50vw;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
@ -110,4 +121,9 @@ const columns = [
|
||||||
Bought: Comprado
|
Bought: Comprado
|
||||||
More: Más
|
More: Más
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
|
Entry: Entrada
|
||||||
|
Item: Artículo
|
||||||
|
Name: Nombre
|
||||||
|
Volume: Volumen
|
||||||
|
Packaging: Embalage
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -281,6 +281,7 @@ async function onSubmit() {
|
||||||
v-else
|
v-else
|
||||||
icon="add_circle"
|
icon="add_circle"
|
||||||
round
|
round
|
||||||
|
shortcut="+"
|
||||||
padding="xs"
|
padding="xs"
|
||||||
@click="setCreateDms()"
|
@click="setCreateDms()"
|
||||||
>
|
>
|
||||||
|
|
|
@ -230,7 +230,7 @@ async function insert() {
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn color="primary" icon="add" size="lg" round @click="insert" />
|
<QBtn color="primary" icon="add" shortcut="+" size="lg" round @click="insert" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -227,6 +227,7 @@ const getTotal = (data, key) =>
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="add"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
size="lg"
|
size="lg"
|
||||||
round
|
round
|
||||||
@click="invoiceInFormRef.insert()"
|
@click="invoiceInFormRef.insert()"
|
||||||
|
|
|
@ -405,6 +405,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="add"
|
icon="add"
|
||||||
size="lg"
|
size="lg"
|
||||||
|
shortcut="+"
|
||||||
round
|
round
|
||||||
@click="invoiceInFormRef.insert()"
|
@click="invoiceInFormRef.insert()"
|
||||||
>
|
>
|
||||||
|
|
|
@ -65,17 +65,18 @@ const focusLastInput = () => {
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
class="cursor-pointer fill-icon-on-hover"
|
class="cursor-pointer fill-icon-on-hover"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
size="sm"
|
shortcut="+"
|
||||||
|
flat
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add barcode') }}
|
{{ t('Add barcode') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
|
|
|
@ -168,19 +168,20 @@ const insertTag = (rows) => {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="justify-center items-center">
|
<VnRow class="justify-center items-center">
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="insertTag(rows)"
|
@click="insertTag(rows)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:disable="!validRow"
|
:disable="!validRow"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
style="flex: 0"
|
style="flex: 0"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('itemTags.addTag') }}
|
{{ t('itemTags.addTag') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -36,23 +36,23 @@ const user = state.getUser();
|
||||||
const fixedPrices = ref([]);
|
const fixedPrices = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
const rowsSelected = ref([]);
|
const rowsSelected = ref([]);
|
||||||
|
|
||||||
const itemFixedPriceFilterRef = ref();
|
const itemFixedPriceFilterRef = ref();
|
||||||
|
|
||||||
const params = reactive({});
|
const params = reactive({});
|
||||||
const defaultColumnAttrs = {
|
|
||||||
align: 'left',
|
|
||||||
sortable: true,
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
params.warehouseFk = user.value.warehouseFk;
|
params.warehouseFk = user.value.warehouseFk;
|
||||||
});
|
});
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
|
|
||||||
|
const defaultColumnAttrs = {
|
||||||
|
align: 'left',
|
||||||
|
sortable: true,
|
||||||
|
};
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('item.fixedPrice.itemId'),
|
label: t('item.fixedPrice.itemFk'),
|
||||||
name: 'itemId',
|
name: 'itemFk',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
isId: true,
|
isId: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
@ -426,7 +426,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
data-key="ItemFixedPrices"
|
data-key="ItemFixedPrices"
|
||||||
url="FixedPrices/filter"
|
url="FixedPrices/filter"
|
||||||
:order="['itemFk ASC']"
|
:order="['description DESC']"
|
||||||
save-url="FixedPrices/crud"
|
save-url="FixedPrices/crud"
|
||||||
:user-params="{ warehouseFk: user.warehouseFk }"
|
:user-params="{ warehouseFk: user.warehouseFk }"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@ -460,7 +460,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
<QCheckbox flat v-model="scope.selected" />
|
<QCheckbox flat v-model="scope.selected" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #column-itemId="props">
|
<template #column-itemFk="props">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
style="max-width: 100px"
|
style="max-width: 100px"
|
||||||
url="Items/withName"
|
url="Items/withName"
|
||||||
|
|
|
@ -212,6 +212,7 @@ const decrement = (paramsObj, key) => {
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
size="12px"
|
size="12px"
|
||||||
|
shortcut="+"
|
||||||
@click="add(params, 'scopeDays')"
|
@click="add(params, 'scopeDays')"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -139,7 +139,11 @@ const columns = computed(() => [
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.full-width .vn-row > * {
|
.full-width .vn-row {
|
||||||
flex: 0.4;
|
margin-bottom: 0;
|
||||||
|
flex-direction: row;
|
||||||
|
> * {
|
||||||
|
max-width: 125px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -132,7 +132,6 @@ const openTab = (id) =>
|
||||||
:table="{
|
:table="{
|
||||||
'row-key': 'id',
|
'row-key': 'id',
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
'hide-bottom': true,
|
|
||||||
}"
|
}"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
:row-click="({ id }) => openTab(id)"
|
:row-click="({ id }) => openTab(id)"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import FetchData from 'src/components/FetchData.vue';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
|
|
||||||
defineProps({ dataKey: { type: String, required: true } });
|
defineProps({ dataKey: { type: String, required: true } });
|
||||||
const { t } = useI18n();
|
const { t, te } = useI18n();
|
||||||
const warehouses = ref();
|
const warehouses = ref();
|
||||||
const groupedStates = ref();
|
const groupedStates = ref();
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
}
|
}
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getLocale = (label) => {
|
||||||
|
const param = label.split('.').at(-1);
|
||||||
|
const globalLocale = `globals.params.${param}`;
|
||||||
|
return te(globalLocale) ? t(globalLocale) : t(`params.${param}`);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
||||||
|
@ -43,10 +49,11 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
:hidden-tags="['from', 'to', 'search']"
|
:hidden-tags="['from', 'to', 'search']"
|
||||||
:custom-tags="['scopeDays']"
|
:custom-tags="['scopeDays']"
|
||||||
:unremovable-params="['from', 'to', 'scopeDays']"
|
:unremovable-params="['from', 'to', 'scopeDays']"
|
||||||
|
search-url="saleMonitorTickets"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong v-text="`${t(`params.${tag.label}`)}:`" />
|
<strong v-text="`${getLocale(tag.label)}:`" />
|
||||||
<span v-text="formatFn(tag.value)" />
|
<span v-text="formatFn(tag.value)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -110,7 +117,7 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
url="Workers/search"
|
url="Workers/search"
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
:params="{ departmentCodes: ['VT'] }"
|
||||||
is-outlined
|
is-outlined
|
||||||
option-value="code"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:no-one="true"
|
:no-one="true"
|
||||||
>
|
>
|
||||||
|
|
|
@ -54,7 +54,6 @@ const columns = computed(() => [
|
||||||
label: t('salesTicketsTable.problems'),
|
label: t('salesTicketsTable.problems'),
|
||||||
name: 'totalProblems',
|
name: 'totalProblems',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
attrs: {
|
attrs: {
|
||||||
dense: true,
|
dense: true,
|
||||||
|
@ -65,7 +64,6 @@ const columns = computed(() => [
|
||||||
name: 'id',
|
name: 'id',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
|
@ -108,9 +106,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('salesTicketsTable.date'),
|
label: t('salesTicketsTable.date'),
|
||||||
name: 'shippedDate',
|
name: 'shippedDate',
|
||||||
style: { 'max-width': '100px' },
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'date',
|
component: 'date',
|
||||||
name: 'shippedDate',
|
name: 'shippedDate',
|
||||||
|
@ -164,7 +160,6 @@ const columns = computed(() => [
|
||||||
label: t('salesTicketsTable.state'),
|
label: t('salesTicketsTable.state'),
|
||||||
name: 'state',
|
name: 'state',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
style: { 'max-width': '100px' },
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
name: 'stateFk',
|
name: 'stateFk',
|
||||||
|
@ -193,7 +188,6 @@ const columns = computed(() => [
|
||||||
label: t('salesTicketsTable.zone'),
|
label: t('salesTicketsTable.zone'),
|
||||||
name: 'zoneFk',
|
name: 'zoneFk',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
name: 'zoneFk',
|
name: 'zoneFk',
|
||||||
|
@ -210,8 +204,6 @@ const columns = computed(() => [
|
||||||
name: 'totalWithVat',
|
name: 'totalWithVat',
|
||||||
field: 'totalWithVat',
|
field: 'totalWithVat',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
style: { 'max-width': '75px' },
|
|
||||||
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
name: 'totalWithVat',
|
name: 'totalWithVat',
|
||||||
|
@ -370,7 +362,7 @@ const openTab = (id) =>
|
||||||
</QCheckbox>
|
</QCheckbox>
|
||||||
</template>
|
</template>
|
||||||
<template #column-totalProblems="{ row }">
|
<template #column-totalProblems="{ row }">
|
||||||
<QTd class="no-padding" style="max-width: 60px">
|
<span>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row.isTaxDataChecked === 0"
|
v-if="row.isTaxDataChecked === 0"
|
||||||
name="vn:no036"
|
name="vn:no036"
|
||||||
|
@ -424,46 +416,40 @@ const openTab = (id) =>
|
||||||
>
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</QTd>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-id="{ row }">
|
<template #column-id="{ row }">
|
||||||
<QTd class="no-padding">
|
<span class="link" @click.stop.prevent>
|
||||||
<span class="link" @click.stop.prevent>
|
{{ row.id }}
|
||||||
{{ row.id }}
|
<TicketDescriptorProxy :id="row.id" />
|
||||||
<TicketDescriptorProxy :id="row.id" />
|
</span>
|
||||||
</span>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
<template #column-clientFk="{ row }">
|
<template #column-clientFk="{ row }">
|
||||||
<QTd class="no-padding" @click.stop :title="row.nickname">
|
<div @click.stop :title="row.nickname">
|
||||||
<span class="link">{{ row.nickname }}</span>
|
<span class="link" v-text="row.nickname" />
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</QTd>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-salesPersonFk="{ row }">
|
<template #column-salesPersonFk="{ row }">
|
||||||
<QTd class="no-padding" @click.stop :title="row.userName">
|
<div @click.stop :title="row.userName">
|
||||||
<span class="link" v-text="dashIfEmpty(row.userName)" />
|
<span class="link" v-text="dashIfEmpty(row.userName)" />
|
||||||
<WorkerDescriptorProxy :id="row.salesPersonFk" />
|
<WorkerDescriptorProxy :id="row.salesPersonFk" />
|
||||||
</QTd>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-shippedDate="{ row }">
|
<template #column-shippedDate="{ row }">
|
||||||
<QTd class="no-padding">
|
<QBadge
|
||||||
<QBadge
|
v-bind="getBadgeAttrs(row.shippedDate)"
|
||||||
v-bind="getBadgeAttrs(row.shippedDate)"
|
class="q-pa-sm"
|
||||||
class="q-pa-sm"
|
style="font-size: 14px"
|
||||||
style="font-size: 14px"
|
>
|
||||||
>
|
{{ formatShippedDate(row.shippedDate) }}
|
||||||
{{ formatShippedDate(row.shippedDate) }}
|
</QBadge>
|
||||||
</QBadge>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
<template #column-provinceFk="{ row }">
|
<template #column-provinceFk="{ row }">
|
||||||
<QTd class="no-padding">
|
<span :title="row.province" v-text="row.province" />
|
||||||
<span :title="row.province" v-text="row.province" />
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
<template #column-state="{ row }">
|
<template #column-state="{ row }">
|
||||||
<QTd class="no-padding" @click.stop.prevent>
|
<div @click.stop.prevent>
|
||||||
<div v-if="row.refFk">
|
<div v-if="row.refFk">
|
||||||
<span class="link">{{ row.refFk }}</span>
|
<span class="link">{{ row.refFk }}</span>
|
||||||
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
||||||
|
@ -477,32 +463,33 @@ const openTab = (id) =>
|
||||||
>
|
>
|
||||||
{{ row.state }}
|
{{ row.state }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</QTd>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-isFragile="{ row }">
|
<template #column-isFragile="{ row }">
|
||||||
<QTd class="no-padding">
|
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
|
||||||
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
|
<QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.isFragile') }}</QTooltip>
|
</QIcon>
|
||||||
</QIcon>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
<template #column-zoneFk="{ row }">
|
<template #column-zoneFk="{ row }">
|
||||||
<QTd class="no-padding" @click.stop.prevent :title="row.zoneName">
|
<div @click.stop.prevent :title="row.zoneName">
|
||||||
<span class="link">{{ row.zoneName }}</span>
|
<span class="link">{{ row.zoneName }}</span>
|
||||||
<ZoneDescriptorProxy :id="row.zoneFk" />
|
<ZoneDescriptorProxy :id="row.zoneFk" />
|
||||||
</QTd>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-totalWithVat="{ row }">
|
<template #column-totalWithVat="{ row }">
|
||||||
<QTd class="no-padding">
|
<QBadge
|
||||||
<QBadge
|
:color="totalPriceColor(row) || 'transparent'"
|
||||||
:color="totalPriceColor(row) || 'transparent'"
|
:text-color="totalPriceColor(row) ? 'black' : 'white'"
|
||||||
:text-color="totalPriceColor(row) ? 'black' : 'white'"
|
class="q-pa-sm"
|
||||||
class="q-pa-sm"
|
style="font-size: 14px"
|
||||||
style="font-size: 14px"
|
>
|
||||||
>
|
{{ toCurrency(row.totalWithVat) }}
|
||||||
{{ toCurrency(row.totalWithVat) }}
|
</QBadge>
|
||||||
</QBadge>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
td .q-icon {
|
||||||
|
margin: 0 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -374,8 +374,10 @@ function addOrder(value, field, params) {
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mt-lg">
|
<QItem class="q-mt-lg">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="filter-icon"
|
class="filter-icon"
|
||||||
@click="tagValues.push({})"
|
@click="tagValues.push({})"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -88,7 +88,7 @@ async function deleteWorCenter(id) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="dialog.show()" color="primary" fab icon="add">
|
<QBtn @click.stop="dialog.show()" color="primary" fab shortcut="+" icon="add">
|
||||||
<QDialog ref="dialog">
|
<QDialog ref="dialog">
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:title="t('Add work center')"
|
:title="t('Add work center')"
|
||||||
|
|
|
@ -103,8 +103,8 @@ es:
|
||||||
Roadmap: Troncal
|
Roadmap: Troncal
|
||||||
ETD date: Fecha ETD
|
ETD date: Fecha ETD
|
||||||
ETD hour: Hora ETD
|
ETD hour: Hora ETD
|
||||||
Tractor plate: Matrícula tractor
|
Tractor plate: Matrícula tractora
|
||||||
Trailer plate: Matrícula trailer
|
Trailer plate: Matrícula remolque
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Driver name: Nombre del conductor
|
Driver name: Nombre del conductor
|
||||||
|
|
|
@ -164,8 +164,8 @@ en:
|
||||||
to: To
|
to: To
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
tractorPlate: Matrícula del tractor
|
tractorPlate: Matrícula tractora
|
||||||
trailerPlate: Matrícula del trailer
|
trailerPlate: Matrícula remolque
|
||||||
supplierFk: Transportista
|
supplierFk: Transportista
|
||||||
price: Precio
|
price: Precio
|
||||||
driverName: Nombre del conductor
|
driverName: Nombre del conductor
|
||||||
|
@ -174,8 +174,8 @@ es:
|
||||||
to: Hasta
|
to: Hasta
|
||||||
From: Desde
|
From: Desde
|
||||||
To: Hasta
|
To: Hasta
|
||||||
Tractor Plate: Matrícula del tractor
|
Tractor Plate: Matrícula tractora
|
||||||
Trailer Plate: Matrícula del trailer
|
Trailer Plate: Matrícula remolque
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Driver name: Nombre del conductor
|
Driver name: Nombre del conductor
|
||||||
|
|
|
@ -149,8 +149,8 @@ const filter = {
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Tractor Plate: Matrícula tractor
|
Tractor Plate: Matrícula tractora
|
||||||
Trailer Plate: Matrícula trailer
|
Trailer Plate: Matrícula remolque
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
Worker: Trabajador
|
Worker: Trabajador
|
||||||
Observations: Observaciones
|
Observations: Observaciones
|
||||||
|
|
|
@ -237,4 +237,5 @@ es:
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Observations: Observaciones
|
Observations: Observaciones
|
||||||
Preview: Vista previa
|
Preview: Vista previa
|
||||||
|
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -396,7 +396,7 @@ const openSmsDialog = async () => {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[20, 20]">
|
<QPageSticky :offset="[20, 20]">
|
||||||
<QBtn fab icon="add" color="primary" @click="openTicketsDialog">
|
<QBtn fab icon="add" shortcut="+" color="primary" @click="openTicketsDialog">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add ticket') }}
|
{{ t('Add ticket') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -102,9 +102,7 @@ const setWireTransfer = async () => {
|
||||||
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
|
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-info">
|
<QIcon name="info" class="cursor-info">
|
||||||
<QTooltip>{{
|
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
|
||||||
t('components.iban_tooltip')
|
|
||||||
}}</QTooltip>
|
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
|
@ -165,9 +163,10 @@ const setWireTransfer = async () => {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="supplierAccountRef.insert()"
|
@click="supplierAccountRef.insert()"
|
||||||
|
@ -175,7 +174,7 @@ const setWireTransfer = async () => {
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add account') }}
|
{{ t('Add account') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -84,9 +84,10 @@ const insertRow = () => {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
|
@ -94,7 +95,7 @@ const insertRow = () => {
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add contact') }}
|
{{ t('Add contact') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -109,7 +109,7 @@ const getEntryQueryParams = (supplier) => {
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
data-key="supplier"
|
data-key="supplierDescriptor"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
|
|
|
@ -75,6 +75,19 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('supplier.list.tableVisibleColumns.country'),
|
||||||
|
name: 'country',
|
||||||
|
columnFilter: {
|
||||||
|
component: 'select',
|
||||||
|
name: 'countryFk',
|
||||||
|
attrs: {
|
||||||
|
url: 'countries',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -87,17 +87,18 @@ watch(
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<VnRow v-if="observationTypes.length > rows.length">
|
<VnRow v-if="observationTypes.length > rows.length">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="fill-icon-on-hover q-ml-md"
|
class="fill-icon-on-hover q-ml-md"
|
||||||
size="sm"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="ticketNotesCrudRef.insert()"
|
@click="ticketNotesCrudRef.insert()"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('ticketNotes.addNote') }}
|
{{ t('ticketNotes.addNote') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -114,17 +114,20 @@ watch(
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<QIcon
|
<VnRow>
|
||||||
name="add_circle"
|
<QBtn
|
||||||
class="fill-icon-on-hover q-ml-md"
|
icon="add_circle"
|
||||||
size="sm"
|
shortcut="+"
|
||||||
color="primary"
|
flat
|
||||||
@click="ticketPackagingsCrudRef.insert()"
|
class="fill-icon-on-hover q-ml-md"
|
||||||
>
|
color="primary"
|
||||||
<QTooltip>
|
@click="ticketPackagingsCrudRef.insert()"
|
||||||
{{ t('package.addPackage') }}
|
>
|
||||||
</QTooltip>
|
<QTooltip>
|
||||||
</QIcon>
|
{{ t('package.addPackage') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
|
|
|
@ -736,6 +736,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
size="md"
|
size="md"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
|
shortcut="+"
|
||||||
:disable="!isTicketEditable"
|
:disable="!isTicketEditable"
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
>
|
>
|
||||||
|
@ -747,7 +748,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
||||||
<QPageSticky :offset="[20, 20]">
|
<QPageSticky :offset="[20, 20]">
|
||||||
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" />
|
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" shortcut="+" />
|
||||||
<QTooltip class="text-no-wrap">
|
<QTooltip class="text-no-wrap">
|
||||||
{{ t('Add item to basket') }}
|
{{ t('Add item to basket') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -184,6 +184,12 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="ticketServiceCrudRef.insert()" />
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
@click="ticketServiceCrudRef.insert()"
|
||||||
|
shortcut="+"
|
||||||
|
/>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -40,6 +40,7 @@ ticketSale:
|
||||||
address: Address
|
address: Address
|
||||||
transferLines: Transfer lines
|
transferLines: Transfer lines
|
||||||
advanceTickets:
|
advanceTickets:
|
||||||
|
preparation: Preparation
|
||||||
origin: Origin
|
origin: Origin
|
||||||
destination: Destination
|
destination: Destination
|
||||||
originAgency: 'Origin agency: {agency}'
|
originAgency: 'Origin agency: {agency}'
|
||||||
|
|
|
@ -86,6 +86,7 @@ weeklyTickets:
|
||||||
search: Buscar por tickets programados
|
search: Buscar por tickets programados
|
||||||
searchInfo: Buscar tickets programados por el identificador o el identificador del cliente
|
searchInfo: Buscar tickets programados por el identificador o el identificador del cliente
|
||||||
advanceTickets:
|
advanceTickets:
|
||||||
|
preparation: Preparación
|
||||||
origin: Origen
|
origin: Origen
|
||||||
destination: Destinatario
|
destination: Destinatario
|
||||||
originAgency: 'Agencia origen: {agency}'
|
originAgency: 'Agencia origen: {agency}'
|
||||||
|
|
|
@ -28,18 +28,8 @@ const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const thermographFilter = {
|
|
||||||
fields: ['thermographFk'],
|
|
||||||
where: {
|
|
||||||
travelFk: null,
|
|
||||||
},
|
|
||||||
order: 'thermographFk ASC',
|
|
||||||
};
|
|
||||||
const fetchTravelThermographsRef = ref(null);
|
|
||||||
const allowedContentTypes = ref('');
|
const allowedContentTypes = ref('');
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const thermographsOptions = ref([]);
|
|
||||||
const dmsTypesOptions = ref([]);
|
const dmsTypesOptions = ref([]);
|
||||||
const companiesOptions = ref([]);
|
const companiesOptions = ref([]);
|
||||||
const warehousesOptions = ref([]);
|
const warehousesOptions = ref([]);
|
||||||
|
@ -168,24 +158,15 @@ const updateThermograph = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onThermographCreated = async (data) => {
|
const onThermographCreated = async (data) => {
|
||||||
await fetchTravelThermographsRef.value.fetch();
|
thermographForm.thermographId = data.id;
|
||||||
thermographForm.thermographId = data.thermographId;
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="DmsContainers/allowedContentTypes"
|
url="DmsContainers/allowedContentTypes"
|
||||||
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
|
@on-fetch="(data) => (allowedContentTypes = data.join(', '))"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
|
||||||
ref="fetchTravelThermographsRef"
|
|
||||||
url="TravelThermographs"
|
|
||||||
@on-fetch="(data) => (thermographsOptions = data)"
|
|
||||||
:filter="thermographFilter"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
url="DmsTypes"
|
url="DmsTypes"
|
||||||
:filter="{ order: 'name' }"
|
:filter="{ order: 'name' }"
|
||||||
|
@ -239,15 +220,20 @@ const onThermographCreated = async (data) => {
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
:label="t('travel.thermographs.thermograph')"
|
:label="t('travel.thermographs.thermograph')"
|
||||||
v-model="thermographForm.thermographId"
|
v-model="thermographForm.thermographId"
|
||||||
:options="thermographsOptions"
|
url="TravelThermographs"
|
||||||
option-value="thermographFk"
|
option-value="thermographFk"
|
||||||
option-label="thermographFk"
|
option-label="thermographFk"
|
||||||
|
:fields="['thermographFk']"
|
||||||
|
:where="{ travelFk: null }"
|
||||||
|
sort-by="thermographFk ASC"
|
||||||
:disable="viewAction === 'edit'"
|
:disable="viewAction === 'edit'"
|
||||||
:tooltip="t('New thermograph')"
|
:tooltip="t('New thermograph')"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateThermographForm
|
<CreateThermographForm
|
||||||
@on-data-saved="onThermographCreated($event, data)"
|
@on-data-saved="
|
||||||
|
(data) => (thermographForm.thermographId = data.id)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnSelectDialog>
|
</VnSelectDialog>
|
||||||
|
@ -323,7 +309,6 @@ const onThermographCreated = async (data) => {
|
||||||
</QForm>
|
</QForm>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Select files: Selecciona ficheros
|
Select files: Selecciona ficheros
|
||||||
|
|
|
@ -112,6 +112,7 @@ warehouses();
|
||||||
<template #append>
|
<template #append>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="add"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
size="12px"
|
size="12px"
|
||||||
|
|
|
@ -11,6 +11,9 @@ import TravelSummary from './Card/TravelSummary.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||||
|
import { dateRange } from 'src/filters';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -24,11 +27,27 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
handleScopeDays();
|
||||||
|
});
|
||||||
|
|
||||||
const cloneTravel = (travelData) => {
|
const cloneTravel = (travelData) => {
|
||||||
const stringifiedTravelData = JSON.stringify(travelData);
|
const stringifiedTravelData = JSON.stringify(travelData);
|
||||||
redirectToCreateView(stringifiedTravelData);
|
redirectToCreateView(stringifiedTravelData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function handleScopeDays(days = 7) {
|
||||||
|
days = +days;
|
||||||
|
tableRef.value.params.scopeDays = days;
|
||||||
|
const [landedFrom, landedTo] = dateRange(Date.vnNew());
|
||||||
|
landedTo.setDate(landedTo.getDate() + days);
|
||||||
|
|
||||||
|
tableRef.value.params.landedFrom = landedFrom;
|
||||||
|
tableRef.value.params.landedTo = landedTo;
|
||||||
|
}
|
||||||
|
|
||||||
const redirectToCreateView = (queryParams) => {
|
const redirectToCreateView = (queryParams) => {
|
||||||
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
|
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
|
||||||
};
|
};
|
||||||
|
@ -37,10 +56,6 @@ const redirectCreateEntryView = (travelData) => {
|
||||||
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -241,6 +256,17 @@ const columns = computed(() => [
|
||||||
:class="{ 'is-active': row.isReceived }"
|
:class="{ 'is-active': row.isReceived }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #moreFilterPanel="{ params }">
|
||||||
|
<VnInputNumber
|
||||||
|
:label="t('params.scopeDays')"
|
||||||
|
v-model.number="params.scopeDays"
|
||||||
|
@keyup.enter="(evt) => handleScopeDays(evt.target.value)"
|
||||||
|
@remove="handleScopeDays()"
|
||||||
|
class="q-px-xs q-pr-lg"
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ async function remove(row) {
|
||||||
url-create="WagonTypes"
|
url-create="WagonTypes"
|
||||||
model="WagonType"
|
model="WagonType"
|
||||||
:form-initial-data="initialData"
|
:form-initial-data="initialData"
|
||||||
@on-data-saved="window.location.reload()"
|
@on-data-saved="tableRef.reload()"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const tableRef = ref();
|
||||||
const filter = {
|
const filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'type',
|
relation: 'type',
|
||||||
|
@ -107,9 +107,7 @@ async function remove(row) {
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Wagons',
|
urlCreate: 'Wagons',
|
||||||
title: t('Create new wagon'),
|
title: t('Create new wagon'),
|
||||||
onDataSaved: () => {
|
onDataSaved: () => tableRef.reload(),
|
||||||
window.location.reload();
|
|
||||||
},
|
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
|
@ -152,7 +152,11 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
||||||
<VnLv :label="t('worker.card.email')" :value="entity.user?.email" copy />
|
<VnLv
|
||||||
|
:label="t('worker.card.email')"
|
||||||
|
:value="entity.user?.emailUser?.email"
|
||||||
|
copy
|
||||||
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.department')"
|
:label="t('worker.list.department')"
|
||||||
:value="entity.department ? entity.department.department.name : null"
|
:value="entity.department ? entity.department.department.name : null"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, computed } from 'vue';
|
import { ref, onBeforeMount, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import axios from 'axios';
|
||||||
import { dashIfEmpty, toDate } from 'src/filters';
|
import { dashIfEmpty, toDate } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
|
@ -11,6 +11,7 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
||||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -23,64 +24,27 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const workerUrl = ref();
|
const basicDataUrl = ref(null);
|
||||||
|
const isHr = computed(() => useRole().hasAny(['hr']));
|
||||||
|
const advancedSummary = ref();
|
||||||
|
|
||||||
onMounted(async () => {
|
onBeforeMount(async () => {
|
||||||
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
if (isHr.value) {
|
||||||
|
advancedSummary.value = (
|
||||||
|
await axios.get('Workers/advancedSummary', {
|
||||||
|
params: { filter: { where: { id: entityId.value } } },
|
||||||
|
})
|
||||||
|
).data[0];
|
||||||
|
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['name', 'nickname', 'roleFk'],
|
|
||||||
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'role',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'emailUser',
|
|
||||||
scope: {
|
|
||||||
fields: ['email'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
include: {
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'boss',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'client',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'sip',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardSummary
|
<CardSummary
|
||||||
ref="summary"
|
ref="summary"
|
||||||
:url="`Workers/${entityId}`"
|
:url="`Workers/summary`"
|
||||||
:filter="filter"
|
:filter="{ where: { id: entityId } }"
|
||||||
data-key="WorkerSummary"
|
data-key="WorkerSummary"
|
||||||
>
|
>
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
|
@ -88,10 +52,7 @@ const filter = {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: worker }">
|
<template #body="{ entity: worker }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle :url="basicDataUrl" :text="t('worker.summary.basicData')" />
|
||||||
:url="`#/worker/${entityId}/basic-data`"
|
|
||||||
:text="t('worker.summary.basicData')"
|
|
||||||
/>
|
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker.user?.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker.user?.nickname" />
|
||||||
<VnLv :label="t('worker.list.department')">
|
<VnLv :label="t('worker.list.department')">
|
||||||
<template #value>
|
<template #value>
|
||||||
|
@ -128,13 +89,9 @@ const filter = {
|
||||||
<VnLinkPhone :phone-number="worker.client?.phone" />
|
<VnLinkPhone :phone-number="worker.client?.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one" v-if="advancedSummary">
|
||||||
<VnTitle
|
<VnTitle :url="basicDataUrl" :text="t('worker.summary.basicData')" />
|
||||||
:url="`#/worker/${entityId}/basic-data`"
|
|
||||||
:text="t('worker.summary.basicData')"
|
|
||||||
/>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.summary.fiDueDate')"
|
:label="t('worker.summary.fiDueDate')"
|
||||||
:value="toDate(worker.fiDueDate)"
|
:value="toDate(worker.fiDueDate)"
|
||||||
|
@ -162,7 +119,6 @@ const filter = {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :text="t('worker.summary.userData')" />
|
<VnTitle :text="t('worker.summary.userData')" />
|
||||||
<VnLv :label="t('worker.summary.userId')" :value="worker?.user?.id" />
|
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker?.user?.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker?.user?.nickname" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.email')"
|
:label="t('worker.list.email')"
|
||||||
|
|
|
@ -561,15 +561,16 @@ onMounted(async () => {
|
||||||
<span class="q-mb-md text-sm text-body1">
|
<span class="q-mb-md text-sm text-body1">
|
||||||
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
||||||
</span>
|
</span>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="fill-icon cursor-pointer"
|
class="fill-icon cursor-pointer"
|
||||||
size="sm"
|
|
||||||
@click="showWorkerTimeForm(day.dayData?.dated, 'create')"
|
@click="showWorkerTimeForm(day.dayData?.dated, 'create')"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Add time') }}</QTooltip>
|
<QTooltip>{{ t('Add time') }}</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
|
|
|
@ -180,17 +180,18 @@ function handleEvent(type, event, node) {
|
||||||
{{ t('Remove') }}
|
{{ t('Remove') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
size="sm"
|
flat
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click.stop="showCreateNodeForm(node.id)"
|
@click.stop="showCreateNodeForm(node.id)"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Create') }}
|
{{ t('Create') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -64,6 +64,15 @@ const agencyOptions = ref([]);
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<VnInput
|
||||||
|
class="mw-10"
|
||||||
|
v-model="data.itemMaxLength"
|
||||||
|
:label="t('Max length m³')"
|
||||||
|
clearable
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -128,4 +137,5 @@ es:
|
||||||
Bonus: Bonificación
|
Bonus: Bonificación
|
||||||
Inflation: Inflación
|
Inflation: Inflación
|
||||||
Volumetric: Volumétrico
|
Volumetric: Volumétrico
|
||||||
|
Max length m³: Medida máxima tumbado
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -74,7 +74,7 @@ async function remove(row) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn @click="create" fab icon="add" color="primary" />
|
<QBtn @click="create" fab icon="add" shortcut="+" color="primary" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -74,7 +74,7 @@ async function remove(row) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn @click="create" fab icon="add" color="primary" />
|
<QBtn @click="create" fab icon="add" shortcut="+" color="primary" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('ClaimDevelopment', () => {
|
||||||
cy.wait(['@workers', '@workers']);
|
cy.wait(['@workers', '@workers']);
|
||||||
cy.addCard();
|
cy.addCard();
|
||||||
|
|
||||||
cy.get(thirdRow).should('exist');
|
cy.waitForElement(thirdRow);
|
||||||
|
|
||||||
const rowData = [
|
const rowData = [
|
||||||
false,
|
false,
|
||||||
|
|
|
@ -6,7 +6,6 @@ describe('EntryStockBought', () => {
|
||||||
});
|
});
|
||||||
it('Should edit the reserved space', () => {
|
it('Should edit the reserved space', () => {
|
||||||
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
||||||
cy.get('tBody > tr').its('length').should('eq', 2);
|
|
||||||
cy.get('input[name="reserve"]').type('10{enter}');
|
cy.get('input[name="reserve"]').type('10{enter}');
|
||||||
cy.get('button[title="Save"]').click();
|
cy.get('button[title="Save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
|
@ -18,7 +17,6 @@ describe('EntryStockBought', () => {
|
||||||
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
||||||
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||||
cy.get('tBody > tr').its('length').should('eq', 3);
|
|
||||||
});
|
});
|
||||||
it('Should check detail for the buyer', () => {
|
it('Should check detail for the buyer', () => {
|
||||||
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
||||||
|
|
|
@ -34,22 +34,25 @@ describe('VnLocation', () => {
|
||||||
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
});
|
});
|
||||||
it('Fin by postalCode', () => {
|
it('Find by postalCode', () => {
|
||||||
const postCode = '46600';
|
const postCode = '46600';
|
||||||
|
const postCodeLabel = '46600, Valencia(Province one), España';
|
||||||
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
|
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
|
||||||
|
|
||||||
cy.get(inputLocation).click();
|
cy.get(inputLocation).click();
|
||||||
cy.get(inputLocation).clear();
|
cy.get(inputLocation).clear();
|
||||||
cy.get(inputLocation).type(postCode);
|
cy.get(inputLocation).type(postCode);
|
||||||
cy.get(locationOptions).should('have.length.at.least', 2);
|
cy.get(locationOptions)
|
||||||
|
.get(':nth-child(1)')
|
||||||
|
.should('have.length.at.least', 2);
|
||||||
|
cy.get(
|
||||||
|
firstOption.concat(' > .q-item__section > .q-item__label--caption')
|
||||||
|
).should('have.text', postCodeLabel);
|
||||||
cy.get(firstOption).click();
|
cy.get(firstOption).click();
|
||||||
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
|
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
|
||||||
cy.reload();
|
cy.reload();
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.get(inputLocation).should(
|
cy.get(inputLocation).should('have.value', postCodeLabel);
|
||||||
'have.value',
|
|
||||||
'46600 - Valencia(Province one), España'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Create postCode', () => {
|
it('Create postCode', () => {
|
||||||
|
|
|
@ -11,7 +11,9 @@ describe('WagonCreate', () => {
|
||||||
cy.get('input').eq(1).type('1234ABCD');
|
cy.get('input').eq(1).type('1234ABCD');
|
||||||
cy.get('input').eq(2).type('100');
|
cy.get('input').eq(2).type('100');
|
||||||
cy.get('input').eq(3).click();
|
cy.get('input').eq(3).click();
|
||||||
cy.get('div[role="listbox"]').find('div.q-item').click();
|
cy.get('.q-select > .q-field__inner > .q-field__control').type(
|
||||||
|
'{downarrow}{enter}'
|
||||||
|
);
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
|
@ -19,12 +21,22 @@ describe('WagonCreate', () => {
|
||||||
// Check data has been saved successfully
|
// Check data has been saved successfully
|
||||||
cy.waitForElement('.q-card');
|
cy.waitForElement('.q-card');
|
||||||
|
|
||||||
cy.get('.title').should('have.text', '1234');
|
cy.get(
|
||||||
cy.get('[title-label="Plate"] > .value > span').should('have.text', '1234ABCD');
|
'[to="/null/1"] > .q-card > .no-padding > .q-py-none > .cursor-text'
|
||||||
cy.get(':nth-child(2) > .value > span').should('have.text', '100');
|
).should('have.text', '1234');
|
||||||
cy.get(':nth-child(3) > .value > span').should('have.text', 'Wagon Type #1');
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(1) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', '1234ABCD');
|
||||||
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(2) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', '100');
|
||||||
|
cy.get(
|
||||||
|
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(3) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
||||||
|
).should('have.text', 'Wagon Type #1');
|
||||||
|
|
||||||
// Delete wagon type created
|
// Delete wagon type created
|
||||||
cy.get('.actions > .q-btn--standard').click();
|
cy.get(
|
||||||
|
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||||
|
).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe('WagonTypeCreate', () => {
|
||||||
});
|
});
|
||||||
it('delete a wagon type', () => {
|
it('delete a wagon type', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
':nth-child(2) > :nth-child(1) > .card-list-body > .actions > .q-btn--standard'
|
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('WagonTypeEdit', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/wagon/type/2/edit');
|
cy.visit('/#/wagon/type/1/edit');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the name and the divisible field of the wagon type', () => {
|
it('should edit the name and the divisible field of the wagon type', () => {
|
||||||
|
@ -14,14 +14,14 @@ describe('WagonTypeEdit', () => {
|
||||||
cy.get('.q-btn--standard').click();
|
cy.get('.q-btn--standard').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a tray', () => {
|
|
||||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').click();
|
|
||||||
cy.get('input').last().type('150');
|
|
||||||
cy.get(trayColorRow).type('{downArrow}{downArrow}{enter}');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should delete a tray', () => {
|
it('should delete a tray', () => {
|
||||||
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
|
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').first().click();
|
||||||
cy.reload();
|
cy.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should create a tray', () => {
|
||||||
|
cy.get('.action-button > .q-btn > .q-btn__content > .q-icon').last().click();
|
||||||
|
cy.get('input').last().type('150');
|
||||||
|
cy.get(trayColorRow).type('{downArrow}{downArrow}{downArrow}{enter}');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -140,6 +140,7 @@ Cypress.Commands.add('removeCard', () => {
|
||||||
});
|
});
|
||||||
Cypress.Commands.add('addCard', () => {
|
Cypress.Commands.add('addCard', () => {
|
||||||
cy.waitForElement('tbody');
|
cy.waitForElement('tbody');
|
||||||
|
cy.waitForElement('.q-page-sticky > div > .q-btn');
|
||||||
cy.get('.q-page-sticky > div > .q-btn').click();
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||||
});
|
});
|
||||||
Cypress.Commands.add('clickConfirm', () => {
|
Cypress.Commands.add('clickConfirm', () => {
|
||||||
|
|
Loading…
Reference in New Issue