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
d38c85a0ef
|
@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2418.01]
|
||||||
|
|
||||||
## [2416.01] - 2024-04-18
|
## [2416.01] - 2024-04-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.16.0",
|
"version": "24.18.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ defineExpose({
|
||||||
<div class="q-mt-lg row justify-end">
|
<div class="q-mt-lg row justify-end">
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
|
:title="t('globals.save')"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
|
@ -85,6 +86,7 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.cancel')"
|
:label="t('globals.cancel')"
|
||||||
|
:title="t('globals.cancel')"
|
||||||
type="reset"
|
type="reset"
|
||||||
color="primary"
|
color="primary"
|
||||||
flat
|
flat
|
||||||
|
|
|
@ -77,6 +77,7 @@ const arrayData = useArrayData(props.dataKey, {
|
||||||
userParams: props.userParams,
|
userParams: props.userParams,
|
||||||
exprBuilder: props.exprBuilder,
|
exprBuilder: props.exprBuilder,
|
||||||
});
|
});
|
||||||
|
const hasMoreData = ref();
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -109,7 +110,6 @@ async function paginate() {
|
||||||
|
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
await arrayData.loadMore();
|
await arrayData.loadMore();
|
||||||
|
|
||||||
if (!arrayData.hasMoreData.value) {
|
if (!arrayData.hasMoreData.value) {
|
||||||
if (store.userParamsChanged) arrayData.hasMoreData.value = true;
|
if (store.userParamsChanged) arrayData.hasMoreData.value = true;
|
||||||
store.userParamsChanged = false;
|
store.userParamsChanged = false;
|
||||||
|
@ -127,6 +127,7 @@ async function paginate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function endPagination() {
|
function endPagination() {
|
||||||
|
hasMoreData.value = arrayData.hasMoreData.value;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
emit('onPaginate');
|
emit('onPaginate');
|
||||||
|
@ -195,10 +196,7 @@ defineExpose({ fetch, addFilter });
|
||||||
<QSpinner color="orange" size="md" />
|
<QSpinner color="orange" size="md" />
|
||||||
</div>
|
</div>
|
||||||
</QInfiniteScroll>
|
</QInfiniteScroll>
|
||||||
<div
|
<div v-if="!isLoading && hasMoreData" class="w-full flex justify-center q-mt-md">
|
||||||
v-if="!isLoading && arrayData.hasMoreData"
|
|
||||||
class="w-full flex justify-center q-mt-md"
|
|
||||||
>
|
|
||||||
<QBtn color="primary" :label="t('Load more data')" @click="paginate()" />
|
<QBtn color="primary" :label="t('Load more data')" @click="paginate()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
|
|
@ -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
|
@ -12,6 +12,7 @@ import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -177,7 +178,7 @@ function openDialog(dmsId) {
|
||||||
@on-fetch="getClaimDms"
|
@on-fetch="getClaimDms"
|
||||||
>
|
>
|
||||||
<template #header="{ entity: { claim } }">
|
<template #header="{ entity: { claim } }">
|
||||||
{{ claim.id }} - {{ claim.client.name }}
|
{{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }})
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
|
@ -214,10 +215,10 @@ function openDialog(dmsId) {
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('claim.summary.customer')">
|
<VnLv :label="t('claim.summary.customer')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link cursor-pointer">
|
||||||
:name="claim.client?.name"
|
{{ claim.client?.name }}
|
||||||
:worker-id="claim.client?.id"
|
<CustomerDescriptorProxy :id="claim.clientFk" />
|
||||||
/>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
|
|
@ -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"
|
||||||
|
selection="multiple"
|
||||||
|
hide-pagination
|
||||||
|
:grid="$q.screen.lt.md"
|
||||||
|
table-header-class="text-left"
|
||||||
>
|
>
|
||||||
|
<template #body-cell-observationType="{ row, col }">
|
||||||
|
<QTd>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
:label="t('entry.notes.observationType')"
|
v-model="row[col.model]"
|
||||||
v-model="row.observationTypeFk"
|
:options="col.options"
|
||||||
:options="entryObservationsOptions"
|
:option-value="col.optionValue"
|
||||||
:disable="!!row.id"
|
:option-label="col.optionLabel"
|
||||||
option-label="description"
|
:autofocus="col.tabIndex == 1"
|
||||||
option-value="id"
|
input-debounce="0"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
:required="true"
|
||||||
/>
|
/>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-description="{ row, col }">
|
||||||
|
<QTd>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.description')"
|
:label="t('globals.description')"
|
||||||
v-model="row.description"
|
v-model="row[col.name]"
|
||||||
:rules="validate('EntryObservation.description')"
|
:rules="validate('EntryObservation.description')"
|
||||||
/>
|
/>
|
||||||
|
</QTd>
|
||||||
<div class="row justify-center items-center">
|
</template>
|
||||||
<QIcon
|
<template #item="props">
|
||||||
name="delete"
|
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
|
||||||
size="sm"
|
<QCard bordered flat>
|
||||||
class="cursor-pointer"
|
<QCardSection>
|
||||||
color="primary"
|
<QCheckbox v-model="props.selected" dense />
|
||||||
@click="entryObservationsRef.remove([row])"
|
</QCardSection>
|
||||||
>
|
<QSeparator />
|
||||||
<QTooltip>
|
<QList dense>
|
||||||
{{ t('Remove note') }}
|
<QItem>
|
||||||
</QTooltip>
|
<QItemSection>
|
||||||
</QIcon>
|
<VnSelectFilter
|
||||||
</div>
|
v-model="props.row.observationTypeFk"
|
||||||
</VnRow>
|
:options="entryObservationsOptions"
|
||||||
<QIcon
|
option-value="id"
|
||||||
name="add"
|
option-label="description"
|
||||||
size="sm"
|
input-debounce="0"
|
||||||
class="cursor-pointer"
|
hide-selected
|
||||||
color="primary"
|
:required="true"
|
||||||
@click="entryObservationsRef.insert()"
|
/>
|
||||||
>
|
</QItemSection>
|
||||||
<QTooltip>
|
</QItem>
|
||||||
{{ t('Add note') }}
|
<QItem>
|
||||||
</QTooltip>
|
<QItemSection>
|
||||||
</QIcon>
|
<VnInput
|
||||||
|
:label="t('globals.description')"
|
||||||
|
v-model="props.row.description"
|
||||||
|
:rules="
|
||||||
|
validate('EntryObservation.description')
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</QList>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
</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'
|
|
@ -61,7 +61,7 @@ const data = ref(useCardDescription());
|
||||||
const setData = (entity) => {
|
const setData = (entity) => {
|
||||||
if (!entity) return;
|
if (!entity) return;
|
||||||
data.value = useCardDescription(entity.client.name, entity.id);
|
data.value = useCardDescription(entity.client.name, entity.id);
|
||||||
state.set('ClaimDescriptor', entity);
|
state.set('OrderDescriptor', entity);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getConfirmationValue = (isConfirmed) => {
|
const getConfirmationValue = (isConfirmed) => {
|
||||||
|
|
|
@ -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'
|
|
@ -5,37 +5,40 @@ describe('WagonTypeCreate', () => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/entry/${entryId}/dms`);
|
cy.visit(`/#/entry/${entryId}/dms`);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create edit and remove new dms', () => {
|
it('should create edit and remove new dms', () => {
|
||||||
cy.addRow();
|
cy.addRow();
|
||||||
cy.get('.icon-attach').click()
|
cy.get('.icon-attach').click();
|
||||||
cy.get('.q-file').selectFile('test/cypress/fixtures/image.jpg', {
|
cy.get('.q-file').selectFile('test/cypress/fixtures/image.jpg', {
|
||||||
force: true,
|
force: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get("tbody > tr").then((value) => {
|
cy.get('tbody > tr').then((value) => {
|
||||||
|
const u = undefined;
|
||||||
|
|
||||||
//Create and check if exist new row
|
//Create and check if exist new row
|
||||||
let newFileTd = Cypress.$(value).length;
|
let newFileTd = Cypress.$(value).length;
|
||||||
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
||||||
expect(value).to.have.length(newFileTd++);
|
expect(value).to.have.length(newFileTd++);
|
||||||
const newRowSelector = `tbody > :nth-child(${newFileTd})`
|
const newRowSelector = `tbody > :nth-child(${newFileTd})`;
|
||||||
cy.waitForElement(newRowSelector);
|
cy.waitForElement(newRowSelector);
|
||||||
|
cy.validateRow(newRowSelector, [u, u, u, u, 'ENTRADA ID 1']);
|
||||||
|
|
||||||
//Edit new dms
|
//Edit new dms
|
||||||
const u = undefined;
|
const newDescription = 'entry id 1 modified';
|
||||||
cy.validateRow(newRowSelector, [u,u,u,u,'ENTRADA ID 1'])
|
const textAreaSelector =
|
||||||
cy.get(`tbody :nth-child(${newFileTd}) > .text-right > .flex > :nth-child(2) > .q-btn > .q-btn__content > .q-icon`).click();
|
'.q-textarea > .q-field__inner > .q-field__control > .q-field__control-container';
|
||||||
})
|
cy.get(
|
||||||
// cy.log('newFileTd', newFileTd)
|
`tbody :nth-child(${newFileTd}) > .text-right > .no-wrap > :nth-child(2) > .q-btn > .q-btn__content > .q-icon`
|
||||||
|
).click();
|
||||||
|
|
||||||
// //Create and check if exist new row
|
cy.get(textAreaSelector).clear();
|
||||||
// cy.log('newFileTd:', newFileTd);
|
cy.get(textAreaSelector).type(newDescription);
|
||||||
// cy.get(`tbody :nth-child(${newFileTd}) > .text-right > .flex > :nth-child(2) > .q-btn > .q-btn__content > .q-icon`).click()
|
cy.saveCard();
|
||||||
|
cy.reload();
|
||||||
|
|
||||||
// cy.get(`tbody :nth-child(${newFileTd}) > :nth-child(5) > .q-tr > :nth-child(1) > span`).then((value) => {
|
cy.validateRow(newRowSelector, [u, u, u, u, newDescription]);
|
||||||
// cy.log(value)
|
});
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,6 +37,7 @@ describe('InvoiceInVat', () => {
|
||||||
|
|
||||||
it('should throw an error if there are fields undefined', () => {
|
it('should throw an error if there are fields undefined', () => {
|
||||||
cy.get(inputBtns).eq(0).click();
|
cy.get(inputBtns).eq(0).click();
|
||||||
|
cy.get(':nth-child(1) > .q-td.q-table--col-auto-width > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .default-icon').click();
|
||||||
cy.get(dialogBtns).eq(2).click();
|
cy.get(dialogBtns).eq(2).click();
|
||||||
cy.get('.q-notification__message').should('have.text', "The code can't be empty");
|
cy.get('.q-notification__message').should('have.text', "The code can't be empty");
|
||||||
});
|
});
|
||||||
|
@ -44,7 +45,7 @@ describe('InvoiceInVat', () => {
|
||||||
it('should correctly handle expense addition', () => {
|
it('should correctly handle expense addition', () => {
|
||||||
cy.get(inputBtns).eq(0).click();
|
cy.get(inputBtns).eq(0).click();
|
||||||
|
|
||||||
cy.get(dialogInputs).eq(0).click();
|
cy.get(':nth-child(1) > .q-td.q-table--col-auto-width > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .default-icon').click();
|
||||||
cy.get(dialogInputs).eq(0).type(randomInt);
|
cy.get(dialogInputs).eq(0).type(randomInt);
|
||||||
cy.get(dialogInputs).eq(1).click();
|
cy.get(dialogInputs).eq(1).click();
|
||||||
cy.get(dialogInputs).eq(1).type('This is a dummy expense');
|
cy.get(dialogInputs).eq(1).type('This is a dummy expense');
|
||||||
|
|
|
@ -8,9 +8,9 @@ describe('WorkerList', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load workers', () => {
|
it('should load workers', () => {
|
||||||
cy.get(workerFieldNames).eq(0).should('have.text', 'JessicaJones');
|
cy.get(workerFieldNames).eq(0).should('have.text', 'jessicajones');
|
||||||
cy.get(workerFieldNames).eq(1).should('have.text', 'BruceBanner');
|
cy.get(workerFieldNames).eq(1).should('have.text', 'brucebanner');
|
||||||
cy.get(workerFieldNames).eq(2).should('have.text', 'CharlesXavier');
|
cy.get(workerFieldNames).eq(2).should('have.text', 'charlesxavier');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open the worker summary', () => {
|
it('should open the worker summary', () => {
|
||||||
|
|
|
@ -60,7 +60,6 @@ describe('WorkerNotificationsManager', () => {
|
||||||
it('should active a notification if you are their boss', () => {
|
it('should active a notification if you are their boss', () => {
|
||||||
cy.login('salesBoss');
|
cy.login('salesBoss');
|
||||||
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
||||||
cy.waitForElement(activeList);
|
|
||||||
cy.waitForElement(availableList);
|
cy.waitForElement(availableList);
|
||||||
|
|
||||||
cy.get(activeList)
|
cy.get(activeList)
|
||||||
|
|
|
@ -6,7 +6,8 @@ describe('WorkerSummary', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load worker summary', () => {
|
it('should load worker summary', () => {
|
||||||
cy.get('.summaryHeader > div').should('have.text', '19 - salesBoss salesBoss');
|
cy.waitForElement('.summaryHeader');
|
||||||
|
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
||||||
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
||||||
'have.text',
|
'have.text',
|
||||||
'salesBossNick'
|
'salesBossNick'
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
vue({
|
vue({
|
||||||
template: {
|
template: {
|
||||||
transformAssetUrls
|
transformAssetUrls,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
quasar({
|
quasar({
|
||||||
|
|
Loading…
Reference in New Issue