Compare commits
1 Commits
dev
...
hotfix-ter
Author | SHA1 | Date |
---|---|---|
Carlos Satorres | d9b3d83209 |
270
CHANGELOG.md
270
CHANGELOG.md
|
@ -1,273 +1,3 @@
|
||||||
# Version 24.50 - 2024-12-10
|
|
||||||
|
|
||||||
### Added 🆕
|
|
||||||
|
|
||||||
- feat: add reportFileName option by:Javier Segarra
|
|
||||||
- feat: all clients just with global series by:jgallego
|
|
||||||
- feat: improve Merge branch 'test' into dev by:Javier Segarra
|
|
||||||
- feat: manual invoice in two lines by:jgallego
|
|
||||||
- feat: manualInvoice with address by:jgallego
|
|
||||||
- feat: randomize functions and example by:Javier Segarra
|
|
||||||
- feat: refs #6999 added search when user tabs on a filter with value by:Jon
|
|
||||||
- feat: refs #6999 added tab to search in VnTable filter by:Jon
|
|
||||||
- feat: refs #7346 #7346 improve form by:Javier Segarra
|
|
||||||
- feat: refs #7346 address ordered by:jgallego
|
|
||||||
- feat: refs #7346 radioButton by:jgallego
|
|
||||||
- feat: refs #7346 style radioButton by:jgallego
|
|
||||||
- feat: refs #7346 traducciones en cammelCase (7346-manualInvoice) by:jgallego
|
|
||||||
- feat: refs #8038 added new functionality in VnSelect and refactor styles by:Jon
|
|
||||||
- feat: refs #8061 #8061 updates by:Javier Segarra
|
|
||||||
- feat: refs #8087 reactive data by:jorgep
|
|
||||||
- feat: refs #8087 refs#8087 Redadas en travel by:Carlos Andrés
|
|
||||||
- feat: refs #8138 add component ticket problems by:pablone
|
|
||||||
- feat: refs #8163 add max length and more tests by:wbuezas
|
|
||||||
- feat: refs #8163 add prop by:wbuezas
|
|
||||||
- feat: refs #8163 add VnInput insert functionality and e2e test by:wbuezas
|
|
||||||
- feat: refs #8163 limit with maxLength by:Javier Segarra
|
|
||||||
- feat: refs #8163 maxLength SupplierFD account by:Javier Segarra
|
|
||||||
- feat: refs #8163 maxLengthVnInput by:Javier Segarra
|
|
||||||
- feat: refs #8163 use VnAccountNumber in VnAccountNumber by:Javier Segarra
|
|
||||||
- feat: refs #8166 show notification by:jorgep
|
|
||||||
|
|
||||||
### Changed 📦
|
|
||||||
|
|
||||||
- feat: refs #8038 added new functionality in VnSelect and refactor styles by:Jon
|
|
||||||
- perf: add dataCy by:Javier Segarra
|
|
||||||
- perf: refs #7346 #7346 Imrpove interface dialog by:Javier Segarra
|
|
||||||
- perf: refs #7346 #7346 use v-show instead v-if by:Javier Segarra
|
|
||||||
- perf: refs #8036 currentFilter by:alexm
|
|
||||||
- perf: refs #8061 filter autonomy by:Javier Segarra
|
|
||||||
- perf: refs #8061 solve conflicts and random posCode it by:Javier Segarra
|
|
||||||
- perf: refs #8061 use opts from VnSelect by:Javier Segarra
|
|
||||||
- perf: refs #8163 #8061 createNewPostCodeForm by:Javier Segarra
|
|
||||||
- perf: remove console by:Javier Segarra
|
|
||||||
- perf: remove timeout by:Javier Segarra
|
|
||||||
- perf: test command fillInForm by:Javier Segarra
|
|
||||||
- refactor: refs #8162 remove comment by:wbuezas
|
|
||||||
- refactor: remove unnecesary things by:wbuezas
|
|
||||||
|
|
||||||
### Fixed 🛠️
|
|
||||||
|
|
||||||
- fix: #8016 fetching data by:Javier Segarra
|
|
||||||
- fix: icons by:jgallego
|
|
||||||
- fix: refs #7229 download file by:jorgep
|
|
||||||
- fix: refs #7229 remove catch by:jorgep
|
|
||||||
- fix: refs #7229 set url by:jorgep
|
|
||||||
- fix: refs #7229 test by:jorgep
|
|
||||||
- fix: refs #7229 url by:jorgep
|
|
||||||
- fix: refs #7229 url + test by:jorgep
|
|
||||||
- fix: refs #7304 7304 clean warning by:carlossa
|
|
||||||
- fix: refs #7304 fix list by:carlossa
|
|
||||||
- fix: refs #7304 fix warning by:carlossa
|
|
||||||
- fix: refs #7346 traslations by:jgallego
|
|
||||||
- fix: refs #7529 add save by:carlossa
|
|
||||||
- fix: refs #7529 fix e2e by:carlossa
|
|
||||||
- fix: refs #7529 fix front by:carlossa
|
|
||||||
- fix: refs #7529 fix scss by:carlossa
|
|
||||||
- fix: refs #7529 fix te2e by:carlossa
|
|
||||||
- fix: refs #7529 fix workerPit e2e by:carlossa
|
|
||||||
- fix: refs #7529 front by:carlossa
|
|
||||||
- fix: refs #8036 apply exprBuilder after save filters by:alexm
|
|
||||||
- fix: refs #8036 only add where when required by:alexm
|
|
||||||
- fix: refs #8038 solve conflicts by:Jon
|
|
||||||
- fix: refs #8061 improve code dependencies (origin/8061_improve_newCP) by:Javier Segarra
|
|
||||||
- fix: refs #8138 move component from ui folder by:pablone
|
|
||||||
- fix: refs #8138 sme minor issues by:pablone
|
|
||||||
- fix: refs #8163 #8061 createNewPostCodeForm by:Javier Segarra
|
|
||||||
- fix: refs #8163 minor problem when keypress by:Javier Segarra
|
|
||||||
- fix: refs #8166 show zone error by:jorgep
|
|
||||||
- fix: removed selectedClient by:jgallego
|
|
||||||
- refs #7529 fix workerPit by:carlossa
|
|
||||||
- revert: refs #8061 test #8061 updates by:Javier Segarra
|
|
||||||
- test: fix own test by:Javier Segarra
|
|
||||||
- test: refs #8162 #8162 fix TicketList spec by:Javier Segarra
|
|
||||||
|
|
||||||
# Version 24.48 - 2024-11-25
|
|
||||||
|
|
||||||
### Added 🆕
|
|
||||||
|
|
||||||
- chore: correct checkNotification (fix_customer_issues) by:alexm
|
|
||||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
|
||||||
- chore: refs #6818 add spaces by:jorgep
|
|
||||||
- chore: refs #6818 drop useless code & comment by:jorgep
|
|
||||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
|
||||||
- chore: refs #7524 fix test by:jorgep
|
|
||||||
- chore: refs #8039 not required by:alexm
|
|
||||||
- chore: refs #8078 fiz tests by:jorgep
|
|
||||||
- chore: refs #8078 rollback ref by:jorgep
|
|
||||||
- chore: remove console.log (warmFix_invoiceOut_Global) by:alexm
|
|
||||||
- chore: typo (fix_itemType-redirection) by:alexm
|
|
||||||
- feat: #6943 use openURL quasar by:Javier Segarra
|
|
||||||
- feat: #7782 add cypress report by:Javier Segarra
|
|
||||||
- feat: #7782 cypress.config watchForFileChanges by:Javier Segarra
|
|
||||||
- feat: #7782 npm run resetDatabase by:Javier Segarra
|
|
||||||
- feat: #7782 waitUntil domContentLoad by:Javier Segarra
|
|
||||||
- feat: added composable to confirm orders by:Jon
|
|
||||||
- feat: add /reports in gitignore (warmFix_reports_in_gitignore) by:alexm
|
|
||||||
- feat: apply changes for customerModule by:Javier Segarra
|
|
||||||
- feat: disabled buttons by:Javier Segarra
|
|
||||||
- feat: move buttons to DescriptorMenu by:Javier Segarra
|
|
||||||
- feat: refs #6818 add icon by:jorgep
|
|
||||||
- feat: refs #6818 fetch url & default channel by:jorgep
|
|
||||||
- feat: refs #6818 saysimple integration by:jorgep
|
|
||||||
- feat: refs #6839 module searching (6839-addSearchMenu) by:jorgep
|
|
||||||
- feat: refs #6839 normalize search by:jorgep
|
|
||||||
- feat: refs #6919 sync entry data by:jorgep
|
|
||||||
- feat: refs #7006 itemType basic data new inputs by:guillermo
|
|
||||||
- feat: refs #7006 itemTypeLog added by:guillermo
|
|
||||||
- feat: refs #7193 modified parking to use the scope and corrected small errors by:Jon
|
|
||||||
- feat: refs #7206 added inactive label and corrected minor errors by:Jon
|
|
||||||
- feat: refs #7308 #7308 remove warnings related to useSession by:Javier Segarra
|
|
||||||
- feat: refs #7349 usa back con permisos by:jgallego
|
|
||||||
- feat: refs #7524 add front test by:jorgep
|
|
||||||
- feat: refs #7874 improve vn-notes ui by:jorgep
|
|
||||||
- feat: refs #7970 notify changes by:Jon
|
|
||||||
- feat(): refs #8039 canceledError not notify by:alexm
|
|
||||||
- feat: refs #8039 notify error unify by:alexm
|
|
||||||
- feat: refs #8039 show duplicate request in local by:alexm
|
|
||||||
- feat: refs #8078 add shortcut multi selection by:jorgep
|
|
||||||
- feat: refs #8078 add tests by:jorgep
|
|
||||||
- feat: refs#8087 Redadas en travel by:Carlos Andrés
|
|
||||||
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
|
|
||||||
- feat: remove comments by:Javier Segarra
|
|
||||||
- feat(Supplier): add companySize by:alexm
|
|
||||||
- feat: use composable to unify logic by:Javier Segarra
|
|
||||||
- feat(VnInput): empty to null by:alexm
|
|
||||||
- feat(VnSelect): order data equal salix by:alexm
|
|
||||||
- feat(VnSelect): refs #7136 add scroll (7136-vnSelect_paginate_simplify_2) by:alexm
|
|
||||||
|
|
||||||
### Changed 📦
|
|
||||||
|
|
||||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
|
||||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
|
||||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
|
||||||
- perf: minor bugs detected by:Javier Segarra
|
|
||||||
- perf: refs #6943 #6943 merge command by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 declare composable inst4ead code duplicated by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 handle composable i18n by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 handle i18n by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 i18n params by:Javier Segarra
|
|
||||||
- perf: refs #7308 #7308 remove comments by:Javier Segarra
|
|
||||||
- perf: remove appendParams by:Javier Segarra
|
|
||||||
- perf: use const in VnLocation by:Javier Segarra
|
|
||||||
- perf: use required instead :required="true" by:Javier Segarra
|
|
||||||
- refactor: apply QPopupProxy by:wbuezas
|
|
||||||
- refactor: changed confirmOrder directory by:Jon
|
|
||||||
- refactor: change keyup.enter for update:model-value by:wbuezas
|
|
||||||
- refactor(InvoiceInBasicData): use VnDms by:alexm
|
|
||||||
- refactor: modified composable by:Jon
|
|
||||||
- refactor: refs #6818 change channel source by:jorgep
|
|
||||||
- refactor: refs #6818 channel logic by:jorgep
|
|
||||||
- refactor: refs #6919 export filter by:jorgep
|
|
||||||
- refactor: refs #7132 1st wave of changes in global translations files by:Jon
|
|
||||||
- refactor: refs #7132 account's module translations by:Jon
|
|
||||||
- refactor: refs #7132 customer's module translations by:Jon
|
|
||||||
- refactor: refs #7132 deleted pageTitles repeated by:Jon
|
|
||||||
- refactor: refs #7132 delete duplicate translations' keys by:Jon
|
|
||||||
- refactor: refs #7132 deleted useless code by:Jon
|
|
||||||
- refactor: refs #7132 global translations files changed by:Jon
|
|
||||||
- refactor: refs #7266 Changed method name by:guillermo
|
|
||||||
- refactor: refs #7950 Created cmr model by:guillermo
|
|
||||||
- refactor: refs #7970 added emit by:Jon
|
|
||||||
- refactor: refs #7970 refactored VnConfirm to emit events by:Jon
|
|
||||||
- refactor: refs #8185 modified LeftMenu to avoid duplicates by:Jon
|
|
||||||
- refactor: remove unused variable by:wbuezas
|
|
||||||
- refactor: revert catalog changes by:Jon
|
|
||||||
- refactor: small change by:wbuezas
|
|
||||||
- test: refactor e2e by:alexm
|
|
||||||
- test: refs #8039 add hasNotify and, refactor: agencyWorkCenter test by:alexm
|
|
||||||
|
|
||||||
### Fixed 🛠️
|
|
||||||
|
|
||||||
- chore: refs #7524 fix test by:jorgep
|
|
||||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
|
||||||
- fix: catalog view category and type filter by:wbuezas
|
|
||||||
- fix: category and tags filters by:Jon
|
|
||||||
- fix: changed route.query by:Jon
|
|
||||||
- fix: change type vnput by:Javier Segarra
|
|
||||||
- fix(ClaimList): stateCode orderBy priority by:alexm
|
|
||||||
- fix: entryFilters by:carlossa
|
|
||||||
- fix: filter panel by:Jon
|
|
||||||
- fix(InvoiceOutGlobal): parallelism by:alexm
|
|
||||||
- fix: itemBotanical by:Javier Segarra
|
|
||||||
- fix: itemType redirection and fix filters by:alexm
|
|
||||||
- fix: logout spec (warmFix_logout.spec) by:alexm
|
|
||||||
- fix: merge errors by:alexm
|
|
||||||
- fix: order catalog by:wbuezas
|
|
||||||
- fix: order catalog fixes by:wbuezas
|
|
||||||
- fix: refs #6818 use right icon by:jorgep
|
|
||||||
- fix: refs #6896 fixed module problems by:Jon
|
|
||||||
- fix: refs #7193 fixed e2e test by:Jon
|
|
||||||
- fix: refs #7206 deleted duplicate code by:Jon
|
|
||||||
- fix: refs #7273 use same filter by:jorgep
|
|
||||||
- fix: refs #7283 #7283 bugs by:Javier Segarra
|
|
||||||
- fix: refs #7283 #7283 ItemDiary subToolbar by:Javier Segarra
|
|
||||||
- fix: refs #7283 #7283 ItemSummary bugs by:Javier Segarra
|
|
||||||
- fix: refs #7283 Account image resolution by:guillermo
|
|
||||||
- fix: refs #7283 css by:jorgep
|
|
||||||
- fix: refs #7283 filter by:carlossa
|
|
||||||
- fix: refs #7283 fix image by:carlossa
|
|
||||||
- fix: refs #7283 fix pr by:carlossa
|
|
||||||
- fix: refs #7283 fix preview by:carlossa
|
|
||||||
- fix: refs #7283 fix required by:carlossa
|
|
||||||
- fix: refs #7283 item filters by:carlossa
|
|
||||||
- fix: refs #7283 itemtype fix by:carlossa
|
|
||||||
- fix: refs #7283 order translation by:carlossa
|
|
||||||
- fix: refs #7283 preview by:carlossa
|
|
||||||
- fix: refs #7283 tooltips !Item by:Javier Segarra
|
|
||||||
- fix: refs #7306 clean warning by:carlossa
|
|
||||||
- fix: refs #7310 clean warning by:carlossa
|
|
||||||
- fix: refs #7323 locale #7396 by:jorgep
|
|
||||||
- fix: refs #7323 show advanced fields by:jorgep
|
|
||||||
- fix: refs #7349 dependencia no usada by:jgallego
|
|
||||||
- fix: refs #7524 e2e & worker module by:jorgep
|
|
||||||
- fix: refs #7874 add title by:jorgep
|
|
||||||
- fix: refs #7874 show name by:jorgep
|
|
||||||
- fix: refs #7943 use correct data-key by:jorgep
|
|
||||||
- fix: refs #7943 use summary by:jorgep
|
|
||||||
- fix: refs #8039 bad tests by:alexm
|
|
||||||
- fix: refs #8039 o not handle unnecessary errors by:alexm
|
|
||||||
- fix: refs #8078 e2e #7970 by:jorgep
|
|
||||||
- fix: refs #8078 handleSelection by:jorgep
|
|
||||||
- fix: refs #8078 improve cy command (8078-enableMultiSelection) by:jorgep
|
|
||||||
- fix: refs #8078 improve handleSelection by:jorgep
|
|
||||||
- fix: reset category by:wbuezas
|
|
||||||
- fix: tag chips by:Jon
|
|
||||||
- fix: vnSearchbar spec (warmFix_vnSearchBar.spec) by:alexm
|
|
||||||
- fix(VnSelect): setOptions when applyFilter by:alexm
|
|
||||||
- fix: worker test e2e by:Jon
|
|
||||||
- Merge branch 'dev' into fix_customer_issues by:Javier Segarra
|
|
||||||
- refactor: revert catalog changes by:Jon
|
|
||||||
- refs #7283 fix conflicts by:carlossa
|
|
||||||
- refs #7283 fix descriptorproxy by:carlossa
|
|
||||||
- refs #7283 fixedPrice by:carlossa
|
|
||||||
- refs #7283 fixedPrices by:carlossa
|
|
||||||
- refs #7283 fix itemFixed by:carlossa
|
|
||||||
- refs #7283 fix itemFixedPrice by:carlossa
|
|
||||||
- refs #7283 fix itemMigration by:carlossa
|
|
||||||
- refs #7283 fix itemMigration list filters by:carlossa
|
|
||||||
- refs #7283 fix items by:carlossa
|
|
||||||
- refs #7283 fix items error get images by:carlossa
|
|
||||||
- refs #7283 fix items images by:carlossa
|
|
||||||
- refs #7283 fix request by:carlossa
|
|
||||||
- refs #7283 fix searchbar by:carlossa
|
|
||||||
- refs #7283 fix viewSummary by:carlossa
|
|
||||||
- refs #7283 fix yml list basicData by:carlossa
|
|
||||||
- refs #7283 itemRequest fix by:carlossa
|
|
||||||
- refs #7283 itemRequest fix deny by:carlossa
|
|
||||||
- refs #7283 itemRequest fix reload by:carlossa
|
|
||||||
- refs #72983 fix filters by:carlossa
|
|
||||||
- revert: commit by:Javier Segarra
|
|
||||||
- revert e57a253c6f649382da187d1129449d265fb26d3b by:Javier Segarra
|
|
||||||
- test: #8162 fix clientList spec by:Javier Segarra
|
|
||||||
- test: #8162 fix vnLocation spec by:Javier Segarra
|
|
||||||
- test: fix arrayData by:Javier Segarra
|
|
||||||
- test: fix e2e by:alexm
|
|
||||||
- test: fix e2e by:Javier Segarra
|
|
||||||
- test: refs #8039 fix WorkerNotification e2e by:alexm
|
|
||||||
- test: refs #8039 fix ZoneWarehouse e2e by:alexm
|
|
||||||
- warmfix: ItemLastEntries to date (origin/warmfix_itemLastEntriesFilter) by:Javier Segarra
|
|
||||||
|
|
||||||
# Version 24.40 - 2024-10-02
|
# Version 24.40 - 2024-10-02
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -4,8 +4,7 @@ def PROTECTED_BRANCH
|
||||||
|
|
||||||
def BRANCH_ENV = [
|
def BRANCH_ENV = [
|
||||||
test: 'test',
|
test: 'test',
|
||||||
master: 'production',
|
master: 'production'
|
||||||
beta: 'production'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
node {
|
node {
|
||||||
|
@ -16,8 +15,7 @@ node {
|
||||||
PROTECTED_BRANCH = [
|
PROTECTED_BRANCH = [
|
||||||
'dev',
|
'dev',
|
||||||
'test',
|
'test',
|
||||||
'master',
|
'master'
|
||||||
'beta'
|
|
||||||
].contains(env.BRANCH_NAME)
|
].contains(env.BRANCH_NAME)
|
||||||
|
|
||||||
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
const { defineConfig } = require('cypress');
|
const { defineConfig } = require('cypress');
|
||||||
// https://docs.cypress.io/app/tooling/reporters
|
|
||||||
// https://docs.cypress.io/app/references/configuration
|
|
||||||
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
|
@ -19,7 +16,6 @@ module.exports = defineConfig({
|
||||||
reporterOptions: {
|
reporterOptions: {
|
||||||
charts: true,
|
charts: true,
|
||||||
reportPageTitle: 'Cypress Inline Reporter',
|
reportPageTitle: 'Cypress Inline Reporter',
|
||||||
reportFilename: '[status]_[datetime]-report',
|
|
||||||
embeddedScreenshots: true,
|
embeddedScreenshots: true,
|
||||||
reportDir: 'test/cypress/reports',
|
reportDir: 'test/cypress/reports',
|
||||||
inlineAssets: true,
|
inlineAssets: true,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.52.0",
|
"version": "24.44.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
import routes from 'src/router/modules';
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
|
|
||||||
let isNotified = false;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
created: function () {
|
|
||||||
const router = useRouter();
|
|
||||||
const keyBindingMap = routes
|
|
||||||
.filter((route) => route.meta.keyBinding)
|
|
||||||
.reduce((map, route) => {
|
|
||||||
map['Key' + route.meta.keyBinding.toUpperCase()] = route.path;
|
|
||||||
return map;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
|
||||||
const { ctrlKey, altKey, code } = event;
|
|
||||||
|
|
||||||
if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) {
|
|
||||||
event.preventDefault();
|
|
||||||
router.push(keyBindingMap[code]);
|
|
||||||
isNotified = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleKeyUp = (event) => {
|
|
||||||
const { ctrlKey, altKey } = event;
|
|
||||||
if (!ctrlKey || !altKey) {
|
|
||||||
isNotified = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
|
||||||
window.addEventListener('keyup', handleKeyUp);
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,52 +1,30 @@
|
||||||
function focusFirstInput(input) {
|
import { getCurrentInstance } from 'vue';
|
||||||
input.focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
export default {
|
export default {
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
const that = this;
|
const vm = getCurrentInstance();
|
||||||
|
if (vm.type.name === 'QForm') {
|
||||||
const form = document.querySelector('.q-form#formModel');
|
if (!['searchbarForm', 'filterPanelForm'].includes(this.$el?.id)) {
|
||||||
if (!form) return;
|
// TODO: AUTOFOCUS IS NOT FOCUSING
|
||||||
try {
|
const that = this;
|
||||||
const inputsFormCard = form.querySelectorAll(
|
this.$el.addEventListener('keyup', function (evt) {
|
||||||
`input:not([disabled]):not([type="checkbox"])`
|
if (evt.key === 'Enter') {
|
||||||
);
|
const input = evt.target;
|
||||||
if (inputsFormCard.length) {
|
if (input.type == 'textarea' && evt.shiftKey) {
|
||||||
focusFirstInput(inputsFormCard[0]);
|
evt.preventDefault();
|
||||||
|
let { selectionStart, selectionEnd } = input;
|
||||||
|
input.value =
|
||||||
|
input.value.substring(0, selectionStart) +
|
||||||
|
'\n' +
|
||||||
|
input.value.substring(selectionEnd);
|
||||||
|
selectionStart = selectionEnd = selectionStart + 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
evt.preventDefault();
|
||||||
|
that.onSubmit();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
const textareas = document.querySelectorAll(
|
|
||||||
'textarea:not([disabled]), [contenteditable]:not([disabled])'
|
|
||||||
);
|
|
||||||
if (textareas.length) {
|
|
||||||
focusFirstInput(textareas[textareas.length - 1]);
|
|
||||||
}
|
|
||||||
const inputs = document.querySelectorAll(
|
|
||||||
'form#formModel input:not([disabled]):not([type="checkbox"])'
|
|
||||||
);
|
|
||||||
const input = inputs[0];
|
|
||||||
if (!input) return;
|
|
||||||
|
|
||||||
focusFirstInput(input);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
}
|
}
|
||||||
form.addEventListener('keyup', function (evt) {
|
|
||||||
if (evt.key === 'Enter') {
|
|
||||||
const input = evt.target;
|
|
||||||
if (input.type == 'textarea' && evt.shiftKey) {
|
|
||||||
evt.preventDefault();
|
|
||||||
let { selectionStart, selectionEnd } = input;
|
|
||||||
input.value =
|
|
||||||
input.value.substring(0, selectionStart) +
|
|
||||||
'\n' +
|
|
||||||
input.value.substring(selectionEnd);
|
|
||||||
selectionStart = selectionEnd = selectionStart + 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
evt.preventDefault();
|
|
||||||
that.onSubmit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
import axios from 'axios';
|
|
||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
import qFormMixin from './qformMixin';
|
import qFormMixin from './qformMixin';
|
||||||
import keyShortcut from './keyShortcut';
|
import keyShortcut from './keyShortcut';
|
||||||
import { QForm } from 'quasar';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import { QLayout } from 'quasar';
|
import { CanceledError } from 'axios';
|
||||||
import mainShortcutMixin from './mainShortcutMixin';
|
|
||||||
import { useCau } from 'src/composables/useCau';
|
const { notify } = useNotify();
|
||||||
|
|
||||||
export default boot(({ app }) => {
|
export default boot(({ app }) => {
|
||||||
QForm.mixins = [qFormMixin];
|
app.mixin(qFormMixin);
|
||||||
QLayout.mixins = [mainShortcutMixin];
|
|
||||||
|
|
||||||
app.directive('shortcut', keyShortcut);
|
app.directive('shortcut', keyShortcut);
|
||||||
app.config.errorHandler = async (error) => {
|
app.config.errorHandler = (error) => {
|
||||||
let message;
|
let message;
|
||||||
const response = error.response;
|
const response = error.response;
|
||||||
const responseData = response?.data;
|
const responseData = response?.data;
|
||||||
|
@ -43,12 +40,12 @@ export default boot(({ app }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error(error);
|
console.error(error);
|
||||||
if (error instanceof axios.CanceledError) {
|
if (error instanceof CanceledError) {
|
||||||
const env = process.env.NODE_ENV;
|
const env = process.env.NODE_ENV;
|
||||||
if (env && env !== 'development') return;
|
if (env && env !== 'development') return;
|
||||||
message = 'Duplicate request';
|
message = 'Duplicate request';
|
||||||
}
|
}
|
||||||
|
|
||||||
await useCau(response, message);
|
notify(message ?? 'globals.error', 'negative', 'error');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,8 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import FormModelPopup from './FormModelPopup.vue';
|
import FormModelPopup from './FormModelPopup.vue';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
|
||||||
|
defineProps({ showEntityField: { type: Boolean, default: true } });
|
||||||
|
|
||||||
const emit = defineEmits(['onDataSaved']);
|
const emit = defineEmits(['onDataSaved']);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const bicInputRef = ref(null);
|
const bicInputRef = ref(null);
|
||||||
|
@ -16,16 +18,17 @@ const state = useState();
|
||||||
|
|
||||||
const customer = computed(() => state.get('customer'));
|
const customer = computed(() => state.get('customer'));
|
||||||
|
|
||||||
const countriesFilter = {
|
|
||||||
fields: ['id', 'name', 'code'],
|
|
||||||
};
|
|
||||||
|
|
||||||
const bankEntityFormData = reactive({
|
const bankEntityFormData = reactive({
|
||||||
name: null,
|
name: null,
|
||||||
bic: null,
|
bic: null,
|
||||||
countryFk: customer.value?.countryFk,
|
countryFk: customer.value?.countryFk,
|
||||||
|
id: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const countriesFilter = {
|
||||||
|
fields: ['id', 'name', 'code'],
|
||||||
|
};
|
||||||
|
|
||||||
const countriesOptions = ref([]);
|
const countriesOptions = ref([]);
|
||||||
|
|
||||||
const onDataSaved = (...args) => {
|
const onDataSaved = (...args) => {
|
||||||
|
@ -41,6 +44,7 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Countries"
|
url="Countries"
|
||||||
|
:filter="countriesFilter"
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (countriesOptions = data)"
|
@on-fetch="(data) => (countriesOptions = data)"
|
||||||
/>
|
/>
|
||||||
|
@ -50,7 +54,6 @@ onMounted(async () => {
|
||||||
:title="t('title')"
|
:title="t('title')"
|
||||||
:subtitle="t('subtitle')"
|
:subtitle="t('subtitle')"
|
||||||
:form-initial-data="bankEntityFormData"
|
:form-initial-data="bankEntityFormData"
|
||||||
:filter="countriesFilter"
|
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="onDataSaved"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data, validate }">
|
<template #form-inputs="{ data, validate }">
|
||||||
|
@ -82,13 +85,7 @@ onMounted(async () => {
|
||||||
:rules="validate('bankEntity.countryFk')"
|
:rules="validate('bankEntity.countryFk')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-if="showEntityField" class="col">
|
||||||
v-if="
|
|
||||||
countriesOptions.find((c) => c.id === data.countryFk)?.code ==
|
|
||||||
'ES'
|
|
||||||
"
|
|
||||||
class="col"
|
|
||||||
>
|
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('id')"
|
:label="t('id')"
|
||||||
v-model="data.id"
|
v-model="data.id"
|
||||||
|
|
|
@ -0,0 +1,155 @@
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, computed } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import FormModelPopup from './FormModelPopup.vue';
|
||||||
|
import VnInputDate from './common/VnInputDate.vue';
|
||||||
|
|
||||||
|
const emit = defineEmits(['onDataSaved']);
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const manualInvoiceFormData = reactive({
|
||||||
|
maxShipped: Date.vnNew(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const formModelPopupRef = ref();
|
||||||
|
const invoiceOutSerialsOptions = ref([]);
|
||||||
|
const taxAreasOptions = ref([]);
|
||||||
|
const ticketsOptions = ref([]);
|
||||||
|
const clientsOptions = ref([]);
|
||||||
|
const isLoading = computed(() => formModelPopupRef.value?.isLoading);
|
||||||
|
|
||||||
|
const onDataSaved = async (formData, requestResponse) => {
|
||||||
|
emit('onDataSaved', formData, requestResponse);
|
||||||
|
if (requestResponse && requestResponse.id)
|
||||||
|
router.push({ name: 'InvoiceOutSummary', params: { id: requestResponse.id } });
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="InvoiceOutSerials"
|
||||||
|
:filter="{ where: { code: { neq: 'R' } }, order: ['code'] }"
|
||||||
|
@on-fetch="(data) => (invoiceOutSerialsOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="TaxAreas"
|
||||||
|
:filter="{ order: ['code'] }"
|
||||||
|
@on-fetch="(data) => (taxAreasOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FormModelPopup
|
||||||
|
ref="formModelPopupRef"
|
||||||
|
:title="t('Create manual invoice')"
|
||||||
|
url-create="InvoiceOuts/createManualInvoice"
|
||||||
|
model="invoiceOut"
|
||||||
|
:form-initial-data="manualInvoiceFormData"
|
||||||
|
@on-data-saved="onDataSaved"
|
||||||
|
>
|
||||||
|
<template #form-inputs="{ data }">
|
||||||
|
<span v-if="isLoading" class="text-primary invoicing-text">
|
||||||
|
<QIcon name="warning" class="fill-icon q-mr-sm" size="md" />
|
||||||
|
{{ t('Invoicing in progress...') }}
|
||||||
|
</span>
|
||||||
|
<VnRow>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Ticket')"
|
||||||
|
:options="ticketsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="id"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.ticketFk"
|
||||||
|
@update:model-value="data.clientFk = null"
|
||||||
|
url="Tickets"
|
||||||
|
:where="{ refFk: null }"
|
||||||
|
:fields="['id', 'nickname']"
|
||||||
|
:filter-options="{ order: 'shipped DESC' }"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel> #{{ scope.opt?.id }} </QItemLabel>
|
||||||
|
<QItemLabel caption>{{ scope.opt?.nickname }}</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
|
<span class="row items-center" style="max-width: max-content">{{
|
||||||
|
t('Or')
|
||||||
|
}}</span>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Client')"
|
||||||
|
:options="clientsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.clientFk"
|
||||||
|
@update:model-value="data.ticketFk = null"
|
||||||
|
url="Clients"
|
||||||
|
:fields="['id', 'name']"
|
||||||
|
:filter-options="{ order: 'name ASC' }"
|
||||||
|
/>
|
||||||
|
<VnInputDate :label="t('Max date')" v-model="data.maxShipped" />
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Serial')"
|
||||||
|
:options="invoiceOutSerialsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="description"
|
||||||
|
option-value="code"
|
||||||
|
v-model="data.serial"
|
||||||
|
/>
|
||||||
|
<VnSelect
|
||||||
|
:label="t('Area')"
|
||||||
|
:options="taxAreasOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="code"
|
||||||
|
option-value="code"
|
||||||
|
v-model="data.taxArea"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnInput
|
||||||
|
:label="t('Reference')"
|
||||||
|
type="textarea"
|
||||||
|
v-model="data.reference"
|
||||||
|
fill-input
|
||||||
|
autogrow
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
</template>
|
||||||
|
</FormModelPopup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.invoicing-text {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: $primary;
|
||||||
|
font-size: 24px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Create manual invoice: Crear factura manual
|
||||||
|
Ticket: Ticket
|
||||||
|
Client: Cliente
|
||||||
|
Max date: Fecha límite
|
||||||
|
Serial: Serie
|
||||||
|
Area: Area
|
||||||
|
Reference: Referencia
|
||||||
|
Or: O
|
||||||
|
Invoicing in progress...: Facturación en progreso...
|
||||||
|
</i18n>
|
|
@ -17,6 +17,10 @@ const $props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
provinces: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -40,23 +44,19 @@ const onDataSaved = (...args) => {
|
||||||
url-create="towns"
|
url-create="towns"
|
||||||
model="city"
|
model="city"
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="onDataSaved"
|
||||||
data-cy="newCityForm"
|
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data, validate }">
|
<template #form-inputs="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Name')"
|
:label="t('Names')"
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
:rules="validate('city.name')"
|
:rules="validate('city.name')"
|
||||||
required
|
|
||||||
data-cy="cityName"
|
|
||||||
/>
|
/>
|
||||||
<VnSelectProvince
|
<VnSelectProvince
|
||||||
:province-selected="$props.provinceSelected"
|
:province-selected="$props.provinceSelected"
|
||||||
:country-fk="$props.countryFk"
|
:country-fk="$props.countryFk"
|
||||||
v-model="data.provinceFk"
|
v-model="data.provinceFk"
|
||||||
required
|
:provinces="$props.provinces"
|
||||||
data-cy="provinceCity"
|
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
@ -21,14 +21,13 @@ const postcodeFormData = reactive({
|
||||||
provinceFk: null,
|
provinceFk: null,
|
||||||
townFk: null,
|
townFk: null,
|
||||||
});
|
});
|
||||||
const townsFetchDataRef = ref(false);
|
|
||||||
const townFilter = ref({});
|
|
||||||
|
|
||||||
const countriesRef = ref(false);
|
const townsFetchDataRef = ref(null);
|
||||||
|
const provincesFetchDataRef = ref(null);
|
||||||
|
const countriesOptions = ref([]);
|
||||||
const provincesOptions = ref([]);
|
const provincesOptions = ref([]);
|
||||||
const townsOptions = ref([]);
|
const townsOptions = ref([]);
|
||||||
const town = ref({});
|
const town = ref({});
|
||||||
const countryFilter = ref({});
|
|
||||||
|
|
||||||
function onDataSaved(formData) {
|
function onDataSaved(formData) {
|
||||||
const newPostcode = {
|
const newPostcode = {
|
||||||
|
@ -40,91 +39,110 @@ function onDataSaved(formData) {
|
||||||
({ id }) => id === formData.provinceFk
|
({ id }) => id === formData.provinceFk
|
||||||
);
|
);
|
||||||
newPostcode.province = provinceObject?.name;
|
newPostcode.province = provinceObject?.name;
|
||||||
const countryObject = countriesRef.value.opts.find(
|
const countryObject = countriesOptions.value.find(
|
||||||
({ id }) => id === formData.countryFk
|
({ id }) => id === formData.countryFk
|
||||||
);
|
);
|
||||||
newPostcode.country = countryObject?.name;
|
newPostcode.country = countryObject?.name;
|
||||||
emit('onDataSaved', newPostcode);
|
emit('onDataSaved', newPostcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setCountry(countryFk, data) {
|
|
||||||
data.townFk = null;
|
|
||||||
data.provinceFk = null;
|
|
||||||
data.countryFk = countryFk;
|
|
||||||
await fetchTowns();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Province
|
|
||||||
|
|
||||||
async function handleProvinces(data) {
|
|
||||||
provincesOptions.value = data;
|
|
||||||
if (postcodeFormData.countryFk) {
|
|
||||||
await fetchTowns();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async function setProvince(id, data) {
|
|
||||||
if (data.provinceFk === id) return;
|
|
||||||
const newProvince = provincesOptions.value.find((province) => province.id == id);
|
|
||||||
if (newProvince) data.countryFk = newProvince.countryFk;
|
|
||||||
postcodeFormData.provinceFk = id;
|
|
||||||
await fetchTowns();
|
|
||||||
}
|
|
||||||
async function onProvinceCreated(data) {
|
|
||||||
postcodeFormData.provinceFk = data.id;
|
|
||||||
}
|
|
||||||
function provinceByCountry(countryFk = postcodeFormData.countryFk) {
|
|
||||||
return provincesOptions.value
|
|
||||||
.filter((province) => province.countryFk === countryFk)
|
|
||||||
.map(({ id }) => id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Town
|
|
||||||
async function handleTowns(data) {
|
|
||||||
townsOptions.value = data;
|
|
||||||
}
|
|
||||||
function setTown(newTown, data) {
|
|
||||||
town.value = newTown;
|
|
||||||
data.provinceFk = newTown?.provinceFk ?? newTown;
|
|
||||||
data.countryFk = newTown?.province?.countryFk ?? newTown;
|
|
||||||
}
|
|
||||||
async function onCityCreated(newTown, formData) {
|
async function onCityCreated(newTown, formData) {
|
||||||
|
await provincesFetchDataRef.value.fetch();
|
||||||
newTown.province = provincesOptions.value.find(
|
newTown.province = provincesOptions.value.find(
|
||||||
(province) => province.id === newTown.provinceFk
|
(province) => province.id === newTown.provinceFk
|
||||||
);
|
);
|
||||||
formData.townFk = newTown;
|
formData.townFk = newTown;
|
||||||
setTown(newTown, formData);
|
setTown(newTown, formData);
|
||||||
}
|
}
|
||||||
async function fetchTowns(countryFk = postcodeFormData.countryFk) {
|
|
||||||
if (!countryFk) return;
|
function setTown(newTown, data) {
|
||||||
const provinces = postcodeFormData.provinceFk
|
if (!newTown) return;
|
||||||
? [postcodeFormData.provinceFk]
|
town.value = newTown;
|
||||||
: provinceByCountry();
|
data.provinceFk = newTown.provinceFk;
|
||||||
townFilter.value.where = {
|
data.countryFk = newTown.province.countryFk;
|
||||||
provinceFk: {
|
|
||||||
inq: provinces,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
await townsFetchDataRef.value?.fetch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function filterTowns(name) {
|
async function setProvince(id, data) {
|
||||||
if (name !== '') {
|
const newProvince = provincesOptions.value.find((province) => province.id == id);
|
||||||
townFilter.value.where = {
|
if (!newProvince) return;
|
||||||
name: {
|
|
||||||
like: `%${name}%`,
|
data.countryFk = newProvince.countryFk;
|
||||||
},
|
}
|
||||||
};
|
|
||||||
await townsFetchDataRef.value?.fetch();
|
async function onProvinceCreated(data) {
|
||||||
|
await provincesFetchDataRef.value.fetch({
|
||||||
|
where: { countryFk: postcodeFormData.countryFk },
|
||||||
|
});
|
||||||
|
postcodeFormData.provinceFk.value = data.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => [postcodeFormData.countryFk],
|
||||||
|
async (newCountryFk, oldValueFk) => {
|
||||||
|
if (Array.isArray(newCountryFk)) {
|
||||||
|
newCountryFk = newCountryFk[0];
|
||||||
|
}
|
||||||
|
if (Array.isArray(oldValueFk)) {
|
||||||
|
oldValueFk = oldValueFk[0];
|
||||||
|
}
|
||||||
|
if (!!oldValueFk && newCountryFk !== oldValueFk) {
|
||||||
|
postcodeFormData.provinceFk = null;
|
||||||
|
postcodeFormData.townFk = null;
|
||||||
|
}
|
||||||
|
if (oldValueFk !== newCountryFk) {
|
||||||
|
await provincesFetchDataRef.value.fetch({
|
||||||
|
where: {
|
||||||
|
countryFk: newCountryFk,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
await townsFetchDataRef.value.fetch({
|
||||||
|
where: {
|
||||||
|
provinceFk: {
|
||||||
|
inq: provincesOptions.value.map(({ id }) => id),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => postcodeFormData.provinceFk,
|
||||||
|
async (newProvinceFk, oldValueFk) => {
|
||||||
|
if (Array.isArray(newProvinceFk)) {
|
||||||
|
newProvinceFk = newProvinceFk[0];
|
||||||
|
}
|
||||||
|
if (newProvinceFk !== oldValueFk) {
|
||||||
|
await townsFetchDataRef.value.fetch({
|
||||||
|
where: { provinceFk: newProvinceFk },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
async function handleProvinces(data) {
|
||||||
|
provincesOptions.value = data;
|
||||||
|
}
|
||||||
|
async function handleTowns(data) {
|
||||||
|
townsOptions.value = data;
|
||||||
|
}
|
||||||
|
async function handleCountries(data) {
|
||||||
|
countriesOptions.value = data;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
ref="provincesFetchDataRef"
|
||||||
|
@on-fetch="handleProvinces"
|
||||||
|
:sort-by="['name ASC']"
|
||||||
|
:limit="30"
|
||||||
|
auto-load
|
||||||
|
url="Provinces/location"
|
||||||
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="townsFetchDataRef"
|
ref="townsFetchDataRef"
|
||||||
:sort-by="['name ASC']"
|
:sort-by="['name ASC']"
|
||||||
:limit="30"
|
:limit="30"
|
||||||
:filter="townFilter"
|
|
||||||
@on-fetch="handleTowns"
|
@on-fetch="handleTowns"
|
||||||
auto-load
|
auto-load
|
||||||
url="Towns/location"
|
url="Towns/location"
|
||||||
|
@ -146,13 +164,10 @@ async function filterTowns(name) {
|
||||||
v-model="data.code"
|
v-model="data.code"
|
||||||
:rules="validate('postcode.code')"
|
:rules="validate('postcode.code')"
|
||||||
clearable
|
clearable
|
||||||
required
|
|
||||||
data-cy="locationPostcode"
|
|
||||||
/>
|
/>
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
:label="t('City')"
|
:label="t('City')"
|
||||||
@update:model-value="(value) => setTown(value, data)"
|
@update:model-value="(value) => setTown(value, data)"
|
||||||
@filter="filterTowns"
|
|
||||||
:tooltip="t('Create city')"
|
:tooltip="t('Create city')"
|
||||||
v-model="data.townFk"
|
v-model="data.townFk"
|
||||||
:options="townsOptions"
|
:options="townsOptions"
|
||||||
|
@ -161,8 +176,7 @@ async function filterTowns(name) {
|
||||||
:rules="validate('postcode.city')"
|
:rules="validate('postcode.city')"
|
||||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
||||||
:emit-value="false"
|
:emit-value="false"
|
||||||
required
|
:clearable="true"
|
||||||
data-cy="locationTown"
|
|
||||||
>
|
>
|
||||||
<template #option="{ itemProps, opt }">
|
<template #option="{ itemProps, opt }">
|
||||||
<QItem v-bind="itemProps">
|
<QItem v-bind="itemProps">
|
||||||
|
@ -179,6 +193,7 @@ async function filterTowns(name) {
|
||||||
<CreateNewCityForm
|
<CreateNewCityForm
|
||||||
:country-fk="data.countryFk"
|
:country-fk="data.countryFk"
|
||||||
:province-selected="data.provinceFk"
|
:province-selected="data.provinceFk"
|
||||||
|
:provinces="provincesOptions"
|
||||||
@on-data-saved="
|
@on-data-saved="
|
||||||
(_, requestResponse) =>
|
(_, requestResponse) =>
|
||||||
onCityCreated(requestResponse, data)
|
onCityCreated(requestResponse, data)
|
||||||
|
@ -192,31 +207,21 @@ async function filterTowns(name) {
|
||||||
:country-fk="data.countryFk"
|
:country-fk="data.countryFk"
|
||||||
:province-selected="data.provinceFk"
|
:province-selected="data.provinceFk"
|
||||||
@update:model-value="(value) => setProvince(value, data)"
|
@update:model-value="(value) => setProvince(value, data)"
|
||||||
@update:options="
|
|
||||||
(data) => {
|
|
||||||
provincesOptions = data;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
v-model="data.provinceFk"
|
v-model="data.provinceFk"
|
||||||
|
:clearable="true"
|
||||||
|
:provinces="provincesOptions"
|
||||||
@on-province-created="onProvinceCreated"
|
@on-province-created="onProvinceCreated"
|
||||||
required
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
ref="countriesRef"
|
|
||||||
:limit="30"
|
|
||||||
:filter="countryFilter"
|
|
||||||
:sort-by="['name ASC']"
|
|
||||||
auto-load
|
|
||||||
url="Countries"
|
url="Countries"
|
||||||
required
|
:sort-by="['name ASC']"
|
||||||
:label="t('Country')"
|
:label="t('Country')"
|
||||||
|
@update:options="handleCountries"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.countryFk"
|
v-model="data.countryFk"
|
||||||
:rules="validate('postcode.countryFk')"
|
:rules="validate('postcode.countryFk')"
|
||||||
@update:model-value="(value) => setCountry(value, data)"
|
|
||||||
data-cy="locationCountry"
|
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
@ -20,24 +21,34 @@ const $props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
provinces: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const autonomiesRef = ref([]);
|
const autonomiesOptions = ref([]);
|
||||||
|
|
||||||
const onDataSaved = (dataSaved, requestResponse) => {
|
const onDataSaved = (dataSaved, requestResponse) => {
|
||||||
requestResponse.autonomy = autonomiesRef.value.opts.find(
|
requestResponse.autonomy = autonomiesOptions.value.find(
|
||||||
(autonomy) => autonomy.id == requestResponse.autonomyFk
|
(autonomy) => autonomy.id == requestResponse.autonomyFk
|
||||||
);
|
);
|
||||||
emit('onDataSaved', dataSaved, requestResponse);
|
emit('onDataSaved', dataSaved, requestResponse);
|
||||||
};
|
};
|
||||||
const where = computed(() => {
|
|
||||||
if (!$props.countryFk) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
return { countryFk: $props.countryFk };
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
@on-fetch="(data) => (autonomiesOptions = data)"
|
||||||
|
auto-load
|
||||||
|
:filter="{
|
||||||
|
where: {
|
||||||
|
countryFk: $props.countryFk,
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
url="Autonomies/location"
|
||||||
|
:sort-by="['name ASC']"
|
||||||
|
:limit="30"
|
||||||
|
/>
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:title="t('New province')"
|
:title="t('New province')"
|
||||||
:subtitle="t('Please, ensure you put the correct data!')"
|
:subtitle="t('Please, ensure you put the correct data!')"
|
||||||
|
@ -52,19 +63,10 @@ const where = computed(() => {
|
||||||
:label="t('Name')"
|
:label="t('Name')"
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
:rules="validate('province.name')"
|
:rules="validate('province.name')"
|
||||||
required
|
|
||||||
data-cy="provinceName"
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
data-cy="autonomyProvince"
|
|
||||||
required
|
|
||||||
ref="autonomiesRef"
|
|
||||||
auto-load
|
|
||||||
:where="where"
|
|
||||||
url="Autonomies/location"
|
|
||||||
:sort-by="['name ASC']"
|
|
||||||
:limit="30"
|
|
||||||
:label="t('Autonomy')"
|
:label="t('Autonomy')"
|
||||||
|
:options="autonomiesOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
|
|
@ -38,7 +38,7 @@ const onDataSaved = (dataSaved) => {
|
||||||
@on-fetch="(data) => (warehousesOptions = data)"
|
@on-fetch="(data) => (warehousesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
url="Warehouses"
|
url="Warehouses"
|
||||||
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
@on-fetch="(data) => (temperaturesOptions = data)"
|
@on-fetch="(data) => (temperaturesOptions = data)"
|
||||||
|
|
|
@ -10,7 +10,6 @@ import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
import SkeletonTable from 'components/ui/SkeletonTable.vue';
|
import SkeletonTable from 'components/ui/SkeletonTable.vue';
|
||||||
import { tMobile } from 'src/composables/tMobile';
|
import { tMobile } from 'src/composables/tMobile';
|
||||||
import getDifferences from 'src/filters/getDifferences';
|
|
||||||
|
|
||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
@ -78,7 +77,7 @@ const isLoading = ref(false);
|
||||||
const hasChanges = ref(false);
|
const hasChanges = ref(false);
|
||||||
const originalData = ref();
|
const originalData = ref();
|
||||||
const vnPaginateRef = ref();
|
const vnPaginateRef = ref();
|
||||||
const formData = ref([]);
|
const formData = ref();
|
||||||
const saveButtonRef = ref(null);
|
const saveButtonRef = ref(null);
|
||||||
const watchChanges = ref();
|
const watchChanges = ref();
|
||||||
const formUrl = computed(() => $props.url);
|
const formUrl = computed(() => $props.url);
|
||||||
|
@ -95,7 +94,6 @@ defineExpose({
|
||||||
saveChanges,
|
saveChanges,
|
||||||
getChanges,
|
getChanges,
|
||||||
formData,
|
formData,
|
||||||
originalData,
|
|
||||||
vnPaginateRef,
|
vnPaginateRef,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -176,13 +174,14 @@ async function saveChanges(data) {
|
||||||
const changes = data || getChanges();
|
const changes = data || getChanges();
|
||||||
try {
|
try {
|
||||||
await axios.post($props.saveUrl || $props.url + '/crud', changes);
|
await axios.post($props.saveUrl || $props.url + '/crud', changes);
|
||||||
} finally {
|
} catch (e) {
|
||||||
isLoading.value = false;
|
return (isLoading.value = false);
|
||||||
}
|
}
|
||||||
originalData.value = JSON.parse(JSON.stringify(formData.value));
|
originalData.value = JSON.parse(JSON.stringify(formData.value));
|
||||||
if (changes.creates?.length) await vnPaginateRef.value.fetch();
|
if (changes.creates?.length) await vnPaginateRef.value.fetch();
|
||||||
|
|
||||||
hasChanges.value = false;
|
hasChanges.value = false;
|
||||||
|
isLoading.value = false;
|
||||||
emit('saveChanges', data);
|
emit('saveChanges', data);
|
||||||
quasar.notify({
|
quasar.notify({
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
|
@ -249,7 +248,7 @@ function getChanges() {
|
||||||
for (const [i, row] of formData.value.entries()) {
|
for (const [i, row] of formData.value.entries()) {
|
||||||
if (!row[pk]) {
|
if (!row[pk]) {
|
||||||
creates.push(row);
|
creates.push(row);
|
||||||
} else if (originalData.value[i]) {
|
} else if (originalData.value) {
|
||||||
const data = getDifferences(originalData.value[i], row);
|
const data = getDifferences(originalData.value[i], row);
|
||||||
if (!isEmpty(data)) {
|
if (!isEmpty(data)) {
|
||||||
updates.push({
|
updates.push({
|
||||||
|
@ -268,6 +267,28 @@ function getChanges() {
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDifferences(obj1, obj2) {
|
||||||
|
let diff = {};
|
||||||
|
delete obj1.$index;
|
||||||
|
delete obj2.$index;
|
||||||
|
|
||||||
|
for (let key in obj1) {
|
||||||
|
if (obj2[key] && JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])) {
|
||||||
|
diff[key] = obj2[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (let key in obj2) {
|
||||||
|
if (
|
||||||
|
obj1[key] === undefined ||
|
||||||
|
JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])
|
||||||
|
) {
|
||||||
|
diff[key] = obj2[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return diff;
|
||||||
|
}
|
||||||
|
|
||||||
function isEmpty(obj) {
|
function isEmpty(obj) {
|
||||||
if (obj == null) return true;
|
if (obj == null) return true;
|
||||||
if (obj === undefined) return true;
|
if (obj === undefined) return true;
|
||||||
|
@ -373,7 +394,6 @@ watch(formUrl, async () => {
|
||||||
@click="onSubmit"
|
@click="onSubmit"
|
||||||
:disable="!hasChanges"
|
:disable="!hasChanges"
|
||||||
:title="t('globals.save')"
|
:title="t('globals.save')"
|
||||||
data-cy="crudModelDefaultSaveBtn"
|
|
||||||
/>
|
/>
|
||||||
<slot name="moreAfterActions" />
|
<slot name="moreAfterActions" />
|
||||||
</QBtnGroup>
|
</QBtnGroup>
|
||||||
|
|
|
@ -156,22 +156,26 @@ const rotateRight = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
if (!newPhoto.files && !newPhoto.url) {
|
try {
|
||||||
notify(t('Select an image'), 'negative');
|
if (!newPhoto.files && !newPhoto.url) {
|
||||||
return;
|
notify(t('Select an image'), 'negative');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
type: 'blob',
|
||||||
|
};
|
||||||
|
|
||||||
|
editor.value
|
||||||
|
.result(options)
|
||||||
|
.then((result) => {
|
||||||
|
const file = new File([result], newPhoto.files?.name || '');
|
||||||
|
newPhoto.blob = file;
|
||||||
|
})
|
||||||
|
.then(() => makeRequest());
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error uploading image');
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = {
|
|
||||||
type: 'blob',
|
|
||||||
};
|
|
||||||
|
|
||||||
editor.value
|
|
||||||
.result(options)
|
|
||||||
.then((result) => {
|
|
||||||
const file = new File([result], newPhoto.files?.name || '');
|
|
||||||
newPhoto.blob = file;
|
|
||||||
})
|
|
||||||
.then(() => makeRequest());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const makeRequest = async () => {
|
const makeRequest = async () => {
|
||||||
|
|
|
@ -51,17 +51,21 @@ const onDataSaved = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
isLoading.value = true;
|
try {
|
||||||
const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
|
isLoading.value = true;
|
||||||
const payload = {
|
const rowsToEdit = $props.rows.map((row) => ({ id: row.id, itemFk: row.itemFk }));
|
||||||
field: selectedField.value.field,
|
const payload = {
|
||||||
newValue: newValue.value,
|
field: selectedField.value.field,
|
||||||
lines: rowsToEdit,
|
newValue: newValue.value,
|
||||||
};
|
lines: rowsToEdit,
|
||||||
|
};
|
||||||
|
|
||||||
await axios.post($props.editUrl, payload);
|
await axios.post($props.editUrl, payload);
|
||||||
onDataSaved();
|
onDataSaved();
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error submitting table cell edit');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const closeForm = () => {
|
||||||
|
@ -85,14 +89,12 @@ const closeForm = () => {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="label"
|
option-label="label"
|
||||||
v-model="selectedField"
|
v-model="selectedField"
|
||||||
data-cy="field-to-edit"
|
|
||||||
/>
|
/>
|
||||||
<component
|
<component
|
||||||
:is="inputs[selectedField?.component || 'input']"
|
:is="inputs[selectedField?.component || 'input']"
|
||||||
v-bind="selectedField?.attrs || {}"
|
v-bind="selectedField?.attrs || {}"
|
||||||
v-model="newValue"
|
v-model="newValue"
|
||||||
:label="t('Value')"
|
:label="t('Value')"
|
||||||
data-cy="value-to-edit"
|
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
|
@ -50,25 +50,25 @@ const loading = ref(false);
|
||||||
|
|
||||||
const tableColumns = computed(() => [
|
const tableColumns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('globals.id'),
|
label: t('entry.buys.id'),
|
||||||
name: 'id',
|
name: 'id',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.name'),
|
label: t('entry.buys.name'),
|
||||||
name: 'name',
|
name: 'name',
|
||||||
field: 'name',
|
field: 'name',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.size'),
|
label: t('entry.buys.size'),
|
||||||
name: 'size',
|
name: 'size',
|
||||||
field: 'size',
|
field: 'size',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.producer'),
|
label: t('entry.buys.producer'),
|
||||||
name: 'producerName',
|
name: 'producerName',
|
||||||
field: 'producer',
|
field: 'producer',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -84,30 +84,34 @@ const tableColumns = computed(() => [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
let filter = itemFilter;
|
try {
|
||||||
const params = itemFilterParams;
|
let filter = itemFilter;
|
||||||
const where = {};
|
const params = itemFilterParams;
|
||||||
for (let key in params) {
|
const where = {};
|
||||||
const value = params[key];
|
for (let key in params) {
|
||||||
if (!value) continue;
|
const value = params[key];
|
||||||
|
if (!value) continue;
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'name':
|
case 'name':
|
||||||
where[key] = { like: `%${value}%` };
|
where[key] = { like: `%${value}%` };
|
||||||
break;
|
break;
|
||||||
case 'producerFk':
|
case 'producerFk':
|
||||||
case 'typeFk':
|
case 'typeFk':
|
||||||
case 'size':
|
case 'size':
|
||||||
case 'inkFk':
|
case 'inkFk':
|
||||||
where[key] = value;
|
where[key] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
filter.where = where;
|
||||||
filter.where = where;
|
|
||||||
|
|
||||||
const { data } = await axios.get(props.url, {
|
const { data } = await axios.get(props.url, {
|
||||||
params: { filter: JSON.stringify(filter) },
|
params: { filter: JSON.stringify(filter) },
|
||||||
});
|
});
|
||||||
tableRows.value = data;
|
tableRows.value = data;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error fetching entries items');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const closeForm = () => {
|
||||||
|
@ -148,10 +152,10 @@ const selectItem = ({ id }) => {
|
||||||
</span>
|
</span>
|
||||||
<h1 class="title">{{ t('Filter item') }}</h1>
|
<h1 class="title">{{ t('Filter item') }}</h1>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput :label="t('globals.name')" v-model="itemFilterParams.name" />
|
<VnInput :label="t('entry.buys.name')" v-model="itemFilterParams.name" />
|
||||||
<VnInput :label="t('entry.buys.size')" v-model="itemFilterParams.size" />
|
<VnInput :label="t('entry.buys.size')" v-model="itemFilterParams.size" />
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.producer')"
|
:label="t('entry.buys.producer')"
|
||||||
:options="producersOptions"
|
:options="producersOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -159,7 +163,7 @@ const selectItem = ({ id }) => {
|
||||||
v-model="itemFilterParams.producerFk"
|
v-model="itemFilterParams.producerFk"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.type')"
|
:label="t('entry.buys.type')"
|
||||||
:options="ItemTypesOptions"
|
:options="ItemTypesOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
|
@ -48,13 +48,13 @@ const loading = ref(false);
|
||||||
|
|
||||||
const tableColumns = computed(() => [
|
const tableColumns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('globals.id'),
|
label: t('entry.basicData.id'),
|
||||||
name: 'id',
|
name: 'id',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.warehouseOut'),
|
label: t('entry.basicData.warehouseOut'),
|
||||||
name: 'warehouseOutFk',
|
name: 'warehouseOutFk',
|
||||||
field: 'warehouseOutFk',
|
field: 'warehouseOutFk',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -62,7 +62,7 @@ const tableColumns = computed(() => [
|
||||||
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
|
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.warehouseIn'),
|
label: t('entry.basicData.warehouseIn'),
|
||||||
name: 'warehouseInFk',
|
name: 'warehouseInFk',
|
||||||
field: 'warehouseInFk',
|
field: 'warehouseInFk',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -70,14 +70,14 @@ const tableColumns = computed(() => [
|
||||||
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
|
warehousesOptions.value.find((warehouse) => warehouse.id === val).name,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.shipped'),
|
label: t('entry.basicData.shipped'),
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
field: 'shipped',
|
field: 'shipped',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
format: (val) => toDate(val),
|
format: (val) => toDate(val),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.landed'),
|
label: t('entry.basicData.landed'),
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
field: 'landed',
|
field: 'landed',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -86,28 +86,32 @@ const tableColumns = computed(() => [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
let filter = travelFilter;
|
try {
|
||||||
const params = travelFilterParams;
|
let filter = travelFilter;
|
||||||
const where = {};
|
const params = travelFilterParams;
|
||||||
for (let key in params) {
|
const where = {};
|
||||||
const value = params[key];
|
for (let key in params) {
|
||||||
if (!value) continue;
|
const value = params[key];
|
||||||
|
if (!value) continue;
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'agencyModeFk':
|
case 'agencyModeFk':
|
||||||
case 'warehouseInFk':
|
case 'warehouseInFk':
|
||||||
case 'warehouseOutFk':
|
case 'warehouseOutFk':
|
||||||
case 'shipped':
|
case 'shipped':
|
||||||
case 'landed':
|
case 'landed':
|
||||||
where[key] = value;
|
where[key] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
filter.where = where;
|
filter.where = where;
|
||||||
const { data } = await axios.get('Travels', {
|
const { data } = await axios.get('Travels', {
|
||||||
params: { filter: JSON.stringify(filter) },
|
params: { filter: JSON.stringify(filter) },
|
||||||
});
|
});
|
||||||
tableRows.value = data;
|
tableRows.value = data;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error fetching travels');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const closeForm = () => {
|
||||||
|
@ -142,7 +146,7 @@ const selectTravel = ({ id }) => {
|
||||||
<h1 class="title">{{ t('Filter travels') }}</h1>
|
<h1 class="title">{{ t('Filter travels') }}</h1>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.agency')"
|
:label="t('entry.basicData.agency')"
|
||||||
:options="agenciesOptions"
|
:options="agenciesOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -150,7 +154,7 @@ const selectTravel = ({ id }) => {
|
||||||
v-model="travelFilterParams.agencyModeFk"
|
v-model="travelFilterParams.agencyModeFk"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('entry.basicData.warehouseOut')"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -158,7 +162,7 @@ const selectTravel = ({ id }) => {
|
||||||
v-model="travelFilterParams.warehouseOutFk"
|
v-model="travelFilterParams.warehouseOutFk"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.warehouseIn')"
|
:label="t('entry.basicData.warehouseIn')"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
@ -166,11 +170,11 @@ const selectTravel = ({ id }) => {
|
||||||
v-model="travelFilterParams.warehouseInFk"
|
v-model="travelFilterParams.warehouseInFk"
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('globals.shipped')"
|
:label="t('entry.basicData.shipped')"
|
||||||
v-model="travelFilterParams.shipped"
|
v-model="travelFilterParams.shipped"
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('globals.landed')"
|
:label="t('entry.basicData.landed')"
|
||||||
v-model="travelFilterParams.landed"
|
v-model="travelFilterParams.landed"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
|
@ -91,10 +91,6 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
maxWidth: {
|
|
||||||
type: [String, Boolean],
|
|
||||||
default: '800px',
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||||
const modelValue = computed(
|
const modelValue = computed(
|
||||||
|
@ -110,7 +106,6 @@ const originalData = ref({});
|
||||||
const formData = computed(() => state.get(modelValue));
|
const formData = computed(() => state.get(modelValue));
|
||||||
const defaultButtons = computed(() => ({
|
const defaultButtons = computed(() => ({
|
||||||
save: {
|
save: {
|
||||||
dataCy: 'saveDefaultBtn',
|
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
icon: 'save',
|
icon: 'save',
|
||||||
label: 'globals.save',
|
label: 'globals.save',
|
||||||
|
@ -118,7 +113,6 @@ const defaultButtons = computed(() => ({
|
||||||
type: 'submit',
|
type: 'submit',
|
||||||
},
|
},
|
||||||
reset: {
|
reset: {
|
||||||
dataCy: 'resetDefaultBtn',
|
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
icon: 'restart_alt',
|
icon: 'restart_alt',
|
||||||
label: 'globals.reset',
|
label: 'globals.reset',
|
||||||
|
@ -209,9 +203,7 @@ async function save() {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
formData.value = trimData(formData.value);
|
formData.value = trimData(formData.value);
|
||||||
const body = $props.mapper
|
const body = $props.mapper ? $props.mapper(formData.value) : formData.value;
|
||||||
? $props.mapper(formData.value, originalData.value)
|
|
||||||
: formData.value;
|
|
||||||
const method = $props.urlCreate ? 'post' : 'patch';
|
const method = $props.urlCreate ? 'post' : 'patch';
|
||||||
const url =
|
const url =
|
||||||
$props.urlCreate || $props.urlUpdate || $props.url || arrayData.store.url;
|
$props.urlCreate || $props.urlUpdate || $props.url || arrayData.store.url;
|
||||||
|
@ -291,7 +283,6 @@ defineExpose({
|
||||||
@submit="save"
|
@submit="save"
|
||||||
@reset="reset"
|
@reset="reset"
|
||||||
class="q-pa-md"
|
class="q-pa-md"
|
||||||
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
|
||||||
id="formModel"
|
id="formModel"
|
||||||
>
|
>
|
||||||
<QCard>
|
<QCard>
|
||||||
|
@ -326,7 +317,6 @@ defineExpose({
|
||||||
:title="t(defaultButtons.reset.label)"
|
:title="t(defaultButtons.reset.label)"
|
||||||
/>
|
/>
|
||||||
<QBtnDropdown
|
<QBtnDropdown
|
||||||
data-cy="saveAndContinueDefaultBtn"
|
|
||||||
v-if="$props.goTo"
|
v-if="$props.goTo"
|
||||||
@click="saveAndGo"
|
@click="saveAndGo"
|
||||||
:label="tMobile('globals.saveAndContinue')"
|
:label="tMobile('globals.saveAndContinue')"
|
||||||
|
@ -381,6 +371,7 @@ defineExpose({
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
#formModel {
|
#formModel {
|
||||||
|
max-width: 800px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ defineExpose({
|
||||||
@click="emit('onDataCanceled')"
|
@click="emit('onDataCanceled')"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
data-cy="FormModelPopup_cancel"
|
data-cy="FormModelPopup_cancel"
|
||||||
z-max
|
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
|
@ -73,7 +72,6 @@ defineExpose({
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
data-cy="FormModelPopup_save"
|
data-cy="FormModelPopup_save"
|
||||||
z-max
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const emit = defineEmits(['onSubmit']);
|
const emit = defineEmits(['onSubmit']);
|
||||||
|
|
||||||
const $props = defineProps({
|
defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
|
@ -25,21 +25,16 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
submitOnEnter: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const closeButton = ref(null);
|
const closeButton = ref(null);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
if ($props.submitOnEnter) {
|
emit('onSubmit');
|
||||||
emit('onSubmit');
|
closeForm();
|
||||||
closeForm();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const closeForm = () => {
|
||||||
|
|
|
@ -9,8 +9,6 @@ import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
|
import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue';
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getParamWhere } from 'src/filters';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -28,22 +26,29 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const itemCategories = ref([]);
|
||||||
|
const selectedCategoryFk = ref(null);
|
||||||
|
const selectedTypeFk = ref(null);
|
||||||
const itemTypesOptions = ref([]);
|
const itemTypesOptions = ref([]);
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
const tagOptions = ref([]);
|
const tagOptions = ref([]);
|
||||||
const tagValues = ref([]);
|
const tagValues = ref([]);
|
||||||
const categoryList = ref(null);
|
|
||||||
const selectedCategoryFk = ref(getParamWhere(route.query.table, 'categoryFk', false));
|
|
||||||
const selectedTypeFk = ref(getParamWhere(route.query.table, 'typeFk', false));
|
|
||||||
|
|
||||||
const selectedCategory = computed(() => {
|
const categoryList = computed(() => {
|
||||||
return (categoryList.value || []).find(
|
return (itemCategories.value || [])
|
||||||
(category) => category?.id === selectedCategoryFk.value
|
.filter((category) => category.display)
|
||||||
);
|
.map((category) => ({
|
||||||
|
...category,
|
||||||
|
icon: `vn:${(category.icon || '').split('-')[1]}`,
|
||||||
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const selectedCategory = computed(() =>
|
||||||
|
(itemCategories.value || []).find(
|
||||||
|
(category) => category?.id === selectedCategoryFk.value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
const selectedType = computed(() => {
|
const selectedType = computed(() => {
|
||||||
return (itemTypesOptions.value || []).find(
|
return (itemTypesOptions.value || []).find(
|
||||||
(type) => type?.id === selectedTypeFk.value
|
(type) => type?.id === selectedTypeFk.value
|
||||||
|
@ -82,17 +87,21 @@ const applyTags = (params, search) => {
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchItemTypes = async (id = selectedCategoryFk.value) => {
|
const fetchItemTypes = async (id) => {
|
||||||
const filter = {
|
try {
|
||||||
fields: ['id', 'name', 'categoryFk'],
|
const filter = {
|
||||||
where: { categoryFk: id },
|
fields: ['id', 'name', 'categoryFk'],
|
||||||
include: 'category',
|
where: { categoryFk: id },
|
||||||
order: 'name ASC',
|
include: 'category',
|
||||||
};
|
order: 'name ASC',
|
||||||
const { data } = await axios.get('ItemTypes', {
|
};
|
||||||
params: { filter: JSON.stringify(filter) },
|
const { data } = await axios.get('ItemTypes', {
|
||||||
});
|
params: { filter: JSON.stringify(filter) },
|
||||||
itemTypesOptions.value = data;
|
});
|
||||||
|
itemTypesOptions.value = data;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error fetching item types', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCategoryClass = (category, params) => {
|
const getCategoryClass = (category, params) => {
|
||||||
|
@ -102,38 +111,38 @@ const getCategoryClass = (category, params) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSelectedTagValues = async (tag) => {
|
const getSelectedTagValues = async (tag) => {
|
||||||
if (!tag?.selectedTag?.id) return;
|
try {
|
||||||
tag.value = null;
|
if (!tag?.selectedTag?.id) return;
|
||||||
const filter = {
|
tag.value = null;
|
||||||
fields: ['value'],
|
const filter = {
|
||||||
order: 'value ASC',
|
fields: ['value'],
|
||||||
limit: 30,
|
order: 'value ASC',
|
||||||
};
|
limit: 30,
|
||||||
|
};
|
||||||
|
|
||||||
const params = { filter: JSON.stringify(filter) };
|
const params = { filter: JSON.stringify(filter) };
|
||||||
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
|
const { data } = await axios.get(`Tags/${tag.selectedTag.id}/filterValue`, {
|
||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
tag.valueOptions = data;
|
tag.valueOptions = data;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error getting selected tag values');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeTag = (index, params, search) => {
|
const removeTag = (index, params, search) => {
|
||||||
(tagValues.value || []).splice(index, 1);
|
(tagValues.value || []).splice(index, 1);
|
||||||
applyTags(params, search);
|
applyTags(params, search);
|
||||||
};
|
};
|
||||||
const setCategoryList = (data) => {
|
|
||||||
categoryList.value = (data || [])
|
|
||||||
.filter((category) => category.display)
|
|
||||||
.map((category) => ({
|
|
||||||
...category,
|
|
||||||
icon: `vn:${(category.icon || '').split('-')[1]}`,
|
|
||||||
}));
|
|
||||||
fetchItemTypes();
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
|
<FetchData
|
||||||
|
url="ItemCategories"
|
||||||
|
limit="30"
|
||||||
|
auto-load
|
||||||
|
@on-fetch="(data) => (itemCategories = data)"
|
||||||
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Suppliers"
|
url="Suppliers"
|
||||||
limit="30"
|
limit="30"
|
||||||
|
@ -239,7 +248,7 @@ const setCategoryList = (data) => {
|
||||||
>
|
>
|
||||||
<QItemSection class="col">
|
<QItemSection class="col">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.tag')"
|
:label="t('components.itemsFilterPanel.tag')"
|
||||||
v-model="value.selectedTag"
|
v-model="value.selectedTag"
|
||||||
:options="tagOptions"
|
:options="tagOptions"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
|
@ -22,7 +22,7 @@ const props = defineProps({
|
||||||
default: 'main',
|
default: 'main',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const initialized = ref(false);
|
|
||||||
const items = ref([]);
|
const items = ref([]);
|
||||||
const expansionItemElements = reactive({});
|
const expansionItemElements = reactive({});
|
||||||
const pinnedModules = computed(() => {
|
const pinnedModules = computed(() => {
|
||||||
|
@ -34,26 +34,18 @@ const search = ref(null);
|
||||||
|
|
||||||
const filteredItems = computed(() => {
|
const filteredItems = computed(() => {
|
||||||
if (!search.value) return items.value;
|
if (!search.value) return items.value;
|
||||||
const normalizedSearch = normalize(search.value);
|
|
||||||
return items.value.filter((item) => {
|
return items.value.filter((item) => {
|
||||||
const locale = normalize(t(item.title));
|
const locale = t(item.title).toLowerCase();
|
||||||
return locale.includes(normalizedSearch);
|
return locale.includes(search.value.toLowerCase());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const filteredPinnedModules = computed(() => {
|
const filteredPinnedModules = computed(() => {
|
||||||
if (!search.value) return pinnedModules.value;
|
if (!search.value) return pinnedModules.value;
|
||||||
const normalizedSearch = search.value
|
|
||||||
.normalize('NFD')
|
|
||||||
.replace(/[\u0300-\u036f]/g, '')
|
|
||||||
.toLowerCase();
|
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
for (const [key, pinnedModule] of pinnedModules.value) {
|
for (const [key, pinnedModule] of pinnedModules.value) {
|
||||||
const locale = t(pinnedModule.title)
|
const locale = t(pinnedModule.title).toLowerCase();
|
||||||
.normalize('NFD')
|
if (locale.includes(search.value.toLowerCase())) map.set(key, pinnedModule);
|
||||||
.replace(/[\u0300-\u036f]/g, '')
|
|
||||||
.toLowerCase();
|
|
||||||
if (locale.includes(normalizedSearch)) map.set(key, pinnedModule);
|
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
});
|
});
|
||||||
|
@ -61,13 +53,11 @@ const filteredPinnedModules = computed(() => {
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await navigation.fetchPinned();
|
await navigation.fetchPinned();
|
||||||
getRoutes();
|
getRoutes();
|
||||||
initialized.value = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.matched,
|
() => route.matched,
|
||||||
() => {
|
() => {
|
||||||
if (!initialized.value) return;
|
|
||||||
items.value = [];
|
items.value = [];
|
||||||
getRoutes();
|
getRoutes();
|
||||||
},
|
},
|
||||||
|
@ -157,13 +147,6 @@ async function togglePinned(item, event) {
|
||||||
const handleItemExpansion = (itemName) => {
|
const handleItemExpansion = (itemName) => {
|
||||||
expansionItemElements[itemName].scrollToLastElement();
|
expansionItemElements[itemName].scrollToLastElement();
|
||||||
};
|
};
|
||||||
|
|
||||||
function normalize(text) {
|
|
||||||
return text
|
|
||||||
.normalize('NFD')
|
|
||||||
.replace(/[\u0300-\u036f]/g, '')
|
|
||||||
.toLowerCase();
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -177,7 +160,6 @@ function normalize(text) {
|
||||||
class="full-width"
|
class="full-width"
|
||||||
filled
|
filled
|
||||||
dense
|
dense
|
||||||
autofocus
|
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
|
|
|
@ -39,10 +39,14 @@ const refund = async () => {
|
||||||
invoiceCorrectionTypeFk: invoiceParams.invoiceCorrectionTypeFk,
|
invoiceCorrectionTypeFk: invoiceParams.invoiceCorrectionTypeFk,
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
|
try {
|
||||||
notify(t('Refunded invoice'), 'positive');
|
const { data } = await axios.post('InvoiceOuts/refundAndInvoice', params);
|
||||||
const [id] = data?.refundId || [];
|
notify(t('Refunded invoice'), 'positive');
|
||||||
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
|
const [id] = data?.refundId || [];
|
||||||
|
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error refunding invoice', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
<script setup>
|
|
||||||
defineProps({ row: { type: Object, required: true } });
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<span>
|
|
||||||
<QIcon
|
|
||||||
v-if="row.isTaxDataChecked === 0"
|
|
||||||
name="vn:no036"
|
|
||||||
color="primary"
|
|
||||||
size="xs"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon v-if="row.hasTicketRequest" name="vn:buyrequest" color="primary" size="xs">
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon v-if="row.itemShortage" name="vn:unavailable" color="primary" size="xs">
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.notVisible') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon v-if="row.isFreezed" name="vn:frozen" color="primary" size="xs">
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.clientFrozen') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon
|
|
||||||
v-if="row.risk"
|
|
||||||
name="vn:risk"
|
|
||||||
:color="row.hasHighRisk ? 'negative' : 'primary'"
|
|
||||||
size="xs"
|
|
||||||
>
|
|
||||||
<QTooltip>
|
|
||||||
{{ $t('salesTicketsTable.risk') }}: {{ row.risk - row.credit }}
|
|
||||||
</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon v-if="row.hasComponentLack" name="vn:components" color="primary" size="xs">
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.componentLack') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
<QIcon v-if="row.isTooLittle" name="vn:isTooLittle" color="primary" size="xs">
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
|
@ -49,32 +49,36 @@ const makeInvoice = async () => {
|
||||||
makeInvoice: checked.value,
|
makeInvoice: checked.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (checked.value && hasToInvoiceByAddress) {
|
try {
|
||||||
const response = await new Promise((resolve) => {
|
if (checked.value && hasToInvoiceByAddress) {
|
||||||
quasar
|
const response = await new Promise((resolve) => {
|
||||||
.dialog({
|
quasar
|
||||||
component: VnConfirm,
|
.dialog({
|
||||||
componentProps: {
|
component: VnConfirm,
|
||||||
title: t('Bill destination client'),
|
componentProps: {
|
||||||
message: t('transferInvoiceInfo'),
|
title: t('Bill destination client'),
|
||||||
},
|
message: t('transferInvoiceInfo'),
|
||||||
})
|
},
|
||||||
.onOk(() => {
|
})
|
||||||
resolve(true);
|
.onOk(() => {
|
||||||
})
|
resolve(true);
|
||||||
.onCancel(() => {
|
})
|
||||||
resolve(false);
|
.onCancel(() => {
|
||||||
});
|
resolve(false);
|
||||||
});
|
});
|
||||||
if (!response) {
|
});
|
||||||
return;
|
if (!response) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const { data } = await axios.post('InvoiceOuts/transfer', params);
|
const { data } = await axios.post('InvoiceOuts/transfer', params);
|
||||||
notify(t('Transferred invoice'), 'positive');
|
notify(t('Transferred invoice'), 'positive');
|
||||||
const id = data?.[0];
|
const id = data?.[0];
|
||||||
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
|
if (id) router.push({ name: 'InvoiceOutSummary', params: { id } });
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error transfering invoice', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useValidator } from 'src/composables/useValidator';
|
import { useValidator } from 'src/composables/useValidator';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
|
import CreateNewProvinceForm from './CreateNewProvinceForm.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['onProvinceCreated', 'onProvinceFetched', 'update:options']);
|
const emit = defineEmits(['onProvinceCreated']);
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
countryFk: {
|
countryFk: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -17,23 +17,20 @@ const $props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
provinces: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const provinceFk = defineModel({ type: Number, default: null });
|
const provinceFk = defineModel({ type: Number, default: null });
|
||||||
|
|
||||||
const { validate } = useValidator();
|
const { validate } = useValidator();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const filter = ref({
|
|
||||||
include: { relation: 'country' },
|
|
||||||
where: {
|
|
||||||
countryFk: $props.countryFk,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const provincesOptions = ref($props.provinces);
|
const provincesOptions = ref($props.provinces);
|
||||||
const provincesFetchDataRef = ref();
|
|
||||||
provinceFk.value = $props.provinceSelected;
|
provinceFk.value = $props.provinceSelected;
|
||||||
if (!$props.countryFk) {
|
const provincesFetchDataRef = ref();
|
||||||
filter.value.where = {};
|
|
||||||
}
|
|
||||||
async function onProvinceCreated(_, data) {
|
async function onProvinceCreated(_, data) {
|
||||||
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
|
await provincesFetchDataRef.value.fetch({ where: { countryFk: $props.countryFk } });
|
||||||
provinceFk.value = data.id;
|
provinceFk.value = data.id;
|
||||||
|
@ -41,33 +38,24 @@ async function onProvinceCreated(_, data) {
|
||||||
}
|
}
|
||||||
async function handleProvinces(data) {
|
async function handleProvinces(data) {
|
||||||
provincesOptions.value = data;
|
provincesOptions.value = data;
|
||||||
emit('update:options', data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
|
||||||
() => $props.countryFk,
|
|
||||||
async () => {
|
|
||||||
if ($props.countryFk) {
|
|
||||||
filter.value.where.countryFk = $props.countryFk;
|
|
||||||
} else filter.value.where = {};
|
|
||||||
await provincesFetchDataRef.value.fetch({});
|
|
||||||
emit('onProvinceFetched', provincesOptions.value);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="provincesFetchDataRef"
|
ref="provincesFetchDataRef"
|
||||||
:filter="filter"
|
:filter="{
|
||||||
|
include: { relation: 'country' },
|
||||||
|
where: {
|
||||||
|
countryFk: $props.countryFk,
|
||||||
|
},
|
||||||
|
}"
|
||||||
@on-fetch="handleProvinces"
|
@on-fetch="handleProvinces"
|
||||||
url="Provinces"
|
url="Provinces"
|
||||||
auto-load
|
|
||||||
/>
|
/>
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
data-cy="locationProvince"
|
|
||||||
:label="t('Province')"
|
:label="t('Province')"
|
||||||
:options="provincesOptions"
|
:options="$props.provinces"
|
||||||
:tooltip="t('Create province')"
|
:tooltip="t('Create province')"
|
||||||
hide-selected
|
hide-selected
|
||||||
v-model="provinceFk"
|
v-model="provinceFk"
|
||||||
|
|
|
@ -25,7 +25,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
searchUrl: {
|
searchUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'table',
|
default: 'params',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -143,10 +143,6 @@ function alignRow() {
|
||||||
const showFilter = computed(
|
const showFilter = computed(
|
||||||
() => $props.column?.columnFilter !== false && $props.column.name != 'tableActions'
|
() => $props.column?.columnFilter !== false && $props.column.name != 'tableActions'
|
||||||
);
|
);
|
||||||
|
|
||||||
const onTabPressed = async () => {
|
|
||||||
if (model.value) enterEvent['keyup.enter']();
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
|
@ -161,7 +157,6 @@ const onTabPressed = async () => {
|
||||||
v-model="model"
|
v-model="model"
|
||||||
:components="components"
|
:components="components"
|
||||||
component-prop="columnFilter"
|
component-prop="columnFilter"
|
||||||
@keydown.tab="onTabPressed"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -17,7 +17,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
searchUrl: {
|
searchUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'table',
|
default: 'params',
|
||||||
},
|
},
|
||||||
vertical: {
|
vertical: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
@ -162,7 +162,9 @@ onMounted(() => {
|
||||||
: $props.defaultMode;
|
: $props.defaultMode;
|
||||||
stateStore.rightDrawer = quasar.screen.gt.xs;
|
stateStore.rightDrawer = quasar.screen.gt.xs;
|
||||||
columnsVisibilitySkipped.value = [
|
columnsVisibilitySkipped.value = [
|
||||||
...splittedColumns.value.columns.filter((c) => !c.visible).map((c) => c.name),
|
...splittedColumns.value.columns
|
||||||
|
.filter((c) => c.visible == false)
|
||||||
|
.map((c) => c.name),
|
||||||
...['tableActions'],
|
...['tableActions'],
|
||||||
];
|
];
|
||||||
createForm.value = $props.create;
|
createForm.value = $props.create;
|
||||||
|
@ -235,7 +237,7 @@ function splitColumns(columns) {
|
||||||
if (col.create) splittedColumns.value.create.push(col);
|
if (col.create) splittedColumns.value.create.push(col);
|
||||||
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
|
if (col.cardVisible) splittedColumns.value.cardVisible.push(col);
|
||||||
if ($props.isEditable && col.disable == null) col.disable = false;
|
if ($props.isEditable && col.disable == null) col.disable = false;
|
||||||
if ($props.useModel && col.columnFilter !== false)
|
if ($props.useModel && col.columnFilter != false)
|
||||||
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
col.columnFilter = { inWhere: true, ...col.columnFilter };
|
||||||
splittedColumns.value.columns.push(col);
|
splittedColumns.value.columns.push(col);
|
||||||
}
|
}
|
||||||
|
@ -324,8 +326,6 @@ function handleOnDataSaved(_) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleScroll() {
|
function handleScroll() {
|
||||||
if ($props.crudModel.disableInfiniteScroll) return;
|
|
||||||
|
|
||||||
const tMiddle = tableRef.value.$el.querySelector('.q-table__middle');
|
const tMiddle = tableRef.value.$el.querySelector('.q-table__middle');
|
||||||
const { scrollHeight, scrollTop, clientHeight } = tMiddle;
|
const { scrollHeight, scrollTop, clientHeight } = tMiddle;
|
||||||
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40;
|
const isAtBottom = Math.abs(scrollHeight - scrollTop - clientHeight) <= 40;
|
||||||
|
@ -394,7 +394,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
:name="col.orderBy ?? col.name"
|
:name="col.orderBy ?? col.name"
|
||||||
:data-key="$attrs['data-key']"
|
:data-key="$attrs['data-key']"
|
||||||
:search-url="searchUrl"
|
:search-url="searchUrl"
|
||||||
:vertical="false"
|
:vertical="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<slot
|
<slot
|
||||||
|
@ -610,7 +610,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
$props.rowClick && $props.rowClick(row);
|
$props.rowClick && $props.rowClick(row);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
style="height: 100%"
|
|
||||||
>
|
>
|
||||||
<QCardSection
|
<QCardSection
|
||||||
vertical
|
vertical
|
||||||
|
@ -738,7 +737,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
fab
|
fab
|
||||||
icon="add"
|
icon="add"
|
||||||
shortcut="+"
|
shortcut="+"
|
||||||
data-cy="vnTableCreateBtn"
|
|
||||||
/>
|
/>
|
||||||
<QTooltip self="top right">
|
<QTooltip self="top right">
|
||||||
{{ createForm?.title }}
|
{{ createForm?.title }}
|
||||||
|
|
|
@ -58,71 +58,79 @@ const getConfig = async (url, filter) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchViewConfigData = async () => {
|
const fetchViewConfigData = async () => {
|
||||||
const userConfigFilter = {
|
try {
|
||||||
where: { tableCode: $props.tableCode, userFk: user.value.id },
|
const userConfigFilter = {
|
||||||
};
|
where: { tableCode: $props.tableCode, userFk: user.value.id },
|
||||||
const userConfig = await getConfig('UserConfigViews', userConfigFilter);
|
};
|
||||||
|
const userConfig = await getConfig('UserConfigViews', userConfigFilter);
|
||||||
|
|
||||||
if (userConfig) {
|
if (userConfig) {
|
||||||
initialUserConfigViewData.value = userConfig;
|
initialUserConfigViewData.value = userConfig;
|
||||||
setUserConfigViewData(userConfig.configuration);
|
setUserConfigViewData(userConfig.configuration);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
|
const defaultConfigFilter = { where: { tableCode: $props.tableCode } };
|
||||||
const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
|
const defaultConfig = await getConfig('DefaultViewConfigs', defaultConfigFilter);
|
||||||
|
|
||||||
if (defaultConfig) {
|
if (defaultConfig) {
|
||||||
// Si el backend devuelve una configuración por defecto la usamos
|
// Si el backend devuelve una configuración por defecto la usamos
|
||||||
setUserConfigViewData(defaultConfig.columns);
|
setUserConfigViewData(defaultConfig.columns);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// Si no hay configuración por defecto mostramos todas las columnas
|
// Si no hay configuración por defecto mostramos todas las columnas
|
||||||
const defaultColumns = {};
|
const defaultColumns = {};
|
||||||
$props.allColumns.forEach((col) => (defaultColumns[col] = true));
|
$props.allColumns.forEach((col) => (defaultColumns[col] = true));
|
||||||
setUserConfigViewData(defaultColumns);
|
setUserConfigViewData(defaultColumns);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error fetching config view data', err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveConfig = async () => {
|
const saveConfig = async () => {
|
||||||
const params = {};
|
try {
|
||||||
const configuration = {};
|
const params = {};
|
||||||
|
const configuration = {};
|
||||||
|
|
||||||
formattedCols.value.forEach((col) => {
|
formattedCols.value.forEach((col) => {
|
||||||
const { name, active } = col;
|
const { name, active } = col;
|
||||||
configuration[name] = active;
|
configuration[name] = active;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Si existe una view config del usuario hacemos un update si no la creamos
|
// Si existe una view config del usuario hacemos un update si no la creamos
|
||||||
if (initialUserConfigViewData.value) {
|
if (initialUserConfigViewData.value) {
|
||||||
params.updates = [
|
params.updates = [
|
||||||
{
|
{
|
||||||
data: {
|
data: {
|
||||||
|
configuration: configuration,
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
id: initialUserConfigViewData.value.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
params.creates = [
|
||||||
|
{
|
||||||
|
userFk: user.value.id,
|
||||||
|
tableCode: $props.tableCode,
|
||||||
|
tableConfig: $props.tableCode,
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
},
|
},
|
||||||
where: {
|
];
|
||||||
id: initialUserConfigViewData.value.id,
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
} else {
|
|
||||||
params.creates = [
|
|
||||||
{
|
|
||||||
userFk: user.value.id,
|
|
||||||
tableCode: $props.tableCode,
|
|
||||||
tableConfig: $props.tableCode,
|
|
||||||
configuration: configuration,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await axios.post('UserConfigViews/crud', params);
|
const response = await axios.post('UserConfigViews/crud', params);
|
||||||
if (response.data && response.data[0]) {
|
if (response.data && response.data[0]) {
|
||||||
initialUserConfigViewData.value = response.data[0];
|
initialUserConfigViewData.value = response.data[0];
|
||||||
|
}
|
||||||
|
emitSavedConfig();
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
|
popupProxyRef.value.hide();
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error saving user view config', err);
|
||||||
}
|
}
|
||||||
emitSavedConfig();
|
|
||||||
notify('globals.dataSaved', 'positive');
|
|
||||||
popupProxyRef.value.hide();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const emitSavedConfig = () => {
|
const emitSavedConfig = () => {
|
||||||
|
|
|
@ -1,24 +1,20 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { nextTick, ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import { QInput } from 'quasar';
|
import { QInput } from 'quasar';
|
||||||
|
|
||||||
const $props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
insertable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'accountShortToStandard']);
|
const emit = defineEmits(['update:modelValue', 'accountShortToStandard']);
|
||||||
|
|
||||||
let internalValue = ref($props.modelValue);
|
let internalValue = ref(props.modelValue);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => $props.modelValue,
|
() => props.modelValue,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
internalValue.value = newVal;
|
internalValue.value = newVal;
|
||||||
}
|
}
|
||||||
|
@ -32,46 +28,8 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleKeydown = (e) => {
|
|
||||||
if (e.key === 'Backspace') return;
|
|
||||||
if (e.key === '.') {
|
|
||||||
accountShortToStandard();
|
|
||||||
// TODO: Fix this setTimeout, with nextTick doesn't work
|
|
||||||
setTimeout(() => {
|
|
||||||
setCursorPosition(0, e.target);
|
|
||||||
}, 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($props.insertable && e.key.match(/[0-9]/)) {
|
|
||||||
handleInsertMode(e);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
function setCursorPosition(pos, el = vnInputRef.value) {
|
|
||||||
el.focus();
|
|
||||||
el.setSelectionRange(pos, pos);
|
|
||||||
}
|
|
||||||
const vnInputRef = ref(false);
|
|
||||||
const handleInsertMode = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
const input = e.target;
|
|
||||||
const cursorPos = input.selectionStart;
|
|
||||||
const { maxlength } = vnInputRef.value;
|
|
||||||
let currentValue = internalValue.value;
|
|
||||||
if (!currentValue) currentValue = e.key;
|
|
||||||
const newValue = e.key;
|
|
||||||
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
|
|
||||||
internalValue.value =
|
|
||||||
currentValue.substring(0, cursorPos) +
|
|
||||||
newValue +
|
|
||||||
currentValue.substring(cursorPos + 1);
|
|
||||||
}
|
|
||||||
nextTick(() => {
|
|
||||||
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
function accountShortToStandard() {
|
function accountShortToStandard() {
|
||||||
internalValue.value = internalValue.value?.replace(
|
internalValue.value = internalValue.value.replace(
|
||||||
'.',
|
'.',
|
||||||
'0'.repeat(11 - internalValue.value.length)
|
'0'.repeat(11 - internalValue.value.length)
|
||||||
);
|
);
|
||||||
|
@ -79,5 +37,5 @@ function accountShortToStandard() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QInput @keydown="handleKeydown" ref="vnInputRef" v-model="internalValue" />
|
<q-input v-model="internalValue" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import { toDateFormat } from 'src/filters/date.js';
|
|
||||||
|
|
||||||
defineProps({ date: { type: [Date, String], required: true } });
|
|
||||||
|
|
||||||
function getBadgeAttrs(date) {
|
|
||||||
let today = Date.vnNew();
|
|
||||||
today.setHours(0, 0, 0, 0);
|
|
||||||
let timeTicket = new Date(date);
|
|
||||||
timeTicket.setHours(0, 0, 0, 0);
|
|
||||||
|
|
||||||
let timeDiff = today - timeTicket;
|
|
||||||
|
|
||||||
if (timeDiff == 0) return { color: 'warning', 'text-color': 'black' };
|
|
||||||
if (timeDiff < 0) return { color: 'success', 'text-color': 'black' };
|
|
||||||
return { color: 'transparent', 'text-color': 'white' };
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatShippedDate(date) {
|
|
||||||
if (!date) return '-';
|
|
||||||
const dateSplit = date.split('T');
|
|
||||||
const [year, month, day] = dateSplit[0].split('-');
|
|
||||||
const newDate = new Date(year, month - 1, day);
|
|
||||||
return toDateFormat(newDate);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<QBadge v-bind="getBadgeAttrs(date)" class="q-pa-sm" style="font-size: 14px">
|
|
||||||
{{ formatShippedDate(date) }}
|
|
||||||
</QBadge>
|
|
||||||
</template>
|
|
|
@ -163,7 +163,7 @@ function addDefaultData(data) {
|
||||||
/>
|
/>
|
||||||
<QFile
|
<QFile
|
||||||
ref="inputFileRef"
|
ref="inputFileRef"
|
||||||
:label="t('globals.file')"
|
:label="t('entry.buys.file')"
|
||||||
v-model="dms.files"
|
v-model="dms.files"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
:accept="allowedContentTypes"
|
:accept="allowedContentTypes"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, useAttrs, nextTick } from 'vue';
|
import { computed, ref, useAttrs } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
|
|
||||||
|
@ -34,14 +34,6 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
insertable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
maxlength: {
|
|
||||||
type: Number,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const vnInputRef = ref(null);
|
const vnInputRef = ref(null);
|
||||||
|
@ -77,9 +69,6 @@ const mixinRules = [
|
||||||
requiredFieldRule,
|
requiredFieldRule,
|
||||||
...($attrs.rules ?? []),
|
...($attrs.rules ?? []),
|
||||||
(val) => {
|
(val) => {
|
||||||
const { maxlength } = vnInputRef.value;
|
|
||||||
if (maxlength && +val.length > maxlength)
|
|
||||||
return t(`maxLength`, { value: maxlength });
|
|
||||||
const { min, max } = vnInputRef.value.$attrs;
|
const { min, max } = vnInputRef.value.$attrs;
|
||||||
if (!min) return null;
|
if (!min) return null;
|
||||||
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min });
|
||||||
|
@ -89,33 +78,6 @@ const mixinRules = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleKeydown = (e) => {
|
|
||||||
if (e.key === 'Backspace') return;
|
|
||||||
|
|
||||||
if ($props.insertable && e.key.match(/[0-9]/)) {
|
|
||||||
handleInsertMode(e);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleInsertMode = (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
const input = e.target;
|
|
||||||
const cursorPos = input.selectionStart;
|
|
||||||
const { maxlength } = vnInputRef.value;
|
|
||||||
let currentValue = value.value;
|
|
||||||
if (!currentValue) currentValue = e.key;
|
|
||||||
const newValue = e.key;
|
|
||||||
if (newValue && !isNaN(newValue) && cursorPos < maxlength) {
|
|
||||||
value.value =
|
|
||||||
currentValue.substring(0, cursorPos) +
|
|
||||||
newValue +
|
|
||||||
currentValue.substring(cursorPos + 1);
|
|
||||||
}
|
|
||||||
nextTick(() => {
|
|
||||||
input.setSelectionRange(cursorPos + 1, cursorPos + 1);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -127,12 +89,10 @@ const handleInsertMode = (e) => {
|
||||||
:type="$attrs.type"
|
:type="$attrs.type"
|
||||||
:class="{ required: isRequired }"
|
:class="{ required: isRequired }"
|
||||||
@keyup.enter="emit('keyup.enter')"
|
@keyup.enter="emit('keyup.enter')"
|
||||||
@keydown="handleKeydown"
|
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
:rules="mixinRules"
|
:rules="mixinRules"
|
||||||
:lazy-rules="true"
|
:lazy-rules="true"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_input'"
|
|
||||||
>
|
>
|
||||||
<template v-if="$slots.prepend" #prepend>
|
<template v-if="$slots.prepend" #prepend>
|
||||||
<slot name="prepend" />
|
<slot name="prepend" />
|
||||||
|
@ -141,13 +101,7 @@ const handleInsertMode = (e) => {
|
||||||
<QIcon
|
<QIcon
|
||||||
name="close"
|
name="close"
|
||||||
size="xs"
|
size="xs"
|
||||||
v-if="
|
v-if="hover && value && !$attrs.disabled && $props.clearable"
|
||||||
hover &&
|
|
||||||
value &&
|
|
||||||
!$attrs.disabled &&
|
|
||||||
!$attrs.readonly &&
|
|
||||||
$props.clearable
|
|
||||||
"
|
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
value = null;
|
value = null;
|
||||||
|
@ -169,11 +123,9 @@ const handleInsertMode = (e) => {
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
inputMin: Must be more than {value}
|
inputMin: Must be more than {value}
|
||||||
maxLength: The value exceeds {value} characters
|
|
||||||
inputMax: Must be less than {value}
|
inputMax: Must be less than {value}
|
||||||
es:
|
es:
|
||||||
inputMin: Debe ser mayor a {value}
|
inputMin: Debe ser mayor a {value}
|
||||||
maxLength: El valor excede los {value} carácteres
|
|
||||||
inputMax: Debe ser menor a {value}
|
inputMax: Debe ser menor a {value}
|
||||||
</i18n>
|
</i18n>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, watch, computed, ref, useAttrs } from 'vue';
|
import { onMounted, watch, computed, ref } from 'vue';
|
||||||
import { date } from 'quasar';
|
import { date } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useAttrs } from 'vue';
|
||||||
import VnDate from './VnDate.vue';
|
import VnDate from './VnDate.vue';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
import CreateNewPostcode from 'src/components/CreateNewPostcodeForm.vue';
|
||||||
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
import VnSelectDialog from 'components/common/VnSelectDialog.vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { computed } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useAttrs } from 'vue';
|
import { useAttrs } from 'vue';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -43,7 +43,7 @@ const formatLocation = (obj, properties) => {
|
||||||
return filteredParts.join(', ');
|
return filteredParts.join(', ');
|
||||||
};
|
};
|
||||||
|
|
||||||
const modelValue = computed(() =>
|
const modelValue = ref(
|
||||||
props.location ? formatLocation(props.location, locationProperties) : null
|
props.location ? formatLocation(props.location, locationProperties) : null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ const handleModelValue = (data) => {
|
||||||
:input-debounce="300"
|
:input-debounce="300"
|
||||||
:class="{ required: isRequired }"
|
:class="{ required: isRequired }"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
clearable
|
||||||
:emit-value="false"
|
:emit-value="false"
|
||||||
:tooltip="t('Create new location')"
|
:tooltip="t('Create new location')"
|
||||||
:rules="mixinRules"
|
:rules="mixinRules"
|
||||||
|
|
|
@ -238,7 +238,6 @@ async function openPointRecord(id, modelLog) {
|
||||||
pointRecord.value = parseProps(propNames, locale, data);
|
pointRecord.value = parseProps(propNames, locale, data);
|
||||||
}
|
}
|
||||||
async function setLogTree(data) {
|
async function setLogTree(data) {
|
||||||
if (!data) return;
|
|
||||||
logTree.value = getLogTree(data);
|
logTree.value = getLogTree(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,5 @@
|
||||||
const model = defineModel({ type: Boolean, required: true });
|
const model = defineModel({ type: Boolean, required: true });
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QRadio
|
<QRadio v-model="model" v-bind="$attrs" dense :dark="true" class="q-mr-sm" />
|
||||||
v-model="model"
|
|
||||||
v-bind="$attrs"
|
|
||||||
dense
|
|
||||||
:dark="true"
|
|
||||||
class="q-mr-sm"
|
|
||||||
size="xs"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,21 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
|
import { ref, toRefs, computed, watch, onMounted, useAttrs } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import { useRequired } from 'src/composables/useRequired';
|
import { useRequired } from 'src/composables/useRequired';
|
||||||
import dataByOrder from 'src/utils/dataByOrder';
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
|
const emit = defineEmits(['update:modelValue', 'update:options', 'remove']);
|
||||||
const $attrs = useAttrs();
|
const $attrs = useAttrs();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { isRequired, requiredFieldRule } = useRequired($attrs);
|
||||||
const isRequired = computed(() => {
|
|
||||||
return useRequired($attrs).isRequired;
|
|
||||||
});
|
|
||||||
const requiredFieldRule = computed(() => {
|
|
||||||
return useRequired($attrs).requiredFieldRule;
|
|
||||||
});
|
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: [String, Number, Object],
|
type: [String, Number, Object],
|
||||||
|
@ -97,10 +88,6 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
dataKey: {
|
|
||||||
type: String,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
const mixinRules = [requiredFieldRule, ...($attrs.rules ?? [])];
|
||||||
|
@ -109,14 +96,14 @@ const { optionLabel, optionValue, optionFilter, optionFilterValue, options, mode
|
||||||
const myOptions = ref([]);
|
const myOptions = ref([]);
|
||||||
const myOptionsOriginal = ref([]);
|
const myOptionsOriginal = ref([]);
|
||||||
const vnSelectRef = ref();
|
const vnSelectRef = ref();
|
||||||
|
const dataRef = ref();
|
||||||
const lastVal = ref();
|
const lastVal = ref();
|
||||||
const noOneText = t('globals.noOne');
|
const noOneText = t('globals.noOne');
|
||||||
const noOneOpt = ref({
|
const noOneOpt = ref({
|
||||||
[optionValue.value]: false,
|
[optionValue.value]: false,
|
||||||
[optionLabel.value]: noOneText,
|
[optionLabel.value]: noOneText,
|
||||||
});
|
});
|
||||||
const isLoading = ref(false);
|
|
||||||
const useURL = computed(() => $props.url);
|
|
||||||
const value = computed({
|
const value = computed({
|
||||||
get() {
|
get() {
|
||||||
return $props.modelValue;
|
return $props.modelValue;
|
||||||
|
@ -132,7 +119,7 @@ watch(options, (newValue) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(modelValue, async (newValue) => {
|
watch(modelValue, async (newValue) => {
|
||||||
if (!myOptions?.value?.some((option) => option[optionValue.value] == newValue))
|
if (!myOptions.value.some((option) => option[optionValue.value] == newValue))
|
||||||
await fetchFilter(newValue);
|
await fetchFilter(newValue);
|
||||||
|
|
||||||
if ($props.noOne) myOptions.value.unshift(noOneOpt.value);
|
if ($props.noOne) myOptions.value.unshift(noOneOpt.value);
|
||||||
|
@ -140,23 +127,17 @@ watch(modelValue, async (newValue) => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setOptions(options.value);
|
setOptions(options.value);
|
||||||
if (useURL.value && $props.modelValue && !findKeyInOptions())
|
if ($props.url && $props.modelValue && !findKeyInOptions())
|
||||||
fetchFilter($props.modelValue);
|
fetchFilter($props.modelValue);
|
||||||
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
||||||
});
|
});
|
||||||
|
|
||||||
const arrayDataKey =
|
|
||||||
$props.dataKey ?? ($props.url?.length > 0 ? $props.url : $attrs.name ?? $attrs.label);
|
|
||||||
|
|
||||||
const arrayData = useArrayData(arrayDataKey, { url: $props.url, searchUrl: false });
|
|
||||||
|
|
||||||
function findKeyInOptions() {
|
function findKeyInOptions() {
|
||||||
if (!$props.options) return;
|
if (!$props.options) return;
|
||||||
return filter($props.modelValue, $props.options)?.length;
|
return filter($props.modelValue, $props.options)?.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOptions(data) {
|
function setOptions(data) {
|
||||||
data = dataByOrder(data, $props.sortBy);
|
|
||||||
myOptions.value = JSON.parse(JSON.stringify(data));
|
myOptions.value = JSON.parse(JSON.stringify(data));
|
||||||
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
||||||
emit('update:options', data);
|
emit('update:options', data);
|
||||||
|
@ -184,7 +165,7 @@ function filter(val, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchFilter(val) {
|
async function fetchFilter(val) {
|
||||||
if (!$props.url) return;
|
if (!$props.url || !dataRef.value) return;
|
||||||
|
|
||||||
const { fields, include, sortBy, limit } = $props;
|
const { fields, include, sortBy, limit } = $props;
|
||||||
const key =
|
const key =
|
||||||
|
@ -206,11 +187,8 @@ async function fetchFilter(val) {
|
||||||
const fetchOptions = { where, include, limit };
|
const fetchOptions = { where, include, limit };
|
||||||
if (fields) fetchOptions.fields = fields;
|
if (fields) fetchOptions.fields = fields;
|
||||||
if (sortBy) fetchOptions.order = sortBy;
|
if (sortBy) fetchOptions.order = sortBy;
|
||||||
arrayData.reset(['skip', 'filter.skip', 'page']);
|
|
||||||
|
|
||||||
const { data } = await arrayData.applyFilter({ filter: fetchOptions });
|
return dataRef.value.fetch(fetchOptions);
|
||||||
setOptions(data);
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function filterHandler(val, update) {
|
async function filterHandler(val, update) {
|
||||||
|
@ -250,58 +228,20 @@ function nullishToTrue(value) {
|
||||||
|
|
||||||
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
|
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
|
||||||
|
|
||||||
async function onScroll({ to, direction, from, index }) {
|
|
||||||
const lastIndex = myOptions.value.length - 1;
|
|
||||||
|
|
||||||
if (from === 0 && index === 0) return;
|
|
||||||
if (!useURL.value && !$props.fetchRef) return;
|
|
||||||
if (direction === 'decrease') return;
|
|
||||||
if (to === lastIndex && arrayData.store.hasMoreData && !isLoading.value) {
|
|
||||||
isLoading.value = true;
|
|
||||||
await arrayData.loadMore();
|
|
||||||
setOptions(arrayData.store.data);
|
|
||||||
vnSelectRef.value.scrollTo(lastIndex);
|
|
||||||
isLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({ opts: myOptions });
|
defineExpose({ opts: myOptions });
|
||||||
|
|
||||||
function handleKeyDown(event) {
|
|
||||||
if (event.key === 'Tab' && !event.shiftKey) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
const inputValue = vnSelectRef.value?.inputValue;
|
|
||||||
|
|
||||||
if (inputValue) {
|
|
||||||
const matchingOption = myOptions.value.find(
|
|
||||||
(option) =>
|
|
||||||
option[optionLabel.value].toLowerCase() === inputValue.toLowerCase()
|
|
||||||
);
|
|
||||||
|
|
||||||
if (matchingOption) {
|
|
||||||
emit('update:modelValue', matchingOption[optionValue.value]);
|
|
||||||
} else {
|
|
||||||
emit('update:modelValue', inputValue);
|
|
||||||
}
|
|
||||||
vnSelectRef.value?.hidePopup();
|
|
||||||
}
|
|
||||||
|
|
||||||
const focusableElements = document.querySelectorAll(
|
|
||||||
'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
|
|
||||||
);
|
|
||||||
const currentIndex = Array.prototype.indexOf.call(
|
|
||||||
focusableElements,
|
|
||||||
event.target
|
|
||||||
);
|
|
||||||
if (currentIndex >= 0 && currentIndex < focusableElements.length - 1) {
|
|
||||||
focusableElements[currentIndex + 1].focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
ref="dataRef"
|
||||||
|
:url="$props.url"
|
||||||
|
@on-fetch="(data) => setOptions(data)"
|
||||||
|
:where="where || { [optionValue]: value }"
|
||||||
|
:limit="limit"
|
||||||
|
:sort-by="sortBy"
|
||||||
|
:fields="fields"
|
||||||
|
:params="params"
|
||||||
|
/>
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:options="myOptions"
|
:options="myOptions"
|
||||||
|
@ -309,7 +249,6 @@ function handleKeyDown(event) {
|
||||||
:option-value="optionValue"
|
:option-value="optionValue"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@filter="filterHandler"
|
@filter="filterHandler"
|
||||||
@keydown="handleKeyDown"
|
|
||||||
:emit-value="nullishToTrue($attrs['emit-value'])"
|
:emit-value="nullishToTrue($attrs['emit-value'])"
|
||||||
:map-options="nullishToTrue($attrs['map-options'])"
|
:map-options="nullishToTrue($attrs['map-options'])"
|
||||||
:use-input="nullishToTrue($attrs['use-input'])"
|
:use-input="nullishToTrue($attrs['use-input'])"
|
||||||
|
@ -321,14 +260,10 @@ function handleKeyDown(event) {
|
||||||
:rules="mixinRules"
|
:rules="mixinRules"
|
||||||
virtual-scroll-slice-size="options.length"
|
virtual-scroll-slice-size="options.length"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:input-debounce="useURL ? '300' : '0'"
|
|
||||||
:loading="isLoading"
|
|
||||||
@virtual-scroll="onScroll"
|
|
||||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
|
||||||
>
|
>
|
||||||
<template #append>
|
<template v-if="isClearable" #append>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-show="isClearable && value"
|
v-show="value"
|
||||||
name="close"
|
name="close"
|
||||||
@click.stop="
|
@click.stop="
|
||||||
() => {
|
() => {
|
||||||
|
@ -341,22 +276,7 @@ function handleKeyDown(event) {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
||||||
<div v-if="slotName == 'append'">
|
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
||||||
<QIcon
|
|
||||||
v-show="isClearable && value"
|
|
||||||
name="close"
|
|
||||||
@click.stop="
|
|
||||||
() => {
|
|
||||||
value = null;
|
|
||||||
emit('remove');
|
|
||||||
}
|
|
||||||
"
|
|
||||||
class="cursor-pointer"
|
|
||||||
size="xs"
|
|
||||||
/>
|
|
||||||
<slot name="append" v-if="$slots.append" v-bind="slotData ?? {}" />
|
|
||||||
</div>
|
|
||||||
<slot v-else :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
|
||||||
</template>
|
</template>
|
||||||
</QSelect>
|
</QSelect>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -43,7 +43,6 @@ const isAllowedToCreate = computed(() => {
|
||||||
>
|
>
|
||||||
<template v-if="isAllowedToCreate" #append>
|
<template v-if="isAllowedToCreate" #append>
|
||||||
<QIcon
|
<QIcon
|
||||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_icon'"
|
|
||||||
@click.stop.prevent="$refs.dialog.show()"
|
@click.stop.prevent="$refs.dialog.show()"
|
||||||
:name="actionIcon"
|
:name="actionIcon"
|
||||||
:size="actionIcon === 'add' ? 'xs' : 'sm'"
|
:size="actionIcon === 'add' ? 'xs' : 'sm'"
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import { computed, useAttrs } from 'vue';
|
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
|
||||||
const $props = defineProps({
|
|
||||||
hasAvatar: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
hasInfo: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
modelValue: {
|
|
||||||
type: [String, Number, Object],
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const $attrs = useAttrs();
|
|
||||||
|
|
||||||
const value = computed({
|
|
||||||
get() {
|
|
||||||
return $props.modelValue;
|
|
||||||
},
|
|
||||||
set(val) {
|
|
||||||
emit('update:modelValue', val);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const url = computed(() => {
|
|
||||||
let url = 'Workers/search';
|
|
||||||
const { departmentCodes } = $attrs.params ?? {};
|
|
||||||
if (!departmentCodes) return url;
|
|
||||||
const params = new URLSearchParams({
|
|
||||||
departmentCodes: JSON.stringify(departmentCodes),
|
|
||||||
});
|
|
||||||
|
|
||||||
return url.concat(`?${params.toString()}`);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VnSelect
|
|
||||||
:label="$t('globals.worker')"
|
|
||||||
v-bind="$attrs"
|
|
||||||
v-model="value"
|
|
||||||
:url="url"
|
|
||||||
option-value="id"
|
|
||||||
option-label="nickname"
|
|
||||||
:fields="['id', 'name', 'nickname', 'code']"
|
|
||||||
sort-by="nickname ASC"
|
|
||||||
>
|
|
||||||
<template #prepend v-if="$props.hasAvatar">
|
|
||||||
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
|
||||||
</template>
|
|
||||||
<template #append v-if="$props.hasInfo">
|
|
||||||
<QIcon name="info" class="cursor-pointer">
|
|
||||||
<QTooltip>{{ $t($props.hasInfo) }}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</template>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>
|
|
||||||
{{ scope.opt.name }}
|
|
||||||
</QItemLabel>
|
|
||||||
<QItemLabel v-if="!scope.opt.id">
|
|
||||||
{{ scope.opt.nickname }}
|
|
||||||
</QItemLabel>
|
|
||||||
<QItemLabel caption v-else>
|
|
||||||
{{ scope.opt.nickname }}, {{ scope.opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelect>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
Responsible for approving invoices: Responsable de aprobar las facturas
|
|
||||||
</i18n>
|
|
|
@ -86,7 +86,7 @@ async function send() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QDialog ref="dialogRef" data-cy="vnSmsDialog">
|
<QDialog ref="dialogRef">
|
||||||
<QCard class="q-pa-sm">
|
<QCard class="q-pa-sm">
|
||||||
<QCardSection class="row items-center q-pb-none">
|
<QCardSection class="row items-center q-pb-none">
|
||||||
<span class="text-h6 text-grey">
|
<span class="text-h6 text-grey">
|
||||||
|
@ -161,7 +161,6 @@ async function send() {
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
color="primary"
|
color="primary"
|
||||||
unelevated
|
unelevated
|
||||||
data-cy="sendSmsBtn"
|
|
||||||
/>
|
/>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -222,8 +222,8 @@ const toModule = computed(() =>
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
:deep(.body) {
|
.body {
|
||||||
background-color: var(--vn-section-color);
|
background-color: var(--vn-section-color);
|
||||||
.text-h5 {
|
.text-h5 {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
@ -262,7 +262,9 @@ const toModule = computed(() =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
.title {
|
.title {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
|
@ -83,7 +83,7 @@ async function fetch() {
|
||||||
<slot name="header" :entity="entity" dense>
|
<slot name="header" :entity="entity" dense>
|
||||||
<VnLv :label="`${entity.id} -`" :value="entity.name" />
|
<VnLv :label="`${entity.id} -`" :value="entity.name" />
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="header-right" :entity="entity">
|
<slot name="header-right">
|
||||||
<span></span>
|
<span></span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,7 +67,7 @@ const dialog = ref(null);
|
||||||
<QTooltip>{{ t('globals.add') }}</QTooltip>
|
<QTooltip>{{ t('globals.add') }}</QTooltip>
|
||||||
<QPopupProxy ref="dialog">
|
<QPopupProxy ref="dialog">
|
||||||
<OrderCatalogItemDialog
|
<OrderCatalogItemDialog
|
||||||
:item="item"
|
:prices="item.prices"
|
||||||
@added="() => dialog.hide()"
|
@added="() => dialog.hide()"
|
||||||
/>
|
/>
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { useColor } from 'src/composables/useColor';
|
||||||
import { getCssVar } from 'quasar';
|
import { getCssVar } from 'quasar';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
workerId: { type: [Number, undefined], default: null },
|
workerId: { type: Number, required: true },
|
||||||
description: { type: String, default: null },
|
description: { type: String, default: null },
|
||||||
title: { type: String, default: null },
|
title: { type: String, default: null },
|
||||||
color: { type: String, default: null },
|
color: { type: String, default: null },
|
||||||
|
@ -38,13 +38,7 @@ watch(src, () => (showLetter.value = false));
|
||||||
<template v-if="showLetter">
|
<template v-if="showLetter">
|
||||||
{{ title.charAt(0) }}
|
{{ title.charAt(0) }}
|
||||||
</template>
|
</template>
|
||||||
<QImg
|
<QImg v-else :src="src" spinner-color="white" @error="showLetter = true" />
|
||||||
v-else-if="workerId"
|
|
||||||
:src="src"
|
|
||||||
spinner-color="white"
|
|
||||||
@error="showLetter = true"
|
|
||||||
/>
|
|
||||||
<QIcon v-else name="mood" size="xs" />
|
|
||||||
</QAvatar>
|
</QAvatar>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<slot name="description" v-if="description">
|
<slot name="description" v-if="description">
|
||||||
|
|
|
@ -37,7 +37,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
hiddenTags: {
|
hiddenTags: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => ['filter', 'or', 'and'],
|
default: () => ['filter', 'search', 'or', 'and'],
|
||||||
},
|
},
|
||||||
customTags: {
|
customTags: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -49,7 +49,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
searchUrl: {
|
searchUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'table',
|
default: 'params',
|
||||||
},
|
},
|
||||||
redirect: {
|
redirect: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -57,6 +57,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({ search, sanitizer });
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
'update:modelValue',
|
'update:modelValue',
|
||||||
'refresh',
|
'refresh',
|
||||||
|
@ -75,11 +76,8 @@ const arrayData = useArrayData($props.dataKey, {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
const userParams = ref({});
|
const userParams = ref({});
|
||||||
|
|
||||||
defineExpose({ search, sanitizer, params: userParams });
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!userParams.value) userParams.value = $props.modelValue ?? {};
|
userParams.value = $props.modelValue ?? {};
|
||||||
emit('init', { params: userParams.value });
|
emit('init', { params: userParams.value });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -105,8 +103,7 @@ watch(
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => arrayData.store.userParams,
|
() => arrayData.store.userParams,
|
||||||
(val, oldValue) => (val || oldValue) && setUserParams(val),
|
(val, oldValue) => (val || oldValue) && setUserParams(val)
|
||||||
{ immediate: true }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -173,36 +170,16 @@ const tagsList = computed(() => {
|
||||||
return tagList;
|
return tagList;
|
||||||
});
|
});
|
||||||
|
|
||||||
const formatTags = (tags) => {
|
|
||||||
const formattedTags = [];
|
|
||||||
tags.forEach((tag) => {
|
|
||||||
if (tag.label === 'and') {
|
|
||||||
tag.value.forEach((item) => {
|
|
||||||
for (const key in item) {
|
|
||||||
formattedTags.push({ label: key, value: item[key] });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
formattedTags.push(tag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return formattedTags;
|
|
||||||
};
|
|
||||||
|
|
||||||
const tags = computed(() => {
|
const tags = computed(() => {
|
||||||
const filteredTags = tagsList.value.filter(
|
return tagsList.value.filter((tag) => !($props.customTags || []).includes(tag.label));
|
||||||
(tag) => !($props.customTags || []).includes(tag.label)
|
|
||||||
);
|
|
||||||
return formatTags(filteredTags);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const customTags = computed(() =>
|
const customTags = computed(() =>
|
||||||
tagsList.value.filter((tag) => ($props.customTags || []).includes(tag.label))
|
tagsList.value.filter((tag) => ($props.customTags || []).includes(tag.label))
|
||||||
);
|
);
|
||||||
|
|
||||||
async function remove(key) {
|
async function remove(key) {
|
||||||
userParams.value[key] = undefined;
|
userParams.value[key] = undefined;
|
||||||
await search();
|
search();
|
||||||
emit('remove', key);
|
emit('remove', key);
|
||||||
emit('update:modelValue', userParams.value);
|
emit('update:modelValue', userParams.value);
|
||||||
}
|
}
|
||||||
|
@ -216,12 +193,7 @@ function formatValue(value) {
|
||||||
|
|
||||||
function sanitizer(params) {
|
function sanitizer(params) {
|
||||||
for (const [key, value] of Object.entries(params)) {
|
for (const [key, value] of Object.entries(params)) {
|
||||||
if (key === 'and' && Array.isArray(value)) {
|
if (value && typeof value === 'object') {
|
||||||
value.forEach((item) => {
|
|
||||||
Object.assign(params, item);
|
|
||||||
});
|
|
||||||
delete params[key];
|
|
||||||
} else if (value && typeof value === 'object') {
|
|
||||||
const param = Object.values(value)[0];
|
const param = Object.values(value)[0];
|
||||||
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
||||||
}
|
}
|
||||||
|
@ -275,7 +247,6 @@ function sanitizer(params) {
|
||||||
:key="chip.label"
|
:key="chip.label"
|
||||||
:removable="!unremovableParams?.includes(chip.label)"
|
:removable="!unremovableParams?.includes(chip.label)"
|
||||||
@remove="remove(chip.label)"
|
@remove="remove(chip.label)"
|
||||||
data-cy="vnFilterPanelChip"
|
|
||||||
>
|
>
|
||||||
<slot name="tags" :tag="chip" :format-fn="formatValue">
|
<slot name="tags" :tag="chip" :format-fn="formatValue">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
|
|
|
@ -1,60 +1,16 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, useAttrs, onBeforeMount, capitalize } from 'vue';
|
defineProps({ phoneNumber: { type: [String, Number], default: null } });
|
||||||
import axios from 'axios';
|
|
||||||
import { parsePhone } from 'src/filters';
|
|
||||||
import useOpenURL from 'src/composables/useOpenURL';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
phoneNumber: { type: [String, Number], default: null },
|
|
||||||
channel: { type: Number, default: null },
|
|
||||||
country: { type: String, default: null },
|
|
||||||
});
|
|
||||||
|
|
||||||
const phone = ref(props.phoneNumber);
|
|
||||||
const config = reactive({
|
|
||||||
sip: { icon: 'phone', href: `sip:${props.phoneNumber}` },
|
|
||||||
'say-simple': {
|
|
||||||
icon: 'vn:saysimple',
|
|
||||||
url: null,
|
|
||||||
channel: props.channel,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const type = Object.keys(config).find((key) => key in useAttrs()) || 'sip';
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
|
||||||
if (!phone.value) return;
|
|
||||||
let { channel } = config[type];
|
|
||||||
|
|
||||||
if (type === 'say-simple') {
|
|
||||||
const { url, defaultChannel } = (await axios.get('SaySimpleConfigs/findOne'))
|
|
||||||
.data;
|
|
||||||
if (!channel) channel = defaultChannel;
|
|
||||||
|
|
||||||
phone.value = await parsePhone(props.phoneNumber, props.country.toLowerCase());
|
|
||||||
config[
|
|
||||||
type
|
|
||||||
].url = `${url}?customerIdentity=%2B${phone.value}&channelId=${channel}`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function handleClick() {
|
|
||||||
if (config[type].url) useOpenURL(config[type].url);
|
|
||||||
else if (config[type].href) window.location.href = config[type].href;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="phone"
|
v-if="phoneNumber"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
:icon="config[type].icon"
|
icon="phone"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="primary"
|
color="primary"
|
||||||
padding="none"
|
padding="none"
|
||||||
@click.stop="handleClick"
|
:href="`sip:${phoneNumber}`"
|
||||||
>
|
@click.stop
|
||||||
<QTooltip>
|
/>
|
||||||
{{ capitalize(type).replace('-', '') }}
|
|
||||||
</QTooltip>
|
|
||||||
</QBtn>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
import { toDateHourMin } from 'src/filters';
|
import { toDateHourMin } from 'src/filters';
|
||||||
|
import { useState } from 'src/composables/useState';
|
||||||
|
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import VnUserLink from 'components/ui/VnUserLink.vue';
|
import VnUserLink from 'components/ui/VnUserLink.vue';
|
||||||
|
@ -25,7 +26,9 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const state = useState();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
const currentUser = ref(state.getUser());
|
||||||
const newNote = reactive({ text: null, observationTypeFk: null });
|
const newNote = reactive({ text: null, observationTypeFk: null });
|
||||||
const observationTypes = ref([]);
|
const observationTypes = ref([]);
|
||||||
const vnPaginateRef = ref();
|
const vnPaginateRef = ref();
|
||||||
|
@ -62,9 +65,13 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (observationTypes = data)"
|
@on-fetch="(data) => (observationTypes = data)"
|
||||||
/>
|
/>
|
||||||
<QCard class="q-pa-xs q-mb-lg full-width" v-if="$props.addNote">
|
<QCard class="q-pa-xs q-mb-xl full-width" v-if="$props.addNote">
|
||||||
<QCardSection horizontal>
|
<QCardSection horizontal>
|
||||||
{{ t('New note') }}
|
<VnAvatar :worker-id="currentUser.id" size="md" />
|
||||||
|
<div class="full-width row justify-between q-pa-xs">
|
||||||
|
<VnUserLink :name="t('New note')" :worker-id="currentUser.id" />
|
||||||
|
{{ t('globals.now') }}
|
||||||
|
</div>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-px-xs q-my-none q-py-none">
|
<QCardSection class="q-px-xs q-my-none q-py-none">
|
||||||
<VnRow class="full-width">
|
<VnRow class="full-width">
|
||||||
|
@ -98,7 +105,6 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
@click="insert"
|
@click="insert"
|
||||||
class="q-mb-xs"
|
class="q-mb-xs"
|
||||||
dense
|
dense
|
||||||
data-cy="saveNote"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
|
@ -138,7 +144,7 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
<div class="full-width row justify-between q-pa-xs">
|
<div class="full-width row justify-between q-pa-xs">
|
||||||
<div>
|
<div>
|
||||||
<VnUserLink
|
<VnUserLink
|
||||||
:name="`${note.worker.user.name}`"
|
:name="`${note.worker.user.nickname}`"
|
||||||
:worker-id="note.worker.id"
|
:worker-id="note.worker.id"
|
||||||
/>
|
/>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
|
|
@ -44,7 +44,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
limit: {
|
limit: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 20,
|
default: 10,
|
||||||
},
|
},
|
||||||
userParams: {
|
userParams: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -100,7 +100,7 @@ const arrayData = useArrayData(props.dataKey, {
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (props.autoLoad && !store.data?.length) await fetch();
|
if (props.autoLoad) await fetch();
|
||||||
mounted.value = true;
|
mounted.value = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -115,11 +115,7 @@ watch(
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.data,
|
() => store.data,
|
||||||
(data) => {
|
(data) => emit('onChange', data)
|
||||||
if (!mounted.value) return;
|
|
||||||
emit('onChange', data);
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -132,24 +128,10 @@ const addFilter = async (filter, params) => {
|
||||||
|
|
||||||
async function fetch(params) {
|
async function fetch(params) {
|
||||||
useArrayData(props.dataKey, params);
|
useArrayData(props.dataKey, params);
|
||||||
arrayData.reset(['filter.skip', 'skip', 'page']);
|
arrayData.reset(['filter.skip', 'skip']);
|
||||||
await arrayData.fetch({ append: false, updateRouter: mounted.value });
|
|
||||||
return emitStoreData();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function update(params) {
|
|
||||||
useArrayData(props.dataKey, params);
|
|
||||||
const { limit, skip } = store;
|
|
||||||
store.limit = limit + skip;
|
|
||||||
store.skip = 0;
|
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
store.limit = limit;
|
|
||||||
store.skip = skip;
|
|
||||||
return emitStoreData();
|
|
||||||
}
|
|
||||||
|
|
||||||
function emitStoreData() {
|
|
||||||
if (!store.hasMoreData) isLoading.value = false;
|
if (!store.hasMoreData) isLoading.value = false;
|
||||||
|
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
return store.data;
|
return store.data;
|
||||||
}
|
}
|
||||||
|
@ -195,7 +177,7 @@ async function onLoad(index, done) {
|
||||||
done(isDone);
|
done(isDone);
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ fetch, update, addFilter, paginate });
|
defineExpose({ fetch, addFilter, paginate });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="vn-row q-gutter-md">
|
<div class="vn-row q-gutter-md q-mb-md">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -18,9 +18,6 @@
|
||||||
&:not(.wrap) {
|
&:not(.wrap) {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
&[fixed] {
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -45,7 +45,7 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
limit: {
|
limit: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 20,
|
default: 10,
|
||||||
},
|
},
|
||||||
userParams: {
|
userParams: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
@ -130,7 +130,6 @@ async function search() {
|
||||||
dense
|
dense
|
||||||
standout
|
standout
|
||||||
autofocus
|
autofocus
|
||||||
data-cy="vnSearchBar"
|
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<QIcon
|
<QIcon
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
import { defineProps } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
routeName: {
|
routeName: {
|
||||||
|
|
|
@ -1,24 +1,11 @@
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { getUrl } from './getUrl';
|
import { getUrl } from './getUrl';
|
||||||
import axios from 'axios';
|
|
||||||
import { exportFile } from 'quasar';
|
|
||||||
|
|
||||||
const { getTokenMultimedia } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = getTokenMultimedia();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
||||||
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
|
let appUrl = await getUrl('', 'lilium');
|
||||||
const response = await axios.get(
|
appUrl = appUrl.replace('/#/', '');
|
||||||
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
|
window.open(url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`);
|
||||||
{ responseType: 'blob' }
|
|
||||||
);
|
|
||||||
|
|
||||||
const contentDisposition = response.headers['content-disposition'];
|
|
||||||
const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(contentDisposition);
|
|
||||||
const filename =
|
|
||||||
matches != null && matches[1]
|
|
||||||
? matches[1].replace(/['"]/g, '')
|
|
||||||
: 'downloaded-file';
|
|
||||||
|
|
||||||
exportFile(filename, response.data);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,10 +75,18 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
limit: store.limit,
|
limit: store.limit,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let exprFilter;
|
||||||
let userParams = { ...store.userParams };
|
let userParams = { ...store.userParams };
|
||||||
|
if (store?.exprBuilder) {
|
||||||
|
const where = buildFilter(userParams, (param, value) => {
|
||||||
|
const res = store.exprBuilder(param, value);
|
||||||
|
if (res) delete userParams[param];
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
exprFilter = where ? { where } : null;
|
||||||
|
}
|
||||||
|
|
||||||
Object.assign(filter, store.userFilter);
|
Object.assign(filter, store.userFilter, exprFilter);
|
||||||
|
|
||||||
let where;
|
let where;
|
||||||
if (filter?.where || store.filter?.where)
|
if (filter?.where || store.filter?.where)
|
||||||
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
|
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
|
||||||
|
@ -87,29 +95,12 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
const params = { filter };
|
const params = { filter };
|
||||||
|
|
||||||
Object.assign(params, userParams);
|
Object.assign(params, userParams);
|
||||||
if (params.filter) params.filter.skip = store.skip;
|
params.filter.skip = store.skip;
|
||||||
if (store?.order && typeof store?.order == 'string') store.order = [store.order];
|
if (store.order && store.order.length) params.filter.order = store.order;
|
||||||
if (store.order?.length) params.filter.order = [...store.order];
|
|
||||||
else delete params.filter.order;
|
else delete params.filter.order;
|
||||||
|
|
||||||
store.currentFilter = JSON.parse(JSON.stringify(params));
|
|
||||||
delete store.currentFilter.filter.include;
|
|
||||||
store.currentFilter.filter = JSON.stringify(store.currentFilter.filter);
|
|
||||||
|
|
||||||
let exprFilter;
|
|
||||||
if (store?.exprBuilder) {
|
|
||||||
exprFilter = buildFilter(params, (param, value) => {
|
|
||||||
if (param == 'filter') return;
|
|
||||||
const res = store.exprBuilder(param, value);
|
|
||||||
if (res) delete params[param];
|
|
||||||
return res;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.filter.where || exprFilter)
|
|
||||||
params.filter.where = { ...params.filter.where, ...exprFilter };
|
|
||||||
params.filter = JSON.stringify(params.filter);
|
params.filter = JSON.stringify(params.filter);
|
||||||
|
store.currentFilter = params;
|
||||||
store.isLoading = true;
|
store.isLoading = true;
|
||||||
const response = await axios.get(store.url, {
|
const response = await axios.get(store.url, {
|
||||||
signal: canceller.signal,
|
signal: canceller.signal,
|
||||||
|
@ -256,7 +247,6 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateStateParams() {
|
function updateStateParams() {
|
||||||
if (!route?.path) return;
|
|
||||||
const newUrl = { path: route.path, query: { ...(route.query ?? {}) } };
|
const newUrl = { path: route.path, query: { ...(route.query ?? {}) } };
|
||||||
if (store?.searchUrl)
|
if (store?.searchUrl)
|
||||||
newUrl.query[store.searchUrl] = JSON.stringify(store.currentFilter);
|
newUrl.query[store.searchUrl] = JSON.stringify(store.currentFilter);
|
||||||
|
@ -280,7 +270,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
const pushUrl = { path: to };
|
const pushUrl = { path: to };
|
||||||
if (to.endsWith('/list') || to.endsWith('/'))
|
if (to.endsWith('/list') || to.endsWith('/'))
|
||||||
pushUrl.query = newUrl.query;
|
pushUrl.query = newUrl.query;
|
||||||
else destroy();
|
destroy();
|
||||||
return router.push(pushUrl);
|
return router.push(pushUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import { useVnConfirm } from 'src/composables/useVnConfirm';
|
|
||||||
import axios from 'axios';
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { i18n } from 'src/boot/i18n';
|
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
|
||||||
|
|
||||||
export async function useCau(res, message) {
|
|
||||||
const { notify } = useNotify();
|
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
|
||||||
const { config, headers, request, status, statusText, data } = res || {};
|
|
||||||
const { params, url, method, signal, headers: confHeaders } = config || {};
|
|
||||||
const { message: resMessage, code, name } = data?.error || {};
|
|
||||||
|
|
||||||
const additionalData = {
|
|
||||||
path: location.hash,
|
|
||||||
message: resMessage,
|
|
||||||
code,
|
|
||||||
request: request?.responseURL,
|
|
||||||
status,
|
|
||||||
name,
|
|
||||||
statusText: statusText,
|
|
||||||
config: {
|
|
||||||
url,
|
|
||||||
method,
|
|
||||||
params,
|
|
||||||
headers: confHeaders,
|
|
||||||
aborted: signal?.aborted,
|
|
||||||
version: headers?.['salix-version'],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
const opts = {
|
|
||||||
actions: [
|
|
||||||
{
|
|
||||||
icon: 'support_agent',
|
|
||||||
color: 'primary',
|
|
||||||
dense: true,
|
|
||||||
flat: false,
|
|
||||||
round: true,
|
|
||||||
handler: async () => {
|
|
||||||
const locale = i18n.global.t;
|
|
||||||
const reason = ref(
|
|
||||||
code == 'ACCESS_DENIED' ? locale('cau.askPrivileges') : ''
|
|
||||||
);
|
|
||||||
openConfirmationModal(
|
|
||||||
locale('cau.title'),
|
|
||||||
locale('cau.subtitle'),
|
|
||||||
async () => {
|
|
||||||
await axios.post('OsTickets/send-to-support', {
|
|
||||||
reason: reason.value,
|
|
||||||
additionalData,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
null,
|
|
||||||
{
|
|
||||||
component: VnInput,
|
|
||||||
props: {
|
|
||||||
modelValue: reason,
|
|
||||||
'onUpdate:modelValue': (val) => (reason.value = val),
|
|
||||||
label: locale('cau.inputLabel'),
|
|
||||||
class: 'full-width',
|
|
||||||
required: true,
|
|
||||||
autofocus: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
notify(message ?? 'globals.error', 'negative', 'error', opts);
|
|
||||||
}
|
|
|
@ -2,7 +2,7 @@ import { Notify } from 'quasar';
|
||||||
import { i18n } from 'src/boot/i18n';
|
import { i18n } from 'src/boot/i18n';
|
||||||
|
|
||||||
export default function useNotify() {
|
export default function useNotify() {
|
||||||
const notify = (message, type, icon, opts = {}) => {
|
const notify = (message, type, icon) => {
|
||||||
const defaultIcons = {
|
const defaultIcons = {
|
||||||
warning: 'warning',
|
warning: 'warning',
|
||||||
negative: 'error',
|
negative: 'error',
|
||||||
|
@ -13,7 +13,6 @@ export default function useNotify() {
|
||||||
message: i18n.global.t(message),
|
message: i18n.global.t(message),
|
||||||
type: type,
|
type: type,
|
||||||
icon: icon ? icon : defaultIcons[type],
|
icon: icon ? icon : defaultIcons[type],
|
||||||
...opts,
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
import { openURL } from 'quasar';
|
|
||||||
const defaultWindowFeatures = {
|
|
||||||
noopener: true,
|
|
||||||
noreferrer: true,
|
|
||||||
};
|
|
||||||
export default function (url, windowFeatures = defaultWindowFeatures, fn = undefined) {
|
|
||||||
openURL(url, fn, windowFeatures);
|
|
||||||
}
|
|
|
@ -2,14 +2,8 @@ import { useValidator } from 'src/composables/useValidator';
|
||||||
|
|
||||||
export function useRequired($attrs) {
|
export function useRequired($attrs) {
|
||||||
const { validations } = useValidator();
|
const { validations } = useValidator();
|
||||||
const hasRequired = Object.keys($attrs).includes('required');
|
|
||||||
let isRequired = false;
|
const isRequired = Object.keys($attrs).includes('required');
|
||||||
if (hasRequired) {
|
|
||||||
const required = $attrs['required'];
|
|
||||||
if (typeof required === 'boolean') {
|
|
||||||
isRequired = required;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const requiredFieldRule = (val) => validations().required(isRequired, val);
|
const requiredFieldRule = (val) => validations().required(isRequired, val);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -20,7 +20,7 @@ export function useRole() {
|
||||||
|
|
||||||
function hasAny(roles) {
|
function hasAny(roles) {
|
||||||
const roleStore = state.getRoles();
|
const roleStore = state.getRoles();
|
||||||
if (typeof roles === 'string') roles = [roles];
|
|
||||||
for (const role of roles) {
|
for (const role of roles) {
|
||||||
if (roleStore.value.indexOf(role) !== -1) return true;
|
if (roleStore.value.indexOf(role) !== -1) return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
import { h } from 'vue';
|
|
||||||
import { Dialog } from 'quasar';
|
|
||||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
export function useVnConfirm() {
|
export function useVnConfirm() {
|
||||||
const openConfirmationModal = (
|
const quasar = useQuasar();
|
||||||
title,
|
|
||||||
message,
|
const openConfirmationModal = (title, message, promise, successFn) => {
|
||||||
promise,
|
quasar
|
||||||
successFn,
|
.dialog({
|
||||||
customHTML = {}
|
component: VnConfirm,
|
||||||
) => {
|
componentProps: {
|
||||||
const { component, props } = customHTML;
|
|
||||||
Dialog.create({
|
|
||||||
component: h(
|
|
||||||
VnConfirm,
|
|
||||||
{
|
|
||||||
title: title,
|
title: title,
|
||||||
message: message,
|
message: message,
|
||||||
promise: promise,
|
promise: promise,
|
||||||
},
|
},
|
||||||
{ customHTML: () => h(component, props) }
|
})
|
||||||
),
|
.onOk(async () => {
|
||||||
}).onOk(async () => {
|
if (successFn) successFn();
|
||||||
if (successFn) successFn();
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return { openConfirmationModal };
|
return { openConfirmationModal };
|
||||||
|
|
|
@ -241,7 +241,7 @@ input::-webkit-inner-spin-button {
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
padding: 1px 10px 1px 10px;
|
padding: 1px 10px 1px 10px;
|
||||||
max-width: 130px;
|
max-width: 100px;
|
||||||
div span {
|
div span {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
export default function getDifferences(obj1, obj2) {
|
|
||||||
let diff = {};
|
|
||||||
delete obj1.$index;
|
|
||||||
delete obj2.$index;
|
|
||||||
|
|
||||||
for (let key in obj1) {
|
|
||||||
if (obj2[key] && JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])) {
|
|
||||||
diff[key] = obj2[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let key in obj2) {
|
|
||||||
if (
|
|
||||||
obj1[key] === undefined ||
|
|
||||||
JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])
|
|
||||||
) {
|
|
||||||
diff[key] = obj2[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return diff;
|
|
||||||
}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// parsing JSON safely
|
||||||
function parseJSON(str, fallback) {
|
function parseJSON(str, fallback) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(str ?? '{}');
|
return JSON.parse(str ?? '{}');
|
||||||
|
@ -8,20 +9,12 @@ function parseJSON(str, fallback) {
|
||||||
}
|
}
|
||||||
export default function (route, param) {
|
export default function (route, param) {
|
||||||
// catch route query params
|
// catch route query params
|
||||||
const params = parseJSON(route?.query?.table, {});
|
const params = parseJSON(route?.query?.params, {});
|
||||||
|
|
||||||
// extract and parse filter from params
|
// extract and parse filter from params
|
||||||
const { filter: filterStr = '{}' } = params;
|
const { filter: filterStr = '{}' } = params;
|
||||||
|
|
||||||
const where = parseJSON(filterStr, {})?.where;
|
const where = parseJSON(filterStr, {})?.where;
|
||||||
|
if (where && where[param] !== undefined) {
|
||||||
if (where && !param) {
|
|
||||||
return where;
|
|
||||||
} else if (where && where.and) {
|
|
||||||
const foundParam = where.and.find((p) => p[param]);
|
|
||||||
if (foundParam) {
|
|
||||||
return foundParam[param];
|
|
||||||
}
|
|
||||||
} else if (where && where[param]) {
|
|
||||||
return where[param];
|
return where[param];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
export default function getUpdatedValues(keys, formData) {
|
|
||||||
return keys.reduce((acc, key) => {
|
|
||||||
acc[key] = formData[key];
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
}
|
|
|
@ -11,17 +11,11 @@ import dashIfEmpty from './dashIfEmpty';
|
||||||
import dateRange from './dateRange';
|
import dateRange from './dateRange';
|
||||||
import toHour from './toHour';
|
import toHour from './toHour';
|
||||||
import dashOrCurrency from './dashOrCurrency';
|
import dashOrCurrency from './dashOrCurrency';
|
||||||
import getDifferences from './getDifferences';
|
|
||||||
import getUpdatedValues from './getUpdatedValues';
|
|
||||||
import getParamWhere from './getParamWhere';
|
import getParamWhere from './getParamWhere';
|
||||||
import parsePhone from './parsePhone';
|
|
||||||
import isDialogOpened from './isDialogOpened';
|
import isDialogOpened from './isDialogOpened';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getUpdatedValues,
|
|
||||||
getDifferences,
|
|
||||||
isDialogOpened,
|
isDialogOpened,
|
||||||
parsePhone,
|
|
||||||
toLowerCase,
|
toLowerCase,
|
||||||
toLowerCamel,
|
toLowerCamel,
|
||||||
toDate,
|
toDate,
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
export default async function parsePhone(phone, country) {
|
|
||||||
if (!phone) return;
|
|
||||||
if (phone.startsWith('+')) return `${phone.slice(1)}`;
|
|
||||||
if (phone.startsWith('00')) return `${phone.slice(2)}`;
|
|
||||||
|
|
||||||
let prefix;
|
|
||||||
try {
|
|
||||||
prefix = (await axios.get(`Prefixes/${country.toLowerCase()}`)).data?.prefix;
|
|
||||||
} catch (e) {
|
|
||||||
prefix = (await axios.get('PbxConfigs/findOne')).data?.defaultPrefix;
|
|
||||||
}
|
|
||||||
prefix = prefix.replace(/^0+/, '');
|
|
||||||
|
|
||||||
if (phone.startsWith(prefix)) return phone;
|
|
||||||
return `${prefix}${phone}`;
|
|
||||||
}
|
|
|
@ -59,8 +59,8 @@ globals:
|
||||||
downloadCSVSuccess: CSV downloaded successfully
|
downloadCSVSuccess: CSV downloaded successfully
|
||||||
reference: Reference
|
reference: Reference
|
||||||
agency: Agency
|
agency: Agency
|
||||||
warehouseOut: Warehouse Out
|
wareHouseOut: Warehouse Out
|
||||||
warehouseIn: Warehouse In
|
wareHouseIn: Warehouse In
|
||||||
landed: Landed
|
landed: Landed
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
totalEntries: Total entries
|
totalEntries: Total entries
|
||||||
|
@ -106,30 +106,9 @@ globals:
|
||||||
weight: Weight
|
weight: Weight
|
||||||
error: Ups! Something went wrong
|
error: Ups! Something went wrong
|
||||||
recalc: Recalculate
|
recalc: Recalculate
|
||||||
alias: Alias
|
|
||||||
vat: VAT
|
|
||||||
intrastat: Intrastat
|
|
||||||
tags: Tags
|
|
||||||
size: Size
|
|
||||||
producer: Producer
|
|
||||||
origin: Origin
|
|
||||||
state: State
|
|
||||||
subtotal: Subtotal
|
|
||||||
visible: Visible
|
|
||||||
price: Price
|
|
||||||
client: Client
|
|
||||||
country: Country
|
|
||||||
phone: Phone
|
|
||||||
mobile: Mobile
|
|
||||||
postcode: Postcode
|
|
||||||
street: Street
|
|
||||||
tag: Tag
|
|
||||||
ticketId: Ticket ID
|
|
||||||
confirmed: Confirmed
|
|
||||||
small: Small
|
small: Small
|
||||||
medium: Medium
|
medium: Medium
|
||||||
big: Big
|
big: Big
|
||||||
email: Email
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -299,7 +278,6 @@ globals:
|
||||||
clientsActionsMonitor: Clients and actions
|
clientsActionsMonitor: Clients and actions
|
||||||
serial: Serial
|
serial: Serial
|
||||||
medical: Mutual
|
medical: Mutual
|
||||||
pit: IRPF
|
|
||||||
RouteExtendedList: Router
|
RouteExtendedList: Router
|
||||||
wasteRecalc: Waste recaclulate
|
wasteRecalc: Waste recaclulate
|
||||||
operator: Operator
|
operator: Operator
|
||||||
|
@ -322,18 +300,19 @@ globals:
|
||||||
maxTemperature: Max
|
maxTemperature: Max
|
||||||
minTemperature: Min
|
minTemperature: Min
|
||||||
params:
|
params:
|
||||||
|
id: ID
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
salesPersonFk: Sales person
|
salesPersonFk: Sales person
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
|
from: From
|
||||||
|
To: To
|
||||||
stateFk: State
|
stateFk: State
|
||||||
email: Email
|
email: Email
|
||||||
SSN: SSN
|
SSN: SSN
|
||||||
fi: FI
|
fi: FI
|
||||||
packing: ITP
|
|
||||||
myTeam: My team
|
myTeam: My team
|
||||||
departmentFk: Department
|
departmentFk: Department
|
||||||
countryFk: Country
|
|
||||||
changePass: Change password
|
changePass: Change password
|
||||||
deleteConfirmTitle: Delete selected elements
|
deleteConfirmTitle: Delete selected elements
|
||||||
changeState: Change state
|
changeState: Change state
|
||||||
|
@ -357,12 +336,16 @@ login:
|
||||||
loginError: Invalid username or password
|
loginError: Invalid username or password
|
||||||
fieldRequired: This field is required
|
fieldRequired: This field is required
|
||||||
twoFactorRequired: Two-factor verification required
|
twoFactorRequired: Two-factor verification required
|
||||||
twoFactorRequired:
|
twoFactor:
|
||||||
|
code: Code
|
||||||
validate: Validate
|
validate: Validate
|
||||||
insert: Enter the verification code
|
insert: Enter the verification code
|
||||||
explanation: >-
|
explanation: >-
|
||||||
Please, enter the verification code that we have sent to your email in the
|
Please, enter the verification code that we have sent to your email in the
|
||||||
next 5 minutes
|
next 5 minutes
|
||||||
|
verifyEmail:
|
||||||
|
pageTitles:
|
||||||
|
verifyEmail: Email verification
|
||||||
recoverPassword:
|
recoverPassword:
|
||||||
userOrEmail: User or recovery email
|
userOrEmail: User or recovery email
|
||||||
explanation: >-
|
explanation: >-
|
||||||
|
@ -371,15 +354,18 @@ resetPassword:
|
||||||
repeatPassword: Repeat password
|
repeatPassword: Repeat password
|
||||||
passwordNotMatch: Passwords don't match
|
passwordNotMatch: Passwords don't match
|
||||||
passwordChanged: Password changed
|
passwordChanged: Password changed
|
||||||
cau:
|
|
||||||
title: Send cau
|
|
||||||
subtitle: By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.
|
|
||||||
inputLabel: Explain why this error should not appear
|
|
||||||
askPrivileges: Ask for privileges
|
|
||||||
entry:
|
entry:
|
||||||
list:
|
list:
|
||||||
newEntry: New entry
|
newEntry: New entry
|
||||||
|
landed: Landed
|
||||||
|
invoiceNumber: Invoice number
|
||||||
|
supplier: Supplier
|
||||||
|
booked: Booked
|
||||||
|
confirmed: Confirmed
|
||||||
|
ordered: Ordered
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
|
reference: Reference
|
||||||
created: Creation
|
created: Creation
|
||||||
supplierFk: Supplier
|
supplierFk: Supplier
|
||||||
isBooked: Booked
|
isBooked: Booked
|
||||||
|
@ -392,117 +378,236 @@ entry:
|
||||||
summary:
|
summary:
|
||||||
commission: Commission
|
commission: Commission
|
||||||
currency: Currency
|
currency: Currency
|
||||||
|
company: Company
|
||||||
|
reference: Reference
|
||||||
invoiceNumber: Invoice number
|
invoiceNumber: Invoice number
|
||||||
ordered: Ordered
|
ordered: Ordered
|
||||||
|
confirmed: Confirmed
|
||||||
booked: Booked
|
booked: Booked
|
||||||
excludedFromAvailable: Inventory
|
excludedFromAvailable: Inventory
|
||||||
travelReference: Reference
|
travelReference: Reference
|
||||||
travelAgency: Agency
|
travelAgency: Agency
|
||||||
travelShipped: Shipped
|
travelShipped: Shipped
|
||||||
|
travelWarehouseOut: Warehouse Out
|
||||||
travelDelivered: Delivered
|
travelDelivered: Delivered
|
||||||
travelLanded: Landed
|
travelLanded: Landed
|
||||||
|
travelWarehouseIn: Warehouse In
|
||||||
travelReceived: Received
|
travelReceived: Received
|
||||||
buys: Buys
|
buys: Buys
|
||||||
|
quantity: Quantity
|
||||||
stickers: Stickers
|
stickers: Stickers
|
||||||
package: Package
|
package: Package
|
||||||
packing: Pack.
|
weight: Weight
|
||||||
grouping: Group.
|
packing: Packing
|
||||||
|
grouping: Grouping
|
||||||
buyingValue: Buying value
|
buyingValue: Buying value
|
||||||
import: Import
|
import: Import
|
||||||
pvp: PVP
|
pvp: PVP
|
||||||
|
item: Item
|
||||||
basicData:
|
basicData:
|
||||||
|
supplier: Supplier
|
||||||
travel: Travel
|
travel: Travel
|
||||||
|
reference: Reference
|
||||||
|
invoiceNumber: Invoice number
|
||||||
|
company: Company
|
||||||
currency: Currency
|
currency: Currency
|
||||||
commission: Commission
|
commission: Commission
|
||||||
observation: Observation
|
observation: Observation
|
||||||
|
ordered: Ordered
|
||||||
|
confirmed: Confirmed
|
||||||
booked: Booked
|
booked: Booked
|
||||||
excludedFromAvailable: Inventory
|
excludedFromAvailable: Inventory
|
||||||
|
agency: Agency
|
||||||
|
warehouseOut: Warehouse Out
|
||||||
|
warehouseIn: Warehouse In
|
||||||
|
shipped: Shipped
|
||||||
|
landed: Landed
|
||||||
|
id: ID
|
||||||
buys:
|
buys:
|
||||||
|
groupingPrice: Grouping price
|
||||||
|
packingPrice: Packing price
|
||||||
|
reference: Reference
|
||||||
observations: Observations
|
observations: Observations
|
||||||
|
item: Item
|
||||||
|
size: Size
|
||||||
|
packing: Packing
|
||||||
|
grouping: Grouping
|
||||||
|
buyingValue: Buying value
|
||||||
packagingFk: Box
|
packagingFk: Box
|
||||||
|
file: File
|
||||||
|
name: Name
|
||||||
|
producer: Producer
|
||||||
|
type: Type
|
||||||
color: Color
|
color: Color
|
||||||
|
id: ID
|
||||||
printedStickers: Printed stickers
|
printedStickers: Printed stickers
|
||||||
notes:
|
notes:
|
||||||
observationType: Observation type
|
observationType: Observation type
|
||||||
|
descriptor:
|
||||||
|
agency: Agency
|
||||||
|
landed: Landed
|
||||||
|
warehouseOut: Warehouse Out
|
||||||
latestBuys:
|
latestBuys:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
image: Picture
|
image: Picture
|
||||||
itemFk: Item ID
|
itemFk: Item ID
|
||||||
|
packing: Packing
|
||||||
|
grouping: Grouping
|
||||||
|
quantity: Quantity
|
||||||
|
size: Size
|
||||||
|
tags: Tags
|
||||||
|
type: Type
|
||||||
|
intrastat: Intrastat
|
||||||
|
origin: Origin
|
||||||
weightByPiece: Weight/Piece
|
weightByPiece: Weight/Piece
|
||||||
isActive: Active
|
isActive: Active
|
||||||
family: Family
|
family: Family
|
||||||
entryFk: Entry
|
entryFk: Entry
|
||||||
|
buyingValue: Buying value
|
||||||
freightValue: Freight value
|
freightValue: Freight value
|
||||||
comissionValue: Commission value
|
comissionValue: Commission value
|
||||||
|
description: Description
|
||||||
packageValue: Package value
|
packageValue: Package value
|
||||||
isIgnored: Is ignored
|
isIgnored: Is ignored
|
||||||
price2: Grouping
|
price2: Grouping
|
||||||
price3: Packing
|
price3: Packing
|
||||||
minPrice: Min
|
minPrice: Min
|
||||||
ektFk: Ekt
|
ektFk: Ekt
|
||||||
|
weight: Weight
|
||||||
|
packagingFk: Package
|
||||||
packingOut: Package out
|
packingOut: Package out
|
||||||
landing: Landing
|
landing: Landing
|
||||||
isExcludedFromAvailable: Es inventory
|
isExcludedFromAvailable: Es inventory
|
||||||
ticket:
|
ticket:
|
||||||
|
pageTitles:
|
||||||
|
tickets: Tickets
|
||||||
|
list: List
|
||||||
|
ticketCreate: New ticket
|
||||||
|
summary: Summary
|
||||||
|
basicData: Basic Data
|
||||||
|
boxing: Boxing
|
||||||
|
sms: Sms
|
||||||
|
notes: Notes
|
||||||
|
sale: Sale
|
||||||
|
dms: File management
|
||||||
|
volume: Volume
|
||||||
|
observation: Notes
|
||||||
|
ticketAdvance: Advance tickets
|
||||||
|
futureTickets: Future tickets
|
||||||
|
purchaseRequest: Purchase request
|
||||||
|
weeklyTickets: Weekly tickets
|
||||||
|
list:
|
||||||
|
nickname: Nickname
|
||||||
|
state: State
|
||||||
|
shipped: Shipped
|
||||||
|
landed: Landed
|
||||||
|
salesPerson: Sales person
|
||||||
|
total: Total
|
||||||
card:
|
card:
|
||||||
|
ticketId: Ticket ID
|
||||||
|
state: State
|
||||||
customerId: Customer ID
|
customerId: Customer ID
|
||||||
|
salesPerson: Sales person
|
||||||
|
agency: Agency
|
||||||
|
shipped: Shipped
|
||||||
|
warehouse: Warehouse
|
||||||
customerCard: Customer card
|
customerCard: Customer card
|
||||||
|
alias: Alias
|
||||||
ticketList: Ticket List
|
ticketList: Ticket List
|
||||||
newOrder: New Order
|
newOrder: New Order
|
||||||
boxing:
|
boxing:
|
||||||
expedition: Expedition
|
expedition: Expedition
|
||||||
|
item: Item
|
||||||
created: Created
|
created: Created
|
||||||
|
worker: Worker
|
||||||
selectTime: 'Select time:'
|
selectTime: 'Select time:'
|
||||||
selectVideo: 'Select video:'
|
selectVideo: 'Select video:'
|
||||||
notFound: No videos available
|
notFound: No videos available
|
||||||
summary:
|
summary:
|
||||||
|
state: State
|
||||||
|
salesPerson: Sales person
|
||||||
|
agency: Agency
|
||||||
zone: Zone
|
zone: Zone
|
||||||
|
warehouse: Warehouse
|
||||||
collection: Collection
|
collection: Collection
|
||||||
route: Route
|
route: Route
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
|
landed: Landed
|
||||||
consigneePhone: Consignee phone
|
consigneePhone: Consignee phone
|
||||||
consigneeMobile: Consignee mobile
|
consigneeMobile: Consignee mobile
|
||||||
consigneeAddress: Consignee address
|
consigneeAddress: Consignee address
|
||||||
clientPhone: Client phone
|
clientPhone: Client phone
|
||||||
clientMobile: Client mobile
|
clientMobile: Client mobile
|
||||||
consignee: Consignee
|
consignee: Consignee
|
||||||
|
subtotal: Subtotal
|
||||||
|
vat: VAT
|
||||||
total: Total
|
total: Total
|
||||||
saleLines: Line items
|
saleLines: Line items
|
||||||
|
item: Item
|
||||||
|
visible: Visible
|
||||||
available: Available
|
available: Available
|
||||||
|
quantity: Quantity
|
||||||
|
price: Price
|
||||||
discount: Discount
|
discount: Discount
|
||||||
packing: Packing
|
packing: Packing
|
||||||
hasComponentLack: Component lack
|
hasComponentLack: Component lack
|
||||||
itemShortage: Not visible
|
itemShortage: Not visible
|
||||||
claim: Claim
|
claim: Claim
|
||||||
reserved: Reserved
|
reserved: Reserved
|
||||||
|
created: Created
|
||||||
package: Package
|
package: Package
|
||||||
taxClass: Tax class
|
taxClass: Tax class
|
||||||
services: Services
|
services: Services
|
||||||
requester: Requester
|
requester: Requester
|
||||||
atender: Atender
|
atender: Atender
|
||||||
request: Request
|
request: Request
|
||||||
|
weight: Weight
|
||||||
goTo: Go to
|
goTo: Go to
|
||||||
summaryAmount: Summary
|
summaryAmount: Summary
|
||||||
purchaseRequest: Purchase request
|
purchaseRequest: Purchase request
|
||||||
service: Service
|
service: Service
|
||||||
|
description: Description
|
||||||
attender: Attender
|
attender: Attender
|
||||||
ok: Ok
|
ok: Ok
|
||||||
create:
|
create:
|
||||||
|
client: Client
|
||||||
address: Address
|
address: Address
|
||||||
|
landed: Landed
|
||||||
|
warehouse: Warehouse
|
||||||
|
agency: Agency
|
||||||
invoiceOut:
|
invoiceOut:
|
||||||
|
list:
|
||||||
|
ref: Reference
|
||||||
|
issued: Issued
|
||||||
|
shortIssued: Issued
|
||||||
|
client: Client
|
||||||
|
created: Created
|
||||||
|
shortCreated: Created
|
||||||
|
company: Company
|
||||||
|
dued: Due date
|
||||||
|
shortDued: Due date
|
||||||
|
amount: Amount
|
||||||
card:
|
card:
|
||||||
issued: Issued
|
issued: Issued
|
||||||
|
client: Client
|
||||||
|
company: Company
|
||||||
customerCard: Customer card
|
customerCard: Customer card
|
||||||
summary:
|
summary:
|
||||||
issued: Issued
|
issued: Issued
|
||||||
|
created: Created
|
||||||
dued: Due
|
dued: Due
|
||||||
booked: Booked
|
booked: Booked
|
||||||
|
company: Company
|
||||||
taxBreakdown: Tax breakdown
|
taxBreakdown: Tax breakdown
|
||||||
|
type: Type
|
||||||
taxableBase: Taxable base
|
taxableBase: Taxable base
|
||||||
rate: Rate
|
rate: Rate
|
||||||
fee: Fee
|
fee: Fee
|
||||||
tickets: Tickets
|
tickets: Tickets
|
||||||
|
ticketId: Ticket id
|
||||||
|
nickname: Alias
|
||||||
|
shipped: Shipped
|
||||||
totalWithVat: Amount
|
totalWithVat: Amount
|
||||||
globalInvoices:
|
globalInvoices:
|
||||||
errors:
|
errors:
|
||||||
|
@ -515,16 +620,23 @@ invoiceOut:
|
||||||
invoiceWithFutureDate: Exists an invoice with a future date
|
invoiceWithFutureDate: Exists an invoice with a future date
|
||||||
noTicketsToInvoice: There are not tickets to invoice
|
noTicketsToInvoice: There are not tickets to invoice
|
||||||
criticalInvoiceError: 'Critical invoicing error, process stopped'
|
criticalInvoiceError: 'Critical invoicing error, process stopped'
|
||||||
invalidSerialTypeForAll: The serial type must be global when invoicing all clients
|
|
||||||
table:
|
table:
|
||||||
|
client: Client
|
||||||
addressId: Address id
|
addressId: Address id
|
||||||
streetAddress: Street
|
streetAddress: Street
|
||||||
statusCard:
|
statusCard:
|
||||||
percentageText: '{getPercentage}% {getAddressNumber} of {getNAddresses}'
|
percentageText: '{getPercentage}% {getAddressNumber} of {getNAddresses}'
|
||||||
pdfsNumberText: '{nPdfs} of {totalPdfs} PDFs'
|
pdfsNumberText: '{nPdfs} of {totalPdfs} PDFs'
|
||||||
negativeBases:
|
negativeBases:
|
||||||
|
from: From
|
||||||
|
to: To
|
||||||
|
company: Company
|
||||||
|
country: Country
|
||||||
clientId: Client Id
|
clientId: Client Id
|
||||||
|
client: Client
|
||||||
|
amount: Amount
|
||||||
base: Base
|
base: Base
|
||||||
|
ticketId: Ticket Id
|
||||||
active: Active
|
active: Active
|
||||||
hasToInvoice: Has to Invoice
|
hasToInvoice: Has to Invoice
|
||||||
verifiedData: Verified Data
|
verifiedData: Verified Data
|
||||||
|
@ -537,6 +649,15 @@ shelving:
|
||||||
priority: Priority
|
priority: Priority
|
||||||
newShelving: New Shelving
|
newShelving: New Shelving
|
||||||
summary:
|
summary:
|
||||||
|
code: Code
|
||||||
|
parking: Parking
|
||||||
|
priority: Priority
|
||||||
|
worker: Worker
|
||||||
|
recyclable: Recyclable
|
||||||
|
basicData:
|
||||||
|
code: Code
|
||||||
|
parking: Parking
|
||||||
|
priority: Priority
|
||||||
recyclable: Recyclable
|
recyclable: Recyclable
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Picking order
|
pickingOrder: Picking order
|
||||||
|
@ -549,27 +670,56 @@ parking:
|
||||||
order:
|
order:
|
||||||
field:
|
field:
|
||||||
salesPersonFk: Sales Person
|
salesPersonFk: Sales Person
|
||||||
|
clientFk: Client
|
||||||
|
isConfirmed: Confirmed
|
||||||
|
created: Created
|
||||||
|
landed: Landed
|
||||||
|
hour: Hour
|
||||||
|
agency: Agency
|
||||||
|
total: Total
|
||||||
form:
|
form:
|
||||||
clientFk: Client
|
clientFk: Client
|
||||||
addressFk: Address
|
addressFk: Address
|
||||||
|
landed: Landed
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
list:
|
list:
|
||||||
newOrder: New Order
|
newOrder: New Order
|
||||||
summary:
|
summary:
|
||||||
basket: Basket
|
basket: Basket
|
||||||
|
nickname: Nickname
|
||||||
|
company: Company
|
||||||
|
confirmed: Confirmed
|
||||||
notConfirmed: Not confirmed
|
notConfirmed: Not confirmed
|
||||||
created: Created
|
created: Created
|
||||||
|
landed: Landed
|
||||||
|
phone: Phone
|
||||||
createdFrom: Created From
|
createdFrom: Created From
|
||||||
address: Address
|
address: Address
|
||||||
|
notes: Notes
|
||||||
|
subtotal: Subtotal
|
||||||
total: Total
|
total: Total
|
||||||
|
vat: VAT
|
||||||
|
state: State
|
||||||
|
alias: Alias
|
||||||
items: Items
|
items: Items
|
||||||
orderTicketList: Order Ticket List
|
orderTicketList: Order Ticket List
|
||||||
|
details: Details
|
||||||
|
item: Item
|
||||||
|
quantity: Quantity
|
||||||
|
price: Price
|
||||||
amount: Amount
|
amount: Amount
|
||||||
confirm: Confirm
|
confirm: Confirm
|
||||||
confirmLines: Confirm lines
|
confirmLines: Confirm lines
|
||||||
department:
|
department:
|
||||||
|
pageTitles:
|
||||||
|
basicData: Basic data
|
||||||
|
department: Department
|
||||||
|
summary: Summary
|
||||||
|
name: Name
|
||||||
|
code: Code
|
||||||
chat: Chat
|
chat: Chat
|
||||||
bossDepartment: Boss Department
|
bossDepartment: Boss Department
|
||||||
|
email: Email
|
||||||
selfConsumptionCustomer: Self-consumption customer
|
selfConsumptionCustomer: Self-consumption customer
|
||||||
telework: Telework
|
telework: Telework
|
||||||
notifyOnErrors: Notify on errors
|
notifyOnErrors: Notify on errors
|
||||||
|
@ -578,11 +728,47 @@ department:
|
||||||
hasToSendMail: Send check-ins by email
|
hasToSendMail: Send check-ins by email
|
||||||
departmentRemoved: Department removed
|
departmentRemoved: Department removed
|
||||||
worker:
|
worker:
|
||||||
|
pageTitles:
|
||||||
|
workers: Workers
|
||||||
|
list: List
|
||||||
|
basicData: Basic data
|
||||||
|
summary: Summary
|
||||||
|
notifications: Notifications
|
||||||
|
workerCreate: New worker
|
||||||
|
department: Department
|
||||||
|
pda: PDA
|
||||||
|
notes: Notas
|
||||||
|
dms: My documentation
|
||||||
|
pbx: Private Branch Exchange
|
||||||
|
log: Log
|
||||||
|
calendar: Calendar
|
||||||
|
timeControl: Time control
|
||||||
|
locker: Locker
|
||||||
|
balance: Balance
|
||||||
|
medical: Medical
|
||||||
|
operator: Operator
|
||||||
list:
|
list:
|
||||||
|
name: Name
|
||||||
|
email: Email
|
||||||
|
phone: Phone
|
||||||
|
mobile: Mobile
|
||||||
|
active: Active
|
||||||
department: Department
|
department: Department
|
||||||
schedule: Schedule
|
schedule: Schedule
|
||||||
newWorker: New worker
|
newWorker: New worker
|
||||||
|
card:
|
||||||
|
workerId: Worker ID
|
||||||
|
user: User
|
||||||
|
name: Name
|
||||||
|
email: Email
|
||||||
|
phone: Phone
|
||||||
|
mobile: Mobile
|
||||||
|
active: Active
|
||||||
|
warehouse: Warehouse
|
||||||
|
agency: Agency
|
||||||
|
salesPerson: Sales person
|
||||||
summary:
|
summary:
|
||||||
|
basicData: Basic data
|
||||||
boss: Boss
|
boss: Boss
|
||||||
phoneExtension: Phone extension
|
phoneExtension: Phone extension
|
||||||
entPhone: Enterprise phone
|
entPhone: Enterprise phone
|
||||||
|
@ -593,15 +779,15 @@ worker:
|
||||||
role: Role
|
role: Role
|
||||||
sipExtension: Extension
|
sipExtension: Extension
|
||||||
locker: Locker
|
locker: Locker
|
||||||
fiDueDate: FI due date
|
fiDueDate: Fecha de caducidad del DNI
|
||||||
sex: Sex
|
sex: Sexo
|
||||||
seniority: Seniority
|
seniority: Antigüedad
|
||||||
fi: DNI/NIE/NIF
|
fi: DNI/NIE/NIF
|
||||||
birth: Birth
|
birth: Fecha de nacimiento
|
||||||
isFreelance: Freelance
|
isFreelance: Autónomo
|
||||||
isSsDiscounted: Bonificación SS
|
isSsDiscounted: Bonificación SS
|
||||||
hasMachineryAuthorized: Machinery authorized
|
hasMachineryAuthorized: Autorizado para llevar maquinaria
|
||||||
isDisable: Disable
|
isDisable: Trabajador desactivado
|
||||||
notificationsManager:
|
notificationsManager:
|
||||||
activeNotifications: Active notifications
|
activeNotifications: Active notifications
|
||||||
availableNotifications: Available notifications
|
availableNotifications: Available notifications
|
||||||
|
@ -614,12 +800,19 @@ worker:
|
||||||
serialNumber: Serial number
|
serialNumber: Serial number
|
||||||
removePDA: Deallocate PDA
|
removePDA: Deallocate PDA
|
||||||
create:
|
create:
|
||||||
|
name: Name
|
||||||
lastName: Last name
|
lastName: Last name
|
||||||
birth: Birth
|
birth: Birth
|
||||||
fi: Fi
|
fi: Fi
|
||||||
code: Worker code
|
code: Worker code
|
||||||
|
phone: Phone
|
||||||
|
postcode: Postcode
|
||||||
|
province: Province
|
||||||
|
city: City
|
||||||
|
street: Street
|
||||||
webUser: Web user
|
webUser: Web user
|
||||||
personalEmail: Personal email
|
personalEmail: Personal email
|
||||||
|
company: Company
|
||||||
boss: Boss
|
boss: Boss
|
||||||
payMethods: Pay method
|
payMethods: Pay method
|
||||||
iban: IBAN
|
iban: IBAN
|
||||||
|
@ -631,13 +824,16 @@ worker:
|
||||||
endDate: End date
|
endDate: End date
|
||||||
center: Training center
|
center: Training center
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
|
amount: Amount
|
||||||
remark: Remark
|
remark: Remark
|
||||||
hasDiploma: Has diploma
|
hasDiploma: Has diploma
|
||||||
medical:
|
medical:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
date: Date
|
||||||
time: Hour
|
time: Hour
|
||||||
center: Formation Center
|
center: Formation Center
|
||||||
invoice: Invoice
|
invoice: Invoice
|
||||||
|
amount: Amount
|
||||||
isFit: Fit
|
isFit: Fit
|
||||||
remark: Observations
|
remark: Observations
|
||||||
imageNotFound: Image not found
|
imageNotFound: Image not found
|
||||||
|
@ -661,7 +857,18 @@ worker:
|
||||||
isOnReservationMode: Reservation mode
|
isOnReservationMode: Reservation mode
|
||||||
machine: Machine
|
machine: Machine
|
||||||
wagon:
|
wagon:
|
||||||
|
pageTitles:
|
||||||
|
wagons: Wagons
|
||||||
|
wagonsList: Wagons List
|
||||||
|
wagonCreate: Create wagon
|
||||||
|
wagonEdit: Edit wagon
|
||||||
|
typesList: Types List
|
||||||
|
typeCreate: Create type
|
||||||
|
typeEdit: Edit type
|
||||||
|
wagonCounter: Trolley counter
|
||||||
|
wagonTray: Tray List
|
||||||
type:
|
type:
|
||||||
|
name: Name
|
||||||
submit: Submit
|
submit: Submit
|
||||||
reset: Reset
|
reset: Reset
|
||||||
trayColor: Tray color
|
trayColor: Tray color
|
||||||
|
@ -669,10 +876,13 @@ wagon:
|
||||||
list:
|
list:
|
||||||
plate: Plate
|
plate: Plate
|
||||||
volume: Volume
|
volume: Volume
|
||||||
|
type: Type
|
||||||
remove: Remove
|
remove: Remove
|
||||||
removeItem: Wagon removed successfully
|
removeItem: Wagon removed successfully
|
||||||
create:
|
create:
|
||||||
plate: Plate
|
plate: Plate
|
||||||
|
volume: Volume
|
||||||
|
type: Type
|
||||||
label: Label
|
label: Label
|
||||||
warnings:
|
warnings:
|
||||||
noData: No data available
|
noData: No data available
|
||||||
|
@ -689,17 +899,26 @@ wagon:
|
||||||
supplier:
|
supplier:
|
||||||
list:
|
list:
|
||||||
payMethod: Pay method
|
payMethod: Pay method
|
||||||
|
payDeadline: Pay deadline
|
||||||
|
payDay: Pay day
|
||||||
account: Account
|
account: Account
|
||||||
newSupplier: New supplier
|
newSupplier: New supplier
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
|
name: Name
|
||||||
nif: NIF/CIF
|
nif: NIF/CIF
|
||||||
|
nickname: Alias
|
||||||
account: Account
|
account: Account
|
||||||
|
payMethod: Pay Method
|
||||||
payDay: Pay Day
|
payDay: Pay Day
|
||||||
|
country: Country
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsible
|
responsible: Responsible
|
||||||
|
notes: Notes
|
||||||
verified: Verified
|
verified: Verified
|
||||||
isActive: Is active
|
isActive: Is active
|
||||||
billingData: Billing data
|
billingData: Billing data
|
||||||
|
payMethod: Pay method
|
||||||
payDeadline: Pay deadline
|
payDeadline: Pay deadline
|
||||||
payDay: Pay day
|
payDay: Pay day
|
||||||
account: Account
|
account: Account
|
||||||
|
@ -712,12 +931,17 @@ supplier:
|
||||||
fiscalAddress: Fiscal address
|
fiscalAddress: Fiscal address
|
||||||
socialName: Social name
|
socialName: Social name
|
||||||
taxNumber: Tax number
|
taxNumber: Tax number
|
||||||
|
street: Street
|
||||||
city: City
|
city: City
|
||||||
|
postCode: Postcode
|
||||||
|
province: Province
|
||||||
|
country: Country
|
||||||
create:
|
create:
|
||||||
supplierName: Supplier name
|
supplierName: Supplier name
|
||||||
basicData:
|
basicData:
|
||||||
|
alias: Alias
|
||||||
workerFk: Responsible
|
workerFk: Responsible
|
||||||
isReal: Verified
|
isSerious: Verified
|
||||||
isActive: Active
|
isActive: Active
|
||||||
isPayMethodChecked: PayMethod checked
|
isPayMethodChecked: PayMethod checked
|
||||||
note: Notes
|
note: Notes
|
||||||
|
@ -730,18 +954,36 @@ supplier:
|
||||||
sageWithholdingFk: Sage withholding
|
sageWithholdingFk: Sage withholding
|
||||||
sageTransactionTypeFk: Sage transaction type
|
sageTransactionTypeFk: Sage transaction type
|
||||||
supplierActivityFk: Supplier activity
|
supplierActivityFk: Supplier activity
|
||||||
|
healthRegister: Health register
|
||||||
|
street: Street
|
||||||
|
postcode: Postcode
|
||||||
|
city: City *
|
||||||
|
provinceFk: Province
|
||||||
|
country: Country
|
||||||
isTrucker: Trucker
|
isTrucker: Trucker
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
billingData:
|
billingData:
|
||||||
payMethodFk: Billing data
|
payMethodFk: Billing data
|
||||||
payDemFk: Payment deadline
|
payDemFk: Payment deadline
|
||||||
|
payDay: Pay day
|
||||||
accounts:
|
accounts:
|
||||||
iban: Iban
|
iban: Iban
|
||||||
bankEntity: Bank entity
|
bankEntity: Bank entity
|
||||||
beneficiary: Beneficiary
|
beneficiary: Beneficiary
|
||||||
contacts:
|
contacts:
|
||||||
|
name: Name
|
||||||
|
phone: Phone
|
||||||
|
mobile: Mobile
|
||||||
email: Email
|
email: Email
|
||||||
observation: Notes
|
observation: Notes
|
||||||
|
addresses:
|
||||||
|
street: Street
|
||||||
|
postcode: Postcode
|
||||||
|
phone: Phone
|
||||||
|
name: Name
|
||||||
|
city: City
|
||||||
|
province: Province
|
||||||
|
mobile: Mobile
|
||||||
agencyTerms:
|
agencyTerms:
|
||||||
agencyFk: Agency
|
agencyFk: Agency
|
||||||
minimumM3: Minimum M3
|
minimumM3: Minimum M3
|
||||||
|
@ -753,16 +995,25 @@ supplier:
|
||||||
addRow: Add row
|
addRow: Add row
|
||||||
consumption:
|
consumption:
|
||||||
entry: Entry
|
entry: Entry
|
||||||
|
date: Date
|
||||||
|
reference: Reference
|
||||||
travel:
|
travel:
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
ref: Reference
|
ref: Reference
|
||||||
|
agency: Agency
|
||||||
|
shipped: Shipped
|
||||||
|
landed: Landed
|
||||||
shipHour: Shipment Hour
|
shipHour: Shipment Hour
|
||||||
landHour: Landing Hour
|
landHour: Landing Hour
|
||||||
|
warehouseIn: Warehouse in
|
||||||
|
warehouseOut: Warehouse out
|
||||||
totalEntries: Total entries
|
totalEntries: Total entries
|
||||||
totalEntriesTooltip: Total entries
|
totalEntriesTooltip: Total entries
|
||||||
daysOnward: Landed days onwards
|
daysOnward: Landed days onwards
|
||||||
summary:
|
summary:
|
||||||
|
confirmed: Confirmed
|
||||||
entryId: Entry Id
|
entryId: Entry Id
|
||||||
freight: Freight
|
freight: Freight
|
||||||
package: Package
|
package: Package
|
||||||
|
@ -775,90 +1026,64 @@ travel:
|
||||||
AddEntry: Add entry
|
AddEntry: Add entry
|
||||||
thermographs: Thermographs
|
thermographs: Thermographs
|
||||||
hb: HB
|
hb: HB
|
||||||
|
variables:
|
||||||
|
search: Id/Reference
|
||||||
|
agencyModeFk: Agency
|
||||||
|
warehouseInFk: ' Warehouse In'
|
||||||
|
warehouseOutFk: Warehouse Out
|
||||||
|
landedFrom: Landed from
|
||||||
|
landedTo: Landed to
|
||||||
|
continent: Continent out
|
||||||
|
totalEntries: Total entries
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Automatic movement (Raid)
|
reference: Reference
|
||||||
isRaid: Raid
|
agency: Agency
|
||||||
|
shipped: Shipped
|
||||||
|
landed: Landed
|
||||||
|
warehouseOut: Warehouse Out
|
||||||
|
warehouseIn: Warehouse In
|
||||||
|
delivered: Delivered
|
||||||
|
received: Received
|
||||||
|
daysInForward: Days in forward
|
||||||
thermographs:
|
thermographs:
|
||||||
|
code: Code
|
||||||
temperature: Temperature
|
temperature: Temperature
|
||||||
|
state: State
|
||||||
destination: Destination
|
destination: Destination
|
||||||
|
created: Created
|
||||||
thermograph: Thermograph
|
thermograph: Thermograph
|
||||||
|
reference: Reference
|
||||||
|
type: Type
|
||||||
|
company: Company
|
||||||
|
warehouse: Warehouse
|
||||||
travelFileDescription: 'Travel id { travelId }'
|
travelFileDescription: 'Travel id { travelId }'
|
||||||
item:
|
file: File
|
||||||
descriptor:
|
|
||||||
buyer: Buyer
|
|
||||||
color: Color
|
|
||||||
category: Category
|
|
||||||
available: Available
|
|
||||||
warehouseText: 'Calculated on the warehouse of { warehouseName }'
|
|
||||||
itemDiary: Item diary
|
|
||||||
list:
|
|
||||||
id: Identifier
|
|
||||||
stems: Stems
|
|
||||||
category: Category
|
|
||||||
typeName: Type
|
|
||||||
isActive: Active
|
|
||||||
userName: Buyer
|
|
||||||
weightByPiece: Weight/Piece
|
|
||||||
stemMultiplier: Multiplier
|
|
||||||
fixedPrice:
|
|
||||||
itemFk: Item ID
|
|
||||||
groupingPrice: Grouping price
|
|
||||||
packingPrice: Packing price
|
|
||||||
hasMinPrice: Has min price
|
|
||||||
minPrice: Min price
|
|
||||||
started: Started
|
|
||||||
ended: Ended
|
|
||||||
create:
|
|
||||||
priority: Priority
|
|
||||||
buyRequest:
|
|
||||||
requester: Requester
|
|
||||||
requested: Requested
|
|
||||||
attender: Atender
|
|
||||||
achieved: Achieved
|
|
||||||
concept: Concept
|
|
||||||
summary:
|
|
||||||
otherData: Other data
|
|
||||||
tax: Tax
|
|
||||||
botanical: Botanical
|
|
||||||
barcode: Barcode
|
|
||||||
completeName: Complete name
|
|
||||||
family: Familiy
|
|
||||||
stems: Stems
|
|
||||||
multiplier: Multiplier
|
|
||||||
buyer: Buyer
|
|
||||||
doPhoto: Do photo
|
|
||||||
intrastatCode: Intrastat code
|
|
||||||
ref: Reference
|
|
||||||
relevance: Relevance
|
|
||||||
weight: Weight (gram)/stem
|
|
||||||
units: Units/box
|
|
||||||
expense: Expense
|
|
||||||
generic: Generic
|
|
||||||
recycledPlastic: Recycled plastic
|
|
||||||
nonRecycledPlastic: Non recycled plastic
|
|
||||||
minSalesQuantity: Min sales quantity
|
|
||||||
genus: Genus
|
|
||||||
specie: Specie
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
typeFk: Type
|
typeFk: Type
|
||||||
|
tag: Tag
|
||||||
value: Value
|
value: Value
|
||||||
# ItemFixedPriceFilter
|
# ItemFixedPriceFilter
|
||||||
buyerFk: Buyer
|
buyerFk: Buyer
|
||||||
|
warehouseFk: Warehouse
|
||||||
started: From
|
started: From
|
||||||
ended: To
|
ended: To
|
||||||
mine: For me
|
mine: For me
|
||||||
hasMinPrice: Minimum price
|
hasMinPrice: Minimum price
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Buyer
|
salesPersonFk: Buyer
|
||||||
|
supplierFk: Supplier
|
||||||
from: From
|
from: From
|
||||||
|
to: To
|
||||||
active: Is active
|
active: Is active
|
||||||
|
visible: Is visible
|
||||||
floramondo: Is floramondo
|
floramondo: Is floramondo
|
||||||
showBadDates: Show future items
|
showBadDates: Show future items
|
||||||
userPanel:
|
userPanel:
|
||||||
copyToken: Token copied to clipboard
|
copyToken: Token copied to clipboard
|
||||||
settings: Settings
|
settings: Settings
|
||||||
|
logOut: Log Out
|
||||||
localWarehouse: Local warehouse
|
localWarehouse: Local warehouse
|
||||||
localBank: Local bank
|
localBank: Local bank
|
||||||
localCompany: Local company
|
localCompany: Local company
|
||||||
|
@ -866,9 +1091,9 @@ components:
|
||||||
userCompany: User company
|
userCompany: User company
|
||||||
smartCard:
|
smartCard:
|
||||||
downloadFile: Download file
|
downloadFile: Download file
|
||||||
|
clone: Clone
|
||||||
openCard: View
|
openCard: View
|
||||||
openSummary: Summary
|
openSummary: Summary
|
||||||
viewSummary: Summary
|
|
||||||
cardDescriptor:
|
cardDescriptor:
|
||||||
mainList: Main list
|
mainList: Main list
|
||||||
summary: Summary
|
summary: Summary
|
||||||
|
|
|
@ -58,8 +58,8 @@ globals:
|
||||||
downloadCSVSuccess: Descarga de CSV exitosa
|
downloadCSVSuccess: Descarga de CSV exitosa
|
||||||
reference: Referencia
|
reference: Referencia
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
warehouseOut: Alm. salida
|
wareHouseOut: Alm. salida
|
||||||
warehouseIn: Alm. entrada
|
wareHouseIn: Alm. entrada
|
||||||
landed: F. entrega
|
landed: F. entrega
|
||||||
shipped: F. envío
|
shipped: F. envío
|
||||||
totalEntries: Ent. totales
|
totalEntries: Ent. totales
|
||||||
|
@ -108,30 +108,9 @@ globals:
|
||||||
weight: Peso
|
weight: Peso
|
||||||
error: ¡Ups! Algo salió mal
|
error: ¡Ups! Algo salió mal
|
||||||
recalc: Recalcular
|
recalc: Recalcular
|
||||||
alias: Alias
|
|
||||||
vat: IVA
|
|
||||||
intrastat: Intrastat
|
|
||||||
tags: Etiquetas
|
|
||||||
size: Medida
|
|
||||||
producer: Productor
|
|
||||||
origin: Origen
|
|
||||||
state: Estado
|
|
||||||
subtotal: Subtotal
|
|
||||||
visible: Visible
|
|
||||||
price: Precio
|
|
||||||
client: Cliente
|
|
||||||
country: País
|
|
||||||
phone: Teléfono
|
|
||||||
mobile: Móvil
|
|
||||||
postcode: Código postal
|
|
||||||
street: Dirección
|
|
||||||
tag: Etiqueta
|
|
||||||
ticketId: ID ticket
|
|
||||||
confirmed: Confirmado
|
|
||||||
small: Pequeño/a
|
small: Pequeño/a
|
||||||
medium: Mediano/a
|
medium: Mediano/a
|
||||||
big: Grande
|
big: Grande
|
||||||
email: Correo
|
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -304,7 +283,6 @@ globals:
|
||||||
clientsActionsMonitor: Clientes y acciones
|
clientsActionsMonitor: Clientes y acciones
|
||||||
serial: Facturas por serie
|
serial: Facturas por serie
|
||||||
medical: Mutua
|
medical: Mutua
|
||||||
pit: IRPF
|
|
||||||
wasteRecalc: Recalcular mermas
|
wasteRecalc: Recalcular mermas
|
||||||
operator: Operario
|
operator: Operario
|
||||||
parking: Parking
|
parking: Parking
|
||||||
|
@ -326,18 +304,19 @@ globals:
|
||||||
maxTemperature: Máx
|
maxTemperature: Máx
|
||||||
minTemperature: Mín
|
minTemperature: Mín
|
||||||
params:
|
params:
|
||||||
|
id: Id
|
||||||
clientFk: Id cliente
|
clientFk: Id cliente
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
provinceFk: Provincia
|
provinceFk: Provincia
|
||||||
|
from: Desde
|
||||||
|
To: Hasta
|
||||||
stateFk: Estado
|
stateFk: Estado
|
||||||
departmentFk: Departamento
|
departmentFk: Departamento
|
||||||
email: Correo
|
email: Correo
|
||||||
SSN: NSS
|
SSN: NSS
|
||||||
fi: NIF
|
fi: NIF
|
||||||
myTeam: Mi equipo
|
myTeam: Mi equipo
|
||||||
packing: ITP
|
|
||||||
countryFk: País
|
|
||||||
changePass: Cambiar contraseña
|
changePass: Cambiar contraseña
|
||||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||||
changeState: Cambiar estado
|
changeState: Cambiar estado
|
||||||
|
@ -362,9 +341,13 @@ login:
|
||||||
fieldRequired: Este campo es obligatorio
|
fieldRequired: Este campo es obligatorio
|
||||||
twoFactorRequired: Verificación de doble factor requerida
|
twoFactorRequired: Verificación de doble factor requerida
|
||||||
twoFactor:
|
twoFactor:
|
||||||
|
code: Código
|
||||||
validate: Validar
|
validate: Validar
|
||||||
insert: Introduce el código de verificación
|
insert: Introduce el código de verificación
|
||||||
explanation: Por favor introduce el código de verificación que te hemos enviado a tu email en los próximos 5 minutos
|
explanation: Por favor introduce el código de verificación que te hemos enviado a tu email en los próximos 5 minutos
|
||||||
|
verifyEmail:
|
||||||
|
pageTitles:
|
||||||
|
verifyEmail: Verificación de correo
|
||||||
recoverPassword:
|
recoverPassword:
|
||||||
userOrEmail: Usuario o correo de recuperación
|
userOrEmail: Usuario o correo de recuperación
|
||||||
explanation: >-
|
explanation: >-
|
||||||
|
@ -373,15 +356,18 @@ resetPassword:
|
||||||
repeatPassword: Repetir contraseña
|
repeatPassword: Repetir contraseña
|
||||||
passwordNotMatch: Las contraseñas no coinciden
|
passwordNotMatch: Las contraseñas no coinciden
|
||||||
passwordChanged: Contraseña cambiada
|
passwordChanged: Contraseña cambiada
|
||||||
cau:
|
|
||||||
title: Enviar cau
|
|
||||||
subtitle: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc
|
|
||||||
inputLabel: Explique el motivo por el que no deberia aparecer este fallo
|
|
||||||
askPrivileges: Solicitar permisos
|
|
||||||
entry:
|
entry:
|
||||||
list:
|
list:
|
||||||
newEntry: Nueva entrada
|
newEntry: Nueva entrada
|
||||||
|
landed: F. entrega
|
||||||
|
invoiceNumber: Núm. factura
|
||||||
|
supplier: Proveedor
|
||||||
|
booked: Asentado
|
||||||
|
confirmed: Confirmado
|
||||||
|
ordered: Pedida
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
|
reference: Referencia
|
||||||
created: Creación
|
created: Creación
|
||||||
supplierFk: Proveedor
|
supplierFk: Proveedor
|
||||||
isBooked: Asentado
|
isBooked: Asentado
|
||||||
|
@ -394,8 +380,11 @@ entry:
|
||||||
summary:
|
summary:
|
||||||
commission: Comisión
|
commission: Comisión
|
||||||
currency: Moneda
|
currency: Moneda
|
||||||
|
company: Empresa
|
||||||
|
reference: Referencia
|
||||||
invoiceNumber: Núm. factura
|
invoiceNumber: Núm. factura
|
||||||
ordered: Pedida
|
ordered: Pedida
|
||||||
|
confirmed: Confirmada
|
||||||
booked: Contabilizada
|
booked: Contabilizada
|
||||||
excludedFromAvailable: Inventario
|
excludedFromAvailable: Inventario
|
||||||
travelReference: Referencia
|
travelReference: Referencia
|
||||||
|
@ -404,108 +393,230 @@ entry:
|
||||||
travelWarehouseOut: Alm. salida
|
travelWarehouseOut: Alm. salida
|
||||||
travelDelivered: Enviada
|
travelDelivered: Enviada
|
||||||
travelLanded: F. entrega
|
travelLanded: F. entrega
|
||||||
|
travelWarehouseIn: Alm. entrada
|
||||||
travelReceived: Recibida
|
travelReceived: Recibida
|
||||||
buys: Compras
|
buys: Compras
|
||||||
|
quantity: Cantidad
|
||||||
stickers: Etiquetas
|
stickers: Etiquetas
|
||||||
package: Embalaje
|
package: Embalaje
|
||||||
packing: Pack.
|
weight: Peso
|
||||||
grouping: Group.
|
packing: Packing
|
||||||
|
grouping: Grouping
|
||||||
buyingValue: Coste
|
buyingValue: Coste
|
||||||
import: Importe
|
import: Importe
|
||||||
pvp: PVP
|
pvp: PVP
|
||||||
|
item: Artículo
|
||||||
basicData:
|
basicData:
|
||||||
|
supplier: Proveedor
|
||||||
travel: Envío
|
travel: Envío
|
||||||
|
reference: Referencia
|
||||||
|
invoiceNumber: Núm. factura
|
||||||
|
company: Empresa
|
||||||
currency: Moneda
|
currency: Moneda
|
||||||
observation: Observación
|
observation: Observación
|
||||||
commission: Comisión
|
commission: Comisión
|
||||||
|
ordered: Pedida
|
||||||
|
confirmed: Confirmado
|
||||||
booked: Asentado
|
booked: Asentado
|
||||||
excludedFromAvailable: Inventario
|
excludedFromAvailable: Inventario
|
||||||
|
agency: Agencia
|
||||||
|
warehouseOut: Alm. salida
|
||||||
|
warehouseIn: Alm. entrada
|
||||||
|
shipped: F. envío
|
||||||
|
landed: F. entrega
|
||||||
|
id: ID
|
||||||
buys:
|
buys:
|
||||||
|
groupingPrice: Precio grouping
|
||||||
|
packingPrice: Precio packing
|
||||||
|
reference: Referencia
|
||||||
observations: Observaciónes
|
observations: Observaciónes
|
||||||
|
item: Artículo
|
||||||
|
size: Medida
|
||||||
|
packing: Packing
|
||||||
|
grouping: Grouping
|
||||||
|
buyingValue: Coste
|
||||||
packagingFk: Embalaje
|
packagingFk: Embalaje
|
||||||
|
file: Fichero
|
||||||
|
name: Nombre
|
||||||
|
producer: Productor
|
||||||
|
type: Tipo
|
||||||
color: Color
|
color: Color
|
||||||
|
id: ID
|
||||||
printedStickers: Etiquetas impresas
|
printedStickers: Etiquetas impresas
|
||||||
notes:
|
notes:
|
||||||
observationType: Tipo de observación
|
observationType: Tipo de observación
|
||||||
|
descriptor:
|
||||||
|
agency: Agencia
|
||||||
|
landed: F. entrega
|
||||||
|
warehouseOut: Alm. salida
|
||||||
latestBuys:
|
latestBuys:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
image: Foto
|
image: Foto
|
||||||
itemFk: Id Artículo
|
itemFk: Id Artículo
|
||||||
|
packing: packing
|
||||||
|
grouping: Grouping
|
||||||
|
quantity: Cantidad
|
||||||
|
size: Medida
|
||||||
|
tags: Etiquetas
|
||||||
|
type: Tipo
|
||||||
|
intrastat: Intrastat
|
||||||
|
origin: Origen
|
||||||
weightByPiece: Peso (gramos)/tallo
|
weightByPiece: Peso (gramos)/tallo
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
family: Familia
|
family: Familia
|
||||||
entryFk: Entrada
|
entryFk: Entrada
|
||||||
|
buyingValue: Coste
|
||||||
freightValue: Porte
|
freightValue: Porte
|
||||||
comissionValue: Comisión
|
comissionValue: Comisión
|
||||||
|
description: Descripción
|
||||||
packageValue: Embalaje
|
packageValue: Embalaje
|
||||||
isIgnored: Ignorado
|
isIgnored: Ignorado
|
||||||
price2: Grouping
|
price2: Grouping
|
||||||
price3: Packing
|
price3: Packing
|
||||||
minPrice: Min
|
minPrice: Min
|
||||||
ektFk: Ekt
|
ektFk: Ekt
|
||||||
|
weight: Peso
|
||||||
|
packagingFk: Embalaje
|
||||||
packingOut: Embalaje envíos
|
packingOut: Embalaje envíos
|
||||||
landing: Llegada
|
landing: Llegada
|
||||||
isExcludedFromAvailable: Es inventario
|
isExcludedFromAvailable: Es inventario
|
||||||
ticket:
|
ticket:
|
||||||
|
pageTitles:
|
||||||
|
tickets: Tickets
|
||||||
|
list: Listado
|
||||||
|
ticketCreate: Nuevo ticket
|
||||||
|
summary: Resumen
|
||||||
|
basicData: Datos básicos
|
||||||
|
boxing: Encajado
|
||||||
|
sms: Sms
|
||||||
|
notes: Notas
|
||||||
|
sale: Lineas del pedido
|
||||||
|
dms: Gestión documental
|
||||||
|
volume: Volumen
|
||||||
|
observation: Notas
|
||||||
|
ticketAdvance: Adelantar tickets
|
||||||
|
futureTickets: Tickets a futuro
|
||||||
|
expedition: Expedición
|
||||||
|
purchaseRequest: Petición de compra
|
||||||
|
weeklyTickets: Tickets programados
|
||||||
|
saleTracking: Líneas preparadas
|
||||||
|
services: Servicios
|
||||||
|
tracking: Estados
|
||||||
|
components: Componentes
|
||||||
|
pictures: Fotos
|
||||||
|
packages: Embalajes
|
||||||
|
list:
|
||||||
|
nickname: Alias
|
||||||
|
state: Estado
|
||||||
|
shipped: Enviado
|
||||||
|
landed: Entregado
|
||||||
|
salesPerson: Comercial
|
||||||
|
total: Total
|
||||||
card:
|
card:
|
||||||
|
ticketId: ID ticket
|
||||||
|
state: Estado
|
||||||
customerId: ID cliente
|
customerId: ID cliente
|
||||||
|
salesPerson: Comercial
|
||||||
|
agency: Agencia
|
||||||
|
shipped: Enviado
|
||||||
|
warehouse: Almacén
|
||||||
customerCard: Ficha del cliente
|
customerCard: Ficha del cliente
|
||||||
|
alias: Alias
|
||||||
ticketList: Listado de tickets
|
ticketList: Listado de tickets
|
||||||
newOrder: Nuevo pedido
|
newOrder: Nuevo pedido
|
||||||
boxing:
|
boxing:
|
||||||
expedition: Expedición
|
expedition: Expedición
|
||||||
|
item: Artículo
|
||||||
created: Creado
|
created: Creado
|
||||||
|
worker: Trabajador
|
||||||
selectTime: 'Seleccionar hora:'
|
selectTime: 'Seleccionar hora:'
|
||||||
selectVideo: 'Seleccionar vídeo:'
|
selectVideo: 'Seleccionar vídeo:'
|
||||||
notFound: No hay vídeos disponibles
|
notFound: No hay vídeos disponibles
|
||||||
summary:
|
summary:
|
||||||
|
state: Estado
|
||||||
|
salesPerson: Comercial
|
||||||
|
agency: Agencia
|
||||||
zone: Zona
|
zone: Zona
|
||||||
|
warehouse: Almacén
|
||||||
collection: Colección
|
collection: Colección
|
||||||
route: Ruta
|
route: Ruta
|
||||||
invoice: Factura
|
invoice: Factura
|
||||||
shipped: Enviado
|
shipped: Enviado
|
||||||
|
landed: Entregado
|
||||||
consigneePhone: Tel. consignatario
|
consigneePhone: Tel. consignatario
|
||||||
consigneeMobile: Móv. consignatario
|
consigneeMobile: Móv. consignatario
|
||||||
consigneeAddress: Dir. consignatario
|
consigneeAddress: Dir. consignatario
|
||||||
clientPhone: Tel. cliente
|
clientPhone: Tel. cliente
|
||||||
clientMobile: Móv. cliente
|
clientMobile: Móv. cliente
|
||||||
consignee: Consignatario
|
consignee: Consignatario
|
||||||
|
subtotal: Subtotal
|
||||||
|
vat: IVA
|
||||||
total: Total
|
total: Total
|
||||||
saleLines: Líneas del pedido
|
saleLines: Líneas del pedido
|
||||||
|
item: Artículo
|
||||||
|
visible: Visible
|
||||||
available: Disponible
|
available: Disponible
|
||||||
|
quantity: Cantidad
|
||||||
|
price: Precio
|
||||||
discount: Descuento
|
discount: Descuento
|
||||||
packing: Encajado
|
packing: Encajado
|
||||||
hasComponentLack: Faltan componentes
|
hasComponentLack: Faltan componentes
|
||||||
itemShortage: No visible
|
itemShortage: No visible
|
||||||
claim: Reclamación
|
claim: Reclamación
|
||||||
reserved: Reservado
|
reserved: Reservado
|
||||||
|
created: Fecha creación
|
||||||
package: Embalaje
|
package: Embalaje
|
||||||
taxClass: Tipo IVA
|
taxClass: Tipo IVA
|
||||||
services: Servicios
|
services: Servicios
|
||||||
requester: Solicitante
|
requester: Solicitante
|
||||||
atender: Comprador
|
atender: Comprador
|
||||||
request: Petición de compra
|
request: Petición de compra
|
||||||
|
weight: Peso
|
||||||
goTo: Ir a
|
goTo: Ir a
|
||||||
summaryAmount: Resumen
|
summaryAmount: Resumen
|
||||||
purchaseRequest: Petición de compra
|
purchaseRequest: Petición de compra
|
||||||
service: Servicio
|
service: Servicio
|
||||||
|
description: Descripción
|
||||||
attender: Consignatario
|
attender: Consignatario
|
||||||
create:
|
create:
|
||||||
|
client: Cliente
|
||||||
address: Dirección
|
address: Dirección
|
||||||
|
landed: F. entrega
|
||||||
|
warehouse: Almacén
|
||||||
|
agency: Agencia
|
||||||
invoiceOut:
|
invoiceOut:
|
||||||
|
list:
|
||||||
|
ref: Referencia
|
||||||
|
issued: Fecha emisión
|
||||||
|
shortIssued: F. emisión
|
||||||
|
client: Cliente
|
||||||
|
created: Fecha creación
|
||||||
|
shortCreated: F. creación
|
||||||
|
company: Empresa
|
||||||
|
dued: Fecha vencimineto
|
||||||
|
shortDued: F. vencimiento
|
||||||
|
amount: Importe
|
||||||
card:
|
card:
|
||||||
issued: Fecha emisión
|
issued: Fecha emisión
|
||||||
|
client: Cliente
|
||||||
|
company: Empresa
|
||||||
customerCard: Ficha del cliente
|
customerCard: Ficha del cliente
|
||||||
ticketList: Listado de tickets
|
ticketList: Listado de tickets
|
||||||
summary:
|
summary:
|
||||||
issued: Fecha
|
issued: Fecha
|
||||||
|
created: Fecha creación
|
||||||
dued: Vencimiento
|
dued: Vencimiento
|
||||||
booked: Contabilizada
|
booked: Contabilizada
|
||||||
|
company: Empresa
|
||||||
taxBreakdown: Desglose impositivo
|
taxBreakdown: Desglose impositivo
|
||||||
|
type: Tipo
|
||||||
taxableBase: Base imp.
|
taxableBase: Base imp.
|
||||||
rate: Tarifa
|
rate: Tarifa
|
||||||
fee: Cuota
|
fee: Cuota
|
||||||
tickets: Tickets
|
tickets: Tickets
|
||||||
|
ticketId: Id ticket
|
||||||
|
nickname: Alias
|
||||||
|
shipped: F. envío
|
||||||
totalWithVat: Importe
|
totalWithVat: Importe
|
||||||
globalInvoices:
|
globalInvoices:
|
||||||
errors:
|
errors:
|
||||||
|
@ -518,16 +629,21 @@ invoiceOut:
|
||||||
invoiceWithFutureDate: Existe una factura con una fecha futura
|
invoiceWithFutureDate: Existe una factura con una fecha futura
|
||||||
noTicketsToInvoice: No existen tickets para facturar
|
noTicketsToInvoice: No existen tickets para facturar
|
||||||
criticalInvoiceError: Error crítico en la facturación proceso detenido
|
criticalInvoiceError: Error crítico en la facturación proceso detenido
|
||||||
invalidSerialTypeForAll: El tipo de serie debe ser global cuando se facturan todos los clientes
|
|
||||||
table:
|
table:
|
||||||
|
client: Cliente
|
||||||
addressId: Id dirección
|
addressId: Id dirección
|
||||||
streetAddress: Dirección fiscal
|
streetAddress: Dirección fiscal
|
||||||
statusCard:
|
statusCard:
|
||||||
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
|
percentageText: '{getPercentage}% {getAddressNumber} de {getNAddresses}'
|
||||||
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
|
pdfsNumberText: '{nPdfs} de {totalPdfs} PDFs'
|
||||||
negativeBases:
|
negativeBases:
|
||||||
|
company: Empresa
|
||||||
|
country: País
|
||||||
clientId: Id cliente
|
clientId: Id cliente
|
||||||
|
client: Cliente
|
||||||
|
amount: Importe
|
||||||
base: Base
|
base: Base
|
||||||
|
ticketId: Id ticket
|
||||||
active: Activo
|
active: Activo
|
||||||
hasToInvoice: Facturar
|
hasToInvoice: Facturar
|
||||||
verifiedData: Datos comprobados
|
verifiedData: Datos comprobados
|
||||||
|
@ -537,24 +653,43 @@ invoiceOut:
|
||||||
order:
|
order:
|
||||||
field:
|
field:
|
||||||
salesPersonFk: Comercial
|
salesPersonFk: Comercial
|
||||||
|
clientFk: Cliente
|
||||||
|
isConfirmed: Confirmada
|
||||||
|
created: Creado
|
||||||
|
landed: F. entrega
|
||||||
|
hour: Hora
|
||||||
|
agency: Agencia
|
||||||
|
total: Total
|
||||||
form:
|
form:
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
addressFk: Dirección
|
addressFk: Dirección
|
||||||
|
landed: F. entrega
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
list:
|
list:
|
||||||
newOrder: Nuevo Pedido
|
newOrder: Nuevo Pedido
|
||||||
summary:
|
summary:
|
||||||
basket: Cesta
|
basket: Cesta
|
||||||
|
nickname: Alias
|
||||||
|
company: Empresa
|
||||||
|
confirmed: Confirmada
|
||||||
notConfirmed: No confirmada
|
notConfirmed: No confirmada
|
||||||
created: Creado
|
created: Creado
|
||||||
|
landed: F. entrega
|
||||||
|
phone: Teléfono
|
||||||
createdFrom: Creado desde
|
createdFrom: Creado desde
|
||||||
address: Dirección
|
address: Dirección
|
||||||
|
notes: Notas
|
||||||
|
subtotal: Subtotal
|
||||||
total: Total
|
total: Total
|
||||||
vat: IVA
|
vat: IVA
|
||||||
state: Estado
|
state: Estado
|
||||||
alias: Alias
|
alias: Alias
|
||||||
items: Artículos
|
items: Artículos
|
||||||
orderTicketList: Tickets del pedido
|
orderTicketList: Tickets del pedido
|
||||||
|
details: Detalles
|
||||||
|
item: Item
|
||||||
|
quantity: Cantidad
|
||||||
|
price: Precio
|
||||||
amount: Monto
|
amount: Monto
|
||||||
confirm: Confirmar
|
confirm: Confirmar
|
||||||
confirmLines: Confirmar lineas
|
confirmLines: Confirmar lineas
|
||||||
|
@ -564,6 +699,15 @@ shelving:
|
||||||
priority: Prioridad
|
priority: Prioridad
|
||||||
newShelving: Nuevo Carro
|
newShelving: Nuevo Carro
|
||||||
summary:
|
summary:
|
||||||
|
code: Código
|
||||||
|
parking: Parking
|
||||||
|
priority: Prioridad
|
||||||
|
worker: Trabajador
|
||||||
|
recyclable: Reciclable
|
||||||
|
basicData:
|
||||||
|
code: Código
|
||||||
|
parking: Parking
|
||||||
|
priority: Prioridad
|
||||||
recyclable: Reciclable
|
recyclable: Reciclable
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Orden de recogida
|
pickingOrder: Orden de recogida
|
||||||
|
@ -573,8 +717,15 @@ parking:
|
||||||
info: Puedes buscar por código de parking
|
info: Puedes buscar por código de parking
|
||||||
label: Buscar parking...
|
label: Buscar parking...
|
||||||
department:
|
department:
|
||||||
|
pageTitles:
|
||||||
|
basicData: Basic data
|
||||||
|
department: Departamentos
|
||||||
|
summary: Resumen
|
||||||
|
name: Nombre
|
||||||
|
code: Código
|
||||||
chat: Chat
|
chat: Chat
|
||||||
bossDepartment: Jefe de departamento
|
bossDepartment: Jefe de departamento
|
||||||
|
email: Email
|
||||||
selfConsumptionCustomer: Cliente autoconsumo
|
selfConsumptionCustomer: Cliente autoconsumo
|
||||||
telework: Teletrabaja
|
telework: Teletrabaja
|
||||||
notifyOnErrors: Notificar errores
|
notifyOnErrors: Notificar errores
|
||||||
|
@ -583,15 +734,52 @@ department:
|
||||||
hasToSendMail: Enviar fichadas por mail
|
hasToSendMail: Enviar fichadas por mail
|
||||||
departmentRemoved: Departamento eliminado
|
departmentRemoved: Departamento eliminado
|
||||||
worker:
|
worker:
|
||||||
|
pageTitles:
|
||||||
|
workers: Trabajadores
|
||||||
|
list: Listado
|
||||||
|
basicData: Datos básicos
|
||||||
|
summary: Resumen
|
||||||
|
notifications: Notificaciones
|
||||||
|
workerCreate: Nuevo trabajador
|
||||||
|
department: Departamentos
|
||||||
|
pda: PDA
|
||||||
|
notes: Notas
|
||||||
|
dms: Mi documentación
|
||||||
|
pbx: Centralita
|
||||||
|
log: Historial
|
||||||
|
calendar: Calendario
|
||||||
|
timeControl: Control de horario
|
||||||
|
locker: Taquilla
|
||||||
|
balance: Balance
|
||||||
|
formation: Formación
|
||||||
|
medical: Mutua
|
||||||
|
operator: Operario
|
||||||
list:
|
list:
|
||||||
|
name: Nombre
|
||||||
|
email: Email
|
||||||
|
phone: Teléfono
|
||||||
|
mobile: Móvil
|
||||||
|
active: Activo
|
||||||
department: Departamento
|
department: Departamento
|
||||||
schedule: Horario
|
schedule: Horario
|
||||||
newWorker: Nuevo trabajador
|
newWorker: Nuevo trabajador
|
||||||
|
card:
|
||||||
|
workerId: ID Trabajador
|
||||||
|
user: Usuario
|
||||||
|
name: Nombre
|
||||||
|
email: Correo personal
|
||||||
|
phone: Teléfono
|
||||||
|
mobile: Móvil
|
||||||
|
active: Activo
|
||||||
|
warehouse: Almacén
|
||||||
|
agency: Empresa
|
||||||
|
salesPerson: Comercial
|
||||||
summary:
|
summary:
|
||||||
|
basicData: Datos básicos
|
||||||
boss: Jefe
|
boss: Jefe
|
||||||
phoneExtension: Ext. de teléfono
|
phoneExtension: Extensión de teléfono
|
||||||
entPhone: Tel. de empresa
|
entPhone: Teléfono de empresa
|
||||||
personalPhone: Tel. personal
|
personalPhone: Teléfono personal
|
||||||
noBoss: Sin jefe
|
noBoss: Sin jefe
|
||||||
userData: Datos de usuario
|
userData: Datos de usuario
|
||||||
userId: ID del usuario
|
userId: ID del usuario
|
||||||
|
@ -610,12 +798,19 @@ worker:
|
||||||
serialNumber: Número de serie
|
serialNumber: Número de serie
|
||||||
removePDA: Desasignar PDA
|
removePDA: Desasignar PDA
|
||||||
create:
|
create:
|
||||||
|
name: Nombre
|
||||||
lastName: Apellido
|
lastName: Apellido
|
||||||
birth: Fecha de nacimiento
|
birth: Fecha de nacimiento
|
||||||
fi: DNI/NIF/NIE
|
fi: DNI/NIF/NIE
|
||||||
code: Código de trabajador
|
code: Código de trabajador
|
||||||
|
phone: Teléfono
|
||||||
|
postcode: Código postal
|
||||||
|
province: Provincia
|
||||||
|
city: Población
|
||||||
|
street: Dirección
|
||||||
webUser: Usuario Web
|
webUser: Usuario Web
|
||||||
personalEmail: Correo personal
|
personalEmail: Correo personal
|
||||||
|
company: Empresa
|
||||||
boss: Jefe
|
boss: Jefe
|
||||||
payMethods: Método de pago
|
payMethods: Método de pago
|
||||||
iban: IBAN
|
iban: IBAN
|
||||||
|
@ -627,13 +822,16 @@ worker:
|
||||||
endDate: Fecha Fin
|
endDate: Fecha Fin
|
||||||
center: Centro Formación
|
center: Centro Formación
|
||||||
invoice: Factura
|
invoice: Factura
|
||||||
|
amount: Importe
|
||||||
remark: Bonficado
|
remark: Bonficado
|
||||||
hasDiploma: Diploma
|
hasDiploma: Diploma
|
||||||
medical:
|
medical:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
date: Fecha
|
||||||
time: Hora
|
time: Hora
|
||||||
center: Centro de Formación
|
center: Centro de Formación
|
||||||
invoice: Factura
|
invoice: Factura
|
||||||
|
amount: Importe
|
||||||
isFit: Apto
|
isFit: Apto
|
||||||
remark: Observaciones
|
remark: Observaciones
|
||||||
imageNotFound: No se ha encontrado la imagen
|
imageNotFound: No se ha encontrado la imagen
|
||||||
|
@ -658,7 +856,18 @@ worker:
|
||||||
machine: Máquina
|
machine: Máquina
|
||||||
|
|
||||||
wagon:
|
wagon:
|
||||||
|
pageTitles:
|
||||||
|
wagons: Vagones
|
||||||
|
wagonsList: Listado vagones
|
||||||
|
wagonCreate: Crear tipo
|
||||||
|
wagonEdit: Editar tipo
|
||||||
|
typesList: Listado tipos
|
||||||
|
typeCreate: Crear tipo
|
||||||
|
typeEdit: Editar tipo
|
||||||
|
wagonCounter: Contador de carros
|
||||||
|
wagonTray: Listado bandejas
|
||||||
type:
|
type:
|
||||||
|
name: Nombre
|
||||||
submit: Guardar
|
submit: Guardar
|
||||||
reset: Deshacer cambios
|
reset: Deshacer cambios
|
||||||
trayColor: Color de la bandeja
|
trayColor: Color de la bandeja
|
||||||
|
@ -666,9 +875,13 @@ wagon:
|
||||||
list:
|
list:
|
||||||
plate: Matrícula
|
plate: Matrícula
|
||||||
volume: Volumen
|
volume: Volumen
|
||||||
|
type: Tipo
|
||||||
remove: Borrar
|
remove: Borrar
|
||||||
removeItem: Vagón borrado correctamente
|
removeItem: Vagón borrado correctamente
|
||||||
create:
|
create:
|
||||||
|
plate: Matrícula
|
||||||
|
volume: Volumen
|
||||||
|
type: Tipo
|
||||||
label: Etiqueta
|
label: Etiqueta
|
||||||
warnings:
|
warnings:
|
||||||
noData: Sin datos disponibles
|
noData: Sin datos disponibles
|
||||||
|
@ -684,16 +897,26 @@ wagon:
|
||||||
supplier:
|
supplier:
|
||||||
list:
|
list:
|
||||||
payMethod: Método de pago
|
payMethod: Método de pago
|
||||||
|
payDeadline: Plazo de pago
|
||||||
|
payDay: Día de pago
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
newSupplier: Nuevo proveedor
|
newSupplier: Nuevo proveedor
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
|
name: Nombre
|
||||||
nif: NIF/CIF
|
nif: NIF/CIF
|
||||||
|
nickname: Alias
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
|
payMethod: Método de pago
|
||||||
|
payDay: Dia de pago
|
||||||
|
country: País
|
||||||
summary:
|
summary:
|
||||||
responsible: Responsable
|
responsible: Responsable
|
||||||
|
notes: Notas
|
||||||
verified: Verificado
|
verified: Verificado
|
||||||
isActive: Está activo
|
isActive: Está activo
|
||||||
billingData: Forma de pago
|
billingData: Forma de pago
|
||||||
|
payMethod: Método de pago
|
||||||
payDeadline: Plazo de pago
|
payDeadline: Plazo de pago
|
||||||
payDay: Día de pago
|
payDay: Día de pago
|
||||||
account: Cuenta
|
account: Cuenta
|
||||||
|
@ -706,13 +929,17 @@ supplier:
|
||||||
fiscalAddress: Dirección fiscal
|
fiscalAddress: Dirección fiscal
|
||||||
socialName: Razón social
|
socialName: Razón social
|
||||||
taxNumber: NIF/CIF
|
taxNumber: NIF/CIF
|
||||||
|
street: Dirección
|
||||||
city: Población
|
city: Población
|
||||||
|
postCode: Código postal
|
||||||
province: Provincia
|
province: Provincia
|
||||||
|
country: País
|
||||||
create:
|
create:
|
||||||
supplierName: Nombre del proveedor
|
supplierName: Nombre del proveedor
|
||||||
basicData:
|
basicData:
|
||||||
|
alias: Alias
|
||||||
workerFk: Responsable
|
workerFk: Responsable
|
||||||
isReal: Verificado
|
isSerious: Verificado
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
isPayMethodChecked: Método de pago validado
|
isPayMethodChecked: Método de pago validado
|
||||||
note: Notas
|
note: Notas
|
||||||
|
@ -725,17 +952,36 @@ supplier:
|
||||||
sageWithholdingFk: Retención sage
|
sageWithholdingFk: Retención sage
|
||||||
sageTransactionTypeFk: Tipo de transacción sage
|
sageTransactionTypeFk: Tipo de transacción sage
|
||||||
supplierActivityFk: Actividad proveedor
|
supplierActivityFk: Actividad proveedor
|
||||||
|
healthRegister: Pasaporte sanitario
|
||||||
|
street: Calle
|
||||||
|
postcode: Código postal
|
||||||
|
city: Población *
|
||||||
|
provinceFk: Provincia
|
||||||
|
country: País
|
||||||
isTrucker: Transportista
|
isTrucker: Transportista
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
billingData:
|
billingData:
|
||||||
payMethodFk: Forma de pago
|
payMethodFk: Forma de pago
|
||||||
payDemFk: Plazo de pago
|
payDemFk: Plazo de pago
|
||||||
|
payDay: Día de pago
|
||||||
accounts:
|
accounts:
|
||||||
iban: Iban
|
iban: Iban
|
||||||
bankEntity: Entidad bancaria
|
bankEntity: Entidad bancaria
|
||||||
beneficiary: Beneficiario
|
beneficiary: Beneficiario
|
||||||
contacts:
|
contacts:
|
||||||
|
name: Nombre
|
||||||
|
phone: Teléfono
|
||||||
|
mobile: Móvil
|
||||||
|
email: Email
|
||||||
observation: Notas
|
observation: Notas
|
||||||
|
addresses:
|
||||||
|
street: Dirección
|
||||||
|
postcode: Código postal
|
||||||
|
phone: Teléfono
|
||||||
|
name: Nombre
|
||||||
|
city: Población
|
||||||
|
province: Provincia
|
||||||
|
mobile: Móvil
|
||||||
agencyTerms:
|
agencyTerms:
|
||||||
agencyFk: Agencia
|
agencyFk: Agencia
|
||||||
minimumM3: M3 mínimos
|
minimumM3: M3 mínimos
|
||||||
|
@ -747,16 +993,25 @@ supplier:
|
||||||
addRow: Añadir fila
|
addRow: Añadir fila
|
||||||
consumption:
|
consumption:
|
||||||
entry: Entrada
|
entry: Entrada
|
||||||
|
date: Fecha
|
||||||
|
reference: Referencia
|
||||||
travel:
|
travel:
|
||||||
travelList:
|
travelList:
|
||||||
tableVisibleColumns:
|
tableVisibleColumns:
|
||||||
|
id: Id
|
||||||
ref: Referencia
|
ref: Referencia
|
||||||
|
agency: Agencia
|
||||||
|
shipped: F.envío
|
||||||
shipHour: Hora de envío
|
shipHour: Hora de envío
|
||||||
landHour: Hora de llegada
|
landHour: Hora de llegada
|
||||||
|
landed: F.entrega
|
||||||
|
warehouseIn: Alm.salida
|
||||||
|
warehouseOut: Alm.entrada
|
||||||
totalEntries: ∑
|
totalEntries: ∑
|
||||||
totalEntriesTooltip: Entradas totales
|
totalEntriesTooltip: Entradas totales
|
||||||
daysOnward: Días de llegada en adelante
|
daysOnward: Días de llegada en adelante
|
||||||
summary:
|
summary:
|
||||||
|
confirmed: Confirmado
|
||||||
entryId: Id entrada
|
entryId: Id entrada
|
||||||
freight: Porte
|
freight: Porte
|
||||||
package: Embalaje
|
package: Embalaje
|
||||||
|
@ -769,89 +1024,62 @@ travel:
|
||||||
AddEntry: Añadir entrada
|
AddEntry: Añadir entrada
|
||||||
thermographs: Termógrafos
|
thermographs: Termógrafos
|
||||||
hb: HB
|
hb: HB
|
||||||
|
variables:
|
||||||
|
search: Id/Referencia
|
||||||
|
agencyModeFk: Agencia
|
||||||
|
warehouseInFk: Alm. entrada
|
||||||
|
warehouseOutFk: ' Alm. salida'
|
||||||
|
landedFrom: Llegada desde
|
||||||
|
landedTo: Llegada hasta
|
||||||
|
continent: Cont. Salida
|
||||||
|
totalEntries: Ent. totales
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Desplazamiento automatico (redada)
|
reference: Referencia
|
||||||
isRaid: Redada
|
agency: Agencia
|
||||||
|
shipped: F. Envío
|
||||||
|
landed: F. entrega
|
||||||
|
warehouseOut: Alm. salida
|
||||||
|
warehouseIn: Alm. entrada
|
||||||
|
delivered: Enviada
|
||||||
|
received: Recibida
|
||||||
|
daysInForward: Días redada
|
||||||
thermographs:
|
thermographs:
|
||||||
|
code: Código
|
||||||
temperature: Temperatura
|
temperature: Temperatura
|
||||||
|
state: Estado
|
||||||
destination: Destino
|
destination: Destino
|
||||||
|
created: Fecha creación
|
||||||
thermograph: Termógrafo
|
thermograph: Termógrafo
|
||||||
|
reference: Referencia
|
||||||
|
type: Tipo
|
||||||
|
company: Empresa
|
||||||
|
warehouse: Almacén
|
||||||
travelFileDescription: 'Id envío { travelId }'
|
travelFileDescription: 'Id envío { travelId }'
|
||||||
item:
|
file: Fichero
|
||||||
descriptor:
|
|
||||||
buyer: Comprador
|
|
||||||
color: Color
|
|
||||||
category: Categoría
|
|
||||||
available: Disponible
|
|
||||||
warehouseText: 'Calculado sobre el almacén de { warehouseName }'
|
|
||||||
itemDiary: Registro de compra-venta
|
|
||||||
list:
|
|
||||||
id: Identificador
|
|
||||||
stems: Tallos
|
|
||||||
category: Reino
|
|
||||||
typeName: Tipo
|
|
||||||
isActive: Activo
|
|
||||||
weightByPiece: Peso (gramos)/tallo
|
|
||||||
userName: Comprador
|
|
||||||
stemMultiplier: Multiplicador
|
|
||||||
fixedPrice:
|
|
||||||
itemFk: ID Artículo
|
|
||||||
groupingPrice: Precio grouping
|
|
||||||
packingPrice: Precio packing
|
|
||||||
hasMinPrice: Tiene precio mínimo
|
|
||||||
minPrice: Precio min
|
|
||||||
started: Inicio
|
|
||||||
ended: Fin
|
|
||||||
create:
|
|
||||||
priority: Prioridad
|
|
||||||
summary:
|
|
||||||
otherData: Otros datos
|
|
||||||
tax: IVA
|
|
||||||
botanical: Botánico
|
|
||||||
barcode: Código de barras
|
|
||||||
completeName: Nombre completo
|
|
||||||
family: Familia
|
|
||||||
stems: Tallos
|
|
||||||
multiplier: Multiplicador
|
|
||||||
buyer: Comprador
|
|
||||||
doPhoto: Hacer foto
|
|
||||||
intrastatCode: Código intrastat
|
|
||||||
ref: Referencia
|
|
||||||
relevance: Relevancia
|
|
||||||
weight: Peso (gramos)/tallo
|
|
||||||
units: Unidades/caja
|
|
||||||
expense: Gasto
|
|
||||||
generic: Genérico
|
|
||||||
recycledPlastic: Plástico reciclado
|
|
||||||
nonRecycledPlastic: Plástico no reciclado
|
|
||||||
minSalesQuantity: Cantidad mínima de venta
|
|
||||||
genus: Genus
|
|
||||||
specie: Specie
|
|
||||||
buyRequest:
|
|
||||||
requester: Solicitante
|
|
||||||
requested: Solicitado
|
|
||||||
attender: Comprador
|
|
||||||
achieved: Conseguido
|
|
||||||
concept: Concepto
|
|
||||||
components:
|
components:
|
||||||
topbar: {}
|
topbar: {}
|
||||||
itemsFilterPanel:
|
itemsFilterPanel:
|
||||||
typeFk: Tipo
|
typeFk: Tipo
|
||||||
|
tag: Etiqueta
|
||||||
value: Valor
|
value: Valor
|
||||||
# ItemFixedPriceFilter
|
# ItemFixedPriceFilter
|
||||||
buyerFk: Comprador
|
buyerFk: Comprador
|
||||||
|
warehouseFk: Almacén
|
||||||
started: Desde
|
started: Desde
|
||||||
ended: Hasta
|
ended: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
hasMinPrice: Precio mínimo
|
hasMinPrice: Precio mínimo
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Comprador
|
salesPersonFk: Comprador
|
||||||
|
supplierFk: Proveedor
|
||||||
active: Activo
|
active: Activo
|
||||||
|
visible: Visible
|
||||||
floramondo: Floramondo
|
floramondo: Floramondo
|
||||||
showBadDates: Ver items a futuro
|
showBadDates: Ver items a futuro
|
||||||
userPanel:
|
userPanel:
|
||||||
copyToken: Token copiado al portapapeles
|
copyToken: Token copiado al portapapeles
|
||||||
settings: Configuración
|
settings: Configuración
|
||||||
|
logOut: Cerrar sesión
|
||||||
localWarehouse: Almacén local
|
localWarehouse: Almacén local
|
||||||
localBank: Banco local
|
localBank: Banco local
|
||||||
localCompany: Empresa local
|
localCompany: Empresa local
|
||||||
|
@ -859,6 +1087,7 @@ components:
|
||||||
userCompany: Empresa del usuario
|
userCompany: Empresa del usuario
|
||||||
smartCard:
|
smartCard:
|
||||||
downloadFile: Descargar archivo
|
downloadFile: Descargar archivo
|
||||||
|
clone: Clonar
|
||||||
openCard: Ficha
|
openCard: Ficha
|
||||||
openSummary: Detalles
|
openSummary: Detalles
|
||||||
viewSummary: Vista previa
|
viewSummary: Vista previa
|
||||||
|
|
|
@ -1,10 +1,50 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
import Navbar from 'src/components/NavBar.vue';
|
import Navbar from 'src/components/NavBar.vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import routes from 'src/router/modules';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
let isNotified = false;
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const keyBindingMap = routes
|
||||||
|
.filter((route) => route.meta.keyBinding)
|
||||||
|
.reduce((map, route) => {
|
||||||
|
map['Key' + route.meta.keyBinding.toUpperCase()] = route.path;
|
||||||
|
return map;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const handleKeyDown = (event) => {
|
||||||
|
const { ctrlKey, altKey, code } = event;
|
||||||
|
|
||||||
|
if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) {
|
||||||
|
event.preventDefault();
|
||||||
|
router.push(keyBindingMap[code]);
|
||||||
|
isNotified = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyUp = (event) => {
|
||||||
|
const { ctrlKey, altKey } = event;
|
||||||
|
|
||||||
|
if (!ctrlKey || !altKey) {
|
||||||
|
isNotified = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
window.addEventListener('keyup', handleKeyUp);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QLayout view="hHh LpR fFf" v-shortcut>
|
<QLayout view="hHh LpR fFf" v-shortcut>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<RouterView></RouterView>
|
<RouterView></RouterView>
|
||||||
<QFooter v-if="$q.platform.is.mobile"></QFooter>
|
<QFooter v-if="quasar.platform.is.mobile"></QFooter>
|
||||||
</QLayout>
|
</QLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -11,13 +11,21 @@ const { t } = useI18n();
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
const onSynchronizeAll = async () => {
|
const onSynchronizeAll = async () => {
|
||||||
notify(t('Synchronizing in the background'), 'positive');
|
try {
|
||||||
await axios.patch(`Accounts/syncAll`);
|
notify(t('Synchronizing in the background'), 'positive');
|
||||||
|
await axios.patch(`Accounts/syncAll`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error synchronizing all accounts', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSynchronizeRoles = async () => {
|
const onSynchronizeRoles = async () => {
|
||||||
await axios.patch(`RoleInherits/sync`);
|
try {
|
||||||
notify(t('Roles synchronized!'), 'positive');
|
await axios.patch(`RoleInherits/sync`);
|
||||||
|
notify(t('Roles synchronized!'), 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error synchronizing roles', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -111,25 +111,29 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const deleteAcl = async ({ id }) => {
|
const deleteAcl = async ({ id }) => {
|
||||||
await new Promise((resolve) => {
|
try {
|
||||||
quasar
|
await new Promise((resolve) => {
|
||||||
.dialog({
|
quasar
|
||||||
component: VnConfirm,
|
.dialog({
|
||||||
componentProps: {
|
component: VnConfirm,
|
||||||
title: t('Remove ACL'),
|
componentProps: {
|
||||||
message: t('Do you want to remove this ACL?'),
|
title: t('Remove ACL'),
|
||||||
},
|
message: t('Do you want to remove this ACL?'),
|
||||||
})
|
},
|
||||||
.onOk(() => {
|
})
|
||||||
resolve(true);
|
.onOk(() => {
|
||||||
})
|
resolve(true);
|
||||||
.onCancel(() => {
|
})
|
||||||
resolve(false);
|
.onCancel(() => {
|
||||||
});
|
resolve(false);
|
||||||
});
|
});
|
||||||
await axios.delete(`ACLs/${id}`);
|
});
|
||||||
tableRef.value.reload();
|
await axios.delete(`ACLs/${id}`);
|
||||||
notify('ACL removed', 'positive');
|
tableRef.value.reload();
|
||||||
|
notify('ACL removed', 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error deleting Acl: ', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,13 @@ const refresh = () => paginateRef.value.fetch();
|
||||||
const navigate = (id) => router.push({ name: 'AccountSummary', params: { id } });
|
const navigate = (id) => router.push({ name: 'AccountSummary', params: { id } });
|
||||||
|
|
||||||
const killSession = async ({ userId, created }) => {
|
const killSession = async ({ userId, created }) => {
|
||||||
await axios.post(`${urlPath}/killSession`, { userId, created });
|
try {
|
||||||
paginateRef.value.fetch();
|
await axios.post(`${urlPath}/killSession`, { userId, created });
|
||||||
notify(t('Session killed'), 'positive');
|
paginateRef.value.fetch();
|
||||||
|
notify(t('Session killed'), 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error killing session', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ const redirectToAccountBasicData = (_, { id }) => {
|
||||||
<div class="column q-gutter-sm">
|
<div class="column q-gutter-sm">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.name"
|
v-model="data.name"
|
||||||
:label="t('globals.name')"
|
:label="t('account.create.name')"
|
||||||
:rules="validate('VnUser.name')"
|
:rules="validate('VnUser.name')"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -47,12 +47,12 @@ const redirectToAccountBasicData = (_, { id }) => {
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.email"
|
v-model="data.email"
|
||||||
:label="t('globals.params.email')"
|
:label="t('account.create.email')"
|
||||||
type="email"
|
type="email"
|
||||||
:rules="validate('VnUser.email')"
|
:rules="validate('VnUser.email')"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('account.card.role')"
|
:label="t('account.create.role')"
|
||||||
v-model="data.roleFk"
|
v-model="data.roleFk"
|
||||||
:options="rolesOptions"
|
:options="rolesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -63,7 +63,7 @@ const redirectToAccountBasicData = (_, { id }) => {
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.password"
|
v-model="data.password"
|
||||||
:label="t('ldap.password')"
|
:label="t('account.create.password')"
|
||||||
type="password"
|
type="password"
|
||||||
:rules="validate('VnUser.password')"
|
:rules="validate('VnUser.password')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -31,6 +31,7 @@ const rolesOptions = ref([]);
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
|
:hidden-tags="['search']"
|
||||||
:redirect="false"
|
:redirect="false"
|
||||||
search-url="table"
|
search-url="table"
|
||||||
>
|
>
|
||||||
|
@ -44,7 +45,7 @@ const rolesOptions = ref([]);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.name')"
|
:label="t('account.card.name')"
|
||||||
v-model="params.name"
|
v-model="params.name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
is-outlined
|
is-outlined
|
||||||
|
|
|
@ -40,8 +40,12 @@ const formUrlCreate = ref(null);
|
||||||
const formUrlUpdate = ref(null);
|
const formUrlUpdate = ref(null);
|
||||||
const formCustomFn = ref(null);
|
const formCustomFn = ref(null);
|
||||||
const onTestConection = async () => {
|
const onTestConection = async () => {
|
||||||
await axios.get(`LdapConfigs/test`);
|
try {
|
||||||
notify(t('LDAP connection established!'), 'positive');
|
await axios.get(`LdapConfigs/test`);
|
||||||
|
notify(t('LDAP connection established!'), 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error testing connection', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const getInitialLdapConfig = async () => {
|
const getInitialLdapConfig = async () => {
|
||||||
try {
|
try {
|
||||||
|
@ -68,10 +72,14 @@ const getInitialLdapConfig = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const deleteMailForward = async () => {
|
const deleteMailForward = async () => {
|
||||||
await axios.delete(URL_UPDATE);
|
try {
|
||||||
initialData.value = { ...DEFAULT_DATA };
|
await axios.delete(URL_UPDATE);
|
||||||
hasData.value = false;
|
initialData.value = { ...DEFAULT_DATA };
|
||||||
notify(t('globals.dataSaved'), 'positive');
|
hasData.value = false;
|
||||||
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error deleting mail forward', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => await getInitialLdapConfig());
|
onMounted(async () => await getInitialLdapConfig());
|
||||||
|
@ -94,11 +102,11 @@ onMounted(async () => await getInitialLdapConfig());
|
||||||
<QBtn
|
<QBtn
|
||||||
class="q-ml-none"
|
class="q-ml-none"
|
||||||
color="primary"
|
color="primary"
|
||||||
:label="t('account.card.testConnection')"
|
:label="t('ldap.testConnection')"
|
||||||
@click="onTestConection()"
|
@click="onTestConection()"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('account.card.testConnection') }}
|
{{ t('ldap.testConnection') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
|
@ -106,7 +114,7 @@ onMounted(async () => await getInitialLdapConfig());
|
||||||
<VnRow class="row q-gutter-md">
|
<VnRow class="row q-gutter-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('account.card.enableSync')"
|
:label="t('ldap.enableSync')"
|
||||||
v-model="data.hasData"
|
v-model="data.hasData"
|
||||||
@update:model-value="($event) => (hasData = $event)"
|
@update:model-value="($event) => (hasData = $event)"
|
||||||
:toggle-indeterminate="false"
|
:toggle-indeterminate="false"
|
||||||
|
@ -138,7 +146,7 @@ onMounted(async () => await getInitialLdapConfig());
|
||||||
/>
|
/>
|
||||||
<VnInput :label="t('ldap.userDN')" clearable v-model="data.userDn" />
|
<VnInput :label="t('ldap.userDN')" clearable v-model="data.userDn" />
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('account.card.groupDN')"
|
:label="t('ldap.groupDN')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.groupDn"
|
v-model="data.groupDn"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -7,7 +7,6 @@ import AccountSummary from './Card/AccountSummary.vue';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import AccountFilter from './AccountFilter.vue';
|
import AccountFilter from './AccountFilter.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -23,27 +22,10 @@ const columns = computed(() => [
|
||||||
field: 'id',
|
field: 'id',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'name',
|
|
||||||
label: t('Name'),
|
|
||||||
component: 'input',
|
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
cardVisible: true,
|
|
||||||
create: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'roleFk',
|
name: 'roleFk',
|
||||||
label: t('Role'),
|
label: t('role'),
|
||||||
component: 'select',
|
|
||||||
attrs: {
|
|
||||||
url: 'VnRoles',
|
|
||||||
optionValue: 'id',
|
|
||||||
optionLabel: 'name',
|
|
||||||
},
|
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
name: 'roleFk',
|
name: 'roleFk',
|
||||||
|
@ -53,11 +35,7 @@ const columns = computed(() => [
|
||||||
optionLabel: 'name',
|
optionLabel: 'name',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
columnField: {
|
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name),
|
format: ({ role }, dashIfEmpty) => dashIfEmpty(role?.name),
|
||||||
create: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -73,32 +51,20 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'email',
|
name: 'name',
|
||||||
label: t('Email'),
|
label: t('Name'),
|
||||||
component: 'input',
|
component: 'input',
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
visible: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'password',
|
name: 'email',
|
||||||
label: t('Password'),
|
label: t('email'),
|
||||||
columnField: {
|
component: 'input',
|
||||||
component: null,
|
|
||||||
},
|
|
||||||
attrs: {},
|
|
||||||
required: true,
|
|
||||||
visible: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'active',
|
|
||||||
label: t('Active'),
|
|
||||||
component: 'checkbox',
|
|
||||||
create: true,
|
create: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
|
@ -135,9 +101,10 @@ const exprBuilder = (param, value) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
data-key="AccountList"
|
data-key="AccountUsers"
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
:label="t('account.search')"
|
:label="t('account.search')"
|
||||||
:info="t('account.searchInfo')"
|
:info="t('account.searchInfo')"
|
||||||
|
@ -145,19 +112,13 @@ const exprBuilder = (param, value) => {
|
||||||
/>
|
/>
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
<AccountFilter data-key="AccountList" />
|
<AccountFilter data-key="AccountUsers" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="AccountList"
|
data-key="AccountUsers"
|
||||||
url="VnUsers/preview"
|
url="VnUsers/preview"
|
||||||
:create="{
|
|
||||||
urlCreate: 'VnUsers',
|
|
||||||
title: t('Create user'),
|
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
|
||||||
formInitialData: {},
|
|
||||||
}"
|
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
@ -166,19 +127,7 @@ const exprBuilder = (param, value) => {
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
/>
|
||||||
<template #more-create-dialog="{ data }">
|
|
||||||
<QCardSection>
|
|
||||||
<VnInput
|
|
||||||
:label="t('Password')"
|
|
||||||
v-model="data.password"
|
|
||||||
type="password"
|
|
||||||
:required="true"
|
|
||||||
autocomplete="new-password"
|
|
||||||
/>
|
|
||||||
</QCardSection>
|
|
||||||
</template>
|
|
||||||
</VnTable>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -186,7 +135,4 @@ const exprBuilder = (param, value) => {
|
||||||
Id: Id
|
Id: Id
|
||||||
Nickname: Nickname
|
Nickname: Nickname
|
||||||
Name: Nombre
|
Name: Nombre
|
||||||
Password: Contraseña
|
|
||||||
Active: Activo
|
|
||||||
Role: Rol
|
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -46,8 +46,12 @@ const formUrlUpdate = ref(null);
|
||||||
const formCustomFn = ref(null);
|
const formCustomFn = ref(null);
|
||||||
|
|
||||||
const onTestConection = async () => {
|
const onTestConection = async () => {
|
||||||
await axios.get(`SambaConfigs/test`);
|
try {
|
||||||
notify(t('Samba connection established!'), 'positive');
|
await axios.get(`SambaConfigs/test`);
|
||||||
|
notify(t('Samba connection established!'), 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error testing connection', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getInitialSambaConfig = async () => {
|
const getInitialSambaConfig = async () => {
|
||||||
|
@ -75,10 +79,14 @@ const getInitialSambaConfig = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteMailForward = async () => {
|
const deleteMailForward = async () => {
|
||||||
await axios.delete(URL_UPDATE);
|
try {
|
||||||
initialData.value = { ...DEFAULT_DATA };
|
await axios.delete(URL_UPDATE);
|
||||||
hasData.value = false;
|
initialData.value = { ...DEFAULT_DATA };
|
||||||
notify(t('globals.dataSaved'), 'positive');
|
hasData.value = false;
|
||||||
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error deleting mail forward', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => await getInitialSambaConfig());
|
onMounted(async () => await getInitialSambaConfig());
|
||||||
|
@ -102,12 +110,12 @@ onMounted(async () => await getInitialSambaConfig());
|
||||||
<QBtn
|
<QBtn
|
||||||
class="q-ml-none"
|
class="q-ml-none"
|
||||||
color="primary"
|
color="primary"
|
||||||
:label="t('account.card.testConnection')"
|
:label="t('samba.testConnection')"
|
||||||
:disable="formModel.hasChanges"
|
:disable="formModel.hasChanges"
|
||||||
@click="onTestConection()"
|
@click="onTestConection()"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('account.card.testConnection') }}
|
{{ t('samba.testConnection') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
|
@ -115,7 +123,7 @@ onMounted(async () => await getInitialSambaConfig());
|
||||||
<VnRow class="row q-gutter-md">
|
<VnRow class="row q-gutter-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('account.card.enableSync')"
|
:label="t('samba.enableSync')"
|
||||||
v-model="data.hasData"
|
v-model="data.hasData"
|
||||||
@update:model-value="($event) => (hasData = $event)"
|
@update:model-value="($event) => (hasData = $event)"
|
||||||
:toggle-indeterminate="false"
|
:toggle-indeterminate="false"
|
||||||
|
|
|
@ -37,7 +37,11 @@ onBeforeMount(() => {
|
||||||
@on-fetch="(data) => (rolesOptions = data)"
|
@on-fetch="(data) => (rolesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel
|
||||||
|
:data-key="props.dataKey"
|
||||||
|
:search-button="true"
|
||||||
|
:hidden-tags="['search']"
|
||||||
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`acls.aclFilter.${tag.label}`) }}: </strong>
|
<strong>{{ t(`acls.aclFilter.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -36,12 +36,15 @@ const onDataSaved = ({ id }) => {
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.alias" :label="t('globals.name')" />
|
<VnInput v-model="data.alias" :label="t('mailAlias.name')" />
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.description" :label="t('role.description')" />
|
<VnInput
|
||||||
|
v-model="data.description"
|
||||||
|
:label="t('mailAlias.description')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -11,8 +11,8 @@ const { t } = useI18n();
|
||||||
<FormModel model="Alias">
|
<FormModel model="Alias">
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<div class="column q-gutter-y-md">
|
<div class="column q-gutter-y-md">
|
||||||
<VnInput v-model="data.alias" :label="t('globals.name')" />
|
<VnInput v-model="data.alias" :label="t('mailAlias.name')" />
|
||||||
<VnInput v-model="data.description" :label="t('role.description')" />
|
<VnInput v-model="data.description" :label="t('mailAlias.description')" />
|
||||||
<QCheckbox :label="t('mailAlias.isPublic')" v-model="data.isPublic" />
|
<QCheckbox :label="t('mailAlias.isPublic')" v-model="data.isPublic" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -44,9 +44,13 @@ const removeAlias = () => {
|
||||||
cancel: true,
|
cancel: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
await axios.delete(`MailAliases/${entityId.value}`);
|
try {
|
||||||
notify(t('Alias removed'), 'positive');
|
await axios.delete(`MailAliases/${entityId.value}`);
|
||||||
router.push({ name: 'AccountAlias' });
|
notify(t('Alias removed'), 'positive');
|
||||||
|
router.push({ name: 'AccountAlias' });
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error removing alias');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -67,7 +71,7 @@ const removeAlias = () => {
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('role.description')" :value="entity.description" />
|
<VnLv :label="t('mailAlias.description')" :value="entity.description" />
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -42,8 +42,8 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
<QIcon name="open_in_new" />
|
<QIcon name="open_in_new" />
|
||||||
</router-link>
|
</router-link>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('role.id')" :value="alias.id" />
|
<VnLv :label="t('mailAlias.id')" :value="alias.id" />
|
||||||
<VnLv :label="t('role.description')" :value="alias.description" />
|
<VnLv :label="t('mailAlias.description')" :value="alias.description" />
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
|
@ -36,7 +36,7 @@ watch(
|
||||||
<div class="q-gutter-y-sm">
|
<div class="q-gutter-y-sm">
|
||||||
<VnInput v-model="data.name" :label="t('account.card.nickname')" />
|
<VnInput v-model="data.name" :label="t('account.card.nickname')" />
|
||||||
<VnInput v-model="data.nickname" :label="t('account.card.alias')" />
|
<VnInput v-model="data.nickname" :label="t('account.card.alias')" />
|
||||||
<VnInput v-model="data.email" :label="t('globals.params.email')" />
|
<VnInput v-model="data.email" :label="t('account.card.email')" />
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Languages"
|
url="Languages"
|
||||||
v-model="data.lang"
|
v-model="data.lang"
|
||||||
|
|
|
@ -54,7 +54,7 @@ const hasAccount = ref(false);
|
||||||
</template>
|
</template>
|
||||||
<template #before>
|
<template #before>
|
||||||
<!-- falla id :id="entityId.value" collection="user" size="160x160" -->
|
<!-- falla id :id="entityId.value" collection="user" size="160x160" -->
|
||||||
<VnImg :id="entityId" collection="user" resolution="520x520" class="photo">
|
<VnImg :id="entityId" collection="user" resolution="160x160" class="photo">
|
||||||
<template #error>
|
<template #error>
|
||||||
<div
|
<div
|
||||||
class="absolute-full picture text-center q-pa-md flex flex-center"
|
class="absolute-full picture text-center q-pa-md flex flex-center"
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { useAcl } from 'src/composables/useAcl';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||||
import { useQuasar } from 'quasar';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
hasAccount: {
|
hasAccount: {
|
||||||
|
@ -21,7 +21,7 @@ const { t } = useI18n();
|
||||||
const { hasAccount } = toRefs($props);
|
const { hasAccount } = toRefs($props);
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { notify } = useQuasar();
|
const { notify } = useNotify();
|
||||||
const account = computed(() => useArrayData('AccountId').store.data[0]);
|
const account = computed(() => useArrayData('AccountId').store.data[0]);
|
||||||
account.value.hasAccount = hasAccount.value;
|
account.value.hasAccount = hasAccount.value;
|
||||||
const entityId = computed(() => +route.params.id);
|
const entityId = computed(() => +route.params.id);
|
||||||
|
|
|
@ -44,23 +44,32 @@ const fetchMailForwards = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`MailForwards/${route.params.id}`);
|
const response = await axios.get(`MailForwards/${route.params.id}`);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.error('Error fetching mail forwards', err);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteMailForward = async () => {
|
const deleteMailForward = async () => {
|
||||||
await axios.delete(`MailForwards/${route.params.id}`);
|
try {
|
||||||
formData.value.forwardTo = null;
|
await axios.delete(`MailForwards/${route.params.id}`);
|
||||||
initialData.value.forwardTo = null;
|
formData.value.forwardTo = null;
|
||||||
initialData.value.hasData = hasData.value;
|
initialData.value.forwardTo = null;
|
||||||
notify(t('globals.dataSaved'), 'positive');
|
initialData.value.hasData = hasData.value;
|
||||||
|
notify(t('globals.dataSaved'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error deleting mail forward', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateMailForward = async () => {
|
const updateMailForward = async () => {
|
||||||
await axios.patch('MailForwards', formData.value);
|
try {
|
||||||
initialData.value = { ...formData.value };
|
await axios.patch('MailForwards', formData.value);
|
||||||
initialData.value.hasData = hasData.value;
|
initialData.value = { ...formData.value };
|
||||||
|
initialData.value.hasData = hasData.value;
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error creating mail forward', err);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|
|
@ -82,14 +82,14 @@ const exprBuilder = (param, value) => {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
data-key="AccountRolesList"
|
data-key="Roles"
|
||||||
:expr-builder="exprBuilder"
|
:expr-builder="exprBuilder"
|
||||||
:label="t('role.searchRoles')"
|
:label="t('role.searchRoles')"
|
||||||
:info="t('role.searchInfo')"
|
:info="t('role.searchInfo')"
|
||||||
/>
|
/>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="AccountRolesList"
|
data-key="Roles"
|
||||||
:url="`VnRoles`"
|
:url="`VnRoles`"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'VnRoles',
|
urlCreate: 'VnRoles',
|
||||||
|
|
|
@ -13,7 +13,12 @@ const props = defineProps({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true" :redirect="false">
|
<VnFilterPanel
|
||||||
|
:data-key="props.dataKey"
|
||||||
|
:search-button="true"
|
||||||
|
:hidden-tags="['search']"
|
||||||
|
:redirect="false"
|
||||||
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`role.${tag.label}`) }}: </strong>
|
<strong>{{ t(`role.${tag.label}`) }}: </strong>
|
||||||
|
@ -24,7 +29,7 @@ const props = defineProps({
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.name')"
|
:label="t('role.name')"
|
||||||
v-model="params.name"
|
v-model="params.name"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
is-outlined
|
is-outlined
|
||||||
|
|
|
@ -12,12 +12,15 @@ const { t } = useI18n();
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.name" :label="t('globals.name')" />
|
<VnInput v-model="data.name" :label="t('role.card.name')" />
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.description" :label="t('role.description')" />
|
<VnInput
|
||||||
|
v-model="data.description"
|
||||||
|
:label="t('role.card.description')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,7 +9,7 @@ const { t } = useI18n();
|
||||||
<VnCard
|
<VnCard
|
||||||
data-key="Role"
|
data-key="Role"
|
||||||
:descriptor="RoleDescriptor"
|
:descriptor="RoleDescriptor"
|
||||||
search-data-key="AccountRolesList"
|
search-data-key="AccountRoles"
|
||||||
:searchbar-props="{
|
:searchbar-props="{
|
||||||
url: 'VnRoles',
|
url: 'VnRoles',
|
||||||
label: t('role.searchRoles'),
|
label: t('role.searchRoles'),
|
||||||
|
|
|
@ -32,8 +32,12 @@ const filter = {
|
||||||
where: { id: entityId },
|
where: { id: entityId },
|
||||||
};
|
};
|
||||||
const removeRole = async () => {
|
const removeRole = async () => {
|
||||||
await axios.delete(`VnRoles/${entityId.value}`);
|
try {
|
||||||
notify(t('Role removed'), 'positive');
|
await axios.delete(`VnRoles/${entityId.value}`);
|
||||||
|
notify(t('Role removed'), 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error deleting role', error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -54,7 +58,7 @@ const removeRole = async () => {
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('role.description')" :value="entity.description" />
|
<VnLv :label="t('role.card.description')" :value="entity.description" />
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -22,12 +22,15 @@ const { t } = useI18n();
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.name" :label="t('globals.name')" />
|
<VnInput v-model="data.name" :label="t('role.card.name')" />
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput v-model="data.description" :label="t('role.description')" />
|
<VnInput
|
||||||
|
v-model="data.description"
|
||||||
|
:label="t('role.card.description')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -44,9 +44,9 @@ const filter = {
|
||||||
<QIcon name="open_in_new" />
|
<QIcon name="open_in_new" />
|
||||||
</a>
|
</a>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('role.id')" :value="role.id" />
|
<VnLv :label="t('role.card.id')" :value="role.id" />
|
||||||
<VnLv :label="t('globals.name')" :value="role.name" />
|
<VnLv :label="t('role.card.name')" :value="role.name" />
|
||||||
<VnLv :label="t('role.description')" :value="role.description" />
|
<VnLv :label="t('role.card.description')" :value="role.description" />
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
|
@ -1,15 +1,32 @@
|
||||||
account:
|
account:
|
||||||
|
pageTitles:
|
||||||
|
users: Users
|
||||||
|
list: Users
|
||||||
|
roles: Roles
|
||||||
|
alias: Mail aliasses
|
||||||
|
accounts: Accounts
|
||||||
|
ldap: LDAP
|
||||||
|
samba: Samba
|
||||||
|
acls: ACLs
|
||||||
|
connections: Connections
|
||||||
|
inheritedRoles: Inherited Roles
|
||||||
|
subRoles: Sub Roles
|
||||||
|
newRole: New role
|
||||||
|
privileges: Privileges
|
||||||
|
mailAlias: Mail Alias
|
||||||
|
mailForwarding: Mail Forwarding
|
||||||
|
accountCreate: New user
|
||||||
|
aliasUsers: Users
|
||||||
card:
|
card:
|
||||||
|
name: Name
|
||||||
nickname: User
|
nickname: User
|
||||||
role: Role
|
role: Role
|
||||||
|
email: Email
|
||||||
alias: Alias
|
alias: Alias
|
||||||
lang: Language
|
lang: Language
|
||||||
roleFk: Role
|
roleFk: Role
|
||||||
newUser: New user
|
newUser: New user
|
||||||
ticketTracking: Ticket tracking
|
ticketTracking: Ticket tracking
|
||||||
enableSync: Habilitar sincronización
|
|
||||||
groupDN: DN grupos
|
|
||||||
testConnection: Probar conexión
|
|
||||||
privileges:
|
privileges:
|
||||||
delegate: Can delegate privileges
|
delegate: Can delegate privileges
|
||||||
enabled: Account enabled!
|
enabled: Account enabled!
|
||||||
|
@ -57,7 +74,11 @@ account:
|
||||||
search: Search user
|
search: Search user
|
||||||
searchInfo: You can search by id, name or nickname
|
searchInfo: You can search by id, name or nickname
|
||||||
create:
|
create:
|
||||||
|
name: Name
|
||||||
nickname: Nickname
|
nickname: Nickname
|
||||||
|
email: Email
|
||||||
|
role: Role
|
||||||
|
password: Password
|
||||||
active: Active
|
active: Active
|
||||||
mailForwarding:
|
mailForwarding:
|
||||||
forwardingMail: Forward email
|
forwardingMail: Forward email
|
||||||
|
@ -65,30 +86,50 @@ account:
|
||||||
enableMailForwarding: Enable mail forwarding
|
enableMailForwarding: Enable mail forwarding
|
||||||
mailInputInfo: All emails will be forwarded to the specified address.
|
mailInputInfo: All emails will be forwarded to the specified address.
|
||||||
role:
|
role:
|
||||||
|
pageTitles:
|
||||||
|
inheritedRoles: Inherited Roles
|
||||||
|
subRoles: Sub Roles
|
||||||
|
card:
|
||||||
|
description: Description
|
||||||
|
id: Id
|
||||||
|
name: Name
|
||||||
newRole: New role
|
newRole: New role
|
||||||
searchRoles: Search role
|
searchRoles: Search role
|
||||||
searchInfo: Search role by id or name
|
searchInfo: Search role by id or name
|
||||||
|
name: Name
|
||||||
description: Description
|
description: Description
|
||||||
id: Id
|
id: Id
|
||||||
mailAlias:
|
mailAlias:
|
||||||
|
pageTitles:
|
||||||
|
aliasUsers: Users
|
||||||
search: Search mail alias
|
search: Search mail alias
|
||||||
searchInfo: Search alias by id or name
|
searchInfo: Search alias by id or name
|
||||||
|
alias: Alias
|
||||||
|
description: Description
|
||||||
|
id: Id
|
||||||
newAlias: New alias
|
newAlias: New alias
|
||||||
|
name: Name
|
||||||
isPublic: Public
|
isPublic: Public
|
||||||
ldap:
|
ldap:
|
||||||
|
enableSync: Enable synchronization
|
||||||
server: Server
|
server: Server
|
||||||
rdn: RDN
|
rdn: RDN
|
||||||
userDN: User DN
|
userDN: User DN
|
||||||
filter: Filter
|
filter: Filter
|
||||||
|
groupDN: Group DN
|
||||||
|
testConnection: Test connection
|
||||||
success: LDAP connection established!
|
success: LDAP connection established!
|
||||||
password: Password
|
password: Password
|
||||||
samba:
|
samba:
|
||||||
|
enableSync: Enable synchronization
|
||||||
domainController: Domain controller
|
domainController: Domain controller
|
||||||
domainAD: AD domain
|
domainAD: AD domain
|
||||||
userAD: AD user
|
userAD: AD user
|
||||||
|
groupDN: Group DN
|
||||||
passwordAD: AD password
|
passwordAD: AD password
|
||||||
domainPart: User DN (without domain part)
|
domainPart: User DN (without domain part)
|
||||||
verifyCertificate: Verify certificate
|
verifyCertificate: Verify certificate
|
||||||
|
testConnection: Test connection
|
||||||
success: Samba connection established!
|
success: Samba connection established!
|
||||||
accounts:
|
accounts:
|
||||||
homedir: Homedir base
|
homedir: Homedir base
|
||||||
|
@ -106,6 +147,8 @@ connections:
|
||||||
created: Created
|
created: Created
|
||||||
killSession: Kill session
|
killSession: Kill session
|
||||||
acls:
|
acls:
|
||||||
|
role: Role
|
||||||
|
accessType: Access type
|
||||||
permissions: Permission
|
permissions: Permission
|
||||||
search: Search acls
|
search: Search acls
|
||||||
searchInfo: Search acls by model name
|
searchInfo: Search acls by model name
|
||||||
|
|
|
@ -1,7 +1,27 @@
|
||||||
account:
|
account:
|
||||||
|
pageTitles:
|
||||||
|
users: Usuarios
|
||||||
|
list: Usuarios
|
||||||
|
roles: Roles
|
||||||
|
alias: Alias de correo
|
||||||
|
accounts: Cuentas
|
||||||
|
ldap: LDAP
|
||||||
|
samba: Samba
|
||||||
|
acls: ACLs
|
||||||
|
connections: Conexiones
|
||||||
|
inheritedRoles: Roles heredados
|
||||||
|
newRole: Nuevo rol
|
||||||
|
subRoles: Subroles
|
||||||
|
privileges: Privilegios
|
||||||
|
mailAlias: Alias de correo
|
||||||
|
mailForwarding: Reenvío de correo
|
||||||
|
accountCreate: Nuevo usuario
|
||||||
|
aliasUsers: Usuarios
|
||||||
card:
|
card:
|
||||||
nickname: Usuario
|
nickname: Usuario
|
||||||
|
name: Nombre
|
||||||
role: Rol
|
role: Rol
|
||||||
|
email: Mail
|
||||||
alias: Alias
|
alias: Alias
|
||||||
lang: Idioma
|
lang: Idioma
|
||||||
roleFk: Rol
|
roleFk: Rol
|
||||||
|
@ -13,9 +33,6 @@ account:
|
||||||
deactivated: ¡Usuario desactivado!
|
deactivated: ¡Usuario desactivado!
|
||||||
newUser: Nuevo usuario
|
newUser: Nuevo usuario
|
||||||
twoFactor: Doble factor
|
twoFactor: Doble factor
|
||||||
enableSync: Habilitar sincronización
|
|
||||||
groupDN: DN grupos
|
|
||||||
testConnection: Probar conexión
|
|
||||||
privileges:
|
privileges:
|
||||||
delegate: Puede delegar privilegios
|
delegate: Puede delegar privilegios
|
||||||
actions:
|
actions:
|
||||||
|
@ -56,7 +73,11 @@ account:
|
||||||
search: Buscar usuario
|
search: Buscar usuario
|
||||||
searchInfo: Puedes buscar por id, nombre o usuario
|
searchInfo: Puedes buscar por id, nombre o usuario
|
||||||
create:
|
create:
|
||||||
|
name: Nombre
|
||||||
nickname: Nombre mostrado
|
nickname: Nombre mostrado
|
||||||
|
email: Email
|
||||||
|
role: Rol
|
||||||
|
password: Contraseña
|
||||||
active: Activo
|
active: Activo
|
||||||
mailForwarding:
|
mailForwarding:
|
||||||
forwardingMail: Dirección de reenvío
|
forwardingMail: Dirección de reenvío
|
||||||
|
@ -64,30 +85,51 @@ account:
|
||||||
enableMailForwarding: Habilitar redirección de correo
|
enableMailForwarding: Habilitar redirección de correo
|
||||||
mailInputInfo: Todos los correos serán reenviados a la dirección especificada, no se mantendrá copia de los mismos en el buzón del usuario.
|
mailInputInfo: Todos los correos serán reenviados a la dirección especificada, no se mantendrá copia de los mismos en el buzón del usuario.
|
||||||
role:
|
role:
|
||||||
|
pageTitles:
|
||||||
|
inheritedRoles: Roles heredados
|
||||||
|
subRoles: Subroles
|
||||||
|
newRole: Nuevo rol
|
||||||
|
card:
|
||||||
|
description: Descripción
|
||||||
|
id: Id
|
||||||
|
name: Nombre
|
||||||
newRole: Nuevo rol
|
newRole: Nuevo rol
|
||||||
searchRoles: Buscar roles
|
searchRoles: Buscar roles
|
||||||
searchInfo: Buscar rol por id o nombre
|
searchInfo: Buscar rol por id o nombre
|
||||||
|
name: Nombre
|
||||||
description: Descripción
|
description: Descripción
|
||||||
id: Id
|
id: Id
|
||||||
mailAlias:
|
mailAlias:
|
||||||
|
pageTitles:
|
||||||
|
aliasUsers: Usuarios
|
||||||
search: Buscar alias de correo
|
search: Buscar alias de correo
|
||||||
searchInfo: Buscar alias por id o nombre
|
searchInfo: Buscar alias por id o nombre
|
||||||
|
alias: Alias
|
||||||
|
description: Descripción
|
||||||
|
id: Id
|
||||||
newAlias: Nuevo alias
|
newAlias: Nuevo alias
|
||||||
|
name: Nombre
|
||||||
isPublic: Público
|
isPublic: Público
|
||||||
ldap:
|
ldap:
|
||||||
password: Contraseña
|
password: Contraseña
|
||||||
|
enableSync: Habilitar sincronización
|
||||||
server: Servidor
|
server: Servidor
|
||||||
rdn: RDN
|
rdn: RDN
|
||||||
userDN: DN usuarios
|
userDN: DN usuarios
|
||||||
filter: Filtro
|
filter: Filtro
|
||||||
|
groupDN: DN grupos
|
||||||
|
testConnection: Probar conexión
|
||||||
success: ¡Conexión con LDAP establecida!
|
success: ¡Conexión con LDAP establecida!
|
||||||
samba:
|
samba:
|
||||||
|
enableSync: Habilitar sincronización
|
||||||
domainController: Controlador de dominio
|
domainController: Controlador de dominio
|
||||||
domainAD: Dominio AD
|
domainAD: Dominio AD
|
||||||
|
groupDN: DN grupos
|
||||||
userAD: Usuario AD
|
userAD: Usuario AD
|
||||||
passwordAD: Contraseña AD
|
passwordAD: Contraseña AD
|
||||||
domainPart: DN usuarios (sin la parte del dominio)
|
domainPart: DN usuarios (sin la parte del dominio)
|
||||||
verifyCertificate: Verificar certificado
|
verifyCertificate: Verificar certificado
|
||||||
|
testConnection: Probar conexión
|
||||||
success: ¡Conexión con Samba establecida!
|
success: ¡Conexión con Samba establecida!
|
||||||
accounts:
|
accounts:
|
||||||
homedir: Directorio base para carpetas de usuario
|
homedir: Directorio base para carpetas de usuario
|
||||||
|
@ -105,6 +147,8 @@ connections:
|
||||||
created: Creado
|
created: Creado
|
||||||
killSession: Matar sesión
|
killSession: Matar sesión
|
||||||
acls:
|
acls:
|
||||||
|
role: Rol
|
||||||
|
accessType: Tipo de acceso
|
||||||
permissions: Permiso
|
permissions: Permiso
|
||||||
search: Buscar acls
|
search: Buscar acls
|
||||||
searchInfo: Buscar acls por nombre
|
searchInfo: Buscar acls por nombre
|
||||||
|
|
|
@ -100,7 +100,7 @@ async function remove() {
|
||||||
</QMenu>
|
</QMenu>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
<QItem @click="confirmRemove()" v-ripple clickable data-cy="deleteClaim">
|
<QItem @click="confirmRemove()" v-ripple clickable>
|
||||||
<QItemSection avatar>
|
<QItemSection avatar>
|
||||||
<QIcon name="delete" />
|
<QIcon name="delete" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
|
@ -130,7 +130,7 @@ function cancel() {
|
||||||
<template #body-cell-description="{ row, value }">
|
<template #body-cell-description="{ row, value }">
|
||||||
<QTd auto-width align="right" class="link">
|
<QTd auto-width align="right" class="link">
|
||||||
{{ value }}
|
{{ value }}
|
||||||
<ItemDescriptorProxy :id="row.itemFk" />
|
<ItemDescriptorProxy :id="row.itemFk"></ItemDescriptorProxy>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
|
@ -25,7 +25,7 @@ const claimFilter = computed(() => {
|
||||||
include: {
|
include: {
|
||||||
relation: 'user',
|
relation: 'user',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'nickname', 'name'],
|
fields: ['id', 'nickname'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue