Compare commits
No commits in common. "dev" and "8061_newCP" have entirely different histories.
dev
...
8061_newCP
186
CHANGELOG.md
186
CHANGELOG.md
|
@ -1,189 +1,3 @@
|
|||
# Version 24.48 - 2024-11-25
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: correct checkNotification (fix_customer_issues) by:alexm
|
||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
||||
- chore: refs #6818 add spaces by:jorgep
|
||||
- chore: refs #6818 drop useless code & comment by:jorgep
|
||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
||||
- chore: refs #7524 fix test by:jorgep
|
||||
- chore: refs #8039 not required by:alexm
|
||||
- chore: refs #8078 fiz tests by:jorgep
|
||||
- chore: refs #8078 rollback ref by:jorgep
|
||||
- chore: remove console.log (warmFix_invoiceOut_Global) by:alexm
|
||||
- chore: typo (fix_itemType-redirection) by:alexm
|
||||
- feat: #6943 use openURL quasar by:Javier Segarra
|
||||
- feat: #7782 add cypress report by:Javier Segarra
|
||||
- feat: #7782 cypress.config watchForFileChanges by:Javier Segarra
|
||||
- feat: #7782 npm run resetDatabase by:Javier Segarra
|
||||
- feat: #7782 waitUntil domContentLoad by:Javier Segarra
|
||||
- feat: added composable to confirm orders by:Jon
|
||||
- feat: add /reports in gitignore (warmFix_reports_in_gitignore) by:alexm
|
||||
- feat: apply changes for customerModule by:Javier Segarra
|
||||
- feat: disabled buttons by:Javier Segarra
|
||||
- feat: move buttons to DescriptorMenu by:Javier Segarra
|
||||
- feat: refs #6818 add icon by:jorgep
|
||||
- feat: refs #6818 fetch url & default channel by:jorgep
|
||||
- feat: refs #6818 saysimple integration by:jorgep
|
||||
- feat: refs #6839 module searching (6839-addSearchMenu) by:jorgep
|
||||
- feat: refs #6839 normalize search by:jorgep
|
||||
- feat: refs #6919 sync entry data by:jorgep
|
||||
- feat: refs #7006 itemType basic data new inputs by:guillermo
|
||||
- feat: refs #7006 itemTypeLog added by:guillermo
|
||||
- feat: refs #7193 modified parking to use the scope and corrected small errors by:Jon
|
||||
- feat: refs #7206 added inactive label and corrected minor errors by:Jon
|
||||
- feat: refs #7308 #7308 remove warnings related to useSession by:Javier Segarra
|
||||
- feat: refs #7349 usa back con permisos by:jgallego
|
||||
- feat: refs #7524 add front test by:jorgep
|
||||
- feat: refs #7874 improve vn-notes ui by:jorgep
|
||||
- feat: refs #7970 notify changes by:Jon
|
||||
- feat(): refs #8039 canceledError not notify by:alexm
|
||||
- feat: refs #8039 notify error unify by:alexm
|
||||
- feat: refs #8039 show duplicate request in local by:alexm
|
||||
- feat: refs #8078 add shortcut multi selection by:jorgep
|
||||
- feat: refs #8078 add tests by:jorgep
|
||||
- feat: refs#8087 Redadas en travel by:Carlos Andrés
|
||||
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
|
||||
- feat: remove comments by:Javier Segarra
|
||||
- feat(Supplier): add companySize by:alexm
|
||||
- feat: use composable to unify logic by:Javier Segarra
|
||||
- feat(VnInput): empty to null by:alexm
|
||||
- feat(VnSelect): order data equal salix by:alexm
|
||||
- feat(VnSelect): refs #7136 add scroll (7136-vnSelect_paginate_simplify_2) by:alexm
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
||||
- perf: minor bugs detected by:Javier Segarra
|
||||
- perf: refs #6943 #6943 merge command by:Javier Segarra
|
||||
- perf: refs #7283 #7283 declare composable inst4ead code duplicated by:Javier Segarra
|
||||
- perf: refs #7283 #7283 handle composable i18n by:Javier Segarra
|
||||
- perf: refs #7283 #7283 handle i18n by:Javier Segarra
|
||||
- perf: refs #7283 #7283 i18n params by:Javier Segarra
|
||||
- perf: refs #7308 #7308 remove comments by:Javier Segarra
|
||||
- perf: remove appendParams by:Javier Segarra
|
||||
- perf: use const in VnLocation by:Javier Segarra
|
||||
- perf: use required instead :required="true" by:Javier Segarra
|
||||
- refactor: apply QPopupProxy by:wbuezas
|
||||
- refactor: changed confirmOrder directory by:Jon
|
||||
- refactor: change keyup.enter for update:model-value by:wbuezas
|
||||
- refactor(InvoiceInBasicData): use VnDms by:alexm
|
||||
- refactor: modified composable by:Jon
|
||||
- refactor: refs #6818 change channel source by:jorgep
|
||||
- refactor: refs #6818 channel logic by:jorgep
|
||||
- refactor: refs #6919 export filter by:jorgep
|
||||
- refactor: refs #7132 1st wave of changes in global translations files by:Jon
|
||||
- refactor: refs #7132 account's module translations by:Jon
|
||||
- refactor: refs #7132 customer's module translations by:Jon
|
||||
- refactor: refs #7132 deleted pageTitles repeated by:Jon
|
||||
- refactor: refs #7132 delete duplicate translations' keys by:Jon
|
||||
- refactor: refs #7132 deleted useless code by:Jon
|
||||
- refactor: refs #7132 global translations files changed by:Jon
|
||||
- refactor: refs #7266 Changed method name by:guillermo
|
||||
- refactor: refs #7950 Created cmr model by:guillermo
|
||||
- refactor: refs #7970 added emit by:Jon
|
||||
- refactor: refs #7970 refactored VnConfirm to emit events by:Jon
|
||||
- refactor: refs #8185 modified LeftMenu to avoid duplicates by:Jon
|
||||
- refactor: remove unused variable by:wbuezas
|
||||
- refactor: revert catalog changes by:Jon
|
||||
- refactor: small change by:wbuezas
|
||||
- test: refactor e2e by:alexm
|
||||
- test: refs #8039 add hasNotify and, refactor: agencyWorkCenter test by:alexm
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- chore: refs #7524 fix test by:jorgep
|
||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
||||
- fix: catalog view category and type filter by:wbuezas
|
||||
- fix: category and tags filters by:Jon
|
||||
- fix: changed route.query by:Jon
|
||||
- fix: change type vnput by:Javier Segarra
|
||||
- fix(ClaimList): stateCode orderBy priority by:alexm
|
||||
- fix: entryFilters by:carlossa
|
||||
- fix: filter panel by:Jon
|
||||
- fix(InvoiceOutGlobal): parallelism by:alexm
|
||||
- fix: itemBotanical by:Javier Segarra
|
||||
- fix: itemType redirection and fix filters by:alexm
|
||||
- fix: logout spec (warmFix_logout.spec) by:alexm
|
||||
- fix: merge errors by:alexm
|
||||
- fix: order catalog by:wbuezas
|
||||
- fix: order catalog fixes by:wbuezas
|
||||
- fix: refs #6818 use right icon by:jorgep
|
||||
- fix: refs #6896 fixed module problems by:Jon
|
||||
- fix: refs #7193 fixed e2e test by:Jon
|
||||
- fix: refs #7206 deleted duplicate code by:Jon
|
||||
- fix: refs #7273 use same filter by:jorgep
|
||||
- fix: refs #7283 #7283 bugs by:Javier Segarra
|
||||
- fix: refs #7283 #7283 ItemDiary subToolbar by:Javier Segarra
|
||||
- fix: refs #7283 #7283 ItemSummary bugs by:Javier Segarra
|
||||
- fix: refs #7283 Account image resolution by:guillermo
|
||||
- fix: refs #7283 css by:jorgep
|
||||
- fix: refs #7283 filter by:carlossa
|
||||
- fix: refs #7283 fix image by:carlossa
|
||||
- fix: refs #7283 fix pr by:carlossa
|
||||
- fix: refs #7283 fix preview by:carlossa
|
||||
- fix: refs #7283 fix required by:carlossa
|
||||
- fix: refs #7283 item filters by:carlossa
|
||||
- fix: refs #7283 itemtype fix by:carlossa
|
||||
- fix: refs #7283 order translation by:carlossa
|
||||
- fix: refs #7283 preview by:carlossa
|
||||
- fix: refs #7283 tooltips !Item by:Javier Segarra
|
||||
- fix: refs #7306 clean warning by:carlossa
|
||||
- fix: refs #7310 clean warning by:carlossa
|
||||
- fix: refs #7323 locale #7396 by:jorgep
|
||||
- fix: refs #7323 show advanced fields by:jorgep
|
||||
- fix: refs #7349 dependencia no usada by:jgallego
|
||||
- fix: refs #7524 e2e & worker module by:jorgep
|
||||
- fix: refs #7874 add title by:jorgep
|
||||
- fix: refs #7874 show name by:jorgep
|
||||
- fix: refs #7943 use correct data-key by:jorgep
|
||||
- fix: refs #7943 use summary by:jorgep
|
||||
- fix: refs #8039 bad tests by:alexm
|
||||
- fix: refs #8039 o not handle unnecessary errors by:alexm
|
||||
- fix: refs #8078 e2e #7970 by:jorgep
|
||||
- fix: refs #8078 handleSelection by:jorgep
|
||||
- fix: refs #8078 improve cy command (8078-enableMultiSelection) by:jorgep
|
||||
- fix: refs #8078 improve handleSelection by:jorgep
|
||||
- fix: reset category by:wbuezas
|
||||
- fix: tag chips by:Jon
|
||||
- fix: vnSearchbar spec (warmFix_vnSearchBar.spec) by:alexm
|
||||
- fix(VnSelect): setOptions when applyFilter by:alexm
|
||||
- fix: worker test e2e by:Jon
|
||||
- Merge branch 'dev' into fix_customer_issues by:Javier Segarra
|
||||
- refactor: revert catalog changes by:Jon
|
||||
- refs #7283 fix conflicts by:carlossa
|
||||
- refs #7283 fix descriptorproxy by:carlossa
|
||||
- refs #7283 fixedPrice by:carlossa
|
||||
- refs #7283 fixedPrices by:carlossa
|
||||
- refs #7283 fix itemFixed by:carlossa
|
||||
- refs #7283 fix itemFixedPrice by:carlossa
|
||||
- refs #7283 fix itemMigration by:carlossa
|
||||
- refs #7283 fix itemMigration list filters by:carlossa
|
||||
- refs #7283 fix items by:carlossa
|
||||
- refs #7283 fix items error get images by:carlossa
|
||||
- refs #7283 fix items images by:carlossa
|
||||
- refs #7283 fix request by:carlossa
|
||||
- refs #7283 fix searchbar by:carlossa
|
||||
- refs #7283 fix viewSummary by:carlossa
|
||||
- refs #7283 fix yml list basicData by:carlossa
|
||||
- refs #7283 itemRequest fix by:carlossa
|
||||
- refs #7283 itemRequest fix deny by:carlossa
|
||||
- refs #7283 itemRequest fix reload by:carlossa
|
||||
- refs #72983 fix filters by:carlossa
|
||||
- revert: commit by:Javier Segarra
|
||||
- revert e57a253c6f649382da187d1129449d265fb26d3b by:Javier Segarra
|
||||
- test: #8162 fix clientList spec by:Javier Segarra
|
||||
- test: #8162 fix vnLocation spec by:Javier Segarra
|
||||
- test: fix arrayData by:Javier Segarra
|
||||
- test: fix e2e by:alexm
|
||||
- test: fix e2e by:Javier Segarra
|
||||
- test: refs #8039 fix WorkerNotification e2e by:alexm
|
||||
- test: refs #8039 fix ZoneWarehouse e2e by:alexm
|
||||
- warmfix: ItemLastEntries to date (origin/warmfix_itemLastEntriesFilter) by:Javier Segarra
|
||||
|
||||
# Version 24.40 - 2024-10-02
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -44,7 +44,7 @@ const onDataSaved = (...args) => {
|
|||
<template #form-inputs="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('Name')"
|
||||
:label="t('Names')"
|
||||
v-model="data.name"
|
||||
:rules="validate('city.name')"
|
||||
/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -22,15 +22,12 @@ const postcodeFormData = reactive({
|
|||
townFk: null,
|
||||
});
|
||||
|
||||
const townsFetchDataRef = ref(false);
|
||||
const countriesFetchDataRef = ref(false);
|
||||
const provincesFetchDataRef = ref(false);
|
||||
const townsFetchDataRef = ref(null);
|
||||
const provincesFetchDataRef = ref(null);
|
||||
const countriesOptions = ref([]);
|
||||
const provincesOptions = ref([]);
|
||||
const townsOptions = ref([]);
|
||||
const town = ref({});
|
||||
const townFilter = ref({});
|
||||
const countryFilter = ref({});
|
||||
|
||||
function onDataSaved(formData) {
|
||||
const newPostcode = {
|
||||
|
@ -59,60 +56,10 @@ async function onCityCreated(newTown, formData) {
|
|||
}
|
||||
|
||||
function setTown(newTown, data) {
|
||||
data.provinceFk = newTown.provinceFk;
|
||||
data.countryFk = newTown.province.countryFk;
|
||||
if (!newTown) return;
|
||||
town.value = newTown;
|
||||
data.provinceFk = newTown?.provinceFk ?? newTown;
|
||||
data.countryFk = newTown?.province?.countryFk ?? newTown;
|
||||
}
|
||||
|
||||
async function setCountry(countryFk, data) {
|
||||
data.townFk = null;
|
||||
data.provinceFk = null;
|
||||
data.countryFk = countryFk;
|
||||
}
|
||||
|
||||
async function filterTowns(name) {
|
||||
if (name !== '') {
|
||||
townFilter.value.where = {
|
||||
name: {
|
||||
like: `%${name}%`,
|
||||
},
|
||||
};
|
||||
await townsFetchDataRef.value?.fetch();
|
||||
}
|
||||
}
|
||||
async function filterCountries(name) {
|
||||
if (name !== '') {
|
||||
countryFilter.value.where = {
|
||||
name: {
|
||||
like: `%${name}%`,
|
||||
},
|
||||
};
|
||||
await countriesFetchDataRef.value?.fetch();
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchTowns(countryFk) {
|
||||
if (!countryFk) return;
|
||||
townFilter.value.where = {
|
||||
provinceFk: {
|
||||
inq: provincesOptions.value.map(({ id }) => id),
|
||||
},
|
||||
};
|
||||
await townsFetchDataRef.value?.fetch();
|
||||
}
|
||||
|
||||
async function handleProvinces(data) {
|
||||
provincesOptions.value = data;
|
||||
if (postcodeFormData.countryFk) {
|
||||
await fetchTowns(postcodeFormData.countryFk);
|
||||
}
|
||||
}
|
||||
async function handleTowns(data) {
|
||||
townsOptions.value = data;
|
||||
}
|
||||
|
||||
async function handleCountries(data) {
|
||||
countriesOptions.value = data;
|
||||
}
|
||||
|
||||
async function setProvince(id, data) {
|
||||
|
@ -128,6 +75,70 @@ async function onProvinceCreated(data) {
|
|||
});
|
||||
postcodeFormData.provinceFk = data.id;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => [postcodeFormData.countryFk],
|
||||
async (newCountryFk, oldValueFk) => {
|
||||
if (Array.isArray(newCountryFk)) {
|
||||
newCountryFk = newCountryFk[0];
|
||||
}
|
||||
if (Array.isArray(oldValueFk)) {
|
||||
oldValueFk = oldValueFk[0];
|
||||
}
|
||||
if (!!oldValueFk && newCountryFk !== oldValueFk) {
|
||||
postcodeFormData.provinceFk = null;
|
||||
postcodeFormData.townFk = null;
|
||||
}
|
||||
if (oldValueFk !== newCountryFk) {
|
||||
await fetchProvinces(newCountryFk);
|
||||
await fetchTowns(newCountryFk);
|
||||
}
|
||||
}
|
||||
);
|
||||
async function fetchTowns(countryFk) {
|
||||
const townsFilter = countryFk
|
||||
? {
|
||||
where: {
|
||||
provinceFk: {
|
||||
inq: provincesOptions.value.map(({ id }) => id),
|
||||
},
|
||||
},
|
||||
}
|
||||
: {};
|
||||
await townsFetchDataRef.value.fetch(townsFilter);
|
||||
}
|
||||
async function fetchProvinces(countryFk) {
|
||||
const provincesFilter = countryFk
|
||||
? {
|
||||
where: {
|
||||
countryFk: countryFk,
|
||||
},
|
||||
}
|
||||
: {};
|
||||
await provincesFetchDataRef.value.fetch(provincesFilter);
|
||||
}
|
||||
watch(
|
||||
() => postcodeFormData.provinceFk,
|
||||
async (newProvinceFk, oldValueFk) => {
|
||||
if (Array.isArray(newProvinceFk)) {
|
||||
newProvinceFk = newProvinceFk[0];
|
||||
}
|
||||
if (newProvinceFk !== oldValueFk) {
|
||||
await townsFetchDataRef.value.fetch({
|
||||
where: { provinceFk: newProvinceFk },
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
async function handleProvinces(data) {
|
||||
provincesOptions.value = data;
|
||||
}
|
||||
async function handleTowns(data) {
|
||||
townsOptions.value = data;
|
||||
}
|
||||
async function handleCountries(data) {
|
||||
countriesOptions.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -143,15 +154,12 @@ async function onProvinceCreated(data) {
|
|||
ref="townsFetchDataRef"
|
||||
:sort-by="['name ASC']"
|
||||
:limit="30"
|
||||
:filter="townFilter"
|
||||
@on-fetch="handleTowns"
|
||||
auto-load
|
||||
url="Towns/location"
|
||||
/>
|
||||
<FetchData
|
||||
ref="countriesFetchDataRef"
|
||||
:limit="30"
|
||||
:filter="countryFilter"
|
||||
ref="CountriesFetchDataRef"
|
||||
:sort-by="['name ASC']"
|
||||
@on-fetch="handleCountries"
|
||||
auto-load
|
||||
|
@ -178,7 +186,6 @@ async function onProvinceCreated(data) {
|
|||
<VnSelectDialog
|
||||
:label="t('City')"
|
||||
@update:model-value="(value) => setTown(value, data)"
|
||||
@filter="filterTowns"
|
||||
:tooltip="t('Create city')"
|
||||
v-model="data.townFk"
|
||||
:options="townsOptions"
|
||||
|
@ -218,7 +225,7 @@ async function onProvinceCreated(data) {
|
|||
:province-selected="data.provinceFk"
|
||||
@update:model-value="(value) => setProvince(value, data)"
|
||||
v-model="data.provinceFk"
|
||||
@on-province-fetched="handleProvinces"
|
||||
:clearable="true"
|
||||
@on-province-created="onProvinceCreated"
|
||||
/>
|
||||
<VnSelect
|
||||
|
@ -226,12 +233,10 @@ async function onProvinceCreated(data) {
|
|||
@update:options="handleCountries"
|
||||
:options="countriesOptions"
|
||||
hide-selected
|
||||
@filter="filterCountries"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
v-model="data.countryFk"
|
||||
:rules="validate('postcode.countryFk')"
|
||||
@update:model-value="(value) => setCountry(value, data)"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -94,7 +94,6 @@ defineExpose({
|
|||
saveChanges,
|
||||
getChanges,
|
||||
formData,
|
||||
originalData,
|
||||
vnPaginateRef,
|
||||
});
|
||||
|
||||
|
|
|
@ -91,10 +91,6 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
maxWidth: {
|
||||
type: [String, Boolean],
|
||||
default: '800px',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||
const modelValue = computed(
|
||||
|
@ -287,7 +283,6 @@ defineExpose({
|
|||
@submit="save"
|
||||
@reset="reset"
|
||||
class="q-pa-md"
|
||||
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
||||
id="formModel"
|
||||
>
|
||||
<QCard>
|
||||
|
@ -376,6 +371,7 @@ defineExpose({
|
|||
color: black;
|
||||
}
|
||||
#formModel {
|
||||
max-width: 800px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
|||
import FetchData from 'components/FetchData.vue';
|
||||
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
|
||||
|
||||
const emit = defineEmits(['onProvinceCreated', 'onProvinceFetched']);
|
||||
const emit = defineEmits(['onProvinceCreated']);
|
||||
const $props = defineProps({
|
||||
countryFk: {
|
||||
type: Number,
|
||||
|
@ -50,7 +50,6 @@ watch(
|
|||
filter.value.where.countryFk = $props.countryFk;
|
||||
} else filter.value.where = {};
|
||||
await provincesFetchDataRef.value.fetch({});
|
||||
emit('onProvinceFetched', provincesOptions.value);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
@ -68,7 +67,6 @@ watch(
|
|||
:options="provincesOptions"
|
||||
:tooltip="t('Create province')"
|
||||
hide-selected
|
||||
:clearable="true"
|
||||
v-model="provinceFk"
|
||||
:rules="validate && validate('postcode.provinceFk')"
|
||||
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
||||
|
|
|
@ -1,24 +1,20 @@
|
|||
<script setup>
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import { QInput } from 'quasar';
|
||||
|
||||
const $props = defineProps({
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
insertable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'accountShortToStandard']);
|
||||
|
||||
let internalValue = ref($props.modelValue);
|
||||
let internalValue = ref(props.modelValue);
|
||||
|
||||
watch(
|
||||
() => $props.modelValue,
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
internalValue.value = newVal;
|
||||
}
|
||||
|
@ -32,46 +28,8 @@ watch(
|
|||
}
|
||||
);
|
||||
|
||||
const handleKeydown = (e) => {
|
||||
if (e.key === 'Backspace') return;
|
||||
if (e.key === '.') {
|
||||
accountShortToStandard();
|
||||
// TODO: Fix this setTimeout, with nextTick doesn't work
|
||||
setTimeout(() => {
|
||||
setCursorPosition(0, e.target);
|
||||
}, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($props.insertable && e.key.match(/[0-9]/)) {
|
||||
handleInsertMode(e);
|
||||
}
|
||||
};
|
||||
function setCursorPosition(pos, el = vnInputRef.value) {
|
||||
el.focus();
|
||||
el.setSelectionRange(pos, pos);
|
||||
}
|
||||
const vnInputRef = ref(false);
|
||||
const handleInsertMode = (e) => {
|
||||
e.preventDefault();
|
||||
const input = e.target;
|
||||
const cursorPos = input.selectionStart;
|
||||
const { maxlength } = vnInputRef.value;
|
||||
let currentValue = internalValue.value;
|
||||
if (!currentValue) currentValue = e.key;
|
||||
const newValue = e.key;
|
||||
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
|
||||
internalValue.value =
|
||||
currentValue.substring(0, cursorPos) +
|
||||
newValue +
|
||||
currentValue.substring(cursorPos + 1);
|
||||
}
|
||||
nextTick(() => {
|
||||
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
|
||||
});
|
||||
};
|
||||
function accountShortToStandard() {
|
||||
internalValue.value = internalValue.value?.replace(
|
||||
internalValue.value = internalValue.value.replace(
|
||||
'.',
|
||||
'0'.repeat(11 - internalValue.value.length)
|
||||
);
|
||||
|
@ -79,5 +37,5 @@ function accountShortToStandard() {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<QInput @keydown="handleKeydown" ref="vnInputRef" v-model="internalValue" />
|
||||
<q-input v-model="internalValue" />
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { computed, ref, useAttrs, nextTick } from 'vue';
|
||||
import { computed, ref, useAttrs } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRequired } from 'src/composables/useRequired';
|
||||
|
||||
|
@ -34,14 +34,6 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
insertable: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
maxlength: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const vnInputRef = ref(null);
|
||||
|
@ -77,9 +69,6 @@ const mixinRules = [
|
|||
requiredFieldRule,
|
||||
...($attrs.rules ?? []),
|
||||
(val) => {
|
||||
const { maxlength } = vnInputRef.value;
|
||||
if (maxlength && +val.length > maxlength)
|
||||
return t(`maxLength`, { value: maxlength });
|
||||
const { min, max } = vnInputRef.value.$attrs;
|
||||
if (!min) return null;
|
||||
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
||||
|
@ -89,33 +78,6 @@ const mixinRules = [
|
|||
}
|
||||
},
|
||||
];
|
||||
|
||||
const handleKeydown = (e) => {
|
||||
if (e.key === 'Backspace') return;
|
||||
|
||||
if ($props.insertable && e.key.match(/[0-9]/)) {
|
||||
handleInsertMode(e);
|
||||
}
|
||||
};
|
||||
|
||||
const handleInsertMode = (e) => {
|
||||
e.preventDefault();
|
||||
const input = e.target;
|
||||
const cursorPos = input.selectionStart;
|
||||
const { maxlength } = vnInputRef.value;
|
||||
let currentValue = value.value;
|
||||
if (!currentValue) currentValue = e.key;
|
||||
const newValue = e.key;
|
||||
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
|
||||
value.value =
|
||||
currentValue.substring(0, cursorPos) +
|
||||
newValue +
|
||||
currentValue.substring(cursorPos + 1);
|
||||
}
|
||||
nextTick(() => {
|
||||
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -127,12 +89,10 @@ const handleInsertMode = (e) => {
|
|||
:type="$attrs.type"
|
||||
:class="{ required: isRequired }"
|
||||
@keyup.enter="emit('keyup.enter')"
|
||||
@keydown="handleKeydown"
|
||||
:clearable="false"
|
||||
:rules="mixinRules"
|
||||
:lazy-rules="true"
|
||||
hide-bottom-space
|
||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_input'"
|
||||
>
|
||||
<template v-if="$slots.prepend" #prepend>
|
||||
<slot name="prepend" />
|
||||
|
@ -169,11 +129,9 @@ const handleInsertMode = (e) => {
|
|||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
maxLength: The value exceeds {value} characters
|
||||
inputMax: Must be less than {value}
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
maxLength: El valor excede los {value} carácteres
|
||||
inputMax: Debe ser menor a {value}
|
||||
</i18n>
|
||||
<style lang="scss">
|
||||
|
|
|
@ -306,7 +306,6 @@ function handleKeyDown(event) {
|
|||
:input-debounce="useURL ? '300' : '0'"
|
||||
:loading="isLoading"
|
||||
@virtual-scroll="onScroll"
|
||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
||||
>
|
||||
<template v-if="isClearable" #append>
|
||||
<QIcon
|
||||
|
|
|
@ -9,7 +9,7 @@ const token = getTokenMultimedia();
|
|||
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
||||
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
|
||||
const response = await axios.get(
|
||||
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
|
||||
url ?? `${appUrl}/${model}/${id}${urlPath}?access_token=${token}`,
|
||||
{ responseType: 'blob' }
|
||||
);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ globals:
|
|||
reference: Reference
|
||||
agency: Agency
|
||||
warehouseOut: Warehouse Out
|
||||
warehouseIn: Warehouse In
|
||||
wareHouseIn: Warehouse In
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
totalEntries: Total entries
|
||||
|
@ -298,7 +298,6 @@ globals:
|
|||
clientsActionsMonitor: Clients and actions
|
||||
serial: Serial
|
||||
medical: Mutual
|
||||
pit: IRPF
|
||||
RouteExtendedList: Router
|
||||
wasteRecalc: Waste recaclulate
|
||||
operator: Operator
|
||||
|
|
|
@ -303,7 +303,6 @@ globals:
|
|||
clientsActionsMonitor: Clientes y acciones
|
||||
serial: Facturas por serie
|
||||
medical: Mutua
|
||||
pit: IRPF
|
||||
wasteRecalc: Recalcular mermas
|
||||
operator: Operario
|
||||
parking: Parking
|
||||
|
|
|
@ -18,7 +18,7 @@ const groupedStates = ref();
|
|||
const handleScopeDays = (params, days, callback) => {
|
||||
const [from, to] = dateRange(Date.vnNew());
|
||||
if (!days) {
|
||||
Object.assign(params, { from, to, scopeDays: 0 });
|
||||
Object.assign(params, { from, to, scopeDays: 1 });
|
||||
} else {
|
||||
params.from = from;
|
||||
to.setDate(to.getDate() + days);
|
||||
|
@ -59,7 +59,7 @@ const getLocale = (label) => {
|
|||
</template>
|
||||
<template #customTags="{ params, searchFn, formatFn }">
|
||||
<VnFilterPanelChip
|
||||
v-if="params.scopeDays !== null"
|
||||
v-if="params.scopeDays"
|
||||
removable
|
||||
@remove="handleScopeDays(params, null, searchFn)"
|
||||
>
|
||||
|
|
|
@ -25,8 +25,11 @@ const provinceOpts = ref([]);
|
|||
const stateOpts = ref([]);
|
||||
const zoneOpts = ref([]);
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
||||
const [from, to] = dateRange(Date.vnNew());
|
||||
const from = Date.vnNew();
|
||||
from.setHours(0, 0, 0, 0);
|
||||
const to = new Date(from.getTime());
|
||||
to.setDate(to.getDate() + 1);
|
||||
to.setHours(23, 59, 59, 999);
|
||||
const stateColors = {
|
||||
notice: 'info',
|
||||
success: 'positive',
|
||||
|
@ -337,7 +340,7 @@ const openTab = (id) =>
|
|||
auto-load
|
||||
:row-click="({ id }) => openTab(id)"
|
||||
:disable-option="{ card: true }"
|
||||
:user-params="{ from, to, scopeDays: 0 }"
|
||||
:user-params="{ from, to, scopeDays: 1 }"
|
||||
>
|
||||
<template #top-left>
|
||||
<QBtn
|
||||
|
|
|
@ -36,6 +36,7 @@ const getSelectedTagValues = async (tag) => {
|
|||
const filter = {
|
||||
fields: ['value'],
|
||||
order: 'value ASC',
|
||||
limit: 30,
|
||||
};
|
||||
|
||||
const url = `Tags/${tag?.id}/filterValue`;
|
||||
|
|
|
@ -9,7 +9,6 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||
import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -101,13 +100,10 @@ function handleLocation(data, location) {
|
|||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnAccountNumber
|
||||
<VnInput
|
||||
v-model="data.account"
|
||||
:label="t('supplier.fiscalData.account')"
|
||||
clearable
|
||||
data-cy="supplierFiscalDataAccount"
|
||||
insertable
|
||||
:maxlength="10"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('supplier.fiscalData.sageTaxTypeFk')"
|
||||
|
|
|
@ -183,25 +183,18 @@ const resetChanges = async () => {
|
|||
};
|
||||
|
||||
const updateQuantity = async (sale) => {
|
||||
const params = { quantity: sale.quantity };
|
||||
try {
|
||||
await axios.post(`Sales/${sale.id}/updateQuantity`, params);
|
||||
} catch (e) {
|
||||
sale.quantity = tableRef.value.CrudModelRef.originalData.find(
|
||||
(s) => s.id === sale.id
|
||||
).quantity;
|
||||
throw e;
|
||||
}
|
||||
const payload = { quantity: sale.quantity };
|
||||
await axios.post(`Sales/${sale.id}/updateQuantity`, payload);
|
||||
notify('globals.dataSaved', 'positive');
|
||||
};
|
||||
|
||||
const addSale = async (sale) => {
|
||||
const params = {
|
||||
const payload = {
|
||||
barcode: sale.itemFk,
|
||||
quantity: sale.quantity,
|
||||
};
|
||||
|
||||
const { data } = await axios.post(`tickets/${route.params.id}/addSale`, params);
|
||||
const { data } = await axios.post(`tickets/${route.params.id}/addSale`, payload);
|
||||
|
||||
if (!data) return;
|
||||
|
||||
|
@ -229,7 +222,7 @@ const changeQuantity = async (sale) => {
|
|||
)
|
||||
return;
|
||||
if (!sale.id) return addSale(sale);
|
||||
await updateQuantity(sale);
|
||||
updateQuantity(sale);
|
||||
};
|
||||
|
||||
const updateConcept = async (sale) => {
|
||||
|
|
|
@ -14,8 +14,6 @@ const route = useRoute();
|
|||
const { t } = useI18n();
|
||||
|
||||
const agenciesOptions = ref([]);
|
||||
const warehousesOptionsOut = ref([]);
|
||||
const warehousesOptionsIn = ref([]);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -23,18 +21,6 @@ const warehousesOptionsIn = ref([]);
|
|||
@on-fetch="(data) => (agenciesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptionsOut = data)"
|
||||
auto-load
|
||||
:filter="{ where: { isOrigin: TRUE } }"
|
||||
/>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptionsIn = data)"
|
||||
auto-load
|
||||
:filter="{ where: { isDestiny: TRUE } }"
|
||||
/>
|
||||
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
|
@ -53,12 +39,11 @@ const warehousesOptionsIn = ref([]);
|
|||
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
||||
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('globals.warehouseOut')"
|
||||
v-model="data.warehouseOutFk"
|
||||
:options="warehousesOptionsOut"
|
||||
:options="agenciesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
map-options
|
||||
|
@ -67,7 +52,7 @@ const warehousesOptionsIn = ref([]);
|
|||
<VnSelect
|
||||
:label="t('globals.warehouseIn')"
|
||||
v-model="data.warehouseInFk"
|
||||
:options="warehousesOptionsIn"
|
||||
:options="agenciesOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
map-options
|
||||
|
@ -104,7 +89,7 @@ const warehousesOptionsIn = ref([]);
|
|||
|
||||
<i18n>
|
||||
es:
|
||||
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados.
|
||||
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si se deja vacio, la fecha no cambiará
|
||||
en:
|
||||
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days.
|
||||
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If left empty, the date will stay the same.
|
||||
</i18n>
|
||||
|
|
|
@ -44,8 +44,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
|||
<TravelDescriptorMenuItems :travel="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn?.name" />
|
||||
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut?.name" />
|
||||
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn.name" />
|
||||
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut.name" />
|
||||
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
||||
|
|
|
@ -1,263 +0,0 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import axios from 'axios';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'src/components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import CrudModel from 'components/CrudModel.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import { useQuasar } from 'quasar';
|
||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
const { notify } = useNotify();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const disabilityGradesOptions = ref();
|
||||
const workerPitCrudRef = ref({});
|
||||
const insertTag = () => {
|
||||
workerPitCrudRef.value.insert();
|
||||
};
|
||||
const quasar = useQuasar();
|
||||
const deleteRelative = async (id) => {
|
||||
await new Promise((resolve) => {
|
||||
quasar
|
||||
.dialog({
|
||||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t('Remove Relative'),
|
||||
message: t('Do you want to remove this relative?'),
|
||||
},
|
||||
})
|
||||
.onOk(() => {
|
||||
resolve(true);
|
||||
})
|
||||
.onCancel(() => {
|
||||
resolve(false);
|
||||
});
|
||||
});
|
||||
await axios.delete(`WorkerRelatives/${id}`);
|
||||
workerPitCrudRef.value.reload();
|
||||
notify('Relative removed', 'positive');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="DisabilityGrades"
|
||||
@on-fetch="(data) => (disabilityGradesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
|
||||
<FormModel
|
||||
url="WorkerIrpfs"
|
||||
:filter="{ where: { workerFk: route.params.id } }"
|
||||
auto-load
|
||||
data-key="workerIrpfs"
|
||||
:max-width="false"
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<QCard class="q-px-lg q-py-lg">
|
||||
<VnTitle :text="t('IRPF')" />
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('familySituation')"
|
||||
clearable
|
||||
v-model="data.familySituation"
|
||||
/>
|
||||
<VnInput :label="t('spouseNif')" clearable v-model="data.spouseNif" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('disabilityGrades')"
|
||||
:options="disabilityGradesOptions"
|
||||
option-label="description"
|
||||
option-value="id"
|
||||
v-model="data.disabilityGradeFk"
|
||||
id="disabilityGrades"
|
||||
data-cy="disabilityGrades"
|
||||
hide-selected
|
||||
/>
|
||||
|
||||
<VnInputDate
|
||||
:label="t('geographicMobilityDate')"
|
||||
v-model="data.geographicMobilityDate"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnInput
|
||||
clearable
|
||||
v-model="data.childPension"
|
||||
:label="t(`childPension`)"
|
||||
/>
|
||||
<VnInput
|
||||
clearable
|
||||
v-model="data.spousePension"
|
||||
:label="t(`spousePension`)"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox v-model="data.isDependend" :label="t(`isDependend`)" />
|
||||
<QCheckbox
|
||||
v-model="data.hasHousingPaymentBefore"
|
||||
:label="t(`hasHousingPaymentBefore`)"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
v-model="data.hasHousingPaymentAfter"
|
||||
:label="t(`hasHousingPaymentAfter`)"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="data.hasExtendedWorking"
|
||||
:label="t(`hasExtendedWorking`)"
|
||||
/>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
|
||||
<CrudModel
|
||||
ref="workerPitCrudRef"
|
||||
data-key="workerPit"
|
||||
url="WorkerRelatives"
|
||||
auto-load
|
||||
:filter="{
|
||||
where: { workerFk: route.params.id },
|
||||
}"
|
||||
:data-required="{ workerFk: route.params.id }"
|
||||
:has-sub-toolbar="false"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<QCard class="q-px-lg q-py-lg" flat>
|
||||
<div class="row no-wrap justify-between q-pb-md">
|
||||
<VnTitle :text="t('Relatives')" />
|
||||
<QBtnGroup push style="column-gap: 10px">
|
||||
<QBtn
|
||||
color="primary"
|
||||
icon="restart_alt"
|
||||
flat
|
||||
@click="workerPitCrudRef.reset"
|
||||
:disable="!workerPitCrudRef.hasChanges"
|
||||
:title="t('globals.reset')"
|
||||
/>
|
||||
<QBtn
|
||||
ref="saveButtonRef"
|
||||
color="primary"
|
||||
icon="save"
|
||||
@click="workerPitCrudRef.onSubmit"
|
||||
:disable="!workerPitCrudRef.hasChanges"
|
||||
:title="t('globals.save')"
|
||||
data-cy="workerPitRelativeSaveBtn"
|
||||
/>
|
||||
</QBtnGroup>
|
||||
</div>
|
||||
<div
|
||||
v-for="(row, index) in rows"
|
||||
:key="index"
|
||||
class="row no-wrap q-mb-lg q-gutter-lg"
|
||||
padding="none"
|
||||
>
|
||||
<VnSelect
|
||||
:options="[
|
||||
{ id: 0, name: 'Ascendiente' },
|
||||
{ id: 1, name: 'Descendiente' },
|
||||
]"
|
||||
:label="t('isDescendant')"
|
||||
v-model="row.isDescendant"
|
||||
class="q-gutter-xs q-mb-xs"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('disabilityGrades')"
|
||||
:options="disabilityGradesOptions"
|
||||
option-label="description"
|
||||
option-value="id"
|
||||
v-model="row.disabilityGradeFk"
|
||||
class="q-gutter-xs q-mb-xs"
|
||||
/>
|
||||
<VnInput
|
||||
type="number"
|
||||
v-model="row.birthed"
|
||||
:label="t(`birthed`)"
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
type="number"
|
||||
v-model="row.adoptionYear"
|
||||
:label="t(`adoptionYear`)"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="row.isDependend"
|
||||
:label="t(`isDependend`)"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="row.isJointCustody"
|
||||
:label="t(`isJointCustody`)"
|
||||
size="xs"
|
||||
/>
|
||||
<QBtn
|
||||
@click="deleteRelative(rows[0].id)"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
flat
|
||||
icon="delete"
|
||||
style="flex: 0"
|
||||
/>
|
||||
</div>
|
||||
<VnRow class="justify-left items-center">
|
||||
<QBtn
|
||||
@click="insertTag(rows)"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
style="flex: 0"
|
||||
data-cy="addRelative"
|
||||
/>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
</CrudModel>
|
||||
</template>
|
||||
</FormModel>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
familySituation: Situación familiar
|
||||
disabilityGrades: Discapacidad
|
||||
geographicMobilityDate: Movilidad geografica
|
||||
childPension: Pensión hijos
|
||||
spousePension: Pensión cónyuge
|
||||
isDependend: Ayuda / Movilidad reducida
|
||||
spouseNif: NIF cónyuge
|
||||
hasHousingPaymentBefore: Pagos vivienda anterior 2011
|
||||
hasHousingPaymentAfter: Pagos vivienda posterior 2011
|
||||
hasExtendedWorking: Prolongación actividad laboral
|
||||
isDescendant: Descen/Ascen
|
||||
disabilityGradeFk: Discapacidad
|
||||
birthed: Año nacimiento
|
||||
adoptionYear: Año adopción
|
||||
isJointCustody: Computo por entero
|
||||
Relatives: Relacionados
|
||||
en:
|
||||
familySituation: Family Situation
|
||||
disabilityGrades: Disability Grades
|
||||
geographicMobilityDate: Geographic Mobility Date
|
||||
childPension: Child Pension
|
||||
spousePension: Spouse Pension
|
||||
isDependend: Dependent Suport / Reduced Mobility
|
||||
spouseNif: Spouse NIF (Tax ID)
|
||||
hasHousingPaymentBefore: Housing Payments Before 2011
|
||||
hasHousingPaymentAfter: Housing Payments After 2011
|
||||
hasExtendedWorking: Extended Work Activity
|
||||
isDescendant: Descendant/Ascendant
|
||||
disabilityGradeFk: Disability Grade
|
||||
birthed: Birth Year
|
||||
adoptionYear: Adoption Year
|
||||
isJointCustody: Joint custody
|
||||
Relatives: Relatives
|
||||
</i18n>
|
|
@ -24,7 +24,6 @@ export default {
|
|||
'WorkerDms',
|
||||
'WorkerTimeControl',
|
||||
'WorkerLocker',
|
||||
'WorkerPit',
|
||||
'WorkerBalance',
|
||||
'WorkerFormation',
|
||||
'WorkerMedical',
|
||||
|
@ -217,15 +216,6 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerMedical.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerPit',
|
||||
path: 'pit',
|
||||
meta: {
|
||||
title: 'pit',
|
||||
icon: 'lock',
|
||||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerPit.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerOperator',
|
||||
path: 'operator',
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
describe('VnInput Component', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit('/#/supplier/1/fiscal-data');
|
||||
cy.domContentLoad();
|
||||
});
|
||||
|
||||
it('should replace character at cursor position in insert mode', () => {
|
||||
// Simula escribir en el input
|
||||
cy.dataCy('supplierFiscalDataAccount').clear();
|
||||
cy.dataCy('supplierFiscalDataAccount').type('4100000001');
|
||||
// Coloca el cursor en la posición 0
|
||||
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
||||
// Escribe un número y verifica que se reemplace correctamente
|
||||
cy.dataCy('supplierFiscalDataAccount').type('999');
|
||||
cy.dataCy('supplierFiscalDataAccount')
|
||||
.should('have.value', '9990000001');
|
||||
});
|
||||
|
||||
it('should replace character at cursor position in insert mode', () => {
|
||||
// Simula escribir en el input
|
||||
cy.dataCy('supplierFiscalDataAccount').clear();
|
||||
cy.dataCy('supplierFiscalDataAccount').type('4100000001');
|
||||
// Coloca el cursor en la posición 0
|
||||
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
||||
// Escribe un número y verifica que se reemplace correctamente en la posicion incial
|
||||
cy.dataCy('supplierFiscalDataAccount').type('999');
|
||||
cy.dataCy('supplierFiscalDataAccount')
|
||||
.should('have.value', '9990000001');
|
||||
});
|
||||
|
||||
it('should respect maxlength prop', () => {
|
||||
cy.dataCy('supplierFiscalDataAccount').clear();
|
||||
cy.dataCy('supplierFiscalDataAccount').type('123456789012345');
|
||||
cy.dataCy('supplierFiscalDataAccount')
|
||||
.should('have.value', '1234567890'); // asumiendo que maxlength es 10
|
||||
});
|
||||
});
|
|
@ -1,5 +1,3 @@
|
|||
const { randomNumber, randomString } = require('../../support');
|
||||
|
||||
describe('VnLocation', () => {
|
||||
const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
|
||||
const dialogInputs = '.q-dialog label input';
|
||||
|
@ -105,12 +103,12 @@ describe('VnLocation', () => {
|
|||
const province = 'Valencia';
|
||||
cy.get(createLocationButton).click();
|
||||
cy.get('.q-card > h1').should('have.text', 'New postcode');
|
||||
cy.get(dialogInputs).eq(0).clear();
|
||||
cy.get(dialogInputs).eq(0).type(postCode);
|
||||
cy.selectOption(
|
||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix}`,
|
||||
province
|
||||
);
|
||||
cy.get(dialogInputs).eq(0).clear();
|
||||
cy.get(dialogInputs).eq(0).type(postCode);
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
cy.get(`${createForm.prefix}`).should('not.exist');
|
||||
cy.waitForElement('.q-form');
|
||||
|
@ -119,19 +117,14 @@ describe('VnLocation', () => {
|
|||
});
|
||||
|
||||
it('Create city without country', () => {
|
||||
const postCode = randomNumber();
|
||||
const province = randomString({ length: 4 });
|
||||
const cityName = 'Saskatchew'.concat(Math.random(1 * 100));
|
||||
cy.get(createLocationButton).click();
|
||||
cy.get(dialogInputs).eq(0).type(postCode);
|
||||
cy.get(
|
||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
|
||||
).click();
|
||||
cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
|
||||
cy.get('#q-portal--dialog--3 .q-input').type(province);
|
||||
cy.get('#q-portal--dialog--3 .q-input').type(cityName);
|
||||
cy.get('#q-portal--dialog--3 .q-btn--standard').click();
|
||||
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
|
||||
cy.waitForElement('.q-form');
|
||||
checkVnLocation(postCode, province);
|
||||
});
|
||||
|
||||
it('Create province without country', () => {
|
|
@ -1,40 +0,0 @@
|
|||
describe('WorkerPit', () => {
|
||||
const familySituationInput = '[data-cy="Family Situation_input"]';
|
||||
const familySituation = '1';
|
||||
const childPensionInput = '[data-cy="Child Pension_input"]';
|
||||
const childPension = '120';
|
||||
const spouseNifInput = '[data-cy="Spouse Pension_input"]';
|
||||
const spouseNif = '65117125P';
|
||||
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
||||
const spousePension = '120';
|
||||
const addRelative = '[data-cy="addRelative"]';
|
||||
const isDescendantSelect = '[data-cy="Descendant/Ascendant_select"]';
|
||||
const birthedInput = '[data-cy="Birth Year_input"]';
|
||||
const birthed = '2002';
|
||||
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
||||
const adoptionYear = '2004';
|
||||
const saveRelative = '[data-cy="workerPitRelativeSaveBtn"]';
|
||||
const savePIT = '#st-actions > .q-btn-group > .q-btn--standard';
|
||||
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/worker/1107/pit`);
|
||||
});
|
||||
|
||||
it('complete PIT', () => {
|
||||
cy.get(familySituationInput).type(familySituation);
|
||||
cy.get(childPensionInput).type(childPension);
|
||||
cy.get(spouseNifInput).type(spouseNif);
|
||||
cy.get(spousePensionInput).type(spousePension);
|
||||
cy.get(savePIT).click();
|
||||
});
|
||||
|
||||
it('complete relative', () => {
|
||||
cy.get(addRelative).click();
|
||||
cy.get(isDescendantSelect).type('{downArrow}{downArrow}{enter}');
|
||||
cy.get(birthedInput).type(birthed);
|
||||
cy.get(adoptionYearInput).type(adoptionYear);
|
||||
cy.get(saveRelative).click();
|
||||
});
|
||||
});
|
|
@ -15,19 +15,3 @@
|
|||
|
||||
import './commands';
|
||||
|
||||
function randomString(options = { length: 10 }) {
|
||||
let possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
return randomizeValue(possible, options);
|
||||
}
|
||||
|
||||
function randomNumber(options = { length: 10 }) {
|
||||
let possible = '0123456789';
|
||||
return randomizeValue(possible, options);
|
||||
}
|
||||
|
||||
function randomizeValue(characterSet, options) {
|
||||
return Array.from({ length: options.length }, () =>
|
||||
characterSet.charAt(Math.floor(Math.random() * characterSet.length))
|
||||
).join('');
|
||||
}
|
||||
export { randomString, randomNumber, randomizeValue };
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('downloadFile', () => {
|
|||
await downloadFile(1);
|
||||
|
||||
expect(axios.get).toHaveBeenCalledWith(
|
||||
`${baseUrl}/api/dms/1/downloadFile?access_token=${token}`,
|
||||
`${baseUrl}/dms/1/downloadFile?access_token=${token}`,
|
||||
{ responseType: 'blob' }
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue