Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8220-ItemsE2E
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
5de2805fa9
164
CHANGELOG.md
164
CHANGELOG.md
|
@ -1,3 +1,167 @@
|
||||||
|
# Version 24.52 - 2024-01-07
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- chore: refs #8197 remove console log by:alexm
|
||||||
|
- chore: refs #8197 replace name by:alexm
|
||||||
|
- chore: refs #8197 unnecessary file by:alexm
|
||||||
|
- feat: #8110 apply mixin in quasar components by:Javier Segarra
|
||||||
|
- feat(Account & AccountRole): refs #8197 add VnCardMain by:alexm
|
||||||
|
- feat: addDptoLink by:Jtubau
|
||||||
|
- feat: added restore ticket function in ticket descriptor menu by:Jon
|
||||||
|
- feat: add support service wip by:jorgep
|
||||||
|
- feat: focus menu searchbar by:jorgep
|
||||||
|
- feat: make additional data object by:jorgep
|
||||||
|
- feat: message to grant access by:jorgep
|
||||||
|
- feat: refs #6583 add default param by:jorgep
|
||||||
|
- feat: refs #6583 add destination opt filter by:jorgep
|
||||||
|
- feat: refs #6583 add icon by:jorgep
|
||||||
|
- feat: refs #6583 add locale by:jorgep
|
||||||
|
- feat: refs #7072 added test to computed fn total by:Jtubau
|
||||||
|
- feat: refs #7235 update invoice out global form to fetch config based on serial type by:jgallego
|
||||||
|
- feat: refs #7301 add exclude inventory supplier from list by:pablone
|
||||||
|
- feat: refs #7301 enhance VnDateBadge styling and improve ItemLastEntries component by:pablone
|
||||||
|
- feat: refs #7882 Added distribution point by:guillermo
|
||||||
|
- feat: refs #7882 Added longitude & latitude by:guillermo
|
||||||
|
- feat: refs #7936 add autocomplete on tab fn by:jorgep
|
||||||
|
- feat: refs #7936 add company filter by:jorgep
|
||||||
|
- feat: refs #7936 add currency check before fetching by:jorgep
|
||||||
|
- feat: refs #7936 add dueDated field by:jorgep
|
||||||
|
- feat: refs #7936 add number validation to VnInputNumber & new daysAgo filter in InvoiceInFilter by:jorgep
|
||||||
|
- feat: refs #7936 add optionCaption by:jorgep
|
||||||
|
- feat: refs #7936 add row click navigation to InvoiceInSerial by:jorgep
|
||||||
|
- feat: refs #7936 add unit tests by:jorgep
|
||||||
|
- feat: refs #7936 add useAccountShortToStandard composable by:jorgep
|
||||||
|
- feat: refs #7936 calculate exchange & update taxable base by:jorgep
|
||||||
|
- feat: refs #7936 enhance downloadFile function to support opening in a new tab by:jorgep
|
||||||
|
- feat: refs #7936 enhance getTotal fn & add unit tests by:jorgep
|
||||||
|
- feat: refs #7936 enhance vn-select by:jorgep
|
||||||
|
- feat: refs #7936 improve optionLabel logic in InvoiceInVat component for better handling of numeric values by:jorgep
|
||||||
|
- feat: refs #7936 limit decimal places by:jorgep
|
||||||
|
- feat: refs #7936 make fields required by:jorgep
|
||||||
|
- feat: refs #7936 show country code & isVies fields by:jorgep
|
||||||
|
- feat: refs #7936 show id & value by:jorgep
|
||||||
|
- feat: refs #7936 simplify optionLabel wip by:jorgep
|
||||||
|
- feat: refs #7936 update 'isVies' label to use global translation key by:jorgep
|
||||||
|
- feat: refs #7936 update option labels in InvoiceIn components for better clarity by:jorgep
|
||||||
|
- feat: refs #7936 use default invoice data by:jorgep
|
||||||
|
- feat: refs #8001 change request by:robert
|
||||||
|
- feat: refs #8001 ticketExpeditionGrafana by:robert
|
||||||
|
- feat: refs #8194 created VnSelectWorker component and use it in Lilium by:Jon
|
||||||
|
- feat: refs #8197 better leftMenu and VnCardMain improvements by:alexm
|
||||||
|
- feat: refs #8197 default leftMenu by:alexm
|
||||||
|
- feat: refs #8197 default sectionName by:alexm
|
||||||
|
- feat: refs #8197 keepData in VnSection by:alexm
|
||||||
|
- feat: refs #8197 vnTableFilter by:alexm
|
||||||
|
- feat: refs #8197 working rightMenu by:alexm
|
||||||
|
- feat: remove re-fetch when add element by:Javier Segarra
|
||||||
|
- feat: remove search after category by:Javier Segarra
|
||||||
|
- feat: requested changes in item module by:Jon
|
||||||
|
- feat: update quantity by:Javier Segarra
|
||||||
|
- feat(VnPaginate): refs #8197 hold data when change to Card by:alexm
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- perf: #6896 REMOVE COMMENTS by:Javier Segarra
|
||||||
|
- perf: qFormMixin by:Javier Segarra
|
||||||
|
- perf: qFormMixin improvement by:Javier Segarra
|
||||||
|
- perf: refs #8194 select worker component by:Jon
|
||||||
|
- perf: refs #8197 perf by:alexm
|
||||||
|
- perf: remove comments by:Javier Segarra
|
||||||
|
- perf: remove unused variables (origin/warmfix_noUsedVars) by:Javier Segarra
|
||||||
|
- refactor: added again search emit by:Jon
|
||||||
|
- refactor: add useCau composable by:jorgep
|
||||||
|
- refactor: deleted log by:Jon
|
||||||
|
- refactor: deleted onUnmounted code by:Jon
|
||||||
|
- refactor: deleted useless hidden tag by:Jon
|
||||||
|
- refactor: deleted warnings and corrected itemTag by:Jon
|
||||||
|
- refactor: drop logic by:jorgep
|
||||||
|
- refactor: ignore params when searching by id on searchbar (origin/VnSearchbar-SearchRemoveParams) by:Jon
|
||||||
|
- refactor: log error by:Jon
|
||||||
|
- refactor: refs #7936 locale by:jorgep
|
||||||
|
- refactor: refs #7936 simplify getTotal fn by:jorgep
|
||||||
|
- refactor: refs #7936 update label capitalization and replace invoice type options by:jorgep
|
||||||
|
- refactor: refs #8194 deleted unnecessary label by:Jon
|
||||||
|
- refactor: refs #8194 modified select worker template by:Jon
|
||||||
|
- refactor: refs #8194 modified select worker to allow no one filter from monitor ticket by:Jon
|
||||||
|
- refactor: refs #8194 moved translation to the correct place by:Jon
|
||||||
|
- refactor: refs #8194 requested changes by:Jon
|
||||||
|
- refactor: refs #8194 structure changes in component and related files by:Jon
|
||||||
|
- refactor: refs #8197 adapt AccountAcls to VnCardMain by:alexm
|
||||||
|
- refactor: refs #8197 adapt AccountAlias by:alexm
|
||||||
|
- refactor: refs #8197 adapt Ticket to VnCardMain by:alexm
|
||||||
|
- refactor: refs #8197 backward compatible (8197-VnCardMain_backwardCompatibility) by:alexm
|
||||||
|
- refactor: refs #8197 rename VnSectionMain to VnModule and VnCardMain to VnSection by:alexm
|
||||||
|
- refactor: refs #8288 changed invoice out spanish translation by:provira
|
||||||
|
- refactor: use locale keys by:jorgep
|
||||||
|
- refactor: use teleport to avoid qdrawer overlapping by:Jon
|
||||||
|
- refactor: use VnSelectWorker by:Jon
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- fix: account by:carlossa
|
||||||
|
- fix: account create by:carlossa
|
||||||
|
- fix: accountList create by:carlossa
|
||||||
|
- fix(AccountList): use $refs by:alexm
|
||||||
|
- fix: add data-key by:alexm
|
||||||
|
- fix: addLocales by:Jtubau
|
||||||
|
- fix: dated field by:Jon
|
||||||
|
- fix: e2e by:jorgep
|
||||||
|
- fix: fix department filter by:carlossa
|
||||||
|
- fix: fixed translations by:Javier Segarra
|
||||||
|
- fix: fixed translations by:provira
|
||||||
|
- fix: get total from api by:Javier Segarra
|
||||||
|
- fix: handle non-object options by:jorgep
|
||||||
|
- fix: monitorPayMethodFilter by:carlossa
|
||||||
|
- fix: orderBy priority by:Javier Segarra
|
||||||
|
- fix: prevent null by:jorgep
|
||||||
|
- fix: redirection vnTable VnTableFilter by:alexm
|
||||||
|
- fix: refs #6389 fix filter trad by:carlossa
|
||||||
|
- fix: refs #6389 fix front, filters, itp by:carlossa
|
||||||
|
- fix: refs #6389 front add packing filter by:carlossa
|
||||||
|
- fix: refs #6389 front by:carlossa
|
||||||
|
- fix: refs #6389 front filters by:carlossa
|
||||||
|
- fix: refs #6389 ipt by:carlossa
|
||||||
|
- fix: refs #6389 packing by:carlossa
|
||||||
|
- fix: refs #6583 update checkbox for filtering by destination in TicketAdvanceFilter by:jorgep
|
||||||
|
- fix: refs #7031 add test e2e by:carlossa
|
||||||
|
- fix: refs #7031 fix zoneTest by:carlossa
|
||||||
|
- fix: refs #7301 unnecessary console logs from ItemLastEntries.vue by:pablone
|
||||||
|
- fix: refs #7936 changes by:jorgep
|
||||||
|
- fix: refs #7936 decimal places & locale by:jorgep
|
||||||
|
- fix: refs #7936 descriptor & dueday by:jorgep
|
||||||
|
- fix: refs #7936 exclude disabled els on tab by:jorgep
|
||||||
|
- fix: refs #7936 format tax calculation to two decimal places by:jorgep
|
||||||
|
- fix: refs #7936 improve error handling by:jorgep
|
||||||
|
- fix: refs #7936 redirection by:jorgep
|
||||||
|
- fix: refs #7936 rollback by:jorgep
|
||||||
|
- fix: refs #7936 serial by:jorgep
|
||||||
|
- fix: refs #7936 tabulation wip by:jorgep
|
||||||
|
- fix: refs #7936 test by:jorgep
|
||||||
|
- fix: refs #8114 clean by:carlossa
|
||||||
|
- fix: refs #8114 fix agencyList by:carlossa
|
||||||
|
- fix: refs #8114 fix lifeCycle hooks by:carlossa
|
||||||
|
- fix: refs #8114 fix pr by:carlossa
|
||||||
|
- fix: refs #8114 fix removeAddress by:carlossa
|
||||||
|
- fix: refs #8114 orderList by:carlossa
|
||||||
|
- fix: refs #8114 remove logs by:carlossa
|
||||||
|
- fix: refs #8197 mapKey (origin/8197-perf_vnTableInside, 8197-perf_vnTableInside) by:alexm
|
||||||
|
- fix: refs #8197 redirection (8197-perf_redirection) by:alexm
|
||||||
|
- fix: refs #8197 staticParams and redirect by:alexm
|
||||||
|
- fix: refs #8197 vnPaginate onFetch emit by:alexm
|
||||||
|
- fix: refs #8197 vnPaginate when change :id by:alexm
|
||||||
|
- fix: refs #8197 vnTableFilter in vnTable by:alexm
|
||||||
|
- fix: refs #8315 ticketBoxing test by:alexm
|
||||||
|
- fix: remove url by:carlossa
|
||||||
|
- fix: rollback by:jorgep
|
||||||
|
- fix: test by:jorgep
|
||||||
|
- fix(VnDmsList): refs #8197 add mapKey by:alexm
|
||||||
|
- revert: refs #8197 arrayData changes by:alexm
|
||||||
|
- test: refs #8197 fix e2e by:alexm
|
||||||
|
- test: refs #8315 fix claimDevelopment fixtures by:alexm
|
||||||
|
- test: refs #8315 fix clientList by:alexm
|
||||||
|
- test: refs #8315 fix VnSelect in e2e by:alexm
|
||||||
|
|
||||||
# Version 24.50 - 2024-12-10
|
# Version 24.50 - 2024-12-10
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.02.0",
|
"version": "25.04.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -55,13 +55,6 @@ async function setCountry(countryFk, data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Province
|
// Province
|
||||||
|
|
||||||
async function handleProvinces(data) {
|
|
||||||
provincesOptions.value = data;
|
|
||||||
if (postcodeFormData.countryFk) {
|
|
||||||
await fetchTowns();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function setProvince(id, data) {
|
async function setProvince(id, data) {
|
||||||
if (data.provinceFk === id) return;
|
if (data.provinceFk === id) return;
|
||||||
const newProvince = provincesOptions.value.find((province) => province.id == id);
|
const newProvince = provincesOptions.value.find((province) => province.id == id);
|
||||||
|
@ -69,6 +62,7 @@ async function setProvince(id, data) {
|
||||||
postcodeFormData.provinceFk = id;
|
postcodeFormData.provinceFk = id;
|
||||||
await fetchTowns();
|
await fetchTowns();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onProvinceCreated(data) {
|
async function onProvinceCreated(data) {
|
||||||
postcodeFormData.provinceFk = data.id;
|
postcodeFormData.provinceFk = data.id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ const $props = defineProps({
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
bottom: {
|
bottom: {
|
||||||
type: Object,
|
type: Boolean,
|
||||||
default: null,
|
default: false,
|
||||||
},
|
},
|
||||||
cardClass: {
|
cardClass: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -314,7 +314,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
show-if-above
|
show-if-above
|
||||||
>
|
>
|
||||||
<QScrollArea class="fit">
|
<QScrollArea class="fit">
|
||||||
<VnTableFilter :data-key="$attrs['data-key']" :columns="columns" />
|
<VnTableFilter :data-key="$attrs['data-key']" :columns="columns" :redirect="redirect" />
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<CrudModel
|
<CrudModel
|
||||||
|
@ -478,29 +478,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
/>
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #bottom v-if="bottom">
|
|
||||||
<slot name="bottom-table">
|
|
||||||
<QBtn
|
|
||||||
@click="
|
|
||||||
() =>
|
|
||||||
createAsDialog
|
|
||||||
? (showForm = !showForm)
|
|
||||||
: handleOnDataSaved(create)
|
|
||||||
"
|
|
||||||
class="cursor-pointer fill-icon"
|
|
||||||
color="primary"
|
|
||||||
icon="add_circle"
|
|
||||||
size="md"
|
|
||||||
round
|
|
||||||
flat
|
|
||||||
shortcut="+"
|
|
||||||
:disabled="!disabledAttr"
|
|
||||||
/>
|
|
||||||
<QTooltip>
|
|
||||||
{{ createForm.title }}
|
|
||||||
</QTooltip>
|
|
||||||
</slot>
|
|
||||||
</template>
|
|
||||||
<template #item="{ row, colsMap }">
|
<template #item="{ row, colsMap }">
|
||||||
<component
|
<component
|
||||||
:is="$props.redirect ? 'router-link' : 'span'"
|
:is="$props.redirect ? 'router-link' : 'span'"
|
||||||
|
@ -625,6 +602,27 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
<div class="full-width bottomButton" v-if="bottom">
|
||||||
|
<QBtn
|
||||||
|
@click="
|
||||||
|
() =>
|
||||||
|
createAsDialog
|
||||||
|
? (showForm = !showForm)
|
||||||
|
: handleOnDataSaved(create)
|
||||||
|
"
|
||||||
|
class="cursor-pointer fill-icon"
|
||||||
|
color="primary"
|
||||||
|
icon="add_circle"
|
||||||
|
size="md"
|
||||||
|
round
|
||||||
|
flat
|
||||||
|
shortcut="+"
|
||||||
|
:disabled="!disabledAttr"
|
||||||
|
/>
|
||||||
|
<QTooltip>
|
||||||
|
{{ createForm.title }}
|
||||||
|
</QTooltip>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky v-if="$props.create" :offset="[20, 20]" style="z-index: 2">
|
<QPageSticky v-if="$props.create" :offset="[20, 20]" style="z-index: 2">
|
||||||
|
|
|
@ -14,6 +14,7 @@ defineProps({
|
||||||
hide-dropdown-icon
|
hide-dropdown-icon
|
||||||
focus-on-mount
|
focus-on-mount
|
||||||
@update:model-value="promise"
|
@update:model-value="promise"
|
||||||
|
data-cy="vnBtnSelect_select"
|
||||||
/>
|
/>
|
||||||
</QBtnDropdown>
|
</QBtnDropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -11,9 +11,9 @@ function getBadgeAttrs(date) {
|
||||||
|
|
||||||
let timeDiff = today - timeTicket;
|
let timeDiff = today - timeTicket;
|
||||||
|
|
||||||
if (timeDiff == 0) return { color: 'warning', 'text-color': 'black' };
|
if (timeDiff == 0) return { color: 'warning', class: 'black-text-color' };
|
||||||
if (timeDiff < 0) return { color: 'success', 'text-color': 'black' };
|
if (timeDiff < 0) return { color: 'success', class: 'black-text-color' };
|
||||||
return { color: 'transparent', 'text-color': 'white' };
|
return { color: 'transparent', class: 'normal-text-color' };
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatShippedDate(date) {
|
function formatShippedDate(date) {
|
||||||
|
@ -29,3 +29,11 @@ function formatShippedDate(date) {
|
||||||
{{ formatShippedDate(date) }}
|
{{ formatShippedDate(date) }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.black-text-color {
|
||||||
|
color: var(--vn-black-text-color);
|
||||||
|
}
|
||||||
|
.normal-text-color {
|
||||||
|
color: var(--vn-text-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -297,7 +297,7 @@ defineExpose({
|
||||||
ref="dmsRef"
|
ref="dmsRef"
|
||||||
:data-key="$props.model"
|
:data-key="$props.model"
|
||||||
:url="$props.model"
|
:url="$props.model"
|
||||||
:filter="dmsFilter"
|
:user-filter="dmsFilter"
|
||||||
:order="['dmsFk DESC']"
|
:order="['dmsFk DESC']"
|
||||||
:auto-load="true"
|
:auto-load="true"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, watch, computed, ref, useAttrs } from 'vue';
|
import { onMounted, watch, computed, ref, useAttrs } from 'vue';
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import VnDate from './VnDate.vue';
|
import VnDate from './VnDate.vue';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
|
|
||||||
const $attrs = useAttrs();
|
const $attrs = useAttrs();
|
||||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||||
const model = defineModel({ type: [String, Date] });
|
const model = defineModel({ type: [String, Date] });
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
isOutlined: {
|
isOutlined: {
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, useAttrs } from 'vue';
|
import { computed, ref, useAttrs } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import VnTime from './VnTime.vue';
|
import VnTime from './VnTime.vue';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
|
|
||||||
const $attrs = useAttrs();
|
const $attrs = useAttrs();
|
||||||
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||||
const { t } = useI18n();
|
|
||||||
const model = defineModel({ type: String });
|
const model = defineModel({ type: String });
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
timeOnly: {
|
timeOnly: {
|
||||||
|
|
|
@ -20,16 +20,15 @@ const hasContent = ref();
|
||||||
let observer;
|
let observer;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (teleportRef.value) {
|
if (!teleportRef.value) return;
|
||||||
const checkContent = () => {
|
const checkContent = () => {
|
||||||
hasContent.value = teleportRef.value.innerHTML.trim() !== '';
|
hasContent.value = teleportRef.value?.innerHTML?.trim() !== '';
|
||||||
};
|
};
|
||||||
|
|
||||||
observer = new MutationObserver(checkContent);
|
observer = new MutationObserver(checkContent);
|
||||||
observer.observe(teleportRef.value, { childList: true, subtree: true });
|
observer.observe(teleportRef.value, { childList: true, subtree: true });
|
||||||
|
|
||||||
checkContent();
|
checkContent();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,12 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import VnTableFilter from '../VnTable/VnTableFilter.vue';
|
import VnTableFilter from '../VnTable/VnTableFilter.vue';
|
||||||
import { onBeforeMount, computed } from 'vue';
|
import { onBeforeMount, computed } from 'vue';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
section: {
|
section: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
default: null,
|
||||||
},
|
},
|
||||||
dataKey: {
|
dataKey: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -38,14 +39,28 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
keepData: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
const route = useRoute();
|
||||||
let arrayData;
|
let arrayData;
|
||||||
|
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
||||||
|
const isMainSection = computed(() => {
|
||||||
|
const isSame = sectionValue.value == route.name;
|
||||||
|
if (!isSame && arrayData) {
|
||||||
|
arrayData.reset(['userParams', 'userFilter']);
|
||||||
|
}
|
||||||
|
return isSame;
|
||||||
|
});
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
if ($props.dataKey)
|
if ($props.dataKey)
|
||||||
arrayData = useArrayData($props.dataKey, {
|
arrayData = useArrayData($props.dataKey, {
|
||||||
searchUrl: 'table',
|
searchUrl: 'table',
|
||||||
|
keepData: $props.keepData,
|
||||||
...$props.arrayDataProps,
|
...$props.arrayDataProps,
|
||||||
navigate: $props.redirect,
|
navigate: $props.redirect,
|
||||||
});
|
});
|
||||||
|
@ -74,6 +89,6 @@ onBeforeMount(() => {
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<slot name="body" v-if="sectionValue == $route.name" />
|
<slot name="body" v-if="isMainSection" />
|
||||||
<RouterView v-else />
|
<RouterView v-else />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -166,7 +166,11 @@ onMounted(() => {
|
||||||
const arrayDataKey =
|
const arrayDataKey =
|
||||||
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label);
|
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label);
|
||||||
|
|
||||||
const arrayData = useArrayData(arrayDataKey, { url: $props.url, searchUrl: false });
|
const arrayData = useArrayData(arrayDataKey, {
|
||||||
|
url: $props.url,
|
||||||
|
searchUrl: false,
|
||||||
|
mapKey: $attrs['map-key'],
|
||||||
|
});
|
||||||
|
|
||||||
function findKeyInOptions() {
|
function findKeyInOptions() {
|
||||||
if (!$props.options) return;
|
if (!$props.options) return;
|
||||||
|
|
|
@ -202,7 +202,11 @@ const getLocale = (label) => {
|
||||||
style="position: fixed; z-index: 1; right: 0; bottom: 0"
|
style="position: fixed; z-index: 1; right: 0; bottom: 0"
|
||||||
icon="search"
|
icon="search"
|
||||||
@click="search()"
|
@click="search()"
|
||||||
></QBtn>
|
>
|
||||||
|
<QTooltip bottom anchor="bottom right">
|
||||||
|
{{ t('globals.search') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QBtn>
|
||||||
<QForm @submit="search" id="filterPanelForm" @keyup.enter="search()">
|
<QForm @submit="search" id="filterPanelForm" @keyup.enter="search()">
|
||||||
<QList dense>
|
<QList dense>
|
||||||
<QItem class="q-mt-xs">
|
<QItem class="q-mt-xs">
|
||||||
|
|
|
@ -110,7 +110,7 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
:url="$props.url"
|
:url="$props.url"
|
||||||
order="created DESC"
|
order="created DESC"
|
||||||
:limit="0"
|
:limit="0"
|
||||||
:filter="$props.filter"
|
:user-filter="$props.filter"
|
||||||
auto-load
|
auto-load
|
||||||
ref="vnPaginateRef"
|
ref="vnPaginateRef"
|
||||||
class="show"
|
class="show"
|
||||||
|
|
|
@ -111,6 +111,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
if (!store.keepData) arrayData.reset(['data']);
|
||||||
arrayData.resetPagination();
|
arrayData.resetPagination();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,7 @@ async function search() {
|
||||||
delete filter.params.search;
|
delete filter.params.search;
|
||||||
}
|
}
|
||||||
await arrayData.applyFilter(filter);
|
await arrayData.applyFilter(filter);
|
||||||
|
searchText.value = undefined;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -54,6 +54,7 @@ function formatNumber(number) {
|
||||||
:offset="100"
|
:offset="100"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
auto-load
|
auto-load
|
||||||
|
map-key="smsFk"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QCard
|
<QCard
|
||||||
|
|
|
@ -53,6 +53,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
'searchUrl',
|
'searchUrl',
|
||||||
'navigate',
|
'navigate',
|
||||||
'mapKey',
|
'mapKey',
|
||||||
|
'keepData',
|
||||||
];
|
];
|
||||||
if (typeof userOptions === 'object') {
|
if (typeof userOptions === 'object') {
|
||||||
for (const option in userOptions) {
|
for (const option in userOptions) {
|
||||||
|
@ -302,7 +303,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
for (const row of data) {
|
for (const row of data) {
|
||||||
const key = row[store.mapKey];
|
const key = row[store.mapKey];
|
||||||
const val = { ...row, key };
|
const val = { ...row, key };
|
||||||
if (store.map.has(key)) {
|
if (key && store.map.has(key)) {
|
||||||
const { position } = store.map.get(key);
|
const { position } = store.map.get(key);
|
||||||
val.position = position;
|
val.position = position;
|
||||||
store.map.set(key, val);
|
store.map.set(key, val);
|
||||||
|
|
|
@ -3,20 +3,21 @@
|
||||||
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.sass';
|
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.sass';
|
||||||
|
|
||||||
body.body--light {
|
body.body--light {
|
||||||
--font-color: black;
|
|
||||||
--vn-header-color: #cecece;
|
--vn-header-color: #cecece;
|
||||||
--vn-page-color: #ffffff;
|
--vn-page-color: #ffffff;
|
||||||
--vn-section-color: #e0e0e0;
|
--vn-section-color: #e0e0e0;
|
||||||
--vn-section-hover-color: #b9b9b9;
|
--vn-section-hover-color: #b9b9b9;
|
||||||
--vn-text-color: var(--font-color);
|
--vn-text-color: black;
|
||||||
--vn-label-color: #5f5f5f;
|
--vn-label-color: #5f5f5f;
|
||||||
--vn-accent-color: #e7e3e3;
|
--vn-accent-color: #e7e3e3;
|
||||||
--vn-empty-tag: #acacac;
|
--vn-empty-tag: #acacac;
|
||||||
|
--vn-black-text-color: black;
|
||||||
|
--vn-text-color-contrast: white;
|
||||||
|
|
||||||
background-color: var(--vn-page-color);
|
background-color: var(--vn-page-color);
|
||||||
|
|
||||||
.q-header .q-toolbar {
|
.q-header .q-toolbar {
|
||||||
color: var(--font-color);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
body.body--dark {
|
body.body--dark {
|
||||||
|
@ -28,6 +29,8 @@ body.body--dark {
|
||||||
--vn-label-color: #a8a8a8;
|
--vn-label-color: #a8a8a8;
|
||||||
--vn-accent-color: #424242;
|
--vn-accent-color: #424242;
|
||||||
--vn-empty-tag: #2d2d2d;
|
--vn-empty-tag: #2d2d2d;
|
||||||
|
--vn-black-text-color: black;
|
||||||
|
--vn-text-color-contrast: black;
|
||||||
|
|
||||||
background-color: var(--vn-page-color);
|
background-color: var(--vn-page-color);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +89,10 @@ select:-webkit-autofill {
|
||||||
background-color: var(--vn-section-hover-color);
|
background-color: var(--vn-section-hover-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-vn-page {
|
||||||
|
background-color: var(--vn-page-color);
|
||||||
|
}
|
||||||
|
|
||||||
.color-vn-label {
|
.color-vn-label {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +158,8 @@ select:-webkit-autofill {
|
||||||
.q-card,
|
.q-card,
|
||||||
.q-table,
|
.q-table,
|
||||||
.q-table__bottom,
|
.q-table__bottom,
|
||||||
.q-drawer {
|
.q-drawer,
|
||||||
|
.bottomButton {
|
||||||
background-color: var(--vn-section-color);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +196,7 @@ select:-webkit-autofill {
|
||||||
|
|
||||||
.q-tooltip {
|
.q-tooltip {
|
||||||
background-color: var(--vn-page-color);
|
background-color: var(--vn-page-color);
|
||||||
color: var(--font-color);
|
color: var(--vn-text-color);
|
||||||
font-size: medium;
|
font-size: medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -611,7 +611,7 @@ worker:
|
||||||
fi: DNI/NIE/NIF
|
fi: DNI/NIE/NIF
|
||||||
birth: Birth
|
birth: Birth
|
||||||
isFreelance: Freelance
|
isFreelance: Freelance
|
||||||
isSsDiscounted: Bonificación SS
|
isSsDiscounted: SS Bonification
|
||||||
hasMachineryAuthorized: Machinery authorized
|
hasMachineryAuthorized: Machinery authorized
|
||||||
isDisable: Disable
|
isDisable: Disable
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
|
@ -857,11 +857,11 @@ components:
|
||||||
value: Value
|
value: Value
|
||||||
# ItemFixedPriceFilter
|
# ItemFixedPriceFilter
|
||||||
buyerFk: Buyer
|
buyerFk: Buyer
|
||||||
|
warehouseFk: Warehouse
|
||||||
started: From
|
started: From
|
||||||
ended: To
|
ended: To
|
||||||
mine: For me
|
mine: For me
|
||||||
hasMinPrice: Minimum price
|
hasMinPrice: Minimum price
|
||||||
warehouseFk: Warehouse
|
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Buyer
|
salesPersonFk: Buyer
|
||||||
from: From
|
from: From
|
||||||
|
|
|
@ -608,6 +608,15 @@ worker:
|
||||||
role: Rol
|
role: Rol
|
||||||
sipExtension: Extensión
|
sipExtension: Extensión
|
||||||
locker: Taquilla
|
locker: Taquilla
|
||||||
|
fiDueDate: F. caducidad DNI
|
||||||
|
sex: Sexo
|
||||||
|
seniority: Antigüedad
|
||||||
|
fi: DNI/NIE/NIF
|
||||||
|
birth: F. nacimiento
|
||||||
|
isFreelance: Autónomo
|
||||||
|
isSsDiscounted: Bonificación SS
|
||||||
|
hasMachineryAuthorized: Autorizado para maquinaria
|
||||||
|
isDisable: Deshabilitado
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Notificaciones activas
|
activeNotifications: Notificaciones activas
|
||||||
availableNotifications: Notificaciones disponibles
|
availableNotifications: Notificaciones disponibles
|
||||||
|
@ -849,6 +858,7 @@ components:
|
||||||
value: Valor
|
value: Valor
|
||||||
# ItemFixedPriceFilter
|
# ItemFixedPriceFilter
|
||||||
buyerFk: Comprador
|
buyerFk: Comprador
|
||||||
|
warehouseFk: Almacen
|
||||||
started: Desde
|
started: Desde
|
||||||
ended: Hasta
|
ended: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
|
|
|
@ -50,7 +50,7 @@ const removeRole = async () => {
|
||||||
>
|
>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
<QItem v-ripple clickable @click="removeRole()">
|
<QItem v-ripple clickable @click="removeRole()">
|
||||||
<QItemSection>{{ t('Delete') }}</QItemSection>
|
<QItemSection>{{ t('globals.delete') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, computed, onBeforeMount } from 'vue';
|
import { ref, computed, onBeforeMount } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDate } from 'src/filters/index';
|
import { dateRange, toDate } from 'src/filters/index';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
@ -104,18 +104,12 @@ function getParams() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const userParams = computed(() => {
|
const userParams = computed(() => {
|
||||||
const minDate = Date.vnNew();
|
const campaign = campaignList.value[0]?.id;
|
||||||
minDate.setHours(0, 0, 0, 0);
|
const userParams = {
|
||||||
minDate.setMonth(minDate.getMonth() - 2);
|
campaign,
|
||||||
|
...updateDateParams(campaign, { from: Date.vnNew(), to: Date.vnNew() }),
|
||||||
const maxDate = Date.vnNew();
|
|
||||||
maxDate.setHours(23, 59, 59, 59);
|
|
||||||
|
|
||||||
return {
|
|
||||||
campaign: campaignList.value[0]?.id,
|
|
||||||
from: minDate,
|
|
||||||
to: maxDate,
|
|
||||||
};
|
};
|
||||||
|
return userParams;
|
||||||
});
|
});
|
||||||
const openReportPdf = () => {
|
const openReportPdf = () => {
|
||||||
openReport(`Clients/${route.params.id}/campaign-metrics-pdf`, getParams());
|
openReport(`Clients/${route.params.id}/campaign-metrics-pdf`, getParams());
|
||||||
|
@ -134,6 +128,23 @@ const sendCampaignMetricsEmail = ({ address }) => {
|
||||||
...getParams(),
|
...getParams(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const updateDateParams = (value, params) => {
|
||||||
|
if (!value) {
|
||||||
|
params.from = null;
|
||||||
|
params.to = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const campaign = campaignList.value.find((c) => c.id === value);
|
||||||
|
if (!campaign) return;
|
||||||
|
|
||||||
|
const { dated, previousDays, scopeDays } = campaign;
|
||||||
|
const _date = new Date(dated);
|
||||||
|
const [from, to] = dateRange(_date);
|
||||||
|
params.from = new Date(from.setDate(from.getDate() - previousDays)).toISOString();
|
||||||
|
params.to = new Date(to.setDate(to.getDate() + scopeDays)).toISOString();
|
||||||
|
return params;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -144,7 +155,6 @@ const sendCampaignMetricsEmail = ({ address }) => {
|
||||||
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
search-url="consumption"
|
search-url="consumption"
|
||||||
:filter="filter"
|
|
||||||
:user-params="userParams"
|
:user-params="userParams"
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
:default-reset="false"
|
:default-reset="false"
|
||||||
|
@ -201,6 +211,7 @@ const sendCampaignMetricsEmail = ({ address }) => {
|
||||||
class="q-px-sm q-pt-none fit"
|
class="q-px-sm q-pt-none fit"
|
||||||
dense
|
dense
|
||||||
option-label="code"
|
option-label="code"
|
||||||
|
@update:model-value="(data) => updateDateParams(data, params)"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -63,9 +63,10 @@ const columns = computed(() => [
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<VnTable
|
<VnTable
|
||||||
|
data-key="Mandates"
|
||||||
|
url="Mandates"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
auto-load
|
auto-load
|
||||||
url="Mandates"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
class="full-width q-mt-md"
|
class="full-width q-mt-md"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
|
|
|
@ -173,6 +173,8 @@ en:
|
||||||
phone: Phone
|
phone: Phone
|
||||||
email: Email
|
email: Email
|
||||||
zoneFk: Zone
|
zoneFk: Zone
|
||||||
|
socialName : Social name
|
||||||
|
name: Name
|
||||||
postcode: Postcode
|
postcode: Postcode
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
|
@ -184,6 +186,8 @@ es:
|
||||||
phone: Teléfono
|
phone: Teléfono
|
||||||
email: Email
|
email: Email
|
||||||
zoneFk: Zona
|
zoneFk: Zona
|
||||||
|
socialName : Razón social
|
||||||
|
name: Nombre
|
||||||
postcode: CP
|
postcode: CP
|
||||||
FI: NIF
|
FI: NIF
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
|
|
|
@ -240,6 +240,7 @@ es:
|
||||||
defaulterSinced: Desde
|
defaulterSinced: Desde
|
||||||
Client: Cliente
|
Client: Cliente
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
|
Departments: Departamentos
|
||||||
Country: País
|
Country: País
|
||||||
P. Method: F. Pago
|
P. Method: F. Pago
|
||||||
Balance D.: Saldo V.
|
Balance D.: Saldo V.
|
||||||
|
|
|
@ -74,8 +74,8 @@ const showEntryReport = () => {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('globals.agency')" :value="entity.travel?.agency?.name" />
|
<VnLv :label="t('globals.agency')" :value="entity.travel?.agency?.name" />
|
||||||
<VnLv :label="t('shipped')" :value="toDate(entity.travel?.shipped)" />
|
<VnLv :label="t('globals.shipped')" :value="toDate(entity.travel?.shipped)" />
|
||||||
<VnLv :label="t('landed')" :value="toDate(entity.travel?.landed)" />
|
<VnLv :label="t('globals.landed')" :value="toDate(entity.travel?.landed)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('globals.warehouseOut')"
|
||||||
:value="entity.travel?.warehouseOut?.name"
|
:value="entity.travel?.warehouseOut?.name"
|
||||||
|
|
|
@ -12,6 +12,8 @@ import { getUrl } from 'src/composables/getUrl';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||||
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
||||||
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -147,9 +149,8 @@ async function setEntryData(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchEntryBuys = async () => {
|
const fetchEntryBuys = async () => {
|
||||||
const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
|
const { data } = await axios.get(`Entries/${entry.value.id}/getBuys`);
|
||||||
if (data) entryBuys.value = data;
|
if (data) entryBuys.value = data;
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -173,13 +174,10 @@ const fetchEntryBuys = async () => {
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<router-link
|
<VnTitle
|
||||||
:to="{ name: 'EntryBasicData', params: { id: entityId } }"
|
:url="`#/entry/${entityId}/basic-data`"
|
||||||
class="header header-link"
|
:text="t('globals.summary.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.summary.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.currency')"
|
:label="t('entry.summary.currency')"
|
||||||
|
@ -193,13 +191,10 @@ const fetchEntryBuys = async () => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<router-link
|
<VnTitle
|
||||||
:to="{ name: 'EntryBasicData', params: { id: entityId } }"
|
:url="`#/entry/${entityId}/basic-data`"
|
||||||
class="header header-link"
|
:text="t('globals.summary.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.summary.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
<VnLv :label="t('entry.summary.travelReference')">
|
<VnLv :label="t('entry.summary.travelReference')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
|
@ -212,61 +207,42 @@ const fetchEntryBuys = async () => {
|
||||||
: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('globals.shipped')" :value="toDate(entry.travel.shipped)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('globals.warehouseOut')"
|
||||||
:value="entry.travel.warehouseOut?.name"
|
:value="entry.travel.warehouseOut?.name"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<VnLv
|
||||||
:label="t('entry.summary.travelDelivered')"
|
:label="t('entry.summary.travelDelivered')"
|
||||||
v-model="entry.travel.isDelivered"
|
:value="entry.travel.isDelivered"
|
||||||
:disable="true"
|
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
<VnLv :label="t('globals.landed')" :value="toDate(entry.travel.landed)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('globals.warehouseIn')"
|
:label="t('globals.warehouseIn')"
|
||||||
:value="entry.travel.warehouseIn?.name"
|
:value="entry.travel.warehouseIn?.name"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<VnLv
|
||||||
:label="t('entry.summary.travelReceived')"
|
:label="t('entry.summary.travelReceived')"
|
||||||
v-model="entry.travel.isReceived"
|
:value="entry.travel.isReceived"
|
||||||
:disable="true"
|
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<router-link
|
<VnTitle :url="`#/travel/${entityId}/summary`" :text="t('Travel data')" />
|
||||||
:to="{ name: 'TravelSummary', params: { id: entry.travel.id } }"
|
<VnRow class="block">
|
||||||
class="header header-link"
|
<VnLv :label="t('entry.summary.ordered')" :value="entry.isOrdered" />
|
||||||
>
|
<VnLv :label="t('globals.confirmed')" :value="entry.isConfirmed" />
|
||||||
{{ t('Travel data') }}
|
<VnLv :label="t('entry.summary.booked')" :value="entry.isBooked" />
|
||||||
<QIcon name="open_in_new" />
|
<VnLv
|
||||||
</router-link>
|
:label="t('entry.summary.excludedFromAvailable')"
|
||||||
<QCheckbox
|
:value="entry.isExcludedFromAvailable"
|
||||||
:label="t('entry.summary.ordered')"
|
/>
|
||||||
v-model="entry.isOrdered"
|
</VnRow>
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('globals.confirmed')"
|
|
||||||
v-model="entry.isConfirmed"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('entry.summary.booked')"
|
|
||||||
v-model="entry.isBooked"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('entry.summary.excludedFromAvailable')"
|
|
||||||
v-model="entry.isExcludedFromAvailable"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-two" style="min-width: 100%">
|
<QCard class="vn-max">
|
||||||
<a class="header header-link">
|
<VnTitle
|
||||||
{{ t('entry.summary.buys') }}
|
:url="`#/entry/${entityId}/buys`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('entry.summary.buys')"
|
||||||
</a>
|
/>
|
||||||
<QTable
|
<QTable
|
||||||
:rows="entryBuys"
|
:rows="entryBuys"
|
||||||
:columns="entriesTableColumns"
|
:columns="entriesTableColumns"
|
||||||
|
|
|
@ -58,7 +58,7 @@ const tagValues = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('components.itemsFilterPanel.supplierFk')"
|
:label="t('globals.params.supplierFk')"
|
||||||
v-model="params.supplierFk"
|
v-model="params.supplierFk"
|
||||||
:options="suppliersOptions"
|
:options="suppliersOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -85,7 +85,7 @@ const tagValues = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('components.itemsFilterPanel.from')"
|
:label="t('components.itemsFilterPanel.started')"
|
||||||
v-model="params.from"
|
v-model="params.from"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -95,7 +95,7 @@ const tagValues = ref([]);
|
||||||
<QItem class="q-my-md">
|
<QItem class="q-my-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('components.itemsFilterPanel.to')"
|
:label="t('components.itemsFilterPanel.ended')"
|
||||||
v-model="params.to"
|
v-model="params.to"
|
||||||
is-outlined
|
is-outlined
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
@ -113,7 +113,7 @@ const tagValues = ref([]);
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('components.itemsFilterPanel.visible')"
|
:label="t('globals.visible')"
|
||||||
v-model="params.visible"
|
v-model="params.visible"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import EntryFilter from './EntryFilter.vue';
|
import EntryFilter from './EntryFilter.vue';
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
@ -12,7 +11,6 @@ import EntrySummary from './Card/EntrySummary.vue';
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,6 @@ onMounted(async () => {
|
||||||
es:
|
es:
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
params:
|
params:
|
||||||
dated: Date
|
dated: Fecha
|
||||||
workerFk: Trabajador
|
workerFk: Trabajador
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -161,7 +161,7 @@ const columns = computed(() => [
|
||||||
<QList>
|
<QList>
|
||||||
<QItem>
|
<QItem>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('code')"
|
:label="t('Code')"
|
||||||
class="full-width"
|
class="full-width"
|
||||||
v-model="props.row['intrastatFk']"
|
v-model="props.row['intrastatFk']"
|
||||||
:options="intrastats"
|
:options="intrastats"
|
||||||
|
|
|
@ -126,6 +126,13 @@ const columns = computed(() => [
|
||||||
columnField: { component: null },
|
columnField: { component: null },
|
||||||
format: (row) => toDate(row.dued),
|
format: (row) => toDate(row.dued),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'customsAgentFk',
|
||||||
|
label: t('invoiceOutList.tableVisibleColumns.customsAgent'),
|
||||||
|
cardVisible: true,
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.customsAgentName),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
|
@ -346,7 +353,7 @@ watchEffect(selectedRows);
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="InvoiceOutSerials"
|
url="InvoiceOutSerials"
|
||||||
v-model="data.serial"
|
v-model="data.serial"
|
||||||
:label="t('invoiceIn.serial')"
|
:label="t('InvoiceIn.serial')"
|
||||||
:options="invoiceOutSerialsOptions"
|
:options="invoiceOutSerialsOptions"
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
|
|
|
@ -13,6 +13,7 @@ invoiceOutList:
|
||||||
invoiceOutSerial: Serial
|
invoiceOutSerial: Serial
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
taxArea: Tax area
|
taxArea: Tax area
|
||||||
|
customsAgent: Custom Agent
|
||||||
DownloadPdf: Download PDF
|
DownloadPdf: Download PDF
|
||||||
InvoiceOutSummary: Summary
|
InvoiceOutSummary: Summary
|
||||||
negativeBases:
|
negativeBases:
|
||||||
|
|
|
@ -15,6 +15,7 @@ invoiceOutList:
|
||||||
invoiceOutSerial: Serial
|
invoiceOutSerial: Serial
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
taxArea: Area
|
taxArea: Area
|
||||||
|
customsAgent: Agente de aduanas
|
||||||
DownloadPdf: Descargar PDF
|
DownloadPdf: Descargar PDF
|
||||||
InvoiceOutSummary: Resumen
|
InvoiceOutSummary: Resumen
|
||||||
negativeBases:
|
negativeBases:
|
||||||
|
|
|
@ -233,7 +233,7 @@ async function updateWarehouse(warehouseFk) {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center">
|
||||||
<QTable
|
<QTable
|
||||||
:rows="itemBalances"
|
:rows="itemBalances"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
|
|
@ -10,21 +10,12 @@ import { dashIfEmpty } from 'src/filters';
|
||||||
import { toCurrency } from 'filters/index';
|
import { toCurrency } from 'filters/index';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import axios from 'axios';
|
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const from = ref();
|
const from = ref();
|
||||||
const to = ref();
|
const to = ref();
|
||||||
const hideInventory = ref(true);
|
|
||||||
const inventorySupplierFk = ref();
|
|
||||||
|
|
||||||
async function getInventorySupplier() {
|
|
||||||
inventorySupplierFk.value = (
|
|
||||||
await axios.get(`InventoryConfigs`)
|
|
||||||
)?.data[0]?.supplierFk;
|
|
||||||
}
|
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
@ -49,10 +40,6 @@ const where = {
|
||||||
itemFk: route.params.id,
|
itemFk: route.params.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hideInventory.value) {
|
|
||||||
where.supplierFk = { neq: inventorySupplierFk };
|
|
||||||
}
|
|
||||||
|
|
||||||
const arrayData = useArrayData('ItemLastEntries', {
|
const arrayData = useArrayData('ItemLastEntries', {
|
||||||
url: 'Items/lastEntriesFilter',
|
url: 'Items/lastEntriesFilter',
|
||||||
order: ['landed DESC', 'buyFk DESC'],
|
order: ['landed DESC', 'buyFk DESC'],
|
||||||
|
@ -110,7 +97,7 @@ const columns = computed(() => [
|
||||||
format: (val) => dashIfEmpty(val),
|
format: (val) => dashIfEmpty(val),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shelvings.packing'),
|
label: 'Packing',
|
||||||
name: 'packing',
|
name: 'packing',
|
||||||
field: 'packing',
|
field: 'packing',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -182,15 +169,11 @@ const updateFilter = async () => {
|
||||||
const userFilter = arrayData.store.userFilter.where;
|
const userFilter = arrayData.store.userFilter.where;
|
||||||
|
|
||||||
userFilter.landed = filter;
|
userFilter.landed = filter;
|
||||||
if (hideInventory.value) userFilter.supplierFk = { neq: inventorySupplierFk };
|
|
||||||
else delete userFilter.supplierFk;
|
|
||||||
|
|
||||||
await fetchItemLastEntries();
|
await fetchItemLastEntries();
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getInventorySupplier();
|
|
||||||
|
|
||||||
const _from = Date.vnNew();
|
const _from = Date.vnNew();
|
||||||
_from.setDate(_from.getDate() - 75);
|
_from.setDate(_from.getDate() - 75);
|
||||||
from.value = getDate(_from, 'from');
|
from.value = getDate(_from, 'from');
|
||||||
|
@ -200,12 +183,16 @@ onMounted(async () => {
|
||||||
|
|
||||||
updateFilter();
|
updateFilter();
|
||||||
|
|
||||||
watch([from, to, hideInventory], ([nFrom, nTo], [oFrom, oTo]) => {
|
watch([from, to], ([nFrom, nTo], [oFrom, oTo]) => {
|
||||||
if (nFrom && nFrom != oFrom) nFrom = getDate(new Date(nFrom), 'from');
|
if (nFrom && nFrom != oFrom) nFrom = getDate(new Date(nFrom), 'from');
|
||||||
if (nTo && nTo != oTo) nTo = getDate(new Date(nTo), 'to');
|
if (nTo && nTo != oTo) nTo = getDate(new Date(nTo), 'to');
|
||||||
updateFilter();
|
updateFilter();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getBadgeClass(groupingMode, expectedGrouping) {
|
||||||
|
return groupingMode === expectedGrouping ? 'accent-badge' : 'simple-badge';
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnSubToolbar>
|
<VnSubToolbar>
|
||||||
|
@ -224,13 +211,6 @@ onMounted(async () => {
|
||||||
class="q-mr-lg"
|
class="q-mr-lg"
|
||||||
data-cy="to"
|
data-cy="to"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
|
||||||
:label="t('Hide inventory supplier')"
|
|
||||||
v-model="hideInventory"
|
|
||||||
dense
|
|
||||||
class="q-mr-lg"
|
|
||||||
data-cy="hideInventory"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QPage class="column items-center q-pa-xd">
|
<QPage class="column items-center q-pa-xd">
|
||||||
|
@ -249,6 +229,11 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-warehouse="{ row }">
|
||||||
|
<QTd>
|
||||||
|
<span>{{ row.warehouse }}</span>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-date="{ row }">
|
<template #body-cell-date="{ row }">
|
||||||
<QTd class="text-center">
|
<QTd class="text-center">
|
||||||
<VnDateBadge :date="row.landed" />
|
<VnDateBadge :date="row.landed" />
|
||||||
|
@ -262,32 +247,37 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-pvp="{ value }">
|
||||||
|
<QTd @click.stop class="text-center">
|
||||||
|
<span> {{ value }}</span>
|
||||||
|
<QTooltip> {{ t('lastEntries.grouping') }}/Packing </QTooltip></QTd
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-printedStickers="{ row }">
|
||||||
|
<QTd @click.stop class="text-center">
|
||||||
|
<span style="color: var(--vn-label-color)">
|
||||||
|
{{ row.printedStickers }}</span
|
||||||
|
>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-packing="{ row }">
|
<template #body-cell-packing="{ row }">
|
||||||
<QTd @click.stop>
|
<QTd @click.stop>
|
||||||
<QBadge
|
<QBadge
|
||||||
class="center-content"
|
class="center-content"
|
||||||
|
:class="getBadgeClass(row.groupingMode, 'packing')"
|
||||||
rounded
|
rounded
|
||||||
:color="row.groupingMode == 'packing' ? 'grey-13' : 'black'"
|
|
||||||
>
|
>
|
||||||
{{ dashIfEmpty(row.packing) }}
|
{{ dashIfEmpty(row.packing) }}
|
||||||
<QTooltip>{{ t('lastEntries.packing') }}</QTooltip>
|
<QTooltip>Packing</QTooltip>
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-pvp="{ value }">
|
|
||||||
<QTd @click.stop class="text-center">
|
|
||||||
<span> {{ value }}</span>
|
|
||||||
<QTooltip>
|
|
||||||
{{ t('lastEntries.grouping') }}/{{ t('lastEntries.packing') }}
|
|
||||||
</QTooltip></QTd
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
<template #body-cell-grouping="{ row }">
|
<template #body-cell-grouping="{ row }">
|
||||||
<QTd @click.stop>
|
<QTd @click.stop>
|
||||||
<QBadge
|
<QBadge
|
||||||
class="center-content"
|
class="center-content"
|
||||||
|
:class="getBadgeClass(row.groupingMode, 'grouping')"
|
||||||
rounded
|
rounded
|
||||||
:color="row.groupingMode == 'grouping' ? 'grey-13' : 'black'"
|
|
||||||
>
|
>
|
||||||
{{ dashIfEmpty(row.grouping) }}
|
{{ dashIfEmpty(row.grouping) }}
|
||||||
<QTooltip>{{ t('lastEntries.grouping') }}</QTooltip>
|
<QTooltip>{{ t('lastEntries.grouping') }}</QTooltip>
|
||||||
|
@ -315,13 +305,16 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-supplier="{ row }">
|
<template #body-cell-supplier="{ row }">
|
||||||
<QTd @click.stop>
|
<QTd @click.stop>
|
||||||
<div class="full-width flex justify-center">
|
<div class="full-width flex justify-left">
|
||||||
<SupplierDescriptorProxy
|
<QBadge
|
||||||
:id="row.supplierFk"
|
:class="
|
||||||
class="q-ma-none"
|
row.isInventorySupplier ? 'bg-vn-page' : 'transparent'
|
||||||
|
"
|
||||||
dense
|
dense
|
||||||
/>
|
>
|
||||||
<span class="link">{{ row.supplier }}</span>
|
<SupplierDescriptorProxy :id="row.supplierFk" />
|
||||||
|
<span class="link">{{ row.supplier }}</span>
|
||||||
|
</QBadge>
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
@ -349,4 +342,13 @@ onMounted(async () => {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.accent-badge {
|
||||||
|
background-color: var(--vn-label-color);
|
||||||
|
color: var(--vn-text-color-contrast);
|
||||||
|
}
|
||||||
|
.simple-badge {
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--vn-text-color);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -128,7 +128,7 @@ const submitTags = async (data) => {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-if="row.tag?.isFree === false"
|
v-if="row.tag?.isFree === false"
|
||||||
:key="row.tagFk"
|
:key="row.tagFk"
|
||||||
:label="t('Value')"
|
:label="t('itemTags.value')"
|
||||||
v-model="row.value"
|
v-model="row.value"
|
||||||
:url="`Tags/${row.tagFk}/filterValue`"
|
:url="`Tags/${row.tagFk}/filterValue`"
|
||||||
option-label="value"
|
option-label="value"
|
||||||
|
|
|
@ -53,7 +53,6 @@ const columns = computed(() => [
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
isId: true,
|
isId: true,
|
||||||
cardVisible: true,
|
|
||||||
columnField: {
|
columnField: {
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
@ -65,14 +64,12 @@ const columns = computed(() => [
|
||||||
name: 'name',
|
name: 'name',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
create: true,
|
create: true,
|
||||||
cardVisible: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('item.fixedPrice.groupingPrice'),
|
label: t('item.fixedPrice.groupingPrice'),
|
||||||
field: 'rate2',
|
field: 'rate2',
|
||||||
name: 'rate2',
|
name: 'rate2',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
cardVisible: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
@ -81,7 +78,6 @@ const columns = computed(() => [
|
||||||
field: 'rate3',
|
field: 'rate3',
|
||||||
name: 'rate3',
|
name: 'rate3',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
cardVisible: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
@ -91,7 +87,6 @@ const columns = computed(() => [
|
||||||
field: 'minPrice',
|
field: 'minPrice',
|
||||||
name: 'minPrice',
|
name: 'minPrice',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
cardVisible: true,
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
@ -100,7 +95,6 @@ const columns = computed(() => [
|
||||||
field: 'started',
|
field: 'started',
|
||||||
name: 'started',
|
name: 'started',
|
||||||
format: ({ started }) => toDate(started),
|
format: ({ started }) => toDate(started),
|
||||||
cardVisible: true,
|
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
columnField: {
|
columnField: {
|
||||||
component: 'date',
|
component: 'date',
|
||||||
|
@ -116,7 +110,6 @@ const columns = computed(() => [
|
||||||
field: 'ended',
|
field: 'ended',
|
||||||
name: 'ended',
|
name: 'ended',
|
||||||
...defaultColumnAttrs,
|
...defaultColumnAttrs,
|
||||||
cardVisible: true,
|
|
||||||
columnField: {
|
columnField: {
|
||||||
component: 'date',
|
component: 'date',
|
||||||
class: 'shrink',
|
class: 'shrink',
|
||||||
|
@ -251,11 +244,14 @@ const upsertPrice = async (props, resetMinPrice = false) => {
|
||||||
}
|
}
|
||||||
if (!changes.updates && !changes.creates) return;
|
if (!changes.updates && !changes.creates) return;
|
||||||
const data = await upsertFixedPrice(row);
|
const data = await upsertFixedPrice(row);
|
||||||
tableRef.value.CrudModelRef.formData[props.rowIndex] = data;
|
Object.assign(tableRef.value.CrudModelRef.formData[props.rowIndex], data);
|
||||||
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
|
tableRef.value.reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
async function upsertFixedPrice(row) {
|
async function upsertFixedPrice(row) {
|
||||||
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
|
const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row);
|
||||||
|
data.hasMinPrice = data.hasMinPrice ? 1 : 0;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,18 +391,12 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<VnTable
|
<VnTable
|
||||||
@on-fetch="
|
|
||||||
(data) =>
|
|
||||||
data.forEach((item) => {
|
|
||||||
item.hasMinPrice = `${item.hasMinPrice !== 0}`;
|
|
||||||
})
|
|
||||||
"
|
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
:default-reset="false"
|
:default-reset="false"
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
data-key="ItemFixedPrices"
|
data-key="ItemFixedPrices"
|
||||||
url="FixedPrices/filter"
|
url="FixedPrices/filter"
|
||||||
:order="['itemFk DESC', 'name DESC']"
|
:order="['name DESC', 'itemFk DESC']"
|
||||||
save-url="FixedPrices/crud"
|
save-url="FixedPrices/crud"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
dense
|
dense
|
||||||
|
@ -498,14 +488,15 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:model-value="props.row.hasMinPrice"
|
:model-value="props.row.hasMinPrice"
|
||||||
@update:model-value="updateMinPrice($event, props)"
|
@update:model-value="updateMinPrice($event, props)"
|
||||||
:false-value="'false'"
|
:false-value="0"
|
||||||
:true-value="'true'"
|
:true-value="1"
|
||||||
|
:toggle-indeterminate="false"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
class="col"
|
class="col"
|
||||||
type="currency"
|
type="currency"
|
||||||
mask="###.##"
|
mask="###.##"
|
||||||
:disable="props.row.hasMinPrice === 1"
|
:disable="props.row.hasMinPrice === 0"
|
||||||
v-model.number="props.row.minPrice"
|
v-model.number="props.row.minPrice"
|
||||||
v-on="getRowUpdateInputEvents(props)"
|
v-on="getRowUpdateInputEvents(props)"
|
||||||
>
|
>
|
||||||
|
|
|
@ -478,6 +478,8 @@ const columns = computed(() => [
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
New item: Nuevo artículo
|
New item: Nuevo artículo
|
||||||
|
Create Item: Crear artículo
|
||||||
|
You can search by id: Puedes buscar por id
|
||||||
Preview: Vista previa
|
Preview: Vista previa
|
||||||
Regularize stock: Regularizar stock
|
Regularize stock: Regularizar stock
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -201,6 +201,7 @@ en:
|
||||||
to: To
|
to: To
|
||||||
mine: For me
|
mine: For me
|
||||||
state: State
|
state: State
|
||||||
|
daysOnward: Days onward
|
||||||
myTeam: My team
|
myTeam: My team
|
||||||
dateFiltersTooltip: Cannot choose a range of dates and days onward at the same time
|
dateFiltersTooltip: Cannot choose a range of dates and days onward at the same time
|
||||||
denied: Denied
|
denied: Denied
|
||||||
|
@ -218,6 +219,7 @@ es:
|
||||||
to: Hasta
|
to: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
state: Estado
|
state: Estado
|
||||||
|
daysOnward: Días en adelante
|
||||||
myTeam: Mi equipo
|
myTeam: Mi equipo
|
||||||
dateFiltersTooltip: No se puede seleccionar un rango de fechas y días en adelante a la vez
|
dateFiltersTooltip: No se puede seleccionar un rango de fechas y días en adelante a la vez
|
||||||
denied: Denegada
|
denied: Denegada
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import toCurrency from 'src/filters/toCurrency';
|
import toCurrency from 'src/filters/toCurrency';
|
||||||
import { computed, inject, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
|
@ -128,6 +128,7 @@ en:
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
orderFk: Order
|
orderFk: Order
|
||||||
|
workerFk: Worker
|
||||||
sourceApp: Application
|
sourceApp: Application
|
||||||
myTeam: My Team
|
myTeam: My Team
|
||||||
isConfirmed: Is Confirmed
|
isConfirmed: Is Confirmed
|
||||||
|
@ -151,6 +152,7 @@ es:
|
||||||
from: Desde
|
from: Desde
|
||||||
to: Hasta
|
to: Hasta
|
||||||
orderFk: Cesta
|
orderFk: Cesta
|
||||||
|
workerFk: Trabajador
|
||||||
sourceApp: Aplicación
|
sourceApp: Aplicación
|
||||||
myTeam: Mi Equipo
|
myTeam: Mi Equipo
|
||||||
isConfirmed: Confirmado
|
isConfirmed: Confirmado
|
||||||
|
|
|
@ -221,7 +221,7 @@ async function handleConfirm() {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="props.row.item" />
|
<FetchedTags :item="props.row.item" :columns="3" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd key="quantity" :props="props">
|
<QTd key="quantity" :props="props">
|
||||||
{{ props.row.quantity }}
|
{{ props.row.quantity }}
|
||||||
|
|
|
@ -225,8 +225,8 @@ es:
|
||||||
params:
|
params:
|
||||||
agencyModeFk: Agencia ruta
|
agencyModeFk: Agencia ruta
|
||||||
m3: m³
|
m3: m³
|
||||||
from: Desde
|
From: Desde
|
||||||
to: Hasta
|
To: Hasta
|
||||||
date: Fecha
|
date: Fecha
|
||||||
agencyFk: Agencia Acuerdo
|
agencyFk: Agencia Acuerdo
|
||||||
packages: Bultos
|
packages: Bultos
|
||||||
|
|
|
@ -161,6 +161,7 @@ en:
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
description: Description
|
description: Description
|
||||||
m3: m³
|
m3: m³
|
||||||
|
scopeDays: Days Onward
|
||||||
vehicleFk: Vehicle
|
vehicleFk: Vehicle
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
workerFk: Worker
|
workerFk: Worker
|
||||||
|
@ -172,6 +173,7 @@ es:
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
description: Descripción
|
description: Descripción
|
||||||
m3: m³
|
m3: m³
|
||||||
|
scopeDays: Días en adelante
|
||||||
vehicleFk: Vehículo
|
vehicleFk: Vehículo
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
workerFk: Trabajador
|
workerFk: Trabajador
|
||||||
|
|
|
@ -271,6 +271,8 @@ es:
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
Agency route: Agencia Ruta
|
Agency route: Agencia Ruta
|
||||||
Agency agreement: Agencia Acuerdo
|
Agency agreement: Agencia Acuerdo
|
||||||
|
From: Desde
|
||||||
|
To: Hasta
|
||||||
Packages: Bultos
|
Packages: Bultos
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Received: Recibida
|
Received: Recibida
|
||||||
|
|
|
@ -134,6 +134,7 @@ defineProps({
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
|
supplierFk: Supplier
|
||||||
search: General search
|
search: General search
|
||||||
itemId: Item id
|
itemId: Item id
|
||||||
buyerId: Buyer
|
buyerId: Buyer
|
||||||
|
@ -143,6 +144,7 @@ en:
|
||||||
to: To
|
to: To
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
|
supplierFk: Proveedor
|
||||||
search: Búsqueda general
|
search: Búsqueda general
|
||||||
itemId: Id Artículo
|
itemId: Id Artículo
|
||||||
buyerId: Comprador
|
buyerId: Comprador
|
||||||
|
|
|
@ -149,7 +149,7 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
|
||||||
<VnLv :label="t('supplier.summary.taxNumber')" :value="supplier.nif" />
|
<VnLv :label="t('supplier.summary.taxNumber')" :value="supplier.nif" />
|
||||||
<VnLv :label="t('globals.street')" :value="supplier.street" />
|
<VnLv :label="t('globals.street')" :value="supplier.street" />
|
||||||
<VnLv :label="t('supplier.summary.city')" :value="supplier.city" />
|
<VnLv :label="t('supplier.summary.city')" :value="supplier.city" />
|
||||||
<VnLv :label="t('globals.postCode')" :value="supplier.postCode" />
|
<VnLv :label="t('globals.postcode')" :value="supplier.postCode" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('supplier.summary.province')"
|
:label="t('supplier.summary.province')"
|
||||||
:value="supplier.province?.name"
|
:value="supplier.province?.name"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, watch } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,7 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
:redirect="false"
|
||||||
order="created DESC"
|
order="created DESC"
|
||||||
>
|
>
|
||||||
<template #column-freightItemName="{ row }">
|
<template #column-freightItemName="{ row }">
|
||||||
|
|
|
@ -275,4 +275,5 @@ onMounted(() => (stateStore.rightDrawer = false));
|
||||||
New: Nueva
|
New: Nueva
|
||||||
Denied: Denegada
|
Denied: Denegada
|
||||||
Accepted: Aceptada
|
Accepted: Aceptada
|
||||||
|
Create request: Crear petición de compra
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -54,6 +54,7 @@ const transfer = ref({
|
||||||
});
|
});
|
||||||
const tableRef = ref([]);
|
const tableRef = ref([]);
|
||||||
const canProceed = ref();
|
const canProceed = ref();
|
||||||
|
const isLoading = ref(false);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
|
@ -213,6 +214,9 @@ const updateQuantity = async ({ quantity, id }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addSale = async (sale) => {
|
const addSale = async (sale) => {
|
||||||
|
if (isLoading.value) return;
|
||||||
|
|
||||||
|
isLoading.value = true;
|
||||||
const params = {
|
const params = {
|
||||||
barcode: sale.itemFk,
|
barcode: sale.itemFk,
|
||||||
quantity: sale.quantity,
|
quantity: sale.quantity,
|
||||||
|
@ -233,7 +237,7 @@ const addSale = async (sale) => {
|
||||||
sale.item = newSale.item;
|
sale.item = newSale.item;
|
||||||
|
|
||||||
notify('globals.dataSaved', 'positive');
|
notify('globals.dataSaved', 'positive');
|
||||||
window.location.reload();
|
arrayData.fetch({});
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateConcept = async (sale) => {
|
const updateConcept = async (sale) => {
|
||||||
|
@ -464,6 +468,7 @@ const addRow = (original = null) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const endNewRow = (row) => {
|
const endNewRow = (row) => {
|
||||||
|
if (!row) return;
|
||||||
if (row.itemFk && row.quantity) {
|
if (row.itemFk && row.quantity) {
|
||||||
row.isNew = false;
|
row.isNew = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,14 +298,19 @@ en:
|
||||||
to: To
|
to: To
|
||||||
salesPersonFk: Salesperson
|
salesPersonFk: Salesperson
|
||||||
stateFk: State
|
stateFk: State
|
||||||
|
groupedStates: Grouped State
|
||||||
refFk: Invoice Ref.
|
refFk: Invoice Ref.
|
||||||
|
scopeDays: Days onward
|
||||||
|
nickname: Nickname
|
||||||
myTeam: My team
|
myTeam: My team
|
||||||
pending: Pending
|
pending: Pending
|
||||||
hasInvoice: Invoiced
|
hasInvoice: Invoiced
|
||||||
hasRoute: Routed
|
hasRoute: Routed
|
||||||
|
problems: With problems
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
|
collectionFk: Collection
|
||||||
FREE: Free
|
FREE: Free
|
||||||
ON_PREPARATION: On preparation
|
ON_PREPARATION: On preparation
|
||||||
PACKED: Packed
|
PACKED: Packed
|
||||||
|
@ -320,11 +325,19 @@ es:
|
||||||
to: Hasta
|
to: Hasta
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
stateFk: Estado
|
stateFk: Estado
|
||||||
|
groupedStates: Estado agrupado
|
||||||
refFk: Ref. Factura
|
refFk: Ref. Factura
|
||||||
|
scopeDays: Días en adelante
|
||||||
|
nickname: Nombre mostrado
|
||||||
myTeam: Mi equipo
|
myTeam: Mi equipo
|
||||||
pending: Pendiente
|
pending: Pendiente
|
||||||
hasInvoice: Facturado
|
hasInvoice: Facturado
|
||||||
hasRoute: Enrutado
|
hasRoute: Enrutado
|
||||||
|
problems: Con problemas
|
||||||
|
provinceFk: Provincia
|
||||||
|
agencyModeFk: Agencia
|
||||||
|
warehouseFk: Almacén
|
||||||
|
collectionFk: Colección
|
||||||
Customer ID: ID Cliente
|
Customer ID: ID Cliente
|
||||||
Order ID: ID Pedido
|
Order ID: ID Pedido
|
||||||
From: Desde
|
From: Desde
|
||||||
|
|
|
@ -718,13 +718,14 @@ en:
|
||||||
landed: W. landed
|
landed: W. landed
|
||||||
requiresInspection: Requires inspection
|
requiresInspection: Requires inspection
|
||||||
BIP: Boder Inspection Point
|
BIP: Boder Inspection Point
|
||||||
|
notes: Notes
|
||||||
es:
|
es:
|
||||||
searchExtraCommunity: Buscar por envío extra comunitario
|
searchExtraCommunity: Buscar por envío extra comunitario
|
||||||
kg: KG Bloq.
|
kg: KG Bloq.
|
||||||
physicKg: KG físico
|
physicKg: KG físico
|
||||||
shipped: F. envío
|
shipped: F. envío
|
||||||
landed: F. llegada
|
landed: F. llegada
|
||||||
|
notes: Notas
|
||||||
Open as PDF: Abrir como PDF
|
Open as PDF: Abrir como PDF
|
||||||
requiresInspection: Requiere inspección
|
requiresInspection: Requiere inspección
|
||||||
BIP: Punto de Inspección Fronteriza
|
BIP: Punto de Inspección Fronteriza
|
||||||
|
|
|
@ -286,6 +286,7 @@ es:
|
||||||
Search travel: Buscar envio
|
Search travel: Buscar envio
|
||||||
Clone: Clonar
|
Clone: Clonar
|
||||||
Add entry: Añadir Entrada
|
Add entry: Añadir Entrada
|
||||||
|
Create Travels: Crear envíos
|
||||||
</i18n>
|
</i18n>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.is-active {
|
.is-active {
|
||||||
|
|
|
@ -168,3 +168,8 @@ async function remove(row) {
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Create new wagon: Crear nuevo vagón
|
||||||
|
</i18n>
|
|
@ -59,7 +59,7 @@ const arrayData = useArrayData('ZoneEvents');
|
||||||
const exclusionGeoCreate = async () => {
|
const exclusionGeoCreate = async () => {
|
||||||
const params = {
|
const params = {
|
||||||
zoneFk: parseInt(route.params.id),
|
zoneFk: parseInt(route.params.id),
|
||||||
date: dated.value,
|
date: dated,
|
||||||
geoIds: tickedNodes.value,
|
geoIds: tickedNodes.value,
|
||||||
};
|
};
|
||||||
await axios.post('Zones/exclusionGeo', params);
|
await axios.post('Zones/exclusionGeo', params);
|
||||||
|
|
|
@ -89,7 +89,7 @@ watch(
|
||||||
v-model="formData.geoFk"
|
v-model="formData.geoFk"
|
||||||
url="Postcodes/location"
|
url="Postcodes/location"
|
||||||
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
|
:fields="['geoFk', 'code', 'townFk', 'countryFk']"
|
||||||
sort-by="code, townFk"
|
:sort-by="['code ASC']"
|
||||||
option-value="geoFk"
|
option-value="geoFk"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
:filter-options="['code']"
|
:filter-options="['code']"
|
||||||
|
@ -97,6 +97,7 @@ watch(
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
map-key="geoFk"
|
||||||
>
|
>
|
||||||
<template #option="{ itemProps, opt }">
|
<template #option="{ itemProps, opt }">
|
||||||
<QItem v-bind="itemProps">
|
<QItem v-bind="itemProps">
|
||||||
|
|
|
@ -17,6 +17,7 @@ import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import ZoneFilterPanel from './ZoneFilterPanel.vue';
|
import ZoneFilterPanel from './ZoneFilterPanel.vue';
|
||||||
import ZoneSearchbar from './Card/ZoneSearchbar.vue';
|
import ZoneSearchbar from './Card/ZoneSearchbar.vue';
|
||||||
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -25,6 +26,7 @@ const { viewSummary } = useSummaryDialog();
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const warehouseOptions = ref([]);
|
const warehouseOptions = ref([]);
|
||||||
|
const validAddresses = ref([]);
|
||||||
|
|
||||||
const tableFilter = {
|
const tableFilter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -34,6 +36,32 @@ const tableFilter = {
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
relation: 'address',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'nickname', 'provinceFk', 'postalCode'],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'province',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'postcode',
|
||||||
|
scope: {
|
||||||
|
fields: ['code', 'townFk'],
|
||||||
|
include: {
|
||||||
|
relation: 'town',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,7 +123,14 @@ const columns = computed(() => [
|
||||||
label: t('list.close'),
|
label: t('list.close'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
format: (row) => toTimeFormat(row.hour),
|
format: (row) => toTimeFormat(row.hour),
|
||||||
hidden: true,
|
columnFilter: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'addressFk',
|
||||||
|
label: t('list.addressFk'),
|
||||||
|
cardVisible: true,
|
||||||
|
columnFilter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
@ -129,9 +164,27 @@ const handleClone = (id) => {
|
||||||
() => clone(id)
|
() => clone(id)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function showValidAddresses(row) {
|
||||||
|
if (row.addressFk) {
|
||||||
|
const isValid = validAddresses.value.some(
|
||||||
|
(address) => address.addressFk === row.addressFk
|
||||||
|
);
|
||||||
|
if (isValid)
|
||||||
|
return `${row.address?.nickname},
|
||||||
|
${row.address?.postcode?.town?.name} (${row.address?.province?.name})`;
|
||||||
|
else return '-';
|
||||||
|
}
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="RoadmapAddresses"
|
||||||
|
auto-load
|
||||||
|
@on-fetch="(data) => (validAddresses = data)"
|
||||||
|
/>
|
||||||
<ZoneSearchbar />
|
<ZoneSearchbar />
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
|
@ -153,6 +206,9 @@ const handleClone = (id) => {
|
||||||
redirect="zone"
|
redirect="zone"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
>
|
>
|
||||||
|
<template #column-addressFk="{ row }">
|
||||||
|
{{ showValidAddresses(row) }}
|
||||||
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="AgencyModes"
|
url="AgencyModes"
|
||||||
|
|
|
@ -32,6 +32,7 @@ list:
|
||||||
warehouse: Warehouse
|
warehouse: Warehouse
|
||||||
createZone: Create zone
|
createZone: Create zone
|
||||||
zoneSummary: Summary
|
zoneSummary: Summary
|
||||||
|
addressFk: Address
|
||||||
create:
|
create:
|
||||||
name: Name
|
name: Name
|
||||||
closingHour: Closing hour
|
closingHour: Closing hour
|
||||||
|
@ -41,6 +42,7 @@ summary:
|
||||||
basicData: Basic data
|
basicData: Basic data
|
||||||
closeHour: Close hour
|
closeHour: Close hour
|
||||||
filterPanel:
|
filterPanel:
|
||||||
|
name: Name
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
deliveryPanel:
|
deliveryPanel:
|
||||||
pickup: Pick up
|
pickup: Pick up
|
||||||
|
|
|
@ -33,6 +33,7 @@ list:
|
||||||
isVolumetric: Volumétrico
|
isVolumetric: Volumétrico
|
||||||
createZone: Crear zona
|
createZone: Crear zona
|
||||||
zoneSummary: Resumen
|
zoneSummary: Resumen
|
||||||
|
addressFk: Consignatario
|
||||||
create:
|
create:
|
||||||
closingHour: Hora de cierre
|
closingHour: Hora de cierre
|
||||||
itemMaxSize: Medida máxima
|
itemMaxSize: Medida máxima
|
||||||
|
@ -41,6 +42,7 @@ summary:
|
||||||
basicData: Datos básicos
|
basicData: Datos básicos
|
||||||
closeHour: Hora de cierre
|
closeHour: Hora de cierre
|
||||||
filterPanel:
|
filterPanel:
|
||||||
|
name: Nombre
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
deliveryPanel:
|
deliveryPanel:
|
||||||
pickup: Recogida
|
pickup: Recogida
|
||||||
|
|
|
@ -18,6 +18,7 @@ export const useArrayDataStore = defineStore('arrayDataStore', () => {
|
||||||
navigate: null,
|
navigate: null,
|
||||||
page: 1,
|
page: 1,
|
||||||
mapKey: 'id',
|
mapKey: 'id',
|
||||||
|
keepData: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
function get(key) {
|
function get(key) {
|
||||||
|
|
|
@ -11,21 +11,6 @@ describe('OrderCatalog', () => {
|
||||||
cy.dataCy('catalogFilterCustomTag').contains(filterName);
|
cy.dataCy('catalogFilterCustomTag').contains(filterName);
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkFilterTag = (filterName = 'Plant') => {
|
|
||||||
cy.dataCy('vnFilterPanelChip').should('exist');
|
|
||||||
cy.dataCy('vnFilterPanelChip').contains(filterName);
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectCategory = (categoryIndex = 1, categoryName = 'Plant') => {
|
|
||||||
cy.get(
|
|
||||||
`div.q-page-container div:nth-of-type(${categoryIndex}) > [data-cy='catalogFilterCategory']`
|
|
||||||
).should('exist');
|
|
||||||
cy.get(
|
|
||||||
`div.q-page-container div:nth-of-type(${categoryIndex}) > [data-cy='catalogFilterCategory']`
|
|
||||||
).click();
|
|
||||||
checkCustomFilterTag(categoryName);
|
|
||||||
};
|
|
||||||
|
|
||||||
const searchByCustomTagInput = (option) => {
|
const searchByCustomTagInput = (option) => {
|
||||||
cy.dataCy('catalogFilterValueInput').find('input').last().focus();
|
cy.dataCy('catalogFilterValueInput').find('input').last().focus();
|
||||||
cy.dataCy('catalogFilterValueInput').find('input').last().type(option);
|
cy.dataCy('catalogFilterValueInput').find('input').last().type(option);
|
||||||
|
@ -33,31 +18,19 @@ describe('OrderCatalog', () => {
|
||||||
checkCustomFilterTag(option);
|
checkCustomFilterTag(option);
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectTypeFilter = (option) => {
|
|
||||||
cy.selectOption(
|
|
||||||
'div.q-page-container div.list > div:nth-of-type(2) div:nth-of-type(3)',
|
|
||||||
option
|
|
||||||
);
|
|
||||||
checkFilterTag(option);
|
|
||||||
};
|
|
||||||
|
|
||||||
it('Shows empty state', () => {
|
it('Shows empty state', () => {
|
||||||
cy.dataCy('orderCatalogPage').should('exist');
|
cy.dataCy('orderCatalogPage').should('exist');
|
||||||
cy.dataCy('orderCatalogPage').contains('No data to display');
|
cy.dataCy('orderCatalogPage').contains('No data to display');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('filter by category', () => {
|
it('filter by category and type', () => {
|
||||||
selectCategory();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
|
cy.selectOption('[data-cy="catalogFilterType"]', 'Anthurium');
|
||||||
cy.dataCy('orderCatalogItem').should('exist');
|
cy.dataCy('orderCatalogItem').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('filters by type', () => {
|
|
||||||
selectCategory();
|
|
||||||
selectTypeFilter('Anthurium');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('filters by custom value select', () => {
|
it('filters by custom value select', () => {
|
||||||
selectCategory();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
searchByCustomTagInput('Silver');
|
searchByCustomTagInput('Silver');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,10 +40,12 @@ describe('OrderCatalog', () => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
selectCategory();
|
cy.get(
|
||||||
cy.dataCy('catalogFilterValueDialogBtn').should('exist');
|
'[data-cy="vnSearchBar"] > .q-field > .q-field__inner > .q-field__control'
|
||||||
|
).type('{enter}');
|
||||||
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
||||||
cy.dataCy('catalogFilterValueDialogTagSelect').should('exist');
|
cy.get('[data-cy="catalogFilterValueDialogTagSelect"]').click();
|
||||||
cy.selectOption("[data-cy='catalogFilterValueDialogTagSelect']", 'Tallos');
|
cy.selectOption("[data-cy='catalogFilterValueDialogTagSelect']", 'Tallos');
|
||||||
cy.dataCy('catalogFilterValueDialogValueInput').find('input').focus();
|
cy.dataCy('catalogFilterValueDialogValueInput').find('input').focus();
|
||||||
cy.dataCy('catalogFilterValueDialogValueInput').find('input').type('2');
|
cy.dataCy('catalogFilterValueDialogValueInput').find('input').type('2');
|
||||||
|
@ -79,34 +54,16 @@ describe('OrderCatalog', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('removes a secondary tag', () => {
|
it('removes a secondary tag', () => {
|
||||||
selectCategory();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
selectTypeFilter('Anthurium');
|
cy.selectOption('[data-cy="catalogFilterType"]', 'Anthurium');
|
||||||
cy.dataCy('vnFilterPanelChip').should('exist');
|
cy.dataCy('vnFilterPanelChip').should('exist');
|
||||||
cy.get(
|
cy.get('[data-cy="catalogFilterCustomTag"] > .q-chip__icon--remove').click();
|
||||||
"div.q-page-container [data-cy='vnFilterPanelChip'] > i.q-chip__icon--remove"
|
|
||||||
)
|
|
||||||
.contains('cancel')
|
|
||||||
.should('exist');
|
|
||||||
cy.get(
|
|
||||||
"div.q-page-container [data-cy='vnFilterPanelChip'] > i.q-chip__icon--remove"
|
|
||||||
)
|
|
||||||
.contains('cancel')
|
|
||||||
.click();
|
|
||||||
cy.dataCy('vnFilterPanelChip').should('not.exist');
|
cy.dataCy('vnFilterPanelChip').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Removes category tag', () => {
|
it('Removes category tag', () => {
|
||||||
selectCategory();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
cy.get(
|
cy.get('.q-chip__icon--remove').click();
|
||||||
"div.q-page-container [data-cy='catalogFilterCustomTag'] > i.q-chip__icon--remove"
|
|
||||||
)
|
|
||||||
.contains('cancel')
|
|
||||||
.should('exist');
|
|
||||||
cy.get(
|
|
||||||
"div.q-page-container [data-cy='catalogFilterCustomTag'] > i.q-chip__icon--remove"
|
|
||||||
)
|
|
||||||
.contains('cancel')
|
|
||||||
.click();
|
|
||||||
cy.dataCy('catalogFilterCustomTag').should('not.exist');
|
cy.dataCy('catalogFilterCustomTag').should('not.exist');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe('Client list', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client list create new client', () => {
|
it.skip('Client list create new client', () => {
|
||||||
cy.addBtnClick();
|
cy.addBtnClick();
|
||||||
const randomInt = Math.floor(Math.random() * 90) + 10;
|
const randomInt = Math.floor(Math.random() * 90) + 10;
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ describe('Handle Items FixedPrice', () => {
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
it('Massive remove', function () {
|
it.skip('Massive remove', function () {
|
||||||
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
||||||
cy.get('#subToolbar > .q-btn--flat').click();
|
cy.get('#subToolbar > .q-btn--flat').click();
|
||||||
cy.get(
|
cy.get(
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
describe('ItemLastEntries', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.viewport(1280, 720);
|
|
||||||
cy.login('buyer');
|
|
||||||
cy.visit('/#/item/1/last-entries');
|
|
||||||
cy.intercept('GET', /.*lastEntriesFilter/).as('item');
|
|
||||||
cy.waitForElement('tbody');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should filter by agency', () => {
|
|
||||||
cy.get('tbody > tr')
|
|
||||||
.its('length')
|
|
||||||
.then((rowCount) => {
|
|
||||||
cy.get('[data-cy="hideInventory"]').click();
|
|
||||||
cy.wait('@item');
|
|
||||||
cy.waitForElement('tbody');
|
|
||||||
cy.get('tbody > tr').should('have.length.greaterThan', rowCount);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -16,7 +16,9 @@ describe('Ticket expedtion', () => {
|
||||||
|
|
||||||
cy.wait('@show');
|
cy.wait('@show');
|
||||||
cy.selectRows([1, 2]);
|
cy.selectRows([1, 2]);
|
||||||
cy.selectOption('[data-cy="change-state"]', 'Perdida');
|
|
||||||
|
cy.dataCy('change-state').click();
|
||||||
|
cy.selectOption('[data-cy="vnBtnSelect_select"]', 'Perdida');
|
||||||
cy.wait('@add');
|
cy.wait('@add');
|
||||||
|
|
||||||
cy.get(`${tableContent} tr:nth-child(-n+2) ${stateTd}`).each(($el) => {
|
cy.get(`${tableContent} tr:nth-child(-n+2) ${stateTd}`).each(($el) => {
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('TicketList', () => {
|
||||||
cy.dataCy('ticketSummary').should('exist');
|
cy.dataCy('ticketSummary').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client list create new client', () => {
|
it.skip('Client list create new client', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('TicketRequest', () => {
|
||||||
cy.visit('/#/ticket/31/request');
|
cy.visit('/#/ticket/31/request');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Creates a new request', () => {
|
it.skip('Creates a new request', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
@ -66,7 +66,7 @@ describe('TicketSale', () => {
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||||
cy.dataCy('createClaimItem').click();
|
cy.dataCy('createClaimItem').click();
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
cy.url().should('match', /\/claim\/\d+\/basic-data/);
|
cy.url().should('contain', 'claim/');
|
||||||
// Delete created claim to avoid cluttering the database
|
// Delete created claim to avoid cluttering the database
|
||||||
cy.dataCy('descriptor-more-opts').click();
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
cy.dataCy('deleteClaim').click();
|
cy.dataCy('deleteClaim').click();
|
||||||
|
@ -106,22 +106,15 @@ describe('TicketSale', () => {
|
||||||
cy.checkNotification('The following refund ticket have been created');
|
cy.checkNotification('The following refund ticket have been created');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('transfers ticket', () => {
|
it('transfer sale to a new ticket', () => {
|
||||||
cy.visit('/#/ticket/32/sale');
|
cy.visit('/#/ticket/32/sale');
|
||||||
|
cy.get('.q-item > .q-item__label').should('have.text', ' #32');
|
||||||
selectFirstRow();
|
selectFirstRow();
|
||||||
cy.dataCy('ticketSaleTransferBtn').click();
|
cy.dataCy('ticketSaleTransferBtn').click();
|
||||||
cy.dataCy('ticketTransferPopup').should('exist');
|
cy.dataCy('ticketTransferPopup').should('exist');
|
||||||
cy.dataCy('ticketTransferNewTicketBtn').click();
|
cy.dataCy('ticketTransferNewTicketBtn').click();
|
||||||
// existen 3 elementos "tbody" necesito checkear que el segundo elemento tbody tenga una row sola
|
//check the new ticket has been created succesfully
|
||||||
cy.get('tbody').eq(1).find('tr').should('have.length', 1);
|
cy.get('.q-item > .q-item__label').should('not.have.text', ' #32');
|
||||||
selectFirstRow();
|
|
||||||
cy.dataCy('ticketSaleTransferBtn').click();
|
|
||||||
cy.dataCy('ticketTransferPopup').should('exist');
|
|
||||||
cy.dataCy('ticketTransferDestinationTicketInput').find('input').focus();
|
|
||||||
cy.dataCy('ticketTransferDestinationTicketInput').find('input').type('32');
|
|
||||||
cy.dataCy('ticketTransferTransferBtn').click();
|
|
||||||
// checkear que la url contenga /ticket/1000002/sale
|
|
||||||
cy.url().should('match', /\/ticket\/32\/sale/);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should redirect to ticket logs', () => {
|
it('should redirect to ticket logs', () => {
|
||||||
|
|
|
@ -38,10 +38,7 @@ describe('VnLocation', () => {
|
||||||
const province = 'Province five';
|
const province = 'Province five';
|
||||||
|
|
||||||
cy.selectOption(countrySelector, country);
|
cy.selectOption(countrySelector, country);
|
||||||
cy.selectOption(
|
cy.dataCy('locationProvince').type(`${province}{enter}`);
|
||||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
|
|
||||||
province
|
|
||||||
);
|
|
||||||
cy.get(
|
cy.get(
|
||||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) `
|
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) `
|
||||||
).click();
|
).click();
|
||||||
|
@ -134,13 +131,9 @@ describe('VnLocation', () => {
|
||||||
it('Create city with country', () => {
|
it('Create city with country', () => {
|
||||||
const cityName = 'Saskatchew'.concat(Math.random(1 * 100));
|
const cityName = 'Saskatchew'.concat(Math.random(1 * 100));
|
||||||
cy.get(createLocationButton).click();
|
cy.get(createLocationButton).click();
|
||||||
cy.selectOption(
|
cy.dataCy('locationCountry').type('Italia{enter}');
|
||||||
`${createForm.prefix} > :nth-child(5) > :nth-child(3) `,
|
|
||||||
'Italia'
|
|
||||||
);
|
|
||||||
cy.dataCy('City_icon').click();
|
cy.dataCy('City_icon').click();
|
||||||
cy.selectOption('[data-cy="locationProvince"]:last', 'Province four');
|
cy.selectOption('[data-cy="locationProvince"]:last', 'Province four');
|
||||||
cy.countSelectOptions('[data-cy="locationProvince"]:last', 1);
|
|
||||||
|
|
||||||
cy.dataCy('cityName').type(cityName);
|
cy.dataCy('cityName').type(cityName);
|
||||||
cy.dataCy('FormModelPopup_save').eq(1).click();
|
cy.dataCy('FormModelPopup_save').eq(1).click();
|
||||||
|
|
|
@ -10,14 +10,14 @@ describe('VnLog', () => {
|
||||||
cy.openRightMenu();
|
cy.openRightMenu();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter by insert actions', () => {
|
it.skip('should filter by insert actions', () => {
|
||||||
cy.checkOption(':nth-child(7) > .q-checkbox');
|
cy.checkOption(':nth-child(7) > .q-checkbox');
|
||||||
cy.get('.q-page').click();
|
cy.get('.q-page').click();
|
||||||
cy.validateContent(chips[0], 'Document');
|
cy.validateContent(chips[0], 'Document');
|
||||||
cy.validateContent(chips[1], 'Beginning');
|
cy.validateContent(chips[1], 'Beginning');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter by entity', () => {
|
it.skip('should filter by entity', () => {
|
||||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||||
cy.get('.q-page').click();
|
cy.get('.q-page').click();
|
||||||
cy.validateContent(chips[0], 'Claim');
|
cy.validateContent(chips[0], 'Claim');
|
||||||
|
|
|
@ -2,41 +2,22 @@ describe('WagonCreate', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/wagon/create');
|
cy.visit('/#/wagon');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create and delete a new wagon', () => {
|
it('should create and delete a new wagon', () => {
|
||||||
cy.waitForElement('.q-card');
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.get('input').eq(0).type('1234');
|
|
||||||
cy.get('input').eq(1).type('1234ABCD');
|
|
||||||
cy.get('input').eq(2).type('100');
|
|
||||||
cy.get('input').eq(3).click();
|
|
||||||
cy.get('.q-select > .q-field__inner > .q-field__control').type(
|
|
||||||
'{downarrow}{enter}'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Save
|
|
||||||
cy.get('button[type="submit"]').click();
|
|
||||||
|
|
||||||
// Check data has been saved successfully
|
|
||||||
cy.waitForElement('.q-card');
|
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'[to="/null/1"] > .q-card > .no-padding > .q-py-none > .cursor-text'
|
'.grid-create > [label="Label"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Label_input"]'
|
||||||
).should('have.text', '1234');
|
).type('1234');
|
||||||
cy.get(
|
cy.get(
|
||||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(1) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
'.grid-create > [label="Plate"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Plate_input"]'
|
||||||
).should('have.text', '1234ABCD');
|
).type('1234ABCD');
|
||||||
cy.get(
|
cy.get(
|
||||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(2) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
'.grid-create > [label="Volume"] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Volume_input"]'
|
||||||
).should('have.text', '100');
|
).type('100');
|
||||||
cy.get(
|
cy.dataCy('Type_select').type('{downarrow}{enter}');
|
||||||
'[to="/null/1"] > .q-card > .no-padding > .q-pr-lg > :nth-child(3) > .vn-label-value > .value > :nth-child(1) > .row > span'
|
// // Delete wagon type created
|
||||||
).should('have.text', 'Wagon Type #1');
|
cy.get('[to="/null/1"] > .q-card > .column > [title="Remove"]').click();
|
||||||
|
|
||||||
// Delete wagon type created
|
|
||||||
cy.get(
|
|
||||||
'[to="/null/2"] > .q-card > .column > [title="Remove"] > .q-btn__content > .q-icon'
|
|
||||||
).click();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -101,7 +101,6 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 5000) => {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
cy.get('@dataUrl').then((url) => {
|
cy.get('@dataUrl').then((url) => {
|
||||||
if (url) {
|
if (url) {
|
||||||
cy.log('url: ', url);
|
|
||||||
// Esperar a que el menú no esté visible (desaparezca)
|
// Esperar a que el menú no esté visible (desaparezca)
|
||||||
cy.get('.q-menu').should('not.be.visible');
|
cy.get('.q-menu').should('not.be.visible');
|
||||||
// Ahora esperar a que el menú vuelva a aparecer
|
// Ahora esperar a que el menú vuelva a aparecer
|
||||||
|
|
Loading…
Reference in New Issue