resolve conflicts
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
2ab7a45114
|
@ -93,13 +93,11 @@ module.exports = configure(function (/* ctx */) {
|
||||||
[
|
[
|
||||||
VueI18nPlugin({
|
VueI18nPlugin({
|
||||||
runtimeOnly: false,
|
runtimeOnly: false,
|
||||||
|
include: [
|
||||||
|
path.resolve(__dirname, './src/i18n/locale/**'),
|
||||||
|
path.resolve(__dirname, './src/pages/**/locale/**'),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
{
|
|
||||||
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
||||||
// compositionOnly: false,
|
|
||||||
// you need to set i18n resource including paths !
|
|
||||||
include: path.resolve(__dirname, './src/i18n/**'),
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
import messages from 'src/i18n';
|
import messages from 'src/i18n';
|
||||||
|
import { locales } from 'src/i18n/handle';
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
locale: navigator.language || navigator.userLanguage,
|
locale: navigator.language || navigator.userLanguage,
|
||||||
|
@ -12,8 +13,9 @@ const i18n = createI18n({
|
||||||
legacy: false,
|
legacy: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default boot(({ app }) => {
|
export default boot(async ({ app }) => {
|
||||||
// Set i18n instance on app
|
// Set i18n instance on app
|
||||||
|
await locales();
|
||||||
app.use(i18n);
|
app.use(i18n);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ const arrayData = useArrayData($props.dataKey || $props.module, {
|
||||||
skip: 0,
|
skip: 0,
|
||||||
});
|
});
|
||||||
const { store } = arrayData;
|
const { store } = arrayData;
|
||||||
const entity = computed(() => store.data);
|
const entity = computed(() =>Array.isArray( store.data) ? store.data[0] : store.data);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -67,7 +67,7 @@ async function getData() {
|
||||||
try {
|
try {
|
||||||
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
||||||
state.set($props.dataKey, data);
|
state.set($props.dataKey, data);
|
||||||
emit('onFetch', data);
|
emit('onFetch', Array.isArray(data) ? data[0] : data);
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ const arrayData = useArrayData(props.dataKey || route.meta.moduleName, {
|
||||||
skip: 0,
|
skip: 0,
|
||||||
});
|
});
|
||||||
const { store } = arrayData;
|
const { store } = arrayData;
|
||||||
const entity = computed(() => store.data);
|
const entity = computed(() => Array.isArray(store.data) ? store.data[0] : store.data);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="row" class="q-gutter-md q-mb-md">
|
<div class="vn-row q-gutter-md q-mb-md">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scopped>
|
<style lang="scss" scopped>
|
||||||
#row {
|
.vn-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
> * {
|
> * {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
#row {
|
.vn-row {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1310
src/i18n/en/index.js
1310
src/i18n/en/index.js
File diff suppressed because it is too large
Load Diff
1309
src/i18n/es/index.js
1309
src/i18n/es/index.js
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
||||||
|
const modules = import.meta.glob(`../pages/**/locale/**.yml`);
|
||||||
|
import translations from './index';
|
||||||
|
const LOCALE_EXTENSION = '.yml';
|
||||||
|
|
||||||
|
export async function locales() {
|
||||||
|
for await (const module of Object.keys(modules)) {
|
||||||
|
const splittedFile = module.split('/');
|
||||||
|
const lang = splittedFile.pop().split(LOCALE_EXTENSION)[0];
|
||||||
|
const moduleFiles = splittedFile.join('/') + '/' + lang + LOCALE_EXTENSION;
|
||||||
|
import(moduleFiles).then((t) => {
|
||||||
|
Object.assign(translations[lang], t.default);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return translations;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translations;
|
|
@ -1,9 +1,15 @@
|
||||||
import en from './en';
|
const files = import.meta.glob(`./locale/*.yml`);
|
||||||
import es from './es';
|
const translations = {};
|
||||||
export const localeEquivalence = {
|
|
||||||
'en':'en-GB'
|
for (const file in files) {
|
||||||
|
const lang = file.split('/').at(2).split('.')[0];
|
||||||
|
import(file).then((t) => {
|
||||||
|
translations[lang] = t.default;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
export default {
|
|
||||||
en: en,
|
export const localeEquivalence = {
|
||||||
es: es,
|
en: 'en-GB',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default translations;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -48,13 +48,17 @@ const zones = ref();
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput :label="t('Name')" v-model="params.name" is-outlined />
|
<VnInput
|
||||||
|
:label="t('customerFilter.filter.name')"
|
||||||
|
v-model="params.name"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Social Name')"
|
:label="t('customerFilter.filter.socialName')"
|
||||||
v-model="params.socialName"
|
v-model="params.socialName"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -170,8 +174,6 @@ en:
|
||||||
params:
|
params:
|
||||||
search: Contains
|
search: Contains
|
||||||
fi: FI
|
fi: FI
|
||||||
name: Name
|
|
||||||
socialName: Social Name
|
|
||||||
salesPersonFk: Salesperson
|
salesPersonFk: Salesperson
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
city: City
|
city: City
|
||||||
|
@ -183,8 +185,6 @@ es:
|
||||||
params:
|
params:
|
||||||
search: Contiene
|
search: Contiene
|
||||||
fi: NIF
|
fi: NIF
|
||||||
name: Nombre
|
|
||||||
socialName: Razón Social
|
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
provinceFk: Provincia
|
provinceFk: Provincia
|
||||||
city: Ciudad
|
city: Ciudad
|
||||||
|
@ -193,8 +193,6 @@ es:
|
||||||
zoneFk: Zona
|
zoneFk: Zona
|
||||||
postcode: CP
|
postcode: CP
|
||||||
FI: NIF
|
FI: NIF
|
||||||
Name: Nombre
|
|
||||||
Social Name: Razón social
|
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
Province: Provincia
|
Province: Provincia
|
||||||
City: Ciudad
|
City: Ciudad
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
customerFilter:
|
||||||
|
filter:
|
||||||
|
name: Name
|
||||||
|
socialName: Social name
|
|
@ -0,0 +1,4 @@
|
||||||
|
customerFilter:
|
||||||
|
filter:
|
||||||
|
name: Nombre
|
||||||
|
socialName: Razón Social
|
|
@ -1,19 +1,19 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import CrudModel from 'components/CrudModel.vue';
|
import CrudModel from 'components/CrudModel.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 VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const { params } = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const entryObservationsRef = ref(null);
|
const entryObservationsRef = ref(null);
|
||||||
const entryObservationsOptions = ref([]);
|
const entryObservationsOptions = ref([]);
|
||||||
|
const selected = ref([]);
|
||||||
|
|
||||||
const sortEntryObservationOptions = (data) => {
|
const sortEntryObservationOptions = (data) => {
|
||||||
entryObservationsOptions.value = [...data].sort((a, b) =>
|
entryObservationsOptions.value = [...data].sort((a, b) =>
|
||||||
|
@ -24,6 +24,29 @@ const sortEntryObservationOptions = (data) => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (entryObservationsRef.value) entryObservationsRef.value.reload();
|
if (entryObservationsRef.value) entryObservationsRef.value.reload();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
name: 'observationType',
|
||||||
|
label: t('entry.notes.observationType'),
|
||||||
|
field: (row) => row.observationTypeFk,
|
||||||
|
sortable: true,
|
||||||
|
options: entryObservationsOptions.value,
|
||||||
|
required: true,
|
||||||
|
model: 'observationTypeFk',
|
||||||
|
optionValue: 'id',
|
||||||
|
optionLabel: 'description',
|
||||||
|
tabIndex: 1,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
label: t('globals.description'),
|
||||||
|
field: (row) => row.description,
|
||||||
|
tabIndex: 2,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
|
]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -37,65 +60,90 @@ onMounted(() => {
|
||||||
model="EntryAccount"
|
model="EntryAccount"
|
||||||
:filter="{
|
:filter="{
|
||||||
fields: ['id', 'entryFk', 'observationTypeFk', 'description'],
|
fields: ['id', 'entryFk', 'observationTypeFk', 'description'],
|
||||||
where: { entryFk: route.params.id },
|
where: { entryFk: params.id },
|
||||||
}"
|
}"
|
||||||
ref="entryObservationsRef"
|
ref="entryObservationsRef"
|
||||||
:default-remove="false"
|
:data-required="{ entryFk: params.id }"
|
||||||
:data-required="{ entryFk: route.params.id }"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template #body="{ rows, validate }">
|
<template #body="{ rows, validate }">
|
||||||
<QCard class="q-pa-md">
|
<QTable
|
||||||
<VnRow
|
v-model:selected="selected"
|
||||||
v-for="(row, index) in rows"
|
:columns="columns"
|
||||||
:key="index"
|
:rows="rows"
|
||||||
class="row q-gutter-md q-mb-md"
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
>
|
row-key="$index"
|
||||||
<VnSelectFilter
|
selection="multiple"
|
||||||
:label="t('entry.notes.observationType')"
|
hide-pagination
|
||||||
v-model="row.observationTypeFk"
|
:grid="$q.screen.lt.md"
|
||||||
:options="entryObservationsOptions"
|
table-header-class="text-left"
|
||||||
:disable="!!row.id"
|
>
|
||||||
option-label="description"
|
<template #body-cell-observationType="{ row, col }">
|
||||||
option-value="id"
|
<QTd>
|
||||||
hide-selected
|
<VnSelectFilter
|
||||||
/>
|
v-model="row[col.model]"
|
||||||
|
:options="col.options"
|
||||||
<VnInput
|
:option-value="col.optionValue"
|
||||||
:label="t('globals.description')"
|
:option-label="col.optionLabel"
|
||||||
v-model="row.description"
|
:autofocus="col.tabIndex == 1"
|
||||||
:rules="validate('EntryObservation.description')"
|
input-debounce="0"
|
||||||
/>
|
hide-selected
|
||||||
|
:required="true"
|
||||||
<div class="row justify-center items-center">
|
/>
|
||||||
<QIcon
|
</QTd>
|
||||||
name="delete"
|
</template>
|
||||||
size="sm"
|
<template #body-cell-description="{ row, col }">
|
||||||
class="cursor-pointer"
|
<QTd>
|
||||||
color="primary"
|
<VnInput
|
||||||
@click="entryObservationsRef.remove([row])"
|
:label="t('globals.description')"
|
||||||
>
|
v-model="row[col.name]"
|
||||||
<QTooltip>
|
:rules="validate('EntryObservation.description')"
|
||||||
{{ t('Remove note') }}
|
/>
|
||||||
</QTooltip>
|
</QTd>
|
||||||
</QIcon>
|
</template>
|
||||||
|
<template #item="props">
|
||||||
|
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
|
||||||
|
<QCard bordered flat>
|
||||||
|
<QCardSection>
|
||||||
|
<QCheckbox v-model="props.selected" dense />
|
||||||
|
</QCardSection>
|
||||||
|
<QSeparator />
|
||||||
|
<QList dense>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnSelectFilter
|
||||||
|
v-model="props.row.observationTypeFk"
|
||||||
|
:options="entryObservationsOptions"
|
||||||
|
option-value="id"
|
||||||
|
option-label="description"
|
||||||
|
input-debounce="0"
|
||||||
|
hide-selected
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
:label="t('globals.description')"
|
||||||
|
v-model="props.row.description"
|
||||||
|
:rules="
|
||||||
|
validate('EntryObservation.description')
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</QList>
|
||||||
|
</QCard>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</template>
|
||||||
<QIcon
|
</QTable>
|
||||||
name="add"
|
|
||||||
size="sm"
|
|
||||||
class="cursor-pointer"
|
|
||||||
color="primary"
|
|
||||||
@click="entryObservationsRef.insert()"
|
|
||||||
>
|
|
||||||
<QTooltip>
|
|
||||||
{{ t('Add note') }}
|
|
||||||
</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</QCard>
|
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
|
<QBtn fab color="primary" icon="add" @click="entryObservationsRef.insert()" />
|
||||||
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Add note: Añadir nota
|
Add note: Añadir nota
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
@ -19,6 +21,11 @@ const props = defineProps({
|
||||||
const currenciesOptions = ref([]);
|
const currenciesOptions = ref([]);
|
||||||
const companiesOptions = ref([]);
|
const companiesOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
|
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -58,7 +65,7 @@ const suppliersOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.search"
|
v-model="params.search"
|
||||||
:label="t('params.search')"
|
:label="t('entryFilter.filter.search')"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -67,7 +74,7 @@ const suppliersOptions = ref([]);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.reference"
|
v-model="params.reference"
|
||||||
:label="t('params.reference')"
|
:label="t('entryFilter.filter.reference')"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -210,8 +217,7 @@ const suppliersOptions = ref([]);
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
search: General search
|
|
||||||
reference: Reference
|
|
||||||
invoiceNumber: Invoice number
|
invoiceNumber: Invoice number
|
||||||
travelFk: Travel
|
travelFk: Travel
|
||||||
companyFk: Company
|
companyFk: Company
|
||||||
|
@ -225,8 +231,7 @@ en:
|
||||||
isOrdered: Ordered
|
isOrdered: Ordered
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
search: Búsqueda general
|
|
||||||
reference: Referencia
|
|
||||||
invoiceNumber: Núm. factura
|
invoiceNumber: Núm. factura
|
||||||
travelFk: Envío
|
travelFk: Envío
|
||||||
companyFk: Empresa
|
companyFk: Empresa
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
entryList:
|
||||||
|
list:
|
||||||
|
inventoryEntry: 'Inventory entry'
|
||||||
|
virtualEntry: 'Virtual entry'
|
||||||
|
entryFilter:
|
||||||
|
filter:
|
||||||
|
search: 'General search'
|
||||||
|
reference: 'Reference'
|
|
@ -0,0 +1,8 @@
|
||||||
|
entryList:
|
||||||
|
list:
|
||||||
|
inventoryEntry: 'Es inventario'
|
||||||
|
virtualEntry: 'Es una redada'
|
||||||
|
entryFilter:
|
||||||
|
filter:
|
||||||
|
search: 'Búsqueda general'
|
||||||
|
reference: 'Referencia'
|
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
|
||||||
|
@ -63,7 +62,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.agencyModeFk')"
|
:label="t('travelFilter.filter.agencyModeFk')"
|
||||||
v-model="params.agencyModeFk"
|
v-model="params.agencyModeFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="agenciesOptions"
|
:options="agenciesOptions"
|
||||||
|
@ -79,7 +78,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.warehouseOutFk')"
|
:label="t('travelFilter.filter.warehouseOutFk')"
|
||||||
v-model="params.warehouseOutFk"
|
v-model="params.warehouseOutFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
|
@ -95,7 +94,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('params.warehouseInFk')"
|
:label="t('travelFilter.filter.warehouseInFk')"
|
||||||
v-model="params.warehouseInFk"
|
v-model="params.warehouseInFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
|
@ -113,7 +112,7 @@ const decrement = (paramsObj, key) => {
|
||||||
<QInput
|
<QInput
|
||||||
v-model="params.scopeDays"
|
v-model="params.scopeDays"
|
||||||
type="number"
|
type="number"
|
||||||
:label="t('params.scopeDays')"
|
:label="t('travelFilter.filter.scopeDays')"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
@ -211,10 +210,6 @@ const decrement = (paramsObj, key) => {
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
search: Id/Reference
|
search: Id/Reference
|
||||||
agencyModeFk: Agency
|
|
||||||
warehouseInFk: Warehouse In
|
|
||||||
warehouseOutFk: Warehouse Out
|
|
||||||
scopeDays: Days onward
|
|
||||||
landedFrom: Landed from
|
landedFrom: Landed from
|
||||||
landedTo: Landed to
|
landedTo: Landed to
|
||||||
continent: Continent out
|
continent: Continent out
|
||||||
|
@ -222,10 +217,6 @@ en:
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
search: Id/Referencia
|
search: Id/Referencia
|
||||||
agencyModeFk: Agencia
|
|
||||||
warehouseInFk: Alm. entrada
|
|
||||||
warehouseOutFk: Alm. salida
|
|
||||||
scopeDays: Días adelante
|
|
||||||
landedFrom: Llegada desde
|
landedFrom: Llegada desde
|
||||||
landedTo: Llegada hasta
|
landedTo: Llegada hasta
|
||||||
continent: Cont. Salida
|
continent: Cont. Salida
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
travelFilter:
|
||||||
|
filter:
|
||||||
|
warehouseOutFk: 'Warehouse Out'
|
||||||
|
warehouseInFk: 'Warehouse In'
|
||||||
|
agencyModeFk: 'Agency'
|
||||||
|
scopeDays: 'Days onward'
|
|
@ -0,0 +1,6 @@
|
||||||
|
travelFilter:
|
||||||
|
filter:
|
||||||
|
warehouseInFk: 'Alm. entrada'
|
||||||
|
warehouseOutFk: 'Alm. salida'
|
||||||
|
agencyModeFk: 'Agencia'
|
||||||
|
scopeDays: 'Días adelante'
|
|
@ -27,6 +27,7 @@ const workerFilter = {
|
||||||
},
|
},
|
||||||
{ relation: 'sip', scope: { fields: ['extension', 'secret'] } },
|
{ relation: 'sip', scope: { fields: ['extension', 'secret'] } },
|
||||||
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
{ relation: 'department', scope: { include: { relation: 'department' } } },
|
||||||
|
{ relation: 'client', scope: {fields:['phone']} },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const workersFilter = {
|
const workersFilter = {
|
||||||
|
@ -86,6 +87,7 @@ const maritalStatus = [
|
||||||
:label="t('Mobile extension')"
|
:label="t('Mobile extension')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<VnInput v-model="data.client.phone" :label="t('Personal phone')" clearable />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
@ -157,6 +159,7 @@ es:
|
||||||
Last name: Apellidos
|
Last name: Apellidos
|
||||||
Business phone: Teléfono de empresa
|
Business phone: Teléfono de empresa
|
||||||
Mobile extension: Extensión móvil
|
Mobile extension: Extensión móvil
|
||||||
|
Personal phone: Teléfono personal
|
||||||
Boss: Jefe
|
Boss: Jefe
|
||||||
Marital status: Estado civil
|
Marital status: Estado civil
|
||||||
Married: Casado/a
|
Married: Casado/a
|
||||||
|
|
|
@ -31,29 +31,7 @@ const entityId = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const worker = ref();
|
const worker = ref();
|
||||||
const filter = {
|
const filter = { where: { id: route.params.id}};
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['email', 'name', 'nickname'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'department',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'sip',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
const sip = ref(null);
|
const sip = ref(null);
|
||||||
|
|
||||||
|
@ -82,7 +60,7 @@ const setData = (entity) => {
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
module="Worker"
|
module="Worker"
|
||||||
data-key="workerData"
|
data-key="workerData"
|
||||||
:url="`Workers/${entityId}`"
|
:url="`Workers/summary`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const { params } = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -20,53 +20,18 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || params.id);
|
||||||
const workerUrl = ref();
|
const workerUrl = ref();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = {
|
const filter = { where: { id: entityId.value } };
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['email', 'name', 'nickname', 'roleFk'],
|
|
||||||
include: {
|
|
||||||
relation: 'role',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
include: {
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'boss',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'client',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'sip',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardSummary ref="summary" :url="`Workers/${entityId}`" :filter="filter">
|
<CardSummary ref="summary" :url="`Workers/summary`" :filter="filter">
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
|
<div>{{ entity.id }} - {{ entity.firstName }} {{ entity.lastName }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -103,12 +68,6 @@ const filter = {
|
||||||
<VnLinkPhone :phone-number="worker.phone" />
|
<VnLinkPhone :phone-number="worker.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="worker.client?.phone">
|
|
||||||
<template #label>
|
|
||||||
{{ t('worker.summary.personalPhone') }}
|
|
||||||
<VnLinkPhone :phone-number="worker.client?.phone" />
|
|
||||||
</template>
|
|
||||||
</VnLv>
|
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
|
|
|
@ -45,7 +45,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'SupplierCreate',
|
name: 'SupplierCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'supplierCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
component: () => import('src/pages/Supplier/SupplierCreate.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -55,7 +55,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'CustomerCreate',
|
name: 'CustomerCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'customerCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Customer/CustomerCreate.vue'),
|
component: () => import('src/pages/Customer/CustomerCreate.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,7 +34,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'EntryCreate',
|
name: 'EntryCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'entryCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Entry/EntryCreate.vue'),
|
component: () => import('src/pages/Entry/EntryCreate.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,7 +34,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'OrderCreate',
|
name: 'OrderCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'orderCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Order/Card/OrderForm.vue'),
|
component: () => import('src/pages/Order/Card/OrderForm.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,7 +34,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'routeCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Route/Card/RouteForm.vue'),
|
component: () => import('src/pages/Route/Card/RouteForm.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -34,7 +34,8 @@ export default {
|
||||||
path: 'create',
|
path: 'create',
|
||||||
name: 'ShelvingCreate',
|
name: 'ShelvingCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'create',
|
title: 'shelvingCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
component: () => import('src/pages/Shelving/Card/ShelvingForm.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,7 @@ export default {
|
||||||
name: 'TravelCreate',
|
name: 'TravelCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'travelCreate',
|
title: 'travelCreate',
|
||||||
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Travel/TravelCreate.vue'),
|
component: () => import('src/pages/Travel/TravelCreate.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default {
|
||||||
name: 'WorkerCreate',
|
name: 'WorkerCreate',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'workerCreate',
|
title: 'workerCreate',
|
||||||
icon: '',
|
icon: 'add',
|
||||||
},
|
},
|
||||||
component: () => import('src/pages/Worker/WorkerCreate.vue'),
|
component: () => import('src/pages/Worker/WorkerCreate.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue({
|
vue({
|
||||||
template: {
|
template: {
|
||||||
transformAssetUrls
|
transformAssetUrls,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
quasar({
|
quasar({
|
||||||
|
|
Loading…
Reference in New Issue