Merge branch 'dev' into 8667-FixClientNewPayment
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
31c7b83ea5
211
CHANGELOG.md
211
CHANGELOG.md
|
@ -1,3 +1,214 @@
|
||||||
|
# Version 25.12 - 2025-03-25
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- chore: add junit-merge dependency to package.json by:alexm
|
||||||
|
- chore: downgrade version from 25.14.0 to 25.12.0 in package.json by:alexm
|
||||||
|
- chore: reduce page load timeout in Cypress configuration by:alexm
|
||||||
|
- chore: refs #6695 update Cypress to version 14.1.0 and simplify test execution in Jenkinsfile by:alexm
|
||||||
|
- chore: refs #8602 add comments for clarity in Cypress commands file by:pablone
|
||||||
|
- chore: refs #8602 enhance Cypress support files with detailed comments and organization by:pablone
|
||||||
|
- ci: refs #6695 feat jenkins parallel e2e by:alexm
|
||||||
|
- feat: integrate vue-router to enhance routing capabilities in ZoneCard component by:alexm
|
||||||
|
- feat: refs #6695 implement parallel Cypress testing and enhance timeout configurations by:alexm
|
||||||
|
- feat: refs #6695 update Cypress parallel test execution to use 3 instances by:alexm
|
||||||
|
- feat: refs #6802 add dash placeholder for empty department names in InvoiceOut list by:jgallego
|
||||||
|
- feat: refs #6802 add DepartmentDescriptorProxy to InvoiceOutList and update translations by:jgallego
|
||||||
|
- feat: refs #6802 add DepartmentDescriptorProxy to various components and update department handling by:jgallego
|
||||||
|
- feat: refs #7587 add 'ticketClaimed' translation and implement claims retrieval in TicketDescriptor by:jtubau
|
||||||
|
- feat: refs #7949 show new field in ticket sales by:Jon
|
||||||
|
- feat: refs #8045 added new logic to show the correct icon and the correct path to redirect by:Jon
|
||||||
|
- feat: refs #8045 modified icon and route to redirect from CardDescriptor by:Jon
|
||||||
|
- feat: refs #8074 modified spinner size by:Jon
|
||||||
|
- feat: refs #8600 added calendar e2e and modified basic data by:Jon
|
||||||
|
- feat: refs #8600 added deliveryDays and modified warehouse E2Es by:Jon
|
||||||
|
- feat: refs #8600 added new tests for zoneSummary & zoneLocations by:provira
|
||||||
|
- feat: refs #8602 add custom Cypress commands for improved element interaction and request handling by:pablone
|
||||||
|
- feat: refs #8602 add new Cypress command for clicking buttons with icons by:pablone
|
||||||
|
- feat: refs #8602 add remove functionality for tag filters in EntryBuys component by:pablone
|
||||||
|
- feat: refs #8602 add sorting options for select fields and update locale files with supplier name by:pablone
|
||||||
|
- feat: refs #8602 refactor EntryBuys component and enhance observation tests by:pablone
|
||||||
|
- feat: refs #8602 remove unused state property from useArrayDataStore by:pablone
|
||||||
|
- feat: refs #8602 remove unused URL property from VnTable in ClaimList component by:pablone
|
||||||
|
- feat: refs #8602 skip warehouse creation and removal test in ZoneWarehouse spec by:pablone
|
||||||
|
- feat: refs #8602 streamline beforeSaveFn execution in CrudModel component by:pablone
|
||||||
|
- feat: refs #8602 streamline beforeSaveFn execution in VnTable component by:pablone
|
||||||
|
- feat: refs #8602 streamline filter logic in EntryBuys component by:pablone
|
||||||
|
- feat: refs #8602 update entry components and tests, add data-cy attributes for Cypress integration by:pablone
|
||||||
|
- feat: refs #8602 update localization for purchased spaces and enhance Entry components with new labels by:pablone
|
||||||
|
- feat: refs #8606 adapt module to VnCatdBeta by:Jon
|
||||||
|
- feat: refs #8612 added summary button & changed e2e tests by:provira
|
||||||
|
- feat: refs #8612 changed shelving to VnTable & created e2e tests by:provira
|
||||||
|
- feat: refs #8616 add summary prop to CardDescriptor in RoadmapDescriptor and WorkerDescriptor by:jtubau
|
||||||
|
- feat: refs #8616 add VnCheckbox component to VnFilter and update prop types in VnFilterPanel and VnSearchbar by:jtubau
|
||||||
|
- feat: refs #8630 add Agency and Vehicle descriptor components with summary props by:jtubau
|
||||||
|
- feat: refs #8638 add AWB field to travel and entry forms, update translations and styles by:pablone
|
||||||
|
- feat: refs #8638 add data attributes for transfer buys functionality in EntryBuys.vue and corresponding tests by:pablone
|
||||||
|
- feat: refs #8648 enhance roadmapList tests with improved selectors and additional scenarios by:jtubau
|
||||||
|
- feat: refs #8664 add CmrFilter component and integrate it into CmrList for enhanced filtering options by:jtubau
|
||||||
|
- feat: refs #8721 add ticket navigation and update route columns by:jtubau
|
||||||
|
- feat: run.sh build neccessary images by:alexm
|
||||||
|
- feat: update Jenkinsfile to pull Docker images for back and db services by:alexm
|
||||||
|
- feat: update labels and add department selection in InvoiceOut filter and list by:jgallego
|
||||||
|
- refactor: refs #8626 update button styles and improve route redirection logic by:jtubau
|
||||||
|
- style: refs #8041 new variable by:benjaminedc
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- feat: refs #8602 refactor EntryBuys component and enhance observation tests by:pablone
|
||||||
|
- refactor(cypress): refs #6695 simplify parallel test execution script by:alexm
|
||||||
|
- refactor: deleted useless (origin/Warmfix-DepartmentIcon) by:Jon
|
||||||
|
- refactor: refs #6695 enable ClaimNotes test suite by:alexm
|
||||||
|
- refactor: refs #6695 fix invoiceOutSummary by:alexm
|
||||||
|
- refactor: refs #6695 improve notification check and extend waitForElement timeout by:alexm
|
||||||
|
- refactor: refs #6695 remove mocha dependency and optimize Cypress command execution by:alexm
|
||||||
|
- refactor: refs #6695 skips by:alexm
|
||||||
|
- refactor: refs #6695 skip zoneWarehouse by:alexm
|
||||||
|
- refactor: refs #6695 streamline Cypress test execution and remove deprecated configurations by:alexm
|
||||||
|
- refactor: refs #6802 replace salesPerson references with department in claims and tickets by:jgallego
|
||||||
|
- refactor: refs #6802 replace 'salesPerson' terminology with 'team' across multiple locales and components by:jgallego
|
||||||
|
- refactor: refs #6802 update import paths for DepartmentDescriptorProxy to use Worker directory by:jgallego
|
||||||
|
- refactor: refs #6802 update InvoiceOutNegativeBases to use Department instead of Worker by:jgallego
|
||||||
|
- refactor: refs #6802 update TicketFilter and TicketSale components to use departmentFk and adjust API endpoints by:jgallego
|
||||||
|
- refactor: refs #8041 unify class link and unify titles to VnTitles by:benjaminedc
|
||||||
|
- refactor: refs #8045 modified icon and module const by:Jon
|
||||||
|
- refactor: refs #8197 rename VnCardBeta to VnCard by:alexm
|
||||||
|
- refactor: refs #8197 simplify menu retrieval logic in LeftMenu component by:alexm
|
||||||
|
- refactor: refs #8322 changed Wagon component to use VnSection/VnCardBeta by:provira
|
||||||
|
- refactor: refs #8322 remove keyBinding from Wagon router module by:alexm
|
||||||
|
- refactor: refs #8322 update WagonCard component and routing structure by:alexm
|
||||||
|
- refactor: refs #8370 modified function to get the correct date by:Jon
|
||||||
|
- refactor: refs #8472 remove added div and add class to VnInput by:jtubau
|
||||||
|
- refactor: refs #8472 unified styling for the more-create-dialog slot to ensure consistency across all scenarios by:jtubau
|
||||||
|
- refactor: refs #8472 update class names from q-span-2 to col-span-2 for consistency in layout by:jtubau
|
||||||
|
- refactor: refs #8600 changed test case description by:provira
|
||||||
|
- refactor: refs #8600 modified make invoice and send dialog e2es by:Jon
|
||||||
|
- refactor: refs #8600 modified upcomingDeliveries e2e and created deliveryDays by:Jon
|
||||||
|
- refactor: refs #8600 modified zoneSummary e2e by:Jon
|
||||||
|
- refactor: refs #8602 remove redundant date input test from entryList.spec.js by:pablone
|
||||||
|
- refactor: refs #8606 clear some warnings by:Jon
|
||||||
|
- refactor: refs #8606 deleted code and fixed translation by:Jon
|
||||||
|
- refactor: refs #8606 merged previous and e2e changes and corrected minor errors by:Jon
|
||||||
|
- refactor: refs #8606 requested changes by:Jon
|
||||||
|
- refactor: refs #8616 integrate summary dialog and update navigation in Agency and Vehicle components by:jtubau
|
||||||
|
- refactor: refs #8616 integrate VnSelectWorker component in RouteList and optimize format functions by:jtubau
|
||||||
|
- refactor: refs #8616 simplify template bindings and improve link generation in VehicleSummary by:jtubau
|
||||||
|
- refactor: refs #8616 update routing components for AgencyList and RouteRoadmap in route.js by:jtubau
|
||||||
|
- refactor: refs #8619 simplify empty data check in RouteDescriptor component by:jtubau
|
||||||
|
- refactor: refs #8626 add cardVisible property to RouteList columns by:jtubau
|
||||||
|
- refactor: refs #8626 add formatting for agency and vehicle columns in RouteList by:jtubau
|
||||||
|
- refactor: refs #8626 enhance Worker and Agency components with data attributes and improved routing by:jtubau
|
||||||
|
- refactor: refs #8626 improve test messages and selectors in route tests by:jtubau
|
||||||
|
- refactor: refs #8626 update button styles and improve route redirection logic by:jtubau
|
||||||
|
- refactor: refs #8626 update RouteList columns and enable AgencyWorkCenter tests by:jtubau
|
||||||
|
- refactor: refs #8630 add vehicle translations and enhance route list columns by:jtubau
|
||||||
|
- refactor: refs #8648 update roadmap deletion test to use current element text by:jtubau
|
||||||
|
- refactor: refs #8664 enhance CmrList component with query initialization and user parameters by:jtubau
|
||||||
|
- refactor: refs #8664 localization files by:jtubau
|
||||||
|
- refactor: refs #8664 remove CmrFilter and replace with VnSearchbar in CmrList by:jtubau
|
||||||
|
- refactor: remove unnecessary login and reload calls in ClaimDevelopment tests by:alexm
|
||||||
|
- refactor: simplify client selection in order creation test by:alexm
|
||||||
|
- refactor: update client ID input selector and remove viewport setting by:alexm
|
||||||
|
- test: refs #8197 comment out ticket list tests for refactoring by:alexm
|
||||||
|
- test: refs #8626 refactor notification check in routeList.spec.js by:jtubau
|
||||||
|
- test: refs #8626 refactor routeList.spec.js to use a constant for summary URL by:jtubau
|
||||||
|
- test: refs #8626 refactor routeList.spec.js to use selectors and improve readability by:jtubau
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- fix: add --init flag to Docker container for Cypress tests by:alexm
|
||||||
|
- fix: agency list filters by:jtubau
|
||||||
|
- fix: align Article label to the left in EntryBuys component by:alexm
|
||||||
|
- fix: card descriptor imports by:Jon
|
||||||
|
- fix: card descriptor merge by:Jon
|
||||||
|
- fix(ClaimAction): update shelving options to use URL instead of static data by:jgallego
|
||||||
|
- fix(ClaimSummary): clean url by:alexm
|
||||||
|
- fix(cypress.config.js): refs #6695 update reporter to junit and remove unused dependencies by:alexm
|
||||||
|
- fix(cypressParallel.sh): refs #6695 improve script readability by:alexm
|
||||||
|
- fix(cypressParallel.sh): refs #6695 improve test execution output for clarity by:alexm
|
||||||
|
- fix(cypressParallel.sh): refs #6695 simplify test execution output format by:alexm
|
||||||
|
- fix(cypress scripts): refs #6695 improve cleanup process and adjust output redirection by:alexm
|
||||||
|
- fix: fixed department descriptor icon by:Jon
|
||||||
|
- fix: fixed submodule descriptors icons by:Jon
|
||||||
|
- fix(invoiceOutSummary.spec.js): refs #6695 remove unnecessary visibility check for descriptor by:alexm
|
||||||
|
- fix(Jenkinsfile): reduce parallel Cypress test execution from 3 to 2 by:alexm
|
||||||
|
- fix(Jenkinsfile): refs #6695 add credentials for Docker login in E2E stage by:alexm
|
||||||
|
- fix(Jenkinsfile): refs #6695 change parallel test execution from 4 to 2 by:alexm
|
||||||
|
- fix(Jenkinsfile): refs #6695 increase parallel test execution from 2 to 4 by:alexm
|
||||||
|
- fix(Jenkinsfile): refs #6695 update parallel test execution to 4 by:alexm
|
||||||
|
- fix(LeftMenu): refs #8197 handle missing children in findRoute and update menu structure by:alexm
|
||||||
|
- fix: refs #6695 update Cypress configuration and test result paths by:alexm
|
||||||
|
- fix: refs #6695 update Jenkinsfile to build Docker image correctly and modify logout test visit method by:alexm
|
||||||
|
- fix: refs #6695 update Jenkinsfile to remove specific e2e XML files and adjust Cypress parallel execution by:alexm
|
||||||
|
- fix: refs #6695 update Jenkinsfile to source cypressParallel.sh correctly by:alexm
|
||||||
|
- fix: refs #6695 update visit method in TicketLackDetail.spec.js to prevent page reload by:alexm
|
||||||
|
- fix: refs #6802 update import path for DepartmentDescriptorProxy in OrderList.vue by:jgallego
|
||||||
|
- fix: refs #6802 update OrderFilter to use department relation instead of salesPerson by:jgallego
|
||||||
|
- fix: refs #8041 update redirection from preview to summary in ShelvingList tests by:benjaminedc
|
||||||
|
- fix: refs #8041 update selector for summary header in ParkingList tests by:benjaminedc
|
||||||
|
- fix: refs #8041 update summaryHeader selector in ParkingList test by:benjaminedc
|
||||||
|
- fix: refs #8322 update order property for WagonList component by:alexm
|
||||||
|
- fix: refs #8370 change param rely on month by:Jon
|
||||||
|
- fix: refs #8417 added data-cy to all files and fixed test by:provira
|
||||||
|
- fix: refs #8417 added data-cy to delete button by:provira
|
||||||
|
- fix: refs #8417 fixed claimPhoto e2e by:provira
|
||||||
|
- fix: refs #8417 fixed claimPhoto e2e test by:provira
|
||||||
|
- fix: refs #8417 fixed e2e test by:provira
|
||||||
|
- fix: refs #8417 fixed e2e test case by:provira
|
||||||
|
- fix: refs #8417 fixed failing test case by:provira
|
||||||
|
- fix: refs #8417 fixed invoiceOutSummary e2e test by:provira
|
||||||
|
- fix: refs #8417 removed .only by:provira
|
||||||
|
- fix: refs #8583 basicData, business, summary by:carlossa
|
||||||
|
- fix: refs #8583 basicData e2e by:carlossa
|
||||||
|
- fix: refs #8583 basicData timeControl by:carlossa
|
||||||
|
- fix: refs #8583 cypressconf by:carlossa
|
||||||
|
- fix: refs #8583 dataCy operator by:carlossa
|
||||||
|
- fix: refs #8583 fix AddCard by:carlossa
|
||||||
|
- fix: refs #8583 mutual create by:carlossa
|
||||||
|
- fix: refs #8583 operator by:carlossa
|
||||||
|
- fix: refs #8583 remove workerTimeControl by:carlossa
|
||||||
|
- fix: refs #8583 tMutual, tNotes, TOperator by:carlossa
|
||||||
|
- fix: refs #8583 wBusiness by:carlossa
|
||||||
|
- fix: refs #8583 wBusiness e2e by:carlossa
|
||||||
|
- fix: refs #8583 workerBasicData & workerTimeControl by:carlossa
|
||||||
|
- fix: refs #8583 workerBusiness by:carlossa
|
||||||
|
- fix: refs #8583 workerBusiness e2e by:carlossa
|
||||||
|
- fix: refs #8583 workerBusiness test by:carlossa
|
||||||
|
- fix: refs #8583 workerE2E by:carlossa
|
||||||
|
- fix: refs #8583 worker mutual e2e by:carlossa
|
||||||
|
- fix: refs #8583 workerSummary test by:carlossa
|
||||||
|
- fix: refs #8583 workerTimeControl by:carlossa
|
||||||
|
- fix: refs #8583 workerTimeControl e2e by:carlossa
|
||||||
|
- fix: refs #8600 e2e by:Jon
|
||||||
|
- fix: refs #8600 fixed calendar e2e by:Jon
|
||||||
|
- fix: refs #8600 fixed e2e and skip client ones by:Jon
|
||||||
|
- fix: refs #8600 fixed e2e by:Jon
|
||||||
|
- fix: refs #8600 fixed invoiceOut summary e2e by:Jon
|
||||||
|
- fix: refs #8600 fixed zoneList & added test case to zoneSummary by:provira
|
||||||
|
- fix: refs #8600 zone basic data e2e and skip intermitent invoice out summary it by:Jon
|
||||||
|
- fix: refs #8602 delete unused entryDms and stockBought test files (origin/8581-e2eInvoiceIn) by:pablone
|
||||||
|
- fix: refs #8606 deleted code by:Jon
|
||||||
|
- fix: refs #8612 changed QCheckbox for VnCheckbox by:provira
|
||||||
|
- fix: refs #8612 fixed shelving e2e tests by:provira
|
||||||
|
- fix: refs #8616 add conditional for SupplierDescriptorProxy and bind attributes in CardDescriptor by:jtubau
|
||||||
|
- fix: refs #8616 remove redundant v-on binding from QCheckbox in VnCheckbox.vue by:jtubau
|
||||||
|
- fix: refs #8616 update binding syntax for is-editable prop in AgencyList.vue by:jtubau
|
||||||
|
- fix: refs #8616 update FormModel prop from 'update-url' to 'url-update' in Agency and RoadMap BasicData by:jtubau
|
||||||
|
- fix: refs #8619 handle empty ticket records in RouteDescriptor component by:jtubau
|
||||||
|
- fix: refs #8619 update route descriptor to handle empty ticket records and adjust test cases by:jtubau
|
||||||
|
- fix: refs #8626 remove duplicate ref attribute from RouteList.vue by:jtubau
|
||||||
|
- fix: refs #8630 remove duplicated locations by:jtubau
|
||||||
|
- fix: refs #8638 restore invoiceInBasicData by:pablone
|
||||||
|
- fix: refs #8638 update comment formatting in VnTable.vue by:pablone
|
||||||
|
- fix: refs #8638 update null check for maxlength validation in VnInput.vue by:pablone
|
||||||
|
- fix: simplify menu structure in monitor router module (origin/fix_monitor_leftMenu) by:Javier Segarra
|
||||||
|
- refactor: refs #6695 fix invoiceOutSummary by:alexm
|
||||||
|
- refactor: refs #8606 deleted code and fixed translation by:Jon
|
||||||
|
- test: fix intermitent e2e by:alexm
|
||||||
|
- test: fix orderList e2e, unestables by:alexm
|
||||||
|
- test(OrderList): fix inconsistency by:alexm
|
||||||
|
- test(TicketList): fix inconsistency by:alexm
|
||||||
|
|
||||||
# Version 25.10 - 2025-03-11
|
# Version 25.10 - 2025-03-11
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -897,7 +897,7 @@ const rowCtrlClickFunction = computed(() => {
|
||||||
{{ row[splittedColumns.title.name] }}
|
{{ row[splittedColumns.title.name] }}
|
||||||
</span>
|
</span>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<!-- Fields -->
|
<!-- Fields -->
|
||||||
<QCardSection
|
<QCardSection
|
||||||
class="q-pl-sm q-py-xs"
|
class="q-pl-sm q-py-xs"
|
||||||
:class="$props.cardClass"
|
:class="$props.cardClass"
|
||||||
|
@ -1156,7 +1156,7 @@ es:
|
||||||
|
|
||||||
.grid-create {
|
.grid-create {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
grid-gap: 20px;
|
grid-gap: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
|
@ -0,0 +1,166 @@
|
||||||
|
<script setup>
|
||||||
|
import VnConfirm from '../ui/VnConfirm.vue';
|
||||||
|
import VnInput from './VnInput.vue';
|
||||||
|
import VnDms from './VnDms.vue';
|
||||||
|
import axios from 'axios';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { downloadFile } from 'src/composables/downloadFile';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
const documentDialogRef = ref({});
|
||||||
|
const editDownloadDisabled = ref(false);
|
||||||
|
const $props = defineProps({
|
||||||
|
defaultDmsCode: {
|
||||||
|
type: String,
|
||||||
|
default: 'InvoiceIn',
|
||||||
|
},
|
||||||
|
disable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
formRef: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
function deleteFile(dmsFk) {
|
||||||
|
quasar
|
||||||
|
.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: t('globals.confirmDeletion'),
|
||||||
|
message: t('globals.confirmDeletionMessage'),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.onOk(async () => {
|
||||||
|
await axios.post(`dms/${dmsFk}/removeFile`);
|
||||||
|
$props.formRef.formData.dmsFk = null;
|
||||||
|
$props.formRef.formData.dms = undefined;
|
||||||
|
$props.formRef.hasChanges = true;
|
||||||
|
$props.formRef.save();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="row no-wrap">
|
||||||
|
<VnInput
|
||||||
|
:label="t('Document')"
|
||||||
|
v-model="data.dmsFk"
|
||||||
|
clearable
|
||||||
|
clear-icon="close"
|
||||||
|
class="full-width"
|
||||||
|
:disable="disable"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
v-if="data.dmsFk"
|
||||||
|
class="row no-wrap q-pa-xs q-gutter-x-xs"
|
||||||
|
data-cy="dms-buttons"
|
||||||
|
>
|
||||||
|
<QBtn
|
||||||
|
:disable="editDownloadDisabled"
|
||||||
|
@click="downloadFile(data.dmsFk)"
|
||||||
|
icon="cloud_download"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
:class="{
|
||||||
|
'no-pointer-events': editDownloadDisabled,
|
||||||
|
}"
|
||||||
|
padding="xs"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Download file') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:disable="editDownloadDisabled"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
documentDialogRef.show = true;
|
||||||
|
documentDialogRef.dms = data.dms;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
icon="edit"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
:class="{
|
||||||
|
'no-pointer-events': editDownloadDisabled,
|
||||||
|
}"
|
||||||
|
padding="xs"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Edit document') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:disable="editDownloadDisabled"
|
||||||
|
@click="deleteFile(data.dmsFk)"
|
||||||
|
icon="delete"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
:class="{
|
||||||
|
'no-pointer-events': editDownloadDisabled,
|
||||||
|
}"
|
||||||
|
padding="xs"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Delete file') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</div>
|
||||||
|
<QBtn
|
||||||
|
v-else
|
||||||
|
icon="add_circle"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
v-shortcut="'+'"
|
||||||
|
padding="xs"
|
||||||
|
@click="
|
||||||
|
() => {
|
||||||
|
documentDialogRef.show = true;
|
||||||
|
delete documentDialogRef.dms;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
data-cy="dms-create"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Create document') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</div>
|
||||||
|
<QDialog v-model="documentDialogRef.show">
|
||||||
|
<VnDms
|
||||||
|
model="dms"
|
||||||
|
:default-dms-code="defaultDmsCode"
|
||||||
|
:form-initial-data="documentDialogRef.dms"
|
||||||
|
:url="
|
||||||
|
documentDialogRef.dms
|
||||||
|
? `Dms/${documentDialogRef.dms.id}/updateFile`
|
||||||
|
: 'Dms/uploadFile'
|
||||||
|
"
|
||||||
|
:description="documentDialogRef.supplierName"
|
||||||
|
@on-data-saved="
|
||||||
|
(_, { data }) => {
|
||||||
|
let dmsData = data;
|
||||||
|
if (Array.isArray(data)) dmsData = data[0];
|
||||||
|
formRef.formData.dmsFk = dmsData.id;
|
||||||
|
formRef.formData.dms = dmsData;
|
||||||
|
formRef.hasChanges = true;
|
||||||
|
formRef.save();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</QDialog>
|
||||||
|
</template>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Document: Documento
|
||||||
|
Download file: Descargar archivo
|
||||||
|
Edit document: Editar documento
|
||||||
|
Delete file: Eliminar archivo
|
||||||
|
Create document: Crear documento
|
||||||
|
|
||||||
|
</i18n>
|
|
@ -84,7 +84,7 @@ const mixinRules = [
|
||||||
...($attrs.rules ?? []),
|
...($attrs.rules ?? []),
|
||||||
(val) => {
|
(val) => {
|
||||||
const maxlength = $props.maxlength;
|
const maxlength = $props.maxlength;
|
||||||
if (maxlength && +val.length > maxlength)
|
if (maxlength && +val?.length > maxlength)
|
||||||
return t(`maxLength`, { value: maxlength });
|
return t(`maxLength`, { value: maxlength });
|
||||||
const { min, max } = vnInputRef.value.$attrs;
|
const { min, max } = vnInputRef.value.$attrs;
|
||||||
if (!min) return null;
|
if (!min) return null;
|
||||||
|
|
|
@ -40,6 +40,11 @@ const quasar = useQuasar();
|
||||||
const newNote = reactive({ text: null, observationTypeFk: null });
|
const newNote = reactive({ text: null, observationTypeFk: null });
|
||||||
const observationTypes = ref([]);
|
const observationTypes = ref([]);
|
||||||
const vnPaginateRef = ref();
|
const vnPaginateRef = ref();
|
||||||
|
|
||||||
|
const defaultObservationType = computed(() =>
|
||||||
|
observationTypes.value.find(ot => ot.code === 'salesPerson')?.id
|
||||||
|
);
|
||||||
|
|
||||||
let originalText;
|
let originalText;
|
||||||
|
|
||||||
function handleClick(e) {
|
function handleClick(e) {
|
||||||
|
@ -111,14 +116,22 @@ function fetchData([data]) {
|
||||||
originalText = data?.notes;
|
originalText = data?.notes;
|
||||||
emit('onFetch', data);
|
emit('onFetch', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleObservationTypes = (data) => {
|
||||||
|
observationTypes.value = data;
|
||||||
|
if(defaultObservationType.value) {
|
||||||
|
newNote.observationTypeFk = defaultObservationType.value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
v-if="selectType"
|
v-if="selectType"
|
||||||
url="ObservationTypes"
|
url="ObservationTypes"
|
||||||
:filter="{ fields: ['id', 'description'] }"
|
:filter="{ fields: ['id', 'description', 'code'] }"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (observationTypes = data)"
|
@on-fetch="handleObservationTypes"
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
v-if="justInput"
|
v-if="justInput"
|
||||||
|
@ -154,6 +167,7 @@ function fetchData([data]) {
|
||||||
filled
|
filled
|
||||||
size="lg"
|
size="lg"
|
||||||
autogrow
|
autogrow
|
||||||
|
autofocus
|
||||||
@keyup.enter.stop="handleClick"
|
@keyup.enter.stop="handleClick"
|
||||||
:required="isRequired"
|
:required="isRequired"
|
||||||
clearable
|
clearable
|
||||||
|
@ -189,7 +203,6 @@ function fetchData([data]) {
|
||||||
:search-url="false"
|
:search-url="false"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
newNote.text = '';
|
newNote.text = '';
|
||||||
newNote.observationTypeFk = null;
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
|
|
@ -26,6 +26,7 @@ const id = props.entityId;
|
||||||
:to="{ name: routeName, params: { id: id } }"
|
:to="{ name: routeName, params: { id: id } }"
|
||||||
class="header link"
|
class="header link"
|
||||||
:href="url"
|
:href="url"
|
||||||
|
data-cy="goToSummaryBtn"
|
||||||
>
|
>
|
||||||
<QIcon name="open_in_new" color="white" size="sm" />
|
<QIcon name="open_in_new" color="white" size="sm" />
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
|
@ -5,18 +5,19 @@ import { exportFile } from 'quasar';
|
||||||
|
|
||||||
const { getTokenMultimedia } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = getTokenMultimedia();
|
const token = getTokenMultimedia();
|
||||||
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
|
|
||||||
|
|
||||||
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
||||||
|
const appUrl = await getAppUrl();
|
||||||
const response = await axios.get(
|
const response = await axios.get(
|
||||||
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
|
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
|
||||||
{ responseType: 'blob' }
|
{ responseType: 'blob' },
|
||||||
);
|
);
|
||||||
|
|
||||||
download(response);
|
download(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadDocuware(url, params) {
|
export async function downloadDocuware(url, params) {
|
||||||
|
const appUrl = await getAppUrl();
|
||||||
const response = await axios.get(`${appUrl}/api/` + url, {
|
const response = await axios.get(`${appUrl}/api/` + url, {
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
params,
|
params,
|
||||||
|
@ -32,3 +33,7 @@ function download(response) {
|
||||||
|
|
||||||
exportFile(filename, response.data);
|
exportFile(filename, response.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getAppUrl() {
|
||||||
|
return (await getUrl('', 'lilium')).replace('/#/', '');
|
||||||
|
}
|
||||||
|
|
|
@ -325,7 +325,6 @@ input::-webkit-inner-spin-button {
|
||||||
min-height: auto !important;
|
min-height: auto !important;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
padding-bottom: 2px;
|
|
||||||
.q-field__native.row {
|
.q-field__native.row {
|
||||||
min-height: auto !important;
|
min-height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -817,6 +817,7 @@ travel:
|
||||||
search: Search travel
|
search: Search travel
|
||||||
searchInfo: You can search by travel id or name
|
searchInfo: You can search by travel id or name
|
||||||
id: Id
|
id: Id
|
||||||
|
awbFk: AWB
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
ref: Reference
|
ref: Reference
|
||||||
|
|
|
@ -900,6 +900,7 @@ travel:
|
||||||
search: Buscar envío
|
search: Buscar envío
|
||||||
searchInfo: Buscar envío por id o nombre
|
searchInfo: Buscar envío por id o nombre
|
||||||
id: Id
|
id: Id
|
||||||
|
awbFk: Guía aérea
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
ref: Referencia
|
ref: Referencia
|
||||||
|
|
|
@ -18,7 +18,7 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
data-key="Account"
|
data-key="Account"
|
||||||
ref="AccountSummary"
|
ref="AccountSummary"
|
||||||
url="VnUsers/preview"
|
url="VnUsers/preview"
|
||||||
:filter="filter"
|
:filter="{ ...filter, where: { id: entityId } }"
|
||||||
>
|
>
|
||||||
<template #header="{ entity }">{{ entity.id }} - {{ entity.nickname }}</template>
|
<template #header="{ entity }">{{ entity.id }} - {{ entity.nickname }}</template>
|
||||||
<template #menu>
|
<template #menu>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { getDifferences, getUpdatedValues } from 'src/filters';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
@ -9,12 +10,18 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const workersOptions = ref([]);
|
const workersOptions = ref([]);
|
||||||
|
|
||||||
|
function onBeforeSave(formData, originalData) {
|
||||||
|
return getUpdatedValues(
|
||||||
|
Object.keys(getDifferences(formData, originalData)),
|
||||||
|
formData,
|
||||||
|
);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -27,6 +34,7 @@ const workersOptions = ref([]);
|
||||||
<FormModel
|
<FormModel
|
||||||
model="Claim"
|
model="Claim"
|
||||||
:url-update="`Claims/updateClaim/${route.params.id}`"
|
:url-update="`Claims/updateClaim/${route.params.id}`"
|
||||||
|
:mapper="onBeforeSave"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
|
|
|
@ -14,6 +14,8 @@ import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import VnSelectTravelExtended from 'src/components/common/VnSelectTravelExtended.vue';
|
import VnSelectTravelExtended from 'src/components/common/VnSelectTravelExtended.vue';
|
||||||
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
|
import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue';
|
||||||
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
import VnDmsInput from 'src/components/common/VnDmsInput.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -24,6 +26,7 @@ const user = state.getUser().fn();
|
||||||
|
|
||||||
const companiesOptions = ref([]);
|
const companiesOptions = ref([]);
|
||||||
const currenciesOptions = ref([]);
|
const currenciesOptions = ref([]);
|
||||||
|
const entryRef = ref({});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
checkEntryLock(route.params.id, user.id);
|
checkEntryLock(route.params.id, user.id);
|
||||||
|
@ -48,10 +51,11 @@ onMounted(() => {
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FormModel
|
<FormModel
|
||||||
:url-update="`Entries/${route.params.id}`"
|
ref="entryRef"
|
||||||
model="Entry"
|
model="Entry"
|
||||||
auto-load
|
:url-update="`Entries/${route.params.id}`"
|
||||||
:clear-store-on-unmount="false"
|
:clear-store-on-unmount="false"
|
||||||
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow class="q-py-sm">
|
<VnRow class="q-py-sm">
|
||||||
|
@ -67,11 +71,18 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="q-py-sm">
|
<VnRow class="q-py-sm">
|
||||||
<VnInput v-model="data.reference" :label="t('globals.reference')" />
|
<VnInput
|
||||||
<VnInputNumber
|
v-model="data.reference"
|
||||||
v-model="data.invoiceAmount"
|
:label="t('entry.list.tableVisibleColumns.reference')"
|
||||||
:label="t('entry.summary.invoiceAmount')"
|
/>
|
||||||
:positive="false"
|
<VnSelect
|
||||||
|
v-model="data.typeFk"
|
||||||
|
url="entryTypes"
|
||||||
|
:fields="['code', 'description']"
|
||||||
|
option-value="code"
|
||||||
|
optionLabel="description"
|
||||||
|
sortBy="description"
|
||||||
|
:label="t('entry.list.tableVisibleColumns.entryTypeDescription')"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="q-py-sm">
|
<VnRow class="q-py-sm">
|
||||||
|
@ -113,7 +124,6 @@ onMounted(() => {
|
||||||
name="initialTemperature"
|
name="initialTemperature"
|
||||||
:label="t('entry.basicData.initialTemperature')"
|
:label="t('entry.basicData.initialTemperature')"
|
||||||
:step="0.5"
|
:step="0.5"
|
||||||
:decimal-places="2"
|
|
||||||
:positive="false"
|
:positive="false"
|
||||||
/>
|
/>
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
|
@ -121,20 +131,21 @@ onMounted(() => {
|
||||||
name="finalTemperature"
|
name="finalTemperature"
|
||||||
:label="t('entry.basicData.finalTemperature')"
|
:label="t('entry.basicData.finalTemperature')"
|
||||||
:step="0.5"
|
:step="0.5"
|
||||||
:decimal-places="2"
|
|
||||||
:positive="false"
|
:positive="false"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
|
||||||
v-model="data.typeFk"
|
|
||||||
url="entryTypes"
|
|
||||||
:fields="['code', 'description']"
|
|
||||||
option-value="code"
|
|
||||||
optionLabel="description"
|
|
||||||
sortBy="description"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="q-py-sm">
|
<VnRow class="q-py-sm">
|
||||||
<QInput
|
<VnInputNumber
|
||||||
|
v-model="data.invoiceAmount"
|
||||||
|
:label="t('entry.list.tableVisibleColumns.invoiceAmount')"
|
||||||
|
:positive="false"
|
||||||
|
@update:model-value="data.buyerFk = user.id"
|
||||||
|
/>
|
||||||
|
<VnSelectWorker v-model="data.buyerFk" hide-selected />
|
||||||
|
<VnDmsInput :data="data" :formRef="entryRef" :disable="false" />
|
||||||
|
</VnRow>
|
||||||
|
<VnRow class="q-py-sm">
|
||||||
|
<VnInputNumber
|
||||||
:label="t('entry.basicData.observation')"
|
:label="t('entry.basicData.observation')"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
v-model="data.observation"
|
v-model="data.observation"
|
||||||
|
|
|
@ -18,6 +18,7 @@ import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import { checkEntryLock } from 'src/composables/checkEntryLock';
|
import { checkEntryLock } from 'src/composables/checkEntryLock';
|
||||||
import VnRow from 'src/components/ui/VnRow.vue';
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -44,6 +45,8 @@ const entityId = ref($props.id ?? route.params.id);
|
||||||
const entryBuysRef = ref();
|
const entryBuysRef = ref();
|
||||||
const footerFetchDataRef = ref();
|
const footerFetchDataRef = ref();
|
||||||
const footer = ref({});
|
const footer = ref({});
|
||||||
|
const dialogRef = ref(false);
|
||||||
|
const newEntryRef = ref(null);
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -250,6 +253,7 @@ const columns = [
|
||||||
component: 'number',
|
component: 'number',
|
||||||
attrs: {
|
attrs: {
|
||||||
positive: false,
|
positive: false,
|
||||||
|
decimalPlaces: 3,
|
||||||
},
|
},
|
||||||
cellEvent: {
|
cellEvent: {
|
||||||
'update:modelValue': async (value, oldValue, row) => {
|
'update:modelValue': async (value, oldValue, row) => {
|
||||||
|
@ -497,6 +501,23 @@ async function setBuyUltimate(itemFk, data) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function transferBuys(rows, newEntry) {
|
||||||
|
if (!newEntry) return;
|
||||||
|
|
||||||
|
const promises = rows.map((row) => {
|
||||||
|
return axios.patch('Buys', { id: row.id, entryFk: newEntry });
|
||||||
|
});
|
||||||
|
|
||||||
|
await Promise.all(promises);
|
||||||
|
|
||||||
|
await axios.post(`Entries/${newEntry}/recalcEntryPrices`);
|
||||||
|
await axios.post(`Entries/${entityId.value}/recalcEntryPrices`);
|
||||||
|
|
||||||
|
entryBuysRef.value.reload();
|
||||||
|
newEntryRef.value = null;
|
||||||
|
dialogRef.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
stateStore.rightDrawer = false;
|
stateStore.rightDrawer = false;
|
||||||
if ($props.editableMode) checkEntryLock(entityId.value, user.id);
|
if ($props.editableMode) checkEntryLock(entityId.value, user.id);
|
||||||
|
@ -571,6 +592,47 @@ onMounted(() => {
|
||||||
</QItem>
|
</QItem>
|
||||||
</QList>
|
</QList>
|
||||||
</QBtnDropdown>
|
</QBtnDropdown>
|
||||||
|
<QBtn
|
||||||
|
icon="move_group"
|
||||||
|
color="primary"
|
||||||
|
:title="t('Transfer buys')"
|
||||||
|
data-cy="transferBuys"
|
||||||
|
flat
|
||||||
|
@click="dialogRef = true"
|
||||||
|
:disable="!selectedRows.length"
|
||||||
|
/>
|
||||||
|
<QDialog v-model="dialogRef">
|
||||||
|
<QCard>
|
||||||
|
<QCardSection>
|
||||||
|
<span>{{ t('Transfer buys') }}</span>
|
||||||
|
</QCardSection>
|
||||||
|
<QCardSection>
|
||||||
|
<VnInputNumber
|
||||||
|
v-model="newEntryRef"
|
||||||
|
:label="t('Entry')"
|
||||||
|
type="number"
|
||||||
|
data-cy="entryDestinyInput"
|
||||||
|
/>
|
||||||
|
</QCardSection>
|
||||||
|
<QCardSection>
|
||||||
|
<QCardActions>
|
||||||
|
<QBtn
|
||||||
|
label="Cancel"
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
@click="dialogRef = false"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
label="Transfer"
|
||||||
|
data-cy="transferBuysBtn"
|
||||||
|
flat
|
||||||
|
color="primary"
|
||||||
|
@click="transferBuys(selectedRows, newEntryRef)"
|
||||||
|
/>
|
||||||
|
</QCardActions>
|
||||||
|
</QCardSection>
|
||||||
|
</QCard>
|
||||||
|
</QDialog>
|
||||||
</QBtnGroup>
|
</QBtnGroup>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -620,7 +682,7 @@ onMounted(() => {
|
||||||
},
|
},
|
||||||
columnGridStyle: {
|
columnGridStyle: {
|
||||||
'max-width': '50%',
|
'max-width': '50%',
|
||||||
'margin-right': '30px',
|
'margin-right': '5%',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
previousStyle: {
|
previousStyle: {
|
||||||
|
@ -652,6 +714,7 @@ onMounted(() => {
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
option-label="nickname"
|
option-label="nickname"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
|
:use-like="false"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Family')"
|
:label="t('Family')"
|
||||||
|
@ -816,6 +879,8 @@ es:
|
||||||
Create buy: Crear compra
|
Create buy: Crear compra
|
||||||
Invert quantity value: Invertir valor de cantidad
|
Invert quantity value: Invertir valor de cantidad
|
||||||
Check buy amount: Marcar como correcta la cantidad de compra
|
Check buy amount: Marcar como correcta la cantidad de compra
|
||||||
|
Transfer buys: Transferir compras
|
||||||
|
Entry: Entrada
|
||||||
</i18n>
|
</i18n>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.centered-container {
|
.centered-container {
|
||||||
|
|
|
@ -92,7 +92,7 @@ const getEntryRedirectionFilter = (entry) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
function showEntryReport() {
|
function showEntryReport() {
|
||||||
openReport(`Entries/${entityId.value}/entry-order-pdf`);
|
openReport(`Entries/${entityId.value}/entry-order-pdf`, {}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showNotification(type, message) {
|
function showNotification(type, message) {
|
||||||
|
@ -147,7 +147,7 @@ async function deleteEntry() {
|
||||||
<template>
|
<template>
|
||||||
<EntityDescriptor
|
<EntityDescriptor
|
||||||
:url="`Entries/${entityId}`"
|
:url="`Entries/${entityId}`"
|
||||||
:filter="entryFilter"
|
:user-filter="entryFilter"
|
||||||
title="supplier.nickname"
|
title="supplier.nickname"
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
width="lg-width"
|
width="lg-width"
|
||||||
|
|
|
@ -84,7 +84,10 @@ onMounted(async () => {
|
||||||
:label="t('globals.company')"
|
:label="t('globals.company')"
|
||||||
:value="entry?.company?.code"
|
:value="entry?.company?.code"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('globals.reference')" :value="entry?.reference" />
|
<VnLv
|
||||||
|
:label="t('entry.list.tableVisibleColumns.reference')"
|
||||||
|
:value="entry?.reference"
|
||||||
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('entry.summary.invoiceNumber')"
|
:label="t('entry.summary.invoiceNumber')"
|
||||||
:value="entry?.invoiceNumber"
|
:value="entry?.invoiceNumber"
|
||||||
|
@ -159,6 +162,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
|
<VnLv :label="t('travel.awbFk')" :value="entry.travel.awbFk" />
|
||||||
<VnCheckbox
|
<VnCheckbox
|
||||||
:label="t('entry.summary.travelDelivered')"
|
:label="t('entry.summary.travelDelivered')"
|
||||||
v-model="entry.travel.isDelivered"
|
v-model="entry.travel.isDelivered"
|
||||||
|
|
|
@ -162,8 +162,8 @@ async function beforeSave(data, getChanges) {
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(patchPromises);
|
await Promise.all(patchPromises);
|
||||||
const filteredChanges = changes.filter((change) => change?.isReal !== false);
|
data.creates = [];
|
||||||
data.creates = filteredChanges;
|
return data;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -203,7 +203,7 @@ async function beforeSave(data, getChanges) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
<QDialog v-model="travelDialogRef" :class="['vn-row', 'wrap']">
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:url-update="`Travels/${travel?.id}`"
|
:url-update="`Travels/${travel?.id}`"
|
||||||
model="travel"
|
model="travel"
|
||||||
|
@ -252,12 +252,15 @@ async function beforeSave(data, getChanges) {
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-footer-reserve>
|
<template #column-footer-reserve>
|
||||||
<span>
|
<span class="q-pr-xs">
|
||||||
{{ round(footer.reserve) }}
|
{{ round(footer.reserve) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-footer-bought>
|
<template #column-footer-bought>
|
||||||
<span :style="boughtStyle(footer?.bought, footer?.reserve)">
|
<span
|
||||||
|
:style="boughtStyle(footer?.bought, footer?.reserve)"
|
||||||
|
class="q-pr-xs"
|
||||||
|
>
|
||||||
{{ round(footer.bought) }}
|
{{ round(footer.bought) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -275,7 +278,7 @@ async function beforeSave(data, getChanges) {
|
||||||
}
|
}
|
||||||
.column {
|
.column {
|
||||||
min-width: 35%;
|
min-width: 35%;
|
||||||
margin-top: 5%;
|
margin-top: 1%;
|
||||||
}
|
}
|
||||||
.text-negative {
|
.text-negative {
|
||||||
color: $negative !important;
|
color: $negative !important;
|
||||||
|
|
|
@ -25,7 +25,7 @@ entry:
|
||||||
entryTypeDescription: Tipo entrada
|
entryTypeDescription: Tipo entrada
|
||||||
invoiceAmount: Importe
|
invoiceAmount: Importe
|
||||||
dated: Fecha
|
dated: Fecha
|
||||||
inventoryEntry: Es inventario
|
inventoryEntry: Es inventario
|
||||||
summary:
|
summary:
|
||||||
commission: Comisión
|
commission: Comisión
|
||||||
currency: Moneda
|
currency: Moneda
|
||||||
|
@ -33,7 +33,8 @@ entry:
|
||||||
invoiceAmount: Importe
|
invoiceAmount: Importe
|
||||||
ordered: Pedida
|
ordered: Pedida
|
||||||
booked: Contabilizada
|
booked: Contabilizada
|
||||||
excludedFromAvailable: Excluido
|
excludedFromAvailable: Excluir del disponible
|
||||||
|
isConfirmed: Lista para etiquetar
|
||||||
travelReference: Referencia
|
travelReference: Referencia
|
||||||
travelAgency: Agencia
|
travelAgency: Agencia
|
||||||
travelShipped: F. envio
|
travelShipped: F. envio
|
||||||
|
@ -56,7 +57,7 @@ entry:
|
||||||
observation: Observación
|
observation: Observación
|
||||||
commission: Comisión
|
commission: Comisión
|
||||||
booked: Contabilizada
|
booked: Contabilizada
|
||||||
excludedFromAvailable: Excluido
|
excludedFromAvailable: Excluir del disponible
|
||||||
initialTemperature: Ini °C
|
initialTemperature: Ini °C
|
||||||
finalTemperature: Fin °C
|
finalTemperature: Fin °C
|
||||||
buys:
|
buys:
|
||||||
|
@ -119,9 +120,9 @@ entry:
|
||||||
supplierName: Proveedor
|
supplierName: Proveedor
|
||||||
entryFilter:
|
entryFilter:
|
||||||
params:
|
params:
|
||||||
isExcludedFromAvailable: Excluido
|
isExcludedFromAvailable: Excluir del disponible
|
||||||
isOrdered: Pedida
|
isOrdered: Pedida
|
||||||
isConfirmed: Confirmado
|
isConfirmed: Lista para etiquetar
|
||||||
isReceived: Recibida
|
isReceived: Recibida
|
||||||
isRaid: Raid
|
isRaid: Raid
|
||||||
landed: Fecha
|
landed: Fecha
|
||||||
|
|
|
@ -158,20 +158,12 @@ function deleteFile(dmsFk) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Undeductible VAT')"
|
:label="t('invoiceIn.summary.sage')"
|
||||||
v-model="data.deductibleExpenseFk"
|
v-model="data.withholdingSageFk"
|
||||||
:options="expenses"
|
:options="sageWithholdings"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="id"
|
option-label="withholding"
|
||||||
:filter-options="['id', 'name']"
|
/>
|
||||||
data-cy="invoiceInBasicDataDeductibleExpenseFk"
|
|
||||||
>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
{{ `${scope.opt.id}: ${scope.opt.name}` }}
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
|
|
||||||
<div class="row no-wrap">
|
<div class="row no-wrap">
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -271,16 +263,6 @@ function deleteFile(dmsFk) {
|
||||||
data-cy="invoiceInBasicDataCompanyFk"
|
data-cy="invoiceInBasicDataCompanyFk"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
|
||||||
<VnSelect
|
|
||||||
:label="t('invoiceIn.summary.sage')"
|
|
||||||
v-model="data.withholdingSageFk"
|
|
||||||
:options="sageWithholdings"
|
|
||||||
option-value="id"
|
|
||||||
option-label="withholding"
|
|
||||||
data-cy="invoiceInBasicDataWithholdingSageFk"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
<QDialog v-model="documentDialogRef.show">
|
<QDialog v-model="documentDialogRef.show">
|
||||||
|
@ -332,7 +314,6 @@ function deleteFile(dmsFk) {
|
||||||
supplierFk: Proveedor
|
supplierFk: Proveedor
|
||||||
Expedition date: Fecha expedición
|
Expedition date: Fecha expedición
|
||||||
Operation date: Fecha operación
|
Operation date: Fecha operación
|
||||||
Undeductible VAT: Iva no deducible
|
|
||||||
Document: Documento
|
Document: Documento
|
||||||
Download file: Descargar archivo
|
Download file: Descargar archivo
|
||||||
Entry date: Fecha asiento
|
Entry date: Fecha asiento
|
||||||
|
|
|
@ -40,6 +40,13 @@ const vatColumns = ref([
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'isDeductible',
|
||||||
|
label: 'invoiceIn.isDeductible',
|
||||||
|
field: (row) => row.isDeductible,
|
||||||
|
sortable: true,
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'vat',
|
name: 'vat',
|
||||||
label: 'invoiceIn.summary.sageVat',
|
label: 'invoiceIn.summary.sageVat',
|
||||||
|
@ -274,10 +281,6 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||||
:label="t('invoiceIn.summary.sage')"
|
:label="t('invoiceIn.summary.sage')"
|
||||||
:value="entity.sageWithholding?.withholding"
|
:value="entity.sageWithholding?.withholding"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
|
||||||
:label="t('invoiceIn.summary.vat')"
|
|
||||||
:value="entity.expenseDeductible?.name"
|
|
||||||
/>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.card.company')"
|
:label="t('invoiceIn.card.company')"
|
||||||
:value="entity.company?.code"
|
:value="entity.company?.code"
|
||||||
|
@ -335,6 +338,15 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||||
</QTh>
|
</QTh>
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-isDeductible="{ row }">
|
||||||
|
<QTd align="center">
|
||||||
|
<QCheckbox
|
||||||
|
v-model="row.isDeductible"
|
||||||
|
disable
|
||||||
|
data-cy="isDeductible_checkbox"
|
||||||
|
/>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-vat="{ value: vatCell }">
|
<template #body-cell-vat="{ value: vatCell }">
|
||||||
<QTd :title="vatCell" shrink>
|
<QTd :title="vatCell" shrink>
|
||||||
{{ vatCell }}
|
{{ vatCell }}
|
||||||
|
|
|
@ -53,6 +53,13 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'isDeductible',
|
||||||
|
label: t('invoiceIn.isDeductible'),
|
||||||
|
field: (row) => row.isDeductible,
|
||||||
|
model: 'isDeductible',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'sageiva',
|
name: 'sageiva',
|
||||||
label: t('Sage iva'),
|
label: t('Sage iva'),
|
||||||
|
@ -119,6 +126,7 @@ const filter = {
|
||||||
'foreignValue',
|
'foreignValue',
|
||||||
'taxTypeSageFk',
|
'taxTypeSageFk',
|
||||||
'transactionTypeSageFk',
|
'transactionTypeSageFk',
|
||||||
|
'isDeductible',
|
||||||
],
|
],
|
||||||
where: {
|
where: {
|
||||||
invoiceInFk: route.params.id,
|
invoiceInFk: route.params.id,
|
||||||
|
@ -230,6 +238,14 @@ function setCursor(ref) {
|
||||||
</VnSelectDialog>
|
</VnSelectDialog>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-isDeductible="{ row }">
|
||||||
|
<QTd align="center">
|
||||||
|
<QCheckbox
|
||||||
|
v-model="row.isDeductible"
|
||||||
|
data-cy="isDeductible_checkbox"
|
||||||
|
/>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-taxablebase="{ row }">
|
<template #body-cell-taxablebase="{ row }">
|
||||||
<QTd shrink>
|
<QTd shrink>
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
|
@ -324,6 +340,7 @@ function setCursor(ref) {
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd />
|
<QTd />
|
||||||
<QTd />
|
<QTd />
|
||||||
|
<QTd />
|
||||||
<QTd>
|
<QTd>
|
||||||
{{ toCurrency(taxRateTotal) }}
|
{{ toCurrency(taxRateTotal) }}
|
||||||
</QTd>
|
</QTd>
|
||||||
|
|
|
@ -4,6 +4,7 @@ invoiceIn:
|
||||||
serial: Serial
|
serial: Serial
|
||||||
isBooked: Is booked
|
isBooked: Is booked
|
||||||
supplierRef: Invoice nº
|
supplierRef: Invoice nº
|
||||||
|
isDeductible: Deductible
|
||||||
list:
|
list:
|
||||||
ref: Reference
|
ref: Reference
|
||||||
supplier: Supplier
|
supplier: Supplier
|
||||||
|
|
|
@ -4,6 +4,7 @@ invoiceIn:
|
||||||
serial: Serie
|
serial: Serie
|
||||||
isBooked: Contabilizada
|
isBooked: Contabilizada
|
||||||
supplierRef: Nº factura
|
supplierRef: Nº factura
|
||||||
|
isDeductible: Deducible
|
||||||
list:
|
list:
|
||||||
ref: Referencia
|
ref: Referencia
|
||||||
supplier: Proveedor
|
supplier: Proveedor
|
||||||
|
|
|
@ -28,7 +28,6 @@ const userParams = {
|
||||||
shipped: null,
|
shipped: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -175,6 +174,7 @@ function downloadPdfs() {
|
||||||
:data-key
|
:data-key
|
||||||
url="Cmrs/filter"
|
url="Cmrs/filter"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
:order="['shipped DESC', 'cmrFk ASC']"
|
||||||
:user-params="userParams"
|
:user-params="userParams"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
v-model:selected="selectedRows"
|
v-model:selected="selectedRows"
|
||||||
|
|
|
@ -54,9 +54,9 @@ const columns = computed(() => [
|
||||||
label: t('globals.worker'),
|
label: t('globals.worker'),
|
||||||
component: markRaw(VnSelectWorker),
|
component: markRaw(VnSelectWorker),
|
||||||
create: true,
|
create: true,
|
||||||
|
cardVisible: true,
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
cardVisible: true,
|
|
||||||
width: '100px',
|
width: '100px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -74,7 +74,6 @@ const columns = computed(() => [
|
||||||
create: true,
|
create: true,
|
||||||
columnFilter: true,
|
columnFilter: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
visible: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'vehicleFk',
|
name: 'vehicleFk',
|
||||||
|
@ -93,7 +92,6 @@ const columns = computed(() => [
|
||||||
create: true,
|
create: true,
|
||||||
columnFilter: true,
|
columnFilter: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
visible: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -36,7 +36,7 @@ const warehousesOptionsIn = ref([]);
|
||||||
auto-load
|
auto-load
|
||||||
:filter="{ where: { isDestiny: TRUE } }"
|
:filter="{ where: { isDestiny: TRUE } }"
|
||||||
/>
|
/>
|
||||||
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel">
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.ref" :label="t('globals.reference')" />
|
<VnInput v-model="data.ref" :label="t('globals.reference')" />
|
||||||
|
@ -57,8 +57,8 @@ const warehousesOptionsIn = ref([]);
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="data.availabled"
|
v-model="data.availabled"
|
||||||
:label="t('travel.summary.availabled')"
|
:label="t('travel.summary.availabled')"
|
||||||
/>
|
/>
|
||||||
<VnInputTime
|
<VnInputTime
|
||||||
v-model="data.availabled"
|
v-model="data.availabled"
|
||||||
:label="t('travel.summary.availabledHour')"
|
:label="t('travel.summary.availabledHour')"
|
||||||
|
@ -96,6 +96,7 @@ const warehousesOptionsIn = ref([]);
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
|
<VnInput v-model="data.awbFk" :label="t('travel.awbFk')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
|
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
|
||||||
|
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
'isRaid',
|
'isRaid',
|
||||||
'daysInForward',
|
'daysInForward',
|
||||||
'availabled',
|
'availabled',
|
||||||
|
'awbFk',
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ export const useDescriptorStore = defineStore('descriptorStore', () => {
|
||||||
if (Object.keys(descriptors).length) return descriptors;
|
if (Object.keys(descriptors).length) return descriptors;
|
||||||
|
|
||||||
const currentDescriptors = {};
|
const currentDescriptors = {};
|
||||||
const files = import.meta.glob(`/src/**/*DescriptorProxy.vue`);
|
const files = import.meta.glob(`src/**/*DescriptorProxy.vue`);
|
||||||
const moduleParser = {
|
const moduleParser = {
|
||||||
account: 'user',
|
account: 'user',
|
||||||
client: 'customer',
|
client: 'customer',
|
||||||
|
@ -16,9 +16,7 @@ export const useDescriptorStore = defineStore('descriptorStore', () => {
|
||||||
for (const file in files) {
|
for (const file in files) {
|
||||||
const name = file.split('/').at(-1).slice(0, -19).toLowerCase();
|
const name = file.split('/').at(-1).slice(0, -19).toLowerCase();
|
||||||
const descriptor = moduleParser[name] ?? name;
|
const descriptor = moduleParser[name] ?? name;
|
||||||
currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent(
|
currentDescriptors[descriptor + 'Fk'] = defineAsyncComponent(files[file]);
|
||||||
() => import(/* @vite-ignore */ file),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
setDescriptors(currentDescriptors);
|
setDescriptors(currentDescriptors);
|
||||||
return currentDescriptors;
|
return currentDescriptors;
|
||||||
|
|
|
@ -80,6 +80,11 @@ describe('EntryBuys', () => {
|
||||||
checkColor('amount', COLORS.positive);
|
checkColor('amount', COLORS.positive);
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
|
|
||||||
|
cy.get('tbody > tr [tabindex="0"][role="checkbox"]').click();
|
||||||
|
cy.dataCy('transferBuys').should('be.enabled').click();
|
||||||
|
cy.dataCy('entryDestinyInput').should('be.visible').type('100');
|
||||||
|
cy.dataCy('transferBuysBtn').click();
|
||||||
|
|
||||||
cy.deleteEntry();
|
cy.deleteEntry();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,16 @@ describe('InvoiceInSerial', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter by last days ', () => {
|
it('should filter by last days ', () => {
|
||||||
let before;
|
|
||||||
cy.dataCy('vnTableCell_total')
|
cy.dataCy('vnTableCell_total')
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
.then((total) => (before = +total));
|
.then((before) => {
|
||||||
|
cy.dataCy('Last days_input')
|
||||||
cy.dataCy('Last days_input').type('{selectall}1{enter}');
|
.type('{selectall}1{enter}')
|
||||||
cy.dataCy('vnTableCell_total')
|
.then(() => {
|
||||||
.invoke('text')
|
cy.dataCy('vnTableCell_total')
|
||||||
.then((total) => expect(+total).to.be.lessThan(before));
|
.invoke('text')
|
||||||
|
.then((after) => expect(+after).to.be.lessThan(+before));
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceInVat', () => {
|
describe('InvoiceInVat', () => {
|
||||||
const thirdRow = 'tbody > :nth-child(3)';
|
const thirdRow = 'tbody > :nth-child(3)';
|
||||||
const firstLineVat = 'tbody > :nth-child(1) > :nth-child(4)';
|
const firstLineVat = 'tbody > :nth-child(1) ';
|
||||||
const vats = '[data-cy="vat-sageiva"]';
|
const vats = '[data-cy="vat-sageiva"]';
|
||||||
const dialogInputs = '.q-dialog label input';
|
const dialogInputs = '.q-dialog label input';
|
||||||
const addBtn = 'tbody tr:nth-child(1) td:nth-child(2) .--add-icon';
|
const addBtn = 'tbody tr:nth-child(1) td:nth-child(2) .--add-icon';
|
||||||
|
@ -18,6 +18,17 @@ describe('InvoiceInVat', () => {
|
||||||
cy.get(vats).eq(0).should('have.value', '8: H.P. IVA 21% CEE');
|
cy.get(vats).eq(0).should('have.value', '8: H.P. IVA 21% CEE');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should mark the line as deductible VAT', () => {
|
||||||
|
cy.get(`${firstLineVat} [data-cy="isDeductible_checkbox"]`).click();
|
||||||
|
|
||||||
|
cy.saveCard();
|
||||||
|
|
||||||
|
cy.get(`${firstLineVat} [data-cy="isDeductible_checkbox"]`)
|
||||||
|
|
||||||
|
.click();
|
||||||
|
cy.saveCard();
|
||||||
|
});
|
||||||
|
|
||||||
it('should add a new row', () => {
|
it('should add a new row', () => {
|
||||||
cy.addRow();
|
cy.addRow();
|
||||||
cy.fillRow(thirdRow, [true, 2000000001, 30, 'H.P. IVA 10']);
|
cy.fillRow(thirdRow, [true, 2000000001, 30, 'H.P. IVA 10']);
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
describe('Cmr list', () => {
|
||||||
|
const getLinkSelector = (colField) =>
|
||||||
|
`tr:first-child > [data-col-field="${colField}"] > .no-padding > .link`;
|
||||||
|
|
||||||
|
const selectors = {
|
||||||
|
ticket: getLinkSelector('ticketFk'),
|
||||||
|
client: getLinkSelector('clientFk'),
|
||||||
|
lastRowSelectCheckBox:
|
||||||
|
'.q-virtual-scroll__content > tr:last-child > :nth-child(1) > .q-checkbox',
|
||||||
|
downloadBtn: '#subToolbar > .q-btn',
|
||||||
|
viewCmr: 'tableAction-0',
|
||||||
|
descriptorOpenSummaryBtn: '.descriptor [data-cy="openSummaryBtn"]',
|
||||||
|
summaryTitle: '.summaryHeader',
|
||||||
|
descriptorId: '.descriptor .subtitle',
|
||||||
|
descriptorTitle: '.descriptor .title',
|
||||||
|
summaryGoToSummaryBtn: '.summaryHeader [data-cy="goToSummaryBtn"]',
|
||||||
|
descriptorGoToSummaryBtn: '.descriptor [data-cy="goToSummaryBtn"]',
|
||||||
|
removeFilter: '.q-chip__icon--remove',
|
||||||
|
};
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
ticket: '1',
|
||||||
|
client: 'Bruce Wayne',
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit('/#/route/cmr');
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
cy.get(selectors.removeFilter).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should download selected cmr', () => {
|
||||||
|
const downloadsFolder = Cypress.config('downloadsFolder');
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).should('be.visible').click();
|
||||||
|
cy.get(selectors.downloadBtn).should('be.visible').click();
|
||||||
|
cy.wait(3000);
|
||||||
|
|
||||||
|
const fileName = 'cmrs.zip';
|
||||||
|
cy.readFile(`${downloadsFolder}/${fileName}`).should('exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should open selected cmr pdf', () => {
|
||||||
|
cy.window().then((win) => {
|
||||||
|
cy.stub(win, 'open').as('windowOpen');
|
||||||
|
});
|
||||||
|
cy.dataCy(selectors.viewCmr).last().click();
|
||||||
|
cy.get('@windowOpen').should('be.calledWithMatch', '\/api\/Cmrs\/3');
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Ticket pop-ups', () => {
|
||||||
|
it('Should redirect to the ticket summary from the ticket descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.ticket).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.descriptorId, data.ticket);
|
||||||
|
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
|
||||||
|
cy.url().should('include', '/ticket/1/summary');
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the ticket summary from summary pop-up from the ticket descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.ticket).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.descriptorId, data.ticket);
|
||||||
|
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
|
||||||
|
cy.url().should('include', '/ticket/1/summary');
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Client pop-ups', () => {
|
||||||
|
it('Should redirect to the client summary from the client descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.client).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.descriptorTitle, data.client);
|
||||||
|
cy.get(selectors.descriptorGoToSummaryBtn).should('be.visible').click();
|
||||||
|
cy.url().should('include', '/customer/1101/summary');
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the client summary from summary pop-up from the client descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.client).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.descriptorTitle, data.client);
|
||||||
|
cy.get(selectors.descriptorOpenSummaryBtn).should('be.visible').click();
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).should('be.visible').click();
|
||||||
|
cy.url().should('include', '/customer/1101/summary');
|
||||||
|
cy.containContent(selectors.summaryTitle, data.client);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -154,10 +154,9 @@ describe('Route extended list', () => {
|
||||||
cy.validateContent(selectors.served, checkboxState.check);
|
cy.validateContent(selectors.served, checkboxState.check);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should delete the selected routes', () => {
|
it('Should delete the selected route', () => {
|
||||||
cy.get(selectors.lastRowSelectCheckBox).click();
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
cy.get(selectors.removeBtn).click();
|
cy.get(selectors.removeBtn).click();
|
||||||
|
|
||||||
cy.dataCy(selectors.confirmBtn).click();
|
cy.dataCy(selectors.confirmBtn).click();
|
||||||
|
|
||||||
cy.checkNotification(dataSaved);
|
cy.checkNotification(dataSaved);
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe('TicketList', () => {
|
||||||
cy.get('.summaryBody').should('exist');
|
cy.get('.summaryBody').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('filter client and create ticket', () => {
|
it('filter client and create ticket', () => {
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
||||||
searchResults();
|
searchResults();
|
||||||
cy.wait('@ticketSearchbar');
|
cy.wait('@ticketSearchbar');
|
||||||
|
@ -44,6 +44,7 @@ describe('TicketList', () => {
|
||||||
cy.dataCy('Customer ID_input').type('1101{enter}');
|
cy.dataCy('Customer ID_input').type('1101{enter}');
|
||||||
|
|
||||||
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
||||||
|
cy.waitSpinner();
|
||||||
cy.dataCy('Customer_select').should('have.value', 'Bruce Wayne');
|
cy.dataCy('Customer_select').should('have.value', 'Bruce Wayne');
|
||||||
cy.dataCy('Address_select').click();
|
cy.dataCy('Address_select').click();
|
||||||
|
|
||||||
|
|
|
@ -370,6 +370,21 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
|
||||||
cy.get(selector).should('have.text', expectedValue);
|
cy.get(selector).should('have.text', expectedValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('containContent', (selector, expectedValue) => {
|
||||||
|
cy.get(selector)
|
||||||
|
.should('be.visible')
|
||||||
|
.invoke('text')
|
||||||
|
.then((text) => {
|
||||||
|
expect(text).to.include(expectedValue);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
||||||
|
cy.openActionsDescriptor();
|
||||||
|
const listItem = '[role="menu"] .q-list .q-item';
|
||||||
|
cy.contains(listItem, opt).click();
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||||
cy.get('[data-cy="vnDescriptor"] [data-cy="descriptor-more-opts"]').click();
|
cy.get('[data-cy="vnDescriptor"] [data-cy="descriptor-more-opts"]').click();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue