7336_devToTest #354
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -5,14 +5,33 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2420.01]
|
||||||
|
|
||||||
|
## [2418.01]
|
||||||
|
|
||||||
|
## [2416.01] - 2024-04-18
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro
|
||||||
|
|
||||||
## [2414.01] - 2024-04-04
|
## [2414.01] - 2024-04-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- (Tickets) => Se añade la opción de clonar ticket. #6951
|
||||||
|
- (Parking) => Se añade la sección Parking. #5186
|
||||||
|
|
||||||
|
- (Rutas) => Se añade el campo "servida" a la tabla y se añade también a los filtros. #7130
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- (General) => Se corrige la redirección cuando hay 1 solo registro y cuando se aplica un filtro diferente al id al hacer una búsqueda general. #6893
|
||||||
|
|
||||||
## [2400.01] - 2024-01-04
|
## [2400.01] - 2024-01-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -3,6 +3,7 @@ const { defineConfig } = require('cypress');
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: 'http://localhost:9000/',
|
baseUrl: 'http://localhost:9000/',
|
||||||
|
experimentalStudio: true,
|
||||||
fixturesFolder: 'test/cypress/fixtures',
|
fixturesFolder: 'test/cypress/fixtures',
|
||||||
screenshotsFolder: 'test/cypress/screenshots',
|
screenshotsFolder: 'test/cypress/screenshots',
|
||||||
supportFile: 'test/cypress/support/index.js',
|
supportFile: 'test/cypress/support/index.js',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.14.0",
|
"version": "24.20.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
"@intlify/unplugin-vue-i18n": "^0.8.1",
|
"@intlify/unplugin-vue-i18n": "^0.8.1",
|
||||||
"@pinia/testing": "^0.1.2",
|
"@pinia/testing": "^0.1.2",
|
||||||
"@quasar/app-vite": "^1.7.3",
|
"@quasar/app-vite": "^1.7.3",
|
||||||
|
"@quasar/quasar-app-extension-qcalendar": "4.0.0-beta.15",
|
||||||
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
|
||||||
"@vue/test-utils": "^2.4.4",
|
"@vue/test-utils": "^2.4.4",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
|
|
14476
pnpm-lock.yaml
14476
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
// app boot file (/src/boot)
|
// app boot file (/src/boot)
|
||||||
// --> boot files are part of "main.js"
|
// --> boot files are part of "main.js"
|
||||||
// https://v2.quasar.dev/quasar-cli/boot-files
|
// https://v2.quasar.dev/quasar-cli/boot-files
|
||||||
boot: ['i18n', 'axios', 'vnDate', 'validations'],
|
boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar.defaults'],
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
||||||
css: ['app.scss'],
|
css: ['app.scss'],
|
||||||
|
@ -93,13 +93,11 @@ module.exports = configure(function (/* ctx */) {
|
||||||
[
|
[
|
||||||
VueI18nPlugin({
|
VueI18nPlugin({
|
||||||
runtimeOnly: false,
|
runtimeOnly: false,
|
||||||
|
include: [
|
||||||
|
path.resolve(__dirname, './src/i18n/locale/**'),
|
||||||
|
path.resolve(__dirname, './src/pages/**/locale/**'),
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
{
|
|
||||||
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
|
|
||||||
// compositionOnly: false,
|
|
||||||
// you need to set i18n resource including paths !
|
|
||||||
include: path.resolve(__dirname, './src/i18n/**'),
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -117,6 +115,7 @@ module.exports = configure(function (/* ctx */) {
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
open: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
"@quasar/testing-unit-vitest": {
|
"@quasar/testing-unit-vitest": {
|
||||||
"options": [
|
"options": ["scripts"]
|
||||||
"scripts"
|
},
|
||||||
]
|
"@quasar/qcalendar": {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ onMounted(() => {
|
||||||
if (availableLocales.includes(userLang)) {
|
if (availableLocales.includes(userLang)) {
|
||||||
locale.value = userLang;
|
locale.value = userLang;
|
||||||
} else {
|
} else {
|
||||||
locale.value = fallbackLocale;
|
locale.value = fallbackLocale.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { QTable } from 'quasar';
|
||||||
|
import setDefault from './setDefault';
|
||||||
|
|
||||||
|
setDefault(QTable, 'pagination', { rowsPerPage: 0 });
|
||||||
|
setDefault(QTable, 'hidePagination', true);
|
|
@ -0,0 +1,18 @@
|
||||||
|
export default function (component, key, value) {
|
||||||
|
const prop = component.props[key];
|
||||||
|
switch (typeof prop) {
|
||||||
|
case 'object':
|
||||||
|
prop.default = value;
|
||||||
|
break;
|
||||||
|
case 'function':
|
||||||
|
component.props[key] = {
|
||||||
|
type: prop,
|
||||||
|
default: value,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case 'undefined':
|
||||||
|
throw new Error('unknown prop: ' + key);
|
||||||
|
default:
|
||||||
|
throw new Error('unhandled type: ' + typeof prop);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import { getCurrentInstance } from 'vue';
|
||||||
|
|
||||||
|
const filterAvailableInput = element => element.classList.contains('q-field__native') && !element.disabled
|
||||||
|
const filterAvailableText = element => element.__vueParentComponent.type.name === 'QInput' && element.__vueParentComponent?.attrs?.class !== 'vn-input-date';
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mounted: function () {
|
||||||
|
const vm = getCurrentInstance();
|
||||||
|
if (vm.type.name === 'QForm')
|
||||||
|
if (!['searchbarForm','filterPanelForm'].includes(this.$el?.id)) {
|
||||||
|
// AUTOFOCUS
|
||||||
|
const elementsArray = Array.from(this.$el.elements);
|
||||||
|
const firstInputElement = elementsArray.filter(filterAvailableInput).find(filterAvailableText);
|
||||||
|
|
||||||
|
if (firstInputElement) {
|
||||||
|
firstInputElement.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
export * from './defaults/qTable';
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { boot } from 'quasar/wrappers';
|
||||||
|
import qFormMixin from './qformMixin';
|
||||||
|
|
||||||
|
export default boot(({ app }) => {
|
||||||
|
app.mixin(qFormMixin);
|
||||||
|
});
|
|
@ -28,8 +28,23 @@ const countriesOptions = ref([]);
|
||||||
const provincesOptions = ref([]);
|
const provincesOptions = ref([]);
|
||||||
const townsLocationOptions = ref([]);
|
const townsLocationOptions = ref([]);
|
||||||
|
|
||||||
const onDataSaved = (dataSaved) => {
|
const onDataSaved = (formData) => {
|
||||||
emit('onDataSaved', dataSaved);
|
const newPostcode = {
|
||||||
|
...formData
|
||||||
|
};
|
||||||
|
const townObject = townsLocationOptions.value.find(
|
||||||
|
({id}) => id === formData.townFk
|
||||||
|
);
|
||||||
|
newPostcode.town = townObject?.name;
|
||||||
|
const provinceObject = provincesOptions.value.find(
|
||||||
|
({id}) => id === formData.provinceFk
|
||||||
|
);
|
||||||
|
newPostcode.province = provinceObject?.name;
|
||||||
|
const countryObject = countriesOptions.value.find(
|
||||||
|
({id}) => id === formData.countryFk
|
||||||
|
);
|
||||||
|
newPostcode.country = countryObject?.country;
|
||||||
|
emit('onDataSaved', newPostcode);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCityCreated = async ({ name, provinceFk }, formData) => {
|
const onCityCreated = async ({ name, provinceFk }, formData) => {
|
||||||
|
@ -73,7 +88,7 @@ const onProvinceCreated = async ({ name }, formData) => {
|
||||||
:title="t('New postcode')"
|
:title="t('New postcode')"
|
||||||
:subtitle="t('Please, ensure you put the correct data!')"
|
:subtitle="t('Please, ensure you put the correct data!')"
|
||||||
:form-initial-data="postcodeFormData"
|
:form-initial-data="postcodeFormData"
|
||||||
@on-data-saved="onDataSaved($event)"
|
@on-data-saved="onDataSaved"
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data, validate }">
|
<template #form-inputs="{ data, validate }">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
|
|
@ -24,6 +24,10 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
limit: {
|
||||||
|
type: Number,
|
||||||
|
default: 20,
|
||||||
|
},
|
||||||
saveUrl: {
|
saveUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -76,6 +80,7 @@ defineExpose({
|
||||||
reset,
|
reset,
|
||||||
hasChanges,
|
hasChanges,
|
||||||
saveChanges,
|
saveChanges,
|
||||||
|
getChanges,
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetch(data) {
|
async function fetch(data) {
|
||||||
|
@ -260,6 +265,7 @@ watch(formUrl, async () => {
|
||||||
<template>
|
<template>
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
:url="url"
|
:url="url"
|
||||||
|
:limit="limit"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@on-fetch="fetch"
|
@on-fetch="fetch"
|
||||||
:skeleton="false"
|
:skeleton="false"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { h, onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -60,3 +60,6 @@ async function fetch(fetchFilter = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<template>
|
||||||
|
<template></template>
|
||||||
|
</template>
|
||||||
|
|
|
@ -202,7 +202,6 @@ const selectItem = ({ id }) => {
|
||||||
<QTable
|
<QTable
|
||||||
:columns="tableColumns"
|
:columns="tableColumns"
|
||||||
:rows="tableRows"
|
:rows="tableRows"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:hide-header="!tableRows || !tableRows.length > 0"
|
:hide-header="!tableRows || !tableRows.length > 0"
|
||||||
:no-data-label="t('Enter a new search')"
|
:no-data-label="t('Enter a new search')"
|
||||||
|
|
|
@ -200,7 +200,6 @@ const selectTravel = ({ id }) => {
|
||||||
<QTable
|
<QTable
|
||||||
:columns="tableColumns"
|
:columns="tableColumns"
|
||||||
:rows="tableRows"
|
:rows="tableRows"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:hide-header="!tableRows || !tableRows.length > 0"
|
:hide-header="!tableRows || !tableRows.length > 0"
|
||||||
:no-data-label="t('Enter a new search')"
|
:no-data-label="t('Enter a new search')"
|
||||||
|
|
|
@ -81,6 +81,7 @@ const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||||
const componentIsRendered = ref(false);
|
const componentIsRendered = ref(false);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
originalData.value = $props.formInitialData;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
componentIsRendered.value = true;
|
componentIsRendered.value = true;
|
||||||
});
|
});
|
||||||
|
@ -101,16 +102,16 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onBeforeRouteLeave((to, from, next) => {
|
onBeforeRouteLeave((to, from, next) => {
|
||||||
if (!hasChanges.value) next();
|
if (hasChanges.value)
|
||||||
|
quasar.dialog({
|
||||||
quasar.dialog({
|
component: VnConfirm,
|
||||||
component: VnConfirm,
|
componentProps: {
|
||||||
componentProps: {
|
title: t('Unsaved changes will be lost'),
|
||||||
title: t('Unsaved changes will be lost'),
|
message: t('Are you sure exit without saving?'),
|
||||||
message: t('Are you sure exit without saving?'),
|
promise: () => next(),
|
||||||
promise: () => next(),
|
},
|
||||||
},
|
});
|
||||||
});
|
else next();
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
@ -126,18 +127,18 @@ const isLoading = ref(false);
|
||||||
// Si elegimos observar los cambios del form significa que inicialmente las actions estaran deshabilitadas
|
// Si elegimos observar los cambios del form significa que inicialmente las actions estaran deshabilitadas
|
||||||
const isResetting = ref(false);
|
const isResetting = ref(false);
|
||||||
const hasChanges = ref(!$props.observeFormChanges);
|
const hasChanges = ref(!$props.observeFormChanges);
|
||||||
const originalData = ref({ ...$props.formInitialData });
|
const originalData = ref({});
|
||||||
const formData = computed(() => state.get($props.model));
|
const formData = computed(() => state.get($props.model));
|
||||||
const formUrl = computed(() => $props.url);
|
const formUrl = computed(() => $props.url);
|
||||||
const defaultButtons = computed(() => ({
|
const defaultButtons = computed(() => ({
|
||||||
save: {
|
save: {
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
icon: 'restart_alt',
|
icon: 'save',
|
||||||
label: 'globals.save',
|
label: 'globals.save',
|
||||||
},
|
},
|
||||||
reset: {
|
reset: {
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
icon: 'save',
|
icon: 'restart_alt',
|
||||||
label: 'globals.reset',
|
label: 'globals.reset',
|
||||||
},
|
},
|
||||||
...$props.defaultButtons,
|
...$props.defaultButtons,
|
||||||
|
@ -154,14 +155,18 @@ const startFormWatcher = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
async function fetch() {
|
async function fetch() {
|
||||||
const { data } = await axios.get($props.url, {
|
try {
|
||||||
params: { filter: JSON.stringify($props.filter) },
|
const { data } = await axios.get($props.url, {
|
||||||
});
|
params: { filter: JSON.stringify($props.filter) },
|
||||||
|
});
|
||||||
|
state.set($props.model, data);
|
||||||
|
originalData.value = data && JSON.parse(JSON.stringify(data));
|
||||||
|
|
||||||
state.set($props.model, data);
|
emit('onFetch', state.get($props.model));
|
||||||
originalData.value = data && JSON.parse(JSON.stringify(data));
|
} catch (error) {
|
||||||
|
state.set($props.model, {});
|
||||||
emit('onFetch', state.get($props.model));
|
originalData.value = {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function save() {
|
async function save() {
|
||||||
|
@ -227,6 +232,7 @@ watch(formUrl, async () => {
|
||||||
defineExpose({
|
defineExpose({
|
||||||
save,
|
save,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
hasChanges,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -284,6 +290,9 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.q-notifications {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
#formModel {
|
#formModel {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -78,6 +78,7 @@ defineExpose({
|
||||||
<div class="q-mt-lg row justify-end">
|
<div class="q-mt-lg row justify-end">
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
|
:title="t('globals.save')"
|
||||||
type="submit"
|
type="submit"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
|
@ -85,14 +86,22 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.cancel')"
|
:label="t('globals.cancel')"
|
||||||
|
:title="t('globals.cancel')"
|
||||||
type="reset"
|
type="reset"
|
||||||
color="primary"
|
color="primary"
|
||||||
flat
|
flat
|
||||||
class="q-ml-sm"
|
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
/>
|
/>
|
||||||
|
<QBtn
|
||||||
|
:label="t('globals.save')"
|
||||||
|
type="submit"
|
||||||
|
color="primary"
|
||||||
|
class="q-ml-sm"
|
||||||
|
:disabled="isLoading"
|
||||||
|
:loading="isLoading"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
|
@ -56,14 +56,6 @@ const closeForm = () => {
|
||||||
<p>{{ subtitle }}</p>
|
<p>{{ subtitle }}</p>
|
||||||
<slot name="form-inputs" />
|
<slot name="form-inputs" />
|
||||||
<div class="q-mt-lg row justify-end">
|
<div class="q-mt-lg row justify-end">
|
||||||
<QBtn
|
|
||||||
v-if="defaultSubmitButton"
|
|
||||||
:label="customSubmitButtonLabel || t('globals.save')"
|
|
||||||
type="submit"
|
|
||||||
color="primary"
|
|
||||||
:disabled="isLoading"
|
|
||||||
:loading="isLoading"
|
|
||||||
/>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
v-if="defaultCancelButton"
|
v-if="defaultCancelButton"
|
||||||
:label="t('globals.cancel')"
|
:label="t('globals.cancel')"
|
||||||
|
@ -74,6 +66,14 @@ const closeForm = () => {
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
/>
|
/>
|
||||||
|
<QBtn
|
||||||
|
v-if="defaultSubmitButton"
|
||||||
|
:label="customSubmitButtonLabel || t('globals.save')"
|
||||||
|
type="submit"
|
||||||
|
color="primary"
|
||||||
|
:disabled="isLoading"
|
||||||
|
:loading="isLoading"
|
||||||
|
/>
|
||||||
<slot name="customButtons" />
|
<slot name="customButtons" />
|
||||||
</div>
|
</div>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, reactive } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { QSeparator, useQuasar } from 'quasar';
|
import { QSeparator, useQuasar } from 'quasar';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
@ -22,6 +22,8 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const expansionItemElements = reactive({});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await navigation.fetchPinned();
|
await navigation.fetchPinned();
|
||||||
getRoutes();
|
getRoutes();
|
||||||
|
@ -108,6 +110,10 @@ async function togglePinned(item, event) {
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleItemExpansion = (itemName) => {
|
||||||
|
expansionItemElements[itemName].scrollToLastElement();
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -213,8 +219,12 @@ async function togglePinned(item, event) {
|
||||||
:icon="item.icon"
|
:icon="item.icon"
|
||||||
:label="t(item.title)"
|
:label="t(item.title)"
|
||||||
:content-inset-level="0.5"
|
:content-inset-level="0.5"
|
||||||
|
@after-show="handleItemExpansion(item.name)"
|
||||||
>
|
>
|
||||||
<LeftMenuItemGroup :item="item" />
|
<LeftMenuItemGroup
|
||||||
|
:ref="(el) => (expansionItemElements[item.name] = el)"
|
||||||
|
:item="item"
|
||||||
|
/>
|
||||||
</QExpansionItem>
|
</QExpansionItem>
|
||||||
</QList>
|
</QList>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t, te } = useI18n();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
|
@ -11,19 +11,25 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const item = computed(() => props.item); // eslint-disable-line vue/no-dupe-keys
|
const itemComputed = computed(() => {
|
||||||
|
const item = JSON.parse(JSON.stringify(props.item));
|
||||||
|
const [, , section] = item.title.split('.');
|
||||||
|
|
||||||
|
if (!te(item.title)) item.title = t(`globals.pageTitles.${section}`);
|
||||||
|
return item;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QItem active-class="text-primary" :to="{ name: item.name }" clickable v-ripple>
|
<QItem active-class="bg-hover" :to="{ name: itemComputed.name }" clickable v-ripple>
|
||||||
<QItemSection avatar v-if="item.icon">
|
<QItemSection avatar v-if="itemComputed.icon">
|
||||||
<QIcon :name="item.icon" />
|
<QIcon :name="itemComputed.icon" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection avatar v-if="!item.icon">
|
<QItemSection avatar v-if="!itemComputed.icon">
|
||||||
<QIcon name="disabled_by_default" />
|
<QIcon name="disabled_by_default" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection>{{ t(item.title) }}</QItemSection>
|
<QItemSection>{{ t(itemComputed.title) }}</QItemSection>
|
||||||
<QItemSection side>
|
<QItemSection side>
|
||||||
<slot name="side" :item="item" />
|
<slot name="side" :item="itemComputed" />
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import LeftMenuItem from './LeftMenuItem.vue';
|
import LeftMenuItem from './LeftMenuItem.vue';
|
||||||
|
import { elementIsVisibleInViewport } from 'src/composables/elementIsVisibleInViewport';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
|
@ -13,10 +14,27 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const groupEnd = ref(null);
|
||||||
|
|
||||||
|
const scrollToLastElement = () => {
|
||||||
|
if (groupEnd.value && !elementIsVisibleInViewport(groupEnd.value)) {
|
||||||
|
groupEnd.value.scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'end',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const item = computed(() => props.item); // eslint-disable-line vue/no-dupe-keys
|
const item = computed(() => props.item); // eslint-disable-line vue/no-dupe-keys
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
scrollToLastElement,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<template v-for="section in item.children" :key="section.name">
|
<template v-for="section in item.children" :key="section.name">
|
||||||
<LeftMenuItem :item="section" />
|
<LeftMenuItem :item="section" />
|
||||||
</template>
|
</template>
|
||||||
|
<div ref="groupEnd" />
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -7,12 +7,16 @@ import axios from 'axios';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { localeEquivalence } from 'src/i18n/index';
|
import { localeEquivalence } from 'src/i18n/index';
|
||||||
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
import { useClipboard } from 'src/composables/useClipboard';
|
import { useClipboard } from 'src/composables/useClipboard';
|
||||||
|
import { ref } from 'vue';
|
||||||
const { copyText } = useClipboard();
|
const { copyText } = useClipboard();
|
||||||
const userLocale = computed({
|
const userLocale = computed({
|
||||||
get() {
|
get() {
|
||||||
|
@ -45,6 +49,9 @@ const darkMode = computed({
|
||||||
|
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const token = session.getTokenMultimedia();
|
const token = session.getTokenMultimedia();
|
||||||
|
const warehousesData = ref();
|
||||||
|
const companiesData = ref();
|
||||||
|
const accountBankData = ref();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
updatePreferences();
|
updatePreferences();
|
||||||
|
@ -87,10 +94,28 @@ function copyUserToken() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="Warehouses"
|
||||||
|
order="name"
|
||||||
|
@on-fetch="(data) => (warehousesData = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="Companies"
|
||||||
|
order="name"
|
||||||
|
@on-fetch="(data) => (companiesData = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="Accountings"
|
||||||
|
order="name"
|
||||||
|
@on-fetch="(data) => (accountBankData = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<QMenu anchor="bottom left" class="bg-vn-section-color">
|
<QMenu anchor="bottom left" class="bg-vn-section-color">
|
||||||
<div class="row no-wrap q-pa-md">
|
<div class="row no-wrap q-pa-md">
|
||||||
<div class="column panel">
|
<div class="col column">
|
||||||
<div class="text-h6 q-mb-md">
|
<div class="text-h6 q-ma-sm q-mb-none">
|
||||||
{{ t('components.userPanel.settings') }}
|
{{ t('components.userPanel.settings') }}
|
||||||
</div>
|
</div>
|
||||||
<QToggle
|
<QToggle
|
||||||
|
@ -114,7 +139,7 @@ function copyUserToken() {
|
||||||
|
|
||||||
<QSeparator vertical inset class="q-mx-lg" />
|
<QSeparator vertical inset class="q-mx-lg" />
|
||||||
|
|
||||||
<div class="column items-center panel">
|
<div class="col column items-center q-mb-sm">
|
||||||
<QAvatar size="80px">
|
<QAvatar size="80px">
|
||||||
<QImg
|
<QImg
|
||||||
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
|
||||||
|
@ -131,7 +156,6 @@ function copyUserToken() {
|
||||||
>
|
>
|
||||||
@{{ user.name }}
|
@{{ user.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
id="logout"
|
id="logout"
|
||||||
color="orange"
|
color="orange"
|
||||||
|
@ -141,17 +165,63 @@ function copyUserToken() {
|
||||||
icon="logout"
|
icon="logout"
|
||||||
@click="logout()"
|
@click="logout()"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
dense
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<QSeparator inset class="q-mx-lg" />
|
||||||
|
<div class="col q-gutter-xs q-pa-md">
|
||||||
|
<VnRow>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('components.userPanel.localWarehouse')"
|
||||||
|
v-model="user.localWarehouseFk"
|
||||||
|
:options="warehousesData"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
/>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('components.userPanel.localBank')"
|
||||||
|
hide-selected
|
||||||
|
v-model="user.localBankFk"
|
||||||
|
:options="accountBankData"
|
||||||
|
option-label="bank"
|
||||||
|
option-value="id"
|
||||||
|
></VnSelectFilter>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('components.userPanel.localCompany')"
|
||||||
|
hide-selected
|
||||||
|
v-model="user.companyFk"
|
||||||
|
:options="companiesData"
|
||||||
|
option-label="code"
|
||||||
|
option-value="id"
|
||||||
|
/>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('components.userPanel.userWarehouse')"
|
||||||
|
hide-selected
|
||||||
|
v-model="user.warehouseFk"
|
||||||
|
:options="warehousesData"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('components.userPanel.userCompany')"
|
||||||
|
hide-selected
|
||||||
|
v-model="user.companyFk"
|
||||||
|
:options="companiesData"
|
||||||
|
option-label="code"
|
||||||
|
option-value="id"
|
||||||
|
style="flex: 0"
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
</div>
|
||||||
</QMenu>
|
</QMenu>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.panel {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyText {
|
.copyText {
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: alias;
|
cursor: alias;
|
||||||
|
|
|
@ -5,16 +5,16 @@ import { useQuasar } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useCamelCase } from 'src/composables/useCamelCase';
|
import { useCamelCase } from 'src/composables/useCamelCase';
|
||||||
|
|
||||||
const router = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const quasar = useQuasar();
|
const { screen } = useQuasar();
|
||||||
const { t } = useI18n();
|
const { t, te } = useI18n();
|
||||||
|
|
||||||
let matched = ref([]);
|
let matched = ref([]);
|
||||||
let breadcrumbs = ref([]);
|
let breadcrumbs = ref([]);
|
||||||
let root = ref(null);
|
let root = ref(null);
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
matched.value = router.currentRoute.value.matched.filter(
|
matched.value = currentRoute.value.matched.filter(
|
||||||
(matched) => Object.keys(matched.meta).length
|
(matched) => Object.keys(matched.meta).length
|
||||||
);
|
);
|
||||||
breadcrumbs.value.length = 0;
|
breadcrumbs.value.length = 0;
|
||||||
|
@ -34,13 +34,17 @@ function getBreadcrumb(param) {
|
||||||
icon: param.meta.icon,
|
icon: param.meta.icon,
|
||||||
path: param.path,
|
path: param.path,
|
||||||
root: root.value,
|
root: root.value,
|
||||||
|
locale: t(`globals.pageTitles.${param.meta.title}`),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (quasar.screen.gt.sm) {
|
if (screen.gt.sm) {
|
||||||
breadcrumb.name = param.name;
|
breadcrumb.name = param.name;
|
||||||
breadcrumb.title = useCamelCase(param.meta.title);
|
breadcrumb.title = useCamelCase(param.meta.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const moduleLocale = `${breadcrumb.root}.pageTitles.${breadcrumb.title}`;
|
||||||
|
if (te(moduleLocale)) breadcrumb.locale = t(moduleLocale);
|
||||||
|
|
||||||
return breadcrumb;
|
return breadcrumb;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -50,7 +54,7 @@ function getBreadcrumb(param) {
|
||||||
v-for="(breadcrumb, index) of breadcrumbs"
|
v-for="(breadcrumb, index) of breadcrumbs"
|
||||||
:key="index"
|
:key="index"
|
||||||
:icon="breadcrumb.icon"
|
:icon="breadcrumb.icon"
|
||||||
:label="t(`${breadcrumb.root}.pageTitles.${breadcrumb.title}`)"
|
:label="breadcrumb.locale"
|
||||||
:to="breadcrumb.path"
|
:to="breadcrumb.path"
|
||||||
/>
|
/>
|
||||||
</QBreadcrumbs>
|
</QBreadcrumbs>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useCapitalize } from 'src/composables/useCapitalize';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: { type: String, default: '' },
|
modelValue: { type: [String, Number], default: '' },
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
|
@ -198,9 +198,13 @@ function addDefaultData(data) {
|
||||||
en:
|
en:
|
||||||
contentTypesInfo: Allowed file types {allowedContentTypes}
|
contentTypesInfo: Allowed file types {allowedContentTypes}
|
||||||
EntryDmsDescription: Reference {reference}
|
EntryDmsDescription: Reference {reference}
|
||||||
|
WorkersDescription: Working of employee id {reference}
|
||||||
|
SupplierDmsDescription: Reference {reference}
|
||||||
es:
|
es:
|
||||||
Generate identifier for original file: Generar identificador para archivo original
|
Generate identifier for original file: Generar identificador para archivo original
|
||||||
contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes}
|
contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes}
|
||||||
EntryDmsDescription: Referencia {reference}
|
EntryDmsDescription: Referencia {reference}
|
||||||
|
WorkersDescription: Laboral del empleado {reference}
|
||||||
|
SupplierDmsDescription: Referencia {reference}
|
||||||
|
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -5,9 +5,11 @@ import { useRoute } from 'vue-router';
|
||||||
import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar';
|
import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||||
import VnDms from 'src/components/common/VnDms.vue';
|
import VnDms from 'src/components/common/VnDms.vue';
|
||||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
import VnUserLink from '../ui/VnUserLink.vue';
|
||||||
import { downloadFile } from 'src/composables/downloadFile';
|
import { downloadFile } from 'src/composables/downloadFile';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -26,6 +28,15 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
deleteModel: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
downloadModel: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
defaultDmsCode: {
|
defaultDmsCode: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -74,7 +85,7 @@ const dmsFilter = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
order: ['dmsFk DESC'],
|
where: { [$props.filter]: route.params.id },
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -94,12 +105,12 @@ const columns = computed(() => [
|
||||||
props: (prop) => ({
|
props: (prop) => ({
|
||||||
readonly: true,
|
readonly: true,
|
||||||
borderless: true,
|
borderless: true,
|
||||||
'model-value': prop.row.dmsType.name,
|
'model-value': prop.row.dmsType?.name,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'order',
|
field: 'hardCopyNumber',
|
||||||
label: t('globals.order'),
|
label: t('globals.order'),
|
||||||
name: 'order',
|
name: 'order',
|
||||||
component: 'span',
|
component: 'span',
|
||||||
|
@ -117,6 +128,7 @@ const columns = computed(() => [
|
||||||
label: t('globals.description'),
|
label: t('globals.description'),
|
||||||
name: 'description',
|
name: 'description',
|
||||||
component: 'span',
|
component: 'span',
|
||||||
|
props: (prop) => ({ value: prop.value?.toUpperCase() }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -136,21 +148,53 @@ const columns = computed(() => [
|
||||||
name: 'file',
|
name: 'file',
|
||||||
component: 'span',
|
component: 'span',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'worker',
|
||||||
|
label: t('globals.worker'),
|
||||||
|
name: 'worker',
|
||||||
|
component: VnUserLink,
|
||||||
|
props: (prop) => ({
|
||||||
|
name: prop.row.worker?.user?.name.toLowerCase(),
|
||||||
|
workerId: prop.row.worker?.id,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'created',
|
||||||
|
label: t('globals.created'),
|
||||||
|
name: 'created',
|
||||||
|
component: VnInputDate,
|
||||||
|
props: (prop) => ({
|
||||||
|
disable: true,
|
||||||
|
'model-value': prop.row.created,
|
||||||
|
}),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'options',
|
field: 'options',
|
||||||
name: 'options',
|
name: 'options',
|
||||||
components: [
|
components: [
|
||||||
{
|
{
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
|
name: 'download',
|
||||||
|
isDocuware: true,
|
||||||
props: () => ({
|
props: () => ({
|
||||||
icon: 'cloud_download',
|
icon: 'cloud_download',
|
||||||
flat: true,
|
flat: true,
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
}),
|
}),
|
||||||
click: (prop) => downloadFile(prop.row.id),
|
click: (prop) =>
|
||||||
|
downloadFile(
|
||||||
|
prop.row.id,
|
||||||
|
$props.downloadModel,
|
||||||
|
undefined,
|
||||||
|
prop.row.download
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
|
name: 'edit',
|
||||||
|
external: false,
|
||||||
props: () => ({
|
props: () => ({
|
||||||
icon: 'edit',
|
icon: 'edit',
|
||||||
flat: true,
|
flat: true,
|
||||||
|
@ -160,6 +204,8 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
|
name: 'delete',
|
||||||
|
external: false,
|
||||||
props: () => ({
|
props: () => ({
|
||||||
icon: 'delete',
|
icon: 'delete',
|
||||||
flat: true,
|
flat: true,
|
||||||
|
@ -167,12 +213,24 @@ const columns = computed(() => [
|
||||||
}),
|
}),
|
||||||
click: (prop) => deleteDms(prop.row.id),
|
click: (prop) => deleteDms(prop.row.id),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: QBtn,
|
||||||
|
name: 'open',
|
||||||
|
external: true,
|
||||||
|
props: () => ({
|
||||||
|
icon: 'open_in_new',
|
||||||
|
flat: true,
|
||||||
|
color: 'primary',
|
||||||
|
}),
|
||||||
|
click: (prop) => open(prop.row.url),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function setData(data) {
|
function setData(data) {
|
||||||
const newData = data.map((value) => value.dms);
|
const newData = data.map((value) => value.dms || value);
|
||||||
|
newData.sort((a, b) => new Date(b.created) - new Date(a.created));
|
||||||
rows.value = newData;
|
rows.value = newData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +244,7 @@ function deleteDms(dmsFk) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
await axios.post(`${$props.model}/${dmsFk}/removeFile`);
|
await axios.post(`${$props.deleteModel ?? $props.model}/${dmsFk}/removeFile`);
|
||||||
const index = rows.value.findIndex((row) => row.id == dmsFk);
|
const index = rows.value.findIndex((row) => row.id == dmsFk);
|
||||||
rows.value.splice(index, 1);
|
rows.value.splice(index, 1);
|
||||||
});
|
});
|
||||||
|
@ -206,85 +264,106 @@ function parseDms(data) {
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function open(url) {
|
||||||
|
window.open(url).focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function shouldRenderButton(button, isExternal = false) {
|
||||||
|
if (button.name == 'download') return true;
|
||||||
|
return button.external === isExternal;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<VnPaginate
|
||||||
ref="dmsRef"
|
ref="dmsRef"
|
||||||
|
:data-key="$props.model"
|
||||||
:url="$props.model"
|
:url="$props.model"
|
||||||
:filter="dmsFilter"
|
:filter="dmsFilter"
|
||||||
:where="{ [$props.filter]: route.params.id }"
|
:order="['dmsFk DESC']"
|
||||||
|
:auto-load="true"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
auto-load
|
|
||||||
/>
|
|
||||||
<QTable
|
|
||||||
:columns="columns"
|
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
:rows="rows"
|
|
||||||
class="full-width q-mt-md"
|
|
||||||
hide-bottom
|
|
||||||
row-key="clientFk"
|
|
||||||
:grid="$q.screen.lt.sm"
|
|
||||||
>
|
>
|
||||||
<template #body-cell="props">
|
<template #body>
|
||||||
<QTd :props="props">
|
<QTable
|
||||||
<QTr :props="props">
|
:columns="columns"
|
||||||
<component
|
:rows="rows"
|
||||||
v-if="props.col.component"
|
class="full-width q-mt-md"
|
||||||
:is="props.col.component"
|
hide-bottom
|
||||||
v-bind="props.col.props && props.col.props(props)"
|
row-key="clientFk"
|
||||||
>
|
:grid="$q.screen.lt.sm"
|
||||||
<span
|
>
|
||||||
v-if="props.col.component == 'span'"
|
<template #body-cell="props">
|
||||||
style="white-space: wrap"
|
<QTd :props="props">
|
||||||
>{{ props.value }}</span
|
<QTr :props="props">
|
||||||
>
|
<component
|
||||||
</component>
|
v-if="props.col.component"
|
||||||
</QTr>
|
:is="props.col.component"
|
||||||
|
v-bind="props.col.props && props.col.props(props)"
|
||||||
<div class="flex justify-center" v-if="props.col.name == 'options'">
|
>
|
||||||
<div v-for="button of props.col.components" :key="button.id">
|
<span
|
||||||
<component
|
v-if="props.col.component == 'span'"
|
||||||
:is="button.component"
|
style="white-space: wrap"
|
||||||
v-bind="button.props(props)"
|
>{{ props.value }}</span
|
||||||
@click="button.click(props)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
|
||||||
<template #item="props">
|
|
||||||
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
|
|
||||||
<QCard
|
|
||||||
bordered
|
|
||||||
flat
|
|
||||||
@keyup.ctrl.enter.stop="claimDevelopmentForm?.saveChanges()"
|
|
||||||
>
|
|
||||||
<QSeparator />
|
|
||||||
<QList dense>
|
|
||||||
<QItem v-for="col in props.cols" :key="col.name">
|
|
||||||
<div v-if="col.name != 'options'" class="row">
|
|
||||||
<span class="labelColor">{{ col.label }}:</span>
|
|
||||||
<span>{{ col.value }}</span>
|
|
||||||
</div>
|
|
||||||
<div v-if="col.name == 'options'" class="row">
|
|
||||||
<div
|
|
||||||
v-for="button of col.components"
|
|
||||||
:key="button.id"
|
|
||||||
class="row"
|
|
||||||
>
|
>
|
||||||
<component
|
</component>
|
||||||
:is="button.component"
|
</QTr>
|
||||||
v-bind="button.props(col)"
|
|
||||||
@click="button.click(col)"
|
<div class="row no-wrap" v-if="props.col.name == 'options'">
|
||||||
/>
|
<div v-for="button of props.col.components" :key="button.id">
|
||||||
</div>
|
<component
|
||||||
|
v-if="
|
||||||
|
shouldRenderButton(button, props.row.isDocuware)
|
||||||
|
"
|
||||||
|
:is="button.component"
|
||||||
|
v-bind="button.props(props)"
|
||||||
|
@click="button.click(props)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</QItem>
|
</div>
|
||||||
</QList>
|
</QTd>
|
||||||
</QCard>
|
</template>
|
||||||
</div>
|
<template #item="props">
|
||||||
|
<div class="q-pa-xs col-xs-12 col-sm-6 grid-style-transition">
|
||||||
|
<QCard
|
||||||
|
bordered
|
||||||
|
flat
|
||||||
|
@keyup.ctrl.enter.stop="claimDevelopmentForm?.saveChanges()"
|
||||||
|
>
|
||||||
|
<QSeparator />
|
||||||
|
<QList dense>
|
||||||
|
<QItem v-for="col in props.cols" :key="col.name">
|
||||||
|
<div v-if="col.name != 'options'" class="row">
|
||||||
|
<span class="labelColor">{{ col.label }}:</span>
|
||||||
|
<span>{{ col.value }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="col.name == 'options'" class="row">
|
||||||
|
<div
|
||||||
|
v-for="button of col.components"
|
||||||
|
:key="button.id"
|
||||||
|
class="row"
|
||||||
|
>
|
||||||
|
<component
|
||||||
|
v-if="
|
||||||
|
shouldRenderButton(
|
||||||
|
button.name,
|
||||||
|
props.row.isDocuware
|
||||||
|
)
|
||||||
|
"
|
||||||
|
:is="button.component"
|
||||||
|
v-bind="button.props(col)"
|
||||||
|
@click="button.click(col)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</QItem>
|
||||||
|
</QList>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</VnPaginate>
|
||||||
<QDialog v-model="formDialog.show">
|
<QDialog v-model="formDialog.show">
|
||||||
<VnDms
|
<VnDms
|
||||||
:model="updateModel ?? model"
|
:model="updateModel ?? model"
|
||||||
|
|
|
@ -26,7 +26,7 @@ const value = computed({
|
||||||
emit('update:modelValue', value);
|
emit('update:modelValue', value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const hover = ref(false);
|
||||||
const styleAttrs = computed(() => {
|
const styleAttrs = computed(() => {
|
||||||
return $props.isOutlined
|
return $props.isOutlined
|
||||||
? {
|
? {
|
||||||
|
@ -41,6 +41,10 @@ const onEnterPress = () => {
|
||||||
emit('keyup.enter');
|
emit('keyup.enter');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleValue = (val = null) => {
|
||||||
|
value.value = val;
|
||||||
|
};
|
||||||
|
|
||||||
const focus = () => {
|
const focus = () => {
|
||||||
vnInputRef.value.focus();
|
vnInputRef.value.focus();
|
||||||
};
|
};
|
||||||
|
@ -51,20 +55,33 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QInput
|
<div
|
||||||
ref="vnInputRef"
|
@mouseover="hover = true"
|
||||||
v-model="value"
|
@mouseleave="hover = false"
|
||||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
|
||||||
type="text"
|
|
||||||
:class="{ required: $attrs.required }"
|
|
||||||
@keyup.enter="onEnterPress()"
|
|
||||||
:rules="$attrs.required ? [requiredFieldRule] : null"
|
:rules="$attrs.required ? [requiredFieldRule] : null"
|
||||||
>
|
>
|
||||||
<template v-if="$slots.prepend" #prepend>
|
<QInput
|
||||||
<slot name="prepend" />
|
ref="vnInputRef"
|
||||||
</template>
|
v-model="value"
|
||||||
<template v-if="$slots.append" #append>
|
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||||
<slot name="append" />
|
:type="$attrs.type"
|
||||||
</template>
|
:class="{ required: $attrs.required }"
|
||||||
</QInput>
|
@keyup.enter="onEnterPress()"
|
||||||
|
:clearable="false"
|
||||||
|
>
|
||||||
|
<template v-if="$slots.prepend" #prepend>
|
||||||
|
<slot name="prepend" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #append>
|
||||||
|
<slot name="append" v-if="$slots.append" />
|
||||||
|
<QIcon
|
||||||
|
name="close"
|
||||||
|
size="xs"
|
||||||
|
v-if="hover && value"
|
||||||
|
@click="handleValue(null)"
|
||||||
|
></QIcon>
|
||||||
|
</template>
|
||||||
|
</QInput>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnInput from 'components/common/VnInput.vue';
|
import isValidDate from 'filters/isValidDate';
|
||||||
import isValidDate from "filters/isValidDate";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
@ -17,6 +16,8 @@ const props = defineProps({
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const hover = ref(false);
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
const joinDateAndTime = (date, time) => {
|
const joinDateAndTime = (date, time) => {
|
||||||
|
@ -77,30 +78,39 @@ const styleAttrs = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnInput
|
<div @mouseover="hover = true" @mouseleave="hover = false">
|
||||||
class="vn-input-date"
|
<QInput
|
||||||
:model-value="displayDate(value)"
|
class="vn-input-date"
|
||||||
v-bind="{ ...$attrs, ...styleAttrs }"
|
readonly
|
||||||
readonly
|
:model-value="displayDate(value)"
|
||||||
@click="isPopupOpen = true"
|
v-bind="{ ...$attrs, ...styleAttrs }"
|
||||||
>
|
@click="isPopupOpen = true"
|
||||||
<template #append>
|
>
|
||||||
<QIcon name="event" class="cursor-pointer">
|
<template #append>
|
||||||
<QPopupProxy
|
<QIcon
|
||||||
v-model="isPopupOpen"
|
name="close"
|
||||||
cover
|
size="xs"
|
||||||
transition-show="scale"
|
v-if="hover && value"
|
||||||
transition-hide="scale"
|
@click="onDateUpdate(null)"
|
||||||
:no-parent-event="props.readonly"
|
></QIcon>
|
||||||
>
|
<QIcon name="event" class="cursor-pointer">
|
||||||
<QDate
|
<QPopupProxy
|
||||||
:model-value="formatDate(value)"
|
v-model="isPopupOpen"
|
||||||
@update:model-value="onDateUpdate"
|
cover
|
||||||
/>
|
transition-show="scale"
|
||||||
</QPopupProxy>
|
transition-hide="scale"
|
||||||
</QIcon>
|
:no-parent-event="props.readonly"
|
||||||
</template>
|
>
|
||||||
</VnInput>
|
<QDate
|
||||||
|
:today-btn="true"
|
||||||
|
:model-value="formatDate(value)"
|
||||||
|
@update:model-value="onDateUpdate"
|
||||||
|
/>
|
||||||
|
</QPopupProxy>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</QInput>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import isValidDate from 'filters/isValidDate';
|
import isValidDate from 'filters/isValidDate';
|
||||||
import VnInput from "components/common/VnInput.vue";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
@ -20,6 +19,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue']);
|
||||||
|
|
||||||
const value = computed({
|
const value = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.modelValue;
|
return props.modelValue;
|
||||||
|
@ -27,12 +27,7 @@ const value = computed({
|
||||||
set(value) {
|
set(value) {
|
||||||
const [hours, minutes] = value.split(':');
|
const [hours, minutes] = value.split(':');
|
||||||
const date = new Date(props.modelValue);
|
const date = new Date(props.modelValue);
|
||||||
date.setHours(
|
date.setHours(Number.parseInt(hours) || 0, Number.parseInt(minutes) || 0, 0, 0);
|
||||||
Number.parseInt(hours) || 0,
|
|
||||||
Number.parseInt(minutes) || 0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
emit('update:modelValue', value ? date.toISOString() : null);
|
emit('update:modelValue', value ? date.toISOString() : null);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -71,7 +66,7 @@ const styleAttrs = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnInput
|
<QInput
|
||||||
class="vn-input-time"
|
class="vn-input-time"
|
||||||
readonly
|
readonly
|
||||||
:model-value="formatTime(value)"
|
:model-value="formatTime(value)"
|
||||||
|
@ -79,7 +74,7 @@ const styleAttrs = computed(() => {
|
||||||
@click="isPopupOpen = true"
|
@click="isPopupOpen = true"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="event" class="cursor-pointer">
|
<QIcon name="schedule" class="cursor-pointer">
|
||||||
<QPopupProxy
|
<QPopupProxy
|
||||||
v-model="isPopupOpen"
|
v-model="isPopupOpen"
|
||||||
cover
|
cover
|
||||||
|
@ -111,7 +106,7 @@ const styleAttrs = computed(() => {
|
||||||
</QPopupProxy>
|
</QPopupProxy>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</QInput>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
@ -88,6 +88,10 @@ function locationFilter(search = '') {
|
||||||
function handleFetch(data) {
|
function handleFetch(data) {
|
||||||
postcodesOptions.value = data;
|
postcodesOptions.value = data;
|
||||||
}
|
}
|
||||||
|
function onDataSaved(newPostcode) {
|
||||||
|
postcodesOptions.value.push(newPostcode);
|
||||||
|
value.value = newPostcode.code;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -111,11 +115,13 @@ function handleFetch(data) {
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateNewPostcode @on-data-saved="locationFilter()" />
|
<CreateNewPostcode
|
||||||
|
@on-data-saved="onDataSaved"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #option="{ itemProps, opt }">
|
<template #option="{ itemProps, opt }">
|
||||||
<QItem v-bind="itemProps">
|
<QItem v-bind="itemProps">
|
||||||
<QItemSection v-if="opt">
|
<QItemSection v-if="opt.code">
|
||||||
<QItemLabel>{{ opt.code }}</QItemLabel>
|
<QItemLabel>{{ opt.code }}</QItemLabel>
|
||||||
<QItemLabel caption>{{ showLabel(opt) }}</QItemLabel>
|
<QItemLabel caption>{{ showLabel(opt) }}</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
|
@ -403,7 +403,7 @@ setLogTree();
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="column items-center logs origin-log"
|
class="column items-center logs origin-log q-mt-md"
|
||||||
v-for="(originLog, originLogIndex) in logTree"
|
v-for="(originLog, originLogIndex) in logTree"
|
||||||
:key="originLogIndex"
|
:key="originLogIndex"
|
||||||
>
|
>
|
||||||
|
@ -1030,7 +1030,7 @@ en:
|
||||||
ticketCreated: Created
|
ticketCreated: Created
|
||||||
created: Created
|
created: Created
|
||||||
isChargedToMana: Charged to mana
|
isChargedToMana: Charged to mana
|
||||||
hasToPickUp: Has to pick Up
|
pickup: Type of pickup
|
||||||
dmsFk: Document ID
|
dmsFk: Document ID
|
||||||
text: Description
|
text: Description
|
||||||
claimStateFk: Claim State
|
claimStateFk: Claim State
|
||||||
|
@ -1069,7 +1069,7 @@ es:
|
||||||
ticketCreated: Creado
|
ticketCreated: Creado
|
||||||
created: Creado
|
created: Creado
|
||||||
isChargedToMana: Cargado a maná
|
isChargedToMana: Cargado a maná
|
||||||
hasToPickUp: Se debe recoger
|
pickup: Se debe recoger
|
||||||
dmsFk: ID documento
|
dmsFk: ID documento
|
||||||
text: Descripción
|
text: Descripción
|
||||||
claimStateFk: Estado de la reclamación
|
claimStateFk: Estado de la reclamación
|
||||||
|
|
|
@ -51,8 +51,8 @@ const $props = defineProps({
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
limit: {
|
limit: {
|
||||||
type: Number,
|
type: [Number, String],
|
||||||
default: 30,
|
default: '30',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ watch(modelValue, (newValue) => {
|
||||||
@on-fetch="(data) => setOptions(data)"
|
@on-fetch="(data) => setOptions(data)"
|
||||||
:where="where || { [optionValue]: value }"
|
:where="where || { [optionValue]: value }"
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
:order-by="orderBy"
|
:sort-by="sortBy"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
/>
|
/>
|
||||||
<QSelect
|
<QSelect
|
||||||
|
|
|
@ -21,7 +21,8 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
template: {
|
template: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: false,
|
||||||
|
default: '',
|
||||||
},
|
},
|
||||||
locale: {
|
locale: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -49,7 +50,7 @@ updateMessage();
|
||||||
|
|
||||||
function updateMessage() {
|
function updateMessage() {
|
||||||
const params = props.data;
|
const params = props.data;
|
||||||
const key = `templates['${props.template}']`;
|
const key = props.template ? `templates['${props.template}']` : '';
|
||||||
|
|
||||||
message.value = t(key, params, { locale: locale.value });
|
message.value = t(key, params, { locale: locale.value });
|
||||||
}
|
}
|
||||||
|
@ -104,15 +105,14 @@ async function send() {
|
||||||
map-options
|
map-options
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
rounded
|
rounded
|
||||||
outlined
|
|
||||||
dense
|
dense
|
||||||
/>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pb-xs">
|
<QCardSection class="q-pb-xs">
|
||||||
<VnInput :label="t('Phone')" v-model="phone" is-outlined />
|
<VnInput :label="t('Phone')" v-model="phone" />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pb-xs">
|
<QCardSection class="q-pb-xs">
|
||||||
<VnInput v-model="subject" :label="t('Subject')" is-outlined />
|
<VnInput v-model="subject" :label="t('Subject')" />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-mb-md" q-input>
|
<QCardSection class="q-mb-md" q-input>
|
||||||
<QInput
|
<QInput
|
||||||
|
@ -125,7 +125,6 @@ async function send() {
|
||||||
:bottom-slots="true"
|
:bottom-slots="true"
|
||||||
:rules="[(value) => value.length < maxLength || 'Error!']"
|
:rules="[(value) => value.length < maxLength || 'Error!']"
|
||||||
stack-label
|
stack-label
|
||||||
outlined
|
|
||||||
autofocus
|
autofocus
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
|
@ -135,6 +134,11 @@ async function send() {
|
||||||
@click="message = ''"
|
@click="message = ''"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
/>
|
/>
|
||||||
|
<QIcon name="info" class="cursor-pointer">
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('messageTooltip') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
<template #counter>
|
<template #counter>
|
||||||
<QChip :color="color" dense>
|
<QChip :color="color" dense>
|
||||||
|
@ -184,18 +188,20 @@ en:
|
||||||
es: Spanish
|
es: Spanish
|
||||||
fr: French
|
fr: French
|
||||||
pt: Portuguese
|
pt: Portuguese
|
||||||
|
messageTooltip: Special characters like accents counts as multiple
|
||||||
es:
|
es:
|
||||||
Send SMS: Enviar SMS
|
Send SMS: Enviar SMS
|
||||||
Language: Idioma
|
Language: Idioma
|
||||||
Phone: Móvil
|
Phone: Móvil
|
||||||
Subject: Asunto
|
Subject: Asunto
|
||||||
Message: Mensaje
|
Message: Mensaje
|
||||||
|
messageTooltip: Carácteres especiales como acentos cuentan como varios
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Su pedido está pendiente de pago.
|
pendingPayment: 'Su pedido está pendiente de pago.
|
||||||
Por favor, entre en la página web y efectue el pago con tarjeta. Muchas gracias.'
|
Por favor, entre en la página web y efectue el pago con tarjeta. Muchas gracias.'
|
||||||
minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido
|
minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido
|
||||||
{ orderId } del día { shipped } para recibirlo sin portes adicionales.'
|
{ orderId } con llegada { landing } para recibirlo sin portes adicionales.'
|
||||||
orderChanges: 'Pedido {orderId} día { shipped }: { changes }'
|
orderChanges: 'Pedido {orderId} con llegada estimada día { landing }: { changes }'
|
||||||
en: Inglés
|
en: Inglés
|
||||||
es: Español
|
es: Español
|
||||||
fr: Francés
|
fr: Francés
|
||||||
|
@ -207,12 +213,14 @@ fr:
|
||||||
Phone: Mobile
|
Phone: Mobile
|
||||||
Subject: Affaire
|
Subject: Affaire
|
||||||
Message: Message
|
Message: Message
|
||||||
|
messageTooltip: Les caractères spéciaux comme les accents comptent comme plusieurs
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Votre commande est en attente de paiement.
|
pendingPayment: 'Verdnatura : Commande en attente de règlement. Veuillez régler votre commande avant 9h.
|
||||||
Veuillez vous connecter sur le site web et effectuer le paiement par carte. Merci beaucoup.'
|
Sinon elle sera décalée en fonction de vos jours de livraison . Merci'
|
||||||
minAmount: 'Un montant minimum de 50€ (TVA non incluse) est requis pour votre commande
|
minAmount: 'Verdnatura vous rappelle :
|
||||||
{ orderId } du { shipped } afin de la recevoir sans frais de port supplémentaires.'
|
Montant minimum nécessaire de 50 euros pour recevoir la commande { orderId } livraison { landing }.
|
||||||
orderChanges: 'Commande { orderId } du { shipped }: { changes }'
|
Merci.'
|
||||||
|
orderChanges: 'Commande {orderId} livraison {landing} indisponible/s. Désolés pour le dérangement.'
|
||||||
en: Anglais
|
en: Anglais
|
||||||
es: Espagnol
|
es: Espagnol
|
||||||
fr: Français
|
fr: Français
|
||||||
|
@ -224,12 +232,13 @@ pt:
|
||||||
Phone: Móvel
|
Phone: Móvel
|
||||||
Subject: Assunto
|
Subject: Assunto
|
||||||
Message: Mensagem
|
Message: Mensagem
|
||||||
|
messageTooltip: Caracteres especiais como acentos contam como vários
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Seu pedido está pendente de pagamento.
|
pendingPayment: 'Seu pedido está pendente de pagamento.
|
||||||
Por favor, acesse o site e faça o pagamento com cartão. Muito obrigado.'
|
Por favor, acesse o site e faça o pagamento com cartão. Muito obrigado.'
|
||||||
minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido
|
minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido
|
||||||
{ orderId } do dia { shipped } para recebê-lo sem custos de envio adicionais.'
|
{ orderId } do dia { landing } para recebê-lo sem custos de envio adicionais.'
|
||||||
orderChanges: 'Pedido { orderId } dia { shipped }: { changes }'
|
orderChanges: 'Pedido { orderId } com chegada dia { landing }: { changes }'
|
||||||
en: Inglês
|
en: Inglês
|
||||||
es: Espanhol
|
es: Espanhol
|
||||||
fr: Francês
|
fr: Francês
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, useSlots, watch, computed, ref } from 'vue';
|
import { onBeforeMount, useSlots, watch, computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
|
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
@ -41,34 +41,33 @@ const state = useState();
|
||||||
const slots = useSlots();
|
const slots = useSlots();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const entity = computed(() => useArrayData($props.dataKey).store.data);
|
const arrayData = useArrayData($props.dataKey || $props.module, {
|
||||||
|
url: $props.url,
|
||||||
|
filter: $props.filter,
|
||||||
|
skip: 0,
|
||||||
|
});
|
||||||
|
const { store } = arrayData;
|
||||||
|
const entity = computed(() =>Array.isArray( store.data) ? store.data[0] : store.data);
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
getData,
|
getData,
|
||||||
});
|
});
|
||||||
onMounted(async () => {
|
onBeforeMount(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
watch(
|
watch(
|
||||||
() => $props.url,
|
() => $props.url,
|
||||||
async (newUrl, lastUrl) => {
|
async () => await getData()
|
||||||
if (newUrl == lastUrl) return;
|
|
||||||
await getData();
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
const arrayData = useArrayData($props.dataKey, {
|
store.url = $props.url;
|
||||||
url: $props.url,
|
|
||||||
filter: $props.filter,
|
|
||||||
skip: 0,
|
|
||||||
});
|
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
try {
|
try {
|
||||||
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
||||||
state.set($props.dataKey, data);
|
state.set($props.dataKey, data);
|
||||||
emit('onFetch', data);
|
emit('onFetch', Array.isArray(data) ? data[0] : data);
|
||||||
} finally {
|
} finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +157,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
<div class="icons">
|
<div class="icons">
|
||||||
<slot name="icons" :entity="entity" />
|
<slot name="icons" :entity="entity" />
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions justify-center">
|
||||||
<slot name="actions" :entity="entity" />
|
<slot name="actions" :entity="entity" />
|
||||||
</div>
|
</div>
|
||||||
<slot name="after" />
|
<slot name="after" />
|
||||||
|
@ -177,22 +176,23 @@ const emit = defineEmits(['onFetch']);
|
||||||
.body {
|
.body {
|
||||||
background-color: var(--vn-section-color);
|
background-color: var(--vn-section-color);
|
||||||
.text-h5 {
|
.text-h5 {
|
||||||
|
font-size: 20px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 0px;
|
||||||
}
|
}
|
||||||
.q-item {
|
.q-item {
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
margin-left: 5px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.vn-label-value {
|
.vn-label-value {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 2px 16px;
|
padding: 0px 16px;
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
|
|
||||||
&:not(:has(a))::after {
|
&:not(:has(a))::after {
|
||||||
content: ':';
|
content: ':';
|
||||||
|
@ -201,7 +201,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
.value {
|
.value {
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 12px;
|
margin-left: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -219,18 +219,19 @@ const emit = defineEmits(['onFetch']);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
span {
|
span {
|
||||||
color: $primary;
|
color: var(--vn-text-color);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.subtitle {
|
.subtitle {
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
.list-box {
|
.list-box {
|
||||||
.q-item__label {
|
.q-item__label {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
|
padding-bottom: 0%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.descriptor {
|
.descriptor {
|
||||||
|
@ -248,6 +249,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
}
|
}
|
||||||
.actions {
|
.actions {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
|
justify-content: center !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { ref, computed, watch, onBeforeMount } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
|
||||||
import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
|
import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
|
||||||
const entity = ref();
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
url: {
|
url: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -19,43 +18,48 @@ const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
dataKey: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['onFetch']);
|
const emit = defineEmits(['onFetch']);
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const isSummary = ref();
|
const isSummary = ref();
|
||||||
|
const arrayData = useArrayData(props.dataKey || route.meta.moduleName, {
|
||||||
|
url: props.url,
|
||||||
|
filter: props.filter,
|
||||||
|
skip: 0,
|
||||||
|
});
|
||||||
|
const { store } = arrayData;
|
||||||
|
const entity = computed(() => Array.isArray(store.data) ? store.data[0] : store.data);
|
||||||
|
const isLoading = ref(false);
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
entity,
|
entity,
|
||||||
fetch,
|
fetch,
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onBeforeMount(async () => {
|
||||||
isSummary.value = String(route.path).endsWith('/summary');
|
isSummary.value = String(route.path).endsWith('/summary');
|
||||||
fetch();
|
await fetch();
|
||||||
|
watch(props, async () => await fetch());
|
||||||
});
|
});
|
||||||
|
|
||||||
async function fetch() {
|
async function fetch() {
|
||||||
const params = {};
|
store.url = props.url;
|
||||||
|
isLoading.value = true;
|
||||||
if (props.filter) params.filter = JSON.stringify(props.filter);
|
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
||||||
|
|
||||||
const { data } = await axios.get(props.url, { params });
|
|
||||||
entity.value = data;
|
|
||||||
|
|
||||||
emit('onFetch', data);
|
emit('onFetch', data);
|
||||||
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(props, async () => {
|
|
||||||
entity.value = null;
|
|
||||||
fetch();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="summary container">
|
<div class="summary container">
|
||||||
<QCard class="cardSummary">
|
<QCard class="cardSummary">
|
||||||
<SkeletonSummary v-if="!entity" />
|
<SkeletonSummary v-if="!entity || isLoading" />
|
||||||
<template v-if="entity">
|
<template v-if="entity && !isLoading">
|
||||||
<div class="summaryHeader bg-primary q-pa-sm text-weight-bolder">
|
<div class="summaryHeader bg-primary q-pa-sm text-weight-bolder">
|
||||||
<slot name="header-left">
|
<slot name="header-left">
|
||||||
<router-link
|
<router-link
|
||||||
|
@ -70,7 +74,7 @@ watch(props, async () => {
|
||||||
</router-link>
|
</router-link>
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="header" :entity="entity">
|
<slot name="header" :entity="entity" dense>
|
||||||
<VnLv :label="`${entity.id} -`" :value="entity.name" />
|
<VnLv :label="`${entity.id} -`" :value="entity.name" />
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="header-right">
|
<slot name="header-right">
|
||||||
|
@ -93,7 +97,6 @@ watch(props, async () => {
|
||||||
|
|
||||||
.cardSummary {
|
.cardSummary {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.summaryHeader {
|
.summaryHeader {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
@ -128,6 +131,7 @@ watch(props, async () => {
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
min-width: 275px;
|
min-width: 275px;
|
||||||
|
box-shadow: none;
|
||||||
|
|
||||||
.vn-label-value {
|
.vn-label-value {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -0,0 +1,168 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.sass';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
bordered: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
transparentBackground: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
viewCustomization: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
// El objetivo de asignar las clases de personalización desde el wrapper es no tener conflictos entre vistas que usen el mismo componente
|
||||||
|
const viewCustomizationClasses = {
|
||||||
|
workerCalendar: 'worker-calendar-customizations',
|
||||||
|
};
|
||||||
|
|
||||||
|
const containerClasses = computed(() => {
|
||||||
|
const classes = ['main-container-background'];
|
||||||
|
if (viewCustomizationClasses[$props.viewCustomization])
|
||||||
|
classes.push(viewCustomizationClasses[$props.viewCustomization]);
|
||||||
|
if ($props.bordered) classes.push('--bordered');
|
||||||
|
if ($props.transparentBackground) classes.push('transparent-background');
|
||||||
|
else classes.push($q.dark.isActive ? '--dark' : '--light');
|
||||||
|
return classes;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div :class="containerClasses">
|
||||||
|
<div class="nav-container row"><slot name="header" /></div>
|
||||||
|
<slot name="calendar" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import '../../css/quasar.variables.scss';
|
||||||
|
|
||||||
|
:root {
|
||||||
|
// Cambia los colores del día actual del calendario por los de salix
|
||||||
|
--calendar-border-current-dark: #84d0e2 2px solid;
|
||||||
|
--calendar-border-current: #84d0e2 2px solid;
|
||||||
|
--calendar-current-color-dark: #84d0e2;
|
||||||
|
// Colores de fondo del calendario en dark mode
|
||||||
|
--calendar-outside-background-dark: #222;
|
||||||
|
--calendar-background-dark: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clases para modificar el color de fecha seleccionada en componente QCalendarMonth
|
||||||
|
.q-dark div .q-calendar-mini .q-calendar-month__day.q-selected .q-calendar__button {
|
||||||
|
background-color: $primary !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-mini .q-calendar-month__day.q-selected .q-calendar__button {
|
||||||
|
background-color: $primary !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__head--weekday {
|
||||||
|
// Transforma los nombres de los días de la semana a mayúsculas
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.transparent-background {
|
||||||
|
--calendar-background-dark: transparent;
|
||||||
|
--calendar-background: transparent;
|
||||||
|
--calendar-outside-background-dark: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar__button {
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--vn-accent-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container-background {
|
||||||
|
--calendar-current-background-dark: transparent;
|
||||||
|
|
||||||
|
&.--dark {
|
||||||
|
background-color: var(--calendar-background-dark);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.--light {
|
||||||
|
background-color: var(--calendar-background);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.--bordered {
|
||||||
|
border: 1px solid #222;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.worker-calendar-customizations {
|
||||||
|
.q-calendar__button {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
font-size: 13px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--vn-accent-color);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__week--days > div:nth-child(6),
|
||||||
|
.q-calendar-month__week--days > div:nth-child(7) {
|
||||||
|
// Cambia el color de los días sábado y domingo
|
||||||
|
color: #777777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__week--wrapper {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__workweek {
|
||||||
|
height: 32px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar__button--bordered {
|
||||||
|
color: $info !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__day--content {
|
||||||
|
position: absolute;
|
||||||
|
top: 1;
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-outside .calendar-event {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-calendar-month__workweek,
|
||||||
|
.q-calendar-month__head--workweek,
|
||||||
|
.q-calendar-month__head--weekday.q-calendar__center.q-calendar__ellipsis {
|
||||||
|
text-transform: capitalize;
|
||||||
|
color: #777;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&.--bordered {
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -164,7 +164,7 @@ function formatValue(value) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QForm @submit="search">
|
<QForm @submit="search" id="filterPanelForm">
|
||||||
<QList dense>
|
<QList dense>
|
||||||
<QItem class="q-mt-xs">
|
<QItem class="q-mt-xs">
|
||||||
<QItemSection top>
|
<QItemSection top>
|
||||||
|
|
|
@ -15,7 +15,6 @@ const { t } = useI18n();
|
||||||
color="primary"
|
color="primary"
|
||||||
padding="none"
|
padding="none"
|
||||||
:href="`sip:${props.phoneNumber}`"
|
:href="`sip:${props.phoneNumber}`"
|
||||||
:title="t('globals.microsip')"
|
|
||||||
@click.stop
|
@click.stop
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
import { toDateHour } from 'src/filters';
|
import { toDateHourMin } from 'src/filters';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnPaginate from './VnPaginate.vue';
|
import VnPaginate from './VnPaginate.vue';
|
||||||
import VnUserLink from '../ui/VnUserLink.vue';
|
import VnUserLink from '../ui/VnUserLink.vue';
|
||||||
|
import { useState } from 'src/composables/useState';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
url: { type: String, default: null },
|
url: { type: String, default: null },
|
||||||
|
@ -13,8 +14,10 @@ const $props = defineProps({
|
||||||
body: { type: Object, default: () => {} },
|
body: { type: Object, default: () => {} },
|
||||||
addNote: { type: Boolean, default: false },
|
addNote: { type: Boolean, default: false },
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const noteModal = ref(false);
|
const state = useState();
|
||||||
|
const currentUser = ref(state.getUser());
|
||||||
const newNote = ref('');
|
const newNote = ref('');
|
||||||
const vnPaginateRef = ref();
|
const vnPaginateRef = ref();
|
||||||
|
|
||||||
|
@ -22,98 +25,83 @@ async function insert() {
|
||||||
const body = $props.body;
|
const body = $props.body;
|
||||||
Object.assign(body, { text: newNote.value });
|
Object.assign(body, { text: newNote.value });
|
||||||
await axios.post($props.url, body);
|
await axios.post($props.url, body);
|
||||||
vnPaginateRef.value.fetch();
|
await vnPaginateRef.value.fetch();
|
||||||
newNote.value = '';
|
newNote.value = '';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center full-height full-width">
|
<QCard class="q-pa-xs q-mb-xl full-width" v-if="$props.addNote">
|
||||||
<VnPaginate
|
<QCardSection horizontal>
|
||||||
:data-key="$props.url"
|
<VnAvatar :worker-id="currentUser.id" size="md" />
|
||||||
:url="$props.url"
|
<div class="full-width row justify-between q-pa-xs">
|
||||||
order="created DESC"
|
<VnUserLink :name="t('New note')" :worker-id="currentUser.id" />
|
||||||
:limit="20"
|
{{ t('globals.now') }}
|
||||||
:filter="$props.filter"
|
</div>
|
||||||
auto-load
|
</QCardSection>
|
||||||
ref="vnPaginateRef"
|
<QCardSection class="q-pa-xs q-my-none q-py-none" horizontal>
|
||||||
>
|
<QInput
|
||||||
<template #body="{ rows }">
|
v-model="newNote"
|
||||||
<div class="column items-center full-width">
|
class="full-width"
|
||||||
<QCard
|
type="textarea"
|
||||||
class="q-pa-xs q-mb-sm full-width"
|
:label="t('Add note here...')"
|
||||||
v-for="(note, index) in rows"
|
filled
|
||||||
:key="index"
|
size="lg"
|
||||||
>
|
autogrow
|
||||||
<QCardSection horizontal>
|
autofocus
|
||||||
<slot name="picture">
|
@keyup.ctrl.enter.stop="insert"
|
||||||
<VnAvatar
|
clearable
|
||||||
:descriptor="false"
|
>
|
||||||
:worker-id="note.workerFk"
|
<template #append
|
||||||
size="md"
|
><QBtn
|
||||||
/>
|
:title="t('Save (ctrl + Enter)')"
|
||||||
</slot>
|
icon="save"
|
||||||
<div class="full-width row justify-between q-pa-xs">
|
color="primary"
|
||||||
<VnUserLink
|
|
||||||
:name="`${note.worker.user.nickname}`"
|
|
||||||
:worker-id="note.worker.id"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<slot name="actions">
|
|
||||||
{{ toDateHour(note.created) }}
|
|
||||||
</slot>
|
|
||||||
</div>
|
|
||||||
</QCardSection>
|
|
||||||
<QCardSection class="q-pa-xs q-my-none q-py-none">
|
|
||||||
<slot name="text">
|
|
||||||
{{ note.text }}
|
|
||||||
</slot>
|
|
||||||
</QCardSection>
|
|
||||||
</QCard>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VnPaginate>
|
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]" v-if="addNote">
|
|
||||||
<QBtn color="primary" icon="add" size="lg" round @click="noteModal = true" />
|
|
||||||
</QPageSticky>
|
|
||||||
<QDialog v-model="noteModal" @hide="newNote = ''">
|
|
||||||
<QCard>
|
|
||||||
<QCardSection>
|
|
||||||
<QItem class="q-px-none">
|
|
||||||
<span class="text-primary text-h6 full-width">
|
|
||||||
<QIcon name="draft" class="q-mr-xs" />
|
|
||||||
{{ t('Add note') }}
|
|
||||||
</span>
|
|
||||||
<QBtn icon="close" flat round dense v-close-popup />
|
|
||||||
</QItem>
|
|
||||||
</QCardSection>
|
|
||||||
<QCardSection>
|
|
||||||
<QInput
|
|
||||||
autofocus
|
|
||||||
type="textarea"
|
|
||||||
:label="t('Add note here...')"
|
|
||||||
filled
|
|
||||||
size="lg"
|
|
||||||
autogrow
|
|
||||||
v-model="newNote"
|
|
||||||
></QInput>
|
|
||||||
</QCardSection>
|
|
||||||
<QCardActions class="justify-end q-mr-sm">
|
|
||||||
<QBtn
|
|
||||||
flat
|
flat
|
||||||
:label="t('globals.close')"
|
|
||||||
color="primary"
|
|
||||||
v-close-popup
|
|
||||||
/>
|
|
||||||
<QBtn
|
|
||||||
:label="t('globals.save')"
|
|
||||||
color="primary"
|
|
||||||
v-close-popup
|
|
||||||
@click="insert"
|
@click="insert"
|
||||||
/>
|
/>
|
||||||
</QCardActions>
|
</template>
|
||||||
</QCard>
|
</QInput>
|
||||||
</QDialog>
|
</QCardSection>
|
||||||
</div>
|
</QCard>
|
||||||
|
<VnPaginate
|
||||||
|
:data-key="$props.url"
|
||||||
|
:url="$props.url"
|
||||||
|
order="created DESC"
|
||||||
|
:limit="0"
|
||||||
|
:filter="$props.filter"
|
||||||
|
auto-load
|
||||||
|
ref="vnPaginateRef"
|
||||||
|
class="show"
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<TransitionGroup name="list" tag="div" class="column items-center full-width">
|
||||||
|
<QCard
|
||||||
|
class="q-pa-xs q-mb-sm full-width"
|
||||||
|
v-for="(note, index) in rows"
|
||||||
|
:key="note.id ?? index"
|
||||||
|
>
|
||||||
|
<QCardSection horizontal>
|
||||||
|
<VnAvatar
|
||||||
|
:descriptor="false"
|
||||||
|
:worker-id="note.workerFk"
|
||||||
|
size="md"
|
||||||
|
/>
|
||||||
|
<div class="full-width row justify-between q-pa-xs">
|
||||||
|
<VnUserLink
|
||||||
|
:name="`${note.worker.user.nickname}`"
|
||||||
|
:worker-id="note.worker.id"
|
||||||
|
/>
|
||||||
|
{{ toDateHourMin(note.created) }}
|
||||||
|
</div>
|
||||||
|
</QCardSection>
|
||||||
|
<QCardSection class="q-pa-xs q-my-none q-py-none">
|
||||||
|
{{ note.text }}
|
||||||
|
</QCardSection>
|
||||||
|
</QCard>
|
||||||
|
</TransitionGroup>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-card {
|
.q-card {
|
||||||
|
@ -128,9 +116,20 @@ async function insert() {
|
||||||
.q-dialog .q-card {
|
.q-dialog .q-card {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
.list-enter-active,
|
||||||
|
.list-leave-active {
|
||||||
|
transition: all 1s ease;
|
||||||
|
}
|
||||||
|
.list-enter-from,
|
||||||
|
.list-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
background-color: $primary;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Add note here...: Añadir nota aquí...
|
Add note here...: Añadir nota aquí...
|
||||||
Add note: Añadir nota
|
New note: Nueva nota
|
||||||
|
Save (ctrl + Enter): Guardar (Ctrl + Intro)
|
||||||
|
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -61,7 +61,6 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['onFetch', 'onPaginate']);
|
const emit = defineEmits(['onFetch', 'onPaginate']);
|
||||||
defineExpose({ fetch });
|
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: props.order,
|
sortBy: props.order,
|
||||||
|
@ -91,9 +90,13 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const addFilter = async (filter, params) => {
|
||||||
|
await arrayData.addFilter({ filter, params });
|
||||||
|
};
|
||||||
|
|
||||||
async function fetch() {
|
async function fetch() {
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
if (!arrayData.hasMoreData.value) {
|
if (!store.hasMoreData) {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
|
@ -106,11 +109,10 @@ async function paginate() {
|
||||||
|
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
await arrayData.loadMore();
|
await arrayData.loadMore();
|
||||||
|
if (!store.hasMoreData) {
|
||||||
if (!arrayData.hasMoreData.value) {
|
if (store.userParamsChanged) store.hasMoreData = true;
|
||||||
if (store.userParamsChanged) arrayData.hasMoreData.value = true;
|
|
||||||
store.userParamsChanged = false;
|
store.userParamsChanged = false;
|
||||||
isLoading.value = false;
|
endPagination();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,16 +122,16 @@ async function paginate() {
|
||||||
pagination.value.sortBy = sortBy;
|
pagination.value.sortBy = sortBy;
|
||||||
pagination.value.descending = descending;
|
pagination.value.descending = descending;
|
||||||
|
|
||||||
isLoading.value = false;
|
endPagination();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endPagination() {
|
||||||
|
isLoading.value = false;
|
||||||
emit('onFetch', store.data);
|
emit('onFetch', store.data);
|
||||||
emit('onPaginate');
|
emit('onPaginate');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onLoad(index, done) {
|
async function onLoad(index, done) {
|
||||||
if (!store.data) {
|
if (!store.data) return done();
|
||||||
return done();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (store.data.length === 0 || !props.url) return done(false);
|
if (store.data.length === 0 || !props.url) return done(false);
|
||||||
|
|
||||||
|
@ -137,9 +139,11 @@ async function onLoad(index, done) {
|
||||||
|
|
||||||
await paginate();
|
await paginate();
|
||||||
let isDone = false;
|
let isDone = false;
|
||||||
if (store.userParamsChanged) isDone = !arrayData.hasMoreData.value;
|
if (store.userParamsChanged) isDone = !store.hasMoreData;
|
||||||
done(isDone);
|
done(isDone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({ fetch, addFilter });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -179,8 +183,8 @@ async function onLoad(index, done) {
|
||||||
v-if="store.data"
|
v-if="store.data"
|
||||||
@load="onLoad"
|
@load="onLoad"
|
||||||
:offset="offset"
|
:offset="offset"
|
||||||
:disable="disableInfiniteScroll || !arrayData.hasMoreData.value"
|
|
||||||
class="full-width"
|
class="full-width"
|
||||||
|
:disable="disableInfiniteScroll || !store.hasMoreData"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
>
|
>
|
||||||
<slot name="body" :rows="store.data"></slot>
|
<slot name="body" :rows="store.data"></slot>
|
||||||
|
@ -188,6 +192,12 @@ async function onLoad(index, done) {
|
||||||
<QSpinner color="orange" size="md" />
|
<QSpinner color="orange" size="md" />
|
||||||
</div>
|
</div>
|
||||||
</QInfiniteScroll>
|
</QInfiniteScroll>
|
||||||
|
<div
|
||||||
|
v-if="!isLoading && store.hasMoreData"
|
||||||
|
class="w-full flex justify-center q-mt-md"
|
||||||
|
>
|
||||||
|
<QBtn color="primary" :label="t('Load more data')" @click="paginate()" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -204,4 +214,5 @@ async function onLoad(index, done) {
|
||||||
es:
|
es:
|
||||||
No data to display: Sin datos que mostrar
|
No data to display: Sin datos que mostrar
|
||||||
No results found: No se han encontrado resultados
|
No results found: No se han encontrado resultados
|
||||||
|
Load more data: Cargar más resultados
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="row" class="q-gutter-md q-mb-md">
|
<div class="vn-row q-gutter-md q-mb-md">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scopped>
|
<style lang="scss" scopped>
|
||||||
#row {
|
.vn-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
> * {
|
> * {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
#row {
|
.vn-row {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
|
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
@ -68,9 +66,8 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
|
||||||
const arrayData = useArrayData(props.dataKey, { ...props });
|
const arrayData = useArrayData(props.dataKey, { ...props });
|
||||||
const store = arrayData.store;
|
const { store } = arrayData;
|
||||||
const searchText = ref('');
|
const searchText = ref('');
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -92,23 +89,31 @@ async function search() {
|
||||||
});
|
});
|
||||||
if (!props.redirect) return;
|
if (!props.redirect) return;
|
||||||
|
|
||||||
if (props.customRouteRedirectName) {
|
if (props.customRouteRedirectName)
|
||||||
router.push({
|
return router.push({
|
||||||
name: props.customRouteRedirectName,
|
name: props.customRouteRedirectName,
|
||||||
params: { id: searchText.value },
|
params: { id: searchText.value },
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { matched: matches } = route;
|
const { matched: matches } = router.currentRoute.value;
|
||||||
const { path } = matches[matches.length - 1];
|
const { path } = matches.at(-1);
|
||||||
const newRoute = path.replace(':id', searchText.value);
|
const [, moduleName] = path.split('/');
|
||||||
await router.push(newRoute);
|
|
||||||
|
if (!store.data.length || store.data.length > 1)
|
||||||
|
return router.push({ path: `/${moduleName}/list` });
|
||||||
|
|
||||||
|
const targetId = store.data[0].id;
|
||||||
|
let targetUrl;
|
||||||
|
|
||||||
|
if (path.endsWith('/list')) targetUrl = path.replace('/list', `/${targetId}/summary`);
|
||||||
|
else if (path.includes(':id')) targetUrl = path.replace(':id', targetId);
|
||||||
|
|
||||||
|
await router.push({ path: targetUrl });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QForm @submit="search">
|
<QForm @submit="search" id="searchbarForm">
|
||||||
<VnInput
|
<VnInput
|
||||||
id="searchbar"
|
id="searchbar"
|
||||||
v-model="searchText"
|
v-model="searchText"
|
||||||
|
|
|
@ -14,7 +14,7 @@ onUnmounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QToolbar class="justify-end sticky">
|
<QToolbar class="bg-vn-section-color justify-end sticky">
|
||||||
<slot name="st-data">
|
<slot name="st-data">
|
||||||
<div id="st-data"></div>
|
<div id="st-data"></div>
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -24,6 +24,11 @@ onUnmounted(() => {
|
||||||
</slot>
|
</slot>
|
||||||
</QToolbar>
|
</QToolbar>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss">
|
||||||
|
.q-toolbar {
|
||||||
|
background: var(--vn-section-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.sticky {
|
.sticky {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
|
|
@ -76,7 +76,7 @@ const removeNode = (node) => {
|
||||||
notify(t('department.departmentRemoved'), 'positive');
|
notify(t('department.departmentRemoved'), 'positive');
|
||||||
await fetchNodeLeaves(parentFk);
|
await fetchNodeLeaves(parentFk);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Error removing department');
|
console.error('Error removing department');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { getUrl } from './getUrl';
|
import { getUrl } from './getUrl';
|
||||||
|
|
||||||
const {getTokenMultimedia} = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = getTokenMultimedia();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
export async function downloadFile(dmsId) {
|
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
|
||||||
let appUrl = await getUrl('', 'lilium');
|
let appUrl = await getUrl('', 'lilium');
|
||||||
appUrl = appUrl.replace('/#/', '');
|
appUrl = appUrl.replace('/#/', '');
|
||||||
window.open(`${appUrl}/api/dms/${dmsId}/downloadFile?access_token=${token}`);
|
window.open(url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
export const elementIsVisibleInViewport = (el) => {
|
||||||
|
const { top, left, bottom, right } = el.getBoundingClientRect();
|
||||||
|
const { innerHeight, innerWidth } = window;
|
||||||
|
|
||||||
|
return top >= 0 && left >= 0 && bottom <= innerHeight && right <= innerWidth;
|
||||||
|
};
|
|
@ -1,5 +1,5 @@
|
||||||
import { onMounted, ref, computed } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
import { useRouter, useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useArrayDataStore } from 'stores/useArrayDataStore';
|
import { useArrayDataStore } from 'stores/useArrayDataStore';
|
||||||
import { buildFilter } from 'filters/filterPanel';
|
import { buildFilter } from 'filters/filterPanel';
|
||||||
|
@ -9,13 +9,9 @@ const arrayDataStore = useArrayDataStore();
|
||||||
export function useArrayData(key, userOptions) {
|
export function useArrayData(key, userOptions) {
|
||||||
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
if (!key) throw new Error('ArrayData: A key is required to use this composable');
|
||||||
|
|
||||||
if (!arrayDataStore.get(key)) {
|
if (!arrayDataStore.get(key)) arrayDataStore.set(key);
|
||||||
arrayDataStore.set(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
const store = arrayDataStore.get(key);
|
const store = arrayDataStore.get(key);
|
||||||
const hasMoreData = ref(false);
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
let canceller = null;
|
let canceller = null;
|
||||||
|
|
||||||
|
@ -23,6 +19,7 @@ export function useArrayData(key, userOptions) {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setOptions();
|
setOptions();
|
||||||
|
store.skip = 0;
|
||||||
|
|
||||||
const query = route.query;
|
const query = route.query;
|
||||||
if (query.params) {
|
if (query.params) {
|
||||||
|
@ -30,9 +27,7 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (key && userOptions) {
|
if (key && userOptions) setOptions();
|
||||||
setOptions();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setOptions() {
|
function setOptions() {
|
||||||
const allowedOptions = [
|
const allowedOptions = [
|
||||||
|
@ -97,15 +92,14 @@ export function useArrayData(key, userOptions) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const { limit } = filter;
|
const { limit } = filter;
|
||||||
|
store.hasMoreData = limit && response.data.length >= limit;
|
||||||
hasMoreData.value = response.data.length === limit;
|
|
||||||
|
|
||||||
if (append) {
|
if (append) {
|
||||||
if (!store.data) store.data = [];
|
if (!store.data) store.data = [];
|
||||||
for (const row of response.data) store.data.push(row);
|
for (const row of response.data) store.data.push(row);
|
||||||
} else {
|
} else {
|
||||||
store.data = response.data;
|
store.data = response.data;
|
||||||
if (!document.querySelectorAll('[role="dialog"]'))
|
if (!document.querySelectorAll('[role="dialog"]').length)
|
||||||
updateRouter && updateStateParams();
|
updateRouter && updateStateParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +139,8 @@ export function useArrayData(key, userOptions) {
|
||||||
store.userParams = userParams;
|
store.userParams = userParams;
|
||||||
store.skip = 0;
|
store.skip = 0;
|
||||||
store.filter.skip = 0;
|
store.filter.skip = 0;
|
||||||
|
page.value = 1;
|
||||||
|
|
||||||
await fetch({ append: false });
|
await fetch({ append: false });
|
||||||
return { filter, params };
|
return { filter, params };
|
||||||
}
|
}
|
||||||
|
@ -168,7 +164,7 @@ export function useArrayData(key, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadMore() {
|
async function loadMore() {
|
||||||
if (!hasMoreData.value) return;
|
if (!store.hasMoreData) return;
|
||||||
|
|
||||||
store.skip = store.limit * page.value;
|
store.skip = store.limit * page.value;
|
||||||
page.value += 1;
|
page.value += 1;
|
||||||
|
@ -188,11 +184,15 @@ export function useArrayData(key, userOptions) {
|
||||||
if (store.userParams && Object.keys(store.userParams).length !== 0)
|
if (store.userParams && Object.keys(store.userParams).length !== 0)
|
||||||
query.params = JSON.stringify(store.userParams);
|
query.params = JSON.stringify(store.userParams);
|
||||||
|
|
||||||
if (router)
|
const url = new URL(window.location.href);
|
||||||
router.replace({
|
const { hash: currentHash } = url;
|
||||||
path: route.path,
|
const [currentRoute] = currentHash.split('?');
|
||||||
query: query,
|
|
||||||
});
|
const params = new URLSearchParams();
|
||||||
|
for (const param in query) params.append(param, query[param]);
|
||||||
|
|
||||||
|
url.hash = currentRoute + '?' + params.toString();
|
||||||
|
window.history.pushState({}, '', url.hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
const totalRows = computed(() => (store.data && store.data.length) || 0);
|
const totalRows = computed(() => (store.data && store.data.length) || 0);
|
||||||
|
@ -206,7 +206,6 @@ export function useArrayData(key, userOptions) {
|
||||||
destroy,
|
destroy,
|
||||||
loadMore,
|
loadMore,
|
||||||
store,
|
store,
|
||||||
hasMoreData,
|
|
||||||
totalRows,
|
totalRows,
|
||||||
updateStateParams,
|
updateStateParams,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
export function usePrintService() {
|
export function usePrintService() {
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const { getToken } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
|
|
||||||
function sendEmail(path, params) {
|
function sendEmail(path, params) {
|
||||||
return axios.post(path, params).then(() =>
|
return axios.post(path, params).then(() =>
|
||||||
|
@ -19,7 +19,7 @@ export function usePrintService() {
|
||||||
function openReport(path, params) {
|
function openReport(path, params) {
|
||||||
params = Object.assign(
|
params = Object.assign(
|
||||||
{
|
{
|
||||||
access_token: getToken(),
|
access_token: getTokenMultimedia(),
|
||||||
},
|
},
|
||||||
params
|
params
|
||||||
);
|
);
|
||||||
|
|
|
@ -3,31 +3,29 @@ import { useRole } from './useRole';
|
||||||
import { useUserConfig } from './useUserConfig';
|
import { useUserConfig } from './useUserConfig';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import useNotify from './useNotify';
|
import useNotify from './useNotify';
|
||||||
|
const TOKEN_MULTIMEDIA = 'tokenMultimedia';
|
||||||
|
const TOKEN = 'token';
|
||||||
|
|
||||||
export function useSession() {
|
export function useSession() {
|
||||||
const { notify } = useNotify();
|
const { notify } = useNotify();
|
||||||
|
|
||||||
function getToken() {
|
function getToken() {
|
||||||
const localToken = localStorage.getItem('token');
|
const localToken = localStorage.getItem(TOKEN);
|
||||||
const sessionToken = sessionStorage.getItem('token');
|
const sessionToken = sessionStorage.getItem(TOKEN);
|
||||||
|
|
||||||
return localToken || sessionToken || '';
|
return localToken || sessionToken || '';
|
||||||
}
|
}
|
||||||
function getTokenMultimedia() {
|
function getTokenMultimedia() {
|
||||||
const localTokenMultimedia = localStorage.getItem('tokenMultimedia');
|
const localTokenMultimedia = localStorage.getItem(TOKEN_MULTIMEDIA);
|
||||||
const sessionTokenMultimedia = sessionStorage.getItem('tokenMultimedia');
|
const sessionTokenMultimedia = sessionStorage.getItem(TOKEN_MULTIMEDIA);
|
||||||
|
|
||||||
return localTokenMultimedia || sessionTokenMultimedia || '';
|
return localTokenMultimedia || sessionTokenMultimedia || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function setToken(data) {
|
function setToken(data) {
|
||||||
if (data.keepLogin) {
|
const storage = data.keepLogin ? localStorage : sessionStorage;
|
||||||
localStorage.setItem('token', data.token);
|
storage.setItem(TOKEN, data.token);
|
||||||
localStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
storage.setItem(TOKEN_MULTIMEDIA, data.tokenMultimedia);
|
||||||
} else {
|
|
||||||
sessionStorage.setItem('token', data.token);
|
|
||||||
sessionStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
async function destroyToken(url, storage, key) {
|
async function destroyToken(url, storage, key) {
|
||||||
if (storage.getItem(key)) {
|
if (storage.getItem(key)) {
|
||||||
|
@ -71,8 +69,8 @@ export function useSession() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isLoggedIn() {
|
function isLoggedIn() {
|
||||||
const localToken = localStorage.getItem('token');
|
const localToken = localStorage.getItem(TOKEN);
|
||||||
const sessionToken = sessionStorage.getItem('token');
|
const sessionToken = sessionStorage.getItem(TOKEN);
|
||||||
|
|
||||||
return !!(localToken || sessionToken);
|
return !!(localToken || sessionToken);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// app global css in SCSS form
|
// app global css in SCSS form
|
||||||
@import './icons.scss';
|
@import './icons.scss';
|
||||||
|
@import '@quasar/quasar-ui-qcalendar/src/QCalendarMonth.sass';
|
||||||
|
|
||||||
body.body--light {
|
body.body--light {
|
||||||
--font-color: black;
|
--font-color: black;
|
||||||
|
@ -14,21 +15,15 @@ body.body--light {
|
||||||
.q-header .q-toolbar {
|
.q-header .q-toolbar {
|
||||||
color: var(--font-color);
|
color: var(--font-color);
|
||||||
}
|
}
|
||||||
.q-card,
|
|
||||||
.q-table,
|
|
||||||
.q-table__bottom,
|
|
||||||
.q-drawer {
|
|
||||||
background-color: var(--vn-section-color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.body--dark {
|
body.body--dark {
|
||||||
--vn-section-color: #403c3c;
|
--vn-page-color: #222;
|
||||||
|
--vn-section-color: #3d3d3d;
|
||||||
--vn-text-color: white;
|
--vn-text-color: white;
|
||||||
--vn-label-color: #a8a8a8;
|
--vn-label-color: #a8a8a8;
|
||||||
--vn-accent-color: #424242;
|
--vn-accent-color: #424242;
|
||||||
|
|
||||||
background-color: #222;
|
background-color: var(--vn-page-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -76,6 +71,13 @@ select:-webkit-autofill {
|
||||||
.bg-vn-section-color {
|
.bg-vn-section-color {
|
||||||
background-color: var(--vn-section-color);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
|
.bg-hover {
|
||||||
|
background-color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-vn-label {
|
||||||
|
color: var(--vn-label);
|
||||||
|
}
|
||||||
|
|
||||||
.color-vn-text {
|
.color-vn-text {
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
|
@ -85,12 +87,21 @@ select:-webkit-autofill {
|
||||||
color: $white;
|
color: $white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-width {
|
||||||
|
max-width: 800px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.vn-card {
|
.vn-card {
|
||||||
background-color: var(--vn-section-color);
|
background-color: var(--vn-section-color);
|
||||||
color: var(--vn-text-color);
|
color: var(--vn-text-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-width {
|
||||||
|
width: 770px;
|
||||||
|
}
|
||||||
|
|
||||||
.vn-card-list {
|
.vn-card-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 60em;
|
max-width: 60em;
|
||||||
|
@ -118,9 +129,36 @@ select:-webkit-autofill {
|
||||||
content: ' *';
|
content: ' *';
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-chip {
|
.q-card,
|
||||||
|
.q-table,
|
||||||
|
.q-table__bottom,
|
||||||
|
.q-drawer {
|
||||||
|
background-color: var(--vn-section-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-chip,
|
||||||
|
.q-notification__message,
|
||||||
|
.q-notification__icon {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
.q-notification--standard.bg-negative {
|
||||||
|
background-color: #fa3939 !important;
|
||||||
|
}
|
||||||
|
.q-notification--standard.bg-positive {
|
||||||
|
background-color: #a3d131 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-tooltip {
|
||||||
|
background-color: var(--vn-page-color);
|
||||||
|
color: var(--font-color);
|
||||||
|
font-size: medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-card__actions {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* q-notification row items-stretch q-notification--standard bg-negative text-white */
|
||||||
|
|
||||||
input[type='number'] {
|
input[type='number'] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<glyph unicode="" glyph-name="consignatarios" d="M409.6-64v349.867h204.8v-349.867h256v563.2h153.6l-512 460.8-512-460.8h153.6v-563.2h256z" />
|
<glyph unicode="" glyph-name="consignatarios" d="M409.6-64v349.867h204.8v-349.867h256v563.2h153.6l-512 460.8-512-460.8h153.6v-563.2h256z" />
|
||||||
<glyph unicode="" glyph-name="control" d="M418.133 315.733l-128-123.733 256-256 469.333 469.333-128 128-341.333-341.333zM546.133 311.467l34.133 34.133h-68.267zM230.4 128l-59.733 64 153.6 153.6h-68.267v102.4h426.667l204.8 204.8 85.333-85.333v187.733c0 55.467-46.933 102.4-102.4 102.4h-213.333c-21.333 59.733-76.8 102.4-145.067 102.4s-123.733-42.667-145.067-102.4h-213.333c-55.467 0-102.4-46.933-102.4-102.4v-716.8c0-55.467 46.933-102.4 102.4-102.4h273.067l-196.267 192zM512 857.6c29.867 0 51.2-21.333 51.2-51.2s-21.333-51.2-51.2-51.2-51.2 21.333-51.2 51.2c0 29.867 21.333 51.2 51.2 51.2zM256 652.8h512v-102.4h-512v102.4zM665.6-64h204.8c55.467 0 102.4 46.933 102.4 102.4v204.8l-307.2-307.2z" />
|
<glyph unicode="" glyph-name="control" d="M418.133 315.733l-128-123.733 256-256 469.333 469.333-128 128-341.333-341.333zM546.133 311.467l34.133 34.133h-68.267zM230.4 128l-59.733 64 153.6 153.6h-68.267v102.4h426.667l204.8 204.8 85.333-85.333v187.733c0 55.467-46.933 102.4-102.4 102.4h-213.333c-21.333 59.733-76.8 102.4-145.067 102.4s-123.733-42.667-145.067-102.4h-213.333c-55.467 0-102.4-46.933-102.4-102.4v-716.8c0-55.467 46.933-102.4 102.4-102.4h273.067l-196.267 192zM512 857.6c29.867 0 51.2-21.333 51.2-51.2s-21.333-51.2-51.2-51.2-51.2 21.333-51.2 51.2c0 29.867 21.333 51.2 51.2 51.2zM256 652.8h512v-102.4h-512v102.4zM665.6-64h204.8c55.467 0 102.4 46.933 102.4 102.4v204.8l-307.2-307.2z" />
|
||||||
<glyph unicode="" glyph-name="credit" d="M921.6 849.067h-819.2c-55.467 0-102.4-42.667-102.4-98.133v-601.6c0-55.467 46.933-102.4 102.4-102.4h819.2c55.467 0 102.4 42.667 102.4 102.4v601.6c0 55.467-46.933 98.133-102.4 98.133zM921.6 145.067h-819.2v302.933h819.2v-302.933zM921.6 648.533h-819.2v102.4h819.2v-102.4z" />
|
<glyph unicode="" glyph-name="credit" d="M921.6 849.067h-819.2c-55.467 0-102.4-42.667-102.4-98.133v-601.6c0-55.467 46.933-102.4 102.4-102.4h819.2c55.467 0 102.4 42.667 102.4 102.4v601.6c0 55.467-46.933 98.133-102.4 98.133zM921.6 145.067h-819.2v302.933h819.2v-302.933zM921.6 648.533h-819.2v102.4h819.2v-102.4z" />
|
||||||
<glyph unicode="" glyph-name="deaulter" d="M677.973-64c-30.72 35.84-61.867 70.827-91.307 107.52-40.96 51.2-80.64 103.253-121.173 154.88-16.64 21.333-21.76 20.48-30.72-4.693-13.227-36.693-25.6-73.387-40.107-109.653-5.12-12.8-13.227-26.88-24.32-34.56-51.627-34.987-104.107-69.12-157.867-100.693-10.667-6.4-30.72-5.547-41.813 0.853-8.107 4.693-12.373 23.893-11.093 35.84 0.853 8.96 11.093 19.627 19.627 25.6 39.253 26.453 78.933 51.627 119.040 76.8 18.347 11.52 30.293 26.027 35.84 47.787 12.373 48.213 27.307 95.573 39.253 143.36 8.533 33.707 26.88 58.88 56.32 77.227 40.533 25.173 80.64 52.053 120.747 78.507 6.4 4.267 10.24 11.52 15.36 17.493-7.253 2.56-14.933 7.253-22.187 6.827-75.52-6.4-151.467-13.227-226.987-20.48-2.133 0-4.693-0.853-6.827-0.853-22.613-1.707-39.253 10.24-40.96 29.867s12.373 33.707 35.413 35.84c45.227 4.267 90.88 8.96 136.107 12.8 65.707 5.547 131.84 10.667 197.547 15.36 26.027 1.707 53.76-21.76 67.413-55.467 9.813-23.893 5.12-46.080-18.347-65.28-49.92-40.107-100.693-78.933-151.040-118.187-23.040-17.92-23.893-23.467-6.4-46.507 58.453-78.080 116.48-156.587 174.933-234.667 27.307-36.693 25.173-50.773-12.373-75.52-5.12 0-9.813 0-14.080 0zM791.893 649.813c-43.093 1.28-76.373-31.573-77.227-75.52-0.853-44.373 29.44-76.8 72.107-77.653 45.227-1.28 77.653 29.44 78.080 73.813 0.427 45.227-29.44 78.080-72.96 79.36zM671.147 737.707c0-72.107-34.133-136.107-87.467-176.64l-235.52-21.76c-72.107 36.693-122.027 111.787-122.027 198.4 0 122.88 99.84 222.293 222.72 222.293 122.453 0 222.293-99.413 222.293-222.293zM592.213 680.533l-50.347 18.347c-2.133-8.533-5.12-16.213-9.813-22.613-5.12-6.4-10.24-11.947-16.213-17.067-5.973-4.267-12.373-8.107-19.2-11.093s-13.653-4.693-20.053-5.547c-17.92-2.987-33.707-0.427-48.64 6.827s-26.88 18.347-36.693 32.853l76.373 12.373 7.253 32.427-97.28-15.787c-1.28 5.547-2.987 11.093-3.84 16.64l-0.853 4.267 99.413 16.213 7.253 32.427-106.667-17.493c0.853 9.387 2.987 17.493 6.4 26.027 3.84 8.533 8.107 16.213 14.080 23.040 5.547 6.827 12.8 12.373 21.333 17.067s17.92 8.107 28.587 9.813c6.827 1.28 13.227 1.707 20.907 1.28s14.507-1.707 21.333-3.84c6.827-2.133 13.653-5.973 20.053-10.24 5.973-4.693 11.947-11.093 17.493-18.773l38.827 37.973c-13.227 17.92-30.293 31.147-52.053 39.253-21.76 8.533-46.080 10.667-73.387 6.4-19.627-2.987-36.267-9.387-51.2-17.92-14.507-8.533-26.88-19.2-37.547-32-10.667-12.373-18.773-26.027-23.893-40.96-5.547-14.507-8.96-29.867-9.813-45.653l-21.76-3.84-7.253-32.427 29.013 4.693 0.427-2.987c1.28-6.827 2.56-12.8 4.267-18.347l-23.467-3.84-8.107-32.427 43.52 7.253c6.827-13.653 15.787-26.027 26.027-36.693 10.24-11.52 22.187-20.48 35.413-27.733 13.227-7.68 27.307-12.8 42.667-15.787s31.573-3.413 47.36-0.853c12.373 2.133 24.32 5.12 35.84 10.667s22.613 11.52 32.853 19.2c10.24 8.107 18.347 16.64 26.027 26.453 6.827 9.387 12.373 20.48 15.36 32.427z" />
|
<glyph unicode="" glyph-name="defaulter" d="M677.973-64c-30.72 35.84-61.867 70.827-91.307 107.52-40.96 51.2-80.64 103.253-121.173 154.88-16.64 21.333-21.76 20.48-30.72-4.693-13.227-36.693-25.6-73.387-40.107-109.653-5.12-12.8-13.227-26.88-24.32-34.56-51.627-34.987-104.107-69.12-157.867-100.693-10.667-6.4-30.72-5.547-41.813 0.853-8.107 4.693-12.373 23.893-11.093 35.84 0.853 8.96 11.093 19.627 19.627 25.6 39.253 26.453 78.933 51.627 119.040 76.8 18.347 11.52 30.293 26.027 35.84 47.787 12.373 48.213 27.307 95.573 39.253 143.36 8.533 33.707 26.88 58.88 56.32 77.227 40.533 25.173 80.64 52.053 120.747 78.507 6.4 4.267 10.24 11.52 15.36 17.493-7.253 2.56-14.933 7.253-22.187 6.827-75.52-6.4-151.467-13.227-226.987-20.48-2.133 0-4.693-0.853-6.827-0.853-22.613-1.707-39.253 10.24-40.96 29.867s12.373 33.707 35.413 35.84c45.227 4.267 90.88 8.96 136.107 12.8 65.707 5.547 131.84 10.667 197.547 15.36 26.027 1.707 53.76-21.76 67.413-55.467 9.813-23.893 5.12-46.080-18.347-65.28-49.92-40.107-100.693-78.933-151.040-118.187-23.040-17.92-23.893-23.467-6.4-46.507 58.453-78.080 116.48-156.587 174.933-234.667 27.307-36.693 25.173-50.773-12.373-75.52-5.12 0-9.813 0-14.080 0zM791.893 649.813c-43.093 1.28-76.373-31.573-77.227-75.52-0.853-44.373 29.44-76.8 72.107-77.653 45.227-1.28 77.653 29.44 78.080 73.813 0.427 45.227-29.44 78.080-72.96 79.36zM671.147 737.707c0-72.107-34.133-136.107-87.467-176.64l-235.52-21.76c-72.107 36.693-122.027 111.787-122.027 198.4 0 122.88 99.84 222.293 222.72 222.293 122.453 0 222.293-99.413 222.293-222.293zM592.213 680.533l-50.347 18.347c-2.133-8.533-5.12-16.213-9.813-22.613-5.12-6.4-10.24-11.947-16.213-17.067-5.973-4.267-12.373-8.107-19.2-11.093s-13.653-4.693-20.053-5.547c-17.92-2.987-33.707-0.427-48.64 6.827s-26.88 18.347-36.693 32.853l76.373 12.373 7.253 32.427-97.28-15.787c-1.28 5.547-2.987 11.093-3.84 16.64l-0.853 4.267 99.413 16.213 7.253 32.427-106.667-17.493c0.853 9.387 2.987 17.493 6.4 26.027 3.84 8.533 8.107 16.213 14.080 23.040 5.547 6.827 12.8 12.373 21.333 17.067s17.92 8.107 28.587 9.813c6.827 1.28 13.227 1.707 20.907 1.28s14.507-1.707 21.333-3.84c6.827-2.133 13.653-5.973 20.053-10.24 5.973-4.693 11.947-11.093 17.493-18.773l38.827 37.973c-13.227 17.92-30.293 31.147-52.053 39.253-21.76 8.533-46.080 10.667-73.387 6.4-19.627-2.987-36.267-9.387-51.2-17.92-14.507-8.533-26.88-19.2-37.547-32-10.667-12.373-18.773-26.027-23.893-40.96-5.547-14.507-8.96-29.867-9.813-45.653l-21.76-3.84-7.253-32.427 29.013 4.693 0.427-2.987c1.28-6.827 2.56-12.8 4.267-18.347l-23.467-3.84-8.107-32.427 43.52 7.253c6.827-13.653 15.787-26.027 26.027-36.693 10.24-11.52 22.187-20.48 35.413-27.733 13.227-7.68 27.307-12.8 42.667-15.787s31.573-3.413 47.36-0.853c12.373 2.133 24.32 5.12 35.84 10.667s22.613 11.52 32.853 19.2c10.24 8.107 18.347 16.64 26.027 26.453 6.827 9.387 12.373 20.48 15.36 32.427z" />
|
||||||
<glyph unicode="" glyph-name="deletedTicket" d="M160.672 85.696h693.248v639.776c0 0-2.016 234.528-349.696 234.528s-343.552-234.528-343.552-234.528v-639.776zM291.328 652.704h170.976v152.256h102.336v-152.256h171.008v-102.336h-171.008v-356.96h-102.336v356.96h-170.976v102.336zM64 61.056v-123.456h899.008v123.456h-899.008z" />
|
<glyph unicode="" glyph-name="deletedTicket" d="M160.672 85.696h693.248v639.776c0 0-2.016 234.528-349.696 234.528s-343.552-234.528-343.552-234.528v-639.776zM291.328 652.704h170.976v152.256h102.336v-152.256h171.008v-102.336h-171.008v-356.96h-102.336v356.96h-170.976v102.336zM64 61.056v-123.456h899.008v123.456h-899.008z" />
|
||||||
<glyph unicode="" glyph-name="deleteline" d="M354.133 192l-98.133 98.133 157.867 153.6-157.867 157.867 98.133 102.4 157.867-157.867 157.867 153.6 98.133-98.133-157.867-157.867 157.867-153.6-98.133-98.133-157.867 157.867-157.867-157.867zM780.8 507.733l-64-64 59.733-55.467h247.467v119.467h-243.2zM307.2 443.733l-64 64h-243.2v-119.467h251.733l55.467 55.467z" />
|
<glyph unicode="" glyph-name="deleteline" d="M354.133 192l-98.133 98.133 157.867 153.6-157.867 157.867 98.133 102.4 157.867-157.867 157.867 153.6 98.133-98.133-157.867-157.867 157.867-153.6-98.133-98.133-157.867 157.867-157.867-157.867zM780.8 507.733l-64-64 59.733-55.467h247.467v119.467h-243.2zM307.2 443.733l-64 64h-243.2v-119.467h251.733l55.467 55.467z" />
|
||||||
<glyph unicode="" glyph-name="delivery" d="M789.333 264.533c-55.467 0-102.4-46.933-102.4-102.4s46.933-102.4 102.4-102.4 102.4 46.933 102.4 102.4c0 59.733-46.933 102.4-102.4 102.4zM789.333 110.933c-29.867 0-51.2 21.333-51.2 51.2s21.333 51.2 51.2 51.2 51.2-21.333 51.2-51.2c0-25.6-25.6-51.2-51.2-51.2zM251.733 264.533c-55.467 0-102.4-46.933-102.4-102.4s46.933-102.4 102.4-102.4c55.467 0 102.4 46.933 102.4 102.4 0 59.733-46.933 102.4-102.4 102.4zM251.733 110.933c-29.867 0-51.2 21.333-51.2 51.2s21.333 51.2 51.2 51.2c29.867 0 51.2-21.333 51.2-51.2 0-25.6-25.6-51.2-51.2-51.2zM1006.933 537.6l-196.267 192c-12.8 12.8-29.867 17.067-46.933 17.067h-98.133v38.4c0 25.6-21.333 51.2-51.2 51.2h-563.2c-29.867 0-51.2-21.333-51.2-51.2v-554.667c0-29.867 25.6-51.2 51.2-51.2h68.267c8.533 64 64 115.2 132.267 115.2 64 0 123.733-51.2 132.267-115.2h268.8c8.533 64 64 115.2 132.267 115.2s128-51.2 136.533-115.2h51.2c29.867 0 51.2 25.6 51.2 51.2v260.267c0 17.067-8.533 34.133-17.067 46.933zM725.333 682.667c0 4.267 4.267 8.533 8.533 8.533h34.133c0 0 4.267 0 4.267-4.267l153.6-145.067c4.267 0 0-12.8-4.267-12.8h-187.733c-8.533 0-8.533 4.267-8.533 8.533v145.067zM311.467 597.333c0 46.933 29.867 85.333 59.733 93.867 4.267 0 4.267 0 8.533 0l98.133 12.8v-51.2c0-46.933-29.867-85.333-59.733-93.867-4.267 0-4.267 0-8.533 0l-98.133-17.067v55.467zM311.467 516.267l46.933 8.533c17.067 4.267 29.867-17.067 29.867-38.4l4.267-29.867-51.2-4.267c-17.067-4.267-29.867 12.8-29.867 38.4v25.6zM149.333 597.333v51.2l85.333 12.8c34.133 4.267 55.467-25.6 55.467-72.533v-51.2l-85.333-12.8c-34.133 0-59.733 29.867-55.467 72.533zM285.867 512v-38.4c0-34.133-21.333-64-42.667-68.267h-4.267l-72.533-8.533v38.4c0 34.133 21.333 64 42.667 68.267h4.267l72.533 8.533z" />
|
<glyph unicode="" glyph-name="delivery" d="M789.333 264.533c-55.467 0-102.4-46.933-102.4-102.4s46.933-102.4 102.4-102.4 102.4 46.933 102.4 102.4c0 59.733-46.933 102.4-102.4 102.4zM789.333 110.933c-29.867 0-51.2 21.333-51.2 51.2s21.333 51.2 51.2 51.2 51.2-21.333 51.2-51.2c0-25.6-25.6-51.2-51.2-51.2zM251.733 264.533c-55.467 0-102.4-46.933-102.4-102.4s46.933-102.4 102.4-102.4c55.467 0 102.4 46.933 102.4 102.4 0 59.733-46.933 102.4-102.4 102.4zM251.733 110.933c-29.867 0-51.2 21.333-51.2 51.2s21.333 51.2 51.2 51.2c29.867 0 51.2-21.333 51.2-51.2 0-25.6-25.6-51.2-51.2-51.2zM1006.933 537.6l-196.267 192c-12.8 12.8-29.867 17.067-46.933 17.067h-98.133v38.4c0 25.6-21.333 51.2-51.2 51.2h-563.2c-29.867 0-51.2-21.333-51.2-51.2v-554.667c0-29.867 25.6-51.2 51.2-51.2h68.267c8.533 64 64 115.2 132.267 115.2 64 0 123.733-51.2 132.267-115.2h268.8c8.533 64 64 115.2 132.267 115.2s128-51.2 136.533-115.2h51.2c29.867 0 51.2 25.6 51.2 51.2v260.267c0 17.067-8.533 34.133-17.067 46.933zM725.333 682.667c0 4.267 4.267 8.533 8.533 8.533h34.133c0 0 4.267 0 4.267-4.267l153.6-145.067c4.267 0 0-12.8-4.267-12.8h-187.733c-8.533 0-8.533 4.267-8.533 8.533v145.067zM311.467 597.333c0 46.933 29.867 85.333 59.733 93.867 4.267 0 4.267 0 8.533 0l98.133 12.8v-51.2c0-46.933-29.867-85.333-59.733-93.867-4.267 0-4.267 0-8.533 0l-98.133-17.067v55.467zM311.467 516.267l46.933 8.533c17.067 4.267 29.867-17.067 29.867-38.4l4.267-29.867-51.2-4.267c-17.067-4.267-29.867 12.8-29.867 38.4v25.6zM149.333 597.333v51.2l85.333 12.8c34.133 4.267 55.467-25.6 55.467-72.533v-51.2l-85.333-12.8c-34.133 0-59.733 29.867-55.467 72.533zM285.867 512v-38.4c0-34.133-21.333-64-42.667-68.267h-4.267l-72.533-8.533v38.4c0 34.133 21.333 64 42.667 68.267h4.267l72.533 8.533z" />
|
||||||
|
@ -132,4 +132,4 @@
|
||||||
<glyph unicode="" glyph-name="polizon" d="M1011.2 456.533l-264.533 106.667 29.867 29.867c4.267 4.267 4.267 12.8 4.267 17.067-4.267 4.267-8.533 8.533-12.8 8.533h-157.867c0 93.867 76.8 157.867 174.933 157.867 4.267 0 8.533 4.267 12.8 8.533s4.267 8.533 0 17.067l-81.067 153.6c-4.267 0-12.8 4.267-17.067 4.267-46.933 0-93.867-17.067-132.267-42.667-25.6-17.067-42.667-38.4-55.467-59.733-12.8 25.6-29.867 42.667-55.467 59.733-38.4 25.6-85.333 42.667-132.267 42.667-4.267 0-12.8-4.267-12.8-8.533l-81.067-153.6c-4.267-4.267-4.267-8.533 0-17.067 4.267-4.267 8.533-8.533 12.8-8.533 98.133 0 174.933-59.733 174.933-153.6v0h-140.8c-4.267 0-12.8-4.267-12.8-8.533-4.267-4.267 0-12.8 4.267-17.067l21.333-21.333-277.333-110.933c-8.533-8.533-12.8-12.8-8.533-21.333 0-8.533 8.533-12.8 17.067-12.8 0 0 0 0 0 0l98.133 4.267-76.8-98.133c0-4.267-4.267-8.533 0-12.8 0-4.267 4.267-8.533 8.533-8.533l85.333-34.133v-179.2c0-8.533 4.267-12.8 8.533-12.8l362.667-145.067c0 0 4.267 0 4.267 0s4.267 0 4.267 0l362.667 145.067c4.267 4.267 8.533 8.533 8.533 12.8v179.2l85.333 34.133c4.267 0 8.533 4.267 8.533 8.533s0 8.533-4.267 12.8l-72.533 98.133 102.4-4.267c8.533 0 12.8 4.267 17.067 12.8 0 8.533-4.267 12.8-12.8 17.067zM110.933 460.8l200.533 81.067 8.533-8.533-170.667-68.267-38.4-4.267zM153.6 294.4v4.267l-72.533 29.867 72.533 98.133 328.533-132.267-72.533-98.133-256 102.4v-4.267zM494.933-25.6l-328.533 132.267v153.6l243.2-98.133c0 0 4.267 0 4.267 0h4.267c0 0 4.267 0 4.267 0v0c0 0 0 0 4.267 0v0c0 0 4.267 0 4.267 4.267l64 85.333v-277.333zM494.933 328.533l-302.933 119.467 149.333 59.733 153.6-162.133v-17.067zM529.067 345.6l162.133 157.867 140.8-55.467-302.933-119.467v17.067zM857.6 106.667l-328.533-132.267v281.6l64-85.333c0 0 0-4.267 4.267-4.267v0c0 0 4.267 0 4.267 0v0c0 0 4.267 0 4.267 0v0 0c0 0 4.267 0 4.267 0l243.2 98.133v-157.867zM942.933 328.533l-328.533-132.267-72.533 98.133 328.533 132.267 72.533-98.133zM874.667 465.067l-162.133 64 12.8 8.533 187.733-76.8-38.4 4.267z" />
|
<glyph unicode="" glyph-name="polizon" d="M1011.2 456.533l-264.533 106.667 29.867 29.867c4.267 4.267 4.267 12.8 4.267 17.067-4.267 4.267-8.533 8.533-12.8 8.533h-157.867c0 93.867 76.8 157.867 174.933 157.867 4.267 0 8.533 4.267 12.8 8.533s4.267 8.533 0 17.067l-81.067 153.6c-4.267 0-12.8 4.267-17.067 4.267-46.933 0-93.867-17.067-132.267-42.667-25.6-17.067-42.667-38.4-55.467-59.733-12.8 25.6-29.867 42.667-55.467 59.733-38.4 25.6-85.333 42.667-132.267 42.667-4.267 0-12.8-4.267-12.8-8.533l-81.067-153.6c-4.267-4.267-4.267-8.533 0-17.067 4.267-4.267 8.533-8.533 12.8-8.533 98.133 0 174.933-59.733 174.933-153.6v0h-140.8c-4.267 0-12.8-4.267-12.8-8.533-4.267-4.267 0-12.8 4.267-17.067l21.333-21.333-277.333-110.933c-8.533-8.533-12.8-12.8-8.533-21.333 0-8.533 8.533-12.8 17.067-12.8 0 0 0 0 0 0l98.133 4.267-76.8-98.133c0-4.267-4.267-8.533 0-12.8 0-4.267 4.267-8.533 8.533-8.533l85.333-34.133v-179.2c0-8.533 4.267-12.8 8.533-12.8l362.667-145.067c0 0 4.267 0 4.267 0s4.267 0 4.267 0l362.667 145.067c4.267 4.267 8.533 8.533 8.533 12.8v179.2l85.333 34.133c4.267 0 8.533 4.267 8.533 8.533s0 8.533-4.267 12.8l-72.533 98.133 102.4-4.267c8.533 0 12.8 4.267 17.067 12.8 0 8.533-4.267 12.8-12.8 17.067zM110.933 460.8l200.533 81.067 8.533-8.533-170.667-68.267-38.4-4.267zM153.6 294.4v4.267l-72.533 29.867 72.533 98.133 328.533-132.267-72.533-98.133-256 102.4v-4.267zM494.933-25.6l-328.533 132.267v153.6l243.2-98.133c0 0 4.267 0 4.267 0h4.267c0 0 4.267 0 4.267 0v0c0 0 0 0 4.267 0v0c0 0 4.267 0 4.267 4.267l64 85.333v-277.333zM494.933 328.533l-302.933 119.467 149.333 59.733 153.6-162.133v-17.067zM529.067 345.6l162.133 157.867 140.8-55.467-302.933-119.467v17.067zM857.6 106.667l-328.533-132.267v281.6l64-85.333c0 0 0-4.267 4.267-4.267v0c0 0 4.267 0 4.267 0v0c0 0 4.267 0 4.267 0v0 0c0 0 4.267 0 4.267 0l243.2 98.133v-157.867zM942.933 328.533l-328.533-132.267-72.533 98.133 328.533 132.267 72.533-98.133zM874.667 465.067l-162.133 64 12.8 8.533 187.733-76.8-38.4 4.267z" />
|
||||||
<glyph unicode="" glyph-name="preserved" d="M512-64c16.213 0 28.587 13.227 28.587 28.587v215.040h2.987c73.387 2.133 130.987 25.173 170.667 67.84 68.267 72.107 62.72 177.493 60.16 197.973v0c-1.28 15.36-14.080 28.16-29.44 29.44-7.253 0.853-33.707 2.987-67.84-2.133l-12.373-2.133 11.093 6.827c14.080 8.96 26.453 19.2 37.547 30.72 68.267 72.107 62.72 177.493 60.16 197.973-1.28 15.36-14.080 28.16-29.44 29.44-14.080 1.28-64 4.267-117.76-14.507l-4.267-1.28 0.853 5.12c2.987 15.36 4.267 31.573 4.267 46.933-2.56 98.56-78.933 168.107-93.867 180.48-12.373 10.24-29.44 10.24-41.813 0-15.36-11.947-92.16-81.067-94.72-180.48-0.853-16.213 0.853-31.573 4.267-47.787l0.853-5.12-4.267 1.28c-53.76 19.2-104.533 16.213-118.613 14.507-15.36-1.28-28.16-14.080-29.44-29.44-2.133-20.48-8.107-125.867 60.16-197.973 11.093-11.093 22.613-21.333 36.693-30.293l10.24-6.827-12.373 2.133c-16.213 2.133-30.293 2.987-41.387 2.987s-19.2-0.853-23.467-0.853c-15.36-1.28-28.16-14.080-29.44-29.44-2.133-20.48-8.107-125.013 60.16-197.973 39.68-41.813 97.28-64.853 169.813-67.84h2.987v-215.040c0.427-14.933 12.8-28.16 29.013-28.16zM715.093 418.133h2.987v-2.987c-0.853-30.72-7.253-87.467-45.653-128-28.587-30.72-71.253-46.933-127.147-49.92h-2.987v2.987c2.133 58.88 20.053 103.68 51.627 133.12 38.827 37.973 92.587 44.8 121.173 44.8zM713.813 679.253h2.987v-2.987c-0.853-30.72-7.253-87.467-45.653-128-28.587-30.293-71.253-46.933-127.147-49.493h-2.987v2.987c2.133 58.88 20.053 103.68 51.627 133.12 39.253 37.12 93.013 43.52 121.173 44.373zM454.4 770.56c1.28 55.040 35.413 99.413 55.893 120.747l2.133 2.133 2.133-2.133c20.053-21.333 53.76-65.707 55.893-120.747 1.28-43.52-17.493-87.040-55.040-128.853l-2.133-2.133-2.133 2.133c-39.68 41.813-58.027 85.333-56.747 128.853zM351.573 548.267c-37.547 39.68-44.8 97.28-45.653 128v2.987h2.987c34.56-0.853 84.053-8.96 121.6-43.947v0c31.573-29.44 48.64-74.24 51.627-133.12v-2.987h-2.987c-56.32 2.133-98.987 18.773-127.573 49.067zM479.573 237.653c-55.893 2.133-98.56 19.2-127.147 49.493-37.547 39.68-44.8 97.28-45.653 128v2.987h2.987c28.587-0.853 82.347-7.253 121.6-43.947 31.573-29.44 48.64-74.24 51.627-133.12v-2.987h-3.413zM471.467 416.427c-8.96 8.107-18.347 15.36-29.44 22.613l-11.093 6.827 12.373-1.28c21.333-2.987 41.813-3.84 64-2.987 0.853 0 1.28 0 2.133 0h2.56c0.853 0 1.28 0 2.133 0 5.12 0 9.387 0 14.507 0 17.493 0 35.413 1.28 52.053 3.84l13.227 2.133-11.093-7.253c-11.093-6.827-20.48-14.507-29.44-22.613-14.507-14.080-28.16-31.573-38.827-51.627l-2.133-4.267-2.133 4.267c-10.667 18.773-23.893 36.267-38.827 50.347z" />
|
<glyph unicode="" glyph-name="preserved" d="M512-64c16.213 0 28.587 13.227 28.587 28.587v215.040h2.987c73.387 2.133 130.987 25.173 170.667 67.84 68.267 72.107 62.72 177.493 60.16 197.973v0c-1.28 15.36-14.080 28.16-29.44 29.44-7.253 0.853-33.707 2.987-67.84-2.133l-12.373-2.133 11.093 6.827c14.080 8.96 26.453 19.2 37.547 30.72 68.267 72.107 62.72 177.493 60.16 197.973-1.28 15.36-14.080 28.16-29.44 29.44-14.080 1.28-64 4.267-117.76-14.507l-4.267-1.28 0.853 5.12c2.987 15.36 4.267 31.573 4.267 46.933-2.56 98.56-78.933 168.107-93.867 180.48-12.373 10.24-29.44 10.24-41.813 0-15.36-11.947-92.16-81.067-94.72-180.48-0.853-16.213 0.853-31.573 4.267-47.787l0.853-5.12-4.267 1.28c-53.76 19.2-104.533 16.213-118.613 14.507-15.36-1.28-28.16-14.080-29.44-29.44-2.133-20.48-8.107-125.867 60.16-197.973 11.093-11.093 22.613-21.333 36.693-30.293l10.24-6.827-12.373 2.133c-16.213 2.133-30.293 2.987-41.387 2.987s-19.2-0.853-23.467-0.853c-15.36-1.28-28.16-14.080-29.44-29.44-2.133-20.48-8.107-125.013 60.16-197.973 39.68-41.813 97.28-64.853 169.813-67.84h2.987v-215.040c0.427-14.933 12.8-28.16 29.013-28.16zM715.093 418.133h2.987v-2.987c-0.853-30.72-7.253-87.467-45.653-128-28.587-30.72-71.253-46.933-127.147-49.92h-2.987v2.987c2.133 58.88 20.053 103.68 51.627 133.12 38.827 37.973 92.587 44.8 121.173 44.8zM713.813 679.253h2.987v-2.987c-0.853-30.72-7.253-87.467-45.653-128-28.587-30.293-71.253-46.933-127.147-49.493h-2.987v2.987c2.133 58.88 20.053 103.68 51.627 133.12 39.253 37.12 93.013 43.52 121.173 44.373zM454.4 770.56c1.28 55.040 35.413 99.413 55.893 120.747l2.133 2.133 2.133-2.133c20.053-21.333 53.76-65.707 55.893-120.747 1.28-43.52-17.493-87.040-55.040-128.853l-2.133-2.133-2.133 2.133c-39.68 41.813-58.027 85.333-56.747 128.853zM351.573 548.267c-37.547 39.68-44.8 97.28-45.653 128v2.987h2.987c34.56-0.853 84.053-8.96 121.6-43.947v0c31.573-29.44 48.64-74.24 51.627-133.12v-2.987h-2.987c-56.32 2.133-98.987 18.773-127.573 49.067zM479.573 237.653c-55.893 2.133-98.56 19.2-127.147 49.493-37.547 39.68-44.8 97.28-45.653 128v2.987h2.987c28.587-0.853 82.347-7.253 121.6-43.947 31.573-29.44 48.64-74.24 51.627-133.12v-2.987h-3.413zM471.467 416.427c-8.96 8.107-18.347 15.36-29.44 22.613l-11.093 6.827 12.373-1.28c21.333-2.987 41.813-3.84 64-2.987 0.853 0 1.28 0 2.133 0h2.56c0.853 0 1.28 0 2.133 0 5.12 0 9.387 0 14.507 0 17.493 0 35.413 1.28 52.053 3.84l13.227 2.133-11.093-7.253c-11.093-6.827-20.48-14.507-29.44-22.613-14.507-14.080-28.16-31.573-38.827-51.627l-2.133-4.267-2.133 4.267c-10.667 18.773-23.893 36.267-38.827 50.347z" />
|
||||||
<glyph unicode="" glyph-name="recovery" d="M746.667 477.867c68.267 0 140.8-21.333 196.267-72.533 110.933-102.4 115.2-277.333 8.533-384s-277.333-115.2-384-8.533c-93.867 85.333-110.933 221.867-51.2 328.533l51.2-46.933c-34.133-76.8-17.067-170.667 46.933-230.4 81.067-76.8 209.067-72.533 290.133 8.533 76.8 81.067 72.533 209.067-8.533 290.133-42.667 38.4-93.867 55.467-145.067 55.467l4.267-153.6-170.667 162.133 162.133 170.667v-119.467zM337.067 209.067c0 0 0 0 0 0-17.067 8.533-38.4 17.067-55.467 25.6-21.333 8.533-29.867 25.6-29.867 51.2s0 51.2 0 81.067c29.867-17.067 64-29.867 102.4-38.4 4.267 17.067 12.8 34.133 21.333 51.2-17.067 4.267-34.133 8.533-51.2 17.067-21.333 8.533-38.4 21.333-55.467 29.867-12.8 8.533-17.067 17.067-12.8 34.133 0 29.867 0 55.467 0 85.333 68.267-29.867 132.267-46.933 200.533-51.2 17.067 21.333 38.4 38.4 64 55.467 0 0-4.267 0-4.267 0-51.2 0-106.667 4.267-157.867 21.333-34.133 0-59.733 12.8-81.067 29.867-29.867 21.333-29.867 42.667 4.267 64 38.4 25.6 81.067 34.133 128 42.667 55.467 8.533 110.933 8.533 166.4 4.267 51.2-4.267 102.4-17.067 149.333-38.4 12.8-4.267 42.667-29.867 38.4-55.467 55.467 0 106.667-12.8 153.6-34.133 17.067 4.267 29.867 8.533 46.933 12.8 0-12.8 0-25.6 0-38.4 21.333-12.8 38.4-25.6 55.467-42.667 0 98.133 0 200.533 0 298.667 0 42.667-17.067 72.533-51.2 93.867-46.933 29.867-98.133 38.4-149.333 42.667-34.133 8.533-72.533 8.533-110.933 8.533-72.533-4.267-140.8-21.333-200.533-64-4.267 0-8.533 4.267-8.533 4.267-51.2 34.133-110.933 46.933-170.667 51.2-51.2 0-102.4 0-153.6-8.533-46.933-8.533-93.867-17.067-136.533-46.933-25.6-21.333-38.4-42.667-38.4-76.8 0-145.067 0-294.4 0-439.467 0-38.4 17.067-64 46.933-81.067 21.333-12.8 46.933-25.6 72.533-29.867 25.6-8.533 51.2-12.8 81.067-17.067 17.067-46.933 55.467-68.267 102.4-85.333 12.8-4.267 29.867-8.533 42.667-12.8-4.267 17.067-8.533 34.133-8.533 55.467zM964.267 686.933c0-8.533-8.533-21.333-17.067-25.6-34.133-21.333-76.8-34.133-119.467-38.4-4.267 38.4-17.067 68.267-55.467 89.6 68.267 0 128 12.8 192 42.667 4.267-25.6 4.267-46.933 0-68.267zM610.133 883.2c68.267 17.067 136.533 25.6 204.8 17.067 42.667-4.267 85.333-12.8 128-34.133 12.8-8.533 21.333-12.8 25.6-34.133-8.533-8.533-17.067-17.067-25.6-21.333-29.867-17.067-64-29.867-98.133-34.133-38.4-4.267-76.8-8.533-115.2-8.533-46.933 0-89.6 8.533-132.267 25.6-21.333 8.533-42.667 17.067-55.467 42.667 12.8 29.867 38.4 42.667 68.267 46.933zM68.267 844.8c25.6 25.6 64 34.133 98.133 38.4 29.867 4.267 59.733 12.8 85.333 12.8 68.267 0 132.267-4.267 196.267-34.133 8.533-4.267 17.067-8.533 25.6-17.067 12.8-8.533 12.8-21.333 0-34.133-8.533-8.533-17.067-12.8-29.867-21.333-42.667-21.333-85.333-29.867-132.267-34.133-17.067 0-29.867 0-42.667 0-55.467 4.267-110.933 12.8-162.133 29.867-12.8 4.267-29.867 12.8-42.667 21.333-12.8 17.067-8.533 25.6 4.267 38.4zM196.267 307.2c-25.6 8.533-51.2 12.8-72.533 21.333-8.533 4.267-21.333 8.533-29.867 12.8-25.6 12.8-38.4 29.867-34.133 59.733 0 17.067 0 29.867 0 51.2 46.933-25.6 89.6-34.133 136.533-38.4 0-42.667 0-72.533 0-106.667zM55.467 529.067c0 21.333 0 42.667 0 59.733 46.933-12.8 93.867-21.333 140.8-34.133 0-29.867 0-59.733 0-93.867-34.133 4.267-64 12.8-93.867 21.333-8.533 4.267-21.333 12.8-29.867 17.067-12.8 8.533-17.067 17.067-17.067 29.867zM196.267 618.667c-4.267 0-12.8-4.267-17.067 0-34.133 0-68.267 12.8-102.4 29.867-12.8 8.533-21.333 21.333-21.333 38.4s0 38.4 0 59.733c59.733-25.6 115.2-38.4 179.2-42.667-21.333-25.6-42.667-51.2-38.4-85.333z" />
|
<glyph unicode="" glyph-name="recovery" d="M746.667 477.867c68.267 0 140.8-21.333 196.267-72.533 110.933-102.4 115.2-277.333 8.533-384s-277.333-115.2-384-8.533c-93.867 85.333-110.933 221.867-51.2 328.533l51.2-46.933c-34.133-76.8-17.067-170.667 46.933-230.4 81.067-76.8 209.067-72.533 290.133 8.533 76.8 81.067 72.533 209.067-8.533 290.133-42.667 38.4-93.867 55.467-145.067 55.467l4.267-153.6-170.667 162.133 162.133 170.667v-119.467zM337.067 209.067c0 0 0 0 0 0-17.067 8.533-38.4 17.067-55.467 25.6-21.333 8.533-29.867 25.6-29.867 51.2s0 51.2 0 81.067c29.867-17.067 64-29.867 102.4-38.4 4.267 17.067 12.8 34.133 21.333 51.2-17.067 4.267-34.133 8.533-51.2 17.067-21.333 8.533-38.4 21.333-55.467 29.867-12.8 8.533-17.067 17.067-12.8 34.133 0 29.867 0 55.467 0 85.333 68.267-29.867 132.267-46.933 200.533-51.2 17.067 21.333 38.4 38.4 64 55.467 0 0-4.267 0-4.267 0-51.2 0-106.667 4.267-157.867 21.333-34.133 0-59.733 12.8-81.067 29.867-29.867 21.333-29.867 42.667 4.267 64 38.4 25.6 81.067 34.133 128 42.667 55.467 8.533 110.933 8.533 166.4 4.267 51.2-4.267 102.4-17.067 149.333-38.4 12.8-4.267 42.667-29.867 38.4-55.467 55.467 0 106.667-12.8 153.6-34.133 17.067 4.267 29.867 8.533 46.933 12.8 0-12.8 0-25.6 0-38.4 21.333-12.8 38.4-25.6 55.467-42.667 0 98.133 0 200.533 0 298.667 0 42.667-17.067 72.533-51.2 93.867-46.933 29.867-98.133 38.4-149.333 42.667-34.133 8.533-72.533 8.533-110.933 8.533-72.533-4.267-140.8-21.333-200.533-64-4.267 0-8.533 4.267-8.533 4.267-51.2 34.133-110.933 46.933-170.667 51.2-51.2 0-102.4 0-153.6-8.533-46.933-8.533-93.867-17.067-136.533-46.933-25.6-21.333-38.4-42.667-38.4-76.8 0-145.067 0-294.4 0-439.467 0-38.4 17.067-64 46.933-81.067 21.333-12.8 46.933-25.6 72.533-29.867 25.6-8.533 51.2-12.8 81.067-17.067 17.067-46.933 55.467-68.267 102.4-85.333 12.8-4.267 29.867-8.533 42.667-12.8-4.267 17.067-8.533 34.133-8.533 55.467zM964.267 686.933c0-8.533-8.533-21.333-17.067-25.6-34.133-21.333-76.8-34.133-119.467-38.4-4.267 38.4-17.067 68.267-55.467 89.6 68.267 0 128 12.8 192 42.667 4.267-25.6 4.267-46.933 0-68.267zM610.133 883.2c68.267 17.067 136.533 25.6 204.8 17.067 42.667-4.267 85.333-12.8 128-34.133 12.8-8.533 21.333-12.8 25.6-34.133-8.533-8.533-17.067-17.067-25.6-21.333-29.867-17.067-64-29.867-98.133-34.133-38.4-4.267-76.8-8.533-115.2-8.533-46.933 0-89.6 8.533-132.267 25.6-21.333 8.533-42.667 17.067-55.467 42.667 12.8 29.867 38.4 42.667 68.267 46.933zM68.267 844.8c25.6 25.6 64 34.133 98.133 38.4 29.867 4.267 59.733 12.8 85.333 12.8 68.267 0 132.267-4.267 196.267-34.133 8.533-4.267 17.067-8.533 25.6-17.067 12.8-8.533 12.8-21.333 0-34.133-8.533-8.533-17.067-12.8-29.867-21.333-42.667-21.333-85.333-29.867-132.267-34.133-17.067 0-29.867 0-42.667 0-55.467 4.267-110.933 12.8-162.133 29.867-12.8 4.267-29.867 12.8-42.667 21.333-12.8 17.067-8.533 25.6 4.267 38.4zM196.267 307.2c-25.6 8.533-51.2 12.8-72.533 21.333-8.533 4.267-21.333 8.533-29.867 12.8-25.6 12.8-38.4 29.867-34.133 59.733 0 17.067 0 29.867 0 51.2 46.933-25.6 89.6-34.133 136.533-38.4 0-42.667 0-72.533 0-106.667zM55.467 529.067c0 21.333 0 42.667 0 59.733 46.933-12.8 93.867-21.333 140.8-34.133 0-29.867 0-59.733 0-93.867-34.133 4.267-64 12.8-93.867 21.333-8.533 4.267-21.333 12.8-29.867 17.067-12.8 8.533-17.067 17.067-17.067 29.867zM196.267 618.667c-4.267 0-12.8-4.267-17.067 0-34.133 0-68.267 12.8-102.4 29.867-12.8 8.533-21.333 21.333-21.333 38.4s0 38.4 0 59.733c59.733-25.6 115.2-38.4 179.2-42.667-21.333-25.6-42.667-51.2-38.4-85.333z" />
|
||||||
</font></defs></svg>
|
</font></defs></svg>
|
||||||
|
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 173 KiB |
File diff suppressed because one or more lines are too long
|
@ -1,402 +1,418 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icon';
|
font-family: 'icon';
|
||||||
src: url('fonts/icon.eot?2omjsr');
|
src: url('fonts/icon.eot?2omjsr');
|
||||||
src: url('fonts/icon.eot?2omjsr#iefix') format('embedded-opentype'),
|
src: url('fonts/icon.eot?2omjsr#iefix') format('embedded-opentype'),
|
||||||
url('fonts/icon.ttf?2omjsr') format('truetype'),
|
url('fonts/icon.ttf?2omjsr') format('truetype'),
|
||||||
url('fonts/icon.woff?2omjsr') format('woff'),
|
url('fonts/icon.woff?2omjsr') format('woff'),
|
||||||
url('fonts/icon.svg?2omjsr#icon') format('svg');
|
url('fonts/icon.svg?2omjsr#icon') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: block;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class^="icon-"], [class*=" icon-"] {
|
[class^='icon-'],
|
||||||
/* use !important to prevent issues with browser extensions that change fonts */
|
[class*=' icon-'] {
|
||||||
font-family: 'icon' !important;
|
/* use !important to prevent issues with browser extensions that change fonts */
|
||||||
speak: never;
|
font-family: 'icon' !important;
|
||||||
font-style: normal;
|
speak: never;
|
||||||
font-weight: normal;
|
font-style: normal;
|
||||||
font-variant: normal;
|
font-weight: normal;
|
||||||
text-transform: none;
|
font-variant: normal;
|
||||||
line-height: 1;
|
text-transform: none;
|
||||||
|
line-height: 1;
|
||||||
|
|
||||||
/* Better Font Rendering =========== */
|
/* Better Font Rendering =========== */
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-100:before {
|
.icon-100:before {
|
||||||
content: "\e926";
|
content: '\e926';
|
||||||
}
|
}
|
||||||
.icon-Client_unpaid:before {
|
.icon-Client_unpaid:before {
|
||||||
content: "\e925";
|
content: '\e925';
|
||||||
|
}
|
||||||
|
.icon-Client_unpaid:before {
|
||||||
|
content: '\e925';
|
||||||
}
|
}
|
||||||
.icon-History:before {
|
.icon-History:before {
|
||||||
content: "\e964";
|
content: '\e964';
|
||||||
}
|
}
|
||||||
.icon-Person:before {
|
.icon-Person:before {
|
||||||
content: "\e984";
|
content: '\e984';
|
||||||
}
|
}
|
||||||
.icon-accessory:before {
|
.icon-accessory:before {
|
||||||
content: "\e948";
|
content: '\e948';
|
||||||
}
|
}
|
||||||
.icon-account:before {
|
.icon-account:before {
|
||||||
content: "\e927";
|
content: '\e927';
|
||||||
}
|
}
|
||||||
.icon-actions:before {
|
.icon-actions:before {
|
||||||
content: "\e928";
|
content: '\e928';
|
||||||
}
|
}
|
||||||
.icon-addperson:before {
|
.icon-addperson:before {
|
||||||
content: "\e929";
|
content: '\e929';
|
||||||
}
|
}
|
||||||
.icon-agency:before {
|
.icon-agency:before {
|
||||||
content: "\e92a";
|
content: '\e92a';
|
||||||
|
}
|
||||||
|
.icon-agency:before {
|
||||||
|
content: '\e92a';
|
||||||
}
|
}
|
||||||
.icon-agency-term:before {
|
.icon-agency-term:before {
|
||||||
content: "\e92b";
|
content: '\e92b';
|
||||||
}
|
}
|
||||||
.icon-albaran:before {
|
.icon-albaran:before {
|
||||||
content: "\e92c";
|
content: '\e92c';
|
||||||
|
}
|
||||||
|
.icon-albaran:before {
|
||||||
|
content: '\e92c';
|
||||||
}
|
}
|
||||||
.icon-anonymous:before {
|
.icon-anonymous:before {
|
||||||
content: "\e92d";
|
content: '\e92d';
|
||||||
}
|
}
|
||||||
.icon-apps:before {
|
.icon-apps:before {
|
||||||
content: "\e92e";
|
content: '\e92e';
|
||||||
}
|
}
|
||||||
.icon-artificial:before {
|
.icon-artificial:before {
|
||||||
content: "\e92f";
|
content: '\e92f';
|
||||||
}
|
}
|
||||||
.icon-attach:before {
|
.icon-attach:before {
|
||||||
content: "\e930";
|
content: '\e930';
|
||||||
}
|
}
|
||||||
.icon-barcode:before {
|
.icon-barcode:before {
|
||||||
content: "\e932";
|
content: '\e932';
|
||||||
}
|
}
|
||||||
.icon-basket:before {
|
.icon-basket:before {
|
||||||
content: "\e933";
|
content: '\e933';
|
||||||
}
|
}
|
||||||
.icon-basketadd:before {
|
.icon-basketadd:before {
|
||||||
content: "\e934";
|
content: '\e934';
|
||||||
}
|
}
|
||||||
.icon-bin:before {
|
.icon-bin:before {
|
||||||
content: "\e935";
|
content: '\e935';
|
||||||
}
|
}
|
||||||
.icon-botanical:before {
|
.icon-botanical:before {
|
||||||
content: "\e936";
|
content: '\e936';
|
||||||
}
|
}
|
||||||
.icon-bucket:before {
|
.icon-bucket:before {
|
||||||
content: "\e937";
|
content: '\e937';
|
||||||
}
|
}
|
||||||
.icon-buscaman:before {
|
.icon-buscaman:before {
|
||||||
content: "\e938";
|
content: '\e938';
|
||||||
}
|
}
|
||||||
.icon-buyrequest:before {
|
.icon-buyrequest:before {
|
||||||
content: "\e939";
|
content: '\e939';
|
||||||
}
|
}
|
||||||
.icon-calc_volum:before {
|
.icon-calc_volum:before {
|
||||||
content: "\e93a";
|
content: '\e93a';
|
||||||
}
|
}
|
||||||
.icon-calendar:before {
|
.icon-calendar:before {
|
||||||
content: "\e940";
|
content: '\e940';
|
||||||
}
|
}
|
||||||
.icon-catalog:before {
|
.icon-catalog:before {
|
||||||
content: "\e941";
|
content: '\e941';
|
||||||
}
|
}
|
||||||
.icon-claims:before {
|
.icon-claims:before {
|
||||||
content: "\e942";
|
content: '\e942';
|
||||||
}
|
}
|
||||||
.icon-client:before {
|
.icon-client:before {
|
||||||
content: "\e943";
|
content: '\e943';
|
||||||
}
|
}
|
||||||
.icon-clone:before {
|
.icon-clone:before {
|
||||||
content: "\e945";
|
content: '\e945';
|
||||||
}
|
}
|
||||||
.icon-columnadd:before {
|
.icon-columnadd:before {
|
||||||
content: "\e946";
|
content: '\e946';
|
||||||
}
|
}
|
||||||
.icon-columndelete:before {
|
.icon-columndelete:before {
|
||||||
content: "\e947";
|
content: '\e947';
|
||||||
}
|
}
|
||||||
.icon-components:before {
|
.icon-components:before {
|
||||||
content: "\e949";
|
content: '\e949';
|
||||||
}
|
}
|
||||||
.icon-consignatarios:before {
|
.icon-consignatarios:before {
|
||||||
content: "\e94b";
|
content: '\e94b';
|
||||||
}
|
}
|
||||||
.icon-control:before {
|
.icon-control:before {
|
||||||
content: "\e94c";
|
content: '\e94c';
|
||||||
}
|
}
|
||||||
.icon-credit:before {
|
.icon-credit:before {
|
||||||
content: "\e94d";
|
content: '\e94d';
|
||||||
}
|
}
|
||||||
.icon-deaulter:before {
|
.icon-defaulter:before {
|
||||||
content: "\e94e";
|
content: '\e94e';
|
||||||
}
|
}
|
||||||
.icon-deletedTicket:before {
|
.icon-deletedTicket:before {
|
||||||
content: "\e94f";
|
content: '\e94f';
|
||||||
}
|
}
|
||||||
.icon-deleteline:before {
|
.icon-deleteline:before {
|
||||||
content: "\e950";
|
content: '\e950';
|
||||||
}
|
}
|
||||||
.icon-delivery:before {
|
.icon-delivery:before {
|
||||||
content: "\e951";
|
content: '\e951';
|
||||||
}
|
}
|
||||||
.icon-deliveryprices:before {
|
.icon-deliveryprices:before {
|
||||||
content: "\e952";
|
content: '\e952';
|
||||||
}
|
}
|
||||||
.icon-details:before {
|
.icon-details:before {
|
||||||
content: "\e954";
|
content: '\e954';
|
||||||
}
|
}
|
||||||
.icon-dfiscales:before {
|
.icon-dfiscales:before {
|
||||||
content: "\e955";
|
content: '\e955';
|
||||||
}
|
}
|
||||||
.icon-disabled:before {
|
.icon-disabled:before {
|
||||||
content: "\e965";
|
content: '\e965';
|
||||||
}
|
}
|
||||||
.icon-doc:before {
|
.icon-doc:before {
|
||||||
content: "\e956";
|
content: '\e956';
|
||||||
}
|
}
|
||||||
.icon-entry:before {
|
.icon-entry:before {
|
||||||
content: "\e958";
|
content: '\e958';
|
||||||
}
|
}
|
||||||
.icon-exit:before {
|
.icon-exit:before {
|
||||||
content: "\e959";
|
content: '\e959';
|
||||||
}
|
}
|
||||||
.icon-eye:before {
|
.icon-eye:before {
|
||||||
content: "\e95a";
|
content: '\e95a';
|
||||||
}
|
}
|
||||||
.icon-fixedPrice:before {
|
.icon-fixedPrice:before {
|
||||||
content: "\e95b";
|
content: '\e95b';
|
||||||
}
|
}
|
||||||
.icon-flower:before {
|
.icon-flower:before {
|
||||||
content: "\e95c";
|
content: '\e95c';
|
||||||
}
|
}
|
||||||
.icon-frozen:before {
|
.icon-frozen:before {
|
||||||
content: "\e95d";
|
content: '\e95d';
|
||||||
}
|
}
|
||||||
.icon-fruit:before {
|
.icon-fruit:before {
|
||||||
content: "\e95e";
|
content: '\e95e';
|
||||||
}
|
}
|
||||||
.icon-funeral:before {
|
.icon-funeral:before {
|
||||||
content: "\e95f";
|
content: '\e95f';
|
||||||
}
|
}
|
||||||
.icon-grafana:before {
|
.icon-grafana:before {
|
||||||
content: "\e931";
|
content: '\e931';
|
||||||
|
}
|
||||||
|
.icon-grafana:before {
|
||||||
|
content: '\e931';
|
||||||
}
|
}
|
||||||
.icon-greenery:before {
|
.icon-greenery:before {
|
||||||
content: "\e91e";
|
content: '\e91e';
|
||||||
}
|
}
|
||||||
.icon-greuge:before {
|
.icon-greuge:before {
|
||||||
content: "\e960";
|
content: '\e960';
|
||||||
}
|
}
|
||||||
.icon-grid:before {
|
.icon-grid:before {
|
||||||
content: "\e961";
|
content: '\e961';
|
||||||
}
|
}
|
||||||
.icon-handmade:before {
|
.icon-handmade:before {
|
||||||
content: "\e94a";
|
content: '\e94a';
|
||||||
}
|
}
|
||||||
.icon-handmadeArtificial:before {
|
.icon-handmadeArtificial:before {
|
||||||
content: "\e962";
|
content: '\e962';
|
||||||
}
|
}
|
||||||
.icon-headercol:before {
|
.icon-headercol:before {
|
||||||
content: "\e963";
|
content: '\e963';
|
||||||
}
|
}
|
||||||
.icon-info:before {
|
.icon-info:before {
|
||||||
content: "\e966";
|
content: '\e966';
|
||||||
}
|
}
|
||||||
.icon-inventory:before {
|
.icon-inventory:before {
|
||||||
content: "\e967";
|
content: '\e967';
|
||||||
}
|
}
|
||||||
.icon-invoice:before {
|
.icon-invoice:before {
|
||||||
content: "\e969";
|
content: '\e969';
|
||||||
}
|
}
|
||||||
.icon-invoice-in:before {
|
.icon-invoice-in:before {
|
||||||
content: "\e96a";
|
content: '\e96a';
|
||||||
}
|
}
|
||||||
.icon-invoice-in-create:before {
|
.icon-invoice-in-create:before {
|
||||||
content: "\e96b";
|
content: '\e96b';
|
||||||
}
|
}
|
||||||
.icon-invoice-out:before {
|
.icon-invoice-out:before {
|
||||||
content: "\e96c";
|
content: '\e96c';
|
||||||
}
|
}
|
||||||
.icon-isTooLittle:before {
|
.icon-isTooLittle:before {
|
||||||
content: "\e96e";
|
content: '\e96e';
|
||||||
}
|
}
|
||||||
.icon-item:before {
|
.icon-item:before {
|
||||||
content: "\e96f";
|
content: '\e96f';
|
||||||
}
|
}
|
||||||
.icon-languaje:before {
|
.icon-languaje:before {
|
||||||
content: "\e912";
|
content: '\e912';
|
||||||
}
|
}
|
||||||
.icon-lines:before {
|
.icon-lines:before {
|
||||||
content: "\e971";
|
content: '\e971';
|
||||||
}
|
}
|
||||||
.icon-linesprepaired:before {
|
.icon-linesprepaired:before {
|
||||||
content: "\e972";
|
content: '\e972';
|
||||||
}
|
}
|
||||||
.icon-link-to-corrected:before {
|
.icon-link-to-corrected:before {
|
||||||
content: "\e900";
|
content: '\e900';
|
||||||
}
|
}
|
||||||
.icon-link-to-correcting:before {
|
.icon-link-to-correcting:before {
|
||||||
content: "\e906";
|
content: '\e906';
|
||||||
}
|
}
|
||||||
.icon-logout:before {
|
.icon-logout:before {
|
||||||
content: "\e90a";
|
content: '\e90a';
|
||||||
}
|
}
|
||||||
.icon-mana:before {
|
.icon-mana:before {
|
||||||
content: "\e974";
|
content: '\e974';
|
||||||
}
|
}
|
||||||
.icon-mandatory:before {
|
.icon-mandatory:before {
|
||||||
content: "\e975";
|
content: '\e975';
|
||||||
}
|
}
|
||||||
.icon-net:before {
|
.icon-net:before {
|
||||||
content: "\e976";
|
content: '\e976';
|
||||||
}
|
}
|
||||||
.icon-newalbaran:before {
|
.icon-newalbaran:before {
|
||||||
content: "\e977";
|
content: '\e977';
|
||||||
}
|
}
|
||||||
.icon-niche:before {
|
.icon-niche:before {
|
||||||
content: "\e979";
|
content: '\e979';
|
||||||
}
|
}
|
||||||
.icon-no036:before {
|
.icon-no036:before {
|
||||||
content: "\e97a";
|
content: '\e97a';
|
||||||
}
|
}
|
||||||
.icon-noPayMethod:before {
|
.icon-noPayMethod:before {
|
||||||
content: "\e97b";
|
content: '\e97b';
|
||||||
}
|
}
|
||||||
.icon-notes:before {
|
.icon-notes:before {
|
||||||
content: "\e97c";
|
content: '\e97c';
|
||||||
}
|
}
|
||||||
.icon-noweb:before {
|
.icon-noweb:before {
|
||||||
content: "\e97e";
|
content: '\e97e';
|
||||||
}
|
}
|
||||||
.icon-onlinepayment:before {
|
.icon-onlinepayment:before {
|
||||||
content: "\e97f";
|
content: '\e97f';
|
||||||
}
|
}
|
||||||
.icon-package:before {
|
.icon-package:before {
|
||||||
content: "\e980";
|
content: '\e980';
|
||||||
}
|
}
|
||||||
.icon-payment:before {
|
.icon-payment:before {
|
||||||
content: "\e982";
|
content: '\e982';
|
||||||
}
|
}
|
||||||
.icon-pbx:before {
|
.icon-pbx:before {
|
||||||
content: "\e983";
|
content: '\e983';
|
||||||
}
|
}
|
||||||
.icon-pets:before {
|
.icon-pets:before {
|
||||||
content: "\e985";
|
content: '\e985';
|
||||||
}
|
}
|
||||||
.icon-photo:before {
|
.icon-photo:before {
|
||||||
content: "\e986";
|
content: '\e986';
|
||||||
}
|
}
|
||||||
.icon-plant:before {
|
.icon-plant:before {
|
||||||
content: "\e987";
|
content: '\e987';
|
||||||
}
|
}
|
||||||
.icon-polizon:before {
|
.icon-polizon:before {
|
||||||
content: "\e989";
|
content: '\e989';
|
||||||
}
|
}
|
||||||
.icon-preserved:before {
|
.icon-preserved:before {
|
||||||
content: "\e98a";
|
content: '\e98a';
|
||||||
}
|
}
|
||||||
.icon-recovery:before {
|
.icon-recovery:before {
|
||||||
content: "\e98b";
|
content: '\e98b';
|
||||||
}
|
}
|
||||||
.icon-regentry:before {
|
.icon-regentry:before {
|
||||||
content: "\e901";
|
content: '\e901';
|
||||||
}
|
}
|
||||||
.icon-reserva:before {
|
.icon-reserva:before {
|
||||||
content: "\e902";
|
content: '\e902';
|
||||||
}
|
}
|
||||||
.icon-revision:before {
|
.icon-revision:before {
|
||||||
content: "\e903";
|
content: '\e903';
|
||||||
}
|
}
|
||||||
.icon-risk:before {
|
.icon-risk:before {
|
||||||
content: "\e904";
|
content: '\e904';
|
||||||
}
|
}
|
||||||
.icon-services:before {
|
.icon-services:before {
|
||||||
content: "\e905";
|
content: '\e905';
|
||||||
}
|
}
|
||||||
.icon-settings:before {
|
.icon-settings:before {
|
||||||
content: "\e907";
|
content: '\e907';
|
||||||
}
|
}
|
||||||
.icon-shipment:before {
|
.icon-shipment:before {
|
||||||
content: "\e908";
|
content: '\e908';
|
||||||
}
|
}
|
||||||
.icon-sign:before {
|
.icon-sign:before {
|
||||||
content: "\e909";
|
content: '\e909';
|
||||||
}
|
}
|
||||||
.icon-sms:before {
|
.icon-sms:before {
|
||||||
content: "\e90b";
|
content: '\e90b';
|
||||||
}
|
}
|
||||||
.icon-solclaim:before {
|
.icon-solclaim:before {
|
||||||
content: "\e90c";
|
content: '\e90c';
|
||||||
}
|
}
|
||||||
.icon-solunion:before {
|
.icon-solunion:before {
|
||||||
content: "\e90d";
|
content: '\e90d';
|
||||||
}
|
}
|
||||||
.icon-splitline:before {
|
.icon-splitline:before {
|
||||||
content: "\e90e";
|
content: '\e90e';
|
||||||
}
|
}
|
||||||
.icon-splur:before {
|
.icon-splur:before {
|
||||||
content: "\e90f";
|
content: '\e90f';
|
||||||
}
|
}
|
||||||
.icon-stowaway:before {
|
.icon-stowaway:before {
|
||||||
content: "\e910";
|
content: '\e910';
|
||||||
}
|
}
|
||||||
.icon-supplier:before {
|
.icon-supplier:before {
|
||||||
content: "\e911";
|
content: '\e911';
|
||||||
}
|
}
|
||||||
.icon-supplierfalse:before {
|
.icon-supplierfalse:before {
|
||||||
content: "\e913";
|
content: '\e913';
|
||||||
}
|
}
|
||||||
.icon-tags:before {
|
.icon-tags:before {
|
||||||
content: "\e914";
|
content: '\e914';
|
||||||
}
|
}
|
||||||
.icon-tax:before {
|
.icon-tax:before {
|
||||||
content: "\e915";
|
content: '\e915';
|
||||||
}
|
}
|
||||||
.icon-thermometer:before {
|
.icon-thermometer:before {
|
||||||
content: "\e916";
|
content: '\e916';
|
||||||
}
|
}
|
||||||
.icon-ticket:before {
|
.icon-ticket:before {
|
||||||
content: "\e917";
|
content: '\e917';
|
||||||
}
|
}
|
||||||
.icon-ticketAdd:before {
|
.icon-ticketAdd:before {
|
||||||
content: "\e918";
|
content: '\e918';
|
||||||
}
|
}
|
||||||
.icon-traceability:before {
|
.icon-traceability:before {
|
||||||
content: "\e919";
|
content: '\e919';
|
||||||
}
|
}
|
||||||
.icon-transaction:before {
|
.icon-transaction:before {
|
||||||
content: "\e93b";
|
content: '\e93b';
|
||||||
|
}
|
||||||
|
.icon-transaction:before {
|
||||||
|
content: '\e93b';
|
||||||
}
|
}
|
||||||
.icon-treatments:before {
|
.icon-treatments:before {
|
||||||
content: "\e91c";
|
content: '\e91c';
|
||||||
}
|
}
|
||||||
.icon-trolley:before {
|
.icon-trolley:before {
|
||||||
content: "\e91a";
|
content: '\e91a';
|
||||||
}
|
}
|
||||||
.icon-troncales:before {
|
.icon-troncales:before {
|
||||||
content: "\e91b";
|
content: '\e91b';
|
||||||
}
|
}
|
||||||
.icon-unavailable:before {
|
.icon-unavailable:before {
|
||||||
content: "\e91d";
|
content: '\e91d';
|
||||||
}
|
}
|
||||||
.icon-volume:before {
|
.icon-volume:before {
|
||||||
content: "\e91f";
|
content: '\e91f';
|
||||||
}
|
}
|
||||||
.icon-wand:before {
|
.icon-wand:before {
|
||||||
content: "\e920";
|
content: '\e920';
|
||||||
}
|
}
|
||||||
.icon-web:before {
|
.icon-web:before {
|
||||||
content: "\e921";
|
content: '\e921';
|
||||||
}
|
}
|
||||||
.icon-wiki:before {
|
.icon-wiki:before {
|
||||||
content: "\e922";
|
content: '\e922';
|
||||||
}
|
}
|
||||||
.icon-worker:before {
|
.icon-worker:before {
|
||||||
content: "\e923";
|
content: '\e923';
|
||||||
}
|
}
|
||||||
.icon-zone:before {
|
.icon-zone:before {
|
||||||
content: "\e924";
|
content: '\e924';
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ $warning: #f4b974;
|
||||||
$success: $positive;
|
$success: $positive;
|
||||||
$alert: $negative;
|
$alert: $negative;
|
||||||
$white: #fff;
|
$white: #fff;
|
||||||
$dark: #3c3b3b;
|
$dark: #3d3d3d;
|
||||||
// custom
|
// custom
|
||||||
$color-link: #66bfff;
|
$color-link: #66bfff;
|
||||||
$color-spacer-light: #a3a3a31f;
|
$color-spacer-light: #a3a3a31f;
|
||||||
|
|
|
@ -26,11 +26,11 @@ export function isValidDate(date) {
|
||||||
* // returns "02/12/2022"
|
* // returns "02/12/2022"
|
||||||
* toDateFormat(new Date(2022, 11, 2));
|
* toDateFormat(new Date(2022, 11, 2));
|
||||||
*/
|
*/
|
||||||
export function toDateFormat(date) {
|
export function toDateFormat(date, locale = 'es-ES') {
|
||||||
if (!isValidDate(date)) {
|
if (!isValidDate(date)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return new Date(date).toLocaleDateString('es-ES', {
|
return new Date(date).toLocaleDateString(locale, {
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
month: '2-digit',
|
month: '2-digit',
|
||||||
day: '2-digit',
|
day: '2-digit',
|
||||||
|
@ -56,7 +56,7 @@ export function toTimeFormat(date, showSeconds = false) {
|
||||||
if (!isValidDate(date)) {
|
if (!isValidDate(date)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return new Date(date).toLocaleDateString('es-ES', {
|
return new Date(date).toLocaleTimeString('es-ES', {
|
||||||
hour: '2-digit',
|
hour: '2-digit',
|
||||||
minute: '2-digit',
|
minute: '2-digit',
|
||||||
second: showSeconds ? '2-digit' : undefined,
|
second: showSeconds ? '2-digit' : undefined,
|
||||||
|
@ -91,3 +91,24 @@ export function toDateTimeFormat(date, showSeconds = false) {
|
||||||
second: showSeconds ? '2-digit' : undefined,
|
second: showSeconds ? '2-digit' : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts seconds to a formatted string representing hours and minutes (hh:mm).
|
||||||
|
* @param {number} seconds - The number of seconds to convert.
|
||||||
|
* @param {boolean} includeHSuffix - Optional parameter indicating whether to include "h." after the hour.
|
||||||
|
* @returns {string} A string representing the time in the format "hh:mm" with optional "h." suffix.
|
||||||
|
*/
|
||||||
|
export function secondsToHoursMinutes(seconds, includeHSuffix = true) {
|
||||||
|
if (!seconds) return includeHSuffix ? '00:00 h.' : '00:00';
|
||||||
|
|
||||||
|
const hours = Math.floor(seconds / 3600);
|
||||||
|
const remainingMinutes = seconds % 3600;
|
||||||
|
const minutes = Math.floor(remainingMinutes / 60);
|
||||||
|
const formattedHours = hours < 10 ? '0' + hours : hours;
|
||||||
|
const formattedMinutes = minutes < 10 ? '0' + minutes : minutes;
|
||||||
|
|
||||||
|
// Append "h." if includeHSuffix is true
|
||||||
|
const suffix = includeHSuffix ? ' h.' : '';
|
||||||
|
// Return formatted string
|
||||||
|
return formattedHours + ':' + formattedMinutes + suffix;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import toLowerCase from './toLowerCase';
|
import toLowerCase from './toLowerCase';
|
||||||
import toDate from './toDate';
|
import toDate from './toDate';
|
||||||
import toDateString from './toDateString';
|
import toDateString from './toDateString';
|
||||||
import toDateHour from './toDateHour';
|
import toDateHourMin from './toDateHourMin';
|
||||||
|
import toDateHourMinSec from './toDateHourMinSec';
|
||||||
import toRelativeDate from './toRelativeDate';
|
import toRelativeDate from './toRelativeDate';
|
||||||
import toCurrency from './toCurrency';
|
import toCurrency from './toCurrency';
|
||||||
import toPercentage from './toPercentage';
|
import toPercentage from './toPercentage';
|
||||||
|
@ -16,7 +17,8 @@ export {
|
||||||
toDate,
|
toDate,
|
||||||
toHour,
|
toHour,
|
||||||
toDateString,
|
toDateString,
|
||||||
toDateHour,
|
toDateHourMin,
|
||||||
|
toDateHourMinSec,
|
||||||
toRelativeDate,
|
toRelativeDate,
|
||||||
toCurrency,
|
toCurrency,
|
||||||
toPercentage,
|
toPercentage,
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
export default function toDateHourMin(date) {
|
||||||
|
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||||
|
timeZone: 'Europe/Madrid',
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
});
|
||||||
|
return dateHour;
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
export default function toDateHour(date) {
|
export default function toDateHourMinSec(date) {
|
||||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||||
timeZone: 'Europe/Madrid',
|
timeZone: 'Europe/Madrid',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
1227
src/i18n/en/index.js
1227
src/i18n/en/index.js
File diff suppressed because it is too large
Load Diff
1227
src/i18n/es/index.js
1227
src/i18n/es/index.js
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,28 @@
|
||||||
import en from './en';
|
const files = import.meta.glob(`./locale/*.yml`);
|
||||||
import es from './es';
|
const modules = import.meta.glob(`../pages/**/locale/*.yml`);
|
||||||
export const localeEquivalence = {
|
|
||||||
'en':'en-GB'
|
const translations = {};
|
||||||
|
|
||||||
|
for (const file in files) {
|
||||||
|
const lang = file.split('/').at(2).split('.')[0];
|
||||||
|
|
||||||
|
files[file]()
|
||||||
|
.then((g) => {
|
||||||
|
translations[lang] = g.default;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
const actualLang = lang + '.yml';
|
||||||
|
for (const module in modules) {
|
||||||
|
if (!module.endsWith(actualLang)) continue;
|
||||||
|
modules[module]().then((t) => {
|
||||||
|
Object.assign(translations[lang], t.default);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
export default {
|
|
||||||
en: en,
|
export const localeEquivalence = {
|
||||||
es: es,
|
en: 'en-GB',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default translations;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -291,8 +291,6 @@ async function importToNewRefundTicket() {
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selectedRows"
|
v-model:selected="selectedRows"
|
||||||
:grid="$q.screen.lt.md"
|
:grid="$q.screen.lt.md"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
:hide-bottom="true"
|
|
||||||
>
|
>
|
||||||
<template #body-cell-ticket="{ value }">
|
<template #body-cell-ticket="{ value }">
|
||||||
<QTd align="center">
|
<QTd align="center">
|
||||||
|
|
|
@ -9,6 +9,7 @@ import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -24,7 +25,7 @@ const claimFilter = {
|
||||||
'workerFk',
|
'workerFk',
|
||||||
'claimStateFk',
|
'claimStateFk',
|
||||||
'packages',
|
'packages',
|
||||||
'hasToPickUp',
|
'pickup',
|
||||||
],
|
],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
|
@ -50,6 +51,20 @@ function setClaimStates(data) {
|
||||||
claimStates.value = data;
|
claimStates.value = data;
|
||||||
claimStatesCopy.value = data;
|
claimStatesCopy.value = data;
|
||||||
}
|
}
|
||||||
|
let optionsList;
|
||||||
|
async function getEnumValues() {
|
||||||
|
optionsList = [{ id: null, description: t('claim.basicData.null') }];
|
||||||
|
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||||
|
params: {
|
||||||
|
schema: 'vn',
|
||||||
|
table: 'claim',
|
||||||
|
column: 'pickup',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
for (let value of data)
|
||||||
|
optionsList.push({ id: value, description: t(`claim.basicData.${value}`) });
|
||||||
|
}
|
||||||
|
getEnumValues();
|
||||||
|
|
||||||
const workerFilter = {
|
const workerFilter = {
|
||||||
options: workers,
|
options: workers,
|
||||||
|
@ -168,13 +183,19 @@ const statesFilter = {
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QSelect
|
||||||
v-model="data.hasToPickUp"
|
v-model="data.pickup"
|
||||||
:label="t('claim.basicData.picked')"
|
:options="optionsList"
|
||||||
/>
|
option-value="id"
|
||||||
|
option-label="description"
|
||||||
|
emit-value
|
||||||
|
:label="t('claim.basicData.pickup')"
|
||||||
|
map-options
|
||||||
|
use-input
|
||||||
|
:input-debounce="0"
|
||||||
|
>
|
||||||
|
</QSelect>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -150,10 +150,8 @@ const columns = computed(() => [
|
||||||
<QTable
|
<QTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
|
||||||
row-key="$index"
|
row-key="$index"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
hide-pagination
|
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
:grid="$q.screen.lt.md"
|
:grid="$q.screen.lt.md"
|
||||||
table-header-class="text-left"
|
table-header-class="text-left"
|
||||||
|
|
|
@ -121,11 +121,6 @@ async function fetchMana() {
|
||||||
mana.value = response.data;
|
mana.value = response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateQuantity({ id, quantity }) {
|
|
||||||
if (!id) return;
|
|
||||||
await axios.patch(`ClaimBeginnings/${id}`, { quantity });
|
|
||||||
}
|
|
||||||
|
|
||||||
async function updateDiscount({ saleFk, discount, canceller }) {
|
async function updateDiscount({ saleFk, discount, canceller }) {
|
||||||
const body = { salesIds: [saleFk], newDiscount: discount };
|
const body = { salesIds: [saleFk], newDiscount: discount };
|
||||||
const claimId = claim.value.ticketFk;
|
const claimId = claim.value.ticketFk;
|
||||||
|
@ -155,6 +150,10 @@ function showImportDialog() {
|
||||||
})
|
})
|
||||||
.onOk(() => claimLinesForm.value.reload());
|
.onOk(() => claimLinesForm.value.reload());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function saveWhenHasChanges() {
|
||||||
|
claimLinesForm.value.getChanges().updates && claimLinesForm.value.onSubmit();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()">
|
<Teleport to="#st-data" v-if="stateStore.isSubToolbarShown()">
|
||||||
|
@ -181,163 +180,135 @@ function showImportDialog() {
|
||||||
@on-fetch="onFetchClaim"
|
@on-fetch="onFetchClaim"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<div class="column items-center">
|
<div class="q-pa-md">
|
||||||
<div class="list">
|
<CrudModel
|
||||||
<CrudModel
|
data-key="ClaimLines"
|
||||||
data-key="ClaimLines"
|
ref="claimLinesForm"
|
||||||
ref="claimLinesForm"
|
:url="`Claims/${route.params.id}/lines`"
|
||||||
:url="`Claims/${route.params.id}/lines`"
|
save-url="ClaimBeginnings/crud"
|
||||||
save-url="ClaimBeginnings/crud"
|
:filter="linesFilter"
|
||||||
:filter="linesFilter"
|
@on-fetch="onFetch"
|
||||||
@on-fetch="onFetch"
|
@save-changes="onFetch"
|
||||||
@save-changes="onFetch"
|
v-model:selected="selected"
|
||||||
v-model:selected="selected"
|
:default-save="false"
|
||||||
:default-save="false"
|
:default-reset="false"
|
||||||
:default-reset="false"
|
auto-load
|
||||||
auto-load
|
:limit="0"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:dense="$q.screen.lt.md"
|
:dense="$q.screen.lt.md"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
row-key="id"
|
||||||
row-key="id"
|
selection="multiple"
|
||||||
selection="multiple"
|
v-model:selected="selected"
|
||||||
v-model:selected="selected"
|
:grid="$q.screen.lt.md"
|
||||||
hide-pagination
|
>
|
||||||
:grid="$q.screen.lt.md"
|
<template #body-cell-claimed="{ row }">
|
||||||
>
|
<QTd auto-width align="right" class="text-primary">
|
||||||
<template #body-cell-claimed="{ row, value }">
|
<QInput
|
||||||
<QTd auto-width align="right" class="text-primary">
|
v-model="row.quantity"
|
||||||
<span>{{ value }}</span>
|
type="number"
|
||||||
|
dense
|
||||||
<QPopupEdit
|
@keyup.enter="saveWhenHasChanges()"
|
||||||
v-model="row.quantity"
|
@blur="saveWhenHasChanges()"
|
||||||
v-slot="scope"
|
/>
|
||||||
:title="t('Claimed quantity')"
|
</QTd>
|
||||||
@update:model-value="updateQuantity(row)"
|
</template>
|
||||||
buttons
|
<template #body-cell-description="{ row, value }">
|
||||||
>
|
<QTd auto-width align="right" class="text-primary">
|
||||||
<QInput
|
{{ value }}
|
||||||
v-model="scope.value"
|
<ItemDescriptorProxy
|
||||||
type="number"
|
:id="row.sale.itemFk"
|
||||||
dense
|
></ItemDescriptorProxy>
|
||||||
autofocus
|
</QTd>
|
||||||
@keyup.enter="scope.set"
|
</template>
|
||||||
@focus="($event) => $event.target.select()"
|
<template #body-cell-discount="{ row, value, rowIndex }">
|
||||||
/>
|
<QTd auto-width align="right" class="text-primary">
|
||||||
</QPopupEdit>
|
{{ value }}
|
||||||
</QTd>
|
<VnDiscount
|
||||||
</template>
|
:quantity="row.quantity"
|
||||||
<template #body-cell-description="{ row, value }">
|
:price="row.sale.price"
|
||||||
<QTd auto-width align="right" class="text-primary">
|
:discount="row.sale.discount"
|
||||||
{{ value }}
|
:mana="mana"
|
||||||
<ItemDescriptorProxy
|
:promise="updateDiscount"
|
||||||
:id="row.sale.itemFk"
|
:data="{ saleFk: row.sale.id, rowIndex: rowIndex }"
|
||||||
></ItemDescriptorProxy>
|
@on-update="onUpdateDiscount"
|
||||||
</QTd>
|
/>
|
||||||
</template>
|
</QTd>
|
||||||
<template #body-cell-discount="{ row, value, rowIndex }">
|
</template>
|
||||||
<QTd auto-width align="right" class="text-primary">
|
<!-- View for grid mode -->
|
||||||
{{ value }}
|
<template #item="props">
|
||||||
<VnDiscount
|
<div
|
||||||
:quantity="row.quantity"
|
class="q-mb-md col-12 grid-style-transition"
|
||||||
:price="row.sale.price"
|
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
||||||
:discount="row.sale.discount"
|
>
|
||||||
:mana="mana"
|
<QCard>
|
||||||
:promise="updateDiscount"
|
<QCardSection>
|
||||||
:data="{ saleFk: row.sale.id, rowIndex: rowIndex }"
|
<QCheckbox v-model="props.selected" />
|
||||||
@on-update="onUpdateDiscount"
|
</QCardSection>
|
||||||
/>
|
<QSeparator inset />
|
||||||
</QTd>
|
<QList dense>
|
||||||
</template>
|
<QItem
|
||||||
<!-- View for grid mode -->
|
v-for="column of props.cols"
|
||||||
<template #item="props">
|
:key="column.name"
|
||||||
<div
|
>
|
||||||
class="q-mb-md col-12 grid-style-transition"
|
<QItemSection>
|
||||||
:style="props.selected ? 'transform: scale(0.95);' : ''"
|
<QItemLabel caption>
|
||||||
>
|
{{ column.label }}
|
||||||
<QCard>
|
</QItemLabel>
|
||||||
<QCardSection>
|
</QItemSection>
|
||||||
<QCheckbox v-model="props.selected" />
|
<QItemSection side>
|
||||||
</QCardSection>
|
<template v-if="column.name === 'claimed'">
|
||||||
<QSeparator inset />
|
<QItemLabel class="text-primary">
|
||||||
<QList dense>
|
<QInput
|
||||||
<QItem
|
v-model="props.row.quantity"
|
||||||
v-for="column of props.cols"
|
type="number"
|
||||||
:key="column.name"
|
dense
|
||||||
>
|
autofocus
|
||||||
<QItemSection>
|
@keyup.enter="
|
||||||
<QItemLabel caption>
|
saveWhenHasChanges()
|
||||||
{{ column.label }}
|
"
|
||||||
|
@blur="saveWhenHasChanges()"
|
||||||
|
/>
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
</QItemSection>
|
</template>
|
||||||
<QItemSection side>
|
<template
|
||||||
<template
|
v-else-if="column.name === 'discount'"
|
||||||
v-if="column.name === 'claimed'"
|
>
|
||||||
>
|
<QItemLabel class="text-primary">
|
||||||
<QItemLabel class="text-primary">
|
{{ column.value }}
|
||||||
{{ column.value }}
|
<VnDiscount
|
||||||
<QPopupEdit
|
:quantity="props.row.quantity"
|
||||||
v-model="props.row.quantity"
|
:price="props.row.sale.price"
|
||||||
v-slot="scope"
|
:discount="
|
||||||
:title="t('Claimed quantity')"
|
props.row.sale.discount
|
||||||
@update:model-value="
|
"
|
||||||
updateQuantity(props.row)
|
:mana="mana"
|
||||||
"
|
:promise="updateDiscount"
|
||||||
buttons
|
:data="{
|
||||||
>
|
saleFk: props.row.sale.id,
|
||||||
<QInput
|
rowIndex: props.rowIndex,
|
||||||
v-model="scope.value"
|
}"
|
||||||
type="number"
|
@on-update="onUpdateDiscount"
|
||||||
dense
|
/>
|
||||||
autofocus
|
</QItemLabel>
|
||||||
@keyup.enter="scope.set"
|
</template>
|
||||||
@focus="
|
<template v-else>
|
||||||
($event) =>
|
<QItemLabel>
|
||||||
$event.target.select()
|
{{ column.value }}
|
||||||
"
|
</QItemLabel>
|
||||||
/>
|
</template>
|
||||||
</QPopupEdit>
|
</QItemSection>
|
||||||
</QItemLabel>
|
</QItem>
|
||||||
</template>
|
</QList>
|
||||||
<template
|
</QCard>
|
||||||
v-else-if="column.name === 'discount'"
|
</div>
|
||||||
>
|
</template>
|
||||||
<QItemLabel class="text-primary">
|
</QTable>
|
||||||
{{ column.value }}
|
</template>
|
||||||
<VnDiscount
|
</CrudModel>
|
||||||
:quantity="props.row.quantity"
|
|
||||||
:price="props.row.sale.price"
|
|
||||||
:discount="
|
|
||||||
props.row.sale.discount
|
|
||||||
"
|
|
||||||
:mana="mana"
|
|
||||||
:promise="updateDiscount"
|
|
||||||
:data="{
|
|
||||||
saleFk: props.row.sale.id,
|
|
||||||
rowIndex: props.rowIndex,
|
|
||||||
}"
|
|
||||||
@on-update="onUpdateDiscount"
|
|
||||||
/>
|
|
||||||
</QItemLabel>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<QItemLabel>
|
|
||||||
{{ column.value }}
|
|
||||||
</QItemLabel>
|
|
||||||
</template>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</QList>
|
|
||||||
</QCard>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</QTable>
|
|
||||||
</template>
|
|
||||||
</CrudModel>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { toDate, toCurrency, toPercentage } from 'filters/index';
|
import { toDate, toCurrency, toPercentage } from 'filters/index';
|
||||||
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
defineEmits([...useDialogPluginComponent.emits]);
|
defineEmits([...useDialogPluginComponent.emits]);
|
||||||
|
@ -118,16 +119,21 @@ function cancel() {
|
||||||
<QBtn icon="close" flat round dense v-close-popup />
|
<QBtn icon="close" flat round dense v-close-popup />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QTable
|
<QTable
|
||||||
class="my-sticky-header-table"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:rows="claimableSales"
|
:rows="claimableSales"
|
||||||
:pagination="{ rowsPerPage: 10 }"
|
|
||||||
row-key="saleFk"
|
row-key="saleFk"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
square
|
square
|
||||||
flat
|
flat
|
||||||
/>
|
>
|
||||||
|
<template #body-cell-description="{ row, value }">
|
||||||
|
<QTd auto-width align="right" class="link">
|
||||||
|
{{ value }}
|
||||||
|
<ItemDescriptorProxy :id="row.itemFk"></ItemDescriptorProxy>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
<QCardActions align="right">
|
<QCardActions align="right">
|
||||||
<QBtn :label="t('globals.cancel')" color="primary" flat @click="cancel" />
|
<QBtn :label="t('globals.cancel')" color="primary" flat @click="cancel" />
|
||||||
|
@ -149,33 +155,6 @@ function cancel() {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.my-sticky-header-table {
|
|
||||||
height: 400px;
|
|
||||||
|
|
||||||
thead tr th {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
thead tr:first-child th {
|
|
||||||
/* this is when the loading indicator appears */
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.q-table--loading thead tr:last-child th {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
top: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// /* prevent scrolling behind sticky top row on focus */
|
|
||||||
tbody {
|
|
||||||
/* height of all previous header rows */
|
|
||||||
scroll-margin-top: 48px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Available sales lines: Líneas de venta disponibles
|
Available sales lines: Líneas de venta disponibles
|
||||||
|
|
|
@ -16,7 +16,7 @@ const claimId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
const claimFilter = {
|
const claimFilter = {
|
||||||
where: { claimFk: claimId.value },
|
where: { claimFk: claimId.value },
|
||||||
fields: ['created', 'workerFk', 'text'],
|
fields: ['id', 'created', 'workerFk', 'text'],
|
||||||
include: {
|
include: {
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -38,10 +38,11 @@ const body = {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnNotes
|
<VnNotes
|
||||||
style="overflow-y: auto"
|
|
||||||
:add-note="$props.addNote"
|
|
||||||
url="claimObservations"
|
url="claimObservations"
|
||||||
|
:add-note="$props.addNote"
|
||||||
:filter="claimFilter"
|
:filter="claimFilter"
|
||||||
:body="body"
|
:body="body"
|
||||||
|
v-bind="$attrs"
|
||||||
|
style="overflow-y: auto"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -12,6 +12,7 @@ import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -177,7 +178,7 @@ function openDialog(dmsId) {
|
||||||
@on-fetch="getClaimDms"
|
@on-fetch="getClaimDms"
|
||||||
>
|
>
|
||||||
<template #header="{ entity: { claim } }">
|
<template #header="{ entity: { claim } }">
|
||||||
{{ claim.id }} - {{ claim.client.name }}
|
{{ claim.id }} - {{ claim.client.name }} ({{ claim.client.id }})
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
|
@ -214,16 +215,15 @@ function openDialog(dmsId) {
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('claim.summary.customer')">
|
<VnLv :label="t('claim.summary.customer')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<span class="link cursor-pointer">
|
||||||
:name="claim.client?.name"
|
{{ claim.client?.name }}
|
||||||
:worker-id="claim.client?.id"
|
<CustomerDescriptorProxy :id="claim.clientFk" />
|
||||||
/>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<QCheckbox
|
<VnLv
|
||||||
:label="t('claim.basicData.picked')"
|
:label="t('claim.basicData.pickup')"
|
||||||
v-model="claim.hasToPickUp"
|
:value="t(`claim.basicData.${claim.pickup}`)"
|
||||||
:disable="true"
|
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-three">
|
<QCard class="vn-three">
|
||||||
|
@ -280,6 +280,48 @@ function openDialog(dmsId) {
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
<QCard class="vn-two" v-if="claimDms.length > 0">
|
||||||
|
<VnTitle
|
||||||
|
:url="`#/claim/${entityId}/photos`"
|
||||||
|
:text="t('claim.summary.photos')"
|
||||||
|
/>
|
||||||
|
<div class="container">
|
||||||
|
<div
|
||||||
|
class="multimedia-container"
|
||||||
|
v-for="(media, index) of claimDms"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<div class="relative-position">
|
||||||
|
<QIcon
|
||||||
|
name="play_circle"
|
||||||
|
color="primary"
|
||||||
|
size="xl"
|
||||||
|
class="absolute-center zindex"
|
||||||
|
v-if="media.isVideo"
|
||||||
|
@click.stop="openDialog(media.dmsFk)"
|
||||||
|
>
|
||||||
|
<QTooltip>Video</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
<QCard class="multimedia relative-position">
|
||||||
|
<QImg
|
||||||
|
:src="media.url"
|
||||||
|
class="rounded-borders cursor-pointer fit"
|
||||||
|
@click="openDialog(media.dmsFk)"
|
||||||
|
v-if="!media.isVideo"
|
||||||
|
>
|
||||||
|
</QImg>
|
||||||
|
<video
|
||||||
|
:src="media.url"
|
||||||
|
class="rounded-borders cursor-pointer fit"
|
||||||
|
muted="muted"
|
||||||
|
v-if="media.isVideo"
|
||||||
|
@click="openDialog(media.dmsFk)"
|
||||||
|
/>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</QCard>
|
||||||
<QCard class="vn-two" v-if="developments.length > 0">
|
<QCard class="vn-two" v-if="developments.length > 0">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="claimUrl + 'development'"
|
:url="claimUrl + 'development'"
|
||||||
|
@ -302,49 +344,6 @@ function openDialog(dmsId) {
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max" v-if="claimDms.length > 0">
|
|
||||||
<VnTitle
|
|
||||||
:url="`#/claim/${entityId}/photos`"
|
|
||||||
:text="t('claim.summary.photos')"
|
|
||||||
/>
|
|
||||||
<div class="container">
|
|
||||||
<div
|
|
||||||
class="multimedia-container"
|
|
||||||
v-for="(media, index) of claimDms"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<div class="relative-position">
|
|
||||||
<QIcon
|
|
||||||
name="play_circle"
|
|
||||||
color="primary"
|
|
||||||
size="xl"
|
|
||||||
class="absolute-center zindex"
|
|
||||||
v-if="media.isVideo"
|
|
||||||
@click.stop="openDialog(media.dmsFk)"
|
|
||||||
>
|
|
||||||
<QTooltip>Video</QTooltip>header
|
|
||||||
</QIcon>
|
|
||||||
<QCard class="multimedia relative-position">
|
|
||||||
<QImg
|
|
||||||
:src="media.url"
|
|
||||||
class="rounded-borders cursor-pointer fit"
|
|
||||||
@click="openDialog(media.dmsFk)"
|
|
||||||
v-if="!media.isVideo"
|
|
||||||
>
|
|
||||||
</QImg>
|
|
||||||
<video
|
|
||||||
:src="media.url"
|
|
||||||
class="rounded-borders cursor-pointer fit"
|
|
||||||
muted="muted"
|
|
||||||
v-if="media.isVideo"
|
|
||||||
@click="openDialog(media.dmsFk)"
|
|
||||||
/>
|
|
||||||
</QCard>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</QCard>
|
|
||||||
|
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-max">
|
||||||
<VnTitle :url="claimUrl + 'action'" :text="t('claim.summary.actions')" />
|
<VnTitle :url="claimUrl + 'action'" :text="t('claim.summary.actions')" />
|
||||||
<div id="slider-container" class="q-px-xl q-py-md">
|
<div id="slider-container" class="q-px-xl q-py-md">
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { onBeforeMount, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
const addresses = ref([]);
|
||||||
|
const client = ref(null);
|
||||||
const provincesLocation = ref([]);
|
const provincesLocation = ref([]);
|
||||||
|
|
||||||
const consigneeFilter = {
|
const addressFilter = {
|
||||||
fields: [
|
fields: [
|
||||||
'id',
|
'id',
|
||||||
'isDefaultAddress',
|
'isDefaultAddress',
|
||||||
|
@ -44,6 +47,42 @@ const consigneeFilter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
const { id } = route.params;
|
||||||
|
getAddressesData(id);
|
||||||
|
getClientData(id);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
getAddressesData(newValue);
|
||||||
|
getClientData(newValue);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getAddressesData = async (id) => {
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get(`Clients/${id}/addresses`, {
|
||||||
|
params: { filter: JSON.stringify(addressFilter) },
|
||||||
|
});
|
||||||
|
addresses.value = data;
|
||||||
|
sortAddresses();
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getClientData = async (id) => {
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get(`Clients/${id}`);
|
||||||
|
client.value = data;
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const setProvince = (provinceFk) => {
|
const setProvince = (provinceFk) => {
|
||||||
const result = provincesLocation.value.filter(
|
const result = provincesLocation.value.filter(
|
||||||
(province) => province.id === provinceFk
|
(province) => province.id === provinceFk
|
||||||
|
@ -51,16 +90,38 @@ const setProvince = (provinceFk) => {
|
||||||
return result[0]?.name || '';
|
return result[0]?.name || '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const toCustomerConsigneeCreate = () => {
|
const isDefaultAddress = (address) => {
|
||||||
router.push({ name: 'CustomerConsigneeCreate' });
|
return client?.value?.defaultAddressFk === address.id ? 1 : 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
const toCustomerConsigneeEdit = (consigneeId) => {
|
const setDefault = (address) => {
|
||||||
|
const url = `Clients/${route.params.id}`;
|
||||||
|
const payload = { defaultAddressFk: address.id };
|
||||||
|
axios.patch(url, payload).then((res) => {
|
||||||
|
if (res.data) {
|
||||||
|
client.value.defaultAddressFk = res.data.defaultAddressFk;
|
||||||
|
sortAddresses();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const sortAddresses = () => {
|
||||||
|
if (!client.value || !addresses.value) return;
|
||||||
|
addresses.value = addresses.value.sort((a, b) => {
|
||||||
|
return isDefaultAddress(b) - isDefaultAddress(a);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const toCustomerAddressCreate = () => {
|
||||||
|
router.push({ name: 'CustomerAddressCreate' });
|
||||||
|
};
|
||||||
|
|
||||||
|
const toCustomerAddressEdit = (addressId) => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'CustomerConsigneeEdit',
|
name: 'CustomerAddressEdit',
|
||||||
params: {
|
params: {
|
||||||
id: route.params.id,
|
id: route.params.id,
|
||||||
consigneeId,
|
addressId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -73,26 +134,41 @@ const toCustomerConsigneeEdit = (consigneeId) => {
|
||||||
url="Provinces/location"
|
url="Provinces/location"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<QCard class="q-pa-lg">
|
<div class="full-width flex justify-center">
|
||||||
<VnPaginate
|
<QCard class="card-width q-pa-lg" v-if="addresses.length">
|
||||||
data-key="CustomerConsignees"
|
<QCardSection>
|
||||||
:url="`Clients/${route.params.id}/addresses`"
|
<div
|
||||||
order="id"
|
v-for="(item, index) in addresses"
|
||||||
auto-load
|
|
||||||
:filter="consigneeFilter"
|
|
||||||
>
|
|
||||||
<template #body="{ rows }">
|
|
||||||
<QCard
|
|
||||||
v-for="(item, index) in rows"
|
|
||||||
:key="index"
|
:key="index"
|
||||||
|
class="address-card"
|
||||||
:class="{
|
:class="{
|
||||||
'consignees-card': true,
|
'q-mb-md': index < addresses.length - 1,
|
||||||
'q-mb-md': index < rows.length - 1,
|
'item-disabled': !item.isActive,
|
||||||
}"
|
}"
|
||||||
@click="toCustomerConsigneeEdit(item.id)"
|
@click="toCustomerAddressEdit(item.id)"
|
||||||
>
|
>
|
||||||
<div class="q-ml-xs q-mr-md flex items-center">
|
<div class="q-ml-xs q-mr-md flex items-center">
|
||||||
<QIcon name="star" size="md" color="primary" />
|
<QIcon
|
||||||
|
:style="{
|
||||||
|
'font-variation-settings': `'FILL' ${isDefaultAddress(
|
||||||
|
item
|
||||||
|
)}`,
|
||||||
|
}"
|
||||||
|
color="primary"
|
||||||
|
name="star"
|
||||||
|
size="md"
|
||||||
|
@click.stop="!isDefaultAddress(item) && setDefault(item)"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{
|
||||||
|
t(
|
||||||
|
isDefaultAddress(item)
|
||||||
|
? 'Default address'
|
||||||
|
: 'Set as default'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-weight-bold q-mb-sm">
|
<div class="text-weight-bold q-mb-sm">
|
||||||
|
@ -136,12 +212,13 @@ const toCustomerConsigneeEdit = (consigneeId) => {
|
||||||
<div>{{ observation.description }}</div>
|
<div>{{ observation.description }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</QCard>
|
</div>
|
||||||
</template>
|
</QCardSection>
|
||||||
</VnPaginate>
|
</QCard>
|
||||||
</QCard>
|
</div>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerConsigneeCreate()" color="primary" fab icon="add" />
|
<QBtn @click.stop="toCustomerAddressCreate()" color="primary" fab icon="add" />
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('New consignee') }}
|
{{ t('New consignee') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
@ -149,8 +226,8 @@ const toCustomerConsigneeEdit = (consigneeId) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.consignees-card {
|
.address-card {
|
||||||
border: 2px solid var(--vn-accent-color);
|
border: 2px solid var(--vn-light-gray);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -160,6 +237,10 @@ const toCustomerConsigneeEdit = (consigneeId) => {
|
||||||
background-color: var(--vn-accent-color);
|
background-color: var(--vn-accent-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -167,4 +248,6 @@ es:
|
||||||
Is equalizated: Recargo de equivalencia
|
Is equalizated: Recargo de equivalencia
|
||||||
Is logiflora allowed: Compra directa en Holanda
|
Is logiflora allowed: Compra directa en Holanda
|
||||||
New consignee: Nuevo consignatario
|
New consignee: Nuevo consignatario
|
||||||
|
Default address: Consignatario predeterminado
|
||||||
|
Set as default: Establecer como predeterminado
|
||||||
</i18n>
|
</i18n>
|
|
@ -1,145 +1,102 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, onBeforeMount, ref, watch } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { date, QCheckbox, QBtn, useQuasar } from 'quasar';
|
import axios from 'axios';
|
||||||
|
import { QCheckbox, QBtn, useQuasar } from 'quasar';
|
||||||
|
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency, toDate, toDateHourMin } from 'src/filters';
|
||||||
|
import { useState } from 'src/composables/useState';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
import { useValidator } from 'src/composables/useValidator';
|
||||||
|
import { usePrintService } from 'src/composables/usePrintService';
|
||||||
|
|
||||||
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.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 CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
import CustomerNewPayment from 'src/pages/Customer/components/CustomerNewPayment.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import InvoiceOutDescriptorProxy from 'src/pages/InvoiceOut/Card/InvoiceOutDescriptorProxy.vue';
|
||||||
|
|
||||||
|
const { sendEmail } = usePrintService();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const { validate } = useValidator();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
const state = useState();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
const user = state.getUser();
|
||||||
|
|
||||||
const clientRisks = ref(null);
|
const clientRisks = ref(null);
|
||||||
const companiesOptions = ref([]);
|
|
||||||
const companyId = ref(442);
|
|
||||||
const rows = ref(null);
|
|
||||||
const workerId = ref(0);
|
|
||||||
const receiptsRef = ref(null);
|
|
||||||
const clientRisksRef = ref(null);
|
const clientRisksRef = ref(null);
|
||||||
|
const companiesOptions = ref([]);
|
||||||
|
const companyId = ref(null);
|
||||||
|
const receiptsRef = ref(null);
|
||||||
|
const receiptsData = ref([]);
|
||||||
|
|
||||||
const filterCompanies = { order: ['code'] };
|
const filterCompanies = { order: ['code'] };
|
||||||
const params = {
|
const userParams = {
|
||||||
clientId: `${route.params.id}`,
|
clientId: route.params.id,
|
||||||
companyId: companyId.value,
|
companyId: user.value.companyFk,
|
||||||
filter: { limit: 20 },
|
|
||||||
};
|
};
|
||||||
const filter = {
|
const filter = {
|
||||||
include: { relation: 'company', scope: { fields: ['code'] } },
|
include: { relation: 'company', scope: { fields: ['code'] } },
|
||||||
where: { clientFk: `${route.params.id}`, companyFk: companyId.value },
|
where: { clientFk: route.params.id, companyFk: user.value.companyFk },
|
||||||
};
|
|
||||||
|
|
||||||
const tableColumnComponents = {
|
|
||||||
payed: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
created: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
userName: {
|
|
||||||
component: QBtn,
|
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
|
||||||
event: (prop) => {
|
|
||||||
workerId.value = prop.row.clientFk;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
description: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
bankFk: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
debit: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
credit: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
balance: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
isConciliate: {
|
|
||||||
component: QCheckbox,
|
|
||||||
props: (prop) => ({
|
|
||||||
disable: true,
|
|
||||||
'model-value': Boolean(prop.value),
|
|
||||||
}),
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'payed',
|
field: 'payed',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
|
format: (value) => toDate(value),
|
||||||
label: t('Date'),
|
label: t('Date'),
|
||||||
name: 'payed',
|
name: 'date',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'created',
|
field: 'created',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm'),
|
format: (value) => toDateHourMin(value),
|
||||||
label: t('Creation date'),
|
label: t('Creation date'),
|
||||||
name: 'created',
|
name: 'creationDate',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
label: t('Employee'),
|
label: t('Employee'),
|
||||||
name: 'userName',
|
name: 'employee',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'description',
|
field: 'description',
|
||||||
label: t('Reference'),
|
label: t('Reference'),
|
||||||
name: 'description',
|
name: 'reference',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'bankFk',
|
field: 'bankFk',
|
||||||
label: t('Bank'),
|
label: t('Bank'),
|
||||||
name: 'bankFk',
|
name: 'bank',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
field: 'debit',
|
field: 'debit',
|
||||||
|
format: (value) => value && toCurrency(value),
|
||||||
label: t('Debit'),
|
label: t('Debit'),
|
||||||
name: 'debit',
|
name: 'debit',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
field: 'credit',
|
field: 'credit',
|
||||||
format: (value) => toCurrency(value),
|
format: (value) => value && toCurrency(value),
|
||||||
label: t('Havings'),
|
label: t('Havings'),
|
||||||
name: 'credit',
|
name: 'havings',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'right',
|
||||||
field: (value) => value.debit - value.credit,
|
field: 'balance',
|
||||||
format: (value) => toCurrency(value),
|
format: (value) => value && toCurrency(value),
|
||||||
label: t('Balance'),
|
label: t('Balance'),
|
||||||
name: 'balance',
|
name: 'balance',
|
||||||
},
|
},
|
||||||
|
@ -147,16 +104,58 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'isConciliate',
|
field: 'isConciliate',
|
||||||
label: t('Conciliated'),
|
label: t('Conciliated'),
|
||||||
name: 'isConciliate',
|
name: 'conciliated',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'totalWithVat',
|
||||||
|
label: '',
|
||||||
|
name: 'actions',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const getData = () => {
|
onBeforeMount(() => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
|
companyId.value = user.value.companyFk;
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
userParams.clientId = newValue;
|
||||||
|
filter.where.clientFk = newValue;
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getData = () => {
|
||||||
receiptsRef.value?.fetch();
|
receiptsRef.value?.fetch();
|
||||||
clientRisksRef.value?.fetch();
|
clientRisksRef.value?.fetch();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getCurrentBalance = () => {
|
||||||
|
const currentBalance = clientRisks.value.find((balance) => {
|
||||||
|
return balance.companyFk === companyId.value;
|
||||||
|
});
|
||||||
|
return currentBalance && currentBalance.amount;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onFetch = (balances) => {
|
||||||
|
balances.forEach((balance, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
balance.balance = getCurrentBalance();
|
||||||
|
} else {
|
||||||
|
let previousBalance = balances[index - 1];
|
||||||
|
balance.balance =
|
||||||
|
previousBalance.balance -
|
||||||
|
(previousBalance.debit - previousBalance.credit);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
receiptsData.value = balances;
|
||||||
|
};
|
||||||
|
|
||||||
const showNewPaymentDialog = () => {
|
const showNewPaymentDialog = () => {
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: CustomerNewPayment,
|
component: CustomerNewPayment,
|
||||||
|
@ -169,25 +168,29 @@ const showNewPaymentDialog = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateCompanyId = (id) => {
|
const updateCompanyId = (id) => {
|
||||||
if (id) companyId.value = id;
|
if (id) {
|
||||||
|
companyId.value = id;
|
||||||
|
userParams.companyId = id;
|
||||||
|
filter.where.companyFk = id;
|
||||||
|
}
|
||||||
getData();
|
getData();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const saveFieldValue = async (row) => {
|
||||||
|
try {
|
||||||
|
const payload = { description: row.description };
|
||||||
|
await axios.patch(`Receipts/${row.id}`, payload);
|
||||||
|
} catch (err) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendEmailAction = () => {
|
||||||
|
sendEmail(`Suppliers/${route.params.id}/campaign-metrics-email`);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
|
||||||
:filter="filterCompanies"
|
|
||||||
@on-fetch="(data) => (companiesOptions = data)"
|
|
||||||
auto-load
|
|
||||||
url="Companies"
|
|
||||||
/>
|
|
||||||
<FetchData
|
|
||||||
:params="params"
|
|
||||||
@on-fetch="(data) => (rows = data)"
|
|
||||||
auto-load
|
|
||||||
ref="receiptsRef"
|
|
||||||
url="Receipts/filter"
|
|
||||||
/>
|
|
||||||
<FetchData
|
<FetchData
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="(data) => (clientRisks = data)"
|
@on-fetch="(data) => (clientRisks = data)"
|
||||||
|
@ -195,37 +198,121 @@ const updateCompanyId = (id) => {
|
||||||
ref="clientRisksRef"
|
ref="clientRisksRef"
|
||||||
url="ClientRisks"
|
url="ClientRisks"
|
||||||
/>
|
/>
|
||||||
|
<FetchData
|
||||||
|
:filter="filterCompanies"
|
||||||
|
@on-fetch="(data) => (companiesOptions = data)"
|
||||||
|
auto-load
|
||||||
|
url="Companies"
|
||||||
|
/>
|
||||||
|
|
||||||
<QTable
|
<VnPaginate
|
||||||
:columns="columns"
|
auto-load
|
||||||
:pagination="{ rowsPerPage: 12 }"
|
data-key="CustomerBalance"
|
||||||
:rows="rows"
|
url="Receipts/filter"
|
||||||
class="full-width q-mt-md"
|
:user-params="userParams"
|
||||||
row-key="id"
|
ref="receiptsRef"
|
||||||
v-if="rows?.length"
|
@on-fetch="onFetch"
|
||||||
>
|
>
|
||||||
<template #body-cell="props">
|
<template #body="{ rows }">
|
||||||
<QTd :props="props">
|
<QTable
|
||||||
<QTr :props="props" class="cursor-pointer">
|
:columns="columns"
|
||||||
<component
|
:no-data-label="t('globals.noResults')"
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
:rows-per-page-options="[0]"
|
||||||
class="col-content"
|
:rows="rows"
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
class="full-width q-mt-md"
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
row-key="id"
|
||||||
>
|
>
|
||||||
<template v-if="props.col.name !== 'isConciliate'">
|
<template #body-cell-employee="{ row }">
|
||||||
{{ props.value }}
|
<QTd auto-width @click.stop>
|
||||||
</template>
|
<QBtn color="blue" flat no-caps>{{ row.userName }}</QBtn>
|
||||||
<WorkerDescriptorProxy :id="workerId" />
|
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||||
</component>
|
</QTd>
|
||||||
</QTr>
|
</template>
|
||||||
</QTd>
|
|
||||||
</template>
|
|
||||||
</QTable>
|
|
||||||
|
|
||||||
<h5 class="flex justify-center label-color" v-else>
|
<template #body-cell-reference="{ row }">
|
||||||
{{ t('globals.noResults') }}
|
<QTd auto-width @click.stop v-if="row.isInvoice">
|
||||||
</h5>
|
<QBtn color="blue" dense flat>
|
||||||
|
{{ t('bill', { ref: row.description }) }}
|
||||||
|
</QBtn>
|
||||||
|
<InvoiceOutDescriptorProxy :id="row.id" />
|
||||||
|
</QTd>
|
||||||
|
<QTd v-else>
|
||||||
|
<VnInput
|
||||||
|
@keyup.enter="saveFieldValue(row)"
|
||||||
|
autofocus
|
||||||
|
clearable
|
||||||
|
dense
|
||||||
|
v-model="row.description"
|
||||||
|
/>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #body-cell-conciliated="{ row }">
|
||||||
|
<QTd align="center">
|
||||||
|
<QCheckbox :model-value="row.isConciliate === 1" disable />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #body-cell-actions="{ row }">
|
||||||
|
<QTd align="center">
|
||||||
|
<QIcon
|
||||||
|
@click.stop="showDialog = true"
|
||||||
|
class="q-ml-md"
|
||||||
|
color="primary"
|
||||||
|
name="outgoing_mail"
|
||||||
|
size="sm"
|
||||||
|
style="font-variation-settings: 'FILL' 1"
|
||||||
|
v-if="row.isCompensation"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Send compensation') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
|
||||||
|
<QDialog v-model="showDialog">
|
||||||
|
<QCard class="q-pa-sm">
|
||||||
|
<QCardSection>
|
||||||
|
<span
|
||||||
|
ref="closeButton"
|
||||||
|
class="flex justify-end color-vn-label"
|
||||||
|
v-close-popup
|
||||||
|
>
|
||||||
|
<QIcon name="close" size="sm" />
|
||||||
|
</span>
|
||||||
|
<div class="text-h6">
|
||||||
|
{{ t('Send compensation') }}
|
||||||
|
</div>
|
||||||
|
</QCardSection>
|
||||||
|
<QCardSection>
|
||||||
|
<div>
|
||||||
|
{{
|
||||||
|
t(
|
||||||
|
'Do you want to report compensation to the client by mail?'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</QCardSection>
|
||||||
|
<QCardActions class="flex justify-end q-mb-sm">
|
||||||
|
<QBtn
|
||||||
|
:label="t('globals.cancel')"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:label="t('globals.save')"
|
||||||
|
@click="sendEmailAction"
|
||||||
|
class="q-ml-sm"
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
</QCardActions>
|
||||||
|
</QCard>
|
||||||
|
</QDialog>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
|
|
||||||
<QDrawer :width="256" show-if-above side="right" v-model="stateStore.rightDrawer">
|
<QDrawer :width="256" show-if-above side="right" v-model="stateStore.rightDrawer">
|
||||||
<div class="q-mt-xl q-px-md">
|
<div class="q-mt-xl q-px-md">
|
||||||
|
@ -237,10 +324,11 @@ const updateCompanyId = (id) => {
|
||||||
option-label="code"
|
option-label="code"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="companyId"
|
v-model="companyId"
|
||||||
|
:rules="validate('entry.companyFk')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QCard class="q-ma-md q-pa-md q-mt-lg" v-if="rows?.length">
|
<QCard class="q-ma-md q-pa-md q-mt-lg" v-if="receiptsData?.length">
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<div class="flex justify-center text-subtitle1 text-bold">
|
<div class="flex justify-center text-subtitle1 text-bold">
|
||||||
{{ t('Total by company') }}
|
{{ t('Total by company') }}
|
||||||
|
@ -266,6 +354,8 @@ const updateCompanyId = (id) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
en:
|
||||||
|
bill: 'N/INV {ref}'
|
||||||
es:
|
es:
|
||||||
Company: Empresa
|
Company: Empresa
|
||||||
Total by company: Total por empresa
|
Total by company: Total por empresa
|
||||||
|
@ -274,9 +364,12 @@ es:
|
||||||
Creation date: Fecha de creación
|
Creation date: Fecha de creación
|
||||||
Employee: Empleado
|
Employee: Empleado
|
||||||
Reference: Referencia
|
Reference: Referencia
|
||||||
|
bill: 'N/FRA {ref}'
|
||||||
Bank: Caja
|
Bank: Caja
|
||||||
Debit: Debe
|
Debit: Debe
|
||||||
Havings: Haber
|
Havings: Haber
|
||||||
Balance: Balance
|
Balance: Balance
|
||||||
Conciliated: Conciliado
|
Conciliated: Conciliado
|
||||||
|
Send compensation: Enviar compensación
|
||||||
|
Do you want to report compensation to the client by mail?: ¿Desea informar de la compensación al cliente por correo?
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -60,90 +60,105 @@ const filterOptions = {
|
||||||
@on-fetch="(data) => (businessTypes = data)"
|
@on-fetch="(data) => (businessTypes = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
<fetch-data
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="(data) => (clients = data)"
|
||||||
|
auto-load
|
||||||
|
url="Clients"
|
||||||
|
/>
|
||||||
|
|
||||||
<FormModel :url="`Clients/${route.params.id}`" model="customer" auto-load>
|
<FormModel :url="`Clients/${route.params.id}`" auto-load model="customer">
|
||||||
<template #form="{ data, validate, filter }">
|
<template #form="{ data, validate, filter }">
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.socialName"
|
:label="t('Comercial name')"
|
||||||
:label="t('customer.basicData.socialName')"
|
|
||||||
:rules="validate('client.socialName')"
|
:rules="validate('client.socialName')"
|
||||||
autofocus
|
autofocus
|
||||||
|
clearable
|
||||||
|
v-model="data.name"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="data.businessTypeFk"
|
|
||||||
:options="businessTypes"
|
|
||||||
option-value="code"
|
|
||||||
option-label="description"
|
|
||||||
emit-value
|
|
||||||
:label="t('customer.basicData.businessType')"
|
|
||||||
map-options
|
|
||||||
:rules="validate('client.businessTypeFk')"
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
|
:label="t('customer.basicData.businessType')"
|
||||||
|
:options="businessTypes"
|
||||||
|
:rules="validate('client.businessTypeFk')"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="description"
|
||||||
|
option-value="code"
|
||||||
|
v-model="data.businessTypeFk"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.contact"
|
|
||||||
:label="t('customer.basicData.contact')"
|
:label="t('customer.basicData.contact')"
|
||||||
:rules="validate('client.contact')"
|
:rules="validate('client.contact')"
|
||||||
clearable
|
clearable
|
||||||
|
v-model="data.contact"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.email"
|
|
||||||
type="email"
|
|
||||||
:label="t('customer.basicData.email')"
|
:label="t('customer.basicData.email')"
|
||||||
:rules="validate('client.email')"
|
:rules="validate('client.email')"
|
||||||
clearable
|
clearable
|
||||||
/>
|
type="email"
|
||||||
|
v-model="data.email"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-info">
|
||||||
|
<QTooltip>{{
|
||||||
|
t('customer.basicData.youCanSaveMultipleEmails')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</VnInput>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.phone"
|
|
||||||
:label="t('customer.basicData.phone')"
|
:label="t('customer.basicData.phone')"
|
||||||
:rules="validate('client.phone')"
|
:rules="validate('client.phone')"
|
||||||
clearable
|
clearable
|
||||||
|
v-model="data.phone"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.mobile"
|
|
||||||
:label="t('customer.basicData.mobile')"
|
:label="t('customer.basicData.mobile')"
|
||||||
:rules="validate('client.mobile')"
|
:rules="validate('client.mobile')"
|
||||||
clearable
|
clearable
|
||||||
|
v-model="data.mobile"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="data.salesPersonFk"
|
|
||||||
:options="workers"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
emit-value
|
|
||||||
:label="t('customer.basicData.salesPerson')"
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
@filter="(value, update) => filter(value, update, filterOptions)"
|
|
||||||
:rules="validate('client.salesPersonFk')"
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
|
:label="t('customer.basicData.salesPerson')"
|
||||||
|
:options="workers"
|
||||||
|
:rules="validate('client.salesPersonFk')"
|
||||||
|
@filter="(value, update) => filter(value, update, filterOptions)"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
use-input
|
||||||
|
v-model="data.salesPersonFk"
|
||||||
>
|
>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<QAvatar color="orange">
|
<QAvatar color="orange">
|
||||||
<QImg
|
<QImg
|
||||||
v-if="data.salesPersonFk"
|
|
||||||
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
|
:src="`/api/Images/user/160x160/${data.salesPersonFk}/download?access_token=${token}`"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
|
v-if="data.salesPersonFk"
|
||||||
/>
|
/>
|
||||||
</QAvatar>
|
</QAvatar>
|
||||||
</template>
|
</template>
|
||||||
|
@ -151,18 +166,49 @@ const filterOptions = {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QSelect
|
<QSelect
|
||||||
v-model="data.contactChannelFk"
|
|
||||||
:options="contactChannels"
|
|
||||||
option-value="id"
|
|
||||||
option-label="name"
|
|
||||||
emit-value
|
|
||||||
:label="t('customer.basicData.contactChannel')"
|
|
||||||
map-options
|
|
||||||
:rules="validate('client.contactChannelFk')"
|
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
|
:label="t('customer.basicData.contactChannel')"
|
||||||
|
:options="contactChannels"
|
||||||
|
:rules="validate('client.contactChannelFk')"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.contactChannelFk"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<QSelect
|
||||||
|
:input-debounce="0"
|
||||||
|
:label="t('customer.basicData.previousClient')"
|
||||||
|
:options="clients"
|
||||||
|
:rules="validate('client.transferorFk')"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.transferorFk"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-pointer">
|
||||||
|
<QTooltip>{{
|
||||||
|
t(
|
||||||
|
'In case of a company succession, specify the grantor company'
|
||||||
|
)
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</QSelect>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
|
||||||
|
Comercial name: Nombre comercial
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
@ -26,8 +24,9 @@ const filter = {
|
||||||
limit: 30,
|
limit: 30,
|
||||||
};
|
};
|
||||||
|
|
||||||
const getBankEntities = () => {
|
const getBankEntities = (data, formData) => {
|
||||||
bankEntitiesRef.value.fetch();
|
bankEntitiesRef.value.fetch();
|
||||||
|
formData.bankEntityFk = Number(data.id);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -60,17 +59,13 @@ const getBankEntities = () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput
|
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
|
||||||
:label="t('Due day')"
|
|
||||||
:rules="validate('client.socialName')"
|
|
||||||
v-model="data.dueDay"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput :label="t('IBAN')" v-model="data.iban">
|
<VnInput :label="t('IBAN')" clearable v-model="data.iban">
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-info">
|
<QIcon name="info" class="cursor-info">
|
||||||
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
|
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
|
||||||
|
@ -90,7 +85,9 @@ const getBankEntities = () => {
|
||||||
v-model="data.bankEntityFk"
|
v-model="data.bankEntityFk"
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateBankEntityForm @on-data-saved="getBankEntities()" />
|
<CreateBankEntityForm
|
||||||
|
@on-data-saved="getBankEntities($event, data)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import CustomerDescriptor from './CustomerDescriptor.vue';
|
import CustomerDescriptor from './CustomerDescriptor.vue';
|
||||||
import LeftMenu from 'components/LeftMenu.vue';
|
import LeftMenu from 'components/LeftMenu.vue';
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
|
@ -9,7 +8,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
import useCardSize from 'src/composables/useCardSize';
|
import useCardSize from 'src/composables/useCardSize';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const route = useRoute();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<h5 class="flex justify-center color-vn-label">
|
||||||
|
{{ t('Enter a new search') }}
|
||||||
|
</h5>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Enter a new search: Introduce una nueva búsqueda
|
||||||
|
</i18n>
|
|
@ -0,0 +1,87 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
import CrudModel from 'components/CrudModel.vue';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const customerContactsRef = ref(null);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (customerContactsRef.value) customerContactsRef.value.reload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QPage class="card-width q-pa-lg">
|
||||||
|
<CrudModel
|
||||||
|
:data-required="{ clientFk: route.params.id }"
|
||||||
|
:default-remove="false"
|
||||||
|
:filter="{
|
||||||
|
fields: ['id', 'name', 'phone', 'clientFk'],
|
||||||
|
where: { clientFk: route.params.id },
|
||||||
|
}"
|
||||||
|
data-key="CustomerContacts"
|
||||||
|
model="CustomerContacts"
|
||||||
|
ref="customerContactsRef"
|
||||||
|
url="ClientContacts"
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<QCard class="q-pl-lg q-py-md">
|
||||||
|
<VnRow
|
||||||
|
v-for="(row, index) in rows"
|
||||||
|
:key="index"
|
||||||
|
class="row q-gutter-md q-mb-md"
|
||||||
|
>
|
||||||
|
<div class="col">
|
||||||
|
<VnInput :label="t('Name')" v-model="row.name" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInput :label="t('Phone')" v-model="row.phone" />
|
||||||
|
</div>
|
||||||
|
<div class="col-1 row justify-center items-center">
|
||||||
|
<QIcon
|
||||||
|
@click="customerContactsRef.remove([row])"
|
||||||
|
class="cursor-pointer"
|
||||||
|
color="primary"
|
||||||
|
name="delete"
|
||||||
|
size="sm"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Remove contact') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow>
|
||||||
|
<QIcon
|
||||||
|
@click="customerContactsRef.insert()"
|
||||||
|
class="cursor-pointer"
|
||||||
|
color="primary"
|
||||||
|
name="add"
|
||||||
|
size="sm"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Add contact') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</VnRow>
|
||||||
|
</QCard>
|
||||||
|
</template>
|
||||||
|
</CrudModel>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Name: Nombre
|
||||||
|
Phone: Teléfono
|
||||||
|
Remove contact: Quitar contacto
|
||||||
|
Add contact: Añadir contacto
|
||||||
|
</i18n>
|
|
@ -1,3 +1,233 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
import ModalCloseContract from 'src/pages/Customer/components/ModalCloseContract.vue';
|
||||||
|
import { toDate } from 'src/filters';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
const vnPaginateRef = ref(null);
|
||||||
|
const showQPageSticky = ref(true);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
order: 'finished ASC, started DESC',
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'insurances',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'credit', 'created', 'grade'],
|
||||||
|
order: 'created DESC',
|
||||||
|
limit: 2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: { client: `${route.params.id}` },
|
||||||
|
};
|
||||||
|
|
||||||
|
const fetch = (data) => {
|
||||||
|
data.forEach((element) => {
|
||||||
|
if (!element.finished) {
|
||||||
|
showQPageSticky.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const toCustomerCreditContractsCreate = () => {
|
||||||
|
router.push({ name: 'CustomerCreditContractsCreate' });
|
||||||
|
};
|
||||||
|
|
||||||
|
const openDialog = (item) => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: ModalCloseContract,
|
||||||
|
componentProps: {
|
||||||
|
id: item.id,
|
||||||
|
promise: updateData,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const openViewCredit = (credit) => {
|
||||||
|
router.push({
|
||||||
|
name: 'CustomerCreditContractsInsurance',
|
||||||
|
params: {
|
||||||
|
creditId: credit.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateData = () => {
|
||||||
|
vnPaginateRef.value?.fetch();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex justify-center">Customer credit contracts</div>
|
<div class="full-width flex justify-center">
|
||||||
|
<QCard class="card-width q-pa-lg">
|
||||||
|
<VnPaginate
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="fetch"
|
||||||
|
auto-load
|
||||||
|
data-key="CustomerCreditContracts"
|
||||||
|
order="id DESC"
|
||||||
|
ref="vnPaginateRef"
|
||||||
|
url="CreditClassifications"
|
||||||
|
>
|
||||||
|
<template #body="{ rows }">
|
||||||
|
<div v-if="rows.length">
|
||||||
|
<QCard
|
||||||
|
v-for="(item, index) in rows"
|
||||||
|
:key="index"
|
||||||
|
:class="{
|
||||||
|
'customer-card': true,
|
||||||
|
'q-mb-md': index < rows.length - 1,
|
||||||
|
'is-active': !item.finished,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<QCardSection
|
||||||
|
class="full-width flex justify-between q-py-none"
|
||||||
|
>
|
||||||
|
<div class="width-state flex">
|
||||||
|
<div
|
||||||
|
class="flex items-center cursor-pointer q-mr-md"
|
||||||
|
v-if="!item.finished"
|
||||||
|
>
|
||||||
|
<QIcon
|
||||||
|
@click.stop="openDialog(item)"
|
||||||
|
color="primary"
|
||||||
|
name="lock"
|
||||||
|
size="md"
|
||||||
|
style="font-variation-settings: 'FILL' 1"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('Close contract') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="flex q-mb-xs">
|
||||||
|
<div class="q-mr-sm color-vn-label">
|
||||||
|
{{ t('Since') }}:
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-bold">
|
||||||
|
{{ toDate(item.started) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="q-mr-sm color-vn-label">
|
||||||
|
{{ t('To') }}:
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-bold">
|
||||||
|
{{ toDate(item.finished) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<QSeparator vertical />
|
||||||
|
|
||||||
|
<div class="width-data flex">
|
||||||
|
<div
|
||||||
|
class="full-width flex justify-between items-center"
|
||||||
|
v-if="item?.insurances.length"
|
||||||
|
>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="color-vn-label q-mr-xs">
|
||||||
|
{{ t('Credit') }}:
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-bold">
|
||||||
|
{{ item.insurances[0].credit }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="color-vn-label q-mr-xs">
|
||||||
|
{{ t('Grade') }}:
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-bold">
|
||||||
|
{{ item.insurances[0].grade || '-' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex">
|
||||||
|
<div class="color-vn-label q-mr-xs">
|
||||||
|
{{ t('Date') }}:
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-bold">
|
||||||
|
{{ toDate(item.insurances[0].created) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center cursor-pointer">
|
||||||
|
<QIcon
|
||||||
|
@click.stop="openViewCredit(item)"
|
||||||
|
color="primary"
|
||||||
|
name="preview"
|
||||||
|
size="md"
|
||||||
|
>
|
||||||
|
<QTooltip>{{
|
||||||
|
t('View credits')
|
||||||
|
}}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</QCardSection>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
|
</template>
|
||||||
|
</VnPaginate>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<QPageSticky :offset="[18, 18]" v-if="showQPageSticky">
|
||||||
|
<QBtn
|
||||||
|
@click.stop="toCustomerCreditContractsCreate()"
|
||||||
|
color="primary"
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
/>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('New contract') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.customer-card {
|
||||||
|
border: 2px solid var(--vn-light-gray);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.is-active {
|
||||||
|
background-color: var(--vn-light-gray);
|
||||||
|
}
|
||||||
|
.width-state {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
.width-data {
|
||||||
|
width: 65%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Close contract: Cerrar contrato
|
||||||
|
Since: Desde
|
||||||
|
To: Hasta
|
||||||
|
Credit: Crédito
|
||||||
|
Grade: Grade
|
||||||
|
Date: Fecha
|
||||||
|
View credits: Ver créditos
|
||||||
|
Created: Fecha creación
|
||||||
|
New contract: Nuevo contrato
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="flex justify-center">Credit management</div>
|
|
||||||
</template>
|
|
|
@ -1,3 +1,142 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, ref, watch } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
|
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const clientInformasRef = ref(null);
|
||||||
|
const rows = ref([]);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'worker',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: { relation: 'user', scope: { fields: ['nickname'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
where: { clientFk: route.params.id },
|
||||||
|
order: ['created DESC'],
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'created',
|
||||||
|
format: (value) => toDateHourMin(value),
|
||||||
|
label: t('Since'),
|
||||||
|
name: 'since',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (row) => row.worker.user.nickname,
|
||||||
|
label: t('Employee'),
|
||||||
|
name: 'employee',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
field: 'rating',
|
||||||
|
label: t('Rating'),
|
||||||
|
name: 'rating',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
field: 'recommendedCredit',
|
||||||
|
format: (value) => toCurrency(value),
|
||||||
|
label: t('Recommended credit'),
|
||||||
|
name: 'recommendedCredit',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
filter.where.clientFk = newValue;
|
||||||
|
clientInformasRef.value?.fetch();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex justify-center">Customer credit opinion</div>
|
<FetchData
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="(data) => (rows = data)"
|
||||||
|
auto-load
|
||||||
|
ref="clientInformasRef"
|
||||||
|
url="ClientInformas"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormModel
|
||||||
|
:form-initial-data="{}"
|
||||||
|
:observe-form-changes="false"
|
||||||
|
:url-create="`Clients/${route.params.id}/setRating`"
|
||||||
|
>
|
||||||
|
<template #form="{ data }">
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnInput
|
||||||
|
:label="t('Rating')"
|
||||||
|
clearable
|
||||||
|
type="number"
|
||||||
|
v-model.number="data.rating"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInput
|
||||||
|
:label="t('Recommended credit')"
|
||||||
|
clearable
|
||||||
|
type="number"
|
||||||
|
v-model.number="data.recommendedCredit"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
</template>
|
||||||
|
</FormModel>
|
||||||
|
|
||||||
|
<div class="full-width flex justify-center" v-if="rows.length">
|
||||||
|
<QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
|
:rows="rows"
|
||||||
|
hide-bottom
|
||||||
|
row-key="id"
|
||||||
|
v-model:selected="selected"
|
||||||
|
class="card-width q-px-lg"
|
||||||
|
>
|
||||||
|
<template #body-cell-employee="{ row }">
|
||||||
|
<QTd auto-width @click.stop>
|
||||||
|
<QBtn color="blue" flat no-caps>{{ row.worker.user.nickname }}</QBtn>
|
||||||
|
<WorkerDescriptorProxy :id="row.clientFk" />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Rating: Clasificación
|
||||||
|
Recommended credit: Crédito recomendado
|
||||||
|
Since: Desde
|
||||||
|
Employee: Empleado
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -1,47 +1,35 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onBeforeMount } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { date, QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
|
||||||
|
|
||||||
const arrayData = ref(null);
|
const rows = ref([]);
|
||||||
const workerId = ref(0);
|
|
||||||
const rows = computed(() => arrayData.value.store.data);
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
const filter = {
|
||||||
const filter = {
|
include: [
|
||||||
include: [
|
{
|
||||||
{
|
relation: 'worker',
|
||||||
relation: 'worker',
|
scope: {
|
||||||
scope: {
|
fields: ['id'],
|
||||||
fields: ['id'],
|
include: { relation: 'user', scope: { fields: ['name'] } },
|
||||||
include: { relation: 'user', scope: { fields: ['name'] } },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
},
|
||||||
where: { clientFk: `${route.params.id}` },
|
],
|
||||||
order: ['created DESC'],
|
where: { clientFk: route.params.id },
|
||||||
limit: 20,
|
order: ['created DESC'],
|
||||||
};
|
limit: 20,
|
||||||
arrayData.value = useArrayData('CustomerCreditsCard', {
|
};
|
||||||
url: 'ClientCredits',
|
|
||||||
filter,
|
|
||||||
});
|
|
||||||
await arrayData.value.fetch({ append: false });
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
created: {
|
created: {
|
||||||
|
@ -51,10 +39,8 @@ const tableColumnComponents = {
|
||||||
},
|
},
|
||||||
employee: {
|
employee: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
props: () => ({ flat: true, color: 'blue', noCaps: true }),
|
||||||
event: (prop) => {
|
event: () => {},
|
||||||
selectWorkerId(prop.row.clientFk);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
amount: {
|
amount: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
|
@ -69,7 +55,7 @@ const columns = computed(() => [
|
||||||
field: 'created',
|
field: 'created',
|
||||||
label: t('Since'),
|
label: t('Since'),
|
||||||
name: 'created',
|
name: 'created',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm:ss'),
|
format: (value) => toDateHourMin(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -86,41 +72,58 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const selectWorkerId = (id) => {
|
|
||||||
workerId.value = id;
|
|
||||||
};
|
|
||||||
|
|
||||||
const toCustomerCreditCreate = () => {
|
const toCustomerCreditCreate = () => {
|
||||||
router.push({ name: 'CustomerCreditCreate' });
|
router.push({ name: 'CustomerCreditCreate' });
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<FetchData
|
||||||
<QTable
|
:filter="filter"
|
||||||
:columns="columns"
|
@on-fetch="(data) => (rows = data)"
|
||||||
:pagination="{ rowsPerPage: 12 }"
|
auto-load
|
||||||
:rows="rows"
|
url="ClientCredits"
|
||||||
class="full-width q-mt-md"
|
/>
|
||||||
row-key="id"
|
|
||||||
>
|
<div class="full-width flex justify-center">
|
||||||
<template #body-cell="props">
|
<QCard class="card-width q-pa-lg">
|
||||||
<QTd :props="props">
|
<QTable
|
||||||
<QTr :props="props" class="cursor-pointer">
|
:columns="columns"
|
||||||
<component
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
:rows="rows"
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
class="full-width q-mt-md"
|
||||||
class="rounded-borders q-pa-sm"
|
row-key="id"
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
v-if="rows?.length"
|
||||||
>
|
>
|
||||||
{{ props.value }}
|
<template #body-cell="props">
|
||||||
<WorkerDescriptorProxy :id="workerId" />
|
<QTd :props="props">
|
||||||
</component>
|
<QTr :props="props" class="cursor-pointer">
|
||||||
</QTr>
|
<component
|
||||||
</QTd>
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
</template>
|
@click="
|
||||||
</QTable>
|
tableColumnComponents[props.col.name].event(props)
|
||||||
</QPage>
|
"
|
||||||
|
class="rounded-borders q-pa-sm"
|
||||||
|
v-bind="
|
||||||
|
tableColumnComponents[props.col.name].props(props)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
<WorkerDescriptorProxy
|
||||||
|
:id="props.row.workerFk"
|
||||||
|
v-if="props.col.name === 'employee'"
|
||||||
|
/>
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerCreditCreate()" color="primary" fab icon="add" />
|
<QBtn @click.stop="toCustomerCreditCreate()" color="primary" fab icon="add" />
|
||||||
|
|
|
@ -2,11 +2,15 @@
|
||||||
import { ref, computed } from 'vue';
|
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 { toCurrency } from 'src/filters';
|
|
||||||
|
import { toCurrency, toDate } from 'src/filters';
|
||||||
|
|
||||||
|
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 useCardDescription from 'src/composables/useCardDescription';
|
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
import CustomerDescriptorMenu from './CustomerDescriptorMenu.vue';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -19,8 +23,10 @@ const $props = defineProps({
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
@ -39,6 +45,23 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
data-key="customerData"
|
data-key="customerData"
|
||||||
>
|
>
|
||||||
|
<template #header-extra-action>
|
||||||
|
<QBtn
|
||||||
|
round
|
||||||
|
flat
|
||||||
|
size="sm"
|
||||||
|
icon="vn:Person"
|
||||||
|
color="white"
|
||||||
|
:to="{ name: 'CustomerList' }"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Go to module index') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
</template>
|
||||||
|
<template #menu="{ entity }">
|
||||||
|
<CustomerDescriptorMenu :customer="entity" />
|
||||||
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('customer.card.payMethod')" :value="entity.payMethod.name" />
|
<VnLv :label="t('customer.card.payMethod')" :value="entity.payMethod.name" />
|
||||||
|
|
||||||
|
@ -63,23 +86,26 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #icons="{ entity }">
|
<template #icons="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions class="q-gutter-x-md">
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="entity.isActive == false"
|
v-if="!entity.isActive"
|
||||||
name="vn:disabled"
|
name="vn:disabled"
|
||||||
size="xs"
|
size="xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.isDisabled') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon v-if="entity.isFreezed" name="vn:frozen" size="xs" color="primary">
|
||||||
v-if="entity.isFreezed == true"
|
|
||||||
name="vn:frozen"
|
|
||||||
size="xs"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.isFrozen') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<QIcon
|
||||||
|
v-if="!entity.account.active"
|
||||||
|
color="primary"
|
||||||
|
name="vn:noweb"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('customer.card.webAccountInactive') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="entity.debt > entity.credit"
|
v-if="entity.debt > entity.credit"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
|
@ -89,17 +115,41 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.hasDebt') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="entity.isTaxDataChecked == false"
|
v-if="!entity.isTaxDataChecked"
|
||||||
name="vn:no036"
|
name="vn:no036"
|
||||||
size="xs"
|
size="xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
|
<QTooltip>{{ t('customer.card.notChecked') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
<QBtn
|
||||||
|
v-if="entity.unpaid"
|
||||||
|
flat
|
||||||
|
size="sm"
|
||||||
|
icon="vn:Client_unpaid"
|
||||||
|
color="primary"
|
||||||
|
:to="{ name: 'CustomerUnpaid' }"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Unpaid') }}
|
||||||
|
<br />
|
||||||
|
{{
|
||||||
|
t('unpaidDated', {
|
||||||
|
dated: toDate(entity.unpaid.dated),
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
<br />
|
||||||
|
{{
|
||||||
|
t('unpaidAmount', {
|
||||||
|
amount: toCurrency(entity.unpaid.amount),
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</QTooltip>
|
||||||
|
</QBtn>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ entity }">
|
<template #actions="{ entity }">
|
||||||
<QCardActions>
|
<QCardActions class="flex justify-center">
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
name: 'TicketList',
|
name: 'TicketList',
|
||||||
|
@ -109,7 +159,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
icon="vn:ticket"
|
icon="vn:ticket"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('ticketList') }}</QTooltip>
|
<QTooltip>{{ t('Customer ticket list') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
:to="{
|
:to="{
|
||||||
|
@ -120,21 +170,40 @@ const setData = (entity) => (data.value = useCardDescription(entity.name, entity
|
||||||
icon="vn:invoice-out"
|
icon="vn:invoice-out"
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('invoiceOutList') }}</QTooltip>
|
<QTooltip>{{ t('Customer invoice out list') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn
|
||||||
|
:to="{
|
||||||
|
name: 'OrderCreate',
|
||||||
|
query: { clientFk: entity.id },
|
||||||
|
}"
|
||||||
|
size="md"
|
||||||
|
icon="vn:basketadd"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<QTooltip>{{ t('New order') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
|
<QBtn size="md" icon="face" color="primary">
|
||||||
|
<!-- TODO:: Redirigir a la vista de usuario cuando exista -->
|
||||||
|
<QTooltip>{{ t('Go to user') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QCardActions>
|
</QCardActions>
|
||||||
</template>
|
</template>
|
||||||
</CardDescriptor>
|
</CardDescriptor>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
{
|
en:
|
||||||
"en": {
|
unpaidDated: 'Date {dated}'
|
||||||
"ticketList": "Customer ticket list",
|
unpaidAmount: 'Amount {amount}'
|
||||||
"invoiceOutList": "Customer invoice out list"
|
es:
|
||||||
},
|
Go to module index: Ir al índice del módulo
|
||||||
"es": {
|
Customer ticket list: Listado de tickets del cliente
|
||||||
"ticketList": "Listado de tickets del cliente",
|
Customer invoice out list: Listado de facturas del cliente
|
||||||
"invoiceOutList": "Listado de facturas del cliente"
|
New order: Nuevo pedido
|
||||||
}
|
Go to user: Ir al usuario
|
||||||
}
|
Customer unpaid: Cliente impago
|
||||||
|
Unpaid: Impagado
|
||||||
|
unpaidDated: 'Fecha {dated}'
|
||||||
|
unpaidAmount: 'Importe {amount}'
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import useNotify from 'src/composables/useNotify';
|
||||||
|
|
||||||
|
import VnSmsDialog from 'src/components/common/VnSmsDialog.vue';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
customer: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const showSmsDialog = () => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: VnSmsDialog,
|
||||||
|
componentProps: {
|
||||||
|
phone: $props.customer.phone || $props.customer.mobile,
|
||||||
|
promise: sendSms,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendSms = async (payload) => {
|
||||||
|
payload.destinationFk = route.params.id;
|
||||||
|
try {
|
||||||
|
await axios.post(`Clients/${route.params.id}/sendSms`, payload);
|
||||||
|
notify('globals.notificationSent', 'positive');
|
||||||
|
} catch (error) {
|
||||||
|
notify(error.message, 'positive');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<QItem v-ripple clickable>
|
||||||
|
<QItemSection>
|
||||||
|
<RouterLink
|
||||||
|
:to="{
|
||||||
|
name: 'TicketCreate',
|
||||||
|
query: { clientFk: customer.id },
|
||||||
|
}"
|
||||||
|
class="color-vn-text"
|
||||||
|
>
|
||||||
|
{{ t('Simple ticket') }}
|
||||||
|
</RouterLink>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem v-ripple clickable>
|
||||||
|
<QItemSection @click="showSmsDialog()">{{ t('Send SMS') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Simple ticket: Ticket simple
|
||||||
|
Send SMS: Enviar SMS
|
||||||
|
</i18n>
|
|
@ -0,0 +1,259 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import { QBadge, QBtn, QCheckbox } from 'quasar';
|
||||||
|
|
||||||
|
import { downloadFile } from 'src/composables/downloadFile';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import CustomerFileManagementActions from 'src/pages/Customer/components/CustomerFileManagementActions.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const ClientDmsRef = ref(null);
|
||||||
|
const rows = ref([]);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
include: {
|
||||||
|
relation: 'dms',
|
||||||
|
scope: {
|
||||||
|
fields: [
|
||||||
|
'dmsTypeFk',
|
||||||
|
'reference',
|
||||||
|
'hardCopyNumber',
|
||||||
|
'workerFk',
|
||||||
|
'description',
|
||||||
|
'hasFile',
|
||||||
|
'file',
|
||||||
|
'created',
|
||||||
|
],
|
||||||
|
include: [
|
||||||
|
{ relation: 'dmsType', scope: { fields: ['name'] } },
|
||||||
|
{
|
||||||
|
relation: 'worker',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: { relation: 'user', scope: { fields: ['name'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
where: { clientFk: route.params.id },
|
||||||
|
order: ['dmsFk DESC'],
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableColumnComponents = {
|
||||||
|
id: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
order: {
|
||||||
|
component: QBadge,
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
reference: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
original: {
|
||||||
|
component: QCheckbox,
|
||||||
|
props: (prop) => ({
|
||||||
|
disable: true,
|
||||||
|
'model-value': Boolean(prop.value),
|
||||||
|
}),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
file: {
|
||||||
|
component: QBtn,
|
||||||
|
props: () => ({ flat: true, color: 'blue' }),
|
||||||
|
event: ({ row }) => downloadFile(row.dmsFk),
|
||||||
|
},
|
||||||
|
employee: {
|
||||||
|
component: QBtn,
|
||||||
|
props: () => ({ flat: true, color: 'blue' }),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
created: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
component: CustomerFileManagementActions,
|
||||||
|
props: (prop) => ({
|
||||||
|
id: prop.row.dmsFk,
|
||||||
|
promise: setData,
|
||||||
|
}),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.id,
|
||||||
|
label: t('Id'),
|
||||||
|
name: 'id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.dmsType.name,
|
||||||
|
label: t('Type'),
|
||||||
|
name: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.hardCopyNumber,
|
||||||
|
label: t('Order'),
|
||||||
|
name: 'order',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.reference,
|
||||||
|
label: t('Reference'),
|
||||||
|
name: 'reference',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.description,
|
||||||
|
label: t('Description'),
|
||||||
|
name: 'description',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.hasFile,
|
||||||
|
label: t('Original'),
|
||||||
|
name: 'original',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.file,
|
||||||
|
label: t('File'),
|
||||||
|
name: 'file',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: ({ dms }) => dms.worker.user.name,
|
||||||
|
label: t('Employee'),
|
||||||
|
name: 'employee',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (value) => value.dms.created,
|
||||||
|
label: t('Created'),
|
||||||
|
name: 'created',
|
||||||
|
format: (value) => toDateTimeFormat(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
field: 'actions',
|
||||||
|
label: '',
|
||||||
|
name: 'actions',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const setData = () => {
|
||||||
|
ClientDmsRef.value.fetch();
|
||||||
|
};
|
||||||
|
|
||||||
|
const toCustomerFileManagementCreate = () => {
|
||||||
|
router.push({ name: 'CustomerFileManagementCreate' });
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
ref="ClientDmsRef"
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="(data) => (rows = data)"
|
||||||
|
auto-load
|
||||||
|
url="ClientDms"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<QPage class="column items-center q-pa-md">
|
||||||
|
<QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
v-if="rows?.length"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
<component
|
||||||
|
:is="
|
||||||
|
props.col.name === 'order' && !props.value
|
||||||
|
? 'span'
|
||||||
|
: tableColumnComponents[props.col.name].component
|
||||||
|
"
|
||||||
|
@click="tableColumnComponents[props.col.name].event(props)"
|
||||||
|
class="col-content"
|
||||||
|
v-bind="tableColumnComponents[props.col.name].props(props)"
|
||||||
|
>
|
||||||
|
<template v-if="props.col.name !== 'original'">
|
||||||
|
{{ props.value }}
|
||||||
|
</template>
|
||||||
|
<WorkerDescriptorProxy
|
||||||
|
:id="props.row.dms.workerFk"
|
||||||
|
v-if="props.col.name === 'employee'"
|
||||||
|
/>
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
|
</QPage>
|
||||||
|
|
||||||
|
<QPageSticky :offset="[18, 18]">
|
||||||
|
<QBtn
|
||||||
|
@click.stop="toCustomerFileManagementCreate()"
|
||||||
|
color="primary"
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
/>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Upload file') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Id: Id
|
||||||
|
Type: Tipo
|
||||||
|
Order: Orden
|
||||||
|
Reference: Referencia
|
||||||
|
Description: Descripción
|
||||||
|
Original: Original
|
||||||
|
File: Fichero
|
||||||
|
Employee: Empleado
|
||||||
|
Created: Fecha creación
|
||||||
|
Upload file: Subir fichero
|
||||||
|
</i18n>
|
|
@ -46,17 +46,24 @@ function handleLocation(data, location) {
|
||||||
:label="t('Social name')"
|
:label="t('Social name')"
|
||||||
:required="true"
|
:required="true"
|
||||||
:rules="validate('client.socialName')"
|
:rules="validate('client.socialName')"
|
||||||
|
clearable
|
||||||
v-model="data.socialName"
|
v-model="data.socialName"
|
||||||
/>
|
>
|
||||||
|
<template #append>
|
||||||
|
<QIcon name="info" class="cursor-info">
|
||||||
|
<QTooltip>{{ t('onlyLetters') }}</QTooltip>
|
||||||
|
</QIcon>
|
||||||
|
</template>
|
||||||
|
</VnInput>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput :label="t('Tax number')" v-model="data.fi" />
|
<VnInput :label="t('Tax number')" clearable v-model="data.fi" />
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<VnInput :label="t('Street')" v-model="data.street" />
|
<VnInput :label="t('Street')" clearable v-model="data.street" />
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
|
@ -76,10 +83,21 @@ function handleLocation(data, location) {
|
||||||
:label="t('Sage transaction type')"
|
:label="t('Sage transaction type')"
|
||||||
:options="typesTransactions"
|
:options="typesTransactions"
|
||||||
hide-selected
|
hide-selected
|
||||||
option-label="vat"
|
option-label="transaction"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
v-model="data.sageTransactionTypeFk"
|
v-model="data.sageTransactionTypeFk"
|
||||||
/>
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>{{ scope.opt.name }}</QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{ `${scope.opt.id}: ${scope.opt.transaction}` }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelectFilter>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
|
@ -111,6 +129,11 @@ function handleLocation(data, location) {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox :label="t('Vies')" v-model="data.isVies" />
|
<QCheckbox :label="t('Vies')" v-model="data.isVies" />
|
||||||
|
<QIcon name="info" class="cursor-info q-ml-sm" size="sm">
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('whenActivatingIt') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
|
@ -135,6 +158,11 @@ function handleLocation(data, location) {
|
||||||
:label="t('Is equalizated')"
|
:label="t('Is equalizated')"
|
||||||
v-model="data.isEqualizated"
|
v-model="data.isEqualizated"
|
||||||
/>
|
/>
|
||||||
|
<QIcon class="cursor-info q-ml-sm" name="info" size="sm">
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('inOrderToInvoice') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
|
@ -183,4 +211,11 @@ es:
|
||||||
Verified data: Datos comprobados
|
Verified data: Datos comprobados
|
||||||
Incoterms authorization: Autorización incoterms
|
Incoterms authorization: Autorización incoterms
|
||||||
Electronic invoice: Factura electrónica
|
Electronic invoice: Factura electrónica
|
||||||
|
onlyLetters: Sólo se pueden usar letras, números y espacios
|
||||||
|
whenActivatingIt: Al activarlo, no informar el código del país en el campo nif
|
||||||
|
inOrderToInvoice: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automaticamente el cambio a todos lo consignatarios, en caso contrario preguntará al usuario si quiere o no propagar
|
||||||
|
en:
|
||||||
|
onlyLetters: Only letters, numbers and spaces can be used
|
||||||
|
whenActivatingIt: When activating it, do not enter the country code in the ID field
|
||||||
|
inOrderToInvoice: In order to invoice, this field is not contulted, but the consignee's ET. When modifiying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,59 +1,44 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onBeforeMount } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { date, QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency } from 'src/filters';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
|
||||||
|
|
||||||
const arrayData = ref(null);
|
const rows = ref([]);
|
||||||
const totalAmount = ref(0);
|
const totalAmount = ref(0);
|
||||||
const workerId = ref(0);
|
|
||||||
const rows = computed(() => arrayData.value.store.data);
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
const filter = {
|
||||||
const filter = {
|
include: [
|
||||||
include: [
|
{
|
||||||
{
|
relation: 'greugeType',
|
||||||
relation: 'greugeType',
|
scope: {
|
||||||
scope: {
|
fields: ['id', 'name'],
|
||||||
fields: ['id', 'name'],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['id', 'name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
order: 'shipped DESC, amount',
|
|
||||||
where: {
|
|
||||||
clientFk: `${route.params.id}`,
|
|
||||||
},
|
},
|
||||||
limit: 20,
|
{
|
||||||
};
|
relation: 'user',
|
||||||
|
scope: {
|
||||||
arrayData.value = useArrayData('CustomerGreugesCard', {
|
fields: ['id', 'name'],
|
||||||
url: 'greuges',
|
},
|
||||||
filter,
|
},
|
||||||
});
|
],
|
||||||
await arrayData.value.fetch({ append: false });
|
order: 'shipped DESC, amount',
|
||||||
totalAmount.value = arrayData.value.store.data.reduce((accumulator, currentValue) => {
|
where: {
|
||||||
return accumulator + currentValue.amount;
|
clientFk: `${route.params.id}`,
|
||||||
}, 0);
|
},
|
||||||
stateStore.rightDrawer = true;
|
limit: 20,
|
||||||
});
|
};
|
||||||
|
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
date: {
|
date: {
|
||||||
|
@ -63,10 +48,8 @@ const tableColumnComponents = {
|
||||||
},
|
},
|
||||||
createdBy: {
|
createdBy: {
|
||||||
component: QBtn,
|
component: QBtn,
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
props: () => ({ flat: true, color: 'blue', noCaps: true }),
|
||||||
event: (prop) => {
|
event: () => {},
|
||||||
selectWorkerId(prop.row.clientFk);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
comment: {
|
comment: {
|
||||||
component: 'span',
|
component: 'span',
|
||||||
|
@ -91,7 +74,7 @@ const columns = computed(() => [
|
||||||
field: 'shipped',
|
field: 'shipped',
|
||||||
label: t('Date'),
|
label: t('Date'),
|
||||||
name: 'date',
|
name: 'date',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY hh:mm:ss'),
|
format: (value) => toDateTimeFormat(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -120,8 +103,11 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const selectWorkerId = (id) => {
|
const setRows = (data) => {
|
||||||
workerId.value = id;
|
rows.value = data;
|
||||||
|
totalAmount.value = data.reduce((accumulator, currentValue) => {
|
||||||
|
return accumulator + currentValue.amount;
|
||||||
|
}, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const toCustomerGreugeCreate = () => {
|
const toCustomerGreugeCreate = () => {
|
||||||
|
@ -130,45 +116,52 @@ const toCustomerGreugeCreate = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<FetchData :filter="filter" @on-fetch="setRows" auto-load url="greuges" />
|
||||||
<QCard class="full-width" v-if="totalAmount">
|
|
||||||
<h6 class="flex justify-end q-my-lg q-pr-lg">
|
|
||||||
<span class="label-color q-mr-md">{{ t('Total') }}:</span>
|
|
||||||
{{ toCurrency(totalAmount) }}
|
|
||||||
</h6>
|
|
||||||
</QCard>
|
|
||||||
|
|
||||||
<QTable
|
<div class="full-width flex justify-center">
|
||||||
:columns="columns"
|
<QPage class="card-width q-pa-lg">
|
||||||
:pagination="{ rowsPerPage: 12 }"
|
<QCard class="full-width q-pa-sm" v-if="totalAmount">
|
||||||
:rows="rows"
|
<h6 class="flex justify-end q-my-lg q-pr-lg">
|
||||||
class="full-width q-mt-md"
|
<span class="color-vn-label q-mr-md">{{ t('Total') }}:</span>
|
||||||
row-key="id"
|
{{ toCurrency(totalAmount) }}
|
||||||
v-if="rows?.length"
|
</h6>
|
||||||
>
|
</QCard>
|
||||||
<template #body-cell="props">
|
|
||||||
<QTd :props="props">
|
|
||||||
<QTr :props="props" class="cursor-pointer">
|
|
||||||
<component
|
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
|
||||||
class="col-content"
|
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
|
||||||
>
|
|
||||||
{{ props.value }}
|
|
||||||
<WorkerDescriptorProxy :id="workerId" />
|
|
||||||
</component>
|
|
||||||
</QTr>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
|
||||||
</QTable>
|
|
||||||
|
|
||||||
<QCard class="full-width" v-else>
|
<QCard class="q-pa-sm q-mt-md">
|
||||||
<h5 class="flex justify-center label-color">
|
<QTable
|
||||||
{{ t('globals.noResults') }}
|
:columns="columns"
|
||||||
</h5>
|
:no-data-label="t('globals.noResults')"
|
||||||
</QCard>
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
</QPage>
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
<component
|
||||||
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
|
class="col-content"
|
||||||
|
v-bind="
|
||||||
|
tableColumnComponents[props.col.name].props(props)
|
||||||
|
"
|
||||||
|
@click="
|
||||||
|
tableColumnComponents[props.col.name].event(props)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
<WorkerDescriptorProxy
|
||||||
|
:id="props.row.userFk"
|
||||||
|
v-if="props.col.name === 'createdBy'"
|
||||||
|
/>
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</QCard>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerGreugeCreate()" color="primary" fab icon="add" />
|
<QBtn @click.stop="toCustomerGreugeCreate()" color="primary" fab icon="add" />
|
||||||
|
|
|
@ -124,13 +124,13 @@ const setInq = (value, status) => {
|
||||||
:url="urlClientLogsModels"
|
:url="urlClientLogsModels"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<h5 class="flex justify-center label-color">
|
<h5 class="flex justify-center color-vn-label">
|
||||||
{{ t('globals.noResults') }}
|
{{ t('globals.noResults') }}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
<QDrawer :width="256" show-if-above side="right" v-model="stateStore.rightDrawer">
|
<QDrawer :width="256" show-if-above side="right" v-model="stateStore.rightDrawer">
|
||||||
<div class="q-mt-sm q-px-md">
|
<div class="q-mt-sm q-px-md">
|
||||||
<VnInput :label="t('Search')">
|
<VnInput :label="t('Search')" clearable>
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
@ -187,7 +187,7 @@ const setInq = (value, status) => {
|
||||||
option-label="name"
|
option-label="name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
/>
|
/>
|
||||||
<VnInput :label="t('Changes')" class="q-mt-sm">
|
<VnInput :label="t('Changes')" clearable class="q-mt-sm">
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
@ -227,7 +227,7 @@ const setInq = (value, status) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<VnInputDate :label="t('Date')" class="q-mt-sm" />
|
<VnInputDate :label="t('Date')" class="q-mt-sm" />
|
||||||
<VnInput :label="t('To')" class="q-mt-md" />
|
<VnInput :label="t('To')" clearable class="q-mt-md" />
|
||||||
</div>
|
</div>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const rows = ref([]);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
include: [
|
||||||
|
{ relation: 'mandateType', scope: { fields: ['id', 'name'] } },
|
||||||
|
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||||
|
],
|
||||||
|
where: { clientFk: route.params.id },
|
||||||
|
order: ['created DESC'],
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableColumnComponents = {
|
||||||
|
id: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
company: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
registerDate: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
endDate: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'id',
|
||||||
|
label: t('Id'),
|
||||||
|
name: 'id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (row) => row.company.code,
|
||||||
|
label: t('Company'),
|
||||||
|
name: 'company',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (row) => row.mandateType.name,
|
||||||
|
label: t('Type'),
|
||||||
|
name: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'created',
|
||||||
|
label: t('Register date'),
|
||||||
|
name: 'registerDate',
|
||||||
|
format: (value) => toDateTimeFormat(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'finished',
|
||||||
|
label: t('End date'),
|
||||||
|
name: 'endDate',
|
||||||
|
format: (value) => (value ? toDateTimeFormat(value) : '-'),
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="(data) => (rows = data)"
|
||||||
|
auto-load
|
||||||
|
url="Mandates"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<QPage class="column items-center q-pa-md">
|
||||||
|
<QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
v-if="rows?.length"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
<component
|
||||||
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
|
@click="tableColumnComponents[props.col.name].event(props)"
|
||||||
|
class="rounded-borders q-pa-sm"
|
||||||
|
v-bind="tableColumnComponents[props.col.name].props(props)"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
|
</QPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Id: Id
|
||||||
|
Company: Empresa
|
||||||
|
Type: Tipo
|
||||||
|
Register date: Fecha alta
|
||||||
|
End date: Fecha baja
|
||||||
|
</i18n>
|
|
@ -2,7 +2,7 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { date } from 'quasar';
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
|
|
||||||
|
@ -23,62 +23,48 @@ const toCustomerNoteCreate = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QCard class="q-pa-lg">
|
<div class="full-width flex justify-center">
|
||||||
<VnPaginate
|
<QCard class="card-width q-pa-lg">
|
||||||
data-key="CustomerNotes"
|
<VnPaginate
|
||||||
:url="'clientObservations'"
|
data-key="CustomerNotes"
|
||||||
auto-load
|
url="clientObservations"
|
||||||
:filter="noteFilter"
|
auto-load
|
||||||
>
|
:filter="noteFilter"
|
||||||
<template #body="{ rows }">
|
>
|
||||||
<div v-if="rows.length">
|
<template #body="{ rows }">
|
||||||
<QCard
|
<div v-if="rows.length">
|
||||||
v-for="(item, index) in rows"
|
<QCard
|
||||||
:key="index"
|
v-for="(item, index) in rows"
|
||||||
:class="{
|
:key="index"
|
||||||
'q-pa-md': true,
|
class="q-pa-md q-rounded custom-border"
|
||||||
'q-rounded': true,
|
:class="{ 'q-mb-md': index < rows.length - 1 }"
|
||||||
'custom-border': true,
|
>
|
||||||
'q-mb-md': index < rows.length - 1,
|
<div class="flex justify-between">
|
||||||
}"
|
<p class="color-vn-label">
|
||||||
>
|
{{ item.worker.user.nickname }}
|
||||||
<div class="flex justify-between">
|
</p>
|
||||||
<p class="label-color">{{ item.worker.user.nickname }}</p>
|
<p class="color-vn-label">
|
||||||
<p class="label-color">
|
{{ toDateTimeFormat(item?.created) }}
|
||||||
{{
|
</p>
|
||||||
date.formatDate(item?.created, 'DD-MM-YYYY HH:mm:ss')
|
</div>
|
||||||
}}
|
<h6 class="q-mt-xs q-mb-none">{{ item.text }}</h6>
|
||||||
</p>
|
</QCard>
|
||||||
</div>
|
</div>
|
||||||
<h6 class="q-mt-xs q-mb-none">{{ item.text }}</h6>
|
|
||||||
</QCard>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<h5 class="flex justify-center label-color">
|
<h5 class="flex justify-center color-vn-label">
|
||||||
{{ t('globals.noResults') }}
|
{{ t('globals.noResults') }}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
<QPageSticky :offset="[18, 18]">
|
</VnPaginate>
|
||||||
<QBtn
|
</QCard>
|
||||||
@click.stop="toCustomerNoteCreate()"
|
</div>
|
||||||
color="primary"
|
|
||||||
fab
|
|
||||||
icon="add"
|
|
||||||
/>
|
|
||||||
<QTooltip>
|
|
||||||
{{ t('New consignee') }}
|
|
||||||
</QTooltip>
|
|
||||||
</QPageSticky>
|
|
||||||
</template>
|
|
||||||
</VnPaginate>
|
|
||||||
</QCard>
|
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerNoteCreate()" color="primary" fab icon="add" />
|
<QBtn @click.stop="toCustomerNoteCreate()" color="primary" fab icon="add" />
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('New consignee') }}
|
{{ t('New note') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
@ -89,8 +75,9 @@ const toCustomerNoteCreate = () => {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-color {
|
|
||||||
color: var(--vn-label-color);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
New note: Nueva nota
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="flex justify-center">Others</div>
|
|
||||||
</template>
|
|
|
@ -1,39 +1,22 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onBeforeMount } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { date, QBtn } from 'quasar';
|
import { toCurrency, toDate } from 'src/filters';
|
||||||
|
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import { toCurrency } from 'src/filters';
|
|
||||||
|
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
const rows = ref([]);
|
||||||
|
|
||||||
const arrayData = ref(null);
|
const filter = {
|
||||||
const workerId = ref(0);
|
where: { clientFk: route.params.id },
|
||||||
const rows = computed(() => arrayData.value.store.data);
|
order: ['started DESC'],
|
||||||
|
limit: 20,
|
||||||
onBeforeMount(async () => {
|
};
|
||||||
const filter = {
|
|
||||||
where: { clientFk: `${route.params.id}` },
|
|
||||||
order: ['started DESC'],
|
|
||||||
limit: 20,
|
|
||||||
};
|
|
||||||
|
|
||||||
arrayData.value = useArrayData('CustomerRecoveriesCard', {
|
|
||||||
url: 'Recoveries',
|
|
||||||
filter,
|
|
||||||
});
|
|
||||||
await arrayData.value.fetch({ append: false });
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const tableColumnComponents = {
|
const tableColumnComponents = {
|
||||||
since: {
|
since: {
|
||||||
|
@ -64,14 +47,14 @@ const columns = computed(() => [
|
||||||
field: 'started',
|
field: 'started',
|
||||||
label: t('Since'),
|
label: t('Since'),
|
||||||
name: 'since',
|
name: 'since',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
|
format: (value) => toDate(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
field: 'finished',
|
field: 'finished',
|
||||||
label: t('To'),
|
label: t('To'),
|
||||||
name: 'to',
|
name: 'to',
|
||||||
format: (value) => date.formatDate(value, 'DD/MM/YYYY'),
|
format: (value) => toDate(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -94,38 +77,44 @@ const toCustomerRecoverieCreate = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QPage class="column items-center q-pa-md">
|
<FetchData
|
||||||
<QTable
|
:filter="filter"
|
||||||
:columns="columns"
|
@on-fetch="(data) => (rows = data)"
|
||||||
:pagination="{ rowsPerPage: 12 }"
|
auto-load
|
||||||
:rows="rows"
|
url="Recoveries"
|
||||||
class="full-width q-mt-md"
|
/>
|
||||||
row-key="id"
|
|
||||||
v-if="rows?.length"
|
|
||||||
>
|
|
||||||
<template #body-cell="props">
|
|
||||||
<QTd :props="props">
|
|
||||||
<QTr :props="props" class="cursor-pointer">
|
|
||||||
<component
|
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
|
||||||
class="col-content"
|
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
|
||||||
>
|
|
||||||
{{ props.value }}
|
|
||||||
<WorkerDescriptorProxy :id="workerId" />
|
|
||||||
</component>
|
|
||||||
</QTr>
|
|
||||||
</QTd>
|
|
||||||
</template>
|
|
||||||
</QTable>
|
|
||||||
|
|
||||||
<QCard class="full-width" v-else>
|
<div class="full-width flex justify-center">
|
||||||
<h5 class="flex justify-center label-color">
|
<QPage class="card-width q-pa-lg">
|
||||||
{{ t('globals.noResults') }}
|
<QTable
|
||||||
</h5>
|
:columns="columns"
|
||||||
</QCard>
|
:no-data-label="t('globals.noResults')"
|
||||||
</QPage>
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
<component
|
||||||
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
|
class="col-content"
|
||||||
|
v-bind="
|
||||||
|
tableColumnComponents[props.col.name].props(props)
|
||||||
|
"
|
||||||
|
@click="
|
||||||
|
tableColumnComponents[props.col.name].event(props)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerRecoverieCreate()" color="primary" fab icon="add" />
|
<QBtn @click.stop="toCustomerRecoverieCreate()" color="primary" fab icon="add" />
|
||||||
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import { QBtn } from 'quasar';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import { toDateTimeFormat } from 'src/filters/date';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const rows = ref([]);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
include: [
|
||||||
|
{ relation: 'type', scope: { fields: ['code', 'description'] } },
|
||||||
|
{ relation: 'user', scope: { fields: ['id', 'name'] } },
|
||||||
|
{ relation: 'company', scope: { fields: ['code'] } },
|
||||||
|
],
|
||||||
|
where: { clientFk: route.params.id },
|
||||||
|
order: ['created DESC'],
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableColumnComponents = {
|
||||||
|
sent: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
worker: {
|
||||||
|
component: QBtn,
|
||||||
|
props: () => ({ flat: true, color: 'blue', noCaps: true }),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
company: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'created',
|
||||||
|
label: t('Sent'),
|
||||||
|
name: 'sent',
|
||||||
|
format: (value) => toDateTimeFormat(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (value) => value.type.description,
|
||||||
|
label: t('Description'),
|
||||||
|
name: 'description',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (value) => value.user.name,
|
||||||
|
label: t('Worker'),
|
||||||
|
name: 'worker',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: (value) => value.company?.code,
|
||||||
|
label: t('Company'),
|
||||||
|
name: 'company',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const toCustomerSamplesCreate = () => {
|
||||||
|
router.push({ name: 'CustomerSamplesCreate' });
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
:filter="filter"
|
||||||
|
@on-fetch="(data) => (rows = data)"
|
||||||
|
auto-load
|
||||||
|
url="ClientSamples"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QPage class="card-width q-pa-lg">
|
||||||
|
<QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
:no-data-label="t('globals.noResults')"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props" class="cursor-pointer">
|
||||||
|
<component
|
||||||
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
|
class="col-content"
|
||||||
|
v-bind="
|
||||||
|
tableColumnComponents[props.col.name].props(props)
|
||||||
|
"
|
||||||
|
@click="
|
||||||
|
tableColumnComponents[props.col.name].event(props)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
<WorkerDescriptorProxy
|
||||||
|
:id="props.row.userFk"
|
||||||
|
v-if="props.col.name === 'worker'"
|
||||||
|
/>
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<QPageSticky :offset="[18, 18]">
|
||||||
|
<QBtn @click.stop="toCustomerSamplesCreate()" color="primary" fab icon="add" />
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Send sample') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Sent: Enviado
|
||||||
|
Description: Descripción
|
||||||
|
Worker: Trabajador
|
||||||
|
Company: Empresa
|
||||||
|
Send sample: Enviar plantilla
|
||||||
|
</i18n>
|
|
@ -7,6 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
|
import CustomerSummaryTable from 'src/pages/Customer/components/CustomerSummaryTable.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -305,9 +306,16 @@ const creditWarning = computed(() => {
|
||||||
:value="entity.recommendedCredit"
|
:value="entity.recommendedCredit"
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
<QCard>
|
||||||
|
<div class="header">
|
||||||
|
{{ t('Latest tickets') }}
|
||||||
|
</div>
|
||||||
|
<CustomerSummaryTable />
|
||||||
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@media (min-width: $breakpoint-md) {
|
@media (min-width: $breakpoint-md) {
|
||||||
.summary .vn-one {
|
.summary .vn-one {
|
||||||
|
@ -315,9 +323,11 @@ const creditWarning = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
valueInfo: Value from {min} to {max}. The higher the better value
|
valueInfo: Value from {min} to {max}. The higher the better value
|
||||||
es:
|
es:
|
||||||
valueInfo: Valor de {min} a {max}. Cuanto más alto, mejor valor
|
valueInfo: Valor de {min} a {max}. Cuanto más alto, mejor valor
|
||||||
|
Latest tickets: Últimos tickets
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -0,0 +1,167 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, onBeforeMount, ref, watch, nextTick } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
import useNotify from 'src/composables/useNotify';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
|
const amountInputRef = ref(null);
|
||||||
|
const initialDated = Date.vnNew();
|
||||||
|
const unpaidClient = ref(false);
|
||||||
|
const isLoading = ref(false);
|
||||||
|
const amount = ref(null);
|
||||||
|
const dated = ref(initialDated);
|
||||||
|
|
||||||
|
const initialData = ref({
|
||||||
|
dated: initialDated,
|
||||||
|
});
|
||||||
|
|
||||||
|
const hasChanged = computed(() => {
|
||||||
|
return (
|
||||||
|
initialData.value.dated !== dated.value ||
|
||||||
|
initialData.value.amount !== amount.value
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
getData(route.params.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
getData(newValue);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getData = async (id) => {
|
||||||
|
const filter = { where: { clientFk: id } };
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get('ClientUnpaids', {
|
||||||
|
params: { filter: JSON.stringify(filter) },
|
||||||
|
});
|
||||||
|
if (data.length) {
|
||||||
|
setValues(data[0]);
|
||||||
|
} else {
|
||||||
|
defaultValues();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
defaultValues();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const setValues = (data) => {
|
||||||
|
unpaidClient.value = true;
|
||||||
|
amount.value = data.amount;
|
||||||
|
dated.value = data.dated;
|
||||||
|
initialData.value = data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultValues = () => {
|
||||||
|
unpaidClient.value = false;
|
||||||
|
initialData.value.amount = null;
|
||||||
|
setInitialData();
|
||||||
|
};
|
||||||
|
|
||||||
|
const setInitialData = () => {
|
||||||
|
amount.value = initialData.value.amount;
|
||||||
|
dated.value = initialData.value.dated;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmit = async () => {
|
||||||
|
isLoading.value = true;
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
amount: amount.value,
|
||||||
|
clientFk: route.params.id,
|
||||||
|
dated: dated.value,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
await axios.patch('ClientUnpaids', payload);
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
|
unpaidClient.value = true;
|
||||||
|
} catch (error) {
|
||||||
|
notify('errors.create', 'negative');
|
||||||
|
} finally {
|
||||||
|
isLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => unpaidClient.value,
|
||||||
|
async (val) => {
|
||||||
|
await nextTick();
|
||||||
|
if (val) amountInputRef.value.focus();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Teleport v-if="stateStore?.isSubToolbarShown()" to="#st-actions">
|
||||||
|
<QBtnGroup push class="q-gutter-x-sm">
|
||||||
|
<QBtn
|
||||||
|
:disabled="!hasChanged"
|
||||||
|
:label="t('globals.reset')"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click="setInitialData"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
icon="restart_alt"
|
||||||
|
type="reset"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:disabled="!hasChanged"
|
||||||
|
:label="t('globals.save')"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click="onSubmit"
|
||||||
|
color="primary"
|
||||||
|
icon="save"
|
||||||
|
/>
|
||||||
|
</QBtnGroup>
|
||||||
|
</Teleport>
|
||||||
|
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QCard class="card-width q-pa-lg">
|
||||||
|
<QForm>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<QCheckbox :label="t('Unpaid client')" v-model="unpaidClient" />
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md" v-show="unpaidClient">
|
||||||
|
<div class="col">
|
||||||
|
<VnInputDate :label="t('Date')" v-model="dated" />
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInput
|
||||||
|
ref="amountInputRef"
|
||||||
|
:label="t('Amount')"
|
||||||
|
clearable
|
||||||
|
type="number"
|
||||||
|
v-model="amount"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
</QForm>
|
||||||
|
</QCard>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Unpaid client: Cliente impagado
|
||||||
|
Date: Fecha
|
||||||
|
Amount: Importe
|
||||||
|
</i18n>
|
|
@ -1,48 +1,158 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
import axios from 'axios';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import { useValidator } from 'src/composables/useValidator';
|
||||||
|
import useNotify from 'src/composables/useNotify';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.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 CustomerChangePassword from 'src/pages/Customer/components/CustomerChangePassword.vue';
|
||||||
|
|
||||||
|
const { notify } = useNotify();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { validate } = useValidator();
|
||||||
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const stateStore = useStateStore();
|
||||||
|
|
||||||
|
const active = ref(false);
|
||||||
|
const canChangePassword = ref(0);
|
||||||
|
const email = ref(null);
|
||||||
|
const isLoading = ref(false);
|
||||||
|
const name = ref(null);
|
||||||
|
const usersPreviewRef = ref(null);
|
||||||
|
const user = ref([]);
|
||||||
|
const userPasswords = ref(0);
|
||||||
|
|
||||||
|
const dataChanges = computed(() => {
|
||||||
|
return (
|
||||||
|
user.value.active !== active.value ||
|
||||||
|
user.value.email !== email.value ||
|
||||||
|
user.value.name !== name.value
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
const filter = { where: { id: `${route.params.id}` } };
|
const filter = { where: { id: `${route.params.id}` } };
|
||||||
|
|
||||||
|
const showChangePasswordDialog = () => {
|
||||||
|
quasar.dialog({
|
||||||
|
component: CustomerChangePassword,
|
||||||
|
componentProps: {
|
||||||
|
id: route.params.id,
|
||||||
|
userPasswords: userPasswords.value,
|
||||||
|
promise: usersPreviewRef.value.fetch(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const setInitialData = () => {
|
||||||
|
if (user.value.length) {
|
||||||
|
active.value = user.value[0].active;
|
||||||
|
email.value = user.value[0].email;
|
||||||
|
name.value = user.value[0].name;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmit = async () => {
|
||||||
|
isLoading.value = true;
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
active: active.value,
|
||||||
|
email: email.value,
|
||||||
|
name: name.value,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
await axios.patch(`Clients/${route.params.id}/updateUser`, payload);
|
||||||
|
notify('globals.dataSaved', 'positive');
|
||||||
|
if (usersPreviewRef.value) usersPreviewRef.value.fetch();
|
||||||
|
} catch (error) {
|
||||||
|
notify('errors.create', 'negative');
|
||||||
|
} finally {
|
||||||
|
isLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FetchData
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
:observe-form-changes="false"
|
@on-fetch="
|
||||||
:url-update="`Clients/${route.params.id}/updateUser`"
|
(data) => {
|
||||||
:url="'VnUsers/preview'"
|
user = data;
|
||||||
model="client"
|
setInitialData();
|
||||||
>
|
}
|
||||||
<template #form="{ data }">
|
"
|
||||||
<div
|
auto-load
|
||||||
v-for="(item, index) in data"
|
ref="usersPreviewRef"
|
||||||
:key="index"
|
url="VnUsers/preview"
|
||||||
:class="{
|
/>
|
||||||
'q-mb-md': index < data.length - 1,
|
<FetchData
|
||||||
}"
|
:url="`Clients/${route.params.id}/hasCustomerRole`"
|
||||||
>
|
@on-fetch="(data) => (canChangePassword = data)"
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
auto-load
|
||||||
<div class="col">
|
/>
|
||||||
<QCheckbox
|
<FetchData
|
||||||
:label="t('Enable web access')"
|
@on-fetch="(data) => (userPasswords = data[0])"
|
||||||
v-model="item.active"
|
auto-load
|
||||||
/>
|
url="UserPasswords"
|
||||||
</div>
|
/>
|
||||||
</VnRow>
|
|
||||||
|
|
||||||
<VnRow class="row q-gutter-md q-mb-md">
|
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
||||||
<div class="col">
|
<QBtnGroup push class="q-gutter-x-sm">
|
||||||
<VnInput :label="t('User')" v-model="item.name" />
|
<QBtn
|
||||||
</div>
|
:disabled="isLoading"
|
||||||
<div class="col">
|
:label="t('globals.reset')"
|
||||||
<VnInput :label="t('Recovery email')" v-model="item.email">
|
:loading="isLoading"
|
||||||
|
@click="setInitialData"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
icon="restart_alt"
|
||||||
|
type="reset"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:disabled="isLoading"
|
||||||
|
:label="t('Change password')"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click.stop="showChangePasswordDialog()"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
icon="edit"
|
||||||
|
v-if="canChangePassword"
|
||||||
|
/>
|
||||||
|
<QBtn
|
||||||
|
:disabled="isLoading || !dataChanges"
|
||||||
|
:label="t('globals.save')"
|
||||||
|
:loading="isLoading"
|
||||||
|
@click="onSubmit"
|
||||||
|
color="primary"
|
||||||
|
icon="save"
|
||||||
|
/>
|
||||||
|
</QBtnGroup>
|
||||||
|
</Teleport>
|
||||||
|
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QCard class="card-width q-pa-lg">
|
||||||
|
<QCardSection>
|
||||||
|
<QForm>
|
||||||
|
<QCheckbox :label="t('Enable web access')" v-model="active" />
|
||||||
|
|
||||||
|
<div class="q-px-sm">
|
||||||
|
<VnInput :label="t('User')" clearable v-model="name" />
|
||||||
|
<VnInput
|
||||||
|
:label="t('Recovery email')"
|
||||||
|
:rules="validate('client.email')"
|
||||||
|
clearable
|
||||||
|
type="email"
|
||||||
|
v-model="email"
|
||||||
|
class="q-mt-sm"
|
||||||
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-pointer">
|
<QIcon name="info" class="cursor-pointer">
|
||||||
<QTooltip>{{
|
<QTooltip>{{
|
||||||
|
@ -54,10 +164,10 @@ const filter = { where: { id: `${route.params.id}` } };
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</QForm>
|
||||||
</div>
|
</QCardSection>
|
||||||
</template>
|
</QCard>
|
||||||
</FormModel>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -66,4 +176,5 @@ es:
|
||||||
User: Usuario
|
User: Usuario
|
||||||
Recovery email: Correo de recuperacion
|
Recovery email: Correo de recuperacion
|
||||||
This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta
|
This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta
|
||||||
|
Change password: Cambiar contraseña
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -0,0 +1,167 @@
|
||||||
|
<script setup>
|
||||||
|
import { computed, onBeforeMount, ref, watch } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
import { toCurrency, toDateHourMinSec } from 'src/filters';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import CustomerCloseIconTooltip from '../components/CustomerCloseIconTooltip.vue';
|
||||||
|
import CustomerCheckIconTooltip from '../components/CustomerCheckIconTooltip.vue';
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const rows = ref([]);
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
include: [
|
||||||
|
{ relation: 'mandateType', scope: { fields: ['id', 'name'] } },
|
||||||
|
{ relation: 'company', scope: { fields: ['id', 'code'] } },
|
||||||
|
],
|
||||||
|
where: { clientFk: null },
|
||||||
|
order: ['created DESC'],
|
||||||
|
limit: 20,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableColumnComponents = {
|
||||||
|
state: {
|
||||||
|
component: CustomerCloseIconTooltip,
|
||||||
|
props: ({ row }) => ({ transaction: row }),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
date: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
amount: {
|
||||||
|
component: 'span',
|
||||||
|
props: () => {},
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
validate: {
|
||||||
|
component: CustomerCheckIconTooltip,
|
||||||
|
props: ({ row }) => ({
|
||||||
|
transaction: row,
|
||||||
|
promise: refreshData,
|
||||||
|
}),
|
||||||
|
event: () => {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: '',
|
||||||
|
label: t('State'),
|
||||||
|
name: 'state',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'id',
|
||||||
|
label: t('Id'),
|
||||||
|
name: 'id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'created',
|
||||||
|
label: t('Date'),
|
||||||
|
name: 'date',
|
||||||
|
format: (value) => toDateHourMinSec(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: 'amount',
|
||||||
|
label: t('Amount'),
|
||||||
|
name: 'amount',
|
||||||
|
format: (value) => toCurrency(value),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
field: '',
|
||||||
|
name: 'validate',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
getData(route.params.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.params.id,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue) return;
|
||||||
|
getData(newValue);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const getData = async (id) => {
|
||||||
|
filter.where.clientFk = id;
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get('clients/transactions', {
|
||||||
|
params: { filter: JSON.stringify(filter) },
|
||||||
|
});
|
||||||
|
rows.value = data;
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const refreshData = () => {
|
||||||
|
getData(route.params.id);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="full-width flex justify-center">
|
||||||
|
<QPage class="card-width q-pa-lg">
|
||||||
|
<QTable
|
||||||
|
:columns="columns"
|
||||||
|
:pagination="{ rowsPerPage: 12 }"
|
||||||
|
:rows="rows"
|
||||||
|
class="full-width q-mt-md"
|
||||||
|
row-key="id"
|
||||||
|
v-if="rows?.length"
|
||||||
|
>
|
||||||
|
<template #body-cell="props">
|
||||||
|
<QTd :props="props">
|
||||||
|
<QTr :props="props">
|
||||||
|
<component
|
||||||
|
:is="tableColumnComponents[props.col.name].component"
|
||||||
|
@click="
|
||||||
|
tableColumnComponents[props.col.name].event(props)
|
||||||
|
"
|
||||||
|
class="rounded-borders q-pa-sm"
|
||||||
|
v-bind="
|
||||||
|
tableColumnComponents[props.col.name].props(props)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ props.value }}
|
||||||
|
</component>
|
||||||
|
</QTr>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
</QTable>
|
||||||
|
|
||||||
|
<h5 class="flex justify-center color-vn-label" v-else>
|
||||||
|
{{ t('globals.noResults') }}
|
||||||
|
</h5>
|
||||||
|
</QPage>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
State: Estado
|
||||||
|
Id: Id
|
||||||
|
Date: Fecha
|
||||||
|
Amount: Importe
|
||||||
|
</i18n>
|
|
@ -11,20 +11,8 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const newClientForm = reactive({
|
const initialData = reactive({
|
||||||
active: true,
|
active: true,
|
||||||
name: null,
|
|
||||||
salesPersonFk: null,
|
|
||||||
businessTypeFk: null,
|
|
||||||
fi: null,
|
|
||||||
socialName: null,
|
|
||||||
street: null,
|
|
||||||
postcode: null,
|
|
||||||
city: null,
|
|
||||||
provinceFk: null,
|
|
||||||
countryFk: null,
|
|
||||||
userName: null,
|
|
||||||
email: null,
|
|
||||||
isEqualizated: false,
|
isEqualizated: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -55,7 +43,7 @@ function handleLocation(data, location) {
|
||||||
<QPage>
|
<QPage>
|
||||||
<VnSubToolbar />
|
<VnSubToolbar />
|
||||||
<FormModel
|
<FormModel
|
||||||
:form-initial-data="newClientForm"
|
:form-initial-data="initialData"
|
||||||
model="client"
|
model="client"
|
||||||
url-create="Clients/createWithUser"
|
url-create="Clients/createWithUser"
|
||||||
>
|
>
|
||||||
|
@ -94,7 +82,7 @@ function handleLocation(data, location) {
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
:label="t('Business name')"
|
:label="t('Business name')"
|
||||||
:rules="validate('Client.socialName')"
|
:rules="validate('client.socialName')"
|
||||||
v-model="data.socialName"
|
v-model="data.socialName"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,7 +91,7 @@ function handleLocation(data, location) {
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput
|
<QInput
|
||||||
:label="t('Street')"
|
:label="t('Street')"
|
||||||
:rules="validate('Client.street')"
|
:rules="validate('client.street')"
|
||||||
v-model="data.street"
|
v-model="data.street"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -128,12 +116,26 @@ function handleLocation(data, location) {
|
||||||
<QInput v-model="data.userName" :label="t('Web user')" />
|
<QInput v-model="data.userName" :label="t('Web user')" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QInput v-model="data.email" :label="t('Email')" />
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('Is equalizated')"
|
:label="t('Is equalizated')"
|
||||||
v-model="newClientForm.isEqualizated"
|
v-model="initialData.isEqualizated"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue