Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6564-enhanceTicketAdvance
This commit is contained in:
commit
7b1e126966
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 🆕
|
||||||
|
|
|
@ -49,3 +49,9 @@ pnpm run test:e2e:summary
|
||||||
```bash
|
```bash
|
||||||
quasar build
|
quasar build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Serve the app for production
|
||||||
|
|
||||||
|
```bash
|
||||||
|
quasar build quasar serve dist/spa --host 0.0.0.0 --proxy=./proxy-serve.js
|
||||||
|
```
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -152,6 +152,10 @@ const value = computed({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const computedSortBy = computed(() => {
|
||||||
|
return $props.sortBy || $props.optionLabel + ' ASC';
|
||||||
|
});
|
||||||
|
|
||||||
watch(options, (newValue) => {
|
watch(options, (newValue) => {
|
||||||
setOptions(newValue);
|
setOptions(newValue);
|
||||||
});
|
});
|
||||||
|
@ -186,7 +190,7 @@ function findKeyInOptions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOptions(data) {
|
function setOptions(data) {
|
||||||
data = dataByOrder(data, $props.sortBy);
|
data = dataByOrder(data, computedSortBy.value);
|
||||||
myOptions.value = JSON.parse(JSON.stringify(data));
|
myOptions.value = JSON.parse(JSON.stringify(data));
|
||||||
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
||||||
emit('update:options', data);
|
emit('update:options', data);
|
||||||
|
@ -216,7 +220,8 @@ function filter(val, options) {
|
||||||
async function fetchFilter(val) {
|
async function fetchFilter(val) {
|
||||||
if (!$props.url) return;
|
if (!$props.url) return;
|
||||||
|
|
||||||
const { fields, include, sortBy, limit } = $props;
|
const { fields, include, limit } = $props;
|
||||||
|
const sortBy = computedSortBy.value;
|
||||||
const key =
|
const key =
|
||||||
optionFilterValue.value ??
|
optionFilterValue.value ??
|
||||||
(new RegExp(/\d/g).test(val)
|
(new RegExp(/\d/g).test(val)
|
||||||
|
|
|
@ -201,6 +201,29 @@ async function fetch() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vn-card-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vn-card-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
> div {
|
||||||
|
max-height: 70px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1010px) {
|
||||||
|
.vn-card-group {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.vn-card-content {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.summaryHeader .vn-label-value {
|
.summaryHeader .vn-label-value {
|
||||||
|
|
|
@ -35,6 +35,7 @@ const val = computed(() => $props.value);
|
||||||
:label="label"
|
:label="label"
|
||||||
disable
|
disable
|
||||||
dense
|
dense
|
||||||
|
size="sm"
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-if="label || $slots.label" class="label">
|
<div v-if="label || $slots.label" class="label">
|
||||||
|
@ -44,7 +45,7 @@ const val = computed(() => $props.value);
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<slot name="value">
|
<slot name="value">
|
||||||
<span :title="value">
|
<span :title="value" style="text-overflow: ellipsis">
|
||||||
{{ dash ? dashIfEmpty(value) : value }}
|
{{ dash ? dashIfEmpty(value) : value }}
|
||||||
</span>
|
</span>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -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 }">
|
||||||
|
|
|
@ -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 }">
|
||||||
|
|
|
@ -105,15 +105,6 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
||||||
<QIcon
|
|
||||||
v-if="entity?.substitutionAllowed"
|
|
||||||
name="help"
|
|
||||||
size="xs"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ t('Allowed substitution') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="!entity.account?.active"
|
v-if="!entity.account?.active"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
@ -61,16 +61,6 @@ const openCreateForm = (type) => {
|
||||||
.join('&');
|
.join('&');
|
||||||
useOpenURL(`/#/${type}/list?${params}`);
|
useOpenURL(`/#/${type}/list?${params}`);
|
||||||
};
|
};
|
||||||
const updateSubstitutionAllowed = async () => {
|
|
||||||
try {
|
|
||||||
await axios.patch(`Clients/${route.params.id}`, {
|
|
||||||
substitutionAllowed: !$props.customer.substitutionAllowed,
|
|
||||||
});
|
|
||||||
notify('globals.notificationSent', 'positive');
|
|
||||||
} catch (error) {
|
|
||||||
notify(error.message, 'positive');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -79,13 +69,6 @@ const updateSubstitutionAllowed = async () => {
|
||||||
{{ t('globals.pageTitles.createTicket') }}
|
{{ t('globals.pageTitles.createTicket') }}
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
|
||||||
<QItemSection @click="updateSubstitutionAllowed()">{{
|
|
||||||
$props.customer.substitutionAllowed
|
|
||||||
? t('Disable substitution')
|
|
||||||
: t('Allow substitution')
|
|
||||||
}}</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -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',
|
||||||
|
@ -207,113 +214,106 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||||
<InvoiceInDescriptorMenu :invoice="entity" />
|
<InvoiceInDescriptorMenu :invoice="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<!--Basic Data-->
|
<QCard class="max-width">
|
||||||
<QCard class="vn-one">
|
<VnTitle
|
||||||
<QCardSection class="q-pa-none">
|
:url="getLink('basic-data')"
|
||||||
<VnTitle
|
:text="t('globals.pageTitles.basicData')"
|
||||||
:url="getLink('basic-data')"
|
|
||||||
:text="t('globals.pageTitles.basicData')"
|
|
||||||
/>
|
|
||||||
</QCardSection>
|
|
||||||
<VnLv
|
|
||||||
:label="t('invoiceIn.list.supplier')"
|
|
||||||
:value="entity.supplier?.name"
|
|
||||||
>
|
|
||||||
<template #value>
|
|
||||||
<span class="link" data-cy="invoiceInSummary_supplier">
|
|
||||||
{{ entity.supplier?.name }}
|
|
||||||
<SupplierDescriptorProxy :id="entity.supplierFk" />
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</VnLv>
|
|
||||||
<VnLv :label="t('invoiceIn.supplierRef')" :value="entity.supplierRef" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('invoiceIn.summary.currency')"
|
|
||||||
:value="entity.currency?.code"
|
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('invoiceIn.serial')" :value="`${entity.serial}`" />
|
<div class="vn-card-group">
|
||||||
<VnLv
|
<div class="vn-card-content">
|
||||||
:label="t('globals.country')"
|
<VnLv
|
||||||
:value="entity.supplier?.country?.code"
|
:label="t('invoiceIn.list.supplier')"
|
||||||
/>
|
:value="entity.supplier?.name"
|
||||||
</QCard>
|
>
|
||||||
<QCard class="vn-one">
|
<template #value>
|
||||||
<QCardSection class="q-pa-none">
|
<span class="link" data-cy="invoiceInSummary_supplier">
|
||||||
<VnTitle
|
{{ entity.supplier?.name }}
|
||||||
:url="getLink('basic-data')"
|
<SupplierDescriptorProxy :id="entity.supplierFk" />
|
||||||
:text="t('globals.pageTitles.basicData')"
|
</span>
|
||||||
/>
|
</template>
|
||||||
</QCardSection>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
:ellipsis-value="false"
|
:label="t('invoiceIn.supplierRef')"
|
||||||
:label="t('invoiceIn.summary.issued')"
|
:value="entity.supplierRef"
|
||||||
:value="toDate(entity.issued)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('invoiceIn.summary.currency')"
|
||||||
:label="t('invoiceIn.summary.operated')"
|
:value="entity.currency?.code"
|
||||||
:value="toDate(entity.operated)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('invoiceIn.serial')"
|
||||||
:label="t('invoiceIn.summary.bookEntried')"
|
:value="`${entity.serial}`"
|
||||||
:value="toDate(entity.bookEntried)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('globals.country')"
|
||||||
:label="t('invoiceIn.summary.bookedDate')"
|
:value="entity.supplier?.country?.code"
|
||||||
:value="toDate(entity.booked)"
|
/>
|
||||||
/>
|
</div>
|
||||||
<VnLv :label="t('globals.isVies')" :value="entity.supplier?.isVies" />
|
<div class="vn-card-content">
|
||||||
</QCard>
|
<VnLv
|
||||||
<QCard class="vn-one">
|
:ellipsis-value="false"
|
||||||
<QCardSection class="q-pa-none">
|
:label="t('invoiceIn.summary.issued')"
|
||||||
<VnTitle
|
:value="toDate(entity.issued)"
|
||||||
:url="getLink('basic-data')"
|
/>
|
||||||
:text="t('globals.pageTitles.basicData')"
|
<VnLv
|
||||||
/>
|
:label="t('invoiceIn.summary.operated')"
|
||||||
</QCardSection>
|
:value="toDate(entity.operated)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('invoiceIn.summary.sage')"
|
<VnLv
|
||||||
:value="entity.sageWithholding?.withholding"
|
:label="t('invoiceIn.summary.bookEntried')"
|
||||||
/>
|
:value="toDate(entity.bookEntried)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('invoiceIn.summary.vat')"
|
<VnLv
|
||||||
:value="entity.expenseDeductible?.name"
|
:label="t('invoiceIn.summary.bookedDate')"
|
||||||
/>
|
:value="toDate(entity.booked)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('invoiceIn.card.company')"
|
<VnLv
|
||||||
:value="entity.company?.code"
|
:label="t('globals.isVies')"
|
||||||
/>
|
:value="entity.supplier?.isVies"
|
||||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
/>
|
||||||
</QCard>
|
</div>
|
||||||
<QCard class="vn-one">
|
<div class="vn-card-content">
|
||||||
<QCardSection class="q-pa-none">
|
<VnLv
|
||||||
<VnTitle
|
:label="t('invoiceIn.summary.sage')"
|
||||||
:url="getLink('basic-data')"
|
:value="entity.sageWithholding?.withholding"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
</QCardSection>
|
:label="t('invoiceIn.summary.vat')"
|
||||||
<QCardSection class="q-pa-none">
|
:value="entity.expenseDeductible?.name"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('invoiceIn.summary.taxableBase')"
|
<VnLv
|
||||||
:value="toCurrency(entity.totals.totalTaxableBase)"
|
:label="t('invoiceIn.card.company')"
|
||||||
/>
|
:value="entity.company?.code"
|
||||||
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
/>
|
||||||
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
<VnLv
|
||||||
<template #value>
|
:label="t('invoiceIn.isBooked')"
|
||||||
<QChip
|
:value="invoiceIn?.isBooked"
|
||||||
dense
|
/>
|
||||||
class="q-pa-xs"
|
</div>
|
||||||
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
<div class="vn-card-content">
|
||||||
:title="
|
<VnLv
|
||||||
amountsNotMatch
|
:label="t('invoiceIn.summary.taxableBase')"
|
||||||
? t('invoiceIn.summary.noMatch')
|
:value="toCurrency(entity.totals.totalTaxableBase)"
|
||||||
: t('invoiceIn.summary.dueTotal')
|
/>
|
||||||
"
|
<VnLv label="Total" :value="toCurrency(entity.totals.totalVat)" />
|
||||||
>
|
<VnLv :label="t('invoiceIn.summary.dueTotal')">
|
||||||
{{ toCurrency(entity.totals.totalDueDay) }}
|
<template #value>
|
||||||
</QChip>
|
<QChip
|
||||||
</template>
|
dense
|
||||||
</VnLv>
|
class="q-pa-xs"
|
||||||
</QCardSection>
|
:color="amountsNotMatch ? 'negative' : 'transparent'"
|
||||||
|
:title="
|
||||||
|
amountsNotMatch
|
||||||
|
? t('invoiceIn.summary.noMatch')
|
||||||
|
: t('invoiceIn.summary.dueTotal')
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ toCurrency(entity.totals.totalDueDay) }}
|
||||||
|
</QChip>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Vat-->
|
<!--Vat-->
|
||||||
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
<QCard v-if="entity.invoiceInTax.length" class="vat">
|
||||||
|
@ -335,6 +335,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>
|
||||||
|
|
|
@ -119,7 +119,7 @@ const cols = computed(() => [
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
type: 'submit',
|
type: 'submit',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => viewSummary(row.id, InvoiceInSummary),
|
action: (row) => viewSummary(row.id, InvoiceInSummary, 'lg-width'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('globals.download'),
|
title: t('globals.download'),
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -71,180 +71,174 @@ async function handleConfirm() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<CardSummary
|
||||||
<CardSummary
|
ref="summary"
|
||||||
ref="summary"
|
:url="`Orders/${entityId}/summary`"
|
||||||
:url="`Orders/${entityId}/summary`"
|
data-key="OrderSummary"
|
||||||
data-key="OrderSummary"
|
>
|
||||||
>
|
<template #header="{ entity }">
|
||||||
<template #header="{ entity }">
|
{{ t('order.summary.basket') }} #{{ entity?.id }} -
|
||||||
{{ t('order.summary.basket') }} #{{ entity?.id }} -
|
{{ entity?.client?.name }} ({{ entity?.clientFk }})
|
||||||
{{ entity?.client?.name }} ({{ entity?.clientFk }})
|
</template>
|
||||||
</template>
|
<template #header-right>
|
||||||
<template #header-right>
|
<QBtn
|
||||||
<QBtn
|
flat
|
||||||
flat
|
text-color="white"
|
||||||
text-color="white"
|
:disabled="isConfirmed"
|
||||||
:disabled="isConfirmed"
|
:label="t('order.summary.confirm')"
|
||||||
:label="t('order.summary.confirm')"
|
@click="handleConfirm()"
|
||||||
@click="handleConfirm()"
|
>
|
||||||
>
|
<QTooltip>{{ t('order.summary.confirmLines') }}</QTooltip>
|
||||||
<QTooltip>{{ t('order.summary.confirmLines') }}</QTooltip>
|
</QBtn>
|
||||||
</QBtn>
|
</template>
|
||||||
</template>
|
<template #menu="{ entity }">
|
||||||
<template #menu="{ entity }">
|
<OrderDescriptorMenu :order="entity" />
|
||||||
<OrderDescriptorMenu :order="entity" />
|
</template>
|
||||||
</template>
|
<template #body="{ entity }">
|
||||||
<template #body="{ entity }">
|
<QCard class="vn-two">
|
||||||
<QCard class="vn-one">
|
<VnTitle
|
||||||
<VnTitle
|
:url="`#/order/${entity.id}/basic-data`"
|
||||||
:url="`#/order/${entity.id}/basic-data`"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
/>
|
||||||
/>
|
<div class="vn-card-group">
|
||||||
<VnLv label="ID" :value="entity.id" />
|
<div class="vn-card-content">
|
||||||
<VnLv :label="t('globals.alias')" dash>
|
<VnLv label="ID" :value="entity.id" />
|
||||||
<template #value>
|
<VnLv :label="t('globals.alias')" dash>
|
||||||
<span class="link">
|
<template #value>
|
||||||
{{ dashIfEmpty(entity?.address?.nickname) }}
|
<span class="link">
|
||||||
<CustomerDescriptorProxy :id="entity?.clientFk" />
|
{{ dashIfEmpty(entity?.address?.nickname) }}
|
||||||
</span>
|
<CustomerDescriptorProxy :id="entity?.clientFk" />
|
||||||
</template>
|
</span>
|
||||||
</VnLv>
|
</template>
|
||||||
<VnLv
|
</VnLv>
|
||||||
:label="t('globals.company')"
|
<VnLv
|
||||||
:value="entity?.address?.companyFk"
|
:label="t('globals.company')"
|
||||||
/>
|
:value="entity?.address?.companyFk"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('globals.confirmed')"
|
<VnLv
|
||||||
:value="Boolean(entity?.isConfirmed)"
|
:label="t('globals.confirmed')"
|
||||||
/>
|
:value="Boolean(entity?.isConfirmed)"
|
||||||
</QCard>
|
/>
|
||||||
<QCard class="vn-one">
|
</div>
|
||||||
<VnTitle
|
<div class="vn-card-content">
|
||||||
:url="`#/order/${entity.id}/basic-data`"
|
<VnLv
|
||||||
:text="t('globals.pageTitles.basicData')"
|
:label="t('order.summary.created')"
|
||||||
/>
|
:value="toDateHourMinSec(entity?.created)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('order.summary.created')"
|
<VnLv
|
||||||
:value="toDateHourMinSec(entity?.created)"
|
:label="t('globals.confirmed')"
|
||||||
/>
|
:value="toDateHourMinSec(entity?.confirmed)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('globals.confirmed')"
|
<VnLv
|
||||||
:value="toDateHourMinSec(entity?.confirmed)"
|
:label="t('globals.landed')"
|
||||||
/>
|
:value="toDateHourMinSec(entity?.landed)"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('globals.landed')"
|
<VnLv :label="t('globals.phone')">
|
||||||
:value="toDateHourMinSec(entity?.landed)"
|
<template #value>
|
||||||
/>
|
{{ dashIfEmpty(entity?.address?.phone) }}
|
||||||
<VnLv :label="t('globals.phone')">
|
<a
|
||||||
<template #value>
|
v-if="entity?.address?.phone"
|
||||||
{{ dashIfEmpty(entity?.address?.phone) }}
|
:href="`tel:${entity?.address?.phone}`"
|
||||||
<a
|
class="text-primary"
|
||||||
v-if="entity?.address?.phone"
|
>
|
||||||
:href="`tel:${entity?.address?.phone}`"
|
<QIcon name="phone" />
|
||||||
class="text-primary"
|
</a>
|
||||||
>
|
</template>
|
||||||
<QIcon name="phone" />
|
</VnLv>
|
||||||
</a>
|
<VnLv
|
||||||
</template>
|
:label="t('order.summary.createdFrom')"
|
||||||
</VnLv>
|
:value="entity?.sourceApp"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('order.summary.createdFrom')"
|
<VnLv
|
||||||
:value="entity?.sourceApp"
|
:label="t('order.summary.address')"
|
||||||
/>
|
:value="`${entity?.address?.street} - ${entity?.address?.city} (${entity?.address?.province?.name})`"
|
||||||
<VnLv
|
class="order-summary-address"
|
||||||
:label="t('order.summary.address')"
|
/>
|
||||||
:value="`${entity?.address?.street} - ${entity?.address?.city} (${entity?.address?.province?.name})`"
|
</div>
|
||||||
class="order-summary-address"
|
</div>
|
||||||
/>
|
</QCard>
|
||||||
</QCard>
|
<QCard class="vn-one">
|
||||||
<QCard class="vn-one">
|
<VnTitle :text="t('globals.pageTitles.notes')" />
|
||||||
<VnTitle :text="t('globals.pageTitles.notes')" />
|
<p v-if="entity?.note" class="no-margin">
|
||||||
<p v-if="entity?.note" class="no-margin">
|
{{ entity?.note }}
|
||||||
{{ entity?.note }}
|
</p>
|
||||||
</p>
|
</QCard>
|
||||||
</QCard>
|
<QCard class="vn-one">
|
||||||
<QCard class="vn-one">
|
<VnTitle :text="t('order.summary.total')" />
|
||||||
<VnTitle :text="t('order.summary.total')" />
|
<VnLv>
|
||||||
<VnLv>
|
<template #label>
|
||||||
<template #label>
|
<span class="text-h6">{{ t('globals.subtotal') }}</span>
|
||||||
<span class="text-h6">{{ t('globals.subtotal') }}</span>
|
</template>
|
||||||
</template>
|
<template #value>
|
||||||
<template #value>
|
<span class="text-h6">{{ toCurrency(entity?.subTotal) }}</span>
|
||||||
<span class="text-h6">{{
|
</template>
|
||||||
toCurrency(entity?.subTotal)
|
</VnLv>
|
||||||
}}</span>
|
<VnLv>
|
||||||
</template>
|
<template #label>
|
||||||
</VnLv>
|
<span class="text-h6">{{ t('globals.vat') }}</span>
|
||||||
<VnLv>
|
</template>
|
||||||
<template #label>
|
<template #value>
|
||||||
<span class="text-h6">{{ t('globals.vat') }}</span>
|
<span class="text-h6">{{ toCurrency(entity?.VAT) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #value>
|
</VnLv>
|
||||||
<span class="text-h6">{{ toCurrency(entity?.VAT) }}</span>
|
<VnLv>
|
||||||
</template>
|
<template #label>
|
||||||
</VnLv>
|
<span class="text-h6">{{ t('order.summary.total') }}</span>
|
||||||
<VnLv>
|
</template>
|
||||||
<template #label>
|
<template #value>
|
||||||
<span class="text-h6">{{ t('order.summary.total') }}</span>
|
<span class="text-h6">{{ toCurrency(entity?.total) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #value>
|
</VnLv>
|
||||||
<span class="text-h6">{{ toCurrency(entity?.total) }}</span>
|
</QCard>
|
||||||
</template>
|
<QCard>
|
||||||
</VnLv>
|
<VnTitle :text="t('globals.details')" />
|
||||||
</QCard>
|
<QTable :columns="detailsColumns" :rows="entity?.rows" flat>
|
||||||
<QCard>
|
<template #header="props">
|
||||||
<VnTitle :text="t('globals.details')" />
|
<QTr :props="props">
|
||||||
<QTable :columns="detailsColumns" :rows="entity?.rows" flat>
|
<QTh auto-width>{{ t('globals.item') }}</QTh>
|
||||||
<template #header="props">
|
<QTh>{{ t('globals.description') }}</QTh>
|
||||||
<QTr :props="props">
|
<QTh auto-width>{{ t('globals.quantity') }}</QTh>
|
||||||
<QTh auto-width>{{ t('globals.item') }}</QTh>
|
<QTh auto-width>{{ t('globals.price') }}</QTh>
|
||||||
<QTh>{{ t('globals.description') }}</QTh>
|
<QTh auto-width>{{ t('order.summary.amount') }}</QTh>
|
||||||
<QTh auto-width>{{ t('globals.quantity') }}</QTh>
|
</QTr>
|
||||||
<QTh auto-width>{{ t('globals.price') }}</QTh>
|
</template>
|
||||||
<QTh auto-width>{{ t('order.summary.amount') }}</QTh>
|
<template #body="props">
|
||||||
</QTr>
|
<QTr :props="props">
|
||||||
</template>
|
<QTd key="item" :props="props" class="item">
|
||||||
<template #body="props">
|
<span class="link">
|
||||||
<QTr :props="props">
|
{{ props.row.item?.id }}
|
||||||
<QTd key="item" :props="props" class="item">
|
<ItemDescriptorProxy :id="props.row.item?.id" />
|
||||||
<span class="link">
|
</span>
|
||||||
{{ props.row.item?.id }}
|
</QTd>
|
||||||
<ItemDescriptorProxy :id="props.row.item?.id" />
|
<QTd key="description" :props="props">
|
||||||
</span>
|
<div class="description">
|
||||||
</QTd>
|
<div class="name">
|
||||||
<QTd key="description" :props="props">
|
{{ props.row.item.name }}
|
||||||
<div class="description">
|
<span
|
||||||
<div class="name">
|
v-if="props.row.item.subName"
|
||||||
{{ props.row.item.name }}
|
class="subName"
|
||||||
<span
|
>
|
||||||
v-if="props.row.item.subName"
|
{{ props.row.item.subName }}
|
||||||
class="subName"
|
</span>
|
||||||
>
|
|
||||||
{{ props.row.item.subName }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="props.row.item" :columns="3" />
|
</div>
|
||||||
</QTd>
|
<FetchedTags :item="props.row.item" :columns="3" />
|
||||||
<QTd key="quantity" :props="props">
|
</QTd>
|
||||||
{{ props.row.quantity }}
|
<QTd key="quantity" :props="props">
|
||||||
</QTd>
|
{{ props.row.quantity }}
|
||||||
<QTd key="price" :props="props">
|
</QTd>
|
||||||
{{ toCurrency(props.row.price) }}
|
<QTd key="price" :props="props">
|
||||||
</QTd>
|
{{ toCurrency(props.row.price) }}
|
||||||
<QTd key="amount" :props="props">
|
</QTd>
|
||||||
{{
|
<QTd key="amount" :props="props">
|
||||||
toCurrency(props.row?.quantity * props.row?.price)
|
{{ toCurrency(props.row?.quantity * props.row?.price) }}
|
||||||
}}
|
</QTd>
|
||||||
</QTd>
|
</QTr>
|
||||||
</QTr>
|
</template>
|
||||||
</template>
|
</QTable>
|
||||||
</QTable>
|
</QCard>
|
||||||
</QCard>
|
</template>
|
||||||
</template>
|
</CardSummary>
|
||||||
</CardSummary>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.cardSummary .summaryBody .vn-label-value.order-summary-address {
|
.cardSummary .summaryBody .vn-label-value.order-summary-address {
|
||||||
|
|
|
@ -65,7 +65,6 @@ const columns = computed(() => [
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Departments',
|
url: 'Departments',
|
||||||
},
|
},
|
||||||
create: true,
|
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
|
@ -142,7 +141,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
title: t('globals.pageTitles.summary'),
|
title: t('globals.pageTitles.summary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, OrderSummary),
|
action: (row) => viewSummary(row.id, OrderSummary, 'lg-width'),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -138,74 +138,79 @@ const ticketColumns = ref([
|
||||||
:url="`#/${route.meta.moduleName.toLowerCase()}/${entityId}/basic-data`"
|
:url="`#/${route.meta.moduleName.toLowerCase()}/${entityId}/basic-data`"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
<div class="vn-card-group">
|
||||||
|
<div class="vn-card-content">
|
||||||
<QCard class="vn-one">
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.date')"
|
||||||
:label="t('route.summary.date')"
|
:value="toDate(entity?.route.dated)"
|
||||||
:value="toDate(entity?.route.dated)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.agency')"
|
||||||
:label="t('route.summary.agency')"
|
:value="entity?.route?.agencyMode?.name"
|
||||||
:value="entity?.route?.agencyMode?.name"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.vehicle')"
|
||||||
:label="t('route.summary.vehicle')"
|
:value="entity.route?.vehicle?.numberPlate"
|
||||||
:value="entity.route?.vehicle?.numberPlate"
|
/>
|
||||||
/>
|
<VnLv :label="t('route.summary.driver')">
|
||||||
<VnLv :label="t('route.summary.driver')">
|
<template #value>
|
||||||
<template #value>
|
<span class="link">
|
||||||
<span class="link">
|
{{
|
||||||
{{ dashIfEmpty(entity?.route?.worker?.user?.name) }}
|
dashIfEmpty(entity?.route?.worker?.user?.name)
|
||||||
<WorkerDescriptorProxy :id="entity.route?.workerFk" />
|
}}
|
||||||
</span>
|
<WorkerDescriptorProxy
|
||||||
</template>
|
:id="entity.route?.workerFk"
|
||||||
</VnLv>
|
/>
|
||||||
<VnLv
|
</span>
|
||||||
:label="t('route.summary.cost')"
|
</template>
|
||||||
:value="toCurrency(entity.route?.cost)"
|
</VnLv>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.cost')"
|
||||||
:label="t('route.summary.volume')"
|
:value="toCurrency(entity.route?.cost)"
|
||||||
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
/>
|
||||||
entity?.route?.vehicle?.m3,
|
<VnLv
|
||||||
)} m³`"
|
:label="t('route.summary.volume')"
|
||||||
/>
|
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
||||||
<VnLv
|
entity?.route?.vehicle?.m3,
|
||||||
:label="t('route.summary.packages')"
|
)} m³`"
|
||||||
:value="getTotalPackages(entity.tickets)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<QCheckbox
|
:label="t('route.summary.packages')"
|
||||||
:label="
|
:value="getTotalPackages(entity.tickets)"
|
||||||
entity.route.isOk
|
/>
|
||||||
? t('route.summary.closed')
|
<QCheckbox
|
||||||
: t('route.summary.open')
|
:label="
|
||||||
"
|
entity.route.isOk
|
||||||
v-model="entity.route.isOk"
|
? t('route.summary.closed')
|
||||||
:disable="true"
|
: t('route.summary.open')
|
||||||
/>
|
"
|
||||||
</QCard>
|
v-model="entity.route.isOk"
|
||||||
<QCard class="vn-one">
|
:disable="true"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('route.summary.started')"
|
</div>
|
||||||
:value="toHour(entity?.route.started)"
|
<div class="vn-card-content">
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.started')"
|
||||||
:label="t('route.summary.finished')"
|
:value="toHour(entity?.route.started)"
|
||||||
:value="toHour(entity?.route.finished)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.finished')"
|
||||||
:label="t('route.summary.kmStart')"
|
:value="toHour(entity?.route.finished)"
|
||||||
:value="dashIfEmpty(entity?.route?.kmStart)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.kmStart')"
|
||||||
:label="t('route.summary.kmEnd')"
|
:value="dashIfEmpty(entity?.route?.kmStart)"
|
||||||
:value="dashIfEmpty(entity?.route?.kmEnd)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv
|
:label="t('route.summary.kmEnd')"
|
||||||
:label="t('globals.description')"
|
:value="dashIfEmpty(entity?.route?.kmEnd)"
|
||||||
:value="dashIfEmpty(entity?.route?.description)"
|
/>
|
||||||
/>
|
<VnLv
|
||||||
|
:label="t('globals.description')"
|
||||||
|
:value="dashIfEmpty(entity?.route?.description)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-max">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
|
|
|
@ -44,7 +44,7 @@ const getPriceDifference = async () => {
|
||||||
shipped: ticket.value.shipped,
|
shipped: ticket.value.shipped,
|
||||||
};
|
};
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
`tickets/${formData.value.id}/priceDifference`,
|
`tickets/${ticket.value.id}/priceDifference`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
ticket.value.sale = data;
|
ticket.value.sale = data;
|
||||||
|
@ -71,7 +71,7 @@ const submit = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
`tickets/${formData.value.id}/componentUpdate`,
|
`tickets/${ticket.value.id}/componentUpdate`,
|
||||||
params,
|
params,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -137,120 +137,132 @@ onMounted(async () => {
|
||||||
<TicketDescriptorMenu :ticket="entity" />
|
<TicketDescriptorMenu :ticket="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-two">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="toTicketUrl('basic-data')"
|
:url="toTicketUrl('basic-data')"
|
||||||
:text="t('globals.summary.basicData')"
|
:text="t('globals.summary.basicData')"
|
||||||
/>
|
/>
|
||||||
<VnLv v-if="entity.ticketState" :label="t('globals.state')">
|
<div class="vn-card-group">
|
||||||
<template #value>
|
<div class="vn-card-content">
|
||||||
<QBadge
|
<VnLv v-if="entity.ticketState" :label="t('globals.state')">
|
||||||
text-color="black"
|
<template #value>
|
||||||
:color="entity.ticketState.state.classColor"
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
|
:color="entity.ticketState.state.classColor"
|
||||||
|
>
|
||||||
|
{{ entity.ticketState.state.name }}
|
||||||
|
</QBadge>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :label="t('customer.summary.team')">
|
||||||
|
<template #value>
|
||||||
|
<span class="link">
|
||||||
|
{{ entity?.client?.department?.name || '-' }}
|
||||||
|
<DepartmentDescriptorProxy
|
||||||
|
:id="entity?.client?.departmentFk"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.agency')"
|
||||||
|
:value="entity.agencyMode?.name"
|
||||||
|
/>
|
||||||
|
<VnLv :label="t('ticket.summary.zone')">
|
||||||
|
<template #value>
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ entity?.zone?.name }}
|
||||||
|
<ZoneDescriptorProxy :id="entity.zoneFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.warehouse')"
|
||||||
|
:value="entity.warehouse?.name"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
v-if="ticket?.ticketCollections?.length > 0"
|
||||||
|
:label="t('ticket.summary.collection')"
|
||||||
|
:value="ticket?.ticketCollections[0]?.collectionFk"
|
||||||
>
|
>
|
||||||
{{ entity.ticketState.state.name }}
|
<template #value>
|
||||||
</QBadge>
|
<a
|
||||||
</template>
|
:href="`${grafanaUrl}/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-collectionFk=${entity.ticketCollections[0]?.collectionFk}`"
|
||||||
</VnLv>
|
target="_blank"
|
||||||
<VnLv :label="t('customer.summary.team')">
|
class="grafana"
|
||||||
<template #value>
|
>
|
||||||
<span class="link">
|
{{ entity.ticketCollections[0]?.collectionFk }}
|
||||||
{{ entity?.client?.department?.name || '-' }}
|
</a>
|
||||||
<DepartmentDescriptorProxy
|
</template>
|
||||||
:id="entity?.client?.departmentFk"
|
</VnLv>
|
||||||
/>
|
<VnLv :label="t('ticket.summary.route')">
|
||||||
</span>
|
<template #value>
|
||||||
</template>
|
<span class="link">
|
||||||
</VnLv>
|
{{ entity.routeFk }}
|
||||||
<VnLv :label="t('globals.agency')" :value="entity.agencyMode?.name" />
|
<RouteDescriptorProxy :id="entity.routeFk" />
|
||||||
<VnLv :label="t('ticket.summary.zone')">
|
</span>
|
||||||
<template #value>
|
</template>
|
||||||
<span class="link" @click.stop>
|
</VnLv>
|
||||||
{{ entity?.zone?.name }}
|
<VnLv :label="t('ticket.summary.invoice')">
|
||||||
<ZoneDescriptorProxy :id="entity.zoneFk" />
|
<template #value>
|
||||||
</span>
|
<span :class="{ link: entity.refFk }">
|
||||||
</template>
|
{{ dashIfEmpty(entity.refFk) }}
|
||||||
</VnLv>
|
<InvoiceOutDescriptorProxy
|
||||||
<VnLv :label="t('globals.warehouse')" :value="entity.warehouse?.name" />
|
:id="entity.invoiceOut.id"
|
||||||
<VnLv
|
v-if="entity.refFk"
|
||||||
v-if="ticket?.ticketCollections?.length > 0"
|
/>
|
||||||
:label="t('ticket.summary.collection')"
|
</span>
|
||||||
:value="ticket?.ticketCollections[0]?.collectionFk"
|
</template>
|
||||||
>
|
</VnLv>
|
||||||
<template #value>
|
<VnLv
|
||||||
<a
|
:label="t('globals.weight')"
|
||||||
:href="`${grafanaUrl}/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-collectionFk=${entity.ticketCollections[0]?.collectionFk}`"
|
:value="dashIfEmpty(entity.weight)"
|
||||||
target="_blank"
|
/>
|
||||||
class="grafana"
|
</div>
|
||||||
>
|
<div class="vn-card-content">
|
||||||
{{ entity.ticketCollections[0]?.collectionFk }}
|
<VnLv
|
||||||
</a>
|
:label="t('ticket.summary.shipped')"
|
||||||
</template>
|
:value="toDate(entity.shipped)"
|
||||||
</VnLv>
|
/>
|
||||||
<VnLv :label="t('ticket.summary.route')">
|
<VnLv
|
||||||
<template #value>
|
:label="t('globals.landed')"
|
||||||
<span class="link">
|
:value="toDate(entity.landed)"
|
||||||
{{ entity.routeFk }}
|
/>
|
||||||
<RouteDescriptorProxy :id="entity.routeFk" />
|
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
||||||
</span>
|
<VnLv :value="entity.address.phone">
|
||||||
</template>
|
<template #label>
|
||||||
</VnLv>
|
{{ t('ticket.summary.consigneePhone') }}
|
||||||
<VnLv :label="t('ticket.summary.invoice')">
|
<VnLinkPhone :phone-number="entity.address.phone" />
|
||||||
<template #value>
|
</template>
|
||||||
<span :class="{ link: entity.refFk }">
|
</VnLv>
|
||||||
{{ dashIfEmpty(entity.refFk) }}
|
<VnLv :value="entity.address.mobile">
|
||||||
<InvoiceOutDescriptorProxy
|
<template #label>
|
||||||
:id="entity.invoiceOut.id"
|
{{ t('ticket.summary.consigneeMobile') }}
|
||||||
v-if="entity.refFk"
|
<VnLinkPhone :phone-number="entity.address.mobile" />
|
||||||
/>
|
</template>
|
||||||
</span>
|
</VnLv>
|
||||||
</template>
|
<VnLv :value="entity.client.phone">
|
||||||
</VnLv>
|
<template #label>
|
||||||
<VnLv :label="t('globals.weight')" :value="dashIfEmpty(entity.weight)" />
|
{{ t('ticket.summary.clientPhone') }}
|
||||||
</QCard>
|
<VnLinkPhone :phone-number="entity.client.phone" />
|
||||||
<QCard class="vn-one">
|
</template>
|
||||||
<VnTitle
|
</VnLv>
|
||||||
:url="toTicketUrl('basic-data')"
|
<VnLv :value="entity.client.mobile">
|
||||||
:text="t('globals.summary.basicData')"
|
<template #label>
|
||||||
/>
|
{{ t('ticket.summary.clientMobile') }}
|
||||||
<VnLv
|
<VnLinkPhone :phone-number="entity.client.mobile" />
|
||||||
:label="t('ticket.summary.shipped')"
|
</template>
|
||||||
:value="toDate(entity.shipped)"
|
</VnLv>
|
||||||
/>
|
<VnLv
|
||||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
:label="t('ticket.summary.consignee')"
|
||||||
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
:value="`${entity.address?.nickname} #${entity.address?.id}`"
|
||||||
<VnLv :value="entity.address.phone">
|
/>
|
||||||
<template #label>
|
<VnLv
|
||||||
{{ t('ticket.summary.consigneePhone') }}
|
:label="t('ticket.summary.consigneeStreet')"
|
||||||
<VnLinkPhone :phone-number="entity.address.phone" />
|
:value="formattedAddress"
|
||||||
</template>
|
/>
|
||||||
</VnLv>
|
</div>
|
||||||
<VnLv :value="entity.address.mobile">
|
</div>
|
||||||
<template #label>
|
|
||||||
{{ t('ticket.summary.consigneeMobile') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.address.mobile" />
|
|
||||||
</template>
|
|
||||||
</VnLv>
|
|
||||||
<VnLv :value="entity.client.phone">
|
|
||||||
<template #label>
|
|
||||||
{{ t('ticket.summary.clientPhone') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.client.phone" />
|
|
||||||
</template>
|
|
||||||
</VnLv>
|
|
||||||
<VnLv :value="entity.client.mobile">
|
|
||||||
<template #label>
|
|
||||||
{{ t('ticket.summary.clientMobile') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.client.mobile" />
|
|
||||||
</template>
|
|
||||||
</VnLv>
|
|
||||||
<VnLv
|
|
||||||
:label="t('ticket.summary.consignee')"
|
|
||||||
:value="`${entity.address?.nickname} #${entity.address?.id}`"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('ticket.summary.consigneeStreet')"
|
|
||||||
:value="formattedAddress"
|
|
||||||
/>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.notes.length">
|
<QCard class="vn-one" v-if="entity.notes.length">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
|
|
|
@ -248,7 +248,7 @@ const columns = computed(() => [
|
||||||
name: 'TicketCard',
|
name: 'TicketCard',
|
||||||
}).href;
|
}).href;
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
} else viewSummary(row.id, TicketSummary);
|
} else viewSummary(row.id, TicketSummary, 'lg-width');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -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: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
@ -7,8 +7,6 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
|
||||||
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
import { toDate, toCurrency, toCelsius } from 'src/filters';
|
||||||
import { toDateTimeFormat } from 'src/filters/date.js';
|
import { toDateTimeFormat } from 'src/filters/date.js';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
|
@ -252,16 +250,16 @@ async function setTravelData(travelData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const { data } = await axios.get('Warehouses', {
|
||||||
|
params: { fields: ['id', 'name'] },
|
||||||
|
});
|
||||||
|
warehouses.value = data;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
url="Warehouses"
|
|
||||||
:filter="{ fields: ['id', 'name'] }"
|
|
||||||
order="name"
|
|
||||||
@on-fetch="(data) => (warehouses = data)"
|
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<CardSummary
|
<CardSummary
|
||||||
ref="summaryRef"
|
ref="summaryRef"
|
||||||
:url="`Travels/${entityId}/getTravel`"
|
:url="`Travels/${entityId}/getTravel`"
|
||||||
|
@ -275,72 +273,68 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
<TravelDescriptorMenuItems :travel="entity" />
|
<TravelDescriptorMenuItems :travel="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QCard class="vn-one">
|
<QCard class="full-width">
|
||||||
<QCardSection class="q-pa-none">
|
<VnTitle
|
||||||
<VnTitle
|
:url="getLink('basic-data')"
|
||||||
:url="getLink('basic-data')"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
|
||||||
/>
|
|
||||||
</QCardSection>
|
|
||||||
<VnLv :label="t('globals.shipped')" :value="toDate(travel.shipped)" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('globals.warehouseOut')"
|
|
||||||
:value="travel.warehouseOut?.name"
|
|
||||||
/>
|
|
||||||
<VnRow>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('travel.basicData.isRaid')"
|
|
||||||
v-model="travel.isRaid"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('travel.summary.delivered')"
|
|
||||||
v-model="travel.isDelivered"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
</QCard>
|
|
||||||
<QCard class="vn-one">
|
|
||||||
<QCardSection class="q-pa-none">
|
|
||||||
<VnTitle
|
|
||||||
:url="getLink('basic-data')"
|
|
||||||
:text="t('globals.pageTitles.basicData')"
|
|
||||||
/>
|
|
||||||
</QCardSection>
|
|
||||||
<VnLv :label="t('globals.landed')" :value="toDate(travel.landed)" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('globals.warehouseIn')"
|
|
||||||
:value="travel.warehouseIn?.name"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('travel.basicData.daysInForward')"
|
|
||||||
:value="travel?.daysInForward"
|
|
||||||
/>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('travel.summary.received')"
|
|
||||||
v-model="travel.isReceived"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</QCard>
|
|
||||||
<QCard class="vn-one">
|
|
||||||
<QCardSection class="q-pa-none">
|
|
||||||
<VnTitle
|
|
||||||
:url="getLink('basic-data')"
|
|
||||||
:text="t('globals.pageTitles.basicData')"
|
|
||||||
/>
|
|
||||||
</QCardSection>
|
|
||||||
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />
|
|
||||||
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
|
||||||
<VnLv label="m³" :value="travel.m3" />
|
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('travel.summary.availabled')"
|
|
||||||
:value="
|
|
||||||
dashIfEmpty(toDateTimeFormat(travel.availabled))
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
<div class="vn-card-group">
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.shipped')"
|
||||||
|
:value="toDate(travel.shipped)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.warehouseOut')"
|
||||||
|
:value="travel.warehouseOut?.name"
|
||||||
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('travel.basicData.isRaid')"
|
||||||
|
v-model="travel.isRaid"
|
||||||
|
:disable="true"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('travel.summary.delivered')"
|
||||||
|
v-model="travel.isDelivered"
|
||||||
|
:disable="true"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.landed')"
|
||||||
|
:value="toDate(travel.landed)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.warehouseIn')"
|
||||||
|
:value="travel.warehouseIn?.name"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('travel.basicData.daysInForward')"
|
||||||
|
:value="travel?.daysInForward"
|
||||||
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('travel.summary.received')"
|
||||||
|
v-model="travel.isReceived"
|
||||||
|
:disable="true"
|
||||||
|
size="sm"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv :label="t('globals.agency')" :value="travel.agency?.name" />
|
||||||
|
<VnLv :label="t('globals.reference')" :value="travel.ref" />
|
||||||
|
<VnLv label="m³" :value="travel.m3" />
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.totalEntries')"
|
||||||
|
:value="travel.totalEntries"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('travel.summary.availabled')"
|
||||||
|
:value="dashIfEmpty(toDateTimeFormat(travel.availabled))"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="full-width">
|
<QCard class="full-width">
|
||||||
<VnTitle :text="t('travel.summary.entries')" />
|
<VnTitle :text="t('travel.summary.entries')" />
|
||||||
|
|
|
@ -201,7 +201,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
title: t('components.smartCard.viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, TravelSummary),
|
action: (row) => viewSummary(row.id, TravelSummary, 'lg-width'),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -48,77 +48,88 @@ onBeforeMount(async () => {
|
||||||
<WorkerDescriptorMenu :worker="entity" :is-excluded="workerExcluded" />
|
<WorkerDescriptorMenu :worker="entity" :is-excluded="workerExcluded" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: worker }">
|
<template #body="{ entity: worker }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-two">
|
||||||
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
|
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
|
||||||
<VnLv :label="t('globals.name')" :value="worker.user?.nickname" />
|
<div class="vn-card-group">
|
||||||
<VnLv :label="t('globals.department')">
|
<div class="vn-card-content">
|
||||||
<template #value>
|
<VnLv :label="t('globals.name')" :value="worker.user?.nickname" />
|
||||||
<span class="link" v-text="worker.department?.department?.name" />
|
<VnLv :label="t('globals.department')">
|
||||||
<DepartmentDescriptorProxy
|
<template #value>
|
||||||
:id="worker.department?.department?.id"
|
<span
|
||||||
|
class="link"
|
||||||
|
v-text="worker.department?.department?.name"
|
||||||
|
/>
|
||||||
|
<DepartmentDescriptorProxy
|
||||||
|
:id="worker.department?.department?.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :label="t('worker.summary.boss')" link>
|
||||||
|
<template #value>
|
||||||
|
<VnUserLink
|
||||||
|
v-if="worker.boss"
|
||||||
|
:name="dashIfEmpty(worker.boss?.name)"
|
||||||
|
:worker-id="worker.bossFk"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :value="worker.mobileExtension">
|
||||||
|
<template #label>
|
||||||
|
{{ t('worker.summary.phoneExtension') }}
|
||||||
|
<VnLinkPhone :phone-number="worker.mobileExtension" />
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :value="worker.phone">
|
||||||
|
<template #label>
|
||||||
|
{{ t('worker.summary.entPhone') }}
|
||||||
|
<VnLinkPhone :phone-number="worker.phone" />
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
<VnLv :value="advancedSummary?.client?.phone">
|
||||||
|
<template #label>
|
||||||
|
{{ t('worker.summary.personalPhone') }}
|
||||||
|
<VnLinkPhone
|
||||||
|
:phone-number="advancedSummary?.client?.phone"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
|
</div>
|
||||||
|
<div class="vn-card-content">
|
||||||
|
<VnLv
|
||||||
|
:label="t('worker.summary.fiDueDate')"
|
||||||
|
:value="toDate(advancedSummary.fiDueDate)"
|
||||||
/>
|
/>
|
||||||
</template>
|
<VnLv :label="t('worker.summary.sex')" :value="worker.sex" />
|
||||||
</VnLv>
|
<VnLv
|
||||||
<VnLv :label="t('worker.summary.boss')" link>
|
:label="t('worker.summary.seniority')"
|
||||||
<template #value>
|
:value="toDate(advancedSummary.seniority)"
|
||||||
<VnUserLink
|
|
||||||
v-if="worker.boss"
|
|
||||||
:name="dashIfEmpty(worker.boss?.name)"
|
|
||||||
:worker-id="worker.bossFk"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
<VnLv
|
||||||
</VnLv>
|
:label="t('worker.summary.fi')"
|
||||||
<VnLv :value="worker.mobileExtension">
|
:value="advancedSummary.fi"
|
||||||
<template #label>
|
/>
|
||||||
{{ t('worker.summary.phoneExtension') }}
|
<VnLv
|
||||||
<VnLinkPhone :phone-number="worker.mobileExtension" />
|
:label="t('worker.summary.birth')"
|
||||||
</template>
|
:value="toDate(advancedSummary.birth)"
|
||||||
</VnLv>
|
/>
|
||||||
<VnLv :value="worker.phone">
|
<VnLv
|
||||||
<template #label>
|
:label="t('worker.summary.isFreelance')"
|
||||||
{{ t('worker.summary.entPhone') }}
|
:value="advancedSummary.isFreelance"
|
||||||
<VnLinkPhone :phone-number="worker.phone" />
|
/>
|
||||||
</template>
|
<VnLv
|
||||||
</VnLv>
|
:label="t('worker.summary.isSsDiscounted')"
|
||||||
<VnLv :value="advancedSummary?.client?.phone">
|
:value="advancedSummary.isSsDiscounted"
|
||||||
<template #label>
|
/>
|
||||||
{{ t('worker.summary.personalPhone') }}
|
<VnLv
|
||||||
<VnLinkPhone :phone-number="advancedSummary?.client?.phone" />
|
:label="t('worker.summary.hasMachineryAuthorized')"
|
||||||
</template>
|
:value="advancedSummary.hasMachineryAuthorized"
|
||||||
</VnLv>
|
/>
|
||||||
</QCard>
|
<VnLv
|
||||||
<QCard class="vn-one" v-if="advancedSummary">
|
:label="t('worker.summary.isDisable')"
|
||||||
<VnTitle :url="basicDataUrl" :text="t('globals.summary.basicData')" />
|
:value="advancedSummary.isDisable"
|
||||||
<VnLv
|
/>
|
||||||
:label="t('worker.summary.fiDueDate')"
|
</div>
|
||||||
:value="toDate(advancedSummary.fiDueDate)"
|
</div>
|
||||||
/>
|
|
||||||
<VnLv :label="t('worker.summary.sex')" :value="worker.sex" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.seniority')"
|
|
||||||
:value="toDate(advancedSummary.seniority)"
|
|
||||||
/>
|
|
||||||
<VnLv :label="t('worker.summary.fi')" :value="advancedSummary.fi" />
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.birth')"
|
|
||||||
:value="toDate(advancedSummary.birth)"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.isFreelance')"
|
|
||||||
:value="advancedSummary.isFreelance"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.isSsDiscounted')"
|
|
||||||
:value="advancedSummary.isSsDiscounted"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.hasMachineryAuthorized')"
|
|
||||||
:value="advancedSummary.hasMachineryAuthorized"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('worker.summary.isDisable')"
|
|
||||||
:value="advancedSummary.isDisable"
|
|
||||||
/>
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :text="t('worker.summary.userData')" />
|
<VnTitle :text="t('worker.summary.userData')" />
|
||||||
|
|
|
@ -105,7 +105,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
title: t('components.smartCard.viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, WorkerSummary),
|
action: (row) => viewSummary(row.id, WorkerSummary, 'lg-width'),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -75,21 +75,30 @@ onMounted(async () => {
|
||||||
<template #body="{ entity: zone }">
|
<template #body="{ entity: zone }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :url="zoneUrl + `basic-data`" :text="t('summary.basicData')" />
|
<VnTitle :url="zoneUrl + `basic-data`" :text="t('summary.basicData')" />
|
||||||
<VnLv :label="t('list.agency')" :value="zone.agencyMode?.name" />
|
<div class="card-group">
|
||||||
<VnLv :label="t('list.price')" :value="toCurrency(zone.price)" />
|
<div class="card-content">
|
||||||
<VnLv :label="t('zone.bonus')" :value="toCurrency(zone.bonus)" />
|
<VnLv :label="t('list.agency')" :value="zone.agencyMode?.name" />
|
||||||
|
<VnLv :label="t('list.price')" :value="toCurrency(zone.price)" />
|
||||||
|
<VnLv :label="t('zone.bonus')" :value="toCurrency(zone.bonus)" />
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<VnLv
|
||||||
|
:label="t('summary.closeHour')"
|
||||||
|
:value="toTimeFormat(zone.hour)"
|
||||||
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('zone.travelingDays')"
|
||||||
|
:value="zone.travelingDays"
|
||||||
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('zone.volumetric')"
|
||||||
|
v-model="zone.isVolumetric"
|
||||||
|
:disable="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :url="zoneUrl + `basic-data`" :text="t('summary.basicData')" />
|
|
||||||
<VnLv :label="t('summary.closeHour')" :value="toTimeFormat(zone.hour)" />
|
|
||||||
<VnLv :label="t('zone.travelingDays')" :value="zone.travelingDays" />
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('zone.volumetric')"
|
|
||||||
v-model="zone.isVolumetric"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</QCard>
|
|
||||||
<QCard class="full-width">
|
|
||||||
<VnTitle :url="zoneUrl + `warehouses`" :text="t('list.warehouse')" />
|
<VnTitle :url="zoneUrl + `warehouses`" :text="t('list.warehouse')" />
|
||||||
<QTable
|
<QTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
@ -100,3 +109,15 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.card-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('InvoiceInList', () => {
|
||||||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
||||||
const firstId = `${firstRow} > td:nth-child(2) span`;
|
const firstId = `${firstRow} > td:nth-child(2) span`;
|
||||||
const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
|
const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
|
||||||
const summaryHeaders = '.summaryBody .header-link';
|
const summaryHeaders = (opt) => `.summaryBody > .${opt} > .q-pb-lg > .header-link`;
|
||||||
const mockInvoiceRef = `createMockInvoice${Math.floor(Math.random() * 100)}`;
|
const mockInvoiceRef = `createMockInvoice${Math.floor(Math.random() * 100)}`;
|
||||||
const mock = {
|
const mock = {
|
||||||
vnSupplierSelect: { val: 'farmer king', type: 'select' },
|
vnSupplierSelect: { val: 'farmer king', type: 'select' },
|
||||||
|
@ -32,8 +32,8 @@ describe('InvoiceInList', () => {
|
||||||
|
|
||||||
it('should open the details', () => {
|
it('should open the details', () => {
|
||||||
cy.get(firstDetailBtn).click();
|
cy.get(firstDetailBtn).click();
|
||||||
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
cy.get(summaryHeaders('max-width')).contains('Basic data');
|
||||||
cy.get(summaryHeaders).eq(4).contains('Vat');
|
cy.get(summaryHeaders('vat')).contains('Vat');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new Invoice', () => {
|
it('should create a new Invoice', () => {
|
||||||
|
|
|
@ -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']);
|
||||||
|
|
|
@ -3,10 +3,10 @@ describe('Ticket descriptor', () => {
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
const listItem = '[role="menu"] .q-list .q-item';
|
||||||
const toCloneOpt = 'To clone ticket';
|
const toCloneOpt = 'To clone ticket';
|
||||||
const setWeightOpt = 'Set weight';
|
const setWeightOpt = 'Set weight';
|
||||||
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
|
const warehouseValue = ':nth-child(1) > [data-cy="vnLvWarehouse"]';
|
||||||
const summaryHeader = '.summaryHeader > div';
|
const summaryHeader = '.summaryHeader > div';
|
||||||
const weight = 25;
|
const weight = 25;
|
||||||
const weightValue = '.summaryBody.row :nth-child(1) > :nth-child(9) > .value > span';
|
const weightValue = '[data-cy="vnLvWeight"]';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,11 @@ describe('UserPanel', () => {
|
||||||
cy.get(userCompany).should('have.value', 'Warehouse One').click();
|
cy.get(userCompany).should('have.value', 'Warehouse One').click();
|
||||||
|
|
||||||
//Actualizo la opción
|
//Actualizo la opción
|
||||||
cy.getOption(2);
|
cy.getOption(3);
|
||||||
|
|
||||||
//Compruebo la notificación
|
//Compruebo la notificación
|
||||||
cy.get('.q-notification').should('be.visible');
|
cy.get('.q-notification').should('be.visible');
|
||||||
cy.get(userCompany).should('have.value', 'Warehouse Two');
|
cy.get(userCompany).should('have.value', 'TestingWarehouse');
|
||||||
|
|
||||||
//Restauro el valor
|
//Restauro el valor
|
||||||
cy.get(userCompany).click();
|
cy.get(userCompany).click();
|
||||||
|
|
|
@ -20,7 +20,7 @@ describe('VnLog', () => {
|
||||||
it('should filter by entity', () => {
|
it('should filter by entity', () => {
|
||||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||||
cy.get('.q-page').click();
|
cy.get('.q-page').click();
|
||||||
cy.validateContent(chips[0], 'Claim');
|
cy.validateContent(chips[0], 'Beginning');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show claimDescriptor', () => {
|
it('should show claimDescriptor', () => {
|
||||||
|
|
|
@ -1,27 +1,25 @@
|
||||||
describe('WorkerSummary', () => {
|
describe('WorkerSummary', () => {
|
||||||
const departmentDescriptor = ':nth-child(1) > :nth-child(3) > .value > .link';
|
const department = ':nth-child(1) > [data-cy="vnLvDepartment"] > .value';
|
||||||
const roleDescriptor = ':nth-child(3) > :nth-child(4) > .value > .link';
|
const role = '[data-cy="vnLvRole"] > .value';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/worker/19/summary');
|
cy.visit('/#/worker/19/summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should load worker summary', () => {
|
it('should load worker summary and show the department', () => {
|
||||||
cy.waitForElement('.summaryHeader');
|
cy.waitForElement('.summaryHeader');
|
||||||
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss');
|
||||||
cy.get(':nth-child(1) > :nth-child(2) > .value > span').should(
|
cy.get(department).should('have.text', 'VENTAS');
|
||||||
'have.text',
|
|
||||||
'salesBossNick',
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should try descriptors', () => {
|
it('should try descriptors', () => {
|
||||||
cy.waitForElement('.summaryHeader');
|
cy.waitForElement('.summaryHeader');
|
||||||
cy.get(departmentDescriptor).click();
|
cy.get(department).click();
|
||||||
cy.get('.descriptor').should('be.visible');
|
cy.get('.descriptor').should('be.visible');
|
||||||
cy.get('.q-item > .q-item__label').should('include.text', '43');
|
cy.get('.q-item > .q-item__label').should('include.text', '43');
|
||||||
cy.get(roleDescriptor).click();
|
cy.get('.summaryBody').click();
|
||||||
|
cy.get(role).click();
|
||||||
cy.get('.descriptor').should('be.visible');
|
cy.get('.descriptor').should('be.visible');
|
||||||
cy.get('.q-item > .q-item__label').should('include.text', '19');
|
cy.get('.q-item > .q-item__label').should('include.text', '19');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue