Compare commits
1 Commits
dev
...
hotfix-ter
Author | SHA1 | Date |
---|---|---|
Carlos Satorres | d9b3d83209 |
186
CHANGELOG.md
186
CHANGELOG.md
|
@ -1,189 +1,3 @@
|
||||||
# Version 24.48 - 2024-11-25
|
|
||||||
|
|
||||||
### Added 🆕
|
|
||||||
|
|
||||||
- chore: correct checkNotification (fix_customer_issues) by:alexm
|
|
||||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
|
||||||
- chore: refs #6818 add spaces by:jorgep
|
|
||||||
- chore: refs #6818 drop useless code & comment by:jorgep
|
|
||||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
|
||||||
- chore: refs #7524 fix test by:jorgep
|
|
||||||
- chore: refs #8039 not required by:alexm
|
|
||||||
- chore: refs #8078 fiz tests by:jorgep
|
|
||||||
- chore: refs #8078 rollback ref by:jorgep
|
|
||||||
- chore: remove console.log (warmFix_invoiceOut_Global) by:alexm
|
|
||||||
- chore: typo (fix_itemType-redirection) by:alexm
|
|
||||||
- feat: #6943 use openURL quasar by:Javier Segarra
|
|
||||||
- feat: #7782 add cypress report by:Javier Segarra
|
|
||||||
- feat: #7782 cypress.config watchForFileChanges by:Javier Segarra
|
|
||||||
- feat: #7782 npm run resetDatabase by:Javier Segarra
|
|
||||||
- feat: #7782 waitUntil domContentLoad by:Javier Segarra
|
|
||||||
- feat: added composable to confirm orders by:Jon
|
|
||||||
- feat: add /reports in gitignore (warmFix_reports_in_gitignore) by:alexm
|
|
||||||
- feat: apply changes for customerModule by:Javier Segarra
|
|
||||||
- feat: disabled buttons by:Javier Segarra
|
|
||||||
- feat: move buttons to DescriptorMenu by:Javier Segarra
|
|
||||||
- feat: refs #6818 add icon by:jorgep
|
|
||||||
- feat: refs #6818 fetch url & default channel by:jorgep
|
|
||||||
- feat: refs #6818 saysimple integration by:jorgep
|
|
||||||
- feat: refs #6839 module searching (6839-addSearchMenu) by:jorgep
|
|
||||||
- feat: refs #6839 normalize search by:jorgep
|
|
||||||
- feat: refs #6919 sync entry data by:jorgep
|
|
||||||
- feat: refs #7006 itemType basic data new inputs by:guillermo
|
|
||||||
- feat: refs #7006 itemTypeLog added by:guillermo
|
|
||||||
- feat: refs #7193 modified parking to use the scope and corrected small errors by:Jon
|
|
||||||
- feat: refs #7206 added inactive label and corrected minor errors by:Jon
|
|
||||||
- feat: refs #7308 #7308 remove warnings related to useSession by:Javier Segarra
|
|
||||||
- feat: refs #7349 usa back con permisos by:jgallego
|
|
||||||
- feat: refs #7524 add front test by:jorgep
|
|
||||||
- feat: refs #7874 improve vn-notes ui by:jorgep
|
|
||||||
- feat: refs #7970 notify changes by:Jon
|
|
||||||
- feat(): refs #8039 canceledError not notify by:alexm
|
|
||||||
- feat: refs #8039 notify error unify by:alexm
|
|
||||||
- feat: refs #8039 show duplicate request in local by:alexm
|
|
||||||
- feat: refs #8078 add shortcut multi selection by:jorgep
|
|
||||||
- feat: refs #8078 add tests by:jorgep
|
|
||||||
- feat: refs#8087 Redadas en travel by:Carlos Andrés
|
|
||||||
- feat: refs #8087 Traspasar redadas a travels by:Carlos Andrés
|
|
||||||
- feat: remove comments by:Javier Segarra
|
|
||||||
- feat(Supplier): add companySize by:alexm
|
|
||||||
- feat: use composable to unify logic by:Javier Segarra
|
|
||||||
- feat(VnInput): empty to null by:alexm
|
|
||||||
- feat(VnSelect): order data equal salix by:alexm
|
|
||||||
- feat(VnSelect): refs #7136 add scroll (7136-vnSelect_paginate_simplify_2) by:alexm
|
|
||||||
|
|
||||||
### Changed 📦
|
|
||||||
|
|
||||||
- chore: perf (warmFix_order_equalSalix) by:alexm
|
|
||||||
- chore: refs #7273 sticky add btn & refactor by:jorgep
|
|
||||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
|
||||||
- perf: minor bugs detected by:Javier Segarra
|
|
||||||
- perf: refs #6943 #6943 merge command by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 declare composable inst4ead code duplicated by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 handle composable i18n by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 handle i18n by:Javier Segarra
|
|
||||||
- perf: refs #7283 #7283 i18n params by:Javier Segarra
|
|
||||||
- perf: refs #7308 #7308 remove comments by:Javier Segarra
|
|
||||||
- perf: remove appendParams by:Javier Segarra
|
|
||||||
- perf: use const in VnLocation by:Javier Segarra
|
|
||||||
- perf: use required instead :required="true" by:Javier Segarra
|
|
||||||
- refactor: apply QPopupProxy by:wbuezas
|
|
||||||
- refactor: changed confirmOrder directory by:Jon
|
|
||||||
- refactor: change keyup.enter for update:model-value by:wbuezas
|
|
||||||
- refactor(InvoiceInBasicData): use VnDms by:alexm
|
|
||||||
- refactor: modified composable by:Jon
|
|
||||||
- refactor: refs #6818 change channel source by:jorgep
|
|
||||||
- refactor: refs #6818 channel logic by:jorgep
|
|
||||||
- refactor: refs #6919 export filter by:jorgep
|
|
||||||
- refactor: refs #7132 1st wave of changes in global translations files by:Jon
|
|
||||||
- refactor: refs #7132 account's module translations by:Jon
|
|
||||||
- refactor: refs #7132 customer's module translations by:Jon
|
|
||||||
- refactor: refs #7132 deleted pageTitles repeated by:Jon
|
|
||||||
- refactor: refs #7132 delete duplicate translations' keys by:Jon
|
|
||||||
- refactor: refs #7132 deleted useless code by:Jon
|
|
||||||
- refactor: refs #7132 global translations files changed by:Jon
|
|
||||||
- refactor: refs #7266 Changed method name by:guillermo
|
|
||||||
- refactor: refs #7950 Created cmr model by:guillermo
|
|
||||||
- refactor: refs #7970 added emit by:Jon
|
|
||||||
- refactor: refs #7970 refactored VnConfirm to emit events by:Jon
|
|
||||||
- refactor: refs #8185 modified LeftMenu to avoid duplicates by:Jon
|
|
||||||
- refactor: remove unused variable by:wbuezas
|
|
||||||
- refactor: revert catalog changes by:Jon
|
|
||||||
- refactor: small change by:wbuezas
|
|
||||||
- test: refactor e2e by:alexm
|
|
||||||
- test: refs #8039 add hasNotify and, refactor: agencyWorkCenter test by:alexm
|
|
||||||
|
|
||||||
### Fixed 🛠️
|
|
||||||
|
|
||||||
- chore: refs #7524 fix test by:jorgep
|
|
||||||
- fix: better performance (warmFix_accountAcls) by:alexm
|
|
||||||
- fix: catalog view category and type filter by:wbuezas
|
|
||||||
- fix: category and tags filters by:Jon
|
|
||||||
- fix: changed route.query by:Jon
|
|
||||||
- fix: change type vnput by:Javier Segarra
|
|
||||||
- fix(ClaimList): stateCode orderBy priority by:alexm
|
|
||||||
- fix: entryFilters by:carlossa
|
|
||||||
- fix: filter panel by:Jon
|
|
||||||
- fix(InvoiceOutGlobal): parallelism by:alexm
|
|
||||||
- fix: itemBotanical by:Javier Segarra
|
|
||||||
- fix: itemType redirection and fix filters by:alexm
|
|
||||||
- fix: logout spec (warmFix_logout.spec) by:alexm
|
|
||||||
- fix: merge errors by:alexm
|
|
||||||
- fix: order catalog by:wbuezas
|
|
||||||
- fix: order catalog fixes by:wbuezas
|
|
||||||
- fix: refs #6818 use right icon by:jorgep
|
|
||||||
- fix: refs #6896 fixed module problems by:Jon
|
|
||||||
- fix: refs #7193 fixed e2e test by:Jon
|
|
||||||
- fix: refs #7206 deleted duplicate code by:Jon
|
|
||||||
- fix: refs #7273 use same filter by:jorgep
|
|
||||||
- fix: refs #7283 #7283 bugs by:Javier Segarra
|
|
||||||
- fix: refs #7283 #7283 ItemDiary subToolbar by:Javier Segarra
|
|
||||||
- fix: refs #7283 #7283 ItemSummary bugs by:Javier Segarra
|
|
||||||
- fix: refs #7283 Account image resolution by:guillermo
|
|
||||||
- fix: refs #7283 css by:jorgep
|
|
||||||
- fix: refs #7283 filter by:carlossa
|
|
||||||
- fix: refs #7283 fix image by:carlossa
|
|
||||||
- fix: refs #7283 fix pr by:carlossa
|
|
||||||
- fix: refs #7283 fix preview by:carlossa
|
|
||||||
- fix: refs #7283 fix required by:carlossa
|
|
||||||
- fix: refs #7283 item filters by:carlossa
|
|
||||||
- fix: refs #7283 itemtype fix by:carlossa
|
|
||||||
- fix: refs #7283 order translation by:carlossa
|
|
||||||
- fix: refs #7283 preview by:carlossa
|
|
||||||
- fix: refs #7283 tooltips !Item by:Javier Segarra
|
|
||||||
- fix: refs #7306 clean warning by:carlossa
|
|
||||||
- fix: refs #7310 clean warning by:carlossa
|
|
||||||
- fix: refs #7323 locale #7396 by:jorgep
|
|
||||||
- fix: refs #7323 show advanced fields by:jorgep
|
|
||||||
- fix: refs #7349 dependencia no usada by:jgallego
|
|
||||||
- fix: refs #7524 e2e & worker module by:jorgep
|
|
||||||
- fix: refs #7874 add title by:jorgep
|
|
||||||
- fix: refs #7874 show name by:jorgep
|
|
||||||
- fix: refs #7943 use correct data-key by:jorgep
|
|
||||||
- fix: refs #7943 use summary by:jorgep
|
|
||||||
- fix: refs #8039 bad tests by:alexm
|
|
||||||
- fix: refs #8039 o not handle unnecessary errors by:alexm
|
|
||||||
- fix: refs #8078 e2e #7970 by:jorgep
|
|
||||||
- fix: refs #8078 handleSelection by:jorgep
|
|
||||||
- fix: refs #8078 improve cy command (8078-enableMultiSelection) by:jorgep
|
|
||||||
- fix: refs #8078 improve handleSelection by:jorgep
|
|
||||||
- fix: reset category by:wbuezas
|
|
||||||
- fix: tag chips by:Jon
|
|
||||||
- fix: vnSearchbar spec (warmFix_vnSearchBar.spec) by:alexm
|
|
||||||
- fix(VnSelect): setOptions when applyFilter by:alexm
|
|
||||||
- fix: worker test e2e by:Jon
|
|
||||||
- Merge branch 'dev' into fix_customer_issues by:Javier Segarra
|
|
||||||
- refactor: revert catalog changes by:Jon
|
|
||||||
- refs #7283 fix conflicts by:carlossa
|
|
||||||
- refs #7283 fix descriptorproxy by:carlossa
|
|
||||||
- refs #7283 fixedPrice by:carlossa
|
|
||||||
- refs #7283 fixedPrices by:carlossa
|
|
||||||
- refs #7283 fix itemFixed by:carlossa
|
|
||||||
- refs #7283 fix itemFixedPrice by:carlossa
|
|
||||||
- refs #7283 fix itemMigration by:carlossa
|
|
||||||
- refs #7283 fix itemMigration list filters by:carlossa
|
|
||||||
- refs #7283 fix items by:carlossa
|
|
||||||
- refs #7283 fix items error get images by:carlossa
|
|
||||||
- refs #7283 fix items images by:carlossa
|
|
||||||
- refs #7283 fix request by:carlossa
|
|
||||||
- refs #7283 fix searchbar by:carlossa
|
|
||||||
- refs #7283 fix viewSummary by:carlossa
|
|
||||||
- refs #7283 fix yml list basicData by:carlossa
|
|
||||||
- refs #7283 itemRequest fix by:carlossa
|
|
||||||
- refs #7283 itemRequest fix deny by:carlossa
|
|
||||||
- refs #7283 itemRequest fix reload by:carlossa
|
|
||||||
- refs #72983 fix filters by:carlossa
|
|
||||||
- revert: commit by:Javier Segarra
|
|
||||||
- revert e57a253c6f649382da187d1129449d265fb26d3b by:Javier Segarra
|
|
||||||
- test: #8162 fix clientList spec by:Javier Segarra
|
|
||||||
- test: #8162 fix vnLocation spec by:Javier Segarra
|
|
||||||
- test: fix arrayData by:Javier Segarra
|
|
||||||
- test: fix e2e by:alexm
|
|
||||||
- test: fix e2e by:Javier Segarra
|
|
||||||
- test: refs #8039 fix WorkerNotification e2e by:alexm
|
|
||||||
- test: refs #8039 fix ZoneWarehouse e2e by:alexm
|
|
||||||
- warmfix: ItemLastEntries to date (origin/warmfix_itemLastEntriesFilter) by:Javier Segarra
|
|
||||||
|
|
||||||
# Version 24.40 - 2024-10-02
|
# Version 24.40 - 2024-10-02
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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,15 +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(false);
|
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 = {
|
||||||
|
@ -41,56 +39,13 @@ 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) {
|
|
||||||
await provincesFetchDataRef.value.fetch({
|
|
||||||
where: { countryFk: postcodeFormData.countryFk },
|
|
||||||
});
|
|
||||||
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();
|
await provincesFetchDataRef.value.fetch();
|
||||||
newTown.province = provincesOptions.value.find(
|
newTown.province = provincesOptions.value.find(
|
||||||
|
@ -99,28 +54,79 @@ async function onCityCreated(newTown, formData) {
|
||||||
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>
|
||||||
|
|
||||||
|
@ -137,7 +143,6 @@ async function filterTowns(name) {
|
||||||
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"
|
||||||
|
@ -159,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"
|
||||||
|
@ -174,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">
|
||||||
|
@ -192,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)
|
||||||
|
@ -206,25 +208,20 @@ async function filterTowns(name) {
|
||||||
:province-selected="data.provinceFk"
|
:province-selected="data.provinceFk"
|
||||||
@update:model-value="(value) => setProvince(value, data)"
|
@update:model-value="(value) => setProvince(value, 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',
|
||||||
|
@ -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 = () => {
|
||||||
|
|
|
@ -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%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 = () => {
|
||||||
|
|
|
@ -88,16 +88,20 @@ const applyTags = (params, search) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchItemTypes = async (id) => {
|
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) => {
|
||||||
|
@ -107,19 +111,23 @@ 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) => {
|
||||||
|
@ -240,7 +248,7 @@ const removeTag = (index, params, search) => {
|
||||||
>
|
>
|
||||||
<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>
|
||||||
|
|
|
@ -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']);
|
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;
|
||||||
|
@ -42,31 +39,23 @@ async function onProvinceCreated(_, data) {
|
||||||
async function handleProvinces(data) {
|
async function handleProvinces(data) {
|
||||||
provincesOptions.value = data;
|
provincesOptions.value = 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
|
||||||
|
@ -737,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>
|
||||||
|
|
|
@ -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';
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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,47 +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.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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</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"
|
||||||
|
@ -298,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'])"
|
||||||
|
@ -310,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="
|
||||||
() => {
|
() => {
|
||||||
|
@ -330,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'"
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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,10 +57,12 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({ search, sanitizer });
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
'update:modelValue',
|
'update:modelValue',
|
||||||
'refresh',
|
'refresh',
|
||||||
'clear',
|
'clear',
|
||||||
|
'search',
|
||||||
'init',
|
'init',
|
||||||
'remove',
|
'remove',
|
||||||
'setUserParams',
|
'setUserParams',
|
||||||
|
@ -74,9 +76,6 @@ 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(() => {
|
||||||
userParams.value = $props.modelValue ?? {};
|
userParams.value = $props.modelValue ?? {};
|
||||||
emit('init', { params: userParams.value });
|
emit('init', { params: userParams.value });
|
||||||
|
@ -171,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);
|
||||||
}
|
}
|
||||||
|
@ -214,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('%', '');
|
||||||
}
|
}
|
||||||
|
@ -273,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>
|
||||||
|
|
|
@ -65,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">
|
||||||
|
@ -101,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>
|
||||||
|
@ -141,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,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 {
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -9,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,26 +106,6 @@ 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
|
||||||
|
@ -298,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
|
||||||
|
@ -321,10 +300,13 @@ 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
|
||||||
|
@ -354,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,7 +357,15 @@ resetPassword:
|
||||||
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
|
||||||
|
@ -384,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
|
||||||
|
weight: Weight
|
||||||
packing: Packing
|
packing: Packing
|
||||||
grouping: Grouping
|
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:
|
||||||
|
@ -507,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
|
||||||
|
@ -529,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
|
||||||
|
@ -541,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
|
||||||
|
@ -570,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
|
||||||
|
@ -585,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
|
||||||
|
@ -606,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
|
||||||
|
@ -623,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
|
||||||
|
@ -653,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
|
||||||
|
@ -661,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
|
||||||
|
@ -681,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
|
||||||
|
@ -704,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
|
||||||
|
@ -722,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
|
||||||
|
@ -745,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
|
||||||
|
@ -767,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
|
||||||
|
@ -858,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,26 +108,6 @@ 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
|
||||||
|
@ -303,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
|
||||||
|
@ -325,10 +304,13 @@ 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
|
||||||
|
@ -359,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,7 +359,15 @@ resetPassword:
|
||||||
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
|
||||||
|
@ -386,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
|
||||||
|
@ -396,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
|
||||||
|
weight: Peso
|
||||||
packing: Packing
|
packing: Packing
|
||||||
grouping: Grouping
|
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:
|
||||||
|
@ -510,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
|
||||||
|
@ -529,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
|
||||||
|
@ -556,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
|
||||||
|
@ -565,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
|
||||||
|
@ -575,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
|
||||||
|
@ -602,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
|
||||||
|
@ -619,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
|
||||||
|
@ -650,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
|
||||||
|
@ -658,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
|
||||||
|
@ -676,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
|
||||||
|
@ -698,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
|
||||||
|
@ -717,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
|
||||||
|
@ -739,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
|
||||||
|
@ -761,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
|
||||||
|
@ -851,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
|
||||||
|
|
|
@ -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')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -45,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"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -104,7 +104,7 @@ const exprBuilder = (param, value) => {
|
||||||
|
|
||||||
<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')"
|
||||||
|
@ -112,12 +112,12 @@ 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"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -29,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'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,7 +23,7 @@ defineExpose({ states });
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="ClaimStates" @on-fetch="(data) => (states = data)" auto-load />
|
<FetchData url="ClaimStates" @on-fetch="(data) => (states = data)" auto-load />
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true" search-url="table">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
|
|
|
@ -95,7 +95,6 @@ const columns = computed(() => [
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orderBy: 'priority',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { onBeforeMount, ref, watch } from 'vue';
|
import { onBeforeMount, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
@ -53,6 +52,7 @@ const addressFilter = {
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
const { id } = route.params;
|
const { id } = route.params;
|
||||||
|
getAddressesData(id);
|
||||||
getClientData(id);
|
getClientData(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,10 +60,23 @@ watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
if (!newValue) return;
|
if (!newValue) return;
|
||||||
|
getAddressesData(newValue);
|
||||||
getClientData(newValue);
|
getClientData(newValue);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const getAddressesData = async (id) => {
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get(`Clients/${id}/addresses`, {
|
||||||
|
params: { filter: JSON.stringify(addressFilter) },
|
||||||
|
});
|
||||||
|
addresses.value = data;
|
||||||
|
sortAddresses();
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const getClientData = async (id) => {
|
const getClientData = async (id) => {
|
||||||
try {
|
try {
|
||||||
const { data } = await axios.get(`Clients/${id}`);
|
const { data } = await axios.get(`Clients/${id}`);
|
||||||
|
@ -88,9 +101,9 @@ const setDefault = (address) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const sortAddresses = (data) => {
|
const sortAddresses = () => {
|
||||||
if (!client.value || !data) return;
|
if (!client.value || !addresses.value) return;
|
||||||
addresses.value = data.sort((a, b) => {
|
addresses.value = addresses.value.sort((a, b) => {
|
||||||
return isDefaultAddress(b) - isDefaultAddress(a);
|
return isDefaultAddress(b) - isDefaultAddress(a);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -111,17 +124,8 @@ const toCustomerAddressEdit = (addressId) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
@on-fetch="sortAddresses"
|
|
||||||
auto-load
|
|
||||||
data-key="CustomerAddresses"
|
|
||||||
order="id DESC"
|
|
||||||
ref="vnPaginateRef"
|
|
||||||
:filter="addressFilter"
|
|
||||||
:url="`Clients/${route.params.id}/addresses`"
|
|
||||||
/>
|
|
||||||
<div class="full-width flex justify-center">
|
<div class="full-width flex justify-center">
|
||||||
<QCard class="card-width q-pa-lg">
|
<QCard class="card-width q-pa-lg" v-if="addresses.length">
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<div
|
<div
|
||||||
v-for="(item, index) in addresses"
|
v-for="(item, index) in addresses"
|
||||||
|
@ -163,7 +167,7 @@ const toCustomerAddressEdit = (addressId) => {
|
||||||
<div>{{ item.street }}</div>
|
<div>{{ item.street }}</div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.postalCode }} - {{ item.city }},
|
{{ item.postalCode }} - {{ item.city }},
|
||||||
{{ item.province?.name }}
|
{{ item.province.name }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.phone }}
|
{{ item.phone }}
|
||||||
|
|
|
@ -256,10 +256,10 @@ const showBalancePdf = ({ id }) => {
|
||||||
{{ toCurrency(balances[rowIndex]?.balance) }}
|
{{ toCurrency(balances[rowIndex]?.balance) }}
|
||||||
</template>
|
</template>
|
||||||
<template #column-description="{ row }">
|
<template #column-description="{ row }">
|
||||||
<span class="link" v-if="row.isInvoice" @click.stop>
|
<div class="link" v-if="row.isInvoice">
|
||||||
{{ t('bill', { ref: row.description }) }}
|
{{ t('bill', { ref: row.description }) }}
|
||||||
<InvoiceOutDescriptorProxy :id="row.id" />
|
<InvoiceOutDescriptorProxy :id="row.description" />
|
||||||
</span>
|
</div>
|
||||||
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
|
<span v-else class="q-pa-xs dotted rounded-borders" :title="row.description">
|
||||||
{{ row.description }}
|
{{ row.description }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -9,7 +9,6 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
import { getDifferences, getUpdatedValues } from 'src/filters';
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -31,13 +30,6 @@ const exprBuilder = (param, value) => {
|
||||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function onBeforeSave(formData, originalData) {
|
|
||||||
return getUpdatedValues(
|
|
||||||
Object.keys(getDifferences(formData, originalData)),
|
|
||||||
formData
|
|
||||||
);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -51,12 +43,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
@on-fetch="(data) => (businessTypes = data)"
|
@on-fetch="(data) => (businessTypes = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FormModel
|
<FormModel :url="`Clients/${route.params.id}`" auto-load model="customer">
|
||||||
:url="`Clients/${route.params.id}`"
|
|
||||||
auto-load
|
|
||||||
model="customer"
|
|
||||||
:mapper="onBeforeSave"
|
|
||||||
>
|
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -68,7 +55,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
:label="t('customer.summary.businessType')"
|
:label="t('customer.basicData.businessType')"
|
||||||
:options="businessTypes"
|
:options="businessTypes"
|
||||||
:rules="validate('client.businessTypeFk')"
|
:rules="validate('client.businessTypeFk')"
|
||||||
emit-value
|
emit-value
|
||||||
|
@ -80,13 +67,13 @@ function onBeforeSave(formData, originalData) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('customer.summary.contact')"
|
:label="t('customer.basicData.contact')"
|
||||||
:rules="validate('client.contact')"
|
:rules="validate('client.contact')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.contact"
|
v-model="data.contact"
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.params.email')"
|
:label="t('customer.basicData.email')"
|
||||||
:rules="validate('client.email')"
|
:rules="validate('client.email')"
|
||||||
clearable
|
clearable
|
||||||
type="email"
|
type="email"
|
||||||
|
@ -103,14 +90,13 @@ function onBeforeSave(formData, originalData) {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('customer.extendedList.tableVisibleColumns.phone')"
|
:label="t('customer.basicData.phone')"
|
||||||
:rules="validate('client.phone')"
|
:rules="validate('client.phone')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.phone"
|
v-model="data.phone"
|
||||||
data-cy="customerPhone"
|
|
||||||
/>
|
/>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('customer.summary.mobile')"
|
:label="t('customer.basicData.mobile')"
|
||||||
:rules="validate('client.mobile')"
|
:rules="validate('client.mobile')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.mobile"
|
v-model="data.mobile"
|
||||||
|
@ -120,7 +106,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Workers/search"
|
url="Workers/search"
|
||||||
v-model="data.salesPersonFk"
|
v-model="data.salesPersonFk"
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('customer.basicData.salesPerson')"
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
|
@ -158,7 +144,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
emit-value
|
emit-value
|
||||||
:label="t('customer.summary.contactChannel')"
|
:label="t('customer.basicData.contactChannel')"
|
||||||
map-options
|
map-options
|
||||||
:rules="validate('client.contactChannelFk')"
|
:rules="validate('client.contactChannelFk')"
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
|
@ -169,6 +155,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
url="Clients"
|
url="Clients"
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
:label="t('customer.basicData.previousClient')"
|
:label="t('customer.basicData.previousClient')"
|
||||||
|
:options="clients"
|
||||||
:rules="validate('client.transferorFk')"
|
:rules="validate('client.transferorFk')"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
|
|
@ -28,7 +28,12 @@ const getBankEntities = (data, formData) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FormModel :url-update="`Clients/${route.params.id}`" auto-load model="customer">
|
<FormModel
|
||||||
|
:url-update="`Clients/${route.params.id}`"
|
||||||
|
:url="`Clients/${route.params.id}/getCard`"
|
||||||
|
auto-load
|
||||||
|
model="customer"
|
||||||
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
|
|
@ -93,6 +93,22 @@ const columns = computed(() => [
|
||||||
<WorkerDescriptorProxy :id="row.worker.id" />
|
<WorkerDescriptorProxy :id="row.worker.id" />
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
<!-- <QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
|
:rows="rows"
|
||||||
|
hide-bottom
|
||||||
|
row-key="id"
|
||||||
|
v-model:selected="selected"
|
||||||
|
class="card-width q-px-lg"
|
||||||
|
>
|
||||||
|
<template #body-cell-employee="{ row }">
|
||||||
|
<QTd @click.stop>
|
||||||
|
<span class="link">{{ row.worker.user.nickname }}</span>
|
||||||
|
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -36,13 +36,7 @@ const entityId = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = ref(useCardDescription());
|
const data = ref(useCardDescription());
|
||||||
const setData = (entity) => {
|
const setData = (entity) => (data.value = useCardDescription(entity?.name, entity?.id));
|
||||||
data.value = useCardDescription(entity?.name, entity?.id);
|
|
||||||
if (customer.value) customer.value.webAccess = data.value?.account?.isActive;
|
|
||||||
};
|
|
||||||
const debtWarning = computed(() => {
|
|
||||||
return customer.value?.debt > customer.value?.credit ? 'negative' : 'primary';
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -59,17 +53,11 @@ const debtWarning = computed(() => {
|
||||||
<CustomerDescriptorMenu :customer="entity" />
|
<CustomerDescriptorMenu :customer="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv
|
<VnLv :label="t('customer.card.payMethod')" :value="entity.payMethod.name" />
|
||||||
:label="t('customer.summary.payMethod')"
|
|
||||||
:value="entity.payMethod.name"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
<VnLv :label="t('customer.card.credit')" :value="toCurrency(entity.credit)" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.credit')"
|
:label="t('customer.card.securedCredit')"
|
||||||
:value="toCurrency(entity.credit)"
|
|
||||||
/>
|
|
||||||
<VnLv
|
|
||||||
:label="t('customer.summary.securedCredit')"
|
|
||||||
:value="toCurrency(entity.creditInsurance)"
|
:value="toCurrency(entity.creditInsurance)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -78,7 +66,7 @@ const debtWarning = computed(() => {
|
||||||
:value="toCurrency(entity.debt)"
|
:value="toCurrency(entity.debt)"
|
||||||
:info="t('customer.summary.riskInfo')"
|
:info="t('customer.summary.riskInfo')"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('customer.summary.salesPerson')">
|
<VnLv :label="t('customer.card.salesPerson')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<VnUserLink
|
||||||
v-if="entity.salesPersonUser"
|
v-if="entity.salesPersonUser"
|
||||||
|
@ -89,7 +77,7 @@ const debtWarning = computed(() => {
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.extendedList.tableVisibleColumns.businessTypeFk')"
|
:label="t('customer.card.businessTypeFk')"
|
||||||
:value="entity.businessType.description"
|
:value="entity.businessType.description"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -123,7 +111,7 @@ const debtWarning = computed(() => {
|
||||||
v-if="customer.debt > customer.credit"
|
v-if="customer.debt > customer.credit"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
size="xs"
|
size="xs"
|
||||||
:color="debtWarning"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
@ -180,6 +168,23 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Customer ticket list') }}</QTooltip>
|
<QTooltip>{{ t('Customer ticket list') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:to="{
|
||||||
|
name: 'TicketList',
|
||||||
|
query: {
|
||||||
|
table: JSON.stringify({
|
||||||
|
clientFk: entity.id,
|
||||||
|
}),
|
||||||
|
createForm: JSON.stringify({ clientId: entity.id }),
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
color="primary"
|
||||||
|
target="_blank"
|
||||||
|
icon="vn:ticketAdd"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('New ticket') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'InvoiceOutList',
|
name: 'InvoiceOutList',
|
||||||
|
@ -191,6 +196,23 @@ const debtWarning = computed(() => {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Customer invoice out list') }}</QTooltip>
|
<QTooltip>{{ t('Customer invoice out list') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:to="{
|
||||||
|
name: 'OrderList',
|
||||||
|
query: {
|
||||||
|
table: JSON.stringify({
|
||||||
|
clientFk: entity.id,
|
||||||
|
}),
|
||||||
|
createForm: JSON.stringify({ clientFk: entity.id }),
|
||||||
|
},
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
target="_blank"
|
||||||
|
icon="vn:basketadd"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('New order') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'AccountSummary',
|
name: 'AccountSummary',
|
||||||
|
|
|
@ -6,8 +6,8 @@ import axios from 'axios';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
import useNotify from 'src/composables/useNotify';
|
import useNotify from 'src/composables/useNotify';
|
||||||
|
|
||||||
import VnSmsDialog from 'src/components/common/VnSmsDialog.vue';
|
import VnSmsDialog from 'src/components/common/VnSmsDialog.vue';
|
||||||
import useOpenURL from 'src/composables/useOpenURL';
|
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
customer: {
|
customer: {
|
||||||
|
@ -15,6 +15,7 @@ const $props = defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
@ -24,7 +25,7 @@ const showSmsDialog = () => {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: VnSmsDialog,
|
component: VnSmsDialog,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
phone: $props.customer.mobile || $props.customer.phone,
|
phone: $props.customer.phone || $props.customer.mobile,
|
||||||
promise: sendSms,
|
promise: sendSms,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -39,42 +40,9 @@ const sendSms = async (payload) => {
|
||||||
notify(error.message, 'positive');
|
notify(error.message, 'positive');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const openCreateForm = (type) => {
|
|
||||||
const query = {
|
|
||||||
table: {
|
|
||||||
clientFk: $props.customer.id,
|
|
||||||
},
|
|
||||||
createForm: {
|
|
||||||
addressId: $props.customer.defaultAddressFk,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
const clientFk = {
|
|
||||||
ticket: 'clientId',
|
|
||||||
order: 'clientFk',
|
|
||||||
};
|
|
||||||
const key = clientFk[type];
|
|
||||||
if (!key) return;
|
|
||||||
query.createForm[key] = $props.customer.id;
|
|
||||||
|
|
||||||
const params = Object.entries(query)
|
|
||||||
.map(([key, value]) => `${key}=${JSON.stringify(value)}`)
|
|
||||||
.join('&');
|
|
||||||
useOpenURL(`/#/${type}/list?${params}`);
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QItem v-ripple clickable @click="openCreateForm('ticket')">
|
|
||||||
<QItemSection>
|
|
||||||
{{ t('globals.pageTitles.createTicket') }}
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem v-ripple clickable @click="openCreateForm('order')">
|
|
||||||
<QItemSection>
|
|
||||||
{{ t('globals.pageTitles.createOrder') }}
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -34,6 +34,7 @@ function handleLocation(data, location) {
|
||||||
/>
|
/>
|
||||||
<FormModel
|
<FormModel
|
||||||
:url-update="`Clients/${route.params.id}/updateFiscalData`"
|
:url-update="`Clients/${route.params.id}/updateFiscalData`"
|
||||||
|
:url="`Clients/${route.params.id}/getCard`"
|
||||||
auto-load
|
auto-load
|
||||||
model="customer"
|
model="customer"
|
||||||
>
|
>
|
||||||
|
@ -67,7 +68,6 @@ function handleLocation(data, location) {
|
||||||
option-label="vat"
|
option-label="vat"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.sageTaxTypeFk"
|
v-model="data.sageTaxTypeFk"
|
||||||
data-cy="sageTaxTypeFk"
|
|
||||||
:required="data.isTaxDataChecked"
|
:required="data.isTaxDataChecked"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
@ -76,7 +76,6 @@ function handleLocation(data, location) {
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="transaction"
|
option-label="transaction"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
data-cy="sageTransactionTypeFk"
|
|
||||||
v-model="data.sageTransactionTypeFk"
|
v-model="data.sageTransactionTypeFk"
|
||||||
:required="data.isTaxDataChecked"
|
:required="data.isTaxDataChecked"
|
||||||
>
|
>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
|
||||||
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
import { toCurrency, toPercentage, toDate } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
@ -27,16 +27,21 @@ const $props = defineProps({
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const customer = computed(() => summary.value.entity);
|
const customer = computed(() => summary.value.entity);
|
||||||
const summary = ref();
|
const summary = ref();
|
||||||
const defaulterAmount = computed(() => customer.value.defaulters[0]?.amount);
|
const clientUrl = ref();
|
||||||
const balanceDue = computed(() => {
|
|
||||||
const amount = defaulterAmount.value;
|
onMounted(async () => {
|
||||||
if (!amount || amount < 0) {
|
clientUrl.value = (await getUrl('client/')) + entityId.value + '/';
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return amount;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const balanceDueWarning = computed(() => (defaulterAmount.value ? 'negative' : ''));
|
const balanceDue = computed(() => {
|
||||||
|
return (
|
||||||
|
customer.value &&
|
||||||
|
customer.value.defaulters.length &&
|
||||||
|
customer.value.defaulters[0].amount
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : ''));
|
||||||
|
|
||||||
const claimRate = computed(() => {
|
const claimRate = computed(() => {
|
||||||
return customer.value.claimsRatio?.claimingRate ?? 0;
|
return customer.value.claimsRatio?.claimingRate ?? 0;
|
||||||
|
@ -82,7 +87,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
|
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
|
||||||
<VnLv :value="entity.phone">
|
<VnLv :value="entity.phone">
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ t('customer.extendedList.tableVisibleColumns.phone') }}
|
{{ t('customer.summary.phone') }}
|
||||||
<VnLinkPhone :phone-number="entity.phone" />
|
<VnLinkPhone :phone-number="entity.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
@ -90,18 +95,11 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<template #label>
|
<template #label>
|
||||||
{{ t('customer.summary.mobile') }}
|
{{ t('customer.summary.mobile') }}
|
||||||
<VnLinkPhone :phone-number="entity.mobile" />
|
<VnLinkPhone :phone-number="entity.mobile" />
|
||||||
<VnLinkPhone
|
|
||||||
say-simple
|
|
||||||
:phone-number="entity.mobile"
|
|
||||||
:channel="entity.country?.saySimpleCountry?.channel"
|
|
||||||
class="q-ml-xs"
|
|
||||||
:country="entity.country?.code"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="entity.email" copy
|
<VnLv :value="entity.email" copy
|
||||||
><template #label>
|
><template #label>
|
||||||
{{ t('globals.params.email') }}
|
{{ t('customer.summary.email') }}
|
||||||
<VnLinkMail email="entity.email"></VnLinkMail> </template
|
<VnLinkMail email="entity.email"></VnLinkMail> </template
|
||||||
></VnLv>
|
></VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -144,7 +142,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnLv
|
<VnLv
|
||||||
v-if="entity.country"
|
v-if="entity.country"
|
||||||
:label="t('customer.summary.country')"
|
:label="t('customer.summary.country')"
|
||||||
:value="entity.country.name"
|
:value="entity.country.country"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -215,7 +213,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:value="entity.defaultAddress.city"
|
:value="entity.defaultAddress.city"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.street')"
|
:label="t('customer.summary.addressStreet')"
|
||||||
:value="entity.defaultAddress.street"
|
:value="entity.defaultAddress.street"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -301,7 +299,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
<VnLv
|
<VnLv
|
||||||
v-if="entity.defaulters"
|
v-if="entity.defaulters"
|
||||||
:label="t('customer.summary.balanceDue')"
|
:label="t('customer.summary.balanceDue')"
|
||||||
:value="dashOrCurrency(balanceDue)()"
|
:value="toCurrency(balanceDue)"
|
||||||
:class="balanceDueWarning"
|
:class="balanceDueWarning"
|
||||||
:info="t('customer.summary.balanceDueInfo')"
|
:info="t('customer.summary.balanceDueInfo')"
|
||||||
/>
|
/>
|
||||||
|
@ -321,7 +319,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:value="entity.recommendedCredit"
|
:value="entity.recommendedCredit"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-one">
|
||||||
<VnTitle :text="t('Latest tickets')" />
|
<VnTitle :text="t('Latest tickets')" />
|
||||||
<CustomerSummaryTable />
|
<CustomerSummaryTable />
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -1,82 +1,165 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { computed, onBeforeMount, ref, watch, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import axios from 'axios';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import useNotify from 'src/composables/useNotify';
|
||||||
const formModelRef = ref(false);
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
const amountInputRef = ref(null);
|
const amountInputRef = ref(null);
|
||||||
|
const initialDated = Date.vnNew();
|
||||||
|
const unpaidClient = ref(false);
|
||||||
|
const isLoading = ref(false);
|
||||||
|
const amount = ref(null);
|
||||||
|
const dated = ref(initialDated);
|
||||||
|
|
||||||
const initialData = ref({
|
const initialData = ref({
|
||||||
dated: Date.vnNew(),
|
dated: initialDated,
|
||||||
amount: null,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const filterClientFindOne = {
|
const hasChanged = computed(() => {
|
||||||
fields: ['unpaid', 'dated', 'amount'],
|
return (
|
||||||
where: {
|
initialData.value.dated !== dated.value ||
|
||||||
clientFk: route.params.id,
|
initialData.value.amount !== amount.value
|
||||||
},
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
getData(route.params.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
getData(newValue);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getData = async (id) => {
|
||||||
|
const filter = { where: { clientFk: id } };
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get('ClientUnpaids', {
|
||||||
|
params: { filter: JSON.stringify(filter) },
|
||||||
|
});
|
||||||
|
if (data.length) {
|
||||||
|
setValues(data[0]);
|
||||||
|
} else {
|
||||||
|
defaultValues();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
defaultValues();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const setValues = (data) => {
|
||||||
|
unpaidClient.value = true;
|
||||||
|
amount.value = data.amount;
|
||||||
|
dated.value = data.dated;
|
||||||
|
initialData.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultValues = () => {
|
||||||
|
unpaidClient.value = false;
|
||||||
|
initialData.value.amount = null;
|
||||||
|
setInitialData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const setInitialData = () => {
|
||||||
|
amount.value = initialData.value.amount;
|
||||||
|
dated.value = initialData.value.dated;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmit = async () => {
|
||||||
|
isLoading.value = true;
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
amount: amount.value,
|
||||||
|
clientFk: route.params.id,
|
||||||
|
dated: dated.value,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
await axios.patch('ClientUnpaids', payload);
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
|
unpaidClient.value = true;
|
||||||
|
} catch (error) {
|
||||||
|
notify('errors.writeRequest', 'negative');
|
||||||
|
} finally {
|
||||||
|
isLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => unpaidClient.value,
|
||||||
|
async (val) => {
|
||||||
|
await nextTick();
|
||||||
|
if (val) amountInputRef.value.focus();
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<Teleport v-if="stateStore?.isSubToolbarShown()" to="#st-actions">
|
||||||
:filter="filterClientFindOne"
|
<QBtnGroup push class="q-gutter-x-sm">
|
||||||
auto-load
|
<QBtn
|
||||||
url="ClientUnpaids"
|
:disabled="!hasChanged"
|
||||||
@on-fetch="
|
:label="t('globals.reset')"
|
||||||
(data) => {
|
:loading="isLoading"
|
||||||
const unpaid = data.length == 1;
|
@click="setInitialData"
|
||||||
initialData = { ...data[0], unpaid };
|
color="primary"
|
||||||
}
|
flat
|
||||||
"
|
icon="restart_alt"
|
||||||
/>
|
type="reset"
|
||||||
<QCard>
|
/>
|
||||||
<FormModel
|
<QBtn
|
||||||
v-if="'unpaid' in initialData"
|
:disabled="!hasChanged"
|
||||||
:observe-form-changes="false"
|
:label="t('globals.save')"
|
||||||
ref="formModelRef"
|
:loading="isLoading"
|
||||||
model="unpaid"
|
@click="onSubmit"
|
||||||
url-update="ClientUnpaids"
|
color="primary"
|
||||||
:mapper="(formData) => ({ ...formData, clientFk: route.params.id })"
|
icon="save"
|
||||||
:form-initial-data="initialData"
|
/>
|
||||||
>
|
</QBtnGroup>
|
||||||
<template #form="{ data }">
|
</Teleport>
|
||||||
|
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QCard class="card-width q-pa-lg">
|
||||||
|
<QForm>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QCheckbox :label="t('Unpaid client')" v-model="data.unpaid" />
|
<div class="col">
|
||||||
|
<QCheckbox :label="t('Unpaid client')" v-model="unpaidClient" />
|
||||||
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md" v-show="data.unpaid">
|
<VnRow class="row q-gutter-md q-mb-md" v-show="unpaidClient">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInputDate
|
<VnInputDate :label="t('Date')" v-model="dated" />
|
||||||
data-cy="customerUnpaidDate"
|
|
||||||
:label="t('Date')"
|
|
||||||
v-model="data.dated"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInputNumber
|
<VnInput
|
||||||
data-cy="customerUnpaidAmount"
|
|
||||||
ref="amountInputRef"
|
ref="amountInputRef"
|
||||||
:label="t('Amount')"
|
:label="t('Amount')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.amount"
|
type="number"
|
||||||
|
v-model="amount"
|
||||||
autofocus
|
autofocus
|
||||||
>
|
>
|
||||||
<template #append>€</template></VnInputNumber
|
<template #append>€</template></VnInput
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</QForm>
|
||||||
</FormModel>
|
</QCard>
|
||||||
</QCard>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -25,9 +25,10 @@ async function hasCustomerRole() {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
|
url="VnUsers/preview"
|
||||||
:url-update="`Clients/${route.params.id}/updateUser`"
|
:url-update="`Clients/${route.params.id}/updateUser`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
model="customer"
|
model="webAccess"
|
||||||
:mapper="
|
:mapper="
|
||||||
({ active, name, email }) => {
|
({ active, name, email }) => {
|
||||||
return {
|
return {
|
||||||
|
@ -41,14 +42,14 @@ async function hasCustomerRole() {
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<QCheckbox :label="t('Enable web access')" v-model="data.account.active" />
|
<QCheckbox :label="t('Enable web access')" v-model="data.active" />
|
||||||
<VnInput :label="t('User')" clearable v-model="data.account.name" />
|
<VnInput :label="t('User')" clearable v-model="data.name" />
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Recovery email')"
|
:label="t('Recovery email')"
|
||||||
:rules="validate('client.email')"
|
:rules="validate('client.email')"
|
||||||
clearable
|
clearable
|
||||||
type="email"
|
type="email"
|
||||||
v-model="data.account.email"
|
v-model="data.email"
|
||||||
class="q-mt-sm"
|
class="q-mt-sm"
|
||||||
:info="t('This email is used for user to regain access their account')"
|
:info="t('This email is used for user to regain access their account')"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, onBeforeMount, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import axios from 'axios';
|
||||||
|
|
||||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||||
|
|
||||||
|
@ -20,11 +20,10 @@ const filter = {
|
||||||
{ relation: 'mandateType', scope: { fields: ['id', 'name'] } },
|
{ relation: 'mandateType', scope: { fields: ['id', 'name'] } },
|
||||||
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||||
],
|
],
|
||||||
where: { clientFk: route.params.id },
|
where: { clientFk: null },
|
||||||
order: ['created DESC'],
|
order: ['created DESC'],
|
||||||
limit: 20,
|
limit: 20,
|
||||||
};
|
};
|
||||||
const ClientDmsRef = ref(false);
|
|
||||||
|
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
state: {
|
state: {
|
||||||
|
@ -51,7 +50,7 @@ const tableColumnComponents = {
|
||||||
component: CustomerCheckIconTooltip,
|
component: CustomerCheckIconTooltip,
|
||||||
props: ({ row }) => ({
|
props: ({ row }) => ({
|
||||||
transaction: row,
|
transaction: row,
|
||||||
promise: () => ClientDmsRef.value.fetch(),
|
promise: refreshData,
|
||||||
}),
|
}),
|
||||||
event: () => {},
|
event: () => {},
|
||||||
},
|
},
|
||||||
|
@ -90,45 +89,72 @@ const columns = computed(() => [
|
||||||
name: 'validate',
|
name: 'validate',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
getData(route.params.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
getData(newValue);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getData = async (id) => {
|
||||||
|
filter.where.clientFk = id;
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get('clients/transactions', {
|
||||||
|
params: { filter: JSON.stringify(filter) },
|
||||||
|
});
|
||||||
|
rows.value = data;
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const refreshData = () => {
|
||||||
|
getData(route.params.id);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<div class="full-width flex justify-center">
|
||||||
ref="ClientDmsRef"
|
<QPage class="card-width q-pa-lg">
|
||||||
:filter="filter"
|
<QTable
|
||||||
@on-fetch="(data) => (rows = data)"
|
:columns="columns"
|
||||||
auto-load
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
url="Clients/transactions"
|
:rows="rows"
|
||||||
/>
|
class="full-width q-mt-md"
|
||||||
<QPage class="card-width q-pa-lg">
|
row-key="id"
|
||||||
<QTable
|
v-if="rows?.length"
|
||||||
:columns="columns"
|
>
|
||||||
:pagination="{ rowsPerPage: 12 }"
|
<template #body-cell="props">
|
||||||
:rows="rows"
|
<QTd :props="props">
|
||||||
class="full-width q-mt-md"
|
<QTr :props="props">
|
||||||
row-key="id"
|
<component
|
||||||
v-if="rows?.length"
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
>
|
@click="
|
||||||
<template #body-cell="props">
|
tableColumnComponents[props.col.name].event(props)
|
||||||
<QTd :props="props">
|
"
|
||||||
<QTr :props="props">
|
class="rounded-borders q-pa-sm"
|
||||||
<component
|
v-bind="
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
tableColumnComponents[props.col.name].props(props)
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
"
|
||||||
class="rounded-borders q-pa-sm"
|
>
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
{{ props.value }}
|
||||||
>
|
</component>
|
||||||
{{ props.value }}
|
</QTr>
|
||||||
</component>
|
</QTd>
|
||||||
</QTr>
|
</template>
|
||||||
</QTd>
|
</QTable>
|
||||||
</template>
|
|
||||||
</QTable>
|
|
||||||
|
|
||||||
<h5 class="flex justify-center color-vn-label" v-else>
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
{{ t('globals.noResults') }}
|
{{ t('globals.noResults') }}
|
||||||
</h5>
|
</h5>
|
||||||
</QPage>
|
</QPage>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -11,24 +11,10 @@ defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const handleSalesModelValue = (val) => ({
|
|
||||||
or: [
|
|
||||||
{ id: val },
|
|
||||||
{ name: val },
|
|
||||||
{ nickname: { like: '%' + val + '%' } },
|
|
||||||
{ code: { like: `${val}%` } },
|
|
||||||
],
|
|
||||||
});
|
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
|
||||||
return {
|
|
||||||
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
|
|
||||||
};
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnFilterPanel :data-key="dataKey" :search-button="true">
|
<VnFilterPanel :data-key="dataKey" :search-button="true" search-url="table">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||||
|
@ -48,7 +34,7 @@ const exprBuilder = (param, value) => {
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('globals.name')"
|
:label="t('customerFilter.filter.name')"
|
||||||
v-model="params.name"
|
v-model="params.name"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -57,7 +43,7 @@ const exprBuilder = (param, value) => {
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('customer.summary.socialName')"
|
:label="t('customerFilter.filter.socialName')"
|
||||||
v-model="params.socialName"
|
v-model="params.socialName"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -66,18 +52,14 @@ const exprBuilder = (param, value) => {
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Workers/search"
|
url="Workers/activeWithInheritedRole"
|
||||||
:params="{
|
:filter="{ where: { role: 'salesPerson' } }"
|
||||||
departmentCodes: ['VT'],
|
|
||||||
}"
|
|
||||||
auto-load
|
auto-load
|
||||||
:label="t('Salesperson')"
|
:label="t('Salesperson')"
|
||||||
:expr-builder="exprBuilder"
|
|
||||||
v-model="params.salesPersonFk"
|
v-model="params.salesPersonFk"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
sort-by="nickname ASC"
|
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
use-input
|
use-input
|
||||||
|
@ -86,23 +68,12 @@ const exprBuilder = (param, value) => {
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
/>
|
||||||
<template #option="{ itemProps, opt }">
|
|
||||||
<QItem v-bind="itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption>
|
|
||||||
{{ opt.nickname }},{{ opt.code }}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template></VnSelect
|
|
||||||
>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection
|
||||||
<VnSelect
|
><VnSelect
|
||||||
url="Provinces"
|
url="Provinces"
|
||||||
:label="t('Province')"
|
:label="t('Province')"
|
||||||
v-model="params.provinceFk"
|
v-model="params.provinceFk"
|
||||||
|
@ -120,31 +91,32 @@ const exprBuilder = (param, value) => {
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-md">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput :label="t('City')" v-model="params.city" is-outlined />
|
<VnInput :label="t('City')" v-model="params.city" is-outlined />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QSeparator />
|
||||||
<QItemSection>
|
<QExpansionItem :label="t('More options')" expand-separator>
|
||||||
<VnInput :label="t('Phone')" v-model="params.phone" is-outlined>
|
<QItem>
|
||||||
<template #prepend>
|
<QItemSection>
|
||||||
<QIcon name="phone" size="xs" />
|
<VnInput :label="t('Phone')" v-model="params.phone" is-outlined>
|
||||||
</template>
|
<template #prepend>
|
||||||
</VnInput>
|
<QIcon name="phone" size="xs" />
|
||||||
</QItemSection>
|
</template>
|
||||||
</QItem>
|
</VnInput>
|
||||||
<QItem class="q-mb-sm">
|
</QItemSection>
|
||||||
<QItemSection>
|
</QItem>
|
||||||
<VnInput :label="t('Email')" v-model="params.email" is-outlined>
|
<QItem>
|
||||||
<template #prepend>
|
<QItemSection>
|
||||||
<QIcon name="email" size="sm" />
|
<VnInput :label="t('Email')" v-model="params.email" is-outlined>
|
||||||
</template>
|
<template #prepend>
|
||||||
</VnInput>
|
<QIcon name="email" size="sm" />
|
||||||
</QItemSection>
|
</template>
|
||||||
</QItem>
|
</VnInput>
|
||||||
<QItem class="q-mb-sm">
|
</QItemSection>
|
||||||
<QItemSection>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Zones"
|
url="Zones"
|
||||||
:label="t('Zone')"
|
:label="t('Zone')"
|
||||||
|
@ -159,17 +131,18 @@ const exprBuilder = (param, value) => {
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
auto-load
|
auto-load
|
||||||
/></QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem class="q-mb-sm">
|
|
||||||
<QItemSection>
|
|
||||||
<VnInput
|
|
||||||
:label="t('Postcode')"
|
|
||||||
v-model="params.postcode"
|
|
||||||
is-outlined
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItem>
|
||||||
</QItem>
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
:label="t('Postcode')"
|
||||||
|
v-model="params.postcode"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</QExpansionItem>
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
@ -201,6 +174,7 @@ es:
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
Province: Provincia
|
Province: Provincia
|
||||||
City: Ciudad
|
City: Ciudad
|
||||||
|
More options: Más opciones
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
Email: Email
|
Email: Email
|
||||||
Zone: Zona
|
Zone: Zona
|
||||||
|
|
|
@ -12,7 +12,6 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import CustomerFilter from './CustomerFilter.vue';
|
import CustomerFilter from './CustomerFilter.vue';
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -78,7 +77,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.credit'),
|
label: t('customer.extendedList.tableVisibleColumns.credit'),
|
||||||
name: 'credit',
|
name: 'credit',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
@ -116,7 +115,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.mobile'),
|
label: t('customer.extendedList.tableVisibleColumns.mobile'),
|
||||||
name: 'mobile',
|
name: 'mobile',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
@ -163,17 +162,17 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.city'),
|
label: t('customer.extendedList.tableVisibleColumns.city'),
|
||||||
name: 'city',
|
name: 'city',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.postcode'),
|
label: t('customer.extendedList.tableVisibleColumns.postcode'),
|
||||||
name: 'postcode',
|
name: 'postcode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('globals.params.email'),
|
label: t('customer.extendedList.tableVisibleColumns.email'),
|
||||||
name: 'email',
|
name: 'email',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
@ -208,7 +207,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.payMethodFk'),
|
label: t('customer.extendedList.tableVisibleColumns.payMethodFk'),
|
||||||
name: 'payMethodFk',
|
name: 'payMethodFk',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
@ -251,7 +250,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.isActive'),
|
label: t('customer.extendedList.tableVisibleColumns.isActive'),
|
||||||
name: 'isActive',
|
name: 'isActive',
|
||||||
chip: {
|
chip: {
|
||||||
color: null,
|
color: null,
|
||||||
|
@ -280,7 +279,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.isEqualizated'),
|
label: t('customer.extendedList.tableVisibleColumns.isEqualizated'),
|
||||||
name: 'isEqualizated',
|
name: 'isEqualizated',
|
||||||
create: true,
|
create: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
@ -326,7 +325,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.hasLcr'),
|
label: t('customer.extendedList.tableVisibleColumns.hasLcr'),
|
||||||
name: 'hasLcr',
|
name: 'hasLcr',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -334,7 +333,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.summary.hasCoreVnl'),
|
label: t('customer.extendedList.tableVisibleColumns.hasCoreVnl'),
|
||||||
name: 'hasCoreVnl',
|
name: 'hasCoreVnl',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -395,16 +394,16 @@ function handleLocation(data, location) {
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
:info="t('You can search by customer id or name')"
|
:info="t('You can search by customer id or name')"
|
||||||
:label="t('Search customer')"
|
:label="t('Search customer')"
|
||||||
data-key="CustomerList"
|
data-key="Customer"
|
||||||
/>
|
/>
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
<CustomerFilter data-key="CustomerList" />
|
<CustomerFilter data-key="Customer" />
|
||||||
</template>
|
</template>
|
||||||
</RightMenu>
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="CustomerList"
|
data-key="Customer"
|
||||||
url="Clients/filter"
|
url="Clients/filter"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Clients/createWithUser',
|
urlCreate: 'Clients/createWithUser',
|
||||||
|
@ -425,7 +424,7 @@ function handleLocation(data, location) {
|
||||||
<VnSelect
|
<VnSelect
|
||||||
url="Workers/search"
|
url="Workers/search"
|
||||||
v-model="data.salesPersonFk"
|
v-model="data.salesPersonFk"
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('customer.basicData.salesPerson')"
|
||||||
:params="{
|
:params="{
|
||||||
departmentCodes: ['VT', 'shopping'],
|
departmentCodes: ['VT', 'shopping'],
|
||||||
}"
|
}"
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { onBeforeMount, reactive, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -18,10 +19,26 @@ const router = useRouter();
|
||||||
|
|
||||||
const formInitialData = reactive({ isDefaultAddress: false });
|
const formInitialData = reactive({ isDefaultAddress: false });
|
||||||
|
|
||||||
|
const urlCreate = ref('');
|
||||||
|
|
||||||
const agencyModes = ref([]);
|
const agencyModes = ref([]);
|
||||||
const incoterms = ref([]);
|
const incoterms = ref([]);
|
||||||
const customsAgents = ref([]);
|
const customsAgents = ref([]);
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
urlCreate.value = `Clients/${route.params.id}/createAddress`;
|
||||||
|
getCustomsAgents();
|
||||||
|
});
|
||||||
|
|
||||||
|
const getCustomsAgents = async () => {
|
||||||
|
const { data } = await axios.get('CustomsAgents');
|
||||||
|
customsAgents.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const refreshData = () => {
|
||||||
|
getCustomsAgents();
|
||||||
|
};
|
||||||
|
|
||||||
const toCustomerAddress = () => {
|
const toCustomerAddress = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'CustomerAddress',
|
name: 'CustomerAddress',
|
||||||
|
@ -37,19 +54,9 @@ function handleLocation(data, location) {
|
||||||
data.provinceFk = provinceFk;
|
data.provinceFk = provinceFk;
|
||||||
data.countryFk = countryFk;
|
data.countryFk = countryFk;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAgentCreated({ id, fiscalName }, data) {
|
|
||||||
customsAgents.value.push({ id, fiscalName });
|
|
||||||
data.customsAgentFk = id;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
@on-fetch="(data) => (customsAgents = data)"
|
|
||||||
auto-load
|
|
||||||
url="CustomsAgents"
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
@on-fetch="(data) => (agencyModes = data)"
|
@on-fetch="(data) => (agencyModes = data)"
|
||||||
auto-load
|
auto-load
|
||||||
|
@ -60,7 +67,7 @@ function onAgentCreated({ id, fiscalName }, data) {
|
||||||
<FormModel
|
<FormModel
|
||||||
:form-initial-data="formInitialData"
|
:form-initial-data="formInitialData"
|
||||||
:observe-form-changes="false"
|
:observe-form-changes="false"
|
||||||
:url-create="`Clients/${route.params.id}/createAddress`"
|
:url-create="urlCreate"
|
||||||
@on-data-saved="toCustomerAddress()"
|
@on-data-saved="toCustomerAddress()"
|
||||||
model="client"
|
model="client"
|
||||||
>
|
>
|
||||||
|
@ -132,7 +139,6 @@ function onAgentCreated({ id, fiscalName }, data) {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<VnSelectDialog
|
<VnSelectDialog
|
||||||
url="CustomsAgents"
|
|
||||||
:label="t('Customs agent')"
|
:label="t('Customs agent')"
|
||||||
:options="customsAgents"
|
:options="customsAgents"
|
||||||
hide-selected
|
hide-selected
|
||||||
|
@ -142,11 +148,7 @@ function onAgentCreated({ id, fiscalName }, data) {
|
||||||
:tooltip="t('Create a new expense')"
|
:tooltip="t('Create a new expense')"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CustomerNewCustomsAgent
|
<CustomerNewCustomsAgent @on-data-saved="refreshData()" />
|
||||||
@on-data-saved="
|
|
||||||
(requestResponse) => onAgentCreated(requestResponse, data)
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</VnSelectDialog>
|
</VnSelectDialog>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue