Merge branch 'dev' of https: refs #8602//gitea.verdnatura.es/verdnatura/salix-front into 8602-refatorAndCreateEntry
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
0127df6738
|
@ -120,6 +120,8 @@ pipeline {
|
||||||
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
||||||
|
|
||||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||||
|
sh "docker-compose ${env.COMPOSE_PARAMS} pull back"
|
||||||
|
sh "docker-compose ${env.COMPOSE_PARAMS} pull db"
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||||
|
|
||||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
||||||
|
|
12
README.md
12
README.md
|
@ -32,6 +32,18 @@ pnpm run test:front
|
||||||
pnpm run test:e2e
|
pnpm run test:e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Run e2e parallel
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm run test:e2e:parallel
|
||||||
|
```
|
||||||
|
|
||||||
|
### View e2e parallel report
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm run test:e2e:summary
|
||||||
|
```
|
||||||
|
|
||||||
### Build the app for production
|
### Build the app for production
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -25,6 +25,8 @@ RUN apt-get update \
|
||||||
libnss3 \
|
libnss3 \
|
||||||
libxss1 \
|
libxss1 \
|
||||||
libxtst6 \
|
libxtst6 \
|
||||||
|
mesa-vulkan-drivers \
|
||||||
|
vulkan-tools \
|
||||||
xauth \
|
xauth \
|
||||||
xvfb \
|
xvfb \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
|
||||||
"test:e2e": "cypress open",
|
"test:e2e": "cypress open",
|
||||||
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
||||||
"test:e2e:parallel": "bash ./test/cypress/cypressParallel.sh",
|
"test:e2e:parallel": "bash ./test/cypress/run.sh",
|
||||||
"test:e2e:summary": "bash ./test/cypress/summary.sh",
|
"test:e2e:summary": "bash ./test/cypress/summary.sh",
|
||||||
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
||||||
"test:front": "vitest",
|
"test:front": "vitest",
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
"eslint-plugin-cypress": "^4.1.0",
|
"eslint-plugin-cypress": "^4.1.0",
|
||||||
"eslint-plugin-vue": "^9.32.0",
|
"eslint-plugin-vue": "^9.32.0",
|
||||||
"husky": "^8.0.0",
|
"husky": "^8.0.0",
|
||||||
|
"junit-merge": "^2.0.0",
|
||||||
"mocha": "^11.1.0",
|
"mocha": "^11.1.0",
|
||||||
"postcss": "^8.4.23",
|
"postcss": "^8.4.23",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.4.2",
|
||||||
|
|
|
@ -91,6 +91,9 @@ devDependencies:
|
||||||
husky:
|
husky:
|
||||||
specifier: ^8.0.0
|
specifier: ^8.0.0
|
||||||
version: 8.0.3
|
version: 8.0.3
|
||||||
|
junit-merge:
|
||||||
|
specifier: ^2.0.0
|
||||||
|
version: 2.0.0
|
||||||
mocha:
|
mocha:
|
||||||
specifier: ^11.1.0
|
specifier: ^11.1.0
|
||||||
version: 11.1.0
|
version: 11.1.0
|
||||||
|
@ -4860,6 +4863,10 @@ packages:
|
||||||
universalify: 2.0.1
|
universalify: 2.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/fs-readdir-recursive@1.1.0:
|
||||||
|
resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/fs.realpath@1.0.0:
|
/fs.realpath@1.0.0:
|
||||||
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
|
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
|
||||||
|
|
||||||
|
@ -5640,6 +5647,16 @@ packages:
|
||||||
verror: 1.10.0
|
verror: 1.10.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/junit-merge@2.0.0:
|
||||||
|
resolution: {integrity: sha512-qwENzBWcdHPazNqPO0fKyFIqEyaSKyO0iyBeIU4Y/scjkXYpwTi88P2S/PWecqgMhzG2MOCwXk8QB9ucvXeIPw==}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
commander: 2.20.3
|
||||||
|
fs-readdir-recursive: 1.1.0
|
||||||
|
mkdirp: 0.5.6
|
||||||
|
xmldoc: 1.3.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
/keyv@4.5.4:
|
/keyv@4.5.4:
|
||||||
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -6037,7 +6054,6 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
minimist: 1.2.8
|
minimist: 1.2.8
|
||||||
dev: false
|
|
||||||
|
|
||||||
/mlly@1.7.4:
|
/mlly@1.7.4:
|
||||||
resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}
|
resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}
|
||||||
|
@ -7253,6 +7269,10 @@ packages:
|
||||||
resolution: {integrity: sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==}
|
resolution: {integrity: sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/sax@1.4.1:
|
||||||
|
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/scheduler@0.25.0:
|
/scheduler@0.25.0:
|
||||||
resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==}
|
resolution: {integrity: sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -8689,6 +8709,12 @@ packages:
|
||||||
engines: {node: '>=4.0'}
|
engines: {node: '>=4.0'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/xmldoc@1.3.0:
|
||||||
|
resolution: {integrity: sha512-y7IRWW6PvEnYQZNZFMRLNJw+p3pezM4nKYPfr15g4OOW9i8VpeydycFuipE2297OvZnh3jSb2pxOt9QpkZUVng==}
|
||||||
|
dependencies:
|
||||||
|
sax: 1.4.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
/xunit-viewer@10.6.1(@babel/runtime@7.26.9)(@codemirror/autocomplete@6.18.6)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.3)(codemirror@6.0.1)(react-dom@19.0.0)(react@19.0.0):
|
/xunit-viewer@10.6.1(@babel/runtime@7.26.9)(@codemirror/autocomplete@6.18.6)(@codemirror/language@6.10.8)(@codemirror/lint@6.8.4)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.36.3)(codemirror@6.0.1)(react-dom@19.0.0)(react@19.0.0):
|
||||||
resolution: {integrity: sha512-ZMprLPVhCQJf2KD56tv2hlOjc4T+KnUe1E9DkEBHnuliOq7IOXWJf61pxyBMo/7H83B7Ln0DIeWNMMbx/3I7Jg==}
|
resolution: {integrity: sha512-ZMprLPVhCQJf2KD56tv2hlOjc4T+KnUe1E9DkEBHnuliOq7IOXWJf61pxyBMo/7H83B7Ln0DIeWNMMbx/3I7Jg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
|
@ -188,7 +188,7 @@ const selectItem = ({ id }) => {
|
||||||
>
|
>
|
||||||
<template #body-cell-id="{ row }">
|
<template #body-cell-id="{ row }">
|
||||||
<QTd auto-width @click.stop>
|
<QTd auto-width @click.stop>
|
||||||
<QBtn flat color="blue">{{ row.id }}</QBtn>
|
<QBtn flat class="link">{{ row.id }}</QBtn>
|
||||||
<ItemDescriptorProxy :id="row.id" />
|
<ItemDescriptorProxy :id="row.id" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -196,7 +196,7 @@ const selectTravel = ({ id }) => {
|
||||||
>
|
>
|
||||||
<template #body-cell-id="{ row }">
|
<template #body-cell-id="{ row }">
|
||||||
<QTd auto-width @click.stop data-cy="travelFk-travel-form">
|
<QTd auto-width @click.stop data-cy="travelFk-travel-form">
|
||||||
<QBtn flat color="blue">{{ row.id }}</QBtn>
|
<QBtn flat class="link">{{ row.id }}</QBtn>
|
||||||
<TravelDescriptorProxy :id="row.id" />
|
<TravelDescriptorProxy :id="row.id" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -77,6 +77,7 @@ watch(
|
||||||
function findMatches(search, item) {
|
function findMatches(search, item) {
|
||||||
const matches = [];
|
const matches = [];
|
||||||
function findRoute(search, item) {
|
function findRoute(search, item) {
|
||||||
|
if (!item?.children) return;
|
||||||
for (const child of item.children) {
|
for (const child of item.children) {
|
||||||
if (search?.indexOf(child.name) > -1) {
|
if (search?.indexOf(child.name) > -1) {
|
||||||
matches.push(child);
|
matches.push(child);
|
||||||
|
@ -92,7 +93,7 @@ function findMatches(search, item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addChildren(module, route, parent) {
|
function addChildren(module, route, parent) {
|
||||||
const menus = route?.meta?.menu ?? route?.menus?.[props.source]; //backwards compatible
|
const menus = route?.meta?.menu;
|
||||||
if (!menus) return;
|
if (!menus) return;
|
||||||
|
|
||||||
const matches = findMatches(menus, route);
|
const matches = findMatches(menus, route);
|
||||||
|
@ -107,11 +108,7 @@ function getRoutes() {
|
||||||
main: getMainRoutes,
|
main: getMainRoutes,
|
||||||
card: getCardRoutes,
|
card: getCardRoutes,
|
||||||
};
|
};
|
||||||
try {
|
|
||||||
handleRoutes[props.source]();
|
handleRoutes[props.source]();
|
||||||
} catch (error) {
|
|
||||||
throw new Error(`Method is not defined`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function getMainRoutes() {
|
function getMainRoutes() {
|
||||||
const modules = Object.assign([], navigation.getModules().value);
|
const modules = Object.assign([], navigation.getModules().value);
|
||||||
|
@ -122,7 +119,6 @@ function getMainRoutes() {
|
||||||
);
|
);
|
||||||
if (!moduleDef) continue;
|
if (!moduleDef) continue;
|
||||||
item.children = [];
|
item.children = [];
|
||||||
|
|
||||||
addChildren(item.module, moduleDef, item.children);
|
addChildren(item.module, moduleDef, item.children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,21 +128,16 @@ function getMainRoutes() {
|
||||||
function getCardRoutes() {
|
function getCardRoutes() {
|
||||||
const currentRoute = route.matched[1];
|
const currentRoute = route.matched[1];
|
||||||
const currentModule = toLowerCamel(currentRoute.name);
|
const currentModule = toLowerCamel(currentRoute.name);
|
||||||
let moduleDef = routes.find((route) => toLowerCamel(route.name) === currentModule);
|
let moduleDef;
|
||||||
|
|
||||||
if (!moduleDef) return;
|
|
||||||
if (!moduleDef?.menus) moduleDef = betaGetRoutes();
|
|
||||||
addChildren(currentModule, moduleDef, items.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function betaGetRoutes() {
|
|
||||||
let menuRoute;
|
|
||||||
let index = route.matched.length - 1;
|
let index = route.matched.length - 1;
|
||||||
while (!menuRoute && index > 0) {
|
while (!moduleDef && index > 0) {
|
||||||
if (route.matched[index]?.meta?.menu) menuRoute = route.matched[index];
|
if (route.matched[index]?.meta?.menu) moduleDef = route.matched[index];
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
return menuRoute;
|
|
||||||
|
if (!moduleDef) return;
|
||||||
|
addChildren(currentModule, moduleDef, items.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function togglePinned(item, event) {
|
async function togglePinned(item, event) {
|
||||||
|
|
|
@ -28,6 +28,17 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
{{ t('ticketSale.reserved') }}
|
{{ t('ticketSale.reserved') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="row?.isDeleted"
|
||||||
|
color="primary"
|
||||||
|
name="vn:deletedTicket"
|
||||||
|
size="xs"
|
||||||
|
data-cy="ticketDeletedIcon"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Ticket deleted') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.hasRisk"
|
v-if="row?.hasRisk"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputTime from 'components/common/VnInputTime.vue';
|
import VnInputTime from 'components/common/VnInputTime.vue';
|
||||||
|
import VnCheckbox from 'components/common/VnCheckbox.vue';
|
||||||
import VnColumn from 'components/VnTable/VnColumn.vue';
|
import VnColumn from 'components/VnTable/VnColumn.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -106,7 +107,7 @@ const components = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
checkbox: {
|
checkbox: {
|
||||||
component: markRaw(QCheckbox),
|
component: markRaw(VnCheckbox),
|
||||||
event: updateEvent,
|
event: updateEvent,
|
||||||
attrs: {
|
attrs: {
|
||||||
class: $props.showTitle ? 'q-py-sm' : 'q-px-md q-py-xs fit',
|
class: $props.showTitle ? 'q-py-sm' : 'q-px-md q-py-xs fit',
|
||||||
|
|
|
@ -919,12 +919,24 @@ const rowCtrlClickFunction = computed(() => {
|
||||||
:row-index="index"
|
:row-index="index"
|
||||||
>
|
>
|
||||||
<VnColumn
|
<VnColumn
|
||||||
:column="col"
|
:column="{
|
||||||
|
...col,
|
||||||
|
disable:
|
||||||
|
col?.component ===
|
||||||
|
'checkbox'
|
||||||
|
? true
|
||||||
|
: false,
|
||||||
|
}"
|
||||||
:row="row"
|
:row="row"
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
v-model="row[col.name]"
|
v-model="row[col.name]"
|
||||||
component-prop="columnField"
|
component-prop="columnField"
|
||||||
:show-label="true"
|
:show-label="
|
||||||
|
col?.component ===
|
||||||
|
'checkbox'
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</slot>
|
</slot>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -15,10 +15,7 @@ vi.mock('src/router/modules', () => ({
|
||||||
meta: {
|
meta: {
|
||||||
title: 'customers',
|
title: 'customers',
|
||||||
icon: 'vn:client',
|
icon: 'vn:client',
|
||||||
},
|
menu: ['CustomerList', 'CustomerCreate'],
|
||||||
menus: {
|
|
||||||
main: ['CustomerList', 'CustomerCreate'],
|
|
||||||
card: ['CustomerBasicData'],
|
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -50,14 +47,6 @@ vi.mock('src/router/modules', () => ({
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'create',
|
|
||||||
name: 'CustomerCreate',
|
|
||||||
meta: {
|
|
||||||
title: 'createCustomer',
|
|
||||||
icon: 'vn:addperson',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -98,7 +87,7 @@ vi.spyOn(vueRouter, 'useRoute').mockReturnValue({
|
||||||
icon: 'vn:client',
|
icon: 'vn:client',
|
||||||
moduleName: 'Customer',
|
moduleName: 'Customer',
|
||||||
keyBinding: 'c',
|
keyBinding: 'c',
|
||||||
menu: 'customer',
|
menu: ['customer'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -260,15 +249,6 @@ describe('Leftmenu as main', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle a single matched route with a menu', () => {
|
|
||||||
const route = {
|
|
||||||
matched: [{ meta: { menu: 'customer' } }],
|
|
||||||
};
|
|
||||||
|
|
||||||
const result = vm.betaGetRoutes();
|
|
||||||
|
|
||||||
expect(result.meta.menu).toEqual(route.matched[0].meta.menu);
|
|
||||||
});
|
|
||||||
it('should get routes for main source', () => {
|
it('should get routes for main source', () => {
|
||||||
vm.props.source = 'main';
|
vm.props.source = 'main';
|
||||||
vm.getRoutes();
|
vm.getRoutes();
|
||||||
|
@ -351,8 +331,9 @@ describe('addChildren', () => {
|
||||||
|
|
||||||
it('should handle routes with no meta menu', () => {
|
it('should handle routes with no meta menu', () => {
|
||||||
const route = {
|
const route = {
|
||||||
meta: {},
|
meta: {
|
||||||
menus: {},
|
menu: [],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const parent = [];
|
const parent = [];
|
||||||
|
|
|
@ -54,7 +54,7 @@ const $props = defineProps({
|
||||||
default: 'table',
|
default: 'table',
|
||||||
},
|
},
|
||||||
redirect: {
|
redirect: {
|
||||||
type: Boolean,
|
type: [String, Boolean],
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
arrayData: {
|
arrayData: {
|
||||||
|
|
|
@ -186,7 +186,7 @@ function fetchData([data]) {
|
||||||
ref="vnPaginateRef"
|
ref="vnPaginateRef"
|
||||||
class="show"
|
class="show"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
search-url="notes"
|
:search-url="false"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
newNote.text = '';
|
newNote.text = '';
|
||||||
newNote.observationTypeFk = null;
|
newNote.observationTypeFk = null;
|
||||||
|
|
|
@ -9,6 +9,8 @@ export function getColAlign(col) {
|
||||||
case 'number':
|
case 'number':
|
||||||
align = 'right';
|
align = 'right';
|
||||||
break;
|
break;
|
||||||
|
case 'time':
|
||||||
|
case 'date':
|
||||||
case 'checkbox':
|
case 'checkbox':
|
||||||
align = 'center';
|
align = 'center';
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -15,6 +15,7 @@ body.body--light {
|
||||||
--vn-empty-tag: #acacac;
|
--vn-empty-tag: #acacac;
|
||||||
--vn-black-text-color: black;
|
--vn-black-text-color: black;
|
||||||
--vn-text-color-contrast: white;
|
--vn-text-color-contrast: white;
|
||||||
|
--vn-link-color: #1e90ff;
|
||||||
|
|
||||||
background-color: var(--vn-page-color);
|
background-color: var(--vn-page-color);
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ body.body--dark {
|
||||||
--vn-empty-tag: #2d2d2d;
|
--vn-empty-tag: #2d2d2d;
|
||||||
--vn-black-text-color: black;
|
--vn-black-text-color: black;
|
||||||
--vn-text-color-contrast: black;
|
--vn-text-color-contrast: black;
|
||||||
|
--vn-link-color: #66bfff;
|
||||||
|
|
||||||
background-color: var(--vn-page-color);
|
background-color: var(--vn-page-color);
|
||||||
|
|
||||||
|
@ -49,7 +51,7 @@ a {
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
color: $color-link;
|
color: var(--vn-link-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&--white {
|
&--white {
|
||||||
|
@ -58,14 +60,14 @@ a {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tx-color-link {
|
.tx-color-link {
|
||||||
color: $color-link !important;
|
color: var(--vn-link-color) !important;
|
||||||
}
|
}
|
||||||
.tx-color-font {
|
.tx-color-font {
|
||||||
color: $color-link !important;
|
color: var(--vn-link-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-link {
|
.header-link {
|
||||||
color: $color-link !important;
|
color: var(--vn-link-color) !important;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: solid $primary;
|
border-bottom: solid $primary;
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
|
|
|
@ -24,7 +24,6 @@ $alert: $negative;
|
||||||
$white: #fff;
|
$white: #fff;
|
||||||
$dark: #3d3d3d;
|
$dark: #3d3d3d;
|
||||||
// custom
|
// custom
|
||||||
$color-link: #66bfff;
|
|
||||||
$color-spacer-light: #a3a3a31f;
|
$color-spacer-light: #a3a3a31f;
|
||||||
$color-spacer: #7979794d;
|
$color-spacer: #7979794d;
|
||||||
$border-thin-light: 1px solid $color-spacer-light;
|
$border-thin-light: 1px solid $color-spacer-light;
|
||||||
|
|
|
@ -99,7 +99,6 @@ globals:
|
||||||
file: File
|
file: File
|
||||||
selectFile: Select a file
|
selectFile: Select a file
|
||||||
copyClipboard: Copy on clipboard
|
copyClipboard: Copy on clipboard
|
||||||
salesPerson: SalesPerson
|
|
||||||
send: Send
|
send: Send
|
||||||
code: Code
|
code: Code
|
||||||
since: Since
|
since: Since
|
||||||
|
@ -158,7 +157,9 @@ globals:
|
||||||
changeState: Change state
|
changeState: Change state
|
||||||
raid: 'Raid {daysInForward} days'
|
raid: 'Raid {daysInForward} days'
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
|
department: Department
|
||||||
noData: No data available
|
noData: No data available
|
||||||
|
vehicle: Vehicle
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
@ -346,7 +347,6 @@ globals:
|
||||||
params:
|
params:
|
||||||
description: Description
|
description: Description
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
salesPersonFk: Sales person
|
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
stateFk: State
|
stateFk: State
|
||||||
|
@ -531,6 +531,7 @@ ticket:
|
||||||
customerCard: Customer card
|
customerCard: Customer card
|
||||||
ticketList: Ticket List
|
ticketList: Ticket List
|
||||||
newOrder: New Order
|
newOrder: New Order
|
||||||
|
ticketClaimed: Claimed ticket
|
||||||
boxing:
|
boxing:
|
||||||
expedition: Expedition
|
expedition: Expedition
|
||||||
created: Created
|
created: Created
|
||||||
|
@ -603,7 +604,6 @@ worker:
|
||||||
balance: Balance
|
balance: Balance
|
||||||
medical: Medical
|
medical: Medical
|
||||||
list:
|
list:
|
||||||
department: Department
|
|
||||||
schedule: Schedule
|
schedule: Schedule
|
||||||
newWorker: New worker
|
newWorker: New worker
|
||||||
summary:
|
summary:
|
||||||
|
@ -862,7 +862,6 @@ components:
|
||||||
mine: For me
|
mine: For me
|
||||||
hasMinPrice: Minimum price
|
hasMinPrice: Minimum price
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Buyer
|
|
||||||
supplierFk: Supplier
|
supplierFk: Supplier
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
|
|
|
@ -103,7 +103,6 @@ globals:
|
||||||
file: Fichero
|
file: Fichero
|
||||||
selectFile: Seleccione un fichero
|
selectFile: Seleccione un fichero
|
||||||
copyClipboard: Copiar en portapapeles
|
copyClipboard: Copiar en portapapeles
|
||||||
salesPerson: Comercial
|
|
||||||
send: Enviar
|
send: Enviar
|
||||||
code: Código
|
code: Código
|
||||||
since: Desde
|
since: Desde
|
||||||
|
@ -163,6 +162,8 @@ globals:
|
||||||
raid: 'Redada {daysInForward} días'
|
raid: 'Redada {daysInForward} días'
|
||||||
isVies: Vies
|
isVies: Vies
|
||||||
noData: Datos no disponibles
|
noData: Datos no disponibles
|
||||||
|
department: Departamento
|
||||||
|
vehicle: Vehículo
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
@ -349,7 +350,6 @@ globals:
|
||||||
params:
|
params:
|
||||||
description: Descripción
|
description: Descripción
|
||||||
clientFk: Id cliente
|
clientFk: Id cliente
|
||||||
salesPersonFk: Comercial
|
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
provinceFk: Provincia
|
provinceFk: Provincia
|
||||||
stateFk: Estado
|
stateFk: Estado
|
||||||
|
@ -531,13 +531,13 @@ ticket:
|
||||||
state: Estado
|
state: Estado
|
||||||
shipped: Enviado
|
shipped: Enviado
|
||||||
landed: Entregado
|
landed: Entregado
|
||||||
salesPerson: Comercial
|
|
||||||
total: Total
|
total: Total
|
||||||
card:
|
card:
|
||||||
customerId: ID cliente
|
customerId: ID cliente
|
||||||
customerCard: Ficha del cliente
|
customerCard: Ficha del cliente
|
||||||
ticketList: Listado de tickets
|
ticketList: Listado de tickets
|
||||||
newOrder: Nuevo pedido
|
newOrder: Nuevo pedido
|
||||||
|
ticketClaimed: Ticket reclamado
|
||||||
boxing:
|
boxing:
|
||||||
expedition: Expedición
|
expedition: Expedición
|
||||||
created: Creado
|
created: Creado
|
||||||
|
@ -622,8 +622,6 @@ invoiceOut:
|
||||||
errors:
|
errors:
|
||||||
downloadCsvFailed: Error al descargar CSV
|
downloadCsvFailed: Error al descargar CSV
|
||||||
order:
|
order:
|
||||||
field:
|
|
||||||
salesPersonFk: Comercial
|
|
||||||
form:
|
form:
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
addressFk: Dirección
|
addressFk: Dirección
|
||||||
|
@ -691,7 +689,6 @@ worker:
|
||||||
formation: Formación
|
formation: Formación
|
||||||
medical: Mutua
|
medical: Mutua
|
||||||
list:
|
list:
|
||||||
department: Departamento
|
|
||||||
schedule: Horario
|
schedule: Horario
|
||||||
newWorker: Nuevo trabajador
|
newWorker: Nuevo trabajador
|
||||||
summary:
|
summary:
|
||||||
|
@ -949,7 +946,6 @@ components:
|
||||||
hasMinPrice: Precio mínimo
|
hasMinPrice: Precio mínimo
|
||||||
wareHouseFk: Almacén
|
wareHouseFk: Almacén
|
||||||
# LatestBuysFilter
|
# LatestBuysFilter
|
||||||
salesPersonFk: Comprador
|
|
||||||
supplierFk: Proveedor
|
supplierFk: Proveedor
|
||||||
visible: Visible
|
visible: Visible
|
||||||
active: Activo
|
active: Activo
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -27,13 +28,10 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
<template #body="{ entity: alias }">
|
<template #body="{ entity: alias }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<router-link
|
<VnTitle
|
||||||
:to="{ name: 'AliasBasicData', params: { id: entityId } }"
|
:url="`#/account/alias/${entityId}/basic-data`"
|
||||||
class="header header-link"
|
:text="t('globals.summary.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.summary.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('role.id')" :value="alias.id" />
|
<VnLv :label="t('role.id')" :value="alias.id" />
|
||||||
<VnLv :label="t('role.description')" :value="alias.description" />
|
<VnLv :label="t('role.description')" :value="alias.description" />
|
||||||
|
|
|
@ -5,6 +5,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import filter from './AccountFilter.js';
|
import filter from './AccountFilter.js';
|
||||||
import AccountDescriptorMenu from './AccountDescriptorMenu.vue';
|
import AccountDescriptorMenu from './AccountDescriptorMenu.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const $props = defineProps({ id: { type: Number, default: 0 } });
|
const $props = defineProps({ id: { type: Number, default: 0 } });
|
||||||
|
|
||||||
|
@ -26,13 +27,10 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<router-link
|
<VnTitle
|
||||||
:to="{ name: 'AccountBasicData', params: { id: entityId } }"
|
:url="`#/account/${entityId}/basic-data`"
|
||||||
class="header header-link"
|
:text="$t('globals.pageTitles.basicData')"
|
||||||
>
|
/>
|
||||||
{{ $t('globals.pageTitles.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="$t('account.card.nickname')" :value="entity.name" />
|
<VnLv :label="$t('account.card.nickname')" :value="entity.name" />
|
||||||
<VnLv :label="$t('account.card.role')" :value="entity.role?.name" />
|
<VnLv :label="$t('account.card.role')" :value="entity.role?.name" />
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -29,13 +30,10 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/account/role/${entityId}/basic-data`"
|
||||||
:href="`#/VnUser/${entityId}/basic-data`"
|
:text="$t('globals.pageTitles.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.pageTitles.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('role.id')" :value="entity.id" />
|
<VnLv :label="t('role.id')" :value="entity.id" />
|
||||||
<VnLv :label="t('globals.name')" :value="entity.name" />
|
<VnLv :label="t('globals.name')" :value="entity.name" />
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { toDateHourMinSec, toPercentage } from 'src/filters';
|
import { toDateHourMinSec, toPercentage } from 'src/filters';
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
@ -65,12 +66,12 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('claim.created')" :value="toDateHourMinSec(entity.created)" />
|
<VnLv :label="t('claim.created')" :value="toDateHourMinSec(entity.created)" />
|
||||||
<VnLv :label="t('claim.commercial')">
|
<VnLv :label="t('globals.department')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link">
|
||||||
:name="entity.client?.salesPersonUser?.name"
|
{{ entity?.client?.department?.name || '-' }}
|
||||||
:worker-id="entity.client?.salesPersonFk"
|
<DepartmentDescriptorProxy :id="entity?.client?.departmentFk" />
|
||||||
/>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default {
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
include: [
|
include: [
|
||||||
{ relation: 'salesPersonUser' },
|
{ relation: 'department' },
|
||||||
{
|
{
|
||||||
relation: 'claimsRatio',
|
relation: 'claimsRatio',
|
||||||
scope: {
|
scope: {
|
||||||
|
|
|
@ -117,7 +117,7 @@ const selected = ref([]);
|
||||||
const mana = ref(0);
|
const mana = ref(0);
|
||||||
async function fetchMana() {
|
async function fetchMana() {
|
||||||
const ticketId = claim.value.ticketFk;
|
const ticketId = claim.value.ticketFk;
|
||||||
const response = await axios.get(`Tickets/${ticketId}/getSalesPersonMana`);
|
const response = await axios.get(`Tickets/${ticketId}/getDepartmentMana`);
|
||||||
mana.value = response.data;
|
mana.value = response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import ClaimDescriptorMenu from './ClaimDescriptorMenu.vue';
|
import ClaimDescriptorMenu from './ClaimDescriptorMenu.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -252,13 +253,15 @@ function claimUrl(section) {
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
v-if="$route.name != 'ClaimSummary'"
|
v-if="$route.name != 'ClaimSummary'"
|
||||||
:label="t('globals.salesPerson')"
|
:label="t('customer.summary.team')"
|
||||||
>
|
>
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link">
|
||||||
:name="claim.client?.salesPersonUser?.name"
|
{{ claim?.client?.department?.name || '-' }}
|
||||||
:worker-id="claim.client?.salesPersonFk"
|
<DepartmentDescriptorProxy
|
||||||
|
:id="claim?.client?.departmentFk"
|
||||||
/>
|
/>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.attendedBy')">
|
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.attendedBy')">
|
||||||
|
@ -271,7 +274,7 @@ function claimUrl(section) {
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.customer')">
|
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.customer')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link cursor-pointer">
|
<span class="link">
|
||||||
{{ claim.client?.name }}
|
{{ claim.client?.name }}
|
||||||
<CustomerDescriptorProxy :id="claim.clientFk" />
|
<CustomerDescriptorProxy :id="claim.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -80,7 +80,7 @@ const columns = [
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
:disable-option="{ card: true, table: true }"
|
:disable-option="{ card: true, table: true }"
|
||||||
search-url="actions"
|
:search-url="false"
|
||||||
:filter="{ where: { claimFk: $props.id } }"
|
:filter="{ where: { claimFk: $props.id } }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:limit="0"
|
:limit="0"
|
||||||
|
|
|
@ -44,15 +44,14 @@ const props = defineProps({
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Salesperson')"
|
|
||||||
v-model="params.salesPersonFk"
|
|
||||||
url="Workers/activeWithInheritedRole"
|
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
|
||||||
:use-like="false"
|
|
||||||
option-filter="firstName"
|
|
||||||
dense
|
|
||||||
outlined
|
outlined
|
||||||
|
dense
|
||||||
rounded
|
rounded
|
||||||
|
:label="t('globals.params.departmentFk')"
|
||||||
|
v-model="params.departmentFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
url="Departments"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('claim.attendedBy')"
|
:label="t('claim.attendedBy')"
|
||||||
|
@ -126,7 +125,6 @@ en:
|
||||||
search: Contains
|
search: Contains
|
||||||
clientFk: Customer
|
clientFk: Customer
|
||||||
clientName: Customer
|
clientName: Customer
|
||||||
salesPersonFk: Salesperson
|
|
||||||
attenderFk: Attender
|
attenderFk: Attender
|
||||||
claimResponsibleFk: Responsible
|
claimResponsibleFk: Responsible
|
||||||
claimStateFk: State
|
claimStateFk: State
|
||||||
|
@ -139,7 +137,6 @@ es:
|
||||||
search: Contiene
|
search: Contiene
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
clientName: Cliente
|
clientName: Cliente
|
||||||
salesPersonFk: Comercial
|
|
||||||
attenderFk: Asistente
|
attenderFk: Asistente
|
||||||
claimResponsibleFk: Responsable
|
claimResponsibleFk: Responsable
|
||||||
claimStateFk: Estado
|
claimStateFk: Estado
|
||||||
|
@ -148,6 +145,5 @@ es:
|
||||||
itemFk: Artículo
|
itemFk: Artículo
|
||||||
zoneFk: Zona
|
zoneFk: Zona
|
||||||
Client Name: Nombre del cliente
|
Client Name: Nombre del cliente
|
||||||
Salesperson: Comercial
|
|
||||||
Item: Artículo
|
Item: Artículo
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { toDate } from 'filters/index';
|
import { toDate } from 'filters/index';
|
||||||
import ClaimFilter from './ClaimFilter.vue';
|
import ClaimFilter from './ClaimFilter.vue';
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import ClaimSummary from './Card/ClaimSummary.vue';
|
import ClaimSummary from './Card/ClaimSummary.vue';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
@ -48,6 +49,20 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'departmentFk',
|
||||||
|
label: t('customer.summary.team'),
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Departments',
|
||||||
|
},
|
||||||
|
create: true,
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('claim.attendedBy'),
|
label: t('claim.attendedBy'),
|
||||||
|
@ -152,6 +167,12 @@ const STATE_COLOR = {
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-departmentFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.departmentName || '-' }}
|
||||||
|
<DepartmentDescriptorProxy :id="row?.departmentFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #column-attendedBy="{ row }">
|
<template #column-attendedBy="{ row }">
|
||||||
<span @click.stop>
|
<span @click.stop>
|
||||||
<VnUserLink :name="row.workerName" :worker-id="row.workerFk" />
|
<VnUserLink :name="row.workerName" :worker-id="row.workerFk" />
|
||||||
|
|
|
@ -8,7 +8,6 @@ import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
|
||||||
import { getDifferences, getUpdatedValues } from 'src/filters';
|
import { getDifferences, getUpdatedValues } from 'src/filters';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -37,7 +36,7 @@ const exprBuilder = (param, value) => {
|
||||||
function onBeforeSave(formData, originalData) {
|
function onBeforeSave(formData, originalData) {
|
||||||
return getUpdatedValues(
|
return getUpdatedValues(
|
||||||
Object.keys(getDifferences(formData, originalData)),
|
Object.keys(getDifferences(formData, originalData)),
|
||||||
formData
|
formData,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -119,16 +118,11 @@ function onBeforeSave(formData, originalData) {
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelectWorker
|
<VnSelect
|
||||||
:label="t('customer.summary.salesPerson')"
|
:label="t('globals.department')"
|
||||||
v-model="data.salesPersonFk"
|
v-model="data.departmentFk"
|
||||||
:params="{
|
url="Departments"
|
||||||
departmentCodes: ['VT', 'shopping'],
|
:fields="['id', 'name']"
|
||||||
}"
|
|
||||||
:has-avatar="true"
|
|
||||||
:rules="validate('client.salesPersonFk')"
|
|
||||||
:expr-builder="exprBuilder"
|
|
||||||
emit-value
|
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.contactChannelFk"
|
v-model="data.contactChannelFk"
|
||||||
|
@ -160,7 +154,7 @@ function onBeforeSave(formData, originalData) {
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>{{
|
<QTooltip>{{
|
||||||
t(
|
t(
|
||||||
'In case of a company succession, specify the grantor company'
|
'In case of a company succession, specify the grantor company',
|
||||||
)
|
)
|
||||||
}}</QTooltip>
|
}}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
|
@ -3,14 +3,14 @@ import { onMounted, ref, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
import { toCurrency, toDate } from 'src/filters';
|
||||||
|
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|
||||||
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
const state = useState();
|
const state = useState();
|
||||||
|
|
||||||
|
@ -84,14 +84,10 @@ 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('globals.department')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link" v-text="entity.department?.name" />
|
||||||
v-if="entity.salesPersonUser"
|
<DepartmentDescriptorProxy :id="entity.department?.id" />
|
||||||
:name="entity.salesPersonUser.name"
|
|
||||||
:worker-id="entity.salesPersonFk"
|
|
||||||
/>
|
|
||||||
<span v-else>{{ dashIfEmpty(entity.salesPersonUser) }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
|
|
@ -86,12 +86,12 @@ const tableColumnComponents = {
|
||||||
},
|
},
|
||||||
file: {
|
file: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
props: () => ({ flat: true }),
|
||||||
event: ({ row }) => downloadFile(row.dmsFk),
|
event: ({ row }) => downloadFile(row.dmsFk),
|
||||||
},
|
},
|
||||||
employee: {
|
employee: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
props: () => ({ flat: true }),
|
||||||
event: () => {},
|
event: () => {},
|
||||||
},
|
},
|
||||||
created: {
|
created: {
|
||||||
|
@ -214,8 +214,17 @@ const toCustomerFileManagementCreate = () => {
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
v-bind="tableColumnComponents[props.col.name].props(props)"
|
||||||
>
|
>
|
||||||
<template v-if="props.col.name !== 'original'">
|
<template v-if="props.col.name !== 'original'">
|
||||||
|
<span
|
||||||
|
:class="{
|
||||||
|
link:
|
||||||
|
props.col.name === 'employee' ||
|
||||||
|
props.col.name === 'file',
|
||||||
|
}"
|
||||||
|
>
|
||||||
{{ props.value }}
|
{{ props.value }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<WorkerDescriptorProxy
|
<WorkerDescriptorProxy
|
||||||
:id="props.row.dms.workerFk"
|
:id="props.row.dms.workerFk"
|
||||||
v-if="props.col.name === 'employee'"
|
v-if="props.col.name === 'employee'"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|
||||||
|
|
||||||
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
|
@ -13,6 +12,8 @@ import CustomerSummaryTable from 'src/pages/Customer/components/CustomerSummaryT
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import VnRow from 'src/components/ui/VnRow.vue';
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const grafanaUrl = 'https://grafana.verdnatura.es';
|
const grafanaUrl = 'https://grafana.verdnatura.es';
|
||||||
|
@ -106,16 +107,12 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
{{ t('globals.params.email') }}
|
{{ t('globals.params.email') }}
|
||||||
<VnLinkMail email="entity.email"></VnLinkMail> </template
|
<VnLinkMail email="entity.email"></VnLinkMail> </template
|
||||||
></VnLv>
|
></VnLv>
|
||||||
<VnLv
|
<VnLv :label="t('globals.department')">
|
||||||
:label="t('customer.summary.salesPerson')"
|
|
||||||
:value="entity?.salesPersonUser?.name"
|
|
||||||
>
|
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link" v-text="entity.department?.name" />
|
||||||
:name="entity.salesPersonUser?.name"
|
<DepartmentDescriptorProxy :id="entity?.department?.id" />
|
||||||
:worker-id="entity.salesPersonFk"
|
</template>
|
||||||
/> </template
|
</VnLv>
|
||||||
></VnLv>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.contactChannel')"
|
:label="t('customer.summary.contactChannel')"
|
||||||
:value="entity?.contactChannel?.name"
|
:value="entity?.contactChannel?.name"
|
||||||
|
|
|
@ -1,146 +0,0 @@
|
||||||
<script setup>
|
|
||||||
import { reactive, ref } from 'vue';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
|
|
||||||
const initialData = reactive({
|
|
||||||
active: true,
|
|
||||||
isEqualizated: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
const workersOptions = ref([]);
|
|
||||||
const businessTypesOptions = ref([]);
|
|
||||||
|
|
||||||
function handleLocation(data, location) {
|
|
||||||
const { town, code, provinceFk, countryFk } = location ?? {};
|
|
||||||
data.postcode = code;
|
|
||||||
data.city = town;
|
|
||||||
data.provinceFk = provinceFk;
|
|
||||||
data.countryFk = countryFk;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<FetchData
|
|
||||||
@on-fetch="(data) => (workersOptions = data)"
|
|
||||||
auto-load
|
|
||||||
url="Workers/search?departmentCodes"
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
@on-fetch="(data) => (businessTypesOptions = data)"
|
|
||||||
auto-load
|
|
||||||
url="BusinessTypes"
|
|
||||||
/>
|
|
||||||
<QPage>
|
|
||||||
<VnSubToolbar />
|
|
||||||
<FormModel
|
|
||||||
:form-initial-data="initialData"
|
|
||||||
model="client"
|
|
||||||
url-create="Clients/createWithUser"
|
|
||||||
>
|
|
||||||
<template #form="{ data, validate }">
|
|
||||||
<VnRow>
|
|
||||||
<QInput :label="t('Comercial name')" v-model="data.name" />
|
|
||||||
<VnSelect
|
|
||||||
:label="t('Salesperson')"
|
|
||||||
:options="workersOptions"
|
|
||||||
hide-selected
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
|
||||||
<VnSelect
|
|
||||||
:label="t('Business type')"
|
|
||||||
:options="businessTypesOptions"
|
|
||||||
hide-selected
|
|
||||||
option-label="description"
|
|
||||||
option-value="code"
|
|
||||||
v-model="data.businessTypeFk"
|
|
||||||
/>
|
|
||||||
<QInput v-model="data.fi" :label="t('Tax number')" />
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
|
||||||
<QInput
|
|
||||||
:label="t('Business name')"
|
|
||||||
:rules="validate('client.socialName')"
|
|
||||||
v-model="data.socialName"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
|
||||||
<QInput
|
|
||||||
:label="t('Street')"
|
|
||||||
:rules="validate('client.street')"
|
|
||||||
v-model="data.street"
|
|
||||||
/>
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
|
||||||
<VnLocation
|
|
||||||
:rules="validate('Worker.postcode')"
|
|
||||||
:acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]"
|
|
||||||
v-model="data.location"
|
|
||||||
@update:model-value="(location) => handleLocation(data, location)"
|
|
||||||
>
|
|
||||||
</VnLocation>
|
|
||||||
</VnRow>
|
|
||||||
|
|
||||||
<VnRow>
|
|
||||||
<QInput v-model="data.userName" :label="t('Web user')" />
|
|
||||||
<QInput
|
|
||||||
:label="t('Email')"
|
|
||||||
:rules="validate('client.email')"
|
|
||||||
clearable
|
|
||||||
type="email"
|
|
||||||
v-model="data.email"
|
|
||||||
>
|
|
||||||
<template #append>
|
|
||||||
<QIcon name="info" class="cursor-info">
|
|
||||||
<QTooltip max-width="400px">{{
|
|
||||||
t('customer.basicData.youCanSaveMultipleEmails')
|
|
||||||
}}</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</template>
|
|
||||||
</QInput>
|
|
||||||
</VnRow>
|
|
||||||
<QCheckbox
|
|
||||||
:label="t('Is equalizated')"
|
|
||||||
v-model="initialData.isEqualizated"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</FormModel>
|
|
||||||
</QPage>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.card {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
grid-gap: 20px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
Comercial name: Nombre comercial
|
|
||||||
Salesperson: Comercial
|
|
||||||
Business type: Tipo de negocio
|
|
||||||
Tax number: NIF / CIF
|
|
||||||
Business name: Razón social
|
|
||||||
Street: Dirección fiscal
|
|
||||||
Postcode: Código postal
|
|
||||||
City: Población
|
|
||||||
Province: Provincia
|
|
||||||
Country: País
|
|
||||||
Web user: Usuario web
|
|
||||||
Email: Email
|
|
||||||
Is equalizated: Recargo de equivalencia
|
|
||||||
</i18n>
|
|
|
@ -3,7 +3,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
defineProps({
|
defineProps({
|
||||||
|
@ -65,22 +64,15 @@ const exprBuilder = (param, value) => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectWorker
|
<VnSelect
|
||||||
:label="t('Salesperson')"
|
|
||||||
v-model="params.salesPersonFk"
|
|
||||||
:params="{
|
|
||||||
departmentCodes: ['VT'],
|
|
||||||
}"
|
|
||||||
:expr-builder="exprBuilder"
|
|
||||||
@update:model-value="searchFn()"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
hide-selected
|
|
||||||
dense
|
|
||||||
outlined
|
outlined
|
||||||
|
dense
|
||||||
rounded
|
rounded
|
||||||
:input-debounce="0"
|
:label="t('globals.params.departmentFk')"
|
||||||
|
v-model="params.departmentFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
url="Departments"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -164,7 +156,6 @@ en:
|
||||||
params:
|
params:
|
||||||
search: Contains
|
search: Contains
|
||||||
fi: FI
|
fi: FI
|
||||||
salesPersonFk: Salesperson
|
|
||||||
provinceFk: Province
|
provinceFk: Province
|
||||||
isActive: Is active
|
isActive: Is active
|
||||||
city: City
|
city: City
|
||||||
|
@ -191,7 +182,6 @@ es:
|
||||||
sageTaxTypeFk: Tipo de impuesto Sage
|
sageTaxTypeFk: Tipo de impuesto Sage
|
||||||
sageTransactionTypeFk: Tipo de impuesto Sage
|
sageTransactionTypeFk: Tipo de impuesto Sage
|
||||||
payMethodFk: Forma de pago
|
payMethodFk: Forma de pago
|
||||||
salesPersonFk: Comercial
|
|
||||||
provinceFk: Provincia
|
provinceFk: Provincia
|
||||||
city: Ciudad
|
city: Ciudad
|
||||||
phone: Teléfono
|
phone: Teléfono
|
||||||
|
@ -201,7 +191,6 @@ es:
|
||||||
name: Nombre
|
name: Nombre
|
||||||
postcode: CP
|
postcode: CP
|
||||||
FI: NIF
|
FI: NIF
|
||||||
Salesperson: Comercial
|
|
||||||
Province: Provincia
|
Province: Provincia
|
||||||
City: Ciudad
|
City: Ciudad
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
|
|
|
@ -10,7 +10,6 @@ import CustomerFilter from './CustomerFilter.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -73,30 +72,17 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'salesPersonFk',
|
name: 'departmentFk',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Departments',
|
||||||
fields: ['id', 'name', 'firstName'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
optionFilter: 'firstName',
|
|
||||||
},
|
},
|
||||||
columnFilter: {
|
create: true,
|
||||||
component: 'select',
|
|
||||||
attrs: {
|
|
||||||
url: 'Workers/activeWithInheritedRole',
|
|
||||||
fields: ['id', 'name', 'firstName'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
optionLabel: 'firstName',
|
|
||||||
optionValue: 'id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
create: false,
|
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -155,6 +141,9 @@ const columns = computed(() => [
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
|
attrs: {
|
||||||
|
uppercase: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -446,36 +435,6 @@ function handleLocation(data, location) {
|
||||||
redirect="customer"
|
redirect="customer"
|
||||||
>
|
>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnSelectWorker
|
|
||||||
:label="t('customer.summary.salesPerson')"
|
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
:params="{
|
|
||||||
departmentCodes: ['VT', 'shopping'],
|
|
||||||
}"
|
|
||||||
:has-avatar="true"
|
|
||||||
:id-value="data.salesPersonFk"
|
|
||||||
emit-value
|
|
||||||
auto-load
|
|
||||||
>
|
|
||||||
<template #prepend>
|
|
||||||
<VnAvatar
|
|
||||||
:worker-id="data.salesPersonFk"
|
|
||||||
color="primary"
|
|
||||||
:title="title"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #option="scope">
|
|
||||||
<QItem v-bind="scope.itemProps">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
|
||||||
<QItemLabel caption
|
|
||||||
>{{ scope.opt?.nickname }},
|
|
||||||
{{ scope.opt?.code }}</QItemLabel
|
|
||||||
>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</template>
|
|
||||||
</VnSelectWorker>
|
|
||||||
<VnLocation
|
<VnLocation
|
||||||
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
||||||
v-model="data.location"
|
v-model="data.location"
|
||||||
|
|
|
@ -32,28 +32,6 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'isWorker',
|
|
||||||
label: t('Is worker'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'salesPersonFk',
|
|
||||||
label: t('Salesperson'),
|
|
||||||
columnFilter: {
|
|
||||||
component: 'select',
|
|
||||||
attrs: {
|
|
||||||
url: 'Workers/activeWithInheritedRole',
|
|
||||||
fields: ['id', 'name'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
useLike: false,
|
|
||||||
optionValue: 'id',
|
|
||||||
optionLabel: 'name',
|
|
||||||
optionFilter: 'firstName',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'departmentFk',
|
name: 'departmentFk',
|
||||||
|
@ -153,6 +131,11 @@ const columns = computed(() => [
|
||||||
label: t('Has recovery'),
|
label: t('Has recovery'),
|
||||||
name: 'hasRecovery',
|
name: 'hasRecovery',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'isWorker',
|
||||||
|
label: t('customer.params.isWorker'),
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const viewAddObservation = (rowsSelected) => {
|
const viewAddObservation = (rowsSelected) => {
|
||||||
|
@ -167,7 +150,6 @@ const viewAddObservation = (rowsSelected) => {
|
||||||
|
|
||||||
function exprBuilder(param, value) {
|
function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'salesPersonFk':
|
|
||||||
case 'creditInsurance':
|
case 'creditInsurance':
|
||||||
case 'countryFk':
|
case 'countryFk':
|
||||||
return { [`c.${param}`]: value };
|
return { [`c.${param}`]: value };
|
||||||
|
@ -176,7 +158,7 @@ function exprBuilder(param, value) {
|
||||||
case 'workerFk':
|
case 'workerFk':
|
||||||
return { [`co.${param}`]: value };
|
return { [`co.${param}`]: value };
|
||||||
case 'departmentFk':
|
case 'departmentFk':
|
||||||
return { [`wd.${param}`]: value };
|
return { [`c.${param}`]: value };
|
||||||
case 'amount':
|
case 'amount':
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
return { [`d.${param}`]: value };
|
return { [`d.${param}`]: value };
|
||||||
|
@ -241,12 +223,6 @@ function exprBuilder(param, value) {
|
||||||
<template #column-observation="{ row }">
|
<template #column-observation="{ row }">
|
||||||
<VnInput type="textarea" v-model="row.observation" readonly dense rows="2" />
|
<VnInput type="textarea" v-model="row.observation" readonly dense rows="2" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-salesPersonFk="{ row }">
|
|
||||||
<span class="link" @click.stop>
|
|
||||||
{{ row.salesPersonName }}
|
|
||||||
<WorkerDescriptorProxy :id="row.salesPersonFk" />
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
<template #column-departmentFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.departmentName }}
|
{{ row.departmentName }}
|
||||||
|
@ -265,8 +241,6 @@ function exprBuilder(param, value) {
|
||||||
es:
|
es:
|
||||||
Add observation: Añadir observación
|
Add observation: Añadir observación
|
||||||
Client: Cliente
|
Client: Cliente
|
||||||
Is worker: Es trabajador
|
|
||||||
Salesperson: Comercial
|
|
||||||
Department: Departamento
|
Department: Departamento
|
||||||
Country: País
|
Country: País
|
||||||
P. Method: F. Pago
|
P. Method: F. Pago
|
||||||
|
@ -281,5 +255,5 @@ es:
|
||||||
Credit I.: Crédito A.
|
Credit I.: Crédito A.
|
||||||
Credit insurance: Crédito asegurado
|
Credit insurance: Crédito asegurado
|
||||||
From: Desde
|
From: Desde
|
||||||
Has recovery: Tiene recobro
|
Has recovery: Recobro
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -15,19 +15,12 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const salespersons = ref();
|
|
||||||
const countries = ref();
|
const countries = ref();
|
||||||
const authors = ref();
|
const authors = ref();
|
||||||
const departments = ref();
|
const departments = ref();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
:filter="{ where: { role: 'salesPerson' } }"
|
|
||||||
@on-fetch="(data) => (salespersons = data)"
|
|
||||||
auto-load
|
|
||||||
url="Workers/activeWithInheritedRole"
|
|
||||||
/>
|
|
||||||
<FetchData @on-fetch="(data) => (countries = data)" auto-load url="Countries" />
|
<FetchData @on-fetch="(data) => (countries = data)" auto-load url="Countries" />
|
||||||
<FetchData
|
<FetchData
|
||||||
@on-fetch="(data) => (authors = data)"
|
@on-fetch="(data) => (authors = data)"
|
||||||
|
@ -62,29 +55,6 @@ const departments = ref();
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
|
||||||
<QItemSection v-if="salespersons">
|
|
||||||
<VnSelect
|
|
||||||
:input-debounce="0"
|
|
||||||
:label="t('Salesperson')"
|
|
||||||
:options="salespersons"
|
|
||||||
dense
|
|
||||||
emit-value
|
|
||||||
hide-selected
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
option-value="id"
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
use-input
|
|
||||||
v-model="params.salesPersonFk"
|
|
||||||
@update:model-value="searchFn()"
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
<QItemSection v-else>
|
|
||||||
<QSkeleton class="full-width" type="QInput" />
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection v-if="departments">
|
<QItemSection v-if="departments">
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
@ -219,7 +189,6 @@ const departments = ref();
|
||||||
en:
|
en:
|
||||||
params:
|
params:
|
||||||
clientFk: Client
|
clientFk: Client
|
||||||
salesPersonFk: Salesperson
|
|
||||||
countryFk: Country
|
countryFk: Country
|
||||||
paymentMethod: P. Method
|
paymentMethod: P. Method
|
||||||
balance: Balance D.
|
balance: Balance D.
|
||||||
|
@ -230,7 +199,6 @@ en:
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
salesPersonFk: Comercial
|
|
||||||
countryFk: País
|
countryFk: País
|
||||||
paymentMethod: F. Pago
|
paymentMethod: F. Pago
|
||||||
balance: Saldo V.
|
balance: Saldo V.
|
||||||
|
@ -239,7 +207,6 @@ es:
|
||||||
credit: Crédito A.
|
credit: Crédito A.
|
||||||
defaulterSinced: Desde
|
defaulterSinced: Desde
|
||||||
Client: Cliente
|
Client: Cliente
|
||||||
Salesperson: Comercial
|
|
||||||
Departments: Departamentos
|
Departments: Departamentos
|
||||||
Country: País
|
Country: País
|
||||||
P. Method: F. Pago
|
P. Method: F. Pago
|
||||||
|
|
|
@ -69,17 +69,16 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
name: 'departmentFk',
|
||||||
name: 'salesPersonFk',
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Departments',
|
||||||
fields: ['id', 'name'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
optionFilter: 'firstName',
|
|
||||||
useLike: false,
|
|
||||||
},
|
},
|
||||||
visible: false,
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -96,7 +95,7 @@ const columns = computed(() => [
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<VnTable
|
<VnTable
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
url="Clients"
|
url="Clients/filter"
|
||||||
:table="{
|
:table="{
|
||||||
'row-key': 'id',
|
'row-key': 'id',
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
|
@ -127,7 +126,6 @@ const columns = computed(() => [
|
||||||
es:
|
es:
|
||||||
Identifier: Identificador
|
Identifier: Identificador
|
||||||
Social name: Razón social
|
Social name: Razón social
|
||||||
Salesperson: Comercial
|
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
City: Población
|
City: Población
|
||||||
Email: Email
|
Email: Email
|
||||||
|
|
|
@ -20,7 +20,7 @@ customer:
|
||||||
name: Name
|
name: Name
|
||||||
contact: Contact
|
contact: Contact
|
||||||
mobile: Mobile
|
mobile: Mobile
|
||||||
salesPerson: Sales person
|
team: Team
|
||||||
contactChannel: Contact channel
|
contactChannel: Contact channel
|
||||||
socialName: Social name
|
socialName: Social name
|
||||||
fiscalId: Fiscal ID
|
fiscalId: Fiscal ID
|
||||||
|
@ -78,7 +78,6 @@ customer:
|
||||||
id: Identifier
|
id: Identifier
|
||||||
socialName: Social name
|
socialName: Social name
|
||||||
fi: Tax number
|
fi: Tax number
|
||||||
salesPersonFk: Salesperson
|
|
||||||
creditInsurance: Credit insurance
|
creditInsurance: Credit insurance
|
||||||
phone: Phone
|
phone: Phone
|
||||||
street: Street
|
street: Street
|
||||||
|
|
|
@ -20,7 +20,7 @@ customer:
|
||||||
name: Nombre
|
name: Nombre
|
||||||
contact: Contacto
|
contact: Contacto
|
||||||
mobile: Móvil
|
mobile: Móvil
|
||||||
salesPerson: Comercial
|
team: Equipo
|
||||||
contactChannel: Canal de contacto
|
contactChannel: Canal de contacto
|
||||||
socialName: Razón social
|
socialName: Razón social
|
||||||
fiscalId: NIF/CIF
|
fiscalId: NIF/CIF
|
||||||
|
@ -78,7 +78,6 @@ customer:
|
||||||
id: Identificador
|
id: Identificador
|
||||||
socialName: Razón social
|
socialName: Razón social
|
||||||
fi: NIF / CIF
|
fi: NIF / CIF
|
||||||
salesPersonFk: Comercial
|
|
||||||
creditInsurance: Crédito asegurado
|
creditInsurance: Crédito asegurado
|
||||||
phone: Teléfono
|
phone: Teléfono
|
||||||
street: Dirección fiscal
|
street: Dirección fiscal
|
||||||
|
|
|
@ -46,6 +46,11 @@ function ticketFilter(invoice) {
|
||||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
|
<VnLv
|
||||||
|
v-if="entity.externalRef"
|
||||||
|
:label="t('invoiceOut.externalRef')"
|
||||||
|
:value="entity.externalRef"
|
||||||
|
/>
|
||||||
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
||||||
<VnLv :label="t('globals.amount')" :value="toCurrency(entity.amount)" />
|
<VnLv :label="t('globals.amount')" :value="toCurrency(entity.amount)" />
|
||||||
<VnLv v-if="entity.client" :label="t('globals.client')">
|
<VnLv v-if="entity.client" :label="t('globals.client')">
|
||||||
|
|
|
@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -30,7 +31,7 @@ const states = ref();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('Customer ID')"
|
:label="t('globals.params.clientFk')"
|
||||||
v-model="params.clientFk"
|
v-model="params.clientFk"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -38,13 +39,17 @@ const states = ref();
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput v-model="params.fi" :label="t('FI')" is-outlined />
|
<VnInput
|
||||||
|
v-model="params.fi"
|
||||||
|
:label="t('globals.params.fi')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
:label="t('Amount')"
|
:label="t('globals.amount')"
|
||||||
v-model="params.amount"
|
v-model="params.amount"
|
||||||
is-outlined
|
is-outlined
|
||||||
data-cy="InvoiceOutFilterAmountBtn"
|
data-cy="InvoiceOutFilterAmountBtn"
|
||||||
|
@ -54,7 +59,7 @@ const states = ref();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QInput
|
<QInput
|
||||||
:label="t('Min')"
|
:label="t('invoiceOut.params.min')"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
outlined
|
outlined
|
||||||
|
@ -65,7 +70,7 @@ const states = ref();
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QInput
|
<QInput
|
||||||
:label="t('Max')"
|
:label="t('invoiceOut.params.max')"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
outlined
|
outlined
|
||||||
|
@ -78,7 +83,7 @@ const states = ref();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('Has PDF')"
|
:label="t('invoiceOut.params.hasPdf')"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
v-model="params.hasPdf"
|
v-model="params.hasPdf"
|
||||||
/>
|
/>
|
||||||
|
@ -88,14 +93,31 @@ const states = ref();
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.created"
|
v-model="params.created"
|
||||||
:label="t('Created')"
|
:label="t('invoiceOut.params.created')"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate v-model="params.dued" :label="t('Dued')" is-outlined />
|
<VnInputDate
|
||||||
|
v-model="params.dued"
|
||||||
|
:label="t('invoiceOut.params.dued')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnSelect
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
:label="t('globals.params.departmentFk')"
|
||||||
|
v-model="params.departmentFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
url="Departments"
|
||||||
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import { usePrintService } from 'src/composables/usePrintService';
|
import { usePrintService } from 'src/composables/usePrintService';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
||||||
import { toCurrency, toDate } from 'src/filters/index';
|
import { toCurrency, toDate, dashIfEmpty } from 'src/filters/index';
|
||||||
import { QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||||
|
@ -16,6 +16,7 @@ import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import VnRadio from 'src/components/common/VnRadio.vue';
|
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -54,6 +55,14 @@ const columns = computed(() => [
|
||||||
name: 'id',
|
name: 'id',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'issued',
|
||||||
|
label: t('invoiceOut.summary.issued'),
|
||||||
|
component: 'date',
|
||||||
|
format: (row) => toDate(row.issued),
|
||||||
|
columnField: { component: null },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'ref',
|
name: 'ref',
|
||||||
|
@ -86,6 +95,20 @@ const columns = computed(() => [
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'departmentFk',
|
||||||
|
label: t('customer.summary.team'),
|
||||||
|
cardVisible: true,
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Departments',
|
||||||
|
},
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'companyFk',
|
name: 'companyFk',
|
||||||
|
@ -229,6 +252,12 @@ watchEffect(selectedRows);
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-departmentFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ dashIfEmpty(row.departmentName) }}
|
||||||
|
<DepartmentDescriptorProxy :id="row?.departmentFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<div class="row q-col-gutter-xs col-span-2">
|
<div class="row q-col-gutter-xs col-span-2">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import InvoiceOutNegativeBasesFilter from './InvoiceOutNegativeBasesFilter.vue';
|
import InvoiceOutNegativeBasesFilter from './InvoiceOutNegativeBasesFilter.vue';
|
||||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
@ -115,18 +115,16 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
|
name: 'departmentFk',
|
||||||
name: 'workerName',
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Departments',
|
||||||
fields: ['id', 'name'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
},
|
},
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.workerName),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -198,10 +196,10 @@ const downloadCSV = async () => {
|
||||||
<TicketDescriptorProxy :id="row.ticketFk" />
|
<TicketDescriptorProxy :id="row.ticketFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-workerName="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.workerName }}
|
{{ row.departmentName }}
|
||||||
<WorkerDescriptorProxy :id="row.comercialId" />
|
<DepartmentDescriptorProxy :id="row.departmentFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #moreFilterPanel="{ params }">
|
<template #moreFilterPanel="{ params }">
|
||||||
|
|
|
@ -129,12 +129,15 @@ const props = defineProps({
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectWorker
|
<VnSelect
|
||||||
:label="t('invoiceOut.negativeBases.comercial')"
|
outlined
|
||||||
v-model="params.workerName"
|
dense
|
||||||
option-value="name"
|
rounded
|
||||||
is-outlined
|
:label="t('globals.params.departmentFk')"
|
||||||
@update:model-value="searchFn()"
|
v-model="params.departmentFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
url="Departments"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
invoiceOut:
|
invoiceOut:
|
||||||
search: Search invoice
|
search: Search invoice
|
||||||
searchInfo: You can search by invoice reference
|
searchInfo: You can search by invoice reference
|
||||||
|
externalRef: External Ref.
|
||||||
params:
|
params:
|
||||||
id: ID
|
id: ID
|
||||||
company: Company
|
company: Company
|
||||||
|
@ -12,7 +13,6 @@ invoiceOut:
|
||||||
isActive: Active
|
isActive: Active
|
||||||
hasToInvoice: Has to invoice
|
hasToInvoice: Has to invoice
|
||||||
hasVerifiedData: Verified data
|
hasVerifiedData: Verified data
|
||||||
workerName: Worker
|
|
||||||
isTaxDataChecked: Verified data
|
isTaxDataChecked: Verified data
|
||||||
amount: Amount
|
amount: Amount
|
||||||
clientFk: Client
|
clientFk: Client
|
||||||
|
@ -26,6 +26,7 @@ invoiceOut:
|
||||||
max: Max
|
max: Max
|
||||||
hasPdf: Has PDF
|
hasPdf: Has PDF
|
||||||
search: Contains
|
search: Contains
|
||||||
|
departmentFk: Department
|
||||||
card:
|
card:
|
||||||
issued: Issued
|
issued: Issued
|
||||||
customerCard: Customer card
|
customerCard: Customer card
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
invoiceOut:
|
invoiceOut:
|
||||||
search: Buscar factura emitida
|
search: Buscar factura emitida
|
||||||
searchInfo: Puedes buscar por referencia de la factura
|
searchInfo: Puedes buscar por referencia de la factura
|
||||||
|
externalRef: Ref. externa
|
||||||
params:
|
params:
|
||||||
id: ID
|
id: ID
|
||||||
company: Empresa
|
company: Empresa
|
||||||
|
@ -12,7 +13,6 @@ invoiceOut:
|
||||||
isActive: Activo
|
isActive: Activo
|
||||||
hasToInvoice: Debe facturar
|
hasToInvoice: Debe facturar
|
||||||
hasVerifiedData: Datos verificados
|
hasVerifiedData: Datos verificados
|
||||||
workerName: Comercial
|
|
||||||
isTaxDataChecked: Datos comprobados
|
isTaxDataChecked: Datos comprobados
|
||||||
amount: Importe
|
amount: Importe
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
|
@ -26,6 +26,7 @@ invoiceOut:
|
||||||
max: Max
|
max: Max
|
||||||
hasPdf: Tiene PDF
|
hasPdf: Tiene PDF
|
||||||
search: Contiene
|
search: Contiene
|
||||||
|
departmentFk: Departamento
|
||||||
card:
|
card:
|
||||||
issued: Fecha emisión
|
issued: Fecha emisión
|
||||||
customerCard: Ficha del cliente
|
customerCard: Ficha del cliente
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { ref, computed, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { toCurrency } from 'filters/index';
|
import { toCurrency } from 'filters/index';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
@ -61,6 +62,7 @@ const columns = computed(() => [
|
||||||
columnClass: 'expand',
|
columnClass: 'expand',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
align: 'left',
|
||||||
label: t('item.buyRequest.requester'),
|
label: t('item.buyRequest.requester'),
|
||||||
name: 'requesterName',
|
name: 'requesterName',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
@ -77,6 +79,19 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'departmentFk',
|
||||||
|
label: t('customer.summary.team'),
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Departments',
|
||||||
|
},
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t('item.buyRequest.requested'),
|
label: t('item.buyRequest.requested'),
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
|
@ -107,6 +122,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
label: t('globals.item'),
|
label: t('globals.item'),
|
||||||
name: 'item',
|
name: 'item',
|
||||||
|
@ -262,6 +278,12 @@ const onDenyAccept = (_, responseData) => {
|
||||||
<WorkerDescriptorProxy :id="row.requesterFk" />
|
<WorkerDescriptorProxy :id="row.requesterFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-departmentFk="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row.departmentName }}
|
||||||
|
<DepartmentDescriptorProxy :id="row.departmentFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #column-item="{ row }">
|
<template #column-item="{ row }">
|
||||||
<span>
|
<span>
|
||||||
|
|
|
@ -221,7 +221,7 @@ en:
|
||||||
attenderFk: Atender
|
attenderFk: Atender
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
requesterFk: Salesperson
|
requesterFk: Requester
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
mine: For me
|
mine: For me
|
||||||
|
@ -239,7 +239,7 @@ es:
|
||||||
attenderFk: Comprador
|
attenderFk: Comprador
|
||||||
clientFk: Id cliente
|
clientFk: Id cliente
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
requesterFk: Comercial
|
requesterFk: Solicitante
|
||||||
from: Desde
|
from: Desde
|
||||||
to: Hasta
|
to: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
|
|
|
@ -7,6 +7,7 @@ import filter from './ItemTypeFilter.js';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
import VnToSummary from 'src/components/ui/VnToSummary.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onUpdated(() => summaryRef.value.fetch());
|
onUpdated(() => summaryRef.value.fetch());
|
||||||
|
|
||||||
|
@ -62,13 +63,10 @@ async function setItemTypeData(data) {
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<router-link
|
<VnTitle
|
||||||
:to="{ name: 'ItemTypeBasicData', params: { id: entityId } }"
|
:url="`#/item/item-type/${entityId}/basic-data`"
|
||||||
class="header header-link"
|
:text="$t('globals.summary.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.summary.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</router-link>
|
|
||||||
<VnLv :label="t('itemType.summary.id')" :value="itemType.id" />
|
<VnLv :label="t('itemType.summary.id')" :value="itemType.id" />
|
||||||
<VnLv :label="t('itemType.shared.code')" :value="itemType.code" />
|
<VnLv :label="t('itemType.shared.code')" :value="itemType.code" />
|
||||||
<VnLv :label="t('itemType.shared.name')" :value="itemType.name" />
|
<VnLv :label="t('itemType.shared.name')" :value="itemType.name" />
|
||||||
|
|
|
@ -84,7 +84,7 @@ item:
|
||||||
attenderFk: Atender
|
attenderFk: Atender
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
warehouseFk: Warehouse
|
warehouseFk: Warehouse
|
||||||
requesterFk: Salesperson
|
requesterFk: Requester
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
mine: For me
|
mine: For me
|
||||||
|
|
|
@ -93,7 +93,7 @@ item:
|
||||||
attenderFk: Comprador
|
attenderFk: Comprador
|
||||||
clientFk: Id cliente
|
clientFk: Id cliente
|
||||||
warehouseFk: Almacén
|
warehouseFk: Almacén
|
||||||
requesterFk: Comercial
|
requesterFk: Solicitante
|
||||||
from: Desde
|
from: Desde
|
||||||
to: Hasta
|
to: Hasta
|
||||||
mine: Para mi
|
mine: Para mi
|
||||||
|
|
|
@ -31,7 +31,7 @@ function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
return { [`c.id`]: value };
|
return { [`c.id`]: value };
|
||||||
case 'salesPersonFk':
|
case 'departmentFk':
|
||||||
return { [`c.${param}`]: value };
|
return { [`c.${param}`]: value };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,25 +62,17 @@ const columns = computed(() => [
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesClientsTable.salesPerson'),
|
|
||||||
name: 'salesPersonFk',
|
|
||||||
field: 'salesPerson',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
name: 'departmentFk',
|
||||||
|
label: t('customer.summary.team'),
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Departments',
|
||||||
|
},
|
||||||
columnField: {
|
columnField: {
|
||||||
component: null,
|
component: null,
|
||||||
},
|
},
|
||||||
optionFilter: 'firstName',
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
columnFilter: {
|
|
||||||
component: 'select',
|
|
||||||
attrs: {
|
|
||||||
url: 'Workers/activeWithInheritedRole',
|
|
||||||
fields: ['id', 'name'],
|
|
||||||
sortBy: 'nickname ASC',
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
useLike: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
columnClass: 'no-padding',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesClientsTable.client'),
|
label: t('salesClientsTable.client'),
|
||||||
|
@ -128,9 +120,9 @@ const columns = computed(() => [
|
||||||
<VnInputDate v-model="to" :label="$t('globals.to')" dense />
|
<VnInputDate v-model="to" :label="$t('globals.to')" dense />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
<template #column-salesPersonFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<span class="link" :title="row.salesPerson" v-text="row.salesPerson" />
|
<span class="link" :title="row.department" v-text="row.department" />
|
||||||
<WorkerDescriptorProxy :id="row.salesPersonFk" dense />
|
<WorkerDescriptorProxy :id="row.departmentFk" dense />
|
||||||
</template>
|
</template>
|
||||||
<template #column-clientFk="{ row }">
|
<template #column-clientFk="{ row }">
|
||||||
<span class="link" :title="row.clientName" v-text="row.clientName" />
|
<span class="link" :title="row.clientName" v-text="row.clientName" />
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
|
||||||
import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
|
import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency } from 'src/filters';
|
||||||
|
@ -20,8 +20,8 @@ function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
return { [`c.id`]: value };
|
return { [`c.id`]: value };
|
||||||
case 'salesPersonFk':
|
case 'departmentFk':
|
||||||
return { [`c.salesPersonFk`]: value };
|
return { [`c.departmentFk`]: value };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,20 +63,18 @@ const columns = computed(() => [
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesClientsTable.salesPerson'),
|
|
||||||
name: 'salesPersonFk',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
optionFilter: 'firstName',
|
name: 'departmentFk',
|
||||||
columnFilter: {
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Departments',
|
||||||
fields: ['id', 'name'],
|
|
||||||
sortBy: 'nickname ASC',
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
useLike: false,
|
|
||||||
},
|
},
|
||||||
|
create: true,
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
},
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesOrdersTable.import'),
|
label: t('salesOrdersTable.import'),
|
||||||
|
@ -184,11 +182,10 @@ const openTab = (id) =>
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-departmentFk="{ row }">
|
||||||
<template #column-salesPersonFk="{ row }">
|
|
||||||
<QTd @click.stop>
|
<QTd @click.stop>
|
||||||
<span class="link" v-text="row.salesPerson" />
|
<span class="link" v-text="row.departmentName" />
|
||||||
<WorkerDescriptorProxy :id="row.salesPersonFk" dense />
|
<DepartmentDescriptorProxy :id="row.departmentFk" dense />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
|
|
@ -9,7 +9,6 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
|
||||||
|
|
||||||
defineProps({ dataKey: { type: String, required: true } });
|
defineProps({ dataKey: { type: String, required: true } });
|
||||||
const { t, te } = useI18n();
|
const { t, te } = useI18n();
|
||||||
|
@ -113,16 +112,16 @@ const getLocale = (label) => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectWorker
|
<VnSelect
|
||||||
outlined
|
outlined
|
||||||
dense
|
dense
|
||||||
rounded
|
rounded
|
||||||
:label="t('globals.params.salesPersonFk')"
|
:label="t('globals.params.departmentFk')"
|
||||||
v-model="params.salesPersonFk"
|
v-model="params.departmentFk"
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
option-value="id"
|
||||||
:no-one="true"
|
option-label="name"
|
||||||
>
|
url="Departments"
|
||||||
</VnSelectWorker>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||||
|
@ -49,8 +49,8 @@ function exprBuilder(param, value) {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'stateFk':
|
case 'stateFk':
|
||||||
return { 'ts.stateFk': value };
|
return { 'ts.stateFk': value };
|
||||||
case 'salesPersonFk':
|
case 'departmentFk':
|
||||||
return { 'c.salesPersonFk': !value ? null : value };
|
return { 'c.departmentFk': !value ? null : value };
|
||||||
case 'provinceFk':
|
case 'provinceFk':
|
||||||
return { 'a.provinceFk': value };
|
return { 'a.provinceFk': value };
|
||||||
case 'theoreticalHour':
|
case 'theoreticalHour':
|
||||||
|
@ -108,19 +108,18 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesClientsTable.salesPerson'),
|
|
||||||
name: 'salesPersonFk',
|
|
||||||
field: 'userName',
|
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
name: 'departmentFk',
|
||||||
|
label: t('customer.summary.team'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/search?departmentCodes=["VT"]',
|
url: 'Departments',
|
||||||
fields: ['id', 'name', 'nickname', 'code'],
|
|
||||||
sortBy: 'nickname ASC',
|
|
||||||
optionLabel: 'nickname',
|
|
||||||
},
|
},
|
||||||
|
create: true,
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
},
|
},
|
||||||
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('salesClientsTable.date'),
|
label: t('salesClientsTable.date'),
|
||||||
|
@ -437,10 +436,10 @@ const openTab = (id) => useOpenURL(`#/ticket/${id}/sale`);
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-salesPersonFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<div @click.stop :title="row.userName">
|
<div @click.stop :title="row.departmentName">
|
||||||
<span class="link" v-text="dashIfEmpty(row.userName)" />
|
<span class="link" v-text="dashIfEmpty(row.departmentName)" />
|
||||||
<WorkerDescriptorProxy :id="row.salesPersonFk" />
|
<DepartmentDescriptorProxy :id="row.departmentFk" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-shippedDate="{ row }">
|
<template #column-shippedDate="{ row }">
|
||||||
|
|
|
@ -7,7 +7,6 @@ salesClientsTable:
|
||||||
to: To
|
to: To
|
||||||
date: Date
|
date: Date
|
||||||
hour: Hour
|
hour: Hour
|
||||||
salesPerson: Salesperson
|
|
||||||
client: Client
|
client: Client
|
||||||
salesOrdersTable:
|
salesOrdersTable:
|
||||||
delete: Delete
|
delete: Delete
|
||||||
|
|
|
@ -7,7 +7,6 @@ salesClientsTable:
|
||||||
to: Hasta
|
to: Hasta
|
||||||
date: Fecha
|
date: Fecha
|
||||||
hour: Hora
|
hour: Hora
|
||||||
salesPerson: Comercial
|
|
||||||
client: Cliente
|
client: Cliente
|
||||||
salesOrdersTable:
|
salesOrdersTable:
|
||||||
delete: Eliminar
|
delete: Eliminar
|
||||||
|
|
|
@ -64,17 +64,7 @@ const orderFilter = {
|
||||||
{
|
{
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
fields: [
|
fields: ['name', 'isActive', 'isFreezed', 'isTaxDataChecked'],
|
||||||
'salesPersonFk',
|
|
||||||
'name',
|
|
||||||
'isActive',
|
|
||||||
'isFreezed',
|
|
||||||
'isTaxDataChecked',
|
|
||||||
],
|
|
||||||
include: {
|
|
||||||
relation: 'salesPersonUser',
|
|
||||||
scope: { fields: ['id', 'name'] },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -167,7 +157,7 @@ const onClientChange = async (clientId) => {
|
||||||
!data.isConfirmed &&
|
!data.isConfirmed &&
|
||||||
agencyList?.length &&
|
agencyList?.length &&
|
||||||
agencyList.some(
|
agencyList.some(
|
||||||
(agency) => agency.agencyModeFk === data.agency_id
|
(agency) => agency.agencyModeFk === data.agency_id,
|
||||||
)
|
)
|
||||||
? data.agencyModeFk
|
? data.agencyModeFk
|
||||||
: null
|
: null
|
||||||
|
|
|
@ -8,7 +8,7 @@ import filter from './OrderFilter.js';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
|
||||||
const DEFAULT_ITEMS = 0;
|
const DEFAULT_ITEMS = 0;
|
||||||
|
|
||||||
|
@ -66,11 +66,11 @@ const total = ref(0);
|
||||||
:label="t('globals.state')"
|
:label="t('globals.state')"
|
||||||
:value="getConfirmationValue(entity.isConfirmed)"
|
:value="getConfirmationValue(entity.isConfirmed)"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('order.field.salesPersonFk')">
|
<VnLv :label="t('customer.summary.team')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity?.client?.salesPersonUser?.name || '-' }}
|
{{ entity?.client?.department?.name || '-' }}
|
||||||
<WorkerDescriptorProxy :id="entity?.client?.salesPersonFk" />
|
<DepartmentDescriptorProxy :id="entity?.client?.departmentFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
|
|
@ -10,14 +10,14 @@ export default {
|
||||||
relation: 'client',
|
relation: 'client',
|
||||||
scope: {
|
scope: {
|
||||||
fields: [
|
fields: [
|
||||||
'salesPersonFk',
|
'departmentFk',
|
||||||
'name',
|
'name',
|
||||||
'isActive',
|
'isActive',
|
||||||
'isFreezed',
|
'isFreezed',
|
||||||
'isTaxDataChecked',
|
'isTaxDataChecked',
|
||||||
],
|
],
|
||||||
include: {
|
include: {
|
||||||
relation: 'salesPersonUser',
|
relation: 'department',
|
||||||
scope: { fields: ['id', 'name'] },
|
scope: { fields: ['id', 'name'] },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,6 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'components/common/VnSelect.vue';
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import VnInput from 'components/common/VnInput.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -62,15 +61,15 @@ const sourceList = ref([]);
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
/>
|
/>
|
||||||
<VnSelectWorker
|
<VnSelect
|
||||||
:label="t('globals.salesPerson')"
|
|
||||||
v-model="params.workerFk"
|
|
||||||
:params="{
|
|
||||||
departmentCodes: ['VT'],
|
|
||||||
}"
|
|
||||||
dense
|
|
||||||
outlined
|
outlined
|
||||||
|
dense
|
||||||
rounded
|
rounded
|
||||||
|
:label="t('globals.params.departmentFk')"
|
||||||
|
v-model="params.departmentFk"
|
||||||
|
option-value="id"
|
||||||
|
option-label="name"
|
||||||
|
url="Departments"
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.from"
|
v-model="params.from"
|
||||||
|
@ -125,7 +124,6 @@ en:
|
||||||
search: Includes
|
search: Includes
|
||||||
clientFk: Client
|
clientFk: Client
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
salesPersonFk: Sales Person
|
|
||||||
from: From
|
from: From
|
||||||
to: To
|
to: To
|
||||||
orderFk: Order
|
orderFk: Order
|
||||||
|
@ -136,7 +134,6 @@ en:
|
||||||
showEmpty: Show Empty
|
showEmpty: Show Empty
|
||||||
customerId: Customer ID
|
customerId: Customer ID
|
||||||
agency: Agency
|
agency: Agency
|
||||||
salesPerson: Sales Person
|
|
||||||
fromLanded: From Landed
|
fromLanded: From Landed
|
||||||
toLanded: To Landed
|
toLanded: To Landed
|
||||||
orderId: Order ID
|
orderId: Order ID
|
||||||
|
@ -149,7 +146,6 @@ es:
|
||||||
search: Búsqueda
|
search: Búsqueda
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
salesPersonFk: Comercial
|
|
||||||
from: Desde
|
from: Desde
|
||||||
to: Hasta
|
to: Hasta
|
||||||
orderFk: Cesta
|
orderFk: Cesta
|
||||||
|
@ -160,7 +156,6 @@ es:
|
||||||
showEmpty: Mostrar vacías
|
showEmpty: Mostrar vacías
|
||||||
customerId: ID Cliente
|
customerId: ID Cliente
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
salesPerson: Comercial
|
|
||||||
fromLanded: Desde F. entrega
|
fromLanded: Desde F. entrega
|
||||||
toLanded: Hasta F. entrega
|
toLanded: Hasta F. entrega
|
||||||
orderId: ID Cesta
|
orderId: ID Cesta
|
||||||
|
|
|
@ -10,12 +10,12 @@ import axios from 'axios';
|
||||||
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
|
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
|
||||||
import OrderFilter from './Card/OrderFilter.vue';
|
import OrderFilter from './Card/OrderFilter.vue';
|
||||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
|
||||||
|
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import { getAddresses } from '../Customer/composables/getAddresses';
|
import { getAddresses } from '../Customer/composables/getAddresses';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -59,22 +59,17 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'salesPersonFk',
|
name: 'departmentFk',
|
||||||
label: t('module.salesPerson'),
|
label: t('customer.summary.team'),
|
||||||
columnFilter: {
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
inWhere: true,
|
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Departments',
|
||||||
fields: ['id', 'name'],
|
|
||||||
where: { role: 'salesPerson' },
|
|
||||||
useLike: false,
|
|
||||||
optionValue: 'id',
|
|
||||||
optionLabel: 'name',
|
|
||||||
optionFilter: 'firstName',
|
|
||||||
},
|
},
|
||||||
|
create: true,
|
||||||
|
columnField: {
|
||||||
|
component: null,
|
||||||
},
|
},
|
||||||
format: (row) => row?.name,
|
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -264,10 +259,10 @@ const isDefaultAddress = (opt, data) => {
|
||||||
<CustomerDescriptorProxy :id="row?.clientFk" />
|
<CustomerDescriptorProxy :id="row?.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-salesPersonFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row?.name }}
|
{{ row?.departmentName }}
|
||||||
<WorkerDescriptorProxy :id="row?.salesPersonFk" />
|
<DepartmentDescriptorProxy :id="row?.departmentFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-landed="{ row }">
|
<template #column-landed="{ row }">
|
||||||
|
|
|
@ -8,7 +8,6 @@ module:
|
||||||
hour: Hour
|
hour: Hour
|
||||||
agency: Agency
|
agency: Agency
|
||||||
total: Total
|
total: Total
|
||||||
salesPerson: Sales Person
|
|
||||||
address: Address
|
address: Address
|
||||||
cerateOrder: Create order
|
cerateOrder: Create order
|
||||||
lines:
|
lines:
|
||||||
|
@ -22,8 +21,6 @@ lines:
|
||||||
params:
|
params:
|
||||||
tagGroups: Tags
|
tagGroups: Tags
|
||||||
order:
|
order:
|
||||||
field:
|
|
||||||
salesPersonFk: Sales Person
|
|
||||||
form:
|
form:
|
||||||
clientFk: Client
|
clientFk: Client
|
||||||
addressFk: Address
|
addressFk: Address
|
||||||
|
|
|
@ -8,7 +8,6 @@ module:
|
||||||
hour: Hora
|
hour: Hora
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
total: Total
|
total: Total
|
||||||
salesPerson: Comercial
|
|
||||||
address: Dirección
|
address: Dirección
|
||||||
cerateOrder: Crear cesta
|
cerateOrder: Crear cesta
|
||||||
lines:
|
lines:
|
||||||
|
@ -22,8 +21,6 @@ lines:
|
||||||
params:
|
params:
|
||||||
tagGroups: Tags
|
tagGroups: Tags
|
||||||
order:
|
order:
|
||||||
field:
|
|
||||||
salesPersonFk: Comercial
|
|
||||||
form:
|
form:
|
||||||
clientFk: Cliente
|
clientFk: Cliente
|
||||||
addressFk: Dirección
|
addressFk: Dirección
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import AgencySummary from 'pages/Route/Agency/Card/AgencySummary.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const dataKey = 'AgencyList';
|
const dataKey = 'AgencyList';
|
||||||
function navigate(id) {
|
function navigate(id) {
|
||||||
|
@ -40,16 +43,22 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('isOwn'),
|
label: t('agency.isOwn'),
|
||||||
name: 'isOwn',
|
name: 'isOwn',
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
|
columnFilter: {
|
||||||
|
inWhere: true,
|
||||||
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('isAnyVolumeAllowed'),
|
label: t('agency.isAnyVolumeAllowed'),
|
||||||
name: 'isAnyVolumeAllowed',
|
name: 'isAnyVolumeAllowed',
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
|
columnFilter: {
|
||||||
|
inWhere: true,
|
||||||
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -58,9 +67,10 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('Client ticket list'),
|
title: t('globals.pageTitles.summary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => navigate(row.id),
|
action: (row) => viewSummary(row?.id, AgencySummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -82,7 +92,7 @@ const columns = computed(() => [
|
||||||
<VnTable
|
<VnTable
|
||||||
:data-key
|
:data-key
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
is-editable="false"
|
:is-editable="false"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
redirect="route/agency"
|
redirect="route/agency"
|
||||||
|
@ -103,11 +113,3 @@ const columns = computed(() => [
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
isOwn: Tiene propietario
|
|
||||||
isAnyVolumeAllowed: Permite cualquier volumen
|
|
||||||
en:
|
|
||||||
isOwn: Has owner
|
|
||||||
isAnyVolumeAllowed: Allows any volume
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ const warehouses = ref([]);
|
||||||
@on-fetch="(data) => (warehouses = data)"
|
@on-fetch="(data) => (warehouses = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FormModel :update-url="`Agencies/${routeId}`" model="Agency" auto-load>
|
<FormModel :url-update="`Agencies/${routeId}`" model="Agency" auto-load>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.name" :label="t('globals.name')" />
|
<VnInput v-model="data.name" :label="t('globals.name')" />
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<script setup>
|
||||||
|
import AgencyDescriptor from 'pages/Route/Agency/Card/AgencyDescriptor.vue';
|
||||||
|
import AgencySummary from './AgencySummary.vue';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
summary: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<QPopupProxy>
|
||||||
|
<AgencyDescriptor v-if="$props.id" :id="$props.id" :summary="AgencySummary" />
|
||||||
|
</QPopupProxy>
|
||||||
|
</template>
|
|
@ -6,29 +6,31 @@ import { useI18n } from 'vue-i18n';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
import VnCheckbox from 'components/common/VnCheckbox.vue';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
const $props = defineProps({ id: { type: Number, default: 0 } });
|
const $props = defineProps({ id: { type: Number, default: 0 } });
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const entityId = computed(() => $props.id || useRoute().params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<CardSummary :url="`Agencies/${entityId}`" data-key="Agency">
|
<CardSummary :url="`Agencies/${entityId}`" data-key="Agency" module-name="Agency">
|
||||||
<template #header="{ entity: agency }">{{ agency.name }}</template>
|
<template #header="{ entity: agency }">{{ agency.name }}</template>
|
||||||
<template #body="{ entity: agency }">
|
<template #body="{ entity: agency }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="`#/agency/${entityId}/basic-data`"
|
:url="`#/${route.meta.moduleName.toLowerCase()}/agency/${entityId}/basic-data`"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('globals.name')" :value="agency.name" />
|
<VnLv :label="t('globals.name')" :value="agency.name" />
|
||||||
<QCheckbox
|
<VnCheckbox
|
||||||
:label="t('agency.isOwn')"
|
:label="t('agency.isOwn')"
|
||||||
v-model="agency.isOwn"
|
v-model="agency.isOwn"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
/>
|
/>
|
||||||
<QCheckbox
|
<VnCheckbox
|
||||||
:label="t('agency.isAnyVolumeAllowed')"
|
:label="t('agency.isAnyVolumeAllowed')"
|
||||||
v-model="agency.isAnyVolumeAllowed"
|
v-model="agency.isAnyVolumeAllowed"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
|
|
|
@ -80,6 +80,7 @@ async function deleteWorCenter(id) {
|
||||||
color="primary"
|
color="primary"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
|
data-cy="removeWorkCenterBtn"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
agency:
|
agency:
|
||||||
search: Search agency
|
search: Search agency
|
||||||
searchInfo: You can search by name
|
searchInfo: You can search by name and by id
|
||||||
isOwn: Own
|
isOwn: Own
|
||||||
isAnyVolumeAllowed: Any volume allowed
|
isAnyVolumeAllowed: Any volume allowed
|
||||||
|
removeItem: Agency removed successfully
|
||||||
notification:
|
notification:
|
||||||
removeItemError: Error removing agency
|
removeItemError: Error removing work center
|
||||||
removeItem: WorkCenter removed successfully
|
removeItem: Work center removed successfully
|
||||||
pageTitles:
|
pageTitles:
|
||||||
agency: Agency
|
agency: Agency
|
||||||
searchBar:
|
searchBar:
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
agency:
|
agency:
|
||||||
search: Buscar agencia
|
search: Buscar agencia
|
||||||
searchInfo: Puedes buscar por nombre
|
searchInfo: Puedes buscar por nombre y por id
|
||||||
isOwn: Propio
|
isOwn: Propio
|
||||||
isAnyVolumeAllowed: Cualquier volumen
|
isAnyVolumeAllowed: Cualquier volumen
|
||||||
removeItem: Agencia eliminada correctamente
|
removeItem: Agencia eliminada correctamente
|
||||||
notification:
|
notification:
|
||||||
removeItemError: Error al eliminar la agencia
|
removeItemError: Error al eliminar la el centro de trabajo
|
||||||
removeItem: Centro de trabajo eliminado correctamente
|
removeItem: Centro de trabajo eliminado correctamente
|
||||||
pageTitles:
|
pageTitles:
|
||||||
agency: Agencia
|
agency: Agencia
|
||||||
searchBar:
|
searchBar:
|
||||||
info: Puedes buscar por nombre o id
|
info: Puedes buscar por nombre o id
|
||||||
label: Buscar agencia...
|
label: Buscar agencia...
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,10 @@ const $props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
summary: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -25,7 +25,7 @@ const emit = defineEmits(['search']);
|
||||||
>
|
>
|
||||||
<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(`route.params.${tag.label}`) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -33,6 +33,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectWorker
|
<VnSelectWorker
|
||||||
|
:label="t('globals.worker')"
|
||||||
v-model="params.workerFk"
|
v-model="params.workerFk"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
@ -44,7 +45,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Agency')"
|
:label="t('globals.agency')"
|
||||||
v-model="params.agencyModeFk"
|
v-model="params.agencyModeFk"
|
||||||
url="AgencyModes/isActive"
|
url="AgencyModes/isActive"
|
||||||
sort-by="name ASC"
|
sort-by="name ASC"
|
||||||
|
@ -61,7 +62,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.from"
|
v-model="params.from"
|
||||||
:label="t('From')"
|
:label="t('globals.from')"
|
||||||
is-outlined
|
is-outlined
|
||||||
:disable="Boolean(params.scopeDays)"
|
:disable="Boolean(params.scopeDays)"
|
||||||
@update:model-value="params.scopeDays = null"
|
@update:model-value="params.scopeDays = null"
|
||||||
|
@ -72,7 +73,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
v-model="params.to"
|
v-model="params.to"
|
||||||
:label="t('To')"
|
:label="t('globals.to')"
|
||||||
is-outlined
|
is-outlined
|
||||||
:disable="Boolean(params.scopeDays)"
|
:disable="Boolean(params.scopeDays)"
|
||||||
@update:model-value="params.scopeDays = null"
|
@update:model-value="params.scopeDays = null"
|
||||||
|
@ -84,7 +85,7 @@ const emit = defineEmits(['search']);
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.scopeDays"
|
v-model="params.scopeDays"
|
||||||
type="number"
|
type="number"
|
||||||
:label="t('Days Onward')"
|
:label="t('globals.daysOnward')"
|
||||||
is-outlined
|
is-outlined
|
||||||
clearable
|
clearable
|
||||||
:disable="Boolean(params.from || params.to)"
|
:disable="Boolean(params.from || params.to)"
|
||||||
|
@ -98,7 +99,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Vehicle')"
|
:label="t('globals.vehicle')"
|
||||||
v-model="params.vehicleFk"
|
v-model="params.vehicleFk"
|
||||||
url="Vehicles/active"
|
url="Vehicles/active"
|
||||||
sort-by="numberPlate ASC"
|
sort-by="numberPlate ASC"
|
||||||
|
@ -120,7 +121,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItem class="q-my-sm">
|
<QItem class="q-my-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('Warehouse')"
|
:label="t('globals.warehouse')"
|
||||||
v-model="params.warehouseFk"
|
v-model="params.warehouseFk"
|
||||||
url="Warehouses"
|
url="Warehouses"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -136,7 +137,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="params.description"
|
v-model="params.description"
|
||||||
:label="t('Description')"
|
:label="t('globals.description')"
|
||||||
is-outlined
|
is-outlined
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
@ -146,7 +147,7 @@ const emit = defineEmits(['search']);
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
v-model="params.isOk"
|
v-model="params.isOk"
|
||||||
:label="t('Served')"
|
:label="t('route.filter.Served')"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
@ -154,38 +155,3 @@ const emit = defineEmits(['search']);
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
|
||||||
en:
|
|
||||||
params:
|
|
||||||
warehouseFk: Warehouse
|
|
||||||
description: Description
|
|
||||||
m3: m³
|
|
||||||
scopeDays: Days Onward
|
|
||||||
vehicleFk: Vehicle
|
|
||||||
agencyModeFk: Agency
|
|
||||||
workerFk: Worker
|
|
||||||
from: From
|
|
||||||
to: To
|
|
||||||
Served: Served
|
|
||||||
es:
|
|
||||||
params:
|
|
||||||
warehouseFk: Almacén
|
|
||||||
description: Descripción
|
|
||||||
m3: m³
|
|
||||||
scopeDays: Días en adelante
|
|
||||||
vehicleFk: Vehículo
|
|
||||||
agencyModeFk: Agencia
|
|
||||||
workerFk: Trabajador
|
|
||||||
from: Desde
|
|
||||||
to: Hasta
|
|
||||||
Warehouse: Almacén
|
|
||||||
Description: Descripción
|
|
||||||
Vehicle: Vehículo
|
|
||||||
Agency: Agencia
|
|
||||||
Worker: Trabajador
|
|
||||||
From: Desde
|
|
||||||
To: Hasta
|
|
||||||
Served: Servida
|
|
||||||
Days Onward: Días en adelante
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ const ticketColumns = ref([
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-max">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="`#/route/${entityId}/basic-data`"
|
:url="`#/${route.meta.moduleName.toLowerCase()}/${entityId}/basic-data`"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -168,7 +168,7 @@ const ticketColumns = ref([
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('route.summary.volume')"
|
:label="t('route.summary.volume')"
|
||||||
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
:value="`${dashIfEmpty(entity?.route?.m3)} / ${dashIfEmpty(
|
||||||
entity?.route?.vehicle?.m3
|
entity?.route?.vehicle?.m3,
|
||||||
)} m³`"
|
)} m³`"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -221,7 +221,7 @@ const ticketColumns = ref([
|
||||||
<template #body-cell-city="{ value, row }">
|
<template #body-cell-city="{ value, row }">
|
||||||
<QTd auto-width>
|
<QTd auto-width>
|
||||||
<span
|
<span
|
||||||
class="link cursor-pointer"
|
class="link"
|
||||||
@click="openBuscaman(entity?.route?.vehicleFk, [row])"
|
@click="openBuscaman(entity?.route?.vehicleFk, [row])"
|
||||||
>
|
>
|
||||||
{{ value }}
|
{{ value }}
|
||||||
|
@ -230,7 +230,7 @@ const ticketColumns = ref([
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-client="{ value, row }">
|
<template #body-cell-client="{ value, row }">
|
||||||
<QTd auto-width>
|
<QTd auto-width>
|
||||||
<span class="link cursor-pointer">
|
<span class="link">
|
||||||
{{ value }}
|
{{ value }}
|
||||||
<CustomerDescriptorProxy :id="row?.clientFk" />
|
<CustomerDescriptorProxy :id="row?.clientFk" />
|
||||||
</span>
|
</span>
|
||||||
|
@ -238,7 +238,7 @@ const ticketColumns = ref([
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-ticket="{ value, row }">
|
<template #body-cell-ticket="{ value, row }">
|
||||||
<QTd auto-width class="text-center">
|
<QTd auto-width class="text-center">
|
||||||
<span class="link cursor-pointer">
|
<span class="link">
|
||||||
{{ value }}
|
{{ value }}
|
||||||
<TicketDescriptorProxy :id="row?.id" />
|
<TicketDescriptorProxy :id="row?.id" />
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,28 +2,38 @@
|
||||||
import { onBeforeMount, onMounted, computed, ref } from 'vue';
|
import { onBeforeMount, onMounted, computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { Notify } from 'quasar';
|
import { Notify } from 'quasar';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { toDateHourMin } from 'filters/index';
|
import { toDateHourMin } from 'filters/index';
|
||||||
import { useStateStore } from 'src/stores/useStateStore';
|
import { useStateStore } from 'src/stores/useStateStore';
|
||||||
|
|
||||||
import axios from 'axios';
|
|
||||||
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getTokenMultimedia } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = getTokenMultimedia();
|
const token = getTokenMultimedia();
|
||||||
const state = useStateStore();
|
const state = useStateStore();
|
||||||
const warehouses = ref([]);
|
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
|
const dataKey = 'CmrList';
|
||||||
|
const shipped = Date.vnNew();
|
||||||
|
shipped.setHours(0, 0, 0, 0);
|
||||||
|
shipped.setDate(shipped.getDate() - 1);
|
||||||
|
const userParams = {
|
||||||
|
shipped: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'cmrFk',
|
name: 'cmrFk',
|
||||||
label: t('route.cmr.list.cmrFk'),
|
label: t('route.cmr.params.cmrFk'),
|
||||||
chip: {
|
chip: {
|
||||||
condition: () => true,
|
condition: () => true,
|
||||||
},
|
},
|
||||||
|
@ -32,62 +42,67 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'center',
|
||||||
name: 'hasCmrDms',
|
name: 'hasCmrDms',
|
||||||
label: t('route.cmr.list.hasCmrDms'),
|
label: t('route.cmr.params.hasCmrDms'),
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('route.cmr.list.ticketFk'),
|
label: t('route.cmr.params.ticketFk'),
|
||||||
name: 'ticketFk',
|
name: 'ticketFk',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('route.cmr.list.routeFk'),
|
label: t('route.cmr.params.routeFk'),
|
||||||
name: 'routeFk',
|
name: 'routeFk',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('route.cmr.list.clientFk'),
|
label: t('route.cmr.params.clientFk'),
|
||||||
name: 'clientFk',
|
name: 'clientFk',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: t('route.cmr.list.country'),
|
label: t('route.cmr.params.countryFk'),
|
||||||
name: 'countryFk',
|
name: 'countryFk',
|
||||||
cardVisible: true,
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'countries',
|
url: 'countries',
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
optionLabel: 'name',
|
|
||||||
optionValue: 'id',
|
|
||||||
},
|
},
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
name: 'countryFk',
|
||||||
component: 'select',
|
attrs: {
|
||||||
|
url: 'countries',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
format: ({ countryName }) => countryName,
|
format: ({ countryName }) => countryName,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: t('route.cmr.list.shipped'),
|
label: t('route.cmr.params.shipped'),
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
|
||||||
component: 'date',
|
component: 'date',
|
||||||
inWhere: true,
|
|
||||||
},
|
|
||||||
format: ({ shipped }) => toDateHourMin(shipped),
|
format: ({ shipped }) => toDateHourMin(shipped),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
label: t('route.cmr.params.warehouseFk'),
|
||||||
name: 'warehouseFk',
|
name: 'warehouseFk',
|
||||||
label: t('globals.warehouse'),
|
|
||||||
columnFilter: {
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
},
|
|
||||||
attrs: {
|
attrs: {
|
||||||
options: warehouses.value,
|
url: 'warehouses',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
|
columnFilter: {
|
||||||
|
inWhere: true,
|
||||||
|
name: 'warehouseFk',
|
||||||
|
attrs: {
|
||||||
|
url: 'warehouses',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
format: ({ warehouseName }) => warehouseName,
|
format: ({ warehouseName }) => warehouseName,
|
||||||
},
|
},
|
||||||
|
@ -96,7 +111,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('Ver cmr'),
|
title: t('route.cmr.params.viewCmr'),
|
||||||
icon: 'visibility',
|
icon: 'visibility',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => window.open(getCmrUrl(row?.cmrFk), '_blank'),
|
action: (row) => window.open(getCmrUrl(row?.cmrFk), '_blank'),
|
||||||
|
@ -105,13 +120,17 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(() => {
|
||||||
const { data } = await axios.get('Warehouses');
|
initializeFromQuery();
|
||||||
warehouses.value = data;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => (state.rightDrawer = true));
|
onMounted(() => (state.rightDrawer = true));
|
||||||
|
|
||||||
|
const initializeFromQuery = () => {
|
||||||
|
const query = route.query.table ? JSON.parse(route.query.table) : {};
|
||||||
|
shipped.value = query.shipped || shipped.toISOString();
|
||||||
|
Object.assign(userParams, { shipped });
|
||||||
|
};
|
||||||
function getApiUrl() {
|
function getApiUrl() {
|
||||||
return new URL(window.location).origin;
|
return new URL(window.location).origin;
|
||||||
}
|
}
|
||||||
|
@ -133,6 +152,11 @@ function downloadPdfs() {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
<VnSearchbar
|
||||||
|
:data-key
|
||||||
|
:label="t('route.cmr.search')"
|
||||||
|
:info="t('route.cmr.searchInfo')"
|
||||||
|
/>
|
||||||
<VnSubToolbar>
|
<VnSubToolbar>
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
@ -142,16 +166,16 @@ function downloadPdfs() {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="downloadPdfs"
|
@click="downloadPdfs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('route.cmr.list.downloadCmrs') }}</QTooltip>
|
<QTooltip>{{ t('route.cmr.params.downloadCmrs') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="CmrList"
|
:data-key
|
||||||
url="Cmrs/filter"
|
url="Cmrs/filter"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:right-search="true"
|
:user-params="userParams"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
v-model:selected="selectedRows"
|
v-model:selected="selectedRows"
|
||||||
table-height="85vh"
|
table-height="85vh"
|
||||||
|
|
|
@ -17,7 +17,7 @@ const onSave = (data, response) => {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
:update-url="`Roadmaps/${$route.params?.id}`"
|
:url-update="`Roadmaps/${$route.params?.id}`"
|
||||||
:url="`Roadmaps/${$route.params?.id}`"
|
:url="`Roadmaps/${$route.params?.id}`"
|
||||||
observe-form-changes
|
observe-form-changes
|
||||||
model="Roadmap"
|
model="Roadmap"
|
||||||
|
|
|
@ -15,6 +15,10 @@ const $props = defineProps({
|
||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
summary: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -26,7 +30,12 @@ const entityId = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor :url="`Roadmaps/${entityId}`" :filter="filter" data-key="Roadmap">
|
<CardDescriptor
|
||||||
|
:url="`Roadmaps/${entityId}`"
|
||||||
|
:filter="filter"
|
||||||
|
data-key="Roadmap"
|
||||||
|
:summary="summary"
|
||||||
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
<VnLv :label="t('Roadmap')" :value="entity?.name" />
|
||||||
<VnLv :label="t('ETD')" :value="toDateHourMin(entity?.etd)" />
|
<VnLv :label="t('ETD')" :value="toDateHourMin(entity?.etd)" />
|
||||||
|
|
|
@ -13,6 +13,7 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||||
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
|
import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue';
|
||||||
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
|
import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue';
|
||||||
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
import AgencyDescriptorProxy from 'pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import VnDms from 'components/common/VnDms.vue';
|
import VnDms from 'components/common/VnDms.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
|
@ -236,10 +237,16 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #column-id="{ row }">
|
<template #column-agencyModeName="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.routeFk }}
|
{{ row?.agencyModeName }}
|
||||||
<RouteDescriptorProxy :id="row.route.id" />
|
<AgencyDescriptorProxy :id="row?.agencyModeFk" v-if="row?.agencyModeFk" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-agencyAgreement="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.agencyAgreement }}
|
||||||
|
<AgencyDescriptorProxy :id="row?.agencyFk" v-if="row?.agencyFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-invoiceInFk="{ row }">
|
<template #column-invoiceInFk="{ row }">
|
||||||
|
|
|
@ -38,7 +38,7 @@ const routeFilter = {
|
||||||
};
|
};
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'right',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
label: 'Id',
|
label: 'Id',
|
||||||
chip: {
|
chip: {
|
||||||
|
@ -46,11 +46,11 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
isId: true,
|
isId: true,
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
width: '25px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'workerFk',
|
name: 'workerFk',
|
||||||
label: t('route.Worker'),
|
label: t('globals.worker'),
|
||||||
create: true,
|
create: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
@ -71,9 +71,8 @@ const columns = computed(() => [
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'agencyModeFk',
|
name: 'agencyModeFk',
|
||||||
label: t('route.Agency'),
|
label: t('globals.agency'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -90,9 +89,8 @@ const columns = computed(() => [
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'vehicleFk',
|
name: 'vehicleFk',
|
||||||
label: t('route.Vehicle'),
|
label: t('globals.vehicle'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
@ -111,9 +109,8 @@ const columns = computed(() => [
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'dated',
|
name: 'dated',
|
||||||
label: t('route.Date'),
|
label: t('globals.date'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -122,9 +119,8 @@ const columns = computed(() => [
|
||||||
dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated),
|
dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'from',
|
name: 'from',
|
||||||
label: t('route.From'),
|
label: t('globals.from'),
|
||||||
visible: false,
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -132,9 +128,8 @@ const columns = computed(() => [
|
||||||
format: ({ from }) => toDate(from),
|
format: ({ from }) => toDate(from),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'to',
|
name: 'to',
|
||||||
label: t('route.To'),
|
label: t('globals.to'),
|
||||||
visible: false,
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -142,30 +137,31 @@ const columns = computed(() => [
|
||||||
format: ({ date }) => toDate(date),
|
format: ({ date }) => toDate(date),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'right',
|
||||||
name: 'm3',
|
name: 'm3',
|
||||||
label: 'm3',
|
label: 'm3',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
|
width: '50px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'started',
|
name: 'started',
|
||||||
label: t('route.hourStarted'),
|
label: t('route.hourStarted'),
|
||||||
component: 'time',
|
component: 'time',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: ({ started }) => toHour(started),
|
format: ({ started }) => toHour(started),
|
||||||
|
width: '50px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'finished',
|
name: 'finished',
|
||||||
label: t('route.hourFinished'),
|
label: t('route.hourFinished'),
|
||||||
component: 'time',
|
component: 'time',
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: ({ finished }) => toHour(finished),
|
format: ({ finished }) => toHour(finished),
|
||||||
|
width: '50px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'right',
|
||||||
name: 'kmStart',
|
name: 'kmStart',
|
||||||
label: t('route.KmStart'),
|
label: t('route.KmStart'),
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
|
@ -173,7 +169,7 @@ const columns = computed(() => [
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'right',
|
||||||
name: 'kmEnd',
|
name: 'kmEnd',
|
||||||
label: t('route.KmEnd'),
|
label: t('route.KmEnd'),
|
||||||
columnClass: 'shrink',
|
columnClass: 'shrink',
|
||||||
|
@ -181,16 +177,15 @@ const columns = computed(() => [
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
align: 'left',
|
||||||
name: 'description',
|
name: 'description',
|
||||||
label: t('route.Description'),
|
label: t('globals.description'),
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
create: true,
|
create: true,
|
||||||
component: 'input',
|
component: 'input',
|
||||||
field: 'description',
|
field: 'description',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'center',
|
|
||||||
name: 'isOk',
|
name: 'isOk',
|
||||||
label: t('route.Served'),
|
label: t('route.Served'),
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
|
@ -202,7 +197,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('route.Add tickets'),
|
title: t('route.addTicket'),
|
||||||
icon: 'vn:ticketAdd',
|
icon: 'vn:ticketAdd',
|
||||||
action: (row) => openTicketsDialog(row?.id),
|
action: (row) => openTicketsDialog(row?.id),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
|
@ -214,7 +209,7 @@ const columns = computed(() => [
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('route.Route summary'),
|
title: t('route.routeSummary'),
|
||||||
icon: 'arrow_forward',
|
icon: 'arrow_forward',
|
||||||
action: (row) => navigate(row?.id),
|
action: (row) => navigate(row?.id),
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
|
@ -276,11 +271,13 @@ const openTicketsDialog = (id) => {
|
||||||
<QDialog v-model="confirmationDialog">
|
<QDialog v-model="confirmationDialog">
|
||||||
<QCard style="min-width: 350px">
|
<QCard style="min-width: 350px">
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<p class="text-h6 q-ma-none">{{ t('route.Select the starting date') }}</p>
|
<p class="text-h6 q-ma-none">
|
||||||
|
{{ t('route.extendedList.selectStartingDate') }}
|
||||||
|
</p>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pt-none">
|
<QCardSection class="q-pt-none">
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('route.Starting date')"
|
:label="t('route.extendedList.startingDate')"
|
||||||
v-model="startingDate"
|
v-model="startingDate"
|
||||||
autofocus
|
autofocus
|
||||||
/>
|
/>
|
||||||
|
@ -288,7 +285,7 @@ const openTicketsDialog = (id) => {
|
||||||
<QCardActions align="right">
|
<QCardActions align="right">
|
||||||
<QBtn
|
<QBtn
|
||||||
flat
|
flat
|
||||||
:label="t('route.Cancel')"
|
:label="t('globals.cancel')"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
/>
|
/>
|
||||||
|
@ -339,7 +336,7 @@ const openTicketsDialog = (id) => {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="confirmationDialog = true"
|
@click="confirmationDialog = true"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('route.Clone Selected Routes') }}</QTooltip>
|
<QTooltip>{{ t('route.extendedList.cloneSelectedRoutes') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="cloud_download"
|
icon="cloud_download"
|
||||||
|
@ -348,7 +345,9 @@ const openTicketsDialog = (id) => {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="showRouteReport"
|
@click="showRouteReport"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('route.Download selected routes as PDF') }}</QTooltip>
|
<QTooltip>{{
|
||||||
|
t('route.extendedList.downloadSelectedRoutes')
|
||||||
|
}}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="check"
|
icon="check"
|
||||||
|
@ -357,7 +356,7 @@ const openTicketsDialog = (id) => {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="markAsServed()"
|
@click="markAsServed()"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('route.Mark as served') }}</QTooltip>
|
<QTooltip>{{ t('route.extendedList.markServed') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
|
|
@ -7,8 +7,11 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
|
||||||
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import AgencyDescriptorProxy from 'src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue';
|
||||||
|
import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
import RouteTickets from './RouteTickets.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
@ -24,6 +27,12 @@ const routeFilter = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function redirectToTickets(id) {
|
||||||
|
const url = `#/route/${id}/tickets`;
|
||||||
|
window.open(url, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
@ -34,25 +43,29 @@ const columns = computed(() => [
|
||||||
condition: () => true,
|
condition: () => true,
|
||||||
},
|
},
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
width: '25px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
name: 'workerFk',
|
name: 'workerFk',
|
||||||
label: t('route.Worker'),
|
label: t('gloabls.worker'),
|
||||||
component: markRaw(VnSelectWorker),
|
component: markRaw(VnSelectWorker),
|
||||||
create: true,
|
create: true,
|
||||||
cardVisible: true,
|
|
||||||
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
|
width: '100px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
name: 'workerFk',
|
||||||
name: 'agencyName',
|
label: t('globals.worker'),
|
||||||
label: t('route.Agency'),
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('route.Agency'),
|
name: 'agencyName',
|
||||||
|
label: t('globals.agency'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('globals.Agency'),
|
||||||
name: 'agencyModeFk',
|
name: 'agencyModeFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
@ -68,14 +81,18 @@ const columns = computed(() => [
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
name: 'agencyName',
|
||||||
name: 'vehiclePlateNumber',
|
label: t('globals.agency'),
|
||||||
label: t('route.Vehicle'),
|
visible: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'vehiclePlateNumber',
|
||||||
|
label: t('globals.vehicle'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'vehicleFk',
|
name: 'vehicleFk',
|
||||||
label: t('route.Vehicle'),
|
label: t('globals.Vehicle'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
|
@ -93,25 +110,27 @@ const columns = computed(() => [
|
||||||
visible: false,
|
visible: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'center',
|
||||||
name: 'started',
|
name: 'started',
|
||||||
label: t('route.hourStarted'),
|
label: t('route.hourStarted'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: (row) => toHour(row.started),
|
format: ({ started }) => toHour(started),
|
||||||
|
width: '50px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'center',
|
||||||
name: 'finished',
|
name: 'finished',
|
||||||
label: t('route.hourFinished'),
|
label: t('route.hourFinished'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
format: (row) => toHour(row.started),
|
format: ({ finished }) => toHour(finished),
|
||||||
|
width: '50px',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'description',
|
name: 'description',
|
||||||
label: t('route.Description'),
|
label: t('globals.description'),
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -119,7 +138,6 @@ const columns = computed(() => [
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
name: 'isOk',
|
name: 'isOk',
|
||||||
label: t('route.Served'),
|
label: t('route.Served'),
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
|
@ -130,6 +148,12 @@ const columns = computed(() => [
|
||||||
align: 'right',
|
align: 'right',
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('globals.pageTitles.tickets'),
|
||||||
|
icon: 'vn:ticket',
|
||||||
|
action: (row) => redirectToTickets(row?.id),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t('components.smartCard.viewSummary'),
|
title: t('components.smartCard.viewSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
|
@ -155,6 +179,7 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<VnTable
|
<VnTable
|
||||||
|
:with-filters="false"
|
||||||
:data-key
|
:data-key
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@ -174,6 +199,24 @@ const columns = computed(() => [
|
||||||
<WorkerDescriptorProxy :id="row?.workerFk" v-if="row?.workerFk" />
|
<WorkerDescriptorProxy :id="row?.workerFk" v-if="row?.workerFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-agencyName="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.agencyName }}
|
||||||
|
<AgencyDescriptorProxy
|
||||||
|
:id="row?.agencyModeFk"
|
||||||
|
v-if="row?.agencyModeFk"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #column-vehiclePlateNumber="{ row }">
|
||||||
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.vehiclePlateNumber }}
|
||||||
|
<VehicleDescriptorProxy
|
||||||
|
:id="row?.vehicleFk"
|
||||||
|
v-if="row?.vehicleFk"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
</VnSection>
|
</VnSection>
|
||||||
|
|
|
@ -2,13 +2,11 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import { toDate, toDateHourMin } from 'filters/index';
|
import { toDate, toDateHourMin, toCurrency } from 'filters/index';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import { useSummaryDialog } from 'composables/useSummaryDialog';
|
import { useSummaryDialog } from 'composables/useSummaryDialog';
|
||||||
import toCurrency from 'filters/toCurrency';
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
||||||
|
@ -17,6 +15,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
import VnInputTime from 'src/components/common/VnInputTime.vue';
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
|
import RoadmapFilter from './Roadmap/RoadmapFilter.vue';
|
||||||
|
import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
|
||||||
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
|
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -33,7 +33,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
label: t('Roadmap'),
|
label: t('route.roadmap.roadmap'),
|
||||||
create: true,
|
create: true,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
|
@ -41,9 +41,9 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'center',
|
||||||
name: 'etd',
|
name: 'etd',
|
||||||
label: t('ETD'),
|
label: t('route.roadmap.etd'),
|
||||||
component: 'date',
|
component: 'date',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
|
@ -54,7 +54,7 @@ const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'supplierFk',
|
name: 'supplierFk',
|
||||||
label: t('Carrier'),
|
label: t('route.roadmap.carrier'),
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'suppliers',
|
url: 'suppliers',
|
||||||
|
@ -65,21 +65,21 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'tractorPlate',
|
name: 'tractorPlate',
|
||||||
label: t('Plate'),
|
label: t('route.roadmap.vehicle'),
|
||||||
field: (row) => row.tractorPlate,
|
field: (row) => row.tractorPlate,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'price',
|
name: 'price',
|
||||||
label: t('Price'),
|
label: t('route.roadmap.price'),
|
||||||
field: (row) => toCurrency(row.price),
|
format: ({ price }) => toCurrency(price),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'observations',
|
name: 'observations',
|
||||||
label: t('Observations'),
|
label: t('route.roadmap.observations'),
|
||||||
field: (row) => dashIfEmpty(row.observations),
|
field: (row) => dashIfEmpty(row.observations),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -89,7 +89,7 @@ const columns = computed(() => [
|
||||||
name: 'tableActions',
|
name: 'tableActions',
|
||||||
actions: [
|
actions: [
|
||||||
{
|
{
|
||||||
title: t('Ver cmr'),
|
title: t('route.roadmap.seeCmr'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
isPrimary: true,
|
isPrimary: true,
|
||||||
action: (row) => viewSummary(row?.id, RoadmapSummary),
|
action: (row) => viewSummary(row?.id, RoadmapSummary),
|
||||||
|
@ -124,8 +124,8 @@ function confirmRemove() {
|
||||||
.dialog({
|
.dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: t('Selected roadmaps will be removed'),
|
title: t('route.roadmap.selectedRoadmapsRemoved'),
|
||||||
message: t('Are you sure you want to continue?'),
|
message: t('route.roadmap.areYouSure'),
|
||||||
promise: removeSelection,
|
promise: removeSelection,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -157,15 +157,24 @@ function exprBuilder(param, value) {
|
||||||
<QCard style="min-width: 350px">
|
<QCard style="min-width: 350px">
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<p class="text-h6 q-ma-none">
|
<p class="text-h6 q-ma-none">
|
||||||
{{ t('Select the estimated date of departure (ETD)') }}
|
{{ t('route.roadmap.selectEtd') }}
|
||||||
</p>
|
</p>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
|
|
||||||
<QCardSection class="q-pt-none">
|
<QCardSection class="q-pt-none">
|
||||||
<VnInputDate :label="t('ETD')" v-model="etdDate" autofocus />
|
<VnInputDate
|
||||||
|
:label="t('route.roadmap.etd')"
|
||||||
|
v-model="etdDate"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardActions align="right">
|
<QCardActions align="right">
|
||||||
<QBtn flat :label="t('Cancel')" v-close-popup class="text-primary" />
|
<QBtn
|
||||||
|
flat
|
||||||
|
:label="t('globals.cancel')"
|
||||||
|
v-close-popup
|
||||||
|
class="text-primary"
|
||||||
|
/>
|
||||||
<QBtn color="primary" v-close-popup @click="cloneSelection">
|
<QBtn color="primary" v-close-popup @click="cloneSelection">
|
||||||
{{ t('globals.clone') }}
|
{{ t('globals.clone') }}
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
@ -181,7 +190,7 @@ function exprBuilder(param, value) {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="isCloneDialogOpen = true"
|
@click="isCloneDialogOpen = true"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Clone Selected Routes') }}</QTooltip>
|
<QTooltip>{{ t('route.roadmap.cloneSelected') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="delete"
|
icon="delete"
|
||||||
|
@ -190,7 +199,7 @@ function exprBuilder(param, value) {
|
||||||
:disable="!selectedRows?.length"
|
:disable="!selectedRows?.length"
|
||||||
@click="confirmRemove"
|
@click="confirmRemove"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Delete roadmap(s)') }}</QTooltip>
|
<QTooltip>{{ t('route.roadmap.deleteRoadmap') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
|
@ -222,7 +231,7 @@ function exprBuilder(param, value) {
|
||||||
redirect="route/roadmap"
|
redirect="route/roadmap"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Roadmaps',
|
urlCreate: 'Roadmaps',
|
||||||
title: t('Create routemap'),
|
title: t('route.roadmap.createRoadmap'),
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
onDataSaved: ({ id }) => tableRef.redirect(id),
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
|
@ -232,7 +241,10 @@ function exprBuilder(param, value) {
|
||||||
{{ toDateHourMin(row.etd) }}
|
{{ toDateHourMin(row.etd) }}
|
||||||
</template>
|
</template>
|
||||||
<template #column-supplierFk="{ row }">
|
<template #column-supplierFk="{ row }">
|
||||||
{{ row.supplierFk }}
|
<span class="link" @click.stop>
|
||||||
|
{{ row.driverName }}
|
||||||
|
<SupplierDescriptorProxy :id="row.supplierFk" />
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnInputDate v-model="data.etd" />
|
<VnInputDate v-model="data.etd" />
|
||||||
|
@ -251,21 +263,3 @@ function exprBuilder(param, value) {
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
|
||||||
es:
|
|
||||||
Create routemap: Crear troncal
|
|
||||||
Search roadmaps: Buscar troncales
|
|
||||||
You can search by roadmap reference: Puedes buscar por referencia del troncal
|
|
||||||
Delete roadmap(s): Eliminar troncal(es)
|
|
||||||
Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados
|
|
||||||
Are you sure you want to continue?: ¿Seguro que quieres continuar?
|
|
||||||
The date can't be empty: La fecha no puede estar vacía
|
|
||||||
Clone Selected Routes: Clonar rutas seleccionadas
|
|
||||||
Create roadmap: Crear troncal
|
|
||||||
Roadmap: Troncal
|
|
||||||
Carrier: Transportista
|
|
||||||
Plate: Matrícula
|
|
||||||
Price: Precio
|
|
||||||
Observations: Observaciones
|
|
||||||
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -37,9 +37,9 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'city',
|
name: 'client',
|
||||||
label: t('City'),
|
label: t('Client'),
|
||||||
field: (row) => row?.city,
|
field: (row) => row?.nickname,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
@ -51,9 +51,9 @@ const columns = computed(() => [
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'client',
|
name: 'city',
|
||||||
label: t('Client'),
|
label: t('City'),
|
||||||
field: (row) => row?.nickname,
|
field: (row) => row?.city,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,17 +1,29 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const entityId = computed(() => props.id || route.params.id);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
:url="`Vehicles/${$route.params.id}`"
|
:url="`Vehicles/${entityId}`"
|
||||||
data-key="Vehicle"
|
data-key="Vehicle"
|
||||||
title="numberPlate"
|
title="numberPlate"
|
||||||
:to-module="{ name: 'VehicleList' }"
|
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<QItem
|
<QItem
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<script setup>
|
||||||
|
import VehicleDescriptor from 'pages/Route/Vehicle/Card/VehicleDescriptor.vue';
|
||||||
|
import VehicleSummary from './VehicleSummary.vue';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
summary: {
|
||||||
|
type: Object,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<QPopupProxy>
|
||||||
|
<VehicleDescriptor v-if="$props.id" :id="$props.id" :summary="VehicleSummary" />
|
||||||
|
</QPopupProxy>
|
||||||
|
</template>
|
|
@ -13,12 +13,13 @@ const props = defineProps({ id: { type: [Number, String], default: null } });
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const entityId = computed(() => props.id || +route.params.id);
|
const entityId = computed(() => props.id || +route.params.id);
|
||||||
|
const baseLink = `#/${route.meta.moduleName.toLowerCase()}/vehicle/${entityId.value}`;
|
||||||
const links = {
|
const links = {
|
||||||
'basic-data': `#/vehicle/${entityId.value}/basic-data`,
|
'basic-data': `${baseLink}/basic-data`,
|
||||||
notes: `#/vehicle/${entityId.value}/notes`,
|
notes: `${baseLink}/notes`,
|
||||||
dms: `#/vehicle/${entityId.value}/dms`,
|
dms: `${baseLink}/dms`,
|
||||||
'invoice-in': `#/vehicle/${entityId.value}/invoice-in`,
|
'invoice-in': `${baseLink}/invoice-in`,
|
||||||
events: `#/vehicle/${entityId.value}/events`,
|
events: `${baseLink}/events`,
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -54,7 +55,10 @@ const links = {
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity.supplier?.name }}
|
{{ entity.supplier?.name }}
|
||||||
<SupplierDescriptorProxy :id="entity.supplierFk" />
|
<SupplierDescriptorProxy
|
||||||
|
v-if="entity.supplierFk"
|
||||||
|
:id="entity.supplierFk"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
@ -63,6 +67,7 @@ const links = {
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity.supplierCooler?.name }}
|
{{ entity.supplierCooler?.name }}
|
||||||
<SupplierDescriptorProxy
|
<SupplierDescriptorProxy
|
||||||
|
v-if="entity.supplierCoolerFk"
|
||||||
:id="entity.supplierCoolerFk"
|
:id="entity.supplierCoolerFk"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -116,6 +116,7 @@ const columns = computed(() => [
|
||||||
title: t('components.smartCard.openSummary'),
|
title: t('components.smartCard.openSummary'),
|
||||||
icon: 'preview',
|
icon: 'preview',
|
||||||
action: (row) => viewSummary(row.id, VehicleSummary),
|
action: (row) => viewSummary(row.id, VehicleSummary),
|
||||||
|
isPrimary: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,48 +1,79 @@
|
||||||
route:
|
route:
|
||||||
|
filter:
|
||||||
|
Served: Served
|
||||||
|
extendedList:
|
||||||
|
selectStartingDate: Select the starting date
|
||||||
|
startingDate: Starting date
|
||||||
|
cloneSelectedRoutes: Clone selected routes
|
||||||
|
downloadSelectedRoutes: Download selected routes as PDF
|
||||||
|
markServed: Mark as served
|
||||||
roadmap:
|
roadmap:
|
||||||
|
roadmap: Roadmap
|
||||||
|
carrier: Carrier
|
||||||
|
vehicle: Vehicle
|
||||||
|
price: Price
|
||||||
|
observations: Observations
|
||||||
|
etd: ETD
|
||||||
|
dateCantEmpty: The date can't be empty
|
||||||
|
createRoadmap: Create roadmap
|
||||||
|
deleteRoadmap: Delete roadmap(s)
|
||||||
|
cloneSelected: Clone selected routes
|
||||||
|
selectedRoadmapsRemoved: Selected roadmaps will be removed
|
||||||
|
areYouSure: Are you sure you want to continue?
|
||||||
|
selectEtd: Select the estimated date of departure (ETD)
|
||||||
search: Search roadmap
|
search: Search roadmap
|
||||||
searchInfo: You can search by roadmap reference
|
searchInfo: You can search by roadmap reference
|
||||||
params:
|
params:
|
||||||
|
warehouseFk: Warehouse
|
||||||
|
description: Description
|
||||||
|
m3: m³
|
||||||
|
scopeDays: Days Onward
|
||||||
|
vehicleFk: Vehicle
|
||||||
|
agencyModeFk: Agency
|
||||||
|
workerFk: Worker
|
||||||
|
from: From
|
||||||
|
to: To
|
||||||
|
isOk: Served
|
||||||
etd: ETD
|
etd: ETD
|
||||||
tractorPlate: Plate
|
tractorPlate: Plate
|
||||||
price: Price
|
price: Price
|
||||||
observations: Observations
|
observations: Observations
|
||||||
id: ID
|
id: Id
|
||||||
name: Name
|
name: Name
|
||||||
cmrFk: CMR id
|
cmrFk: CMR id
|
||||||
hasCmrDms: Attached in gestdoc
|
hasCmrDms: Attached in gestdoc
|
||||||
ticketFk: Ticketd id
|
ticketFk: Ticketd id
|
||||||
routeFk: Route id
|
routeFk: Route id
|
||||||
|
clientFk: Client id
|
||||||
|
countryFk: Country
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
agencyAgreement: Agency agreement
|
agencyAgreement: Agency agreement
|
||||||
agencyModeName: Agency route
|
agencyModeName: Agency route
|
||||||
|
isOwn: Own
|
||||||
|
isAnyVolumeallowed: Any volume allowed
|
||||||
Worker: Worker
|
Worker: Worker
|
||||||
Agency: Agency
|
Agency: Agency
|
||||||
Vehicle: Vehicle
|
Vehicle: Vehicle
|
||||||
Description: Description
|
Description: Description
|
||||||
hourStarted: H.Start
|
hourStarted: H.Start
|
||||||
hourFinished: H.End
|
hourFinished: H.End
|
||||||
dated: Dated
|
createRoute: Create route
|
||||||
From: From
|
|
||||||
To: To
|
|
||||||
Date: Date
|
Date: Date
|
||||||
KmStart: Km start
|
KmStart: Km start
|
||||||
KmEnd: Km end
|
KmEnd: Km end
|
||||||
Served: Served
|
Served: Served
|
||||||
Clone Selected Routes: Clone selected routes
|
addTicket: Add ticket
|
||||||
Select the starting date: Select the starting date
|
routeSummary: Go to summary
|
||||||
Stating date: Starting date
|
|
||||||
Cancel: Cancel
|
|
||||||
Mark as served: Mark as served
|
|
||||||
Download selected routes as PDF: Download selected routes as PDF
|
|
||||||
Add ticket: Add ticket
|
|
||||||
Summary: Summary
|
|
||||||
Route is closed: Route is closed
|
Route is closed: Route is closed
|
||||||
Route is not served: Route is not served
|
Route is not served: Route is not served
|
||||||
search: Search route
|
search: Search route
|
||||||
searchInfo: You can search by route reference
|
searchInfo: You can search by route reference
|
||||||
|
dated: Dated
|
||||||
|
preview: Preview
|
||||||
cmr:
|
cmr:
|
||||||
list:
|
search: Search Cmr
|
||||||
|
searchInfo: You can search Cmr by Id
|
||||||
|
params:
|
||||||
results: results
|
results: results
|
||||||
cmrFk: CMR id
|
cmrFk: CMR id
|
||||||
hasCmrDms: Attached in gestdoc
|
hasCmrDms: Attached in gestdoc
|
||||||
|
@ -50,8 +81,10 @@ route:
|
||||||
'false': 'No'
|
'false': 'No'
|
||||||
ticketFk: Ticketd id
|
ticketFk: Ticketd id
|
||||||
routeFk: Route id
|
routeFk: Route id
|
||||||
country: Country
|
countryFk: Country
|
||||||
clientFk: Client id
|
clientFk: Client id
|
||||||
|
warehouseFk: Warehouse
|
||||||
shipped: Preparation date
|
shipped: Preparation date
|
||||||
viewCmr: View CMR
|
viewCmr: View CMR
|
||||||
downloadCmrs: Download CMRs
|
downloadCmrs: Download CMRs
|
||||||
|
search: General search
|
||||||
|
|
|
@ -1,21 +1,57 @@
|
||||||
route:
|
route:
|
||||||
|
filter:
|
||||||
|
Served: Servida
|
||||||
|
extendedList:
|
||||||
|
selectStartingDate: Seleccione la fecha de inicio
|
||||||
|
statingDate: Fecha de inicio
|
||||||
|
cloneSelectedRoutes: Clonar rutas seleccionadas
|
||||||
|
downloadSelectedRoutes: Descargar rutas seleccionadas como PDF
|
||||||
|
markServed: Marcar como servidas
|
||||||
roadmap:
|
roadmap:
|
||||||
|
roadmap: Troncal
|
||||||
|
carrier: Transportista
|
||||||
|
vehicle: Vehículo
|
||||||
|
price: Precio
|
||||||
|
observations: Observaciones
|
||||||
|
etd: ETD
|
||||||
|
dateCantEmpty: La fecha no puede estar vacía
|
||||||
|
createRoadmap: Crear troncal
|
||||||
|
deleteRoadmap: Eliminar troncal(es)
|
||||||
|
cloneSelected: Clonar rutas seleccionadas
|
||||||
|
selectedRoadmapsRemoved: Los troncales seleccionadas serán eliminados
|
||||||
|
areYouSure: ¿Seguro que quieres continuar?
|
||||||
|
selectEtd: Selecciona la fecha estimada de salida
|
||||||
search: Buscar troncales
|
search: Buscar troncales
|
||||||
searchInfo: Puedes buscar por referencia del troncal
|
searchInfo: Puedes buscar por referencia del troncal
|
||||||
params:
|
params:
|
||||||
agencyModeName: Agencia Ruta
|
warehouseFk: Almacén
|
||||||
agencyAgreement: Agencia Acuerdo
|
description: Descripción
|
||||||
id: Id
|
m3: m³
|
||||||
name: Troncal
|
scopeDays: Días adelante
|
||||||
|
vehicleFk: Vehículo
|
||||||
|
agencyModeFk: Agencia
|
||||||
|
workerFk: Trabajador
|
||||||
|
from: Desde
|
||||||
|
to: Hasta
|
||||||
|
isOk: Servida
|
||||||
etd: ETD
|
etd: ETD
|
||||||
tractorPlate: Matrícula
|
tractorPlate: Matrícula
|
||||||
price: Precio
|
price: Precio
|
||||||
observations: Observaciones
|
observations: Observaciones
|
||||||
|
id: Id
|
||||||
|
name: Troncal
|
||||||
cmrFk: Id CMR
|
cmrFk: Id CMR
|
||||||
hasCmrDms: Gestdoc
|
hasCmrDms: Gestdoc
|
||||||
|
search: Búsqueda general
|
||||||
ticketFk: Id ticket
|
ticketFk: Id ticket
|
||||||
routeFK: Id ruta
|
routeFk: Id ruta
|
||||||
|
clientFk: Id cliente
|
||||||
|
countryFk: Pais
|
||||||
shipped: Fecha preparación
|
shipped: Fecha preparación
|
||||||
|
agencyModeName: Agencia Ruta
|
||||||
|
agencyAgreement: Agencia Acuerdo
|
||||||
|
isOwn: Propio
|
||||||
|
isAnyVolumeAllowed: Cualquier volumen
|
||||||
Worker: Trabajador
|
Worker: Trabajador
|
||||||
Agency: Agencia
|
Agency: Agencia
|
||||||
Vehicle: Vehículo
|
Vehicle: Vehículo
|
||||||
|
@ -23,25 +59,18 @@ route:
|
||||||
hourStarted: H.Inicio
|
hourStarted: H.Inicio
|
||||||
hourFinished: H.Fin
|
hourFinished: H.Fin
|
||||||
createRoute: Crear ruta
|
createRoute: Crear ruta
|
||||||
From: Desde
|
|
||||||
To: Hasta
|
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
KmStart: Km inicio
|
KmStart: Km inicio
|
||||||
KmEnd: Km fin
|
KmEnd: Km fin
|
||||||
Served: Servida
|
Served: Servida
|
||||||
Clone Selected Routes: Clonar rutas seleccionadas
|
addTicket: Añadir tickets
|
||||||
Select the starting date: Seleccione la fecha de inicio
|
routeSummary: Ir a vista previa
|
||||||
Stating date: Fecha de inicio
|
|
||||||
Cancel: Cancelar
|
|
||||||
Mark as served: Marcar como servidas
|
|
||||||
Download selected routes as PDF: Descargar rutas seleccionadas como PDF
|
|
||||||
Add ticket: Añadir tickets
|
|
||||||
preview: Vista previa
|
|
||||||
Summary: Resumen
|
|
||||||
Route is closed: La ruta está cerrada
|
Route is closed: La ruta está cerrada
|
||||||
Route is not served: La ruta no está servida
|
Route is not served: La ruta no está servida
|
||||||
search: Buscar rutas
|
search: Buscar rutas
|
||||||
searchInfo: Puedes buscar por referencia de la ruta
|
searchInfo: Puedes buscar por referencia de la ruta
|
||||||
|
dated: Fecha
|
||||||
|
preview: Vista previa
|
||||||
cmr:
|
cmr:
|
||||||
list:
|
list:
|
||||||
results: resultados
|
results: resultados
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -46,19 +47,7 @@ const emit = defineEmits(['search']);
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-sm">
|
<QItem class="q-mb-sm">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelectWorker v-model="params.userFk" outlined rounded />
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
rounded
|
|
||||||
:label="t('params.userFk')"
|
|
||||||
v-model="params.userFk"
|
|
||||||
url="Workers/activeWithInheritedRole"
|
|
||||||
option-value="id"
|
|
||||||
option-label="firstName"
|
|
||||||
:where="{ role: 'salesPerson' }"
|
|
||||||
sort-by="firstName ASC"
|
|
||||||
:use-like="false"
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mb-md">
|
<QItem class="q-mb-md">
|
||||||
|
|
|
@ -6,6 +6,7 @@ import VnLv from 'components/ui/VnLv.vue';
|
||||||
import VnUserLink from 'components/ui/VnUserLink.vue';
|
import VnUserLink from 'components/ui/VnUserLink.vue';
|
||||||
import filter from './ShelvingFilter.js';
|
import filter from './ShelvingFilter.js';
|
||||||
import ShelvingDescriptorMenu from './ShelvingDescriptorMenu.vue';
|
import ShelvingDescriptorMenu from './ShelvingDescriptorMenu.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -38,13 +39,10 @@ const entityId = computed(() => $props.id || route.params.id);
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<RouterLink
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/shelving/${entityId}/basic-data`"
|
||||||
:to="{ name: 'ShelvingBasicData', params: { id: entityId } }"
|
:text="$t('globals.pageTitles.basicData')"
|
||||||
>
|
/>
|
||||||
{{ $t('globals.pageTitles.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</RouterLink>
|
|
||||||
<VnLv :label="$t('globals.code')" :value="entity.code" />
|
<VnLv :label="$t('globals.code')" :value="entity.code" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="$t('shelving.list.parking')"
|
:label="$t('shelving.list.parking')"
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -28,13 +29,10 @@ const filter = {
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/shelving/parking/${entityId}/basic-data`"
|
||||||
:href="`#/parking/${entityId}/basic-data`"
|
:text="$t('globals.pageTitles.basicData')"
|
||||||
>
|
/>
|
||||||
{{ t('globals.pageTitles.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||||
<VnLv
|
<VnLv
|
||||||
|
|
|
@ -203,7 +203,7 @@ onMounted(async () => {
|
||||||
</QTr>
|
</QTr>
|
||||||
<QTr v-for="(buy, index) in row.buys" :key="index">
|
<QTr v-for="(buy, index) in row.buys" :key="index">
|
||||||
<QTd no-hover>
|
<QTd no-hover>
|
||||||
<QBtn flat color="blue" dense no-caps>{{ buy.itemName }}</QBtn>
|
<QBtn flat class="link" dense no-caps>{{ buy.itemName }}</QBtn>
|
||||||
<ItemDescriptorProxy :id="buy.itemFk" />
|
<ItemDescriptorProxy :id="buy.itemFk" />
|
||||||
</QTd>
|
</QTd>
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ const getPriceDifference = async () => {
|
||||||
shipped: ticket.value.shipped,
|
shipped: ticket.value.shipped,
|
||||||
};
|
};
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
`tickets/${ticket.value.id}/priceDifference`,
|
`tickets/${formData.value.id}/priceDifference`,
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
ticket.value.sale = data;
|
ticket.value.sale = data;
|
||||||
};
|
};
|
||||||
|
@ -71,8 +71,8 @@ const submit = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data } = await axios.post(
|
const { data } = await axios.post(
|
||||||
`tickets/${ticket.value.id}/componentUpdate`,
|
`tickets/${formData.value.id}/componentUpdate`,
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
@ -99,7 +99,7 @@ const onNextStep = async () => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('basicData.negativesConfirmTitle'),
|
t('basicData.negativesConfirmTitle'),
|
||||||
t('basicData.negativesConfirmMessage'),
|
t('basicData.negativesConfirmMessage'),
|
||||||
submitWithNegatives
|
submitWithNegatives,
|
||||||
);
|
);
|
||||||
else submit();
|
else submit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,15 @@ import { ref, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import DepartmentDescriptorProxy from 'pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import TicketDescriptorMenu from './TicketDescriptorMenu.vue';
|
import TicketDescriptorMenu from './TicketDescriptorMenu.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|
||||||
import { toDateTimeFormat } from 'src/filters/date';
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
import filter from './TicketFilter.js';
|
import filter from './TicketFilter.js';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import TicketProblems from 'src/components/TicketProblems.vue';
|
import TicketProblems from 'src/components/TicketProblems.vue';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -31,23 +32,37 @@ const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
const problems = ref({});
|
const problems = ref({});
|
||||||
|
const originalTicket = ref();
|
||||||
|
|
||||||
function ticketFilter(ticket) {
|
function ticketFilter(ticket) {
|
||||||
return JSON.stringify({ clientFk: ticket.clientFk });
|
return JSON.stringify({ clientFk: ticket.clientFk });
|
||||||
}
|
}
|
||||||
|
async function getClaims() {
|
||||||
|
const userFilter = { where: { refundTicketFk: entityId.value } };
|
||||||
|
const { data } = await axios.get(`TicketRefunds`, {
|
||||||
|
params: { filter: JSON.stringify(userFilter) },
|
||||||
|
});
|
||||||
|
if (!data) return;
|
||||||
|
originalTicket.value = data[0]?.originalTicketFk;
|
||||||
|
}
|
||||||
|
async function getProblems() {
|
||||||
|
const { data } = await axios.get(`Tickets/${entityId.value}/getTicketProblems`);
|
||||||
|
if (!data) return;
|
||||||
|
problems.value = data[0];
|
||||||
|
}
|
||||||
|
function getInfo() {
|
||||||
|
getClaims();
|
||||||
|
getProblems();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
:url="`Tickets/${entityId}/getTicketProblems`"
|
|
||||||
auto-load
|
|
||||||
@on-fetch="(data) => ([problems] = data)"
|
|
||||||
/>
|
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
:url="`Tickets/${entityId}`"
|
:url="`Tickets/${entityId}`"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="Ticket"
|
data-key="Ticket"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
|
@on-fetch="getInfo"
|
||||||
width="lg-width"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
|
@ -73,12 +88,12 @@ function ticketFilter(ticket) {
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('globals.salesPerson')">
|
<VnLv :label="t('customer.summary.team')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link">
|
||||||
:name="entity.client?.salesPersonUser?.name"
|
{{ entity?.client?.department?.name || '-' }}
|
||||||
:worker-id="entity.client?.salesPersonFk"
|
<DepartmentDescriptorProxy :id="entity?.client?.departmentFk" />
|
||||||
/>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
|
@ -95,7 +110,7 @@ function ticketFilter(ticket) {
|
||||||
</template>
|
</template>
|
||||||
<template #icons="{ entity }">
|
<template #icons="{ entity }">
|
||||||
<QCardActions class="q-gutter-x-xs">
|
<QCardActions class="q-gutter-x-xs">
|
||||||
<TicketProblems :row="{ ...entity?.client, ...problems }" />
|
<TicketProblems :row="{ ...entity?.client, ...problems, ...entity }" />
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
|
@ -129,6 +144,15 @@ function ticketFilter(ticket) {
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('ticket.card.newOrder') }}</QTooltip>
|
<QTooltip>{{ t('ticket.card.newOrder') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
v-if="originalTicket"
|
||||||
|
size="md"
|
||||||
|
icon="vn:claims"
|
||||||
|
color="primary"
|
||||||
|
:to="{ name: 'TicketCard', params: { id: originalTicket } }"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('ticket.card.ticketClaimed') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
|
|
|
@ -33,7 +33,7 @@ const save = (sale = $props.sale) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getMana = async () => {
|
const getMana = async () => {
|
||||||
const { data } = await axios.get(`Tickets/${route.params.id}/getSalesPersonMana`);
|
const { data } = await axios.get(`Tickets/${route.params.id}/getDepartmentMana`);
|
||||||
mana.value = data;
|
mana.value = data;
|
||||||
await getUsesMana();
|
await getUsesMana();
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ export default {
|
||||||
fields: [
|
fields: [
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
'salesPersonFk',
|
'departmentFk',
|
||||||
'phone',
|
'phone',
|
||||||
'mobile',
|
'mobile',
|
||||||
'email',
|
'email',
|
||||||
|
@ -29,7 +29,7 @@ export default {
|
||||||
fields: ['id', 'lang'],
|
fields: ['id', 'lang'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ relation: 'salesPersonUser' },
|
{ relation: 'department' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -174,22 +174,26 @@ const getSaleTotal = (sale) => {
|
||||||
return price - discount;
|
return price - discount;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getRowUpdateInputEvents = (sale) => ({
|
const getRowUpdateInputEvents = (sale) => {
|
||||||
|
return {
|
||||||
'keyup.enter': () => {
|
'keyup.enter': () => {
|
||||||
changeQuantity(sale);
|
changeQuantity(sale);
|
||||||
},
|
},
|
||||||
blur: () => {
|
blur: () => {
|
||||||
changeQuantity(sale);
|
changeQuantity(sale);
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const resetChanges = async () => {
|
const resetChanges = async () => {
|
||||||
arrayData.fetch({ append: false });
|
arrayData.fetch({ append: false });
|
||||||
tableRef.value.reload();
|
tableRef.value.reload();
|
||||||
|
selectedRows.value = [];
|
||||||
};
|
};
|
||||||
const changeQuantity = async (sale) => {
|
const changeQuantity = async (sale) => {
|
||||||
if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
|
if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
|
||||||
return;
|
return;
|
||||||
|
else sale.originalQuantity = sale.quantity;
|
||||||
if (!sale.id) return addSale(sale);
|
if (!sale.id) return addSale(sale);
|
||||||
|
|
||||||
if (await isSalePrepared(sale)) {
|
if (await isSalePrepared(sale)) {
|
||||||
|
@ -235,7 +239,7 @@ const addSale = async (sale) => {
|
||||||
|
|
||||||
notify('globals.dataSaved', 'positive');
|
notify('globals.dataSaved', 'positive');
|
||||||
sale.isNew = false;
|
sale.isNew = false;
|
||||||
arrayData.fetch({});
|
resetChanges();
|
||||||
};
|
};
|
||||||
const changeConcept = async (sale) => {
|
const changeConcept = async (sale) => {
|
||||||
if (await isSalePrepared(sale)) {
|
if (await isSalePrepared(sale)) {
|
||||||
|
@ -258,6 +262,18 @@ const DEFAULT_EDIT = {
|
||||||
oldQuantity: null,
|
oldQuantity: null,
|
||||||
};
|
};
|
||||||
const edit = ref({ ...DEFAULT_EDIT });
|
const edit = ref({ ...DEFAULT_EDIT });
|
||||||
|
const usesMana = ref(null);
|
||||||
|
|
||||||
|
const getUsesMana = async () => {
|
||||||
|
const { data } = await axios.get('Sales/usesMana');
|
||||||
|
usesMana.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getMana = async () => {
|
||||||
|
const { data } = await axios.get(`Tickets/${route.params.id}/getDepartmentMana`);
|
||||||
|
mana.value = data;
|
||||||
|
await getUsesMana();
|
||||||
|
};
|
||||||
|
|
||||||
const selectedValidSales = computed(() => {
|
const selectedValidSales = computed(() => {
|
||||||
if (!sales.value) return;
|
if (!sales.value) return;
|
||||||
|
@ -310,7 +326,7 @@ const changeDiscount = async (sale) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateDiscounts = async (sales, newDiscount = null) => {
|
const updateDiscounts = async (sales, newDiscount) => {
|
||||||
const salesTracking = await fetchSalesTracking();
|
const salesTracking = await fetchSalesTracking();
|
||||||
|
|
||||||
const someSaleIsPrepared = salesTracking.some((sale) =>
|
const someSaleIsPrepared = salesTracking.some((sale) =>
|
||||||
|
@ -320,12 +336,11 @@ const updateDiscounts = async (sales, newDiscount = null) => {
|
||||||
else updateDiscount(sales, newDiscount);
|
else updateDiscount(sales, newDiscount);
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateDiscount = async (sales, newDiscount = null) => {
|
const updateDiscount = async (sales, newDiscount = 0) => {
|
||||||
const saleIds = sales.map((sale) => sale.id);
|
const salesIds = sales.map(({ id }) => id);
|
||||||
const _newDiscount = newDiscount || edit.value.discount;
|
|
||||||
const params = {
|
const params = {
|
||||||
salesIds: saleIds,
|
salesIds,
|
||||||
newDiscount: _newDiscount,
|
newDiscount,
|
||||||
manaCode: manaCode.value,
|
manaCode: manaCode.value,
|
||||||
};
|
};
|
||||||
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
|
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
|
||||||
|
@ -474,7 +489,7 @@ const endNewRow = (row) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
async function confirmUpdate(cb) {
|
async function confirmUpdate(cb) {
|
||||||
await quasar
|
quasar
|
||||||
.dialog({
|
.dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
@ -664,6 +679,7 @@ watch(
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
|
:search-url="false"
|
||||||
:column-search="false"
|
:column-search="false"
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
auto-load
|
auto-load
|
||||||
|
@ -703,7 +719,7 @@ watch(
|
||||||
</template>
|
</template>
|
||||||
<template #column-image="{ row }">
|
<template #column-image="{ row }">
|
||||||
<div class="image-wrapper">
|
<div class="image-wrapper">
|
||||||
<VnImg :id="parseInt(row?.item?.id)" class="rounded" />
|
<VnImg v-if="row.item" :id="parseInt(row?.item?.id)" class="rounded" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #column-visible="{ row }">
|
<template #column-visible="{ row }">
|
||||||
|
@ -751,7 +767,7 @@ watch(
|
||||||
{{ row?.item?.subName.toUpperCase() }}
|
{{ row?.item?.subName.toUpperCase() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="row.item" :max-length="6" />
|
<FetchedTags v-if="row.item" :item="row.item" :max-length="6" />
|
||||||
<QPopupProxy v-if="row.id && isTicketEditable">
|
<QPopupProxy v-if="row.id && isTicketEditable">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="row.concept"
|
v-model="row.concept"
|
||||||
|
|
|
@ -62,8 +62,6 @@ const isClaimable = computed(() => {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
const hasReserves = computed(() => props.sales.some((sale) => sale.reserved == true));
|
|
||||||
|
|
||||||
const sendSms = async (params) => {
|
const sendSms = async (params) => {
|
||||||
await axios.post(`Tickets/${ticket.value.id}/sendSms`, params);
|
await axios.post(`Tickets/${ticket.value.id}/sendSms`, params);
|
||||||
notify(t('SMS sent'), 'positive');
|
notify(t('SMS sent'), 'positive');
|
||||||
|
@ -144,14 +142,6 @@ const onCreateClaimAccepted = async () => {
|
||||||
push({ name: 'ClaimBasicData', params: { id: data.id } });
|
push({ name: 'ClaimBasicData', params: { id: data.id } });
|
||||||
};
|
};
|
||||||
|
|
||||||
const setReserved = async (reserved) => {
|
|
||||||
const params = { ticketId: ticket.value.id, sales: props.sales, reserved: reserved };
|
|
||||||
await axios.post(`Sales/reserve`, params);
|
|
||||||
props.sales.forEach((sale) => {
|
|
||||||
sale.reserved = reserved;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const createRefund = async (withWarehouse) => {
|
const createRefund = async (withWarehouse) => {
|
||||||
if (!props.ticket) return;
|
if (!props.ticket) return;
|
||||||
|
|
||||||
|
@ -252,18 +242,6 @@ const createRefund = async (withWarehouse) => {
|
||||||
<QItemLabel>{{ t('Mark as reserved') }}</QItemLabel>
|
<QItemLabel>{{ t('Mark as reserved') }}</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem
|
|
||||||
v-if="isTicketEditable && hasReserves"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
v-ripple
|
|
||||||
@click="setReserved(false)"
|
|
||||||
data-cy="unmarkAsReservedItem"
|
|
||||||
>
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>{{ t('Unmark as reserved') }}</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem clickable v-ripple data-cy="ticketSaleRefundItem">
|
<QItem clickable v-ripple data-cy="ticketSaleRefundItem">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QItemLabel>{{ t('Refund') }}</QItemLabel>
|
<QItemLabel>{{ t('Refund') }}</QItemLabel>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue