Merge branch 'dev' into 7136_vnselectFilter_paginate
This commit is contained in:
commit
73bdad68c8
361
CHANGELOG.md
361
CHANGELOG.md
|
@ -1,3 +1,364 @@
|
|||
# Version 24.40 - 2024-10-02
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: refs #4074 admit several acls by:jorgep
|
||||
- chore: refs #4074 drop workerCreate by:jorgep
|
||||
- chore: refs #4074 fix tests by:jorgep
|
||||
- chore: refs #4074 wip replace useRole for useAcl by:jorgep
|
||||
- chore: refs #7155 remove console.log by:alexm
|
||||
- chore: refs #7155 typo by:alexm
|
||||
- chore: refs #7663 add test by:jorgep
|
||||
- chore: refs #7663 create test wip by:jorgep
|
||||
- chore: refs #7663 drop useless code (origin/7663-setWeight) by:jorgep
|
||||
- chore: refs #7828 fix e2e by:jorgep
|
||||
- feat(AccountBasicData): add twoFactorFk by:alexm
|
||||
- feat: add max rule by:Javier Segarra
|
||||
- feat: add shortcut add event in some subSections by:Javier Segarra
|
||||
- feat: add shortcut more buttons (origin/add_shortcut_add_subSections) by:Javier Segarra
|
||||
- feat: add tooltip CustomerNewCustomAgent by:Javier Segarra
|
||||
- feat: apply color when today by:Javier Segarra
|
||||
- feat: change label because its more natural by:Javier Segarra
|
||||
- feat: change order by:Javier Segarra
|
||||
- feat: change QBadge color by:Javier Segarra
|
||||
- feat: change url CustomerList by:Javier Segarra
|
||||
- feat: copy customer countryFk by:Javier Segarra
|
||||
- feat: create VnSelectEnum and add in AccountBasicData and ClaimBasicData by:alexm
|
||||
- feat: CustomerBalance by:Javier Segarra
|
||||
- feat: CustomerConsumptionFilter by:Javier Segarra
|
||||
- feat: customer consumption (origin/7830-customerDesplegables, 7830-customerDesplegables) by:alexm
|
||||
- feat: CustomerCreateTicket by:Javier Segarra
|
||||
- feat: CustomerCredit section by:Javier Segarra
|
||||
- feat: CustomerGreuges by:Javier Segarra
|
||||
- feat: CustomerSample to VnTable by:Javier Segarra
|
||||
- feat: global handler (origin/fix_global_handler, fix_global_handler) by:alexm
|
||||
- feat: goToSupplier by:Javier Segarra
|
||||
- feat: handle newValue by:Javier Segarra
|
||||
- feat: handle same multiple CP by:Javier Segarra
|
||||
- feat: hide menus on small view (origin/hideMenu) by:jorgep
|
||||
- feat: minor changes by:Javier Segarra
|
||||
- feat: orderCreateDialog by:Javier Segarra
|
||||
- feat: refs #4074 drop useless code by:jorgep
|
||||
- feat: refs #4074 useAcl in vnSelectDialog by:jorgep
|
||||
- feat: refs #6346 new wagon type section by:Jon
|
||||
- feat: refs #7404 add m3 and fix detail by:pablone
|
||||
- feat: refs #7404 add some style to the form and reorganize fields by:pablone
|
||||
- feat: refs #7404 add travel m3 to reserves form by:pablone
|
||||
- feat: refs #7404 style dynamic text color by:pablone
|
||||
- feat: refs #7404 travel m3 form by:pablone
|
||||
- feat: refs #7500 added VnImg to show files by:Jon
|
||||
- feat: refs #7663 add setWeight menu opt (wip) by:jorgep
|
||||
- feat: refs #7663 fine tunning by:jorgep
|
||||
- feat: refs #7828 create axios instance which no manage errors (origin/7828-makeCorrectCalls) by:jorgep
|
||||
- feat: refs #7828 useAcl & cherry pick mail data worker by:jorgep
|
||||
- feat: remove cli warnings by:Javier Segarra
|
||||
- feat: show preparation field by:Javier Segarra
|
||||
- feat: stateGroupedFilter by:Javier Segarra
|
||||
- feat: translations fixed by:jgallego
|
||||
- feat(TravelList): add daysOnward by:alexm
|
||||
- feat: travel m3 by:pablone
|
||||
- feat: use disableInifiniteScroll property by:Javier Segarra
|
||||
- feat: VnImg draggable by:Javier Segarra
|
||||
- feat: vnLocation changes by:Javier Segarra
|
||||
- feat: vnSelect exprBuilder by:Javier Segarra
|
||||
- fix: refs #7404 remove some style by:pablone
|
||||
- fix: refs #7404 style non center pop up (origin/7404-fixFront) by:pablone
|
||||
- fix: refs #7404 translates and some minor style fixes by:pablone
|
||||
- fix: styles by:Javier Segarra
|
||||
- perf: improve style by:Javier Segarra
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- perf: CustomerBalance by:Javier Segarra
|
||||
- perf: CustomerBasicData by:Javier Segarra
|
||||
- perf: CustomerBasicData.salesPersonFk by:Javier Segarra
|
||||
- perf: CustomerSummary by:Javier Segarra
|
||||
- perf: customerSummaryTable by:Javier Segarra
|
||||
- perf: disable card option by:Javier Segarra
|
||||
- perf: i18n by:Javier Segarra
|
||||
- perf: improve by:Javier Segarra
|
||||
- perf: improve style by:Javier Segarra
|
||||
- perf: imrpove exprBuilder by:Javier Segarra
|
||||
- perf: minor comments by:Javier Segarra
|
||||
- perf: refs #6346 previous changes by:Jon
|
||||
- perf: sendEmail customerConsumption by:Javier Segarra
|
||||
- perf: solve reload CardSummary component by:Javier Segarra
|
||||
- perf: update CustommerDescriptor by:Javier Segarra
|
||||
- refactor: refs #4074 accept array by:jorgep
|
||||
- refactor: refs #4074 rollback by:jorgep
|
||||
- refactor: refs #4074 use acl & drop useless roles by:jorgep
|
||||
- refactor: refs #4074 useAcl in navigationStore & router by:jorgep
|
||||
- refactor: refs #4074 use fn (origin/4074-useAcls) by:jorgep
|
||||
- refactor: refs #4074 use VnTitle by:jorgep
|
||||
- refactor: refs #6346 deleted front error checking by:Jon
|
||||
- refactor: refs #6346 requested changes by:Jon
|
||||
- refactor: refs #6346 wagons to VnTable by:Jon
|
||||
- refactor: refs #7500 deleted useless code by:Jon
|
||||
- refactor: refs #7500 refactor vnimg when storage is dms by:Jon
|
||||
- refactor: refs #7828 wip by:jorgep
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- chore: refs #4074 fix tests by:jorgep
|
||||
- chore: refs #7828 fix e2e by:jorgep
|
||||
- feat: refs #7404 add m3 and fix detail by:pablone
|
||||
- feat: translations fixed by:jgallego
|
||||
- fix: #5938 grouped filter by:Javier Segarra
|
||||
- fix: #6943 fix customerSummaryTable by:Javier Segarra
|
||||
- fix: #6943 show nickname salesPerson by:Javier Segarra
|
||||
- fix: address-create i18n by:Javier Segarra
|
||||
- fix: comments (origin/6943_fix_customer_module, 6943_fix_customer_module) by:Javier Segarra
|
||||
- fix: CusomerSummary to Address by:Javier Segarra
|
||||
- fix: CustomerAddress mobile by:Javier Segarra
|
||||
- fix: CustomerBillingData by:Javier Segarra
|
||||
- fix: Customerconsumption by:Javier Segarra
|
||||
- fix: customer credit opinion by:alexm
|
||||
- fix: CustomerCreditOpinion workerDescriptor by:Javier Segarra
|
||||
- fix: CustomerDescriptorAccount by:Javier Segarra
|
||||
- fix: CustomerDescriptor.bussinessTypeFk by:Javier Segarra
|
||||
- fix: CustomerFilter by:Javier Segarra
|
||||
- fix: CustomerGreuges by:Javier Segarra
|
||||
- fix: CustomerMandates by:Javier Segarra
|
||||
- fix: Customer module find salesPersons out of first get by:Javier Segarra
|
||||
- fix: CustomerRecovery transalate label by:Javier Segarra
|
||||
- fix: CustomerSamples by:Javier Segarra
|
||||
- fix: customerSummaryToTicketList button by:Javier Segarra
|
||||
- fix: CustomerWebPayment by:Javier Segarra
|
||||
- fix: CustommerSummaryTable Proxy by:Javier Segarra
|
||||
- fix: deleted code by:Jon
|
||||
- fix: duplicate code by:alexm
|
||||
- fix: emit:updateModelValue by:Javier Segarra
|
||||
- fix: fixed wagon tests by:Jon
|
||||
- fix: fix wagon list reload by:Jon
|
||||
- fix: i18n en preparation label by:Javier Segarra
|
||||
- fix: infiniteScroll by:Javier Segarra
|
||||
- fix: isFullMovable checkbox by:Javier Segarra
|
||||
- fix: merge conflicts by:Javier Segarra
|
||||
- fix: merge in dev by:alexm
|
||||
- fix: missing code by:Jon
|
||||
- fix: Options VnSelect properties by:Javier Segarra
|
||||
- fix: refs #4074 await to watch by:jorgep
|
||||
- fix: refs #4074 drop wrong acl by:jorgep
|
||||
- fix: refs #4074 workerCard data-key by:jorgep
|
||||
- fix: refs #6346 fix list and create by:pablone
|
||||
- fix: refs #6943 prevent null (origin/6943-warmfix-preventNull) by:jorgep
|
||||
- fix: refs #7155 remove userParams in watcher (7155-travel_daysOnward) by:alexm
|
||||
- fix: refs #7155 use chip-locale (origin/7155-travel_daysOnward_2, 7155-travel_daysOnward_2) by:alexm
|
||||
- fix: refs #7404 remove console.log by:pablone
|
||||
- fix: refs #7404 remove from test by:pablone
|
||||
- fix: refs #7404 remove some style by:pablone
|
||||
- fix: refs #7404 revert commit prevent production access by:pablone
|
||||
- fix: refs #7404 style non center pop up (origin/7404-fixFront) by:pablone
|
||||
- fix: refs #7404 translates and some minor style fixes by:pablone
|
||||
- fix: refs #7500 fixed e2e test by:Jon
|
||||
- fix: refs #7500 fixed showing images wrongly by:Jon
|
||||
- fix: refs #7830 customer credit by:pablone
|
||||
- fix: refs #7830 remove console.log by:pablone
|
||||
- fix: remove console.log by:pablone
|
||||
- fix: remove FetchData by:Javier Segarra
|
||||
- fix: remove FIXME (origin/6943_fix_customerSummaryTable) by:Javier Segarra
|
||||
- fix: remove print variable by:Javier Segarra
|
||||
- fix: remove promise execution by:Javier Segarra
|
||||
- fix: reset VnTable scroll properties by:Javier Segarra
|
||||
- fix: rule by:Javier Segarra
|
||||
- fix: solve conflicts from master to test by:Javier Segarra
|
||||
- fix: split params (origin/warmfix-addSearchUrl) by:jorgep
|
||||
- fix: state cell by:Javier Segarra
|
||||
- fix: stop call back event hasMoreData by:Javier Segarra
|
||||
- fix: styles by:Javier Segarra
|
||||
- fix: SupplierFiscalData VnLocation (origin/fix_supplierFD_location) by:Javier Segarra
|
||||
- fix: VnLocation test by:Javier Segarra
|
||||
- fix(VnTable): header background-color by:alexm
|
||||
- fix(VnTable): sanitizer value is defined by:carlossa
|
||||
- fix: wagon reload (origin/FixWagonRedirect) by:Jon
|
||||
- fix: workerDms filter workerFk by:alexm
|
||||
- fix(WorkerList): add type email by:alexm
|
||||
- Merge remote-tracking branch 'origin/7830-customerDesplegables' into 6943_fix_customerSummaryTable by:Javier Segarra
|
||||
- refs #7155 scopeDays fix (origin/7155-scopeDays) by:carlossa
|
||||
- revert: vnUSerLink change by:Javier Segarra
|
||||
- test: fix test (7677_vnLocation_perf) by:Javier Segarra
|
||||
|
||||
# Version 24.38 - 2024-09-17
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7323 worker changes by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7353 use Vue component nomenclature by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat(AccountConnections): use VnToken by:alexm
|
||||
- feat: add key to routerView by:Javier Segarra
|
||||
- feat: add plus shortcut in VnTable by:Javier Segarra
|
||||
- feat: add row by:Javier Segarra
|
||||
- feat: addRow withour dialog by:Javier Segarra
|
||||
- feat: apply mixin by:Javier Segarra
|
||||
- feat by:Javier Segarra
|
||||
- feat: change navBar buttons by:Javier Segarra
|
||||
- feat: dense rows by:Javier Segarra
|
||||
- feat: fields with wrong name by:jgallego
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: handle create row by:Javier Segarra
|
||||
- feat: handle dates by:Javier Segarra
|
||||
- feat: handle qCheckbox 3rd state by:Javier Segarra
|
||||
- feat: imrpove VnInputTime to set cursor at start by:Javier Segarra
|
||||
- feat: keyShortcut directive by:Javier Segarra
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: only filter by isDestiny by:Javier Segarra
|
||||
- feat: refs #211153 businessDataLinkGrafana by:robert
|
||||
- feat: refs #7129 add km start and end on create form by:pablone
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: refs #7353 add locale by:jorgep
|
||||
- feat: refs #7353 add no one opt by:jorgep
|
||||
- feat: refs #7353 add right icons by:jorgep
|
||||
- feat: refs #7353 imporve toDateFormat by:jorgep
|
||||
- feat: refs #7353 salesPerson nickname & id by:jorgep
|
||||
- feat: refs #7353 split sections by:jorgep
|
||||
- feat: refs #7847 remove reload btn by:jorgep
|
||||
- feat: refs #7847 remove reload fn by:jorgep
|
||||
- feat: refs #7889 added shortcuts to modules by:Jon
|
||||
- feat: refs #7911 added shortcut to modules by:Jon
|
||||
- feat: refuncInvoiceForm component by:jgallego
|
||||
- feat: remove duplicity by:Javier Segarra
|
||||
- feat: remove future itemFixedPrices by:Javier Segarra
|
||||
- feat: replace stickyButtons by subtoolbar by:Javier Segarra
|
||||
- feat: required validation by:Javier Segarra
|
||||
- feat: show bad dates by:Javier Segarra
|
||||
- feat: showdate icons by:Javier Segarra
|
||||
- feat: solve ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: transfer an invoice by:jgallego
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: unnecessary changes by:Javier Segarra
|
||||
- feat: update changelog (origin/7896_down_devToTest_2436) by:Javier Segarra
|
||||
- feat: updates by:Javier Segarra
|
||||
- feat: update version and changelog by:Javier Segarra
|
||||
- feat: vnInput\* by:Javier Segarra
|
||||
- feat: with VnTable by:Javier Segarra
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 feat: refresh shelving.basic-data by:Javier Segarra
|
||||
- style: show subName value by:Javier Segarra
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- perf: add v-shortcut in VnCard by:Javier Segarra
|
||||
- perf: approach by:Javier Segarra
|
||||
- perf: change directive location by:Javier Segarra
|
||||
- perf: change slots order by:Javier Segarra
|
||||
- perf: examples by:Javier Segarra
|
||||
- perf: hide icon for VnInputDate by:Javier Segarra
|
||||
- perf: improve ItemFixedPricefilterPanel by:Javier Segarra
|
||||
- perf: improve mainShrotcutMixin by:Javier Segarra
|
||||
- perf: minor clean code by:Javier Segarra
|
||||
- perf: onRowchange by:Javier Segarra
|
||||
- perf: order by by:Javier Segarra
|
||||
- perf: order components by:Javier Segarra
|
||||
- perf: refs #7889 perf shortcut test by:Jon
|
||||
- perf: remove console.log by:Javier Segarra
|
||||
- perf: remove icons in header slot by:Javier Segarra
|
||||
- perf: remove print variables by:Javier Segarra
|
||||
- perf: restore CustomerBasicData by:Javier Segarra
|
||||
- refactor: deleted useless prop by:Jon
|
||||
- refactor: deleted useless prop in FetchedTags by:Jon
|
||||
- refactor: refs #7323 drop useless code by:jorgep
|
||||
- refactor: refs #7353 clients correction by:jorgep
|
||||
- refactor: refs #7353 clients correction wip by:jorgep
|
||||
- refactor: refs #7353 ease logic by:jorgep
|
||||
- refactor: refs #7353 order correction by:jorgep
|
||||
- refactor: refs #7353 simplify code by:jorgep
|
||||
- refactor: refs #7353 tickets correction by:jorgep
|
||||
- refactor: refs #7353 use global locales by:jorgep
|
||||
- refactor: refs #7354 changed descriptor menu options by:Jon
|
||||
- refactor: refs #7354 changed icon color in table and notification when deleting a zone by:Jon
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 modified VnInputTime by:Jon
|
||||
- refactor: refs #7354 refactor deliveryPanel by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refactor: refs #7354 requested changes by:Jon
|
||||
- refactor: refs #7354 reverse deliveryPanel changes by:Jon
|
||||
- refactor: refs #7354 Zone migration changes by:Jon
|
||||
- refactor: refs #7889 deleted subtitle attr and use keyBinding instead by:Jon
|
||||
- refactor: refs #7889 modified shortcut and dashboard, and added tootlip in LeftMenu by:Jon
|
||||
- refs #6722 perf: not fetch when id not exists by:Javier Segarra
|
||||
- refs #6772 perf: change variable name by:JAVIER SEGARRA MARTINEZ
|
||||
- refs #6772 perf: use ArrayData (6772_reload_sections) by:Javier Segarra
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7283 refactor ItexDescriptor by:carlossa
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- fix: add border-top by:Javier Segarra
|
||||
- fix: added missing descriptors and small details by:Jon
|
||||
- fix branch by:carlossa
|
||||
- fix: call upsert when crudModel haschanges by:Javier Segarra
|
||||
- fix(ClaimList): fix summary by:alexm
|
||||
- fix: cli warnings by:Javier Segarra
|
||||
- fix: editTableOptions by:Javier Segarra
|
||||
- fix events and descriptor menu by:Jon
|
||||
- fix: InvoiceIn sections (origin/6772_reload_sections) by:Javier Segarra
|
||||
- fix: minor changes by:Javier Segarra
|
||||
- fix: minor error whit dates by:Javier Segarra
|
||||
- fix: module icon by:Javier Segarra
|
||||
- fix: options QDate by:Javier Segarra
|
||||
- fix: refs #6900 e2e error by:jorgep
|
||||
- fix: refs #6900 rollback by:jorgep
|
||||
- fix: refs #7353 css by:jorgep
|
||||
- fix: refs #7353 hide search param (origin/7353-warmfix-fixSearchbar) by:jorgep
|
||||
- fix: refs #7353 iron out filter by:jorgep
|
||||
- fix: refs #7353 iron out ticket table by:jorgep
|
||||
- fix: refs #7353 padding by:jorgep
|
||||
- fix: refs #7353 salesClientTable by:jorgep
|
||||
- fix: refs #7353 salesorderTable by:jorgep
|
||||
- fix: refs #7353 saleTicketMonitors by:jorgep
|
||||
- fix: refs #7353 use same datakey by:jorgep
|
||||
- fix: refs #7353 vnTable colors by:jorgep
|
||||
- fix: refs #7354 e2e tests by:Jon
|
||||
- fix: refs #7354 fix delivery days by:Jon
|
||||
- fix: refs #7354 fix list searchbar and filters by:Jon
|
||||
- fix: refs #7354 fix VnSearchbar search for zone section & finished basic tests by:Jon
|
||||
- fix: refs #7354 fix VnTable filters and agency field by:Jon
|
||||
- fix: refs #7354 fix zoneSearchbar by:Jon
|
||||
- fix: refs #7354 requested changes by:Jon
|
||||
- fix: refs #7356 colors by:jorgep
|
||||
- fix: refs #7356 create claim dialog by:jorgep
|
||||
- fix: refs #7889 fixed shortcut test by:Jon
|
||||
- fix: refs #7903 fixed ticket's search bar and keybinding tooltip by:Jon
|
||||
- fix: refs #7911 fixed shortcut and related files by:Jon
|
||||
- fix: remove condition duplicated by:Javier Segarra
|
||||
- fix: remove property by:Javier Segarra
|
||||
- fix tootltip by:carlossa
|
||||
- fix traduction by:carlossa
|
||||
- fix(VnSectionMain): add QPage by:alexm
|
||||
- fix(zone): zoneLocation and the others searchbar by:alexm
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 fix: claimPhoto reload by:Javier Segarra
|
||||
- refs #6896 fix searchbar by:carlossa
|
||||
- refs #6897 fix entry by:carlossa
|
||||
- refs #6899 fix invoiceFix by:carlossa
|
||||
- refs #6899 fix order by:carlossa
|
||||
- refs #7283 fix by:carlossa
|
||||
- refs #7283 fix ItemDescriptor warehouse by:carlossa
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7355 #7366 fix account, summary, list, travelList, tooltip by:carlossa
|
||||
- refs #7355 fix accountPrivileges by:carlossa
|
||||
- refs #7355 fix accounts, vnTable by:carlossa
|
||||
- refs #7355 fix privileges by:carlossa
|
||||
- refs #7355 fix roles filters by:carlossa
|
||||
- refs #7355 fix total by:carlossa
|
||||
- refs #7355 fix views summarys, entryList, travelList refact by:carlossa
|
||||
- refs #7366 fix travel hours by:carlossa
|
||||
- test: fix e2e by:Javier Segarra
|
||||
|
||||
# Version 24.36 - 2024-08-27
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-front",
|
||||
"version": "24.40.0",
|
||||
"version": "24.42.0",
|
||||
"description": "Salix frontend",
|
||||
"productName": "Salix",
|
||||
"author": "Verdnatura",
|
||||
|
|
|
@ -5,8 +5,10 @@ import useNotify from 'src/composables/useNotify.js';
|
|||
|
||||
const session = useSession();
|
||||
const { notify } = useNotify();
|
||||
const baseUrl = '/api/';
|
||||
|
||||
axios.defaults.baseURL = '/api/';
|
||||
axios.defaults.baseURL = baseUrl;
|
||||
const axiosNoError = axios.create({ baseURL: baseUrl });
|
||||
|
||||
const onRequest = (config) => {
|
||||
const token = session.getToken();
|
||||
|
@ -79,5 +81,7 @@ const onResponseError = (error) => {
|
|||
|
||||
axios.interceptors.request.use(onRequest, onRequestError);
|
||||
axios.interceptors.response.use(onResponse, onResponseError);
|
||||
axiosNoError.interceptors.request.use(onRequest);
|
||||
axiosNoError.interceptors.response.use(onResponse);
|
||||
|
||||
export { onRequest, onResponseError };
|
||||
export { onRequest, onResponseError, axiosNoError };
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
import { QInput } from 'quasar';
|
||||
import setDefault from './setDefault';
|
||||
|
||||
setDefault(QInput, 'dense', true);
|
|
@ -0,0 +1,4 @@
|
|||
import { QSelect } from 'quasar';
|
||||
import setDefault from './setDefault';
|
||||
|
||||
setDefault(QSelect, 'dense', true);
|
|
@ -1 +1,3 @@
|
|||
export * from './defaults/qTable';
|
||||
export * from './defaults/qInput';
|
||||
export * from './defaults/qSelect';
|
||||
|
|
|
@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers';
|
|||
import qFormMixin from './qformMixin';
|
||||
import mainShortcutMixin from './mainShortcutMixin';
|
||||
import keyShortcut from './keyShortcut';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
const { notify } = useNotify();
|
||||
|
||||
export default boot(({ app }) => {
|
||||
app.mixin(qFormMixin);
|
||||
app.mixin(mainShortcutMixin);
|
||||
app.directive('shortcut', keyShortcut);
|
||||
app.config.errorHandler = function (err) {
|
||||
console.error(err);
|
||||
notify('globals.error', 'negative', 'error');
|
||||
};
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ const customer = computed(() => state.get('customer'));
|
|||
const bankEntityFormData = reactive({
|
||||
name: null,
|
||||
bic: null,
|
||||
countryFk: customer.value.countryFk,
|
||||
countryFk: customer.value?.countryFk,
|
||||
id: null,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,35 +1,42 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSelectProvince from 'components/VnSelectProvince.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import FormModelPopup from './FormModelPopup.vue';
|
||||
|
||||
const emit = defineEmits(['onDataSaved']);
|
||||
|
||||
const $props = defineProps({
|
||||
countryFk: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
provinceSelected: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
provinces: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
|
||||
const cityFormData = reactive({
|
||||
const cityFormData = ref({
|
||||
name: null,
|
||||
provinceFk: null,
|
||||
});
|
||||
|
||||
const provincesOptions = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
cityFormData.value.provinceFk = $props.provinceSelected;
|
||||
});
|
||||
const onDataSaved = (...args) => {
|
||||
emit('onDataSaved', ...args);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
url="Provinces"
|
||||
/>
|
||||
<FormModelPopup
|
||||
:title="t('New city')"
|
||||
:subtitle="t('Please, ensure you put the correct data!')"
|
||||
|
@ -41,11 +48,16 @@ const onDataSaved = (...args) => {
|
|||
<template #form-inputs="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('Name')"
|
||||
:label="t('Names')"
|
||||
v-model="data.name"
|
||||
:rules="validate('city.name')"
|
||||
/>
|
||||
<VnSelectProvince v-model="data.provinceFk" />
|
||||
<VnSelectProvince
|
||||
:province-selected="$props.provinceSelected"
|
||||
:country-fk="$props.countryFk"
|
||||
v-model="data.provinceFk"
|
||||
:provinces="$props.provinces"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
@ -22,9 +22,11 @@ const postcodeFormData = reactive({
|
|||
townFk: null,
|
||||
});
|
||||
|
||||
const townsFetchDataRef = ref(null);
|
||||
const provincesFetchDataRef = ref(null);
|
||||
const countriesOptions = ref([]);
|
||||
const provincesOptions = ref([]);
|
||||
const townsOptions = ref([]);
|
||||
const town = ref({});
|
||||
|
||||
function onDataSaved(formData) {
|
||||
|
@ -61,26 +63,78 @@ function setTown(newTown, data) {
|
|||
}
|
||||
|
||||
async function setProvince(id, data) {
|
||||
await provincesFetchDataRef.value.fetch();
|
||||
const newProvince = provincesOptions.value.find((province) => province.id == id);
|
||||
if (!newProvince) return;
|
||||
|
||||
data.countryFk = newProvince.countryFk;
|
||||
}
|
||||
|
||||
async function onProvinceCreated(data) {
|
||||
await provincesFetchDataRef.value.fetch({
|
||||
where: { countryFk: postcodeFormData.countryFk },
|
||||
});
|
||||
postcodeFormData.provinceFk.value = data.id;
|
||||
}
|
||||
|
||||
watch(
|
||||
() => [postcodeFormData.countryFk],
|
||||
async (newCountryFk, oldValueFk) => {
|
||||
if (!!oldValueFk[0] && newCountryFk[0] !== oldValueFk[0]) {
|
||||
postcodeFormData.provinceFk = null;
|
||||
postcodeFormData.townFk = null;
|
||||
}
|
||||
if ((newCountryFk, newCountryFk !== postcodeFormData.countryFk)) {
|
||||
await provincesFetchDataRef.value.fetch({
|
||||
where: {
|
||||
countryFk: newCountryFk[0],
|
||||
},
|
||||
});
|
||||
await townsFetchDataRef.value.fetch({
|
||||
where: {
|
||||
provinceFk: {
|
||||
inq: provincesOptions.value.map(({ id }) => id),
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => postcodeFormData.provinceFk,
|
||||
async (newProvinceFk) => {
|
||||
if (newProvinceFk[0] && newProvinceFk[0] !== postcodeFormData.provinceFk) {
|
||||
await townsFetchDataRef.value.fetch({
|
||||
where: { provinceFk: newProvinceFk[0] },
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
async function handleProvinces(data) {
|
||||
provincesOptions.value = data;
|
||||
}
|
||||
async function handleTowns(data) {
|
||||
townsOptions.value = data;
|
||||
}
|
||||
async function handleCountries(data) {
|
||||
countriesOptions.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
ref="provincesFetchDataRef"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
@on-fetch="handleProvinces"
|
||||
auto-load
|
||||
url="Provinces/location"
|
||||
/>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
ref="townsFetchDataRef"
|
||||
@on-fetch="handleTowns"
|
||||
auto-load
|
||||
url="Countries"
|
||||
url="Towns/location"
|
||||
/>
|
||||
<FetchData @on-fetch="handleCountries" auto-load url="Countries" />
|
||||
<FormModelPopup
|
||||
url-create="postcodes"
|
||||
model="postcode"
|
||||
|
@ -96,18 +150,20 @@ async function setProvince(id, data) {
|
|||
:label="t('Postcode')"
|
||||
v-model="data.code"
|
||||
:rules="validate('postcode.code')"
|
||||
clearable
|
||||
/>
|
||||
<VnSelectDialog
|
||||
:label="t('City')"
|
||||
url="Towns/location"
|
||||
@update:model-value="(value) => setTown(value, data)"
|
||||
:tooltip="t('Create city')"
|
||||
v-model="data.townFk"
|
||||
:options="townsOptions"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:rules="validate('postcode.city')"
|
||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||
:emit-value="false"
|
||||
clearable
|
||||
:clearable="true"
|
||||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
|
@ -122,6 +178,9 @@ async function setProvince(id, data) {
|
|||
</template>
|
||||
<template #form>
|
||||
<CreateNewCityForm
|
||||
:country-fk="data.countryFk"
|
||||
:province-selected="data.provinceFk"
|
||||
:provinces="provincesOptions"
|
||||
@on-data-saved="
|
||||
(_, requestResponse) =>
|
||||
onCityCreated(requestResponse, data)
|
||||
|
@ -132,8 +191,13 @@ async function setProvince(id, data) {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelectProvince
|
||||
:country-fk="data.countryFk"
|
||||
:province-selected="data.provinceFk"
|
||||
@update:model-value="(value) => setProvince(value, data)"
|
||||
v-model="data.provinceFk"
|
||||
:clearable="true"
|
||||
:provinces="provincesOptions"
|
||||
@on-province-created="onProvinceCreated"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('Country')"
|
||||
|
@ -152,6 +216,7 @@ async function setProvince(id, data) {
|
|||
<i18n>
|
||||
es:
|
||||
New postcode: Nuevo código postal
|
||||
Create city: Crear población
|
||||
Please, ensure you put the correct data!: ¡Por favor, asegúrese de poner los datos correctos!
|
||||
City: Población
|
||||
Province: Provincia
|
||||
|
|
|
@ -16,7 +16,16 @@ const provinceFormData = reactive({
|
|||
name: null,
|
||||
autonomyFk: null,
|
||||
});
|
||||
|
||||
const $props = defineProps({
|
||||
countryFk: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
provinces: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const autonomiesOptions = ref([]);
|
||||
|
||||
const onDataSaved = (dataSaved, requestResponse) => {
|
||||
|
@ -31,6 +40,11 @@ const onDataSaved = (dataSaved, requestResponse) => {
|
|||
<FetchData
|
||||
@on-fetch="(data) => (autonomiesOptions = data)"
|
||||
auto-load
|
||||
:filter="{
|
||||
where: {
|
||||
countryFk: $props.countryFk,
|
||||
},
|
||||
}"
|
||||
url="Autonomies/location"
|
||||
/>
|
||||
<FormModelPopup
|
||||
|
|
|
@ -50,7 +50,7 @@ const onDataSaved = (dataSaved) => {
|
|||
model="thermograph"
|
||||
:title="t('New thermograph')"
|
||||
:form-initial-data="thermographFormData"
|
||||
@on-data-saved="onDataSaved($event)"
|
||||
@on-data-saved="(_, response) => onDataSaved(response)"
|
||||
>
|
||||
<template #form-inputs="{ data, validate }">
|
||||
<VnRow>
|
||||
|
|
|
@ -234,6 +234,8 @@ async function remove(data) {
|
|||
newData = newData.filter((form) => !ids.some((id) => id == form[pk]));
|
||||
fetch(newData);
|
||||
});
|
||||
} else {
|
||||
reset();
|
||||
}
|
||||
emit('update:selected', []);
|
||||
}
|
||||
|
|
|
@ -297,11 +297,12 @@ const removeTag = (index, params, search) => {
|
|||
/>
|
||||
</QItem>
|
||||
<QItem class="q-mt-lg">
|
||||
<QIcon
|
||||
name="add_circle"
|
||||
<QBtn
|
||||
icon="add_circle"
|
||||
shortcut="+"
|
||||
flat
|
||||
class="fill-icon-on-hover q-px-xs"
|
||||
color="primary"
|
||||
size="sm"
|
||||
@click="tagValues.push({})"
|
||||
/>
|
||||
</QItem>
|
||||
|
|
|
@ -44,7 +44,6 @@ const itemComputed = computed(() => {
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.q-item {
|
||||
min-height: 5vh;
|
||||
|
|
|
@ -24,9 +24,9 @@ const { notify } = useNotify();
|
|||
|
||||
const rectificativeTypeOptions = ref([]);
|
||||
const siiTypeInvoiceOutsOptions = ref([]);
|
||||
const inheritWarehouse = ref(true);
|
||||
const invoiceParams = reactive({
|
||||
id: $props.invoiceOutData?.id,
|
||||
inheritWarehouse: true,
|
||||
});
|
||||
const invoiceCorrectionTypesOptions = ref([]);
|
||||
|
||||
|
@ -138,7 +138,7 @@ const refund = async () => {
|
|||
<div>
|
||||
<QCheckbox
|
||||
:label="t('Inherit warehouse')"
|
||||
v-model="inheritWarehouse"
|
||||
v-model="invoiceParams.inheritWarehouse"
|
||||
/>
|
||||
<QIcon name="info" class="cursor-info q-ml-sm" size="sm">
|
||||
<QTooltip>{{ t('Inherit warehouse tooltip') }}</QTooltip>
|
||||
|
|
|
@ -13,12 +13,14 @@ import FetchData from 'components/FetchData.vue';
|
|||
import { useClipboard } from 'src/composables/useClipboard';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
import VnAvatar from './ui/VnAvatar.vue';
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
|
||||
const state = useState();
|
||||
const session = useSession();
|
||||
const router = useRouter();
|
||||
const { t, locale } = useI18n();
|
||||
const { copyText } = useClipboard();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const userLocale = computed({
|
||||
get() {
|
||||
|
@ -53,6 +55,7 @@ const user = state.getUser();
|
|||
const warehousesData = ref();
|
||||
const companiesData = ref();
|
||||
const accountBankData = ref();
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
|
||||
onMounted(async () => {
|
||||
updatePreferences();
|
||||
|
@ -70,18 +73,28 @@ function updatePreferences() {
|
|||
|
||||
async function saveDarkMode(value) {
|
||||
const query = `/UserConfigs/${user.value.id}`;
|
||||
try {
|
||||
await axios.patch(query, {
|
||||
darkMode: value,
|
||||
});
|
||||
user.value.darkMode = value;
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
}
|
||||
|
||||
async function saveLanguage(value) {
|
||||
const query = `/VnUsers/${user.value.id}`;
|
||||
try {
|
||||
await axios.patch(query, {
|
||||
lang: value,
|
||||
});
|
||||
user.value.lang = value;
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
}
|
||||
|
||||
function logout() {
|
||||
|
@ -97,11 +110,23 @@ function localUserData() {
|
|||
state.setUser(user.value);
|
||||
}
|
||||
|
||||
function saveUserData(param, value) {
|
||||
axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||
async function saveUserData(param, value) {
|
||||
try {
|
||||
await axios.post('UserConfigs/setUserConfig', { [param]: value });
|
||||
localUserData();
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
}
|
||||
const isEmployee = computed(() => useRole().isEmployee());
|
||||
}
|
||||
|
||||
const onDataSaved = () => {
|
||||
notify('globals.dataSaved', 'positive');
|
||||
};
|
||||
|
||||
const onDataError = () => {
|
||||
notify('errors.updateUserConfig', 'negative');
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -8,33 +8,55 @@ import FetchData from 'components/FetchData.vue';
|
|||
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
|
||||
|
||||
const emit = defineEmits(['onProvinceCreated']);
|
||||
const provinceFk = defineModel({ type: Number });
|
||||
watch(provinceFk, async () => await provincesFetchDataRef.value.fetch());
|
||||
const $props = defineProps({
|
||||
countryFk: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
provinceSelected: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
provinces: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
const provinceFk = defineModel({ type: Number, default: null });
|
||||
|
||||
const { validate } = useValidator();
|
||||
const { t } = useI18n();
|
||||
|
||||
const provincesOptions = ref();
|
||||
const provincesOptions = ref($props.provinces);
|
||||
provinceFk.value = $props.provinceSelected;
|
||||
const provincesFetchDataRef = ref();
|
||||
|
||||
async function onProvinceCreated(_, data) {
|
||||
await provincesFetchDataRef.value.fetch();
|
||||
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
|
||||
provinceFk.value = data.id;
|
||||
emit('onProvinceCreated', data);
|
||||
}
|
||||
async function handleProvinces(data) {
|
||||
provincesOptions.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
ref="provincesFetchDataRef"
|
||||
:filter="{ include: { relation: 'country' } }"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
:filter="{
|
||||
include: { relation: 'country' },
|
||||
where: {
|
||||
countryFk: $props.countryFk,
|
||||
},
|
||||
}"
|
||||
@on-fetch="handleProvinces"
|
||||
url="Provinces"
|
||||
/>
|
||||
<VnSelectDialog
|
||||
:label="t('Province')"
|
||||
:options="provincesOptions"
|
||||
:options="$props.provinces"
|
||||
:tooltip="t('Create province')"
|
||||
hide-selected
|
||||
v-model="provinceFk"
|
||||
:rules="validate && validate('postcode.provinceFk')"
|
||||
|
@ -49,11 +71,15 @@ async function onProvinceCreated(_, data) {
|
|||
</QItem>
|
||||
</template>
|
||||
<template #form>
|
||||
<CreateNewProvinceForm @on-data-saved="onProvinceCreated" />
|
||||
<CreateNewProvinceForm
|
||||
:country-fk="$props.countryFk"
|
||||
@on-data-saved="onProvinceCreated"
|
||||
/>
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Province: Provincia
|
||||
Create province: Crear provincia
|
||||
</i18n>
|
||||
|
|
|
@ -10,8 +10,6 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
|||
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||
import VnTableColumn from 'components/VnTable/VnColumn.vue';
|
||||
|
||||
defineExpose({ addFilter });
|
||||
|
||||
const $props = defineProps({
|
||||
column: {
|
||||
type: Object,
|
||||
|
@ -30,6 +28,9 @@ const $props = defineProps({
|
|||
default: 'params',
|
||||
},
|
||||
});
|
||||
|
||||
defineExpose({ addFilter, props: $props });
|
||||
|
||||
const model = defineModel(undefined, { required: true });
|
||||
const arrayData = useArrayData($props.dataKey, { searchUrl: $props.searchUrl });
|
||||
const columnFilter = computed(() => $props.column?.columnFilter);
|
||||
|
@ -115,11 +116,11 @@ const components = {
|
|||
rawSelect: selectComponent,
|
||||
};
|
||||
|
||||
async function addFilter(value) {
|
||||
async function addFilter(value, name) {
|
||||
value ??= undefined;
|
||||
if (value && typeof value === 'object') value = model.value;
|
||||
value = value === '' ? undefined : value;
|
||||
let field = columnFilter.value?.name ?? $props.column.name;
|
||||
let field = columnFilter.value?.name ?? $props.column.name ?? name;
|
||||
|
||||
if (columnFilter.value?.inWhere) {
|
||||
if (columnFilter.value.alias) field = columnFilter.value.alias + '.' + field;
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
const model = defineModel({ type: Object });
|
||||
const $props = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
type: [String, Boolean],
|
||||
default: '',
|
||||
},
|
||||
label: {
|
||||
|
|
|
@ -10,7 +10,7 @@ import FormModelPopup from 'components/FormModelPopup.vue';
|
|||
|
||||
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
||||
import VnTableColumn from 'components/VnTable/VnColumn.vue';
|
||||
import VnTableFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnTableChip from 'components/VnTable/VnChip.vue';
|
||||
import VnVisibleColumn from 'src/components/VnTable/VnVisibleColumn.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
|
@ -53,6 +53,10 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
bottom: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
cardClass: {
|
||||
type: String,
|
||||
default: 'flex-one',
|
||||
|
@ -69,10 +73,6 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
disableInfiniteScroll: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
hasSubToolbar: {
|
||||
type: Boolean,
|
||||
default: null,
|
||||
|
@ -101,6 +101,18 @@ const $props = defineProps({
|
|||
type: String,
|
||||
default: '90vh',
|
||||
},
|
||||
chipLocale: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
footer: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
disabledAttr: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -121,6 +133,7 @@ const showForm = ref(false);
|
|||
const splittedColumns = ref({ columns: [] });
|
||||
const columnsVisibilitySkipped = ref();
|
||||
const createForm = ref();
|
||||
const tableFilterRef = ref([]);
|
||||
|
||||
const tableModes = [
|
||||
{
|
||||
|
@ -146,7 +159,7 @@ onMounted(() => {
|
|||
quasar.platform.is.mobile && !$props.disableOption?.card
|
||||
? CARD_MODE
|
||||
: $props.defaultMode;
|
||||
stateStore.rightDrawer = true;
|
||||
stateStore.rightDrawer = quasar.screen.gt.xs;
|
||||
columnsVisibilitySkipped.value = [
|
||||
...splittedColumns.value.columns
|
||||
.filter((c) => c.visible == false)
|
||||
|
@ -196,7 +209,7 @@ function setUserParams(watchedParams, watchedOrder) {
|
|||
|
||||
function sanitizer(params) {
|
||||
for (const [key, value] of Object.entries(params)) {
|
||||
if (typeof value == 'object') {
|
||||
if (value && typeof value == 'object') {
|
||||
const param = Object.values(value)[0];
|
||||
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
||||
}
|
||||
|
@ -223,7 +236,7 @@ function splitColumns(columns) {
|
|||
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
|
||||
if ($props.isEditable && col.disable == null) col.disable = false;
|
||||
if ($props.useModel && col.columnFilter != false)
|
||||
col.columnFilter = { ...col.columnFilter, inWhere: true };
|
||||
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
||||
splittedColumns.value.columns.push(col);
|
||||
}
|
||||
// Status column
|
||||
|
@ -301,10 +314,11 @@ defineExpose({
|
|||
redirect: redirectFn,
|
||||
selected,
|
||||
CrudModelRef,
|
||||
params,
|
||||
});
|
||||
|
||||
function handleOnDataSaved(_) {
|
||||
if (_.onDataSaved) _.onDataSaved(this);
|
||||
if (_.onDataSaved) _.onDataSaved({ CrudModelRef: CrudModelRef.value });
|
||||
else $props.create.onDataSaved(_);
|
||||
}
|
||||
</script>
|
||||
|
@ -324,6 +338,13 @@ function handleOnDataSaved(_) {
|
|||
:search-url="searchUrl"
|
||||
:redirect="!!redirect"
|
||||
@set-user-params="setUserParams"
|
||||
:disable-submit-event="true"
|
||||
@remove="
|
||||
(key) =>
|
||||
tableFilterRef
|
||||
.find((f) => f.props?.column.name == key)
|
||||
?.addFilter()
|
||||
"
|
||||
>
|
||||
<template #body>
|
||||
<div
|
||||
|
@ -333,7 +354,8 @@ function handleOnDataSaved(_) {
|
|||
)"
|
||||
:key="col.id"
|
||||
>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
ref="tableFilterRef"
|
||||
:column="col"
|
||||
:data-key="$attrs['data-key']"
|
||||
v-model="params[columnName(col)]"
|
||||
|
@ -357,10 +379,15 @@ function handleOnDataSaved(_) {
|
|||
:columns="splittedColumns.columns"
|
||||
/>
|
||||
</template>
|
||||
<template #tags="{ tag, formatFn }" v-if="chipLocale">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`${chipLocale}.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</QScrollArea>
|
||||
</QDrawer>
|
||||
<!-- class in div to fix warn-->
|
||||
<CrudModel
|
||||
v-bind="$attrs"
|
||||
:class="$attrs['class'] ?? 'q-px-md'"
|
||||
|
@ -368,9 +395,7 @@ function handleOnDataSaved(_) {
|
|||
ref="CrudModelRef"
|
||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||
:search-url="searchUrl"
|
||||
:disable-infinite-scroll="
|
||||
$attrs['disableInfiniteScroll'] ? isTableMode : !disableInfiniteScroll
|
||||
"
|
||||
:disable-infinite-scroll="isTableMode"
|
||||
@save-changes="reload"
|
||||
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
||||
:auto-load="hasParams || $attrs['auto-load']"
|
||||
|
@ -390,7 +415,7 @@ function handleOnDataSaved(_) {
|
|||
card-container-class="grid-three"
|
||||
flat
|
||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||
virtual-scroll
|
||||
:virtual-scroll="isTableMode"
|
||||
@virtual-scroll="
|
||||
(event) =>
|
||||
event.index > rows.length - 2 &&
|
||||
|
@ -420,7 +445,7 @@ function handleOnDataSaved(_) {
|
|||
<QBtn
|
||||
v-if="$props.rightSearch"
|
||||
icon="filter_alt"
|
||||
class="bg-vn-section-color q-ml-md"
|
||||
class="bg-vn-section-color q-ml-sm"
|
||||
dense
|
||||
@click="stateStore.toggleRightDrawer()"
|
||||
/>
|
||||
|
@ -442,7 +467,7 @@ function handleOnDataSaved(_) {
|
|||
:search-url="searchUrl"
|
||||
/>
|
||||
</div>
|
||||
<VnTableFilter
|
||||
<VnFilter
|
||||
v-if="$props.columnSearch"
|
||||
:column="col"
|
||||
:show-title="true"
|
||||
|
@ -472,6 +497,7 @@ function handleOnDataSaved(_) {
|
|||
auto-width
|
||||
class="no-margin q-px-xs"
|
||||
:class="[getColAlign(col), col.columnClass]"
|
||||
:style="col.style"
|
||||
v-if="col.visible ?? true"
|
||||
@click.ctrl="
|
||||
($event) =>
|
||||
|
@ -500,6 +526,7 @@ function handleOnDataSaved(_) {
|
|||
:class="getColAlign(col)"
|
||||
class="sticky no-padding"
|
||||
@click="stopEventPropagation($event)"
|
||||
:style="col.style"
|
||||
>
|
||||
<QBtn
|
||||
v-for="(btn, index) of col.actions"
|
||||
|
@ -507,8 +534,12 @@ function handleOnDataSaved(_) {
|
|||
:key="index"
|
||||
:title="btn.title"
|
||||
:icon="btn.icon"
|
||||
class="q-px-sm text-primary-light"
|
||||
class="q-pa-xs"
|
||||
flat
|
||||
dense
|
||||
:class="
|
||||
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||
"
|
||||
:style="`visibility: ${
|
||||
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
||||
}`"
|
||||
|
@ -516,6 +547,29 @@ function handleOnDataSaved(_) {
|
|||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #bottom v-if="bottom">
|
||||
<slot name="bottom-table">
|
||||
<QBtn
|
||||
@click="
|
||||
() =>
|
||||
createAsDialog
|
||||
? (showForm = !showForm)
|
||||
: handleOnDataSaved(create)
|
||||
"
|
||||
class="cursor-pointer fill-icon"
|
||||
color="primary"
|
||||
icon="add_circle"
|
||||
size="md"
|
||||
round
|
||||
flat
|
||||
shortcut="+"
|
||||
:disabled="!disabledAttr"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ createForm.title }}
|
||||
</QTooltip>
|
||||
</slot>
|
||||
</template>
|
||||
<template #item="{ row, colsMap }">
|
||||
<component
|
||||
:is="$props.redirect ? 'router-link' : 'span'"
|
||||
|
@ -632,6 +686,18 @@ function handleOnDataSaved(_) {
|
|||
</QCard>
|
||||
</component>
|
||||
</template>
|
||||
<template #bottom-row="{ cols }" v-if="$props.footer">
|
||||
<QTr v-if="rows.length" style="height: 30px">
|
||||
<QTh
|
||||
v-for="col of cols.filter((cols) => cols.visible ?? true)"
|
||||
:key="col?.id"
|
||||
class="text-center"
|
||||
:class="getColAlign(col)"
|
||||
>
|
||||
<slot :name="`column-footer-${col.name}`" />
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</CrudModel>
|
||||
|
@ -646,7 +712,7 @@ function handleOnDataSaved(_) {
|
|||
icon="add"
|
||||
shortcut="+"
|
||||
/>
|
||||
<QTooltip>
|
||||
<QTooltip self="top right">
|
||||
{{ createForm?.title }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
|
@ -699,7 +765,7 @@ es:
|
|||
}
|
||||
|
||||
.bg-header {
|
||||
background-color: var(--vn-header-color);
|
||||
background-color: var(--vn-accent-color);
|
||||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
|
@ -707,18 +773,6 @@ es:
|
|||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
.q-table--dark .q-table__bottom,
|
||||
.q-table--dark thead,
|
||||
.q-table--dark tr,
|
||||
.q-table--dark th,
|
||||
.q-table--dark td {
|
||||
border-color: var(--vn-section-color);
|
||||
}
|
||||
|
||||
.q-table__container > div:first-child {
|
||||
background-color: var(--vn-page-color);
|
||||
}
|
||||
|
||||
.grid-three {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
||||
|
@ -747,10 +801,16 @@ es:
|
|||
}
|
||||
}
|
||||
|
||||
.q-table th {
|
||||
.q-table {
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__top {
|
||||
padding: 12px 0px;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
.vnTable {
|
||||
thead tr th {
|
||||
position: sticky;
|
||||
|
@ -786,6 +846,15 @@ es:
|
|||
background-color: var(--vn-section-color);
|
||||
z-index: 1;
|
||||
}
|
||||
table tbody th {
|
||||
position: relative;
|
||||
}
|
||||
tbody:nth-last-child(1) {
|
||||
@extend .bg-header;
|
||||
position: sticky;
|
||||
z-index: 2;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.vn-label-value {
|
||||
|
@ -831,4 +900,12 @@ es:
|
|||
cursor: text;
|
||||
user-select: all;
|
||||
}
|
||||
|
||||
.q-table__container {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.q-table__middle.q-virtual-scroll.q-virtual-scroll--vertical.scroll {
|
||||
background-color: var(--vn-section-color);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -135,7 +135,7 @@ onMounted(async () => {
|
|||
});
|
||||
</script>
|
||||
<template>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-md q-px-sm" dense>
|
||||
<QBtn icon="vn:visible_columns" class="bg-vn-section-color q-mr-sm q-px-sm" dense>
|
||||
<QPopupProxy ref="popupProxyRef">
|
||||
<QCard class="column q-pa-md">
|
||||
<QIcon name="info" size="sm" class="info-icon">
|
||||
|
|
|
@ -24,7 +24,9 @@ const stateStore = useStateStore();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const url = computed(() => {
|
||||
if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`;
|
||||
if (props.baseUrl) {
|
||||
return `${props.baseUrl}/${route.params.id}`;
|
||||
}
|
||||
return props.customUrl;
|
||||
});
|
||||
const searchRightDataKey = computed(() => {
|
||||
|
@ -40,8 +42,10 @@ onBeforeMount(async () => {
|
|||
try {
|
||||
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
||||
await arrayData.fetch({ append: false, updateRouter: false });
|
||||
} catch (e) {
|
||||
router.push({ name: 'WorkerList' });
|
||||
} catch {
|
||||
const { matched: matches } = router.currentRoute.value;
|
||||
const { path } = matches.at(-1);
|
||||
router.push({ path: path.replace(/:id.*/, '') });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnRow from '../ui/VnRow.vue';
|
||||
import VnInput from './VnInput.vue';
|
||||
import FetchData from '../FetchData.vue';
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
|
||||
const props = defineProps({
|
||||
submitFn: { type: Function, default: () => {} },
|
||||
askOldPass: { type: Boolean, default: false },
|
||||
});
|
||||
const emit = defineEmits(['onSubmit']);
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const form = ref();
|
||||
const changePassDialog = ref();
|
||||
const passwords = ref({ newPassword: null, repeatPassword: null });
|
||||
const requirements = ref([]);
|
||||
const isLoading = ref(false);
|
||||
|
||||
const validate = async () => {
|
||||
const { newPassword, repeatPassword, oldPassword } = passwords.value;
|
||||
|
||||
if (!newPassword) {
|
||||
notify(t('You must enter a new password'), 'negative');
|
||||
return;
|
||||
}
|
||||
if (newPassword !== repeatPassword) {
|
||||
notify(t("Passwords don't match"), 'negative');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
await props.submitFn(newPassword, oldPassword);
|
||||
emit('onSubmit');
|
||||
} catch (e) {
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
changePassDialog.value.hide();
|
||||
isLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({ show: () => changePassDialog.value.show() });
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="UserPasswords/findOne"
|
||||
auto-load
|
||||
@on-fetch="(data) => (requirements = data)"
|
||||
/>
|
||||
<QDialog ref="changePassDialog">
|
||||
<QCard style="width: 350px">
|
||||
<QCardSection>
|
||||
<slot name="header">
|
||||
<VnRow class="items-center" style="flex-direction: row">
|
||||
<span class="text-h6" v-text="t('globals.changePass')" />
|
||||
<QIcon
|
||||
class="cursor-pointer"
|
||||
name="close"
|
||||
size="xs"
|
||||
style="flex: 0"
|
||||
v-close-popup
|
||||
/>
|
||||
</VnRow>
|
||||
</slot>
|
||||
</QCardSection>
|
||||
<QForm ref="form">
|
||||
<QCardSection>
|
||||
<VnInput
|
||||
v-if="props.askOldPass"
|
||||
:label="t('Old password')"
|
||||
v-model="passwords.oldPassword"
|
||||
type="password"
|
||||
:required="true"
|
||||
autofocus
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('New password')"
|
||||
v-model="passwords.newPassword"
|
||||
type="password"
|
||||
:required="true"
|
||||
:info="
|
||||
t('passwordRequirements', {
|
||||
length: requirements.length,
|
||||
nAlpha: requirements.nAlpha,
|
||||
nUpper: requirements.nUpper,
|
||||
nDigits: requirements.nDigits,
|
||||
nPunct: requirements.nPunct,
|
||||
})
|
||||
"
|
||||
autofocus
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
:label="t('Repeat password')"
|
||||
v-model="passwords.repeatPassword"
|
||||
type="password"
|
||||
/>
|
||||
</QCardSection>
|
||||
</QForm>
|
||||
<QCardActions>
|
||||
<slot name="actions">
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
:label="t('globals.cancel')"
|
||||
class="q-ml-sm"
|
||||
color="primary"
|
||||
flat
|
||||
type="reset"
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:loading="isLoading"
|
||||
:label="t('globals.confirm')"
|
||||
color="primary"
|
||||
@click="validate"
|
||||
/>
|
||||
</slot>
|
||||
</QCardActions>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
New password: Nueva contraseña
|
||||
Repeat password: Repetir contraseña
|
||||
You must enter a new password: Debes introducir la nueva contraseña
|
||||
Passwords don't match: Las contraseñas no coinciden
|
||||
</i18n>
|
|
@ -17,17 +17,15 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
let mixed;
|
||||
const componentArray = computed(() => {
|
||||
if (typeof $props.prop === 'object') return [$props.prop];
|
||||
return $props.prop;
|
||||
});
|
||||
|
||||
function mix(toComponent) {
|
||||
if (mixed) return mixed;
|
||||
const { component, attrs, event } = toComponent;
|
||||
const customComponent = $props.components[component];
|
||||
mixed = {
|
||||
return {
|
||||
component: customComponent?.component ?? component,
|
||||
attrs: {
|
||||
...toValueAttrs(attrs),
|
||||
|
@ -37,7 +35,6 @@ function mix(toComponent) {
|
|||
},
|
||||
event: { ...customComponent?.event, ...event },
|
||||
};
|
||||
return mixed;
|
||||
}
|
||||
|
||||
function toValueAttrs(attrs) {
|
||||
|
|
|
@ -400,7 +400,14 @@ defineExpose({
|
|||
/>
|
||||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn fab color="primary" icon="add" @click="showFormDialog()" class="fill-icon">
|
||||
<QBtn
|
||||
fab
|
||||
color="primary"
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
@click="showFormDialog()"
|
||||
class="fill-icon"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Upload file') }}
|
||||
</QTooltip>
|
||||
|
|
|
@ -67,9 +67,13 @@ const mixinRules = [
|
|||
requiredFieldRule,
|
||||
...($attrs.rules ?? []),
|
||||
(val) => {
|
||||
const { min } = vnInputRef.value.$attrs;
|
||||
const { min, max } = vnInputRef.value.$attrs;
|
||||
if (!min) return null;
|
||||
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
||||
if (!max) return null;
|
||||
if (max > 0) {
|
||||
if (Math.floor(val) > max) return t('inputMax', { value: max });
|
||||
}
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
@ -99,6 +103,7 @@ const mixinRules = [
|
|||
@click="
|
||||
() => {
|
||||
value = null;
|
||||
vnInputRef.focus();
|
||||
emit('remove');
|
||||
}
|
||||
"
|
||||
|
@ -116,8 +121,10 @@ const mixinRules = [
|
|||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
inputMax: Must be less than {value}
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
inputMax: Debe ser menor a {value}
|
||||
</i18n>
|
||||
<style lang="scss">
|
||||
.q-field__append {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { onMounted, watch, computed, ref } from 'vue';
|
||||
import { date } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useAttrs } from 'vue';
|
||||
|
||||
const model = defineModel({ type: [String, Date] });
|
||||
const $props = defineProps({
|
||||
|
@ -14,29 +15,20 @@ const $props = defineProps({
|
|||
default: true,
|
||||
},
|
||||
});
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
const { validations } = useValidator();
|
||||
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const vnInputDateRef = ref(null);
|
||||
|
||||
const dateFormat = 'DD/MM/YYYY';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
const mask = ref();
|
||||
const $attrs = useAttrs();
|
||||
|
||||
onMounted(() => {
|
||||
// fix quasar bug
|
||||
mask.value = '##/##/####';
|
||||
});
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return $props.isOutlined
|
||||
? {
|
||||
dense: true,
|
||||
outlined: true,
|
||||
rounded: true,
|
||||
}
|
||||
: {};
|
||||
});
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
|
||||
const formattedDate = computed({
|
||||
get() {
|
||||
|
@ -48,16 +40,13 @@ const formattedDate = computed({
|
|||
let newDate;
|
||||
if (value) {
|
||||
// parse input
|
||||
if (value.includes('/')) {
|
||||
if (value.length == 6) value = value + new Date().getFullYear();
|
||||
if (value.length >= 10) {
|
||||
if (value.includes('/') && value.length >= 10) {
|
||||
if (value.at(2) == '/') value = value.split('/').reverse().join('/');
|
||||
value = date.formatDate(
|
||||
new Date(value).toISOString(),
|
||||
'YYYY-MM-DDTHH:mm:ss.SSSZ'
|
||||
);
|
||||
}
|
||||
}
|
||||
const [year, month, day] = value.split('-').map((e) => parseInt(e));
|
||||
newDate = new Date(year, month - 1, day);
|
||||
if (model.value) {
|
||||
|
@ -79,26 +68,41 @@ const formattedDate = computed({
|
|||
const popupDate = computed(() =>
|
||||
model.value ? date.formatDate(new Date(model.value), 'YYYY/MM/DD') : model.value
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
// fix quasar bug
|
||||
mask.value = '##/##/####';
|
||||
});
|
||||
watch(
|
||||
() => model.value,
|
||||
(val) => (formattedDate.value = val),
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const styleAttrs = computed(() => {
|
||||
return $props.isOutlined
|
||||
? {
|
||||
dense: true,
|
||||
outlined: true,
|
||||
rounded: true,
|
||||
}
|
||||
: {};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
ref="vnInputDateRef"
|
||||
v-model="formattedDate"
|
||||
class="vn-input-date"
|
||||
:mask="mask"
|
||||
placeholder="dd/mm/aaaa"
|
||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
:clearable="false"
|
||||
@click="isPopupOpen = true"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
|
@ -111,6 +115,7 @@ watch(
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputDateRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import { computed, ref, useAttrs } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { date } from 'quasar';
|
||||
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
const { validations } = useValidator();
|
||||
const $attrs = useAttrs();
|
||||
const model = defineModel({ type: String });
|
||||
const props = defineProps({
|
||||
timeOnly: {
|
||||
|
@ -14,10 +16,11 @@ const props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
const vnInputTimeRef = ref(null);
|
||||
const initialDate = ref(model.value ?? Date.vnNew());
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');
|
||||
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
const dateFormat = 'HH:mm';
|
||||
const isPopupOpen = ref();
|
||||
const hover = ref();
|
||||
|
@ -67,6 +70,7 @@ function dateToTime(newDate) {
|
|||
<template>
|
||||
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<QInput
|
||||
ref="vnInputTimeRef"
|
||||
class="vn-input-time"
|
||||
mask="##:##"
|
||||
placeholder="--:--"
|
||||
|
@ -74,9 +78,10 @@ function dateToTime(newDate) {
|
|||
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||
:class="{ required: $attrs.required }"
|
||||
style="min-width: 100px"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
@click="isPopupOpen = false"
|
||||
type="time"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #append>
|
||||
<QIcon
|
||||
|
@ -89,6 +94,7 @@ function dateToTime(newDate) {
|
|||
!$attrs.disable
|
||||
"
|
||||
@click="
|
||||
vnInputTimeRef.focus();
|
||||
model = null;
|
||||
isPopupOpen = false;
|
||||
"
|
||||
|
|
|
@ -2,21 +2,69 @@
|
|||
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
||||
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { ref } from 'vue';
|
||||
const { t } = useI18n();
|
||||
const value = defineModel({ type: [String, Number, Object] });
|
||||
const emit = defineEmits(['update:model-value', 'update:options']);
|
||||
|
||||
const props = defineProps({
|
||||
location: {
|
||||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const locationProperties = [
|
||||
'postcode',
|
||||
(obj) =>
|
||||
obj.city
|
||||
? `${obj.city}${obj.province?.name ? `(${obj.province.name})` : ''}`
|
||||
: null,
|
||||
(obj) => obj.country?.name,
|
||||
];
|
||||
|
||||
const formatLocation = (obj, properties) => {
|
||||
const parts = properties.map((prop) => {
|
||||
if (typeof prop === 'string') {
|
||||
return obj[prop];
|
||||
} else if (typeof prop === 'function') {
|
||||
return prop(obj);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
const filteredParts = parts.filter(
|
||||
(part) => part !== null && part !== undefined && part !== ''
|
||||
);
|
||||
|
||||
return filteredParts.join(', ');
|
||||
};
|
||||
|
||||
const modelValue = ref(
|
||||
props.location ? formatLocation(props.location, locationProperties) : null
|
||||
);
|
||||
|
||||
function showLabel(data) {
|
||||
return `${data.code} - ${data.town}(${data.province}), ${data.country}`;
|
||||
const dataProperties = [
|
||||
'code',
|
||||
(obj) => (obj.town ? `${obj.town}(${obj.province})` : null),
|
||||
'country',
|
||||
];
|
||||
return formatLocation(data, dataProperties);
|
||||
}
|
||||
|
||||
const handleModelValue = (data) => {
|
||||
emit('update:model-value', data);
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnSelectDialog
|
||||
v-model="value"
|
||||
option-value="code"
|
||||
v-model="modelValue"
|
||||
option-filter-value="search"
|
||||
:option-label="(opt) => showLabel(opt)"
|
||||
:option-label="
|
||||
(opt) => (typeof modelValue === 'string' ? modelValue : showLabel(opt))
|
||||
"
|
||||
url="Postcodes/filter"
|
||||
@update:model-value="handleModelValue"
|
||||
:use-like="false"
|
||||
:label="t('Location')"
|
||||
:placeholder="t('search_by_postalcode')"
|
||||
|
@ -25,9 +73,17 @@ function showLabel(data) {
|
|||
v-bind="$attrs"
|
||||
clearable
|
||||
:emit-value="false"
|
||||
:tooltip="t('Create new location')"
|
||||
>
|
||||
<template #form>
|
||||
<CreateNewPostcode @on-data-saved="(newValue) => (value = newValue)" />
|
||||
<CreateNewPostcode
|
||||
@on-data-saved="
|
||||
(newValue) => {
|
||||
modelValue = newValue;
|
||||
emit('update:model-value', newValue);
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
|
@ -50,7 +106,9 @@ function showLabel(data) {
|
|||
<i18n>
|
||||
en:
|
||||
search_by_postalcode: Search by postalcode, town, province or country
|
||||
Create new location: Create new location
|
||||
es:
|
||||
Location: Ubicación
|
||||
Create new location: Crear nueva ubicación
|
||||
search_by_postalcode: Buscar por código postal, ciudad o país
|
||||
</i18n>
|
||||
|
|
|
@ -406,6 +406,7 @@ watch(
|
|||
:skeleton="false"
|
||||
auto-load
|
||||
@on-fetch="setLogTree"
|
||||
search-url="logs"
|
||||
>
|
||||
<template #body>
|
||||
<div
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import LeftMenu from 'components/LeftMenu.vue';
|
||||
import { onMounted } from 'vue';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const $props = defineProps({
|
||||
|
@ -10,7 +11,9 @@ const $props = defineProps({
|
|||
default: true,
|
||||
},
|
||||
});
|
||||
onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
||||
onMounted(
|
||||
() => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false)
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -20,6 +23,8 @@ onMounted(() => (stateStore.leftDrawer = $props.leftDrawer));
|
|||
</QScrollArea>
|
||||
</QDrawer>
|
||||
<QPageContainer>
|
||||
<RouterView></RouterView>
|
||||
<QPage>
|
||||
<RouterView />
|
||||
</QPage>
|
||||
</QPageContainer>
|
||||
</template>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<script setup>
|
||||
import { ref, toRefs, computed, watch, onMounted } from 'vue';
|
||||
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { useAttrs } from 'vue';
|
||||
// import FetchData from 'src/components/FetchData.vue';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -43,6 +44,10 @@ const $props = defineProps({
|
|||
type: [Array],
|
||||
default: () => [],
|
||||
},
|
||||
exprBuilder: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
isClearable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -88,10 +93,11 @@ const $props = defineProps({
|
|||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const { validations } = useValidator();
|
||||
const requiredFieldRule = (val) => validations().required($attrs.required, val);
|
||||
const $attrs = useAttrs();
|
||||
const { t } = useI18n();
|
||||
const requiredFieldRule = (val) => val ?? t('globals.fieldRequired');
|
||||
|
||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||
const { optionLabel, optionValue, optionFilter, optionFilterValue, options, modelValue } =
|
||||
toRefs($props);
|
||||
const myOptions = ref($props.options);
|
||||
|
@ -185,6 +191,7 @@ async function fetchFilter(val) {
|
|||
}, {});
|
||||
} else defaultWhere = { [key]: getVal(val) };
|
||||
const where = { ...(val ? defaultWhere : {}), ...$props.where };
|
||||
$props.exprBuilder && Object.assign(where, $props.exprBuilder(key, val));
|
||||
const fetchOptions = { where, include, limit };
|
||||
if (fields) fetchOptions.fields = fields;
|
||||
if (sortBy) fetchOptions.order = sortBy;
|
||||
|
@ -279,8 +286,9 @@ async function onScroll({ to, direction, from, index }) {
|
|||
ref="vnSelectRef"
|
||||
lazy-rules
|
||||
:class="{ required: $attrs.required }"
|
||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||
:rules="mixinRules"
|
||||
virtual-scroll-slice-size="options.length"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-if="isClearable" #append>
|
||||
<QIcon
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { useRole } from 'src/composables/useRole';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<script setup>
|
||||
import { onBeforeMount, ref, useAttrs } from 'vue';
|
||||
import axios from 'axios';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
|
||||
const { schema, table, column, translation, defaultOptions } = defineProps({
|
||||
schema: {
|
||||
type: String,
|
||||
default: 'vn',
|
||||
},
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
column: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
translation: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
defaultOptions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const $attrs = useAttrs();
|
||||
const options = ref([]);
|
||||
onBeforeMount(async () => {
|
||||
options.value = [].concat(defaultOptions);
|
||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||
params: { schema, table, column },
|
||||
});
|
||||
|
||||
for (const value of data)
|
||||
options.value.push({
|
||||
[$attrs['option-value'] ?? 'id']: value,
|
||||
[$attrs['option-label'] ?? 'name']: translation ? translation(value) : value,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSelect
|
||||
v-bind="$attrs"
|
||||
:options="options"
|
||||
:key="options.length"
|
||||
:input-debounce="0"
|
||||
/>
|
||||
</template>
|
|
@ -47,6 +47,7 @@ let store;
|
|||
let entity;
|
||||
const isLoading = ref(false);
|
||||
const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
|
||||
const menuRef = ref();
|
||||
defineExpose({ getData });
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
@ -170,7 +171,7 @@ const toModule = computed(() =>
|
|||
<QTooltip>
|
||||
{{ t('components.cardDescriptor.moreOptions') }}
|
||||
</QTooltip>
|
||||
<QMenu ref="menuRef">
|
||||
<QMenu :ref="menuRef">
|
||||
<QList>
|
||||
<slot name="menu" :entity="entity" :menu-ref="menuRef" />
|
||||
</QList>
|
||||
|
|
|
@ -31,7 +31,7 @@ const dialog = ref(null);
|
|||
<div class="container order-catalog-item overflow-hidden">
|
||||
<QCard class="card shadow-6">
|
||||
<div class="img-wrapper">
|
||||
<VnImg :id="item.id" class="image" />
|
||||
<VnImg :id="item.id" class="image" zoom-resolution="1600x900" />
|
||||
<div v-if="item.hex && isCatalog" class="item-color-container">
|
||||
<div
|
||||
class="item-color"
|
||||
|
|
|
@ -3,7 +3,6 @@ import { onMounted, ref, computed, watch } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { date } from 'quasar';
|
||||
import toDate from 'filters/toDate';
|
||||
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
|
||||
|
||||
|
@ -186,7 +185,6 @@ async function remove(key) {
|
|||
}
|
||||
|
||||
function formatValue(value) {
|
||||
if (value instanceof Date) return date.formatDate(value, 'DD/MM/YYYY');
|
||||
if (typeof value === 'boolean') return value ? t('Yes') : t('No');
|
||||
if (isNaN(value) && !isNaN(Date.parse(value))) return toDate(value);
|
||||
|
||||
|
@ -213,7 +211,7 @@ function sanitizer(params) {
|
|||
icon="search"
|
||||
@click="search()"
|
||||
></QBtn>
|
||||
<QForm @submit="search" id="filterPanelForm">
|
||||
<QForm @submit="search" id="filterPanelForm" @keyup.enter="search()">
|
||||
<QList dense>
|
||||
<QItem class="q-mt-xs">
|
||||
<QItemSection top>
|
||||
|
|
|
@ -56,7 +56,7 @@ const props = defineProps({
|
|||
},
|
||||
offset: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
default: undefined,
|
||||
},
|
||||
skeleton: {
|
||||
type: Boolean,
|
||||
|
@ -119,10 +119,9 @@ watch(
|
|||
);
|
||||
|
||||
watch(
|
||||
() => [props.url, props.filter, props.userParams],
|
||||
([url, filter, userParams]) => mounted.value && fetch({ url, filter, userParams })
|
||||
() => [props.url, props.filter],
|
||||
([url, filter]) => mounted.value && fetch({ url, filter })
|
||||
);
|
||||
|
||||
const addFilter = async (filter, params) => {
|
||||
await arrayData.addFilter({ filter, params });
|
||||
};
|
||||
|
@ -131,9 +130,8 @@ async function fetch(params) {
|
|||
useArrayData(props.dataKey, params);
|
||||
arrayData.reset(['filter.skip', 'skip']);
|
||||
await arrayData.fetch({ append: false });
|
||||
if (!store.hasMoreData) {
|
||||
isLoading.value = false;
|
||||
}
|
||||
if (!store.hasMoreData) isLoading.value = false;
|
||||
|
||||
emit('onFetch', store.data);
|
||||
return store.data;
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ async function search() {
|
|||
...Object.fromEntries(staticParams),
|
||||
search: searchText.value,
|
||||
},
|
||||
...{ filter: props.filter },
|
||||
};
|
||||
|
||||
if (props.whereFilter) {
|
||||
|
|
|
@ -26,7 +26,8 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
const params = JSON.parse(query[searchUrl]);
|
||||
const filter = params?.filter && JSON.parse(params?.filter ?? '{}');
|
||||
delete params.filter;
|
||||
store.userParams = { ...params, ...store.userParams };
|
||||
|
||||
store.userParams = { ...store.userParams, ...params };
|
||||
store.userFilter = { ...filter, ...store.userFilter };
|
||||
if (filter?.order) store.order = filter.order;
|
||||
}
|
||||
|
@ -113,7 +114,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
for (const row of response.data) store.data.push(row);
|
||||
} else {
|
||||
store.data = response.data;
|
||||
if (!document.querySelectorAll('[role="dialog"]').length)
|
||||
if (!document.querySelectorAll('[role="dialog"][aria-modal="true"]').length)
|
||||
updateRouter && updateStateParams();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
import { useSession } from './useSession';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
export function usePrintService() {
|
||||
const quasar = useQuasar();
|
||||
const { t } = useI18n();
|
||||
|
||||
const { getTokenMultimedia } = useSession();
|
||||
|
||||
function sendEmail(path, params) {
|
||||
return axios.post(path, params).then(() =>
|
||||
quasar.notify({
|
||||
message: 'Notification sent',
|
||||
message: t('globals.notificationSent'),
|
||||
type: 'positive',
|
||||
icon: 'check',
|
||||
})
|
||||
|
|
|
@ -268,6 +268,7 @@ input::-webkit-inner-spin-button {
|
|||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.edit-photo-btn {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
|
@ -280,3 +281,10 @@ input::-webkit-inner-spin-button {
|
|||
color: var(--vn-label-color);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.q-date {
|
||||
&__today {
|
||||
border: 2px solid $info;
|
||||
color: $info;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ $color-font-secondary: #777;
|
|||
.bg-success {
|
||||
background-color: $positive;
|
||||
}
|
||||
|
||||
.bg-notice {
|
||||
background-color: $info;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ export default function toHour(date) {
|
|||
if (!isValidDate(date)) {
|
||||
return '--:--';
|
||||
}
|
||||
return (new Date(date || '')).toLocaleTimeString([], {
|
||||
return new Date(date || '').toLocaleTimeString([], {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
|
|
|
@ -50,6 +50,7 @@ globals:
|
|||
summary:
|
||||
basicData: Basic data
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
today: Today
|
||||
yesterday: Yesterday
|
||||
dateFormat: en-GB
|
||||
|
@ -103,13 +104,16 @@ globals:
|
|||
ticket: Ticket
|
||||
campaign: Campaign
|
||||
weight: Weight
|
||||
error: Ups! Something went wrong
|
||||
recalc: Recalculate
|
||||
pageTitles:
|
||||
logIn: Login
|
||||
addressEdit: Update address
|
||||
summary: Summary
|
||||
basicData: Basic data
|
||||
log: Logs
|
||||
parkingList: Parkings list
|
||||
agencyList: Agencies list
|
||||
agencyList: Agencies
|
||||
agency: Agency
|
||||
workCenters: Work centers
|
||||
modes: Modes
|
||||
|
@ -133,7 +137,7 @@ globals:
|
|||
fiscalData: Fiscal data
|
||||
billingData: Billing data
|
||||
consignees: Consignees
|
||||
'address-create': New address
|
||||
address-create: New address
|
||||
notes: Notes
|
||||
credits: Credits
|
||||
greuges: Greuges
|
||||
|
@ -157,6 +161,7 @@ globals:
|
|||
dms: File management
|
||||
entryCreate: New entry
|
||||
latestBuys: Latest buys
|
||||
reserves: Reserves
|
||||
tickets: Tickets
|
||||
ticketCreate: New Tickets
|
||||
boxing: Boxing
|
||||
|
@ -204,7 +209,7 @@ globals:
|
|||
roadmap: Roadmap
|
||||
stops: Stops
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
cmrsList: CMRs
|
||||
RouteList: List
|
||||
routeCreate: New route
|
||||
RouteRoadmap: Roadmaps
|
||||
|
@ -270,6 +275,8 @@ globals:
|
|||
clientsActionsMonitor: Clients and actions
|
||||
serial: Serial
|
||||
medical: Mutual
|
||||
RouteExtendedList: Router
|
||||
wasteRecalc: Waste recaclulate
|
||||
supplier: Supplier
|
||||
created: Created
|
||||
worker: Worker
|
||||
|
@ -285,12 +292,30 @@ globals:
|
|||
createInvoiceIn: Create invoice in
|
||||
myAccount: My account
|
||||
noOne: No one
|
||||
maxTemperature: Max
|
||||
minTemperature: Min
|
||||
params:
|
||||
id: ID
|
||||
clientFk: Client id
|
||||
salesPersonFk: Sales person
|
||||
warehouseFk: Warehouse
|
||||
provinceFk: Province
|
||||
from: From
|
||||
To: To
|
||||
stateFk: State
|
||||
departmentFk: Department
|
||||
email: Email
|
||||
SSN: SSN
|
||||
fi: FI
|
||||
changePass: Change password
|
||||
deleteConfirmTitle: Delete selected elements
|
||||
errors:
|
||||
statusUnauthorized: Access denied
|
||||
statusInternalServerError: An internal server error has ocurred
|
||||
statusBadGateway: It seems that the server has fall down
|
||||
statusGatewayTimeout: Could not contact the server
|
||||
userConfig: Error fetching user config
|
||||
updateUserConfig: Error updating user config
|
||||
tokenConfig: Error fetching token config
|
||||
writeRequest: The requested operation could not be completed
|
||||
login:
|
||||
|
@ -484,6 +509,8 @@ ticket:
|
|||
warehouse: Warehouse
|
||||
customerCard: Customer card
|
||||
alias: Alias
|
||||
ticketList: Ticket List
|
||||
newOrder: New Order
|
||||
boxing:
|
||||
expedition: Expedition
|
||||
item: Item
|
||||
|
@ -505,6 +532,7 @@ ticket:
|
|||
landed: Landed
|
||||
consigneePhone: Consignee phone
|
||||
consigneeMobile: Consignee mobile
|
||||
consigneeAddress: Consignee address
|
||||
clientPhone: Client phone
|
||||
clientMobile: Client mobile
|
||||
consignee: Consignee
|
||||
|
@ -534,6 +562,11 @@ ticket:
|
|||
weight: Weight
|
||||
goTo: Go to
|
||||
summaryAmount: Summary
|
||||
purchaseRequest: Purchase request
|
||||
service: Service
|
||||
description: Description
|
||||
attender: Attender
|
||||
ok: Ok
|
||||
create:
|
||||
client: Client
|
||||
address: Address
|
||||
|
@ -557,7 +590,6 @@ invoiceOut:
|
|||
client: Client
|
||||
company: Company
|
||||
customerCard: Customer card
|
||||
ticketList: Ticket List
|
||||
summary:
|
||||
issued: Issued
|
||||
created: Created
|
||||
|
@ -783,14 +815,14 @@ worker:
|
|||
bankEntity: Swift / BIC
|
||||
formation:
|
||||
tableVisibleColumns:
|
||||
course: Curso
|
||||
startDate: Fecha Inicio
|
||||
endDate: Fecha Fin
|
||||
center: Centro Formación
|
||||
invoice: Factura
|
||||
amount: Importe
|
||||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
course: Course
|
||||
startDate: Start date
|
||||
endDate: End date
|
||||
center: Training center
|
||||
invoice: Invoice
|
||||
amount: Amount
|
||||
remark: Remark
|
||||
hasDiploma: Has diploma
|
||||
medical:
|
||||
tableVisibleColumns:
|
||||
date: Date
|
||||
|
@ -847,34 +879,7 @@ wagon:
|
|||
minHeightBetweenTrays: 'The minimum height between trays is '
|
||||
maxWagonHeight: 'The maximum height of the wagon is '
|
||||
uncompleteTrays: There are incomplete trays
|
||||
route:
|
||||
pageTitles:
|
||||
agency: Agency List
|
||||
routes: Routes
|
||||
cmrsList: CMRs list
|
||||
RouteList: List
|
||||
routeCreate: New route
|
||||
basicData: Basic Data
|
||||
summary: Summary
|
||||
RouteRoadmap: Roadmaps
|
||||
RouteRoadmapCreate: Create roadmap
|
||||
tickets: Tickets
|
||||
log: Log
|
||||
autonomous: Autonomous
|
||||
cmr:
|
||||
list:
|
||||
results: results
|
||||
cmrFk: CMR id
|
||||
hasCmrDms: Attached in gestdoc
|
||||
'true': 'Yes'
|
||||
'false': 'No'
|
||||
ticketFk: Ticketd id
|
||||
routeFk: Route id
|
||||
country: Country
|
||||
clientFk: Client id
|
||||
shipped: Preparation date
|
||||
viewCmr: View CMR
|
||||
downloadCmrs: Download CMRs
|
||||
|
||||
supplier:
|
||||
list:
|
||||
payMethod: Pay method
|
||||
|
@ -890,6 +895,7 @@ supplier:
|
|||
account: Account
|
||||
payMethod: Pay Method
|
||||
payDay: Pay Day
|
||||
country: Country
|
||||
summary:
|
||||
responsible: Responsible
|
||||
notes: Notes
|
||||
|
@ -988,6 +994,7 @@ travel:
|
|||
warehouseOut: Warehouse out
|
||||
totalEntries: Total entries
|
||||
totalEntriesTooltip: Total entries
|
||||
daysOnward: Landed days onwards
|
||||
summary:
|
||||
confirmed: Confirmed
|
||||
entryId: Entry Id
|
||||
|
@ -1063,7 +1070,7 @@ item:
|
|||
producer: Producer
|
||||
landed: Landed
|
||||
fixedPrice:
|
||||
itemId: Item ID
|
||||
itemFk: Item ID
|
||||
groupingPrice: Grouping price
|
||||
packingPrice: Packing price
|
||||
hasMinPrice: Has min price
|
||||
|
|
|
@ -49,6 +49,7 @@ globals:
|
|||
summary:
|
||||
basicData: Datos básicos
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
today: Hoy
|
||||
yesterday: Ayer
|
||||
dateFormat: es-ES
|
||||
|
@ -63,7 +64,7 @@ globals:
|
|||
shipped: F. envío
|
||||
totalEntries: Ent. totales
|
||||
amount: Importe
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
download: Descargar
|
||||
downloadPdf: Descargar PDF
|
||||
selectRows: 'Seleccionar las { numberRows } filas(s)'
|
||||
|
@ -105,13 +106,16 @@ globals:
|
|||
ticket: Ticket
|
||||
campaign: Campaña
|
||||
weight: Peso
|
||||
error: ¡Ups! Algo salió mal
|
||||
recalc: Recalcular
|
||||
pageTitles:
|
||||
logIn: Inicio de sesión
|
||||
addressEdit: Modificar consignatario
|
||||
summary: Resumen
|
||||
basicData: Datos básicos
|
||||
log: Historial
|
||||
parkingList: Listado de parkings
|
||||
agencyList: Listado de agencias
|
||||
agencyList: Agencias
|
||||
agency: Agencia
|
||||
workCenters: Centros de trabajo
|
||||
modes: Modos
|
||||
|
@ -160,6 +164,7 @@ globals:
|
|||
dms: Gestión documental
|
||||
entryCreate: Nueva entrada
|
||||
latestBuys: Últimas compras
|
||||
reserves: Reservas
|
||||
tickets: Tickets
|
||||
ticketCreate: Nuevo ticket
|
||||
boxing: Encajado
|
||||
|
@ -208,12 +213,13 @@ globals:
|
|||
roadmap: Troncales
|
||||
stops: Paradas
|
||||
routes: Rutas
|
||||
cmrsList: Listado de CMRs
|
||||
cmrsList: CMRs
|
||||
RouteList: Listado
|
||||
routeCreate: Nueva ruta
|
||||
RouteRoadmap: Troncales
|
||||
RouteRoadmapCreate: Crear troncal
|
||||
autonomous: Autónomos
|
||||
RouteExtendedList: Enrutador
|
||||
suppliers: Proveedores
|
||||
supplier: Proveedor
|
||||
supplierCreate: Nuevo proveedor
|
||||
|
@ -264,7 +270,7 @@ globals:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
ldap: LDAP
|
||||
samba: Samba
|
||||
twoFactor: Doble factor
|
||||
|
@ -274,6 +280,7 @@ globals:
|
|||
clientsActionsMonitor: Clientes y acciones
|
||||
serial: Facturas por serie
|
||||
medical: Mutua
|
||||
wasteRecalc: Recalcular mermas
|
||||
supplier: Proveedor
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
|
@ -289,12 +296,30 @@ globals:
|
|||
createInvoiceIn: Crear factura recibida
|
||||
myAccount: Mi cuenta
|
||||
noOne: Nadie
|
||||
maxTemperature: Máx
|
||||
minTemperature: Mín
|
||||
params:
|
||||
id: Id
|
||||
clientFk: Id cliente
|
||||
salesPersonFk: Comercial
|
||||
warehouseFk: Almacén
|
||||
provinceFk: Provincia
|
||||
from: Desde
|
||||
To: Hasta
|
||||
stateFk: Estado
|
||||
departmentFk: Departamento
|
||||
email: Correo
|
||||
SSN: NSS
|
||||
fi: NIF
|
||||
changePass: Cambiar contraseña
|
||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||
errors:
|
||||
statusUnauthorized: Acceso denegado
|
||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||
statusBadGateway: Parece ser que el servidor ha caído
|
||||
statusGatewayTimeout: No se ha podido contactar con el servidor
|
||||
userConfig: Error al obtener configuración de usuario
|
||||
updateUserConfig: Error al actualizar la configuración de usuario
|
||||
tokenConfig: Error al obtener configuración de token
|
||||
writeRequest: No se pudo completar la operación solicitada
|
||||
login:
|
||||
|
@ -475,7 +500,7 @@ ticket:
|
|||
tracking: Estados
|
||||
components: Componentes
|
||||
pictures: Fotos
|
||||
packages: Bultos
|
||||
packages: Embalajes
|
||||
list:
|
||||
nickname: Alias
|
||||
state: Estado
|
||||
|
@ -493,6 +518,8 @@ ticket:
|
|||
warehouse: Almacén
|
||||
customerCard: Ficha del cliente
|
||||
alias: Alias
|
||||
ticketList: Listado de tickets
|
||||
newOrder: Nuevo pedido
|
||||
boxing:
|
||||
expedition: Expedición
|
||||
item: Artículo
|
||||
|
@ -514,6 +541,7 @@ ticket:
|
|||
landed: Entregado
|
||||
consigneePhone: Tel. consignatario
|
||||
consigneeMobile: Móv. consignatario
|
||||
consigneeAddress: Dir. consignatario
|
||||
clientPhone: Tel. cliente
|
||||
clientMobile: Móv. cliente
|
||||
consignee: Consignatario
|
||||
|
@ -543,6 +571,10 @@ ticket:
|
|||
weight: Peso
|
||||
goTo: Ir a
|
||||
summaryAmount: Resumen
|
||||
purchaseRequest: Petición de compra
|
||||
service: Servicio
|
||||
description: Descripción
|
||||
attender: Consignatario
|
||||
create:
|
||||
client: Cliente
|
||||
address: Dirección
|
||||
|
@ -845,21 +877,6 @@ wagon:
|
|||
minHeightBetweenTrays: 'La distancia mínima entre bandejas es '
|
||||
maxWagonHeight: 'La altura máxima del vagón es '
|
||||
uncompleteTrays: Hay bandejas sin completar
|
||||
route:
|
||||
cmr:
|
||||
list:
|
||||
results: resultados
|
||||
cmrFk: Id CMR
|
||||
hasCmrDms: Gestdoc
|
||||
'true': Sí
|
||||
'false': 'No'
|
||||
ticketFk: Id ticket
|
||||
routeFk: Id ruta
|
||||
country: País
|
||||
clientFk: Id cliente
|
||||
shipped: Fecha preparación
|
||||
viewCmr: Ver CMR
|
||||
downloadCmrs: Descargar CMRs
|
||||
supplier:
|
||||
list:
|
||||
payMethod: Método de pago
|
||||
|
@ -875,6 +892,7 @@ supplier:
|
|||
account: Cuenta
|
||||
payMethod: Método de pago
|
||||
payDay: Dia de pago
|
||||
country: País
|
||||
summary:
|
||||
responsible: Responsable
|
||||
notes: Notas
|
||||
|
@ -973,6 +991,7 @@ travel:
|
|||
warehouseOut: Alm.entrada
|
||||
totalEntries: ∑
|
||||
totalEntriesTooltip: Entradas totales
|
||||
daysOnward: Días de llegada en adelante
|
||||
summary:
|
||||
confirmed: Confirmado
|
||||
entryId: Id entrada
|
||||
|
@ -1048,7 +1067,7 @@ item:
|
|||
producer: Productor
|
||||
landed: F. entrega
|
||||
fixedPrice:
|
||||
itemId: ID Artículo
|
||||
itemFk: ID Artículo
|
||||
groupingPrice: Precio grouping
|
||||
packingPrice: Precio packing
|
||||
hasMinPrice: Tiene precio mínimo
|
||||
|
|
|
@ -5,11 +5,14 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import AccountSummary from './Card/AccountSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
import AccountFilter from './AccountFilter.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref();
|
||||
|
||||
const filter = {
|
||||
include: { relation: 'role', scope: { fields: ['id', 'name'] } },
|
||||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -18,27 +21,31 @@ const columns = computed(() => [
|
|||
isId: true,
|
||||
field: 'id',
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'search',
|
||||
attrs: {
|
||||
url: 'VnUsers/preview',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'username',
|
||||
name: 'roleFk',
|
||||
label: t('role'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
name: 'roleFk',
|
||||
attrs: {
|
||||
url: 'VnRoles',
|
||||
optionValue: 'id',
|
||||
optionLabel: 'name',
|
||||
},
|
||||
},
|
||||
format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'nickname',
|
||||
label: t('Nickname'),
|
||||
isTitle: true,
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -50,9 +57,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
},
|
||||
|
@ -104,17 +108,25 @@ const exprBuilder = (param, value) => {
|
|||
:expr-builder="exprBuilder"
|
||||
:label="t('account.search')"
|
||||
:info="t('account.searchInfo')"
|
||||
:filter="filter"
|
||||
/>
|
||||
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<AccountFilter data-key="AccountUsers" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="AccountUsers"
|
||||
url="VnUsers/preview"
|
||||
:filter="filter"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
redirect="account"
|
||||
:use-model="true"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { ref, watch } from 'vue';
|
||||
|
@ -24,7 +25,7 @@ watch(
|
|||
<template>
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
:url="`VnUsers/preview`"
|
||||
url="VnUsers/preview"
|
||||
:url-update="`VnUsers/${route.params.id}/update-user`"
|
||||
:filter="accountFilter"
|
||||
model="Accounts"
|
||||
|
@ -43,6 +44,15 @@ watch(
|
|||
option-value="code"
|
||||
option-label="code"
|
||||
/>
|
||||
<VnSelectEnum
|
||||
schema="account"
|
||||
table="user"
|
||||
column="twoFactor"
|
||||
v-model="data.twoFactor"
|
||||
:label="t('account.card.twoFactor')"
|
||||
option-value="code"
|
||||
option-label="code"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -10,7 +10,7 @@ const { t } = useI18n();
|
|||
<VnCard
|
||||
data-key="Account"
|
||||
:descriptor="AccountDescriptor"
|
||||
search-data-key="AccountUsers"
|
||||
search-data-key="AccountList"
|
||||
:searchbar-props="{
|
||||
url: 'VnUsers/preview',
|
||||
label: t('account.search'),
|
||||
|
|
|
@ -4,9 +4,12 @@ import { computed, ref, toRefs } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
|
||||
const $props = defineProps({
|
||||
hasAccount: {
|
||||
type: Boolean,
|
||||
|
@ -62,6 +65,19 @@ async function sync() {
|
|||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnChangePassword
|
||||
ref="changePassRef"
|
||||
:ask-old-pass="true"
|
||||
:submit-fn="
|
||||
async (newPassword, oldPassword) => {
|
||||
await axios.patch(`Accounts/change-password`, {
|
||||
userId: entityId,
|
||||
newPassword,
|
||||
oldPassword,
|
||||
});
|
||||
}
|
||||
"
|
||||
/>
|
||||
<VnConfirm
|
||||
v-model="showSyncDialog"
|
||||
:message="t('account.card.actions.sync.message')"
|
||||
|
@ -92,6 +108,17 @@ async function sync() {
|
|||
/>
|
||||
</template>
|
||||
</VnConfirm>
|
||||
<QItem
|
||||
v-if="
|
||||
entityId == account.id &&
|
||||
useAcl().hasAny([{ model: 'Account', props: '*', accessType: 'WRITE' }])
|
||||
"
|
||||
v-ripple
|
||||
clickable
|
||||
@click="$refs.changePassRef.show()"
|
||||
>
|
||||
<QItemSection>{{ t('globals.changePass') }}</QItemSection>
|
||||
</QItem>
|
||||
<QItem
|
||||
v-if="account.hasAccount"
|
||||
v-ripple
|
||||
|
@ -138,6 +165,5 @@ async function sync() {
|
|||
<QItem v-ripple clickable @click="showSyncDialog = true">
|
||||
<QItemSection>{{ t('account.card.actions.sync.name') }}</QItemSection>
|
||||
</QItem>
|
||||
|
||||
<QSeparator />
|
||||
</template>
|
||||
|
|
|
@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) =>
|
|||
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
||||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||
<QBtn fab icon="add" color="primary" @click="openCreateSubRoleForm()">
|
||||
<QBtn
|
||||
fab
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
color="primary"
|
||||
@click="openCreateSubRoleForm()"
|
||||
>
|
||||
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QPageSticky>
|
||||
|
|
|
@ -35,6 +35,7 @@ account:
|
|||
willDeactivated: User will be deactivated
|
||||
activated: User activated!
|
||||
deactivated: User deactivated!
|
||||
twoFactor: Two factor
|
||||
actions:
|
||||
setPassword: Set password
|
||||
disableAccount:
|
||||
|
|
|
@ -32,6 +32,7 @@ account:
|
|||
activated: ¡Usuario activado!
|
||||
deactivated: ¡Usuario desactivado!
|
||||
newUser: Nuevo usuario
|
||||
twoFactor: Doble factor
|
||||
privileges:
|
||||
delegate: Puede delegar privilegios
|
||||
actions:
|
||||
|
|
|
@ -3,58 +3,18 @@ import { ref } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
import axios from 'axios';
|
||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const claimStates = ref([]);
|
||||
const claimStatesCopy = ref([]);
|
||||
const optionsList = ref([]);
|
||||
|
||||
const workersOptions = ref([]);
|
||||
|
||||
function setClaimStates(data) {
|
||||
claimStates.value = data;
|
||||
claimStatesCopy.value = data;
|
||||
}
|
||||
|
||||
async function getEnumValues() {
|
||||
optionsList.value = [{ id: null, description: t('claim.null') }];
|
||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||
params: {
|
||||
schema: 'vn',
|
||||
table: 'claim',
|
||||
column: 'pickup',
|
||||
},
|
||||
});
|
||||
for (let value of data)
|
||||
optionsList.value.push({ id: value, description: t(`claim.${value}`) });
|
||||
}
|
||||
|
||||
getEnumValues();
|
||||
|
||||
const statesFilter = {
|
||||
options: claimStates,
|
||||
filterFn: (options, value) => {
|
||||
const search = value.toLowerCase();
|
||||
|
||||
if (value === '') return claimStatesCopy.value;
|
||||
|
||||
return options.value.filter((row) => {
|
||||
const description = row.description.toLowerCase();
|
||||
|
||||
return description.indexOf(search) > -1;
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -70,7 +30,7 @@ const statesFilter = {
|
|||
auto-load
|
||||
:reload="true"
|
||||
>
|
||||
<template #form="{ data, validate, filter }">
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
v-model="data.client.name"
|
||||
|
@ -101,20 +61,14 @@ const statesFilter = {
|
|||
/>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
v-model="data.claimStateFk"
|
||||
:options="claimStates"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
url="ClaimStates"
|
||||
:label="t('claim.state')"
|
||||
map-options
|
||||
use-input
|
||||
@filter="(value, update) => filter(value, update, statesFilter)"
|
||||
option-label="description"
|
||||
:rules="validate('claim.claimStateFk')"
|
||||
:input-debounce="0"
|
||||
>
|
||||
</QSelect>
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QInput
|
||||
|
@ -123,16 +77,14 @@ const statesFilter = {
|
|||
:rules="validate('claim.packages')"
|
||||
type="number"
|
||||
/>
|
||||
<QSelect
|
||||
<VnSelectEnum
|
||||
v-model="data.pickup"
|
||||
:options="optionsList"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
:label="t('claim.pickup')"
|
||||
map-options
|
||||
use-input
|
||||
:input-debounce="0"
|
||||
table="claim"
|
||||
column="pickup"
|
||||
option-label="description"
|
||||
:translation="(value) => t(`claim.${value}`)"
|
||||
:default-options="[{ id: null, description: t('claim.null') }]"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -317,7 +317,7 @@ async function saveWhenHasChanges() {
|
|||
</div>
|
||||
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn fab color="primary" icon="add" @click="showImportDialog()" />
|
||||
<QBtn fab color="primary" shortcut="+" icon="add" @click="showImportDialog()" />
|
||||
</QPageSticky>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -246,7 +246,13 @@ function onDrag() {
|
|||
</QDialog>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<label for="fileInput">
|
||||
<QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary">
|
||||
<QBtn
|
||||
fab
|
||||
@click="inputFile.nativeEl.click()"
|
||||
shortcut="+"
|
||||
icon="add"
|
||||
color="primary"
|
||||
>
|
||||
<QInput
|
||||
ref="inputFile"
|
||||
type="file"
|
||||
|
|
|
@ -5,15 +5,12 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
|
||||
import axios from 'axios';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const addresses = ref([]);
|
||||
const client = ref(null);
|
||||
const provincesLocation = ref([]);
|
||||
|
||||
const addressFilter = {
|
||||
fields: [
|
||||
|
@ -41,7 +38,13 @@ const addressFilter = {
|
|||
{
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
fields: ['id', 'name', 'countryFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'country',
|
||||
scope: { fields: ['id', 'name'] },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -83,13 +86,6 @@ const getClientData = async (id) => {
|
|||
}
|
||||
};
|
||||
|
||||
const setProvince = (provinceFk) => {
|
||||
const result = provincesLocation.value.filter(
|
||||
(province) => province.id === provinceFk
|
||||
);
|
||||
return result[0]?.name || '';
|
||||
};
|
||||
|
||||
const isDefaultAddress = (address) => {
|
||||
return client?.value?.defaultAddressFk === address.id ? 1 : 0;
|
||||
};
|
||||
|
@ -128,12 +124,6 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
@on-fetch="(data) => (provincesLocation = data)"
|
||||
auto-load
|
||||
url="Provinces/location"
|
||||
/>
|
||||
|
||||
<div class="full-width flex justify-center">
|
||||
<QCard class="card-width q-pa-lg" v-if="addresses.length">
|
||||
<QCardSection>
|
||||
|
@ -177,7 +167,7 @@ const toCustomerAddressEdit = (addressId) => {
|
|||
<div>{{ item.street }}</div>
|
||||
<div>
|
||||
{{ item.postalCode }} - {{ item.city }},
|
||||
{{ setProvince(item.provinceFk) }}
|
||||
{{ item.province.name }}
|
||||
</div>
|
||||
<div>
|
||||
{{ item.phone }}
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useVnConfirm } from 'composables/useVnConfirm';
|
|||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'components/ui/VnSubToolbar.vue';
|
||||
import VnFilter from 'components/VnTable/VnFilter.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||
|
@ -33,9 +33,9 @@ const stateStore = useStateStore();
|
|||
const user = state.getUser();
|
||||
|
||||
const clientRisk = ref([]);
|
||||
const companies = ref([]);
|
||||
const tableRef = ref();
|
||||
const companyId = ref(user.value.companyFk);
|
||||
const companyLastId = ref(user.value.companyFk);
|
||||
const balances = ref([]);
|
||||
const vnFilterRef = ref({});
|
||||
const filter = computed(() => {
|
||||
|
@ -45,33 +45,6 @@ const filter = computed(() => {
|
|||
};
|
||||
});
|
||||
|
||||
const companyFilterColumn = {
|
||||
align: 'left',
|
||||
name: 'companyId',
|
||||
label: t('Company'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Companies',
|
||||
optionLabel: 'code',
|
||||
sortBy: 'code',
|
||||
limit: 0,
|
||||
},
|
||||
columnFilter: {
|
||||
event: {
|
||||
remove: () => (companyId.value = null),
|
||||
'update:modelValue': (newCompanyFk) => {
|
||||
if (!newCompanyFk) return;
|
||||
vnFilterRef.value.addFilter(newCompanyFk);
|
||||
companyLastId.value = newCompanyFk;
|
||||
},
|
||||
blur: () =>
|
||||
!companyId.value &&
|
||||
(companyId.value = companyLastId.value ?? user.value.companyFk),
|
||||
},
|
||||
},
|
||||
visible: false,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'right',
|
||||
|
@ -166,6 +139,11 @@ onBeforeMount(() => {
|
|||
});
|
||||
|
||||
async function getCurrentBalance(data) {
|
||||
currentBalance.value[companyId.value] = {
|
||||
amount: 0,
|
||||
code: companies.value.find((c) => c.id === companyId.value)?.code,
|
||||
};
|
||||
|
||||
for (const balance of data) {
|
||||
currentBalance.value[balance.companyFk] = {
|
||||
code: balance.company.code,
|
||||
|
@ -192,14 +170,21 @@ const showBalancePdf = ({ id }) => {
|
|||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Companies"
|
||||
auto-load
|
||||
@on-fetch="(data) => (companies = data)"
|
||||
></FetchData>
|
||||
<FetchData
|
||||
v-if="companies.length > 0"
|
||||
url="clientRisks"
|
||||
:filter="{
|
||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||
where: { clientFk: route.params.id, companyFk: companyId },
|
||||
where: { clientFk: route.params.id },
|
||||
}"
|
||||
auto-load
|
||||
@on-fetch="getCurrentBalance"
|
||||
></FetchData>
|
||||
|
||||
<VnSubToolbar class="q-mb-md">
|
||||
<template #st-data>
|
||||
<div class="column justify-center q-px-md q-py-sm">
|
||||
|
@ -212,13 +197,15 @@ const showBalancePdf = ({ id }) => {
|
|||
</template>
|
||||
<template #st-actions>
|
||||
<div>
|
||||
<VnFilter
|
||||
<VnSelect
|
||||
:label="t('Company')"
|
||||
ref="vnFilterRef"
|
||||
v-model="companyId"
|
||||
data-key="CustomerBalance"
|
||||
:column="companyFilterColumn"
|
||||
search-url="balance"
|
||||
/>
|
||||
:options="companies"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
></VnSelect>
|
||||
</div>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
|
|
|
@ -16,6 +16,20 @@ const { t } = useI18n();
|
|||
const businessTypes = ref([]);
|
||||
const contactChannels = ref([]);
|
||||
const title = ref();
|
||||
const handleSalesModelValue = (val) => ({
|
||||
or: [
|
||||
{ id: val },
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -34,7 +48,7 @@ const title = ref();
|
|||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
:rules="validate('client.socialName')"
|
||||
:rules="validate('client.name')"
|
||||
autofocus
|
||||
clearable
|
||||
v-model="data.name"
|
||||
|
@ -99,8 +113,10 @@ const title = ref();
|
|||
map-options
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
:rules="validate('client.salesPersonFk')"
|
||||
:use-like="false"
|
||||
:expr-builder="exprBuilder"
|
||||
emit-value
|
||||
>
|
||||
<template #prepend>
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { QItem } from 'quasar';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import { QItemSection } from 'quasar';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
defineProps({ dataKey: { type: String, required: true } });
|
||||
</script>
|
||||
<template>
|
||||
<VnFilterPanel :data-key="dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params }">
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('params.item')"
|
||||
v-model="params.itemId"
|
||||
is-outlined
|
||||
lazy-rules
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.buyerId"
|
||||
url="TicketRequests/getItemTypeWorker"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
:label="t('params.buyer')"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.typeId"
|
||||
url="ItemTypes"
|
||||
:include="['category']"
|
||||
:fields="['id', 'name', 'categoryFk']"
|
||||
sort-by="name ASC"
|
||||
:label="t('params.typeId')"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
<QItemLabel caption>{{
|
||||
scope.opt?.category?.name
|
||||
}}</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.categoryId"
|
||||
url="ItemCategories"
|
||||
:fields="['id', 'name']"
|
||||
sort-by="name ASC"
|
||||
:label="t('params.categoryId')"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
v-model="params.campaignId"
|
||||
url="Campaigns/latest"
|
||||
sort-by="dated DESC"
|
||||
:label="t('params.campaignId')"
|
||||
option-label="code"
|
||||
option-value="id"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{
|
||||
t(`params.${scope.opt?.code}`)
|
||||
}}</QItemLabel>
|
||||
<QItemLabel caption>{{
|
||||
toDate(scope.opt.dated)
|
||||
}}</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.from')"
|
||||
v-model="params.from"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.to')"
|
||||
v-model="params.to"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
item: Item id
|
||||
buyer: Buyer
|
||||
type: Type
|
||||
category: Category
|
||||
itemId: Item id
|
||||
buyerId: Buyer
|
||||
typeId: Type
|
||||
categoryId: Category
|
||||
from: From
|
||||
to: To
|
||||
campaignId: Campaña
|
||||
valentinesDay: Valentine's Day
|
||||
mothersDay: Mother's Day
|
||||
allSaints: All Saints' Day
|
||||
es:
|
||||
params:
|
||||
item: Id artículo
|
||||
buyer: Comprador
|
||||
type: Tipo
|
||||
category: Categoría
|
||||
itemId: Id Artículo
|
||||
buyerId: Comprador
|
||||
typeId: Tipo
|
||||
categoryId: Reino
|
||||
from: Desde
|
||||
to: Hasta
|
||||
campaignId: Campaña
|
||||
valentinesDay: Día de San Valentín
|
||||
mothersDay: Día de la Madre
|
||||
allSaints: Día de Todos los Santos
|
||||
</i18n>
|
|
@ -56,17 +56,18 @@ const customerContactsRef = ref(null);
|
|||
</div>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click="customerContactsRef.insert()"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Add contact') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -190,6 +190,18 @@ const setData = (entity) => (data.value = useCardDescription(entity?.name, entit
|
|||
>
|
||||
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
v-if="entity.supplier"
|
||||
:to="{
|
||||
name: 'SupplierSummary',
|
||||
params: { id: entity.supplier.id },
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:supplier"
|
||||
color="primary"
|
||||
>
|
||||
<QTooltip>{{ t('Go to supplier') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QCardActions>
|
||||
</template>
|
||||
</CardDescriptor>
|
||||
|
@ -204,6 +216,7 @@ es:
|
|||
Customer ticket list: Listado de tickets del cliente
|
||||
Customer invoice out list: Listado de facturas del cliente
|
||||
Go to user: Ir al usuario
|
||||
Go to supplier: Ir al proveedor
|
||||
Customer unpaid: Cliente impago
|
||||
Unpaid: Impagado
|
||||
unpaidDated: 'Fecha {dated}'
|
||||
|
|
|
@ -236,6 +236,7 @@ const toCustomerFileManagementCreate = () => {
|
|||
@click.stop="toCustomerFileManagementCreate()"
|
||||
color="primary"
|
||||
fab
|
||||
shortcut="+"
|
||||
icon="add"
|
||||
/>
|
||||
<QTooltip>
|
||||
|
|
|
@ -93,8 +93,9 @@ function handleLocation(data, location) {
|
|||
<VnRow>
|
||||
<VnLocation
|
||||
:rules="validate('Worker.postcode')"
|
||||
:roles-allowed-to-create="['deliveryAssistant', 'administrative']"
|
||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||
v-model="data.postcode"
|
||||
:location="data"
|
||||
@update:model-value="(location) => handleLocation(data, location)"
|
||||
/>
|
||||
</VnRow>
|
||||
|
@ -134,15 +135,17 @@ function handleLocation(data, location) {
|
|||
</QTooltip>
|
||||
</QIcon>
|
||||
</div>
|
||||
<QCheckbox :label="t('Verified data')" v-model="data.isTaxDataChecked" />
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('Electronic invoice')"
|
||||
v-model="data.hasElectronicInvoice"
|
||||
/><QCheckbox
|
||||
:label="t('Verified data')"
|
||||
v-model="data.isTaxDataChecked"
|
||||
/>
|
||||
<QCheckbox :label="t('Daily invoice')" v-model="data.hasDailyInvoice" />
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -99,7 +99,13 @@ const tableRef = ref();
|
|||
</VnTable>
|
||||
|
||||
<QPageSticky :offset="[18, 18]">
|
||||
<QBtn @click.stop="toCustomerSamplesCreate()" color="primary" fab icon="add" />
|
||||
<QBtn
|
||||
@click.stop="toCustomerSamplesCreate()"
|
||||
color="primary"
|
||||
fab
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ t('Send sample') }}
|
||||
</QTooltip>
|
||||
|
|
|
@ -13,6 +13,7 @@ import VnTitle from 'src/components/common/VnTitle.vue';
|
|||
import VnRow from 'src/components/ui/VnRow.vue';
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const grafanaUrl = 'https://grafana.verdnatura.es';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
|
|
@ -92,7 +92,7 @@ const onSubmit = async () => {
|
|||
notify('globals.dataSaved', 'positive');
|
||||
unpaidClient.value = true;
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
|
|
@ -3,14 +3,11 @@ import { computed, ref } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const route = useRoute();
|
||||
const canChangePassword = ref(0);
|
||||
|
||||
|
@ -21,21 +18,11 @@ const filter = computed(() => {
|
|||
};
|
||||
});
|
||||
|
||||
const showChangePasswordDialog = () => {
|
||||
quasar.dialog({
|
||||
component: CustomerChangePassword,
|
||||
componentProps: {
|
||||
id: route.params.id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
async function hasCustomerRole() {
|
||||
const { data } = await axios(`Clients/${route.params.id}/hasCustomerRole`);
|
||||
canChangePassword.value = data;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FormModel
|
||||
url="VnUsers/preview"
|
||||
|
@ -69,21 +56,29 @@ async function hasCustomerRole() {
|
|||
</template>
|
||||
<template #moreActions>
|
||||
<QBtn
|
||||
:label="t('Change password')"
|
||||
:label="t('globals.changePass')"
|
||||
color="primary"
|
||||
icon="edit"
|
||||
:disable="!canChangePassword"
|
||||
@click="showChangePasswordDialog()"
|
||||
@click="$refs.changePassRef.show"
|
||||
/>
|
||||
</template>
|
||||
</FormModel>
|
||||
<VnChangePassword
|
||||
ref="changePassRef"
|
||||
:submit-fn="
|
||||
async (newPass) => {
|
||||
await axios.patch(`Clients/${$route.params.id}/setPassword`, {
|
||||
newPassword: newPass,
|
||||
});
|
||||
}
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Enable web access: Habilitar acceso web
|
||||
User: Usuario
|
||||
Recovery email: Correo de recuperacion
|
||||
This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta
|
||||
Change password: Cambiar contraseña
|
||||
</i18n>
|
||||
|
|
|
@ -1,35 +1,20 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const provinces = ref();
|
||||
const workers = ref();
|
||||
const zones = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData url="Provinces" @on-fetch="(data) => (provinces = data)" auto-load />
|
||||
<FetchData url="Zones" @on-fetch="(data) => (zones = data)" auto-load />
|
||||
<FetchData
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
@on-fetch="(data) => (workers = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" search-url="table">
|
||||
<VnFilterPanel :data-key="dataKey" :search-button="true" search-url="table">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
|
@ -65,15 +50,14 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!workers">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="workers">
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
url="Workers/activeWithInheritedRole"
|
||||
:filter="{ where: { role: 'salesPerson' } }"
|
||||
auto-load
|
||||
:label="t('Salesperson')"
|
||||
v-model="params.salesPersonFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="workers"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -88,15 +72,12 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection v-if="!provinces">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="provinces">
|
||||
<VnSelect
|
||||
<QItemSection
|
||||
><VnSelect
|
||||
url="Provinces"
|
||||
:label="t('Province')"
|
||||
v-model="params.provinceFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="provinces"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -105,6 +86,7 @@ const zones = ref();
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
:input-debounce="0"
|
||||
/>
|
||||
</QItemSection>
|
||||
|
@ -135,15 +117,11 @@ const zones = ref();
|
|||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection v-if="!zones">
|
||||
<QSkeleton type="QInput" class="full-width" />
|
||||
</QItemSection>
|
||||
<QItemSection v-if="zones">
|
||||
<VnSelect
|
||||
url="Zones"
|
||||
:label="t('Zone')"
|
||||
v-model="params.zoneFk"
|
||||
@update:model-value="searchFn()"
|
||||
:options="zones"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
emit-value
|
||||
|
@ -152,8 +130,8 @@ const zones = ref();
|
|||
dense
|
||||
outlined
|
||||
rounded
|
||||
auto-load
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
|
|
|
@ -8,10 +8,10 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
import CustomerFilter from './CustomerFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -397,6 +397,11 @@ function handleLocation(data, location) {
|
|||
:label="t('Search customer')"
|
||||
data-key="Customer"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CustomerFilter data-key="Customer" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="Customer"
|
||||
|
@ -413,6 +418,7 @@ function handleLocation(data, location) {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="customer"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
|
|
|
@ -3,7 +3,6 @@ import { ref, computed } from 'vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { toCurrency, toDate, dateRange } from 'filters/index';
|
||||
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
|
||||
import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue';
|
||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
@ -11,7 +10,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -192,11 +190,6 @@ function exprBuilder(param, value) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<CustomerNotificationsFilter data-key="CustomerDefaulter" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
||||
|
|
|
@ -134,6 +134,7 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('Create a new expense')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
||||
|
|
|
@ -11,7 +11,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
||||
import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
import CustomerNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCustomsAgent.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
@ -177,7 +177,12 @@ function handleLocation(data, location) {
|
|||
<VnLocation
|
||||
:rules="validate('Worker.postcode')"
|
||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||
v-model="data.postalCode"
|
||||
:location="{
|
||||
postcode: data.postalCode,
|
||||
city: data.city,
|
||||
province: data.province,
|
||||
country: data.province.country,
|
||||
}"
|
||||
@update:model-value="(location) => handleLocation(data, location)"
|
||||
></VnLocation>
|
||||
</div>
|
||||
|
@ -221,9 +226,10 @@ function handleLocation(data, location) {
|
|||
option-label="fiscalName"
|
||||
option-value="id"
|
||||
v-model="data.customsAgentFk"
|
||||
:tooltip="t('New customs agent')"
|
||||
>
|
||||
<template #form>
|
||||
<CustomsNewCustomsAgent />
|
||||
<CustomerNewCustomsAgent />
|
||||
</template>
|
||||
</VnSelectDialog>
|
||||
</div>
|
||||
|
@ -267,16 +273,17 @@ function handleLocation(data, location) {
|
|||
</div>
|
||||
</VnRow>
|
||||
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click.stop="addNote()"
|
||||
class="cursor-pointer add-icon q-mt-md"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Add note') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</template>
|
||||
</FormModel>
|
||||
</template>
|
||||
|
@ -303,6 +310,7 @@ es:
|
|||
Mobile: Movíl
|
||||
Incoterms: Incoterms
|
||||
Customs agent: Agente de aduanas
|
||||
New customs agent: Nuevo agente de aduanas
|
||||
Notes: Notas
|
||||
Observation type: Tipo de observación
|
||||
Description: Descripción
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import axios from 'axios';
|
||||
import { useDialogPluginComponent } from 'quasar';
|
||||
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const { dialogRef } = useDialogPluginComponent();
|
||||
const { notify } = useNotify();
|
||||
const { t } = useI18n();
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
promise: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const userPasswords = ref({});
|
||||
|
||||
const closeButton = ref(null);
|
||||
const isLoading = ref(false);
|
||||
const newPassword = ref('');
|
||||
const requestPassword = ref('');
|
||||
|
||||
const onSubmit = async () => {
|
||||
isLoading.value = true;
|
||||
|
||||
if (newPassword.value !== requestPassword.value) {
|
||||
notify(t("Passwords don't match"), 'negative');
|
||||
isLoading.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = {
|
||||
newPassword: newPassword.value,
|
||||
};
|
||||
try {
|
||||
await axios.patch(`Clients/${$props.id}/setPassword`, payload);
|
||||
await $props.promise();
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
if (closeButton.value) closeButton.value.click();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QDialog ref="dialogRef">
|
||||
<FetchData
|
||||
@on-fetch="(data) => (userPasswords = data[0])"
|
||||
auto-load
|
||||
url="UserPasswords"
|
||||
/>
|
||||
<QCard class="q-pa-lg">
|
||||
<QCardSection>
|
||||
<QForm @submit.prevent="onSubmit">
|
||||
<span
|
||||
ref="closeButton"
|
||||
class="row justify-end close-icon"
|
||||
v-close-popup
|
||||
>
|
||||
<QIcon name="close" size="sm" />
|
||||
</span>
|
||||
|
||||
<VnRow class="row q-gutter-md q-mb-md" style="flex-direction: column">
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('New password')"
|
||||
clearable
|
||||
v-model="newPassword"
|
||||
type="password"
|
||||
>
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-info">
|
||||
<QTooltip>
|
||||
{{
|
||||
t('customer.card.passwordRequirements', {
|
||||
...userPasswords,
|
||||
})
|
||||
}}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
</div>
|
||||
<div class="col">
|
||||
<VnInput
|
||||
:label="t('Request password')"
|
||||
clearable
|
||||
v-model="requestPassword"
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
|
||||
<div class="q-mt-lg row justify-end">
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:label="t('globals.cancel')"
|
||||
:loading="isLoading"
|
||||
class="q-ml-sm"
|
||||
color="primary"
|
||||
flat
|
||||
type="reset"
|
||||
v-close-popup
|
||||
/>
|
||||
<QBtn
|
||||
:disabled="isLoading"
|
||||
:label="t('Change password')"
|
||||
:loading="isLoading"
|
||||
color="primary"
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</QForm>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
New password: Nueva contraseña
|
||||
Request password: Repetir contraseña
|
||||
Change password: Cambiar contraseña
|
||||
Passwords don't match: Las contraseñas no coinciden
|
||||
</i18n>
|
|
@ -138,7 +138,7 @@ const onSubmit = async () => {
|
|||
notify('globals.dataSaved', 'positive');
|
||||
onDataSaved(data);
|
||||
} catch (error) {
|
||||
notify('errors.create', 'negative');
|
||||
notify('errors.writeRequest', 'negative');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ const filter = {
|
|||
],
|
||||
where: { clientFk: route.params.id },
|
||||
order: ['shipped DESC', 'id'],
|
||||
limit: 30,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
|
@ -149,7 +150,6 @@ const setShippedColor = (date) => {
|
|||
auto-load
|
||||
order="shipped DESC, id"
|
||||
:disable-option="{ card: true, table: true }"
|
||||
limit="5"
|
||||
class="full-width"
|
||||
:disable-infinite-scroll="true"
|
||||
>
|
||||
|
|
|
@ -58,7 +58,7 @@ customer:
|
|||
vies: VIES
|
||||
payMethod: Método de pago
|
||||
bankAccount: Cuenta bancaria
|
||||
dueDay: Día de pago
|
||||
dueDay: Vencimiento
|
||||
hasLcr: Recibido LCR
|
||||
hasCoreVnl: Recibido core VNL
|
||||
hasB2BVnl: Recibido B2B VNL
|
||||
|
|
|
@ -138,7 +138,13 @@ const columns = computed(() => [
|
|||
</template>
|
||||
</CrudModel>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn fab color="primary" icon="add" @click="entryObservationsRef.insert()" />
|
||||
<QBtn
|
||||
fab
|
||||
color="primary"
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
@click="entryObservationsRef.insert()"
|
||||
/>
|
||||
</QPageSticky>
|
||||
</template>
|
||||
<i18n>
|
||||
|
|
|
@ -10,6 +10,7 @@ import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.v
|
|||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
@ -163,7 +164,7 @@ const fetchEntryBuys = async () => {
|
|||
>
|
||||
<template #header-left>
|
||||
<router-link
|
||||
v-if="route.name !== 'EntrySummary'"
|
||||
v-if="route?.name !== 'EntrySummary'"
|
||||
:to="{ name: 'EntrySummary', params: { id: entityId } }"
|
||||
class="header link"
|
||||
:href="entryUrl"
|
||||
|
@ -184,7 +185,10 @@ const fetchEntryBuys = async () => {
|
|||
<QIcon name="open_in_new" />
|
||||
</router-link>
|
||||
<VnLv :label="t('entry.summary.commission')" :value="entry.commission" />
|
||||
<VnLv :label="t('entry.summary.currency')" :value="entry.currency.name" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.currency')"
|
||||
:value="entry.currency?.name"
|
||||
/>
|
||||
<VnLv :label="t('entry.summary.company')" :value="entry.company.code" />
|
||||
<VnLv :label="t('entry.summary.reference')" :value="entry.reference" />
|
||||
<VnLv
|
||||
|
@ -210,12 +214,12 @@ const fetchEntryBuys = async () => {
|
|||
</VnLv>
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelAgency')"
|
||||
:value="entry.travel.agency.name"
|
||||
:value="entry.travel.agency?.name"
|
||||
/>
|
||||
<VnLv :label="t('shipped')" :value="toDate(entry.travel.shipped)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseOut')"
|
||||
:value="entry.travel.warehouseOut.name"
|
||||
:value="entry.travel.warehouseOut?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelDelivered')"
|
||||
|
@ -225,7 +229,7 @@ const fetchEntryBuys = async () => {
|
|||
<VnLv :label="t('landed')" :value="toDate(entry.travel.landed)" />
|
||||
<VnLv
|
||||
:label="t('entry.summary.travelWarehouseIn')"
|
||||
:value="entry.travel.warehouseIn.name"
|
||||
:value="entry.travel.warehouseIn?.name"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('entry.summary.travelReceived')"
|
||||
|
@ -281,17 +285,17 @@ const fetchEntryBuys = async () => {
|
|||
>
|
||||
<template #body="{ cols, row, rowIndex }">
|
||||
<QTr no-hover>
|
||||
<QTd v-for="col in cols" :key="col.name">
|
||||
<QTd v-for="col in cols" :key="col?.name">
|
||||
<component
|
||||
:is="tableColumnComponents[col.name].component(props)"
|
||||
v-bind="tableColumnComponents[col.name].props(props)"
|
||||
@click="tableColumnComponents[col.name].event(props)"
|
||||
:is="tableColumnComponents[col?.name].component()"
|
||||
v-bind="tableColumnComponents[col?.name].props()"
|
||||
@click="tableColumnComponents[col?.name].event()"
|
||||
class="col-content"
|
||||
>
|
||||
<template
|
||||
v-if="
|
||||
col.name !== 'observation' &&
|
||||
col.name !== 'isConfirmed'
|
||||
col?.name !== 'observation' &&
|
||||
col?.name !== 'isConfirmed'
|
||||
"
|
||||
>{{ col.value }}</template
|
||||
>
|
||||
|
|
|
@ -116,7 +116,7 @@ const entriesTableColumns = computed(() => [
|
|||
{{ col.value }}
|
||||
</QTd>
|
||||
<QBtn
|
||||
icon="print"
|
||||
icon="visibility"
|
||||
v-if="props.row.stickers > 0"
|
||||
:loading="isLoading"
|
||||
@click="
|
||||
|
@ -126,7 +126,7 @@ const entriesTableColumns = computed(() => [
|
|||
"
|
||||
unelevated
|
||||
>
|
||||
<QTooltip>{{ t('printLabel') }}</QTooltip>
|
||||
<QTooltip>{{ t('viewLabel') }}</QTooltip>
|
||||
</QBtn>
|
||||
</QTr>
|
||||
</template>
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryLatestBuysFilter from './EntryLatestBuysFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const { t } = useI18n();
|
||||
import { toDate } from 'src/filters';
|
||||
import VnImg from 'src/components/ui/VnImg.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
const columns = [
|
||||
{
|
||||
align: 'center',
|
||||
|
|
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
||||
|
||||
|
@ -18,6 +19,7 @@ defineProps({
|
|||
|
||||
const itemTypeWorkersOptions = ref([]);
|
||||
const suppliersOptions = ref([]);
|
||||
const tagValues = ref([]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -0,0 +1,301 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModelPopup from 'components/FormModelPopup.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryStockBoughtFilter from './EntryStockBoughtFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import EntryStockBoughtDetail from 'src/pages/Entry/EntryStockBoughtDetail.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Id',
|
||||
name: 'id',
|
||||
isId: true,
|
||||
columnFilter: false,
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'workerFk',
|
||||
label: t('Buyer'),
|
||||
isTitle: true,
|
||||
component: 'select',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
attrs: {
|
||||
url: 'Workers/activeWithInheritedRole',
|
||||
fields: ['id', 'name'],
|
||||
where: { role: 'buyer' },
|
||||
optionFilter: 'firstName',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
useLike: false,
|
||||
},
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
label: t('Reserve'),
|
||||
name: 'reserve',
|
||||
columnFilter: false,
|
||||
create: true,
|
||||
component: 'number',
|
||||
summation: true,
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
label: t('Bought'),
|
||||
name: 'bought',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Date'),
|
||||
name: 'dated',
|
||||
component: 'date',
|
||||
visible: false,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('View more details'),
|
||||
icon: 'search',
|
||||
isPrimary: true,
|
||||
action: (row) => {
|
||||
quasar.dialog({
|
||||
component: EntryStockBoughtDetail,
|
||||
componentProps: {
|
||||
workerFk: row.workerFk,
|
||||
dated: userParams.value.dated,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const fetchDataRef = ref();
|
||||
const travelDialogRef = ref(false);
|
||||
const tableRef = ref();
|
||||
const travel = ref(null);
|
||||
const userParams = ref({
|
||||
dated: Date.vnNew(),
|
||||
});
|
||||
|
||||
const filter = ref({
|
||||
fields: ['id', 'm3', 'warehouseInFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['code'],
|
||||
},
|
||||
},
|
||||
],
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
});
|
||||
|
||||
const setUserParams = async ({ dated }) => {
|
||||
const shipped = (dated ? new Date(dated) : Date.vnNew()).setHours(0, 0, 0, 0);
|
||||
filter.value.where.shipped = shipped;
|
||||
fetchDataRef.value?.fetch();
|
||||
};
|
||||
|
||||
function openDialog() {
|
||||
travelDialogRef.value = true;
|
||||
}
|
||||
|
||||
function setFooter(data) {
|
||||
const footer = {
|
||||
bought: 0,
|
||||
reserve: 0,
|
||||
};
|
||||
data.forEach((row) => {
|
||||
footer.bought += row?.bought;
|
||||
footer.reserve += row?.reserve;
|
||||
});
|
||||
tableRef.value.footer = footer;
|
||||
}
|
||||
|
||||
function round(value) {
|
||||
return Math.round(value * 100) / 100;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<FetchData
|
||||
ref="fetchDataRef"
|
||||
url="Travels"
|
||||
auto-load
|
||||
:filter="filter"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
travel = data.find(
|
||||
(data) => data.warehouseIn?.code.toLowerCase() === 'vnh'
|
||||
);
|
||||
}
|
||||
"
|
||||
/>
|
||||
<VnRow class="travel">
|
||||
<div v-if="travel">
|
||||
<span style="color: var(--vn-label-color)">
|
||||
{{ t('Purchase Spaces') }}:
|
||||
</span>
|
||||
<span>
|
||||
{{ travel?.m3 }}
|
||||
</span>
|
||||
<QBtn
|
||||
v-if="travel?.m3"
|
||||
style="max-width: 20%"
|
||||
flat
|
||||
icon="edit"
|
||||
@click="openDialog()"
|
||||
:title="t('Edit travel')"
|
||||
color="primary"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||
<FormModelPopup
|
||||
:url-update="`Travels/${travel?.id}`"
|
||||
model="travel"
|
||||
:title="t('Travel m3')"
|
||||
:form-initial-data="{ id: travel?.id, m3: travel?.m3 }"
|
||||
@on-data-saved="fetchDataRef.fetch()"
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
<VnInput
|
||||
v-model="data.id"
|
||||
:label="t('id')"
|
||||
type="number"
|
||||
disable
|
||||
readonly
|
||||
/>
|
||||
<VnInput v-model="data.m3" :label="t('m3')" type="number" />
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
</QDialog>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<EntryStockBoughtFilter
|
||||
data-key="StockBoughts"
|
||||
@set-user-params="setUserParams"
|
||||
/>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<div class="table-container">
|
||||
<div class="column items-center">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughts"
|
||||
url="StockBoughts/getStockBought"
|
||||
save-url="StockBoughts/crud"
|
||||
order="reserve DESC"
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
@on-fetch="(data) => setFooter(data)"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: user.id,
|
||||
dated: Date.vnNow(),
|
||||
},
|
||||
}"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:footer="true"
|
||||
table-height="80vh"
|
||||
auto-load
|
||||
:column-search="false"
|
||||
>
|
||||
<template #column-workerFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.worker?.user?.name }}
|
||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-bought="{ row }">
|
||||
<span :class="{ 'text-negative': row.reserve < row.bought }">
|
||||
{{ row?.bought }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-reserve>
|
||||
<span>
|
||||
{{ round(tableRef.footer.reserve) }}
|
||||
</span>
|
||||
</template>
|
||||
<template #column-footer-bought>
|
||||
<span
|
||||
:class="{
|
||||
'text-negative':
|
||||
tableRef.footer.reserve < tableRef.footer.bought,
|
||||
}"
|
||||
>
|
||||
{{ round(tableRef.footer.bought) }}
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.travel {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.table-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.text-negative {
|
||||
color: $negative !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Edit travel: Editar envío
|
||||
Travel: Envíos
|
||||
Purchase Spaces: Espacios de compra
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
Date: Fecha
|
||||
View more details: Ver más detalles
|
||||
Reserve some space: Reservar espacio
|
||||
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
|
||||
</i18n>
|
|
@ -0,0 +1,126 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const $props = defineProps({
|
||||
workerFk: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
dated: {
|
||||
type: Date,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}&date=${$props.dated}`;
|
||||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Entry'),
|
||||
name: 'entryFk',
|
||||
isTitle: true,
|
||||
isId: true,
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'itemFk',
|
||||
label: t('Item'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Name'),
|
||||
name: 'itemName',
|
||||
create: true,
|
||||
columnClass: 'expand',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'volume',
|
||||
label: t('Volume'),
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Packaging'),
|
||||
name: 'packagingFk',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Packing',
|
||||
name: 'packing',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<template>
|
||||
<QDialog>
|
||||
<div class="container">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughtsDetail"
|
||||
:url="customUrl"
|
||||
order="itemName DESC"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:disable-infinite-scroll="true"
|
||||
:disable-option="{ card: true }"
|
||||
:limit="0"
|
||||
auto-load
|
||||
>
|
||||
<template #column-entryFk="{ row }">
|
||||
<span class="link">
|
||||
{{ row?.entryFk }}
|
||||
<EntryDescriptorProxy :id="row.entryFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-itemName="{ row }">
|
||||
<span class="link">
|
||||
{{ row?.itemName }}
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</QDialog>
|
||||
</template>
|
||||
<style lang="css" scoped>
|
||||
.container {
|
||||
max-width: 50vw;
|
||||
overflow: auto;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: auto;
|
||||
background-color: var(--vn-section-color);
|
||||
padding: 4px;
|
||||
}
|
||||
.container > div > div > .q-table__top.relative-position.row.items-center {
|
||||
background-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
Entry: Entrada
|
||||
Item: Artículo
|
||||
Name: Nombre
|
||||
Volume: Volumen
|
||||
Packaging: Embalage
|
||||
</i18n>
|
|
@ -0,0 +1,63 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const stateStore = useStateStore();
|
||||
const emit = defineEmits(['set-user-params']);
|
||||
const setUserParams = (params) => {
|
||||
emit('set-user-params', params);
|
||||
};
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
search-url="table"
|
||||
@set-user-params="setUserParams"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params }">
|
||||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
id="date"
|
||||
v-model="params.dated"
|
||||
:label="t('Date')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
dated: Date
|
||||
workerFk: Worker
|
||||
es:
|
||||
Date: Fecha
|
||||
params:
|
||||
dated: Date
|
||||
workerFk: Trabajador
|
||||
</i18n>
|
|
@ -0,0 +1,72 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
|
||||
const isLoading = ref(false);
|
||||
const dateFrom = ref();
|
||||
const dateTo = ref();
|
||||
|
||||
const optionsTo = computed(() => (date) => {
|
||||
if (!dateFrom.value) return true;
|
||||
return new Date(date) >= new Date(dateFrom.value);
|
||||
});
|
||||
|
||||
watch(dateFrom, (newDateFrom) => {
|
||||
if (dateTo.value && new Date(dateTo.value) < new Date(newDateFrom))
|
||||
dateTo.value = newDateFrom;
|
||||
});
|
||||
|
||||
const recalc = async () => {
|
||||
const { notify } = useNotify();
|
||||
|
||||
const params = {
|
||||
schema: 'bs',
|
||||
params: [new Date(dateFrom.value), new Date(dateTo.value)],
|
||||
};
|
||||
|
||||
try {
|
||||
isLoading.value = true;
|
||||
await axios.post('Applications/waste_addSales/execute-proc', params);
|
||||
notify('wasteRecalc.recalcOk', 'positive');
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="q-pa-lg row justify-center">
|
||||
<QCard class="bg-light" style="width: 300px">
|
||||
<QCardSection>
|
||||
<VnInputDate
|
||||
class="q-mb-lg"
|
||||
v-model="dateFrom"
|
||||
:label="$t('globals.from')"
|
||||
rounded
|
||||
dense
|
||||
/>
|
||||
<VnInputDate
|
||||
class="q-mb-lg"
|
||||
v-model="dateTo"
|
||||
:options="optionsTo"
|
||||
:label="$t('globals.to')"
|
||||
:disable="!dateFrom"
|
||||
rounded
|
||||
dense
|
||||
/>
|
||||
<QBtn
|
||||
color="primary"
|
||||
text-color="white"
|
||||
:label="$t('globals.recalc')"
|
||||
:loading="isLoading"
|
||||
:disable="isLoading || !(dateFrom && dateTo)"
|
||||
@click="recalc()"
|
||||
/>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</div>
|
||||
</template>
|
|
@ -9,22 +9,27 @@ import VnTable from 'components/VnTable/VnTable.vue';
|
|||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const params = {
|
||||
daysOnward: 7,
|
||||
daysAgo: 3,
|
||||
};
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('customer.extendedList.tableVisibleColumns.id'),
|
||||
label: t('myEntries.id'),
|
||||
columnFilter: false,
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
visible: false,
|
||||
align: 'right',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: {
|
||||
name: 'fromShipped',
|
||||
label: t('fromShipped'),
|
||||
label: t('myEntries.fromShipped'),
|
||||
component: 'date',
|
||||
},
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
|
@ -32,11 +37,11 @@ const columns = computed(() => [
|
|||
{
|
||||
visible: false,
|
||||
align: 'left',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: {
|
||||
name: 'toShipped',
|
||||
label: t('toShipped'),
|
||||
label: t('myEntries.toShipped'),
|
||||
component: 'date',
|
||||
},
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
|
@ -44,14 +49,14 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: t('shipped'),
|
||||
label: t('myEntries.shipped'),
|
||||
name: 'shipped',
|
||||
columnFilter: false,
|
||||
format: ({ shipped }) => toDate(shipped),
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
label: t('landed'),
|
||||
label: t('myEntries.landed'),
|
||||
name: 'landed',
|
||||
columnFilter: false,
|
||||
format: ({ landed }) => toDate(landed),
|
||||
|
@ -59,26 +64,36 @@ const columns = computed(() => [
|
|||
|
||||
{
|
||||
align: 'right',
|
||||
label: t('globals.wareHouseIn'),
|
||||
label: t('myEntries.wareHouseIn'),
|
||||
name: 'warehouseInFk',
|
||||
format: (row) => row.warehouseInName,
|
||||
format: (row) => {
|
||||
row.warehouseInName;
|
||||
},
|
||||
cardVisible: true,
|
||||
columnFilter: {
|
||||
name: 'warehouseInFk',
|
||||
label: t('myEntries.warehouseInFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'warehouses',
|
||||
fields: ['id', 'name'],
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
},
|
||||
alias: 't',
|
||||
},
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('globals.daysOnward'),
|
||||
name: 'days',
|
||||
label: t('myEntries.daysOnward'),
|
||||
name: 'daysOnward',
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('myEntries.daysAgo'),
|
||||
name: 'daysAgo',
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
|
@ -88,6 +103,7 @@ const columns = computed(() => [
|
|||
{
|
||||
title: t('printLabels'),
|
||||
icon: 'print',
|
||||
isPrimary: true,
|
||||
action: (row) => printBuys(row.id),
|
||||
},
|
||||
],
|
||||
|
@ -114,9 +130,11 @@ const printBuys = (rowId) => {
|
|||
data-key="myEntriesList"
|
||||
url="Entries/filter"
|
||||
:columns="columns"
|
||||
:user-params="params"
|
||||
default-mode="card"
|
||||
order="shipped DESC"
|
||||
auto-load
|
||||
chip-locale="myEntries"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -6,9 +6,17 @@ entryFilter:
|
|||
filter:
|
||||
search: General search
|
||||
reference: Reference
|
||||
myEntries:
|
||||
id: ID
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
fromShipped: Shipped(from)
|
||||
toShipped: Shipped(to)
|
||||
printLabels: Print stickers
|
||||
printLabel: Print sticker
|
||||
viewLabel: View sticker
|
||||
wareHouseIn: Warehouse in
|
||||
warehouseInFk: Warehouse in
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
wasteRecalc:
|
||||
recalcOk: The wastes were successfully recalculated
|
||||
|
|
|
@ -9,10 +9,17 @@ entryFilter:
|
|||
filter:
|
||||
search: Búsqueda general
|
||||
reference: Referencia
|
||||
|
||||
myEntries:
|
||||
id: ID
|
||||
landed: F. llegada
|
||||
shipped: F. salida
|
||||
fromShipped: F. salida(desde)
|
||||
toShipped: F. salida(hasta)
|
||||
printLabels: Imprimir etiquetas
|
||||
printLabel: Imprimir etiqueta
|
||||
viewLabel: Ver etiqueta
|
||||
wareHouseIn: Alm. entrada
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
wasteRecalc:
|
||||
recalcOk: Se han recalculado las mermas correctamente
|
||||
|
|
|
@ -281,6 +281,7 @@ async function onSubmit() {
|
|||
v-else
|
||||
icon="add_circle"
|
||||
round
|
||||
shortcut="+"
|
||||
padding="xs"
|
||||
@click="setCreateDms()"
|
||||
>
|
||||
|
|
|
@ -230,7 +230,7 @@ async function insert() {
|
|||
</template>
|
||||
</CrudModel>
|
||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||
<QBtn color="primary" icon="add" size="lg" round @click="insert" />
|
||||
<QBtn color="primary" icon="add" shortcut="+" size="lg" round @click="insert" />
|
||||
</QPageSticky>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -224,6 +224,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
<QBtn
|
||||
color="primary"
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
size="lg"
|
||||
round
|
||||
@click="invoiceInFormRef.insert()"
|
||||
|
|
|
@ -274,10 +274,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
:label="t('invoiceIn.summary.company')"
|
||||
:value="entity.company?.code"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('invoiceIn.summary.booked')"
|
||||
:value="invoiceIn?.isBooked"
|
||||
/>
|
||||
<VnLv :label="t('invoiceIn.isBooked')" :value="invoiceIn?.isBooked" />
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
|
|
|
@ -405,6 +405,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
|||
color="primary"
|
||||
icon="add"
|
||||
size="lg"
|
||||
shortcut="+"
|
||||
round
|
||||
@click="invoiceInFormRef.insert()"
|
||||
>
|
||||
|
|
|
@ -116,7 +116,7 @@ const activities = ref([]);
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.isBooked')"
|
||||
:label="t('invoiceIn.isBooked')"
|
||||
v-model="params.isBooked"
|
||||
@update:model-value="searchFn()"
|
||||
toggle-indeterminate
|
||||
|
@ -170,7 +170,7 @@ es:
|
|||
awb: AWB
|
||||
amount: Importe
|
||||
issued: Emitida
|
||||
isBooked: Conciliada
|
||||
isBooked: Contabilizada
|
||||
account: Cuenta contable
|
||||
created: Creada
|
||||
dued: Vencida
|
||||
|
|
|
@ -65,7 +65,7 @@ const cols = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'isBooked',
|
||||
label: t('invoiceIn.list.isBooked'),
|
||||
label: t('invoiceIn.isBooked'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
invoiceIn:
|
||||
serial: Serial
|
||||
isBooked: Is booked
|
||||
list:
|
||||
ref: Reference
|
||||
supplier: Supplier
|
||||
|
@ -7,7 +8,6 @@ invoiceIn:
|
|||
serial: Serial
|
||||
file: File
|
||||
issued: Issued
|
||||
isBooked: Is booked
|
||||
awb: AWB
|
||||
amount: Amount
|
||||
card:
|
||||
|
@ -31,7 +31,6 @@ invoiceIn:
|
|||
sage: Sage withholding
|
||||
vat: Undeductible VAT
|
||||
company: Company
|
||||
booked: Booked
|
||||
expense: Expense
|
||||
taxableBase: Taxable base
|
||||
rate: Rate
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
invoiceIn:
|
||||
serial: Serie
|
||||
isBooked: Contabilizada
|
||||
list:
|
||||
ref: Referencia
|
||||
supplier: Proveedor
|
||||
|
@ -7,7 +8,6 @@ invoiceIn:
|
|||
shortIssued: F. emisión
|
||||
file: Fichero
|
||||
issued: Fecha emisión
|
||||
isBooked: Conciliada
|
||||
awb: AWB
|
||||
amount: Importe
|
||||
card:
|
||||
|
@ -31,7 +31,6 @@ invoiceIn:
|
|||
sage: Retención sage
|
||||
vat: Iva no deducible
|
||||
company: Empresa
|
||||
booked: Contabilizada
|
||||
expense: Gasto
|
||||
taxableBase: Base imp.
|
||||
rate: Tasa
|
||||
|
|
|
@ -9,7 +9,6 @@ import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue';
|
|||
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
|
@ -30,8 +29,6 @@ const $props = defineProps({
|
|||
|
||||
const { notify } = useNotify();
|
||||
const router = useRouter();
|
||||
const session = useSession();
|
||||
const token = session.getToken();
|
||||
const { t } = useI18n();
|
||||
const { openReport, sendEmail } = usePrintService();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue