forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6988-SummaryRefactor
This commit is contained in:
commit
0a2e8a7995
|
@ -5,6 +5,14 @@ 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).
|
||||||
|
|
||||||
|
## [2414.01] - 2024-04-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
## [2400.01] - 2024-01-04
|
## [2400.01] - 2024-01-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -5,13 +5,13 @@ Lilium frontend
|
||||||
## Install the dependencies
|
## Install the dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install quasar cli
|
### Install quasar cli
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo bun install -g @quasar/cli
|
sudo npm install -g @quasar/cli
|
||||||
```
|
```
|
||||||
|
|
||||||
### Start the app in development mode (hot-code reloading, error reporting, etc.)
|
### Start the app in development mode (hot-code reloading, error reporting, etc.)
|
||||||
|
@ -23,13 +23,13 @@ quasar dev
|
||||||
### Run unit tests
|
### Run unit tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run test:unit
|
pnpm run test:unit
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run e2e tests
|
### Run e2e tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run test:e2e
|
pnpm run test:e2e
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build the app for production
|
### Build the app for production
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.12.0",
|
"version": "24.14.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -11,7 +11,7 @@ axios.defaults.baseURL = '/api/';
|
||||||
|
|
||||||
const onRequest = (config) => {
|
const onRequest = (config) => {
|
||||||
const token = session.getToken();
|
const token = session.getToken();
|
||||||
if (token.length && config.headers) {
|
if (token.length && !config.headers.Authorization) {
|
||||||
config.headers.Authorization = token;
|
config.headers.Authorization = token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,174 @@
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, computed } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
import FormModelPopup from './FormModelPopup.vue';
|
||||||
|
import VnInputDate from './common/VnInputDate.vue';
|
||||||
|
|
||||||
|
const emit = defineEmits(['onDataSaved']);
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const manualInvoiceFormData = reactive({
|
||||||
|
maxShipped: Date.vnNew(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const formModelPopupRef = ref();
|
||||||
|
const invoiceOutSerialsOptions = ref([]);
|
||||||
|
const taxAreasOptions = ref([]);
|
||||||
|
const ticketsOptions = ref([]);
|
||||||
|
const clientsOptions = ref([]);
|
||||||
|
const isLoading = computed(() => formModelPopupRef.value?.isLoading);
|
||||||
|
|
||||||
|
const onDataSaved = async (formData, requestResponse) => {
|
||||||
|
emit('onDataSaved', formData, requestResponse);
|
||||||
|
if (requestResponse && requestResponse.id)
|
||||||
|
router.push({ name: 'InvoiceOutSummary', params: { id: requestResponse.id } });
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="InvoiceOutSerials"
|
||||||
|
:filter="{ where: { code: { neq: 'R' } }, order: ['code'] }"
|
||||||
|
@on-fetch="(data) => (invoiceOutSerialsOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="TaxAreas"
|
||||||
|
:filter="{ order: ['code'] }"
|
||||||
|
@on-fetch="(data) => (taxAreasOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="Tickets"
|
||||||
|
:filter="{ fields: ['id', 'nickname'], order: 'shipped DESC', limit: 30 }"
|
||||||
|
@on-fetch="(data) => (ticketsOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="Clients"
|
||||||
|
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||||
|
@on-fetch="(data) => (clientsOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FormModelPopup
|
||||||
|
ref="formModelPopupRef"
|
||||||
|
:title="t('Create manual invoice')"
|
||||||
|
url-create="InvoiceOuts/createManualInvoice"
|
||||||
|
model="invoiceOut"
|
||||||
|
:form-initial-data="manualInvoiceFormData"
|
||||||
|
@on-data-saved="onDataSaved"
|
||||||
|
>
|
||||||
|
<template #form-inputs="{ data }">
|
||||||
|
<span v-if="isLoading" class="text-primary invoicing-text">
|
||||||
|
<QIcon name="warning" class="fill-icon q-mr-sm" size="md" />
|
||||||
|
{{ t('Invoicing in progress...') }}
|
||||||
|
</span>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Ticket')"
|
||||||
|
:options="ticketsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="id"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.ticketFk"
|
||||||
|
@update:model-value="data.clientFk = null"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel> #{{ scope.opt?.id }} </QItemLabel>
|
||||||
|
<QItemLabel caption>{{
|
||||||
|
scope.opt?.nickname
|
||||||
|
}}</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelectFilter>
|
||||||
|
</div>
|
||||||
|
<span class="row items-center" style="max-width: max-content">{{
|
||||||
|
t('Or')
|
||||||
|
}}</span>
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Client')"
|
||||||
|
:options="clientsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="data.clientFk"
|
||||||
|
@update:model-value="data.ticketFk = null"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnInputDate :label="t('Max date')" v-model="data.maxShipped" />
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Serial')"
|
||||||
|
:options="invoiceOutSerialsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="description"
|
||||||
|
option-value="code"
|
||||||
|
v-model="data.serial"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Area')"
|
||||||
|
:options="taxAreasOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="code"
|
||||||
|
option-value="code"
|
||||||
|
v-model="data.taxArea"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<VnInput
|
||||||
|
:label="t('Reference')"
|
||||||
|
type="textarea"
|
||||||
|
v-model="data.reference"
|
||||||
|
fill-input
|
||||||
|
autogrow
|
||||||
|
/>
|
||||||
|
</VnRow>
|
||||||
|
</template>
|
||||||
|
</FormModelPopup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.invoicing-text {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: $primary;
|
||||||
|
font-size: 24px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Create manual invoice: Crear factura manual
|
||||||
|
Ticket: Ticket
|
||||||
|
Client: Cliente
|
||||||
|
Max date: Fecha límite
|
||||||
|
Serial: Serie
|
||||||
|
Area: Area
|
||||||
|
Reference: Referencia
|
||||||
|
Or: O
|
||||||
|
Invoicing in progress...: Facturación en progreso...
|
||||||
|
</i18n>
|
|
@ -78,10 +78,6 @@ const $props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
save,
|
|
||||||
});
|
|
||||||
|
|
||||||
const componentIsRendered = ref(false);
|
const componentIsRendered = ref(false);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -227,6 +223,11 @@ watch(formUrl, async () => {
|
||||||
reset();
|
reset();
|
||||||
fetch();
|
fetch();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
save,
|
||||||
|
isLoading,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="column items-center full-width">
|
<div class="column items-center full-width">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -39,21 +39,28 @@ const $props = defineProps({
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const formModelRef = ref(null);
|
||||||
const closeButton = ref(null);
|
const closeButton = ref(null);
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
const onDataSaved = (formData, requestResponse) => {
|
const onDataSaved = (formData, requestResponse) => {
|
||||||
emit('onDataSaved', formData, requestResponse);
|
emit('onDataSaved', formData, requestResponse);
|
||||||
closeForm();
|
closeForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeForm = () => {
|
const isLoading = computed(() => formModelRef.value?.isLoading);
|
||||||
|
|
||||||
|
const closeForm = async () => {
|
||||||
if (closeButton.value) closeButton.value.click();
|
if (closeButton.value) closeButton.value.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
isLoading,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
|
ref="formModelRef"
|
||||||
:form-initial-data="formInitialData"
|
:form-initial-data="formInitialData"
|
||||||
:observe-form-changes="false"
|
:observe-form-changes="false"
|
||||||
:default-actions="false"
|
:default-actions="false"
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
const emit = defineEmits(['onSubmit']);
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
subtitle: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
defaultSubmitButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
defaultCancelButton: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
customSubmitButtonLabel: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const closeButton = ref(null);
|
||||||
|
const isLoading = ref(false);
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
emit('onSubmit');
|
||||||
|
closeForm();
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeForm = () => {
|
||||||
|
if (closeButton.value) closeButton.value.click();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<QForm
|
||||||
|
@submit="onSubmit($event)"
|
||||||
|
class="all-pointer-events full-width"
|
||||||
|
style="max-width: 800px"
|
||||||
|
>
|
||||||
|
<QCard class="q-pa-lg">
|
||||||
|
<span ref="closeButton" class="close-icon" v-close-popup>
|
||||||
|
<QIcon name="close" size="sm" />
|
||||||
|
</span>
|
||||||
|
<h1 class="title">{{ title }}</h1>
|
||||||
|
<p>{{ subtitle }}</p>
|
||||||
|
<slot name="form-inputs" />
|
||||||
|
<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
|
||||||
|
v-if="defaultCancelButton"
|
||||||
|
:label="t('globals.cancel')"
|
||||||
|
color="primary"
|
||||||
|
flat
|
||||||
|
class="q-ml-sm"
|
||||||
|
:disabled="isLoading"
|
||||||
|
:loading="isLoading"
|
||||||
|
v-close-popup
|
||||||
|
/>
|
||||||
|
<slot name="customButtons" />
|
||||||
|
</div>
|
||||||
|
</QCard>
|
||||||
|
</QForm>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -234,6 +234,6 @@ async function togglePinned(item, event) {
|
||||||
max-width: 256px;
|
max-width: 256px;
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
color: #999999;
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -10,12 +10,12 @@ import UserPanel from 'components/UserPanel.vue';
|
||||||
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
import VnBreadcrumbs from './common/VnBreadcrumbs.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const token = session.getToken();
|
const { getTokenMultimedia } = useSession();
|
||||||
|
const token = getTokenMultimedia();
|
||||||
const appName = 'Lilium';
|
const appName = 'Lilium';
|
||||||
|
|
||||||
onMounted(() => stateStore.setMounted());
|
onMounted(() => stateStore.setMounted());
|
||||||
|
@ -106,7 +106,7 @@ const pinnedModulesRef = ref();
|
||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
.q-header {
|
.q-header {
|
||||||
background-color: var(--vn-dark);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -0,0 +1,168 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
import FetchData from 'components/FetchData.vue';
|
||||||
|
import VnSelectFilter from 'components/common/VnSelectFilter.vue';
|
||||||
|
import FormPopup from './FormPopup.vue';
|
||||||
|
|
||||||
|
import axios from 'axios';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
invoiceOutData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
const router = useRouter();
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
|
const transferInvoiceParams = reactive({
|
||||||
|
id: $props.invoiceOutData?.id,
|
||||||
|
refFk: $props.invoiceOutData?.ref,
|
||||||
|
});
|
||||||
|
const closeButton = ref(null);
|
||||||
|
const clientsOptions = ref([]);
|
||||||
|
const rectificativeTypeOptions = ref([]);
|
||||||
|
const siiTypeInvoiceOutsOptions = ref([]);
|
||||||
|
const invoiceCorrectionTypesOptions = ref([]);
|
||||||
|
|
||||||
|
const closeForm = () => {
|
||||||
|
if (closeButton.value) closeButton.value.click();
|
||||||
|
};
|
||||||
|
|
||||||
|
const transferInvoice = async () => {
|
||||||
|
try {
|
||||||
|
const { data } = await axios.post(
|
||||||
|
'InvoiceOuts/transferInvoice',
|
||||||
|
transferInvoiceParams
|
||||||
|
);
|
||||||
|
notify(t('Transferred invoice'), 'positive');
|
||||||
|
closeForm();
|
||||||
|
router.push('InvoiceOutSummary', { id: data.id });
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error transfering invoice', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="Clients"
|
||||||
|
@on-fetch="(data) => (clientsOptions = data)"
|
||||||
|
:filter="{ fields: ['id', 'name'], order: 'id', limit: 30 }"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="CplusRectificationTypes"
|
||||||
|
:filter="{ order: 'description' }"
|
||||||
|
@on-fetch="(data) => (rectificativeTypeOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="SiiTypeInvoiceOuts"
|
||||||
|
:filter="{ where: { code: { like: 'R%' } } }"
|
||||||
|
@on-fetch="(data) => (siiTypeInvoiceOutsOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FetchData
|
||||||
|
url="InvoiceCorrectionTypes"
|
||||||
|
@on-fetch="(data) => (invoiceCorrectionTypesOptions = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
|
<FormPopup
|
||||||
|
@on-submit="transferInvoice()"
|
||||||
|
:title="t('Transfer invoice')"
|
||||||
|
:custom-submit-button-label="t('Transfer client')"
|
||||||
|
:default-cancel-button="false"
|
||||||
|
>
|
||||||
|
<template #form-inputs>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Client')"
|
||||||
|
:options="clientsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="transferInvoiceParams.newClientFk"
|
||||||
|
:required="true"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>
|
||||||
|
#{{ scope.opt?.id }} -
|
||||||
|
{{ scope.opt?.name }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelectFilter>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Rectificative type')"
|
||||||
|
:options="rectificativeTypeOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="description"
|
||||||
|
option-value="id"
|
||||||
|
v-model="transferInvoiceParams.cplusRectificationTypeFk"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
<VnRow class="row q-gutter-md q-mb-md">
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Class')"
|
||||||
|
:options="siiTypeInvoiceOutsOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="description"
|
||||||
|
option-value="id"
|
||||||
|
v-model="transferInvoiceParams.siiTypeInvoiceOutFk"
|
||||||
|
:required="true"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>
|
||||||
|
{{ scope.opt?.code }} -
|
||||||
|
{{ scope.opt?.description }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelectFilter>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<VnSelectFilter
|
||||||
|
:label="t('Type')"
|
||||||
|
:options="invoiceCorrectionTypesOptions"
|
||||||
|
hide-selected
|
||||||
|
option-label="description"
|
||||||
|
option-value="id"
|
||||||
|
v-model="transferInvoiceParams.invoiceCorrectionTypeFk"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</VnRow>
|
||||||
|
</template>
|
||||||
|
</FormPopup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Transfer invoice: Transferir factura
|
||||||
|
Transfer client: Transferir cliente
|
||||||
|
Client: Cliente
|
||||||
|
Rectificative type: Tipo rectificativa
|
||||||
|
Class: Clase
|
||||||
|
Type: Tipo
|
||||||
|
Transferred invoice: Factura transferida
|
||||||
|
</i18n>
|
|
@ -44,7 +44,7 @@ const darkMode = computed({
|
||||||
});
|
});
|
||||||
|
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const token = session.getToken();
|
const token = session.getTokenMultimedia();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
updatePreferences();
|
updatePreferences();
|
||||||
|
@ -87,7 +87,7 @@ function copyUserToken() {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QMenu anchor="bottom left">
|
<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="column panel">
|
||||||
<div class="text-h6 q-mb-md">
|
<div class="text-h6 q-mb-md">
|
||||||
|
|
|
@ -71,7 +71,7 @@ function getBreadcrumb(param) {
|
||||||
}
|
}
|
||||||
&--last,
|
&--last,
|
||||||
&__separator {
|
&__separator {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (max-width: $breakpoint-md) {
|
@media (max-width: $breakpoint-md) {
|
||||||
|
|
|
@ -304,7 +304,7 @@ function parseDms(data) {
|
||||||
row-gap: 20px;
|
row-gap: 20px;
|
||||||
}
|
}
|
||||||
.labelColor {
|
.labelColor {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -819,7 +819,7 @@ setLogTree();
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.q-card {
|
.q-card {
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
.q-item {
|
.q-item {
|
||||||
min-height: 0px;
|
min-height: 0px;
|
||||||
|
@ -836,7 +836,7 @@ setLogTree();
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
|
|
||||||
& > .header {
|
& > .header {
|
||||||
color: $dark;
|
color: var(--vn-section-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
@ -916,7 +916,7 @@ setLogTree();
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
.model-id {
|
.model-id {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.q-btn {
|
.q-btn {
|
||||||
|
@ -942,7 +942,7 @@ setLogTree();
|
||||||
}
|
}
|
||||||
.change-info {
|
.change-info {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: var(--vn-dark);
|
background-color: var(--vn-section-color);
|
||||||
& > .date {
|
& > .date {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -981,7 +981,7 @@ setLogTree();
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
& > .q-icon {
|
& > .q-icon {
|
||||||
|
|
|
@ -82,7 +82,7 @@ const toggleForm = () => {
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
|
|
||||||
&.--add-icon {
|
&.--add-icon {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
background-color: $primary;
|
background-color: $primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
<script setup>
|
||||||
|
const $props = defineProps({
|
||||||
|
url: { type: String, default: null },
|
||||||
|
text: { type: String, default: null },
|
||||||
|
icon: { type: String, default: 'open_in_new' },
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="titleBox">
|
||||||
|
<div class="header-link">
|
||||||
|
<a :href="$props.url" :class="$props.url ? 'link' : 'color-vn-text'">
|
||||||
|
{{ $props.text }}
|
||||||
|
<QIcon v-if="url" :name="$props.icon" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
a {
|
||||||
|
font-size: large;
|
||||||
|
}
|
||||||
|
.titleBox {
|
||||||
|
padding-bottom: 2%;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -175,7 +175,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.body {
|
.body {
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
.text-h5 {
|
.text-h5 {
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
@ -191,7 +191,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 2px 16px;
|
padding: 2px 16px;
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
&:not(:has(a))::after {
|
&:not(:has(a))::after {
|
||||||
|
@ -199,7 +199,7 @@ const emit = defineEmits(['onFetch']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.value {
|
.value {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -224,13 +224,13 @@ const emit = defineEmits(['onFetch']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.subtitle {
|
.subtitle {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
.list-box {
|
.list-box {
|
||||||
.q-item__label {
|
.q-item__label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.descriptor {
|
.descriptor {
|
||||||
|
|
|
@ -61,7 +61,7 @@ const toggleCardCheck = (item) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-chip-color {
|
.q-chip-color {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-list-body {
|
.card-list-body {
|
||||||
|
@ -75,7 +75,7 @@ const toggleCardCheck = (item) => {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
.label {
|
.label {
|
||||||
width: 35%;
|
width: 35%;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -117,7 +117,7 @@ const toggleCardCheck = (item) => {
|
||||||
transition: background-color 0.2s;
|
transition: background-color 0.2s;
|
||||||
}
|
}
|
||||||
.card:hover {
|
.card:hover {
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
.list-items {
|
.list-items {
|
||||||
width: 75%;
|
width: 75%;
|
||||||
|
|
|
@ -107,7 +107,7 @@ watch(props, async () => {
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
|
|
||||||
> .q-card.vn-one {
|
> .q-card.vn-one {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -124,7 +124,7 @@ watch(props, async () => {
|
||||||
|
|
||||||
> .q-card {
|
> .q-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
min-width: 275px;
|
min-width: 275px;
|
||||||
|
@ -134,7 +134,7 @@ watch(props, async () => {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
width: 8em;
|
width: 8em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -144,7 +144,7 @@ watch(props, async () => {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.value {
|
.value {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,12 +163,12 @@ watch(props, async () => {
|
||||||
margin-bottom: 9px;
|
margin-bottom: 9px;
|
||||||
& .q-checkbox__label {
|
& .q-checkbox__label {
|
||||||
margin-left: 31px;
|
margin-left: 31px;
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
& .q-checkbox__inner {
|
& .q-checkbox__inner {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@ const $props = defineProps({
|
||||||
size: { type: String, default: null },
|
size: { type: String, default: null },
|
||||||
title: { type: String, default: null },
|
title: { type: String, default: null },
|
||||||
});
|
});
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const title = computed(() => $props.title ?? t('globals.system'));
|
const title = computed(() => $props.title ?? t('globals.system'));
|
||||||
|
|
|
@ -163,7 +163,12 @@ async function search() {
|
||||||
}
|
}
|
||||||
#searchbar {
|
#searchbar {
|
||||||
.q-field--standout.q-field--highlighted .q-field__control {
|
.q-field--standout.q-field--highlighted .q-field__control {
|
||||||
background-color: var(--vn-text);
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
.q-field__native,
|
||||||
|
.q-icon {
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -14,7 +14,7 @@ onUnmounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QToolbar class="bg-vn-dark justify-end sticky">
|
<QToolbar class="justify-end sticky">
|
||||||
<slot name="st-data">
|
<slot name="st-data">
|
||||||
<div id="st-data"></div>
|
<div id="st-data"></div>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { useSession } from 'src/composables/useSession';
|
import { useSession } from 'src/composables/useSession';
|
||||||
import { getUrl } from './getUrl';
|
import { getUrl } from './getUrl';
|
||||||
|
|
||||||
const session = useSession();
|
const {getTokenMultimedia} = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
export async function downloadFile(dmsId) {
|
export async function downloadFile(dmsId) {
|
||||||
let appUrl = await getUrl('', 'lilium');
|
let appUrl = await getUrl('', 'lilium');
|
||||||
|
|
|
@ -1,30 +1,56 @@
|
||||||
import { useState } from './useState';
|
import { useState } from './useState';
|
||||||
import { useRole } from './useRole';
|
import { useRole } from './useRole';
|
||||||
import { useUserConfig } from './useUserConfig';
|
import { useUserConfig } from './useUserConfig';
|
||||||
|
import axios from 'axios';
|
||||||
|
import useNotify from './useNotify';
|
||||||
|
|
||||||
export function useSession() {
|
export function useSession() {
|
||||||
|
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() {
|
||||||
|
const localTokenMultimedia = localStorage.getItem('tokenMultimedia');
|
||||||
|
const sessionTokenMultimedia = sessionStorage.getItem('tokenMultimedia');
|
||||||
|
|
||||||
|
return localTokenMultimedia || sessionTokenMultimedia || '';
|
||||||
|
}
|
||||||
|
|
||||||
function setToken(data) {
|
function setToken(data) {
|
||||||
if (data.keepLogin) {
|
if (data.keepLogin) {
|
||||||
localStorage.setItem('token', data.token);
|
localStorage.setItem('token', data.token);
|
||||||
|
localStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.setItem('token', data.token);
|
sessionStorage.setItem('token', data.token);
|
||||||
|
sessionStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function destroyToken(url, storage, key) {
|
||||||
function destroy() {
|
if (storage.getItem(key)) {
|
||||||
if (localStorage.getItem('token'))
|
try {
|
||||||
localStorage.removeItem('token')
|
await axios.post(url, null, {
|
||||||
|
headers: { Authorization: storage.getItem(key) },
|
||||||
if (sessionStorage.getItem('token'))
|
});
|
||||||
sessionStorage.removeItem('token');
|
} catch (error) {
|
||||||
|
notify('errors.statusUnauthorized', 'negative');
|
||||||
|
} finally {
|
||||||
|
storage.removeItem(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function destroy() {
|
||||||
|
const tokens = {
|
||||||
|
tokenMultimedia: 'Accounts/logout',
|
||||||
|
token: 'VnUsers/logout',
|
||||||
|
};
|
||||||
|
for (const [key, url] of Object.entries(tokens)) {
|
||||||
|
await destroyToken(url, localStorage, key);
|
||||||
|
await destroyToken(url, sessionStorage, key);
|
||||||
|
}
|
||||||
|
|
||||||
const { setUser } = useState();
|
const { setUser } = useState();
|
||||||
|
|
||||||
|
@ -37,8 +63,8 @@ export function useSession() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function login(token, keepLogin) {
|
async function login(token, tokenMultimedia, keepLogin) {
|
||||||
setToken({ token, keepLogin });
|
setToken({ token, tokenMultimedia, keepLogin });
|
||||||
|
|
||||||
await useRole().fetch();
|
await useRole().fetch();
|
||||||
await useUserConfig().fetch();
|
await useUserConfig().fetch();
|
||||||
|
@ -53,6 +79,7 @@ export function useSession() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getToken,
|
getToken,
|
||||||
|
getTokenMultimedia,
|
||||||
setToken,
|
setToken,
|
||||||
destroy,
|
destroy,
|
||||||
login,
|
login,
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
export function useVnConfirm() {
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
const openConfirmationModal = (title, message, promise, successFn) => {
|
||||||
|
quasar
|
||||||
|
.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: title,
|
||||||
|
message: message,
|
||||||
|
promise: promise,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.onOk(async () => {
|
||||||
|
if (successFn) successFn();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return { openConfirmationModal };
|
||||||
|
}
|
|
@ -2,29 +2,33 @@
|
||||||
@import './icons.scss';
|
@import './icons.scss';
|
||||||
|
|
||||||
body.body--light {
|
body.body--light {
|
||||||
--fount-color: black;
|
--font-color: black;
|
||||||
--vn-sectionColor: #ffffff;
|
--vn-section-color: #e0e0e0;
|
||||||
--vn-pageColor: #e0e0e0;
|
--vn-page-color: #ffffff;
|
||||||
background-color: var(--vn-pageColor);
|
--vn-text-color: var(--font-color);
|
||||||
|
--vn-label-color: #5f5f5f;
|
||||||
|
--vn-accent-color: #e7e3e3;
|
||||||
|
|
||||||
|
background-color: var(--vn-page-color);
|
||||||
|
|
||||||
.q-header .q-toolbar {
|
.q-header .q-toolbar {
|
||||||
color: var(--fount-color);
|
color: var(--font-color);
|
||||||
|
}
|
||||||
|
.q-card,
|
||||||
|
.q-table,
|
||||||
|
.q-table__bottom,
|
||||||
|
.q-drawer {
|
||||||
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
--vn-text: var(--fount-color);
|
|
||||||
--vn-gray: var(--vn-sectionColor);
|
|
||||||
--vn-label: #5f5f5f;
|
|
||||||
--vn-dark: var(--vn-sectionColor);
|
|
||||||
--vn-light-gray: #e7e3e3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.body--dark {
|
body.body--dark {
|
||||||
--vn-pageColor: #222;
|
--vn-section-color: #403c3c;
|
||||||
--vn-SectionColor: #3c3b3b;
|
--vn-text-color: white;
|
||||||
background-color: var(--vn-pageColor);
|
--vn-label-color: #a8a8a8;
|
||||||
--vn-text: white;
|
--vn-accent-color: #424242;
|
||||||
--vn-gray: var(--vn-SectionColor);
|
|
||||||
--vn-label: #a8a8a8;
|
background-color: #222;
|
||||||
--vn-dark: var(--vn-SectionColor);
|
|
||||||
--vn-light-gray: #424242;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -39,6 +43,9 @@ a {
|
||||||
.tx-color-link {
|
.tx-color-link {
|
||||||
color: $color-link !important;
|
color: $color-link !important;
|
||||||
}
|
}
|
||||||
|
.tx-color-font {
|
||||||
|
color: $color-link !important;
|
||||||
|
}
|
||||||
|
|
||||||
.header-link {
|
.header-link {
|
||||||
color: $color-link !important;
|
color: $color-link !important;
|
||||||
|
@ -59,19 +66,19 @@ a {
|
||||||
// Removes chrome autofill background
|
// Removes chrome autofill background
|
||||||
input:-webkit-autofill,
|
input:-webkit-autofill,
|
||||||
select:-webkit-autofill {
|
select:-webkit-autofill {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
font-family: $typography-font-family;
|
font-family: $typography-font-family;
|
||||||
-webkit-text-fill-color: var(--vn-text);
|
-webkit-text-fill-color: var(--vn-text-color);
|
||||||
-webkit-background-clip: text !important;
|
-webkit-background-clip: text !important;
|
||||||
background-clip: text !important;
|
background-clip: text !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-vn-dark {
|
.bg-vn-section-color {
|
||||||
background-color: var(--vn-dark);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-vn-text {
|
.color-vn-text {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.color-vn-white {
|
.color-vn-white {
|
||||||
|
@ -79,8 +86,8 @@ select:-webkit-autofill {
|
||||||
}
|
}
|
||||||
|
|
||||||
.vn-card {
|
.vn-card {
|
||||||
background-color: var(--vn-gray);
|
background-color: var(--vn-section-color);
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,16 +97,20 @@ select:-webkit-autofill {
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-vn-primary-row {
|
.bg-vn-primary-row {
|
||||||
background-color: var(--vn-dark);
|
background-color: var(--vn-section-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-vn-secondary-row {
|
.bg-vn-secondary-row {
|
||||||
background-color: var(--vn-light-gray);
|
background-color: var(--vn-accent-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fill-icon {
|
||||||
|
font-variation-settings: 'FILL' 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vn-table-separation-row {
|
.vn-table-separation-row {
|
||||||
height: 16px !important;
|
height: 16px !important;
|
||||||
background-color: var(--vn-gray) !important;
|
background-color: var(--vn-section-color) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Estilo para el asterisco en campos requeridos */
|
/* Estilo para el asterisco en campos requeridos */
|
||||||
|
@ -107,6 +118,10 @@ select:-webkit-autofill {
|
||||||
content: ' *';
|
content: ' *';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-chip {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
input[type='number'] {
|
input[type='number'] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,10 @@
|
||||||
// Tip: to add new colors https://quasar.dev/style/color-palette/#adding-your-own-colors
|
// Tip: to add new colors https://quasar.dev/style/color-palette/#adding-your-own-colors
|
||||||
$primary: #ec8916;
|
$primary: #ec8916;
|
||||||
$secondary: $primary;
|
$secondary: $primary;
|
||||||
$positive: #21ba45;
|
$positive: #c8e484;
|
||||||
$negative: #c10015;
|
$negative: #fb5252;
|
||||||
$info: #31ccec;
|
$info: #84d0e2;
|
||||||
$warning: #f2c037;
|
$warning: #f4b974;
|
||||||
// Pendiente de cuadrar con la base de datos
|
// Pendiente de cuadrar con la base de datos
|
||||||
$success: $positive;
|
$success: $positive;
|
||||||
$alert: $negative;
|
$alert: $negative;
|
||||||
|
|
|
@ -592,6 +592,7 @@ export default {
|
||||||
company: 'Company',
|
company: 'Company',
|
||||||
dued: 'Due date',
|
dued: 'Due date',
|
||||||
shortDued: 'Due date',
|
shortDued: 'Due date',
|
||||||
|
amount: 'Amount',
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
issued: 'Issued',
|
issued: 'Issued',
|
||||||
|
@ -625,7 +626,7 @@ export default {
|
||||||
fillDates: 'Invoice date and the max date should be filled',
|
fillDates: 'Invoice date and the max date should be filled',
|
||||||
invoiceDateLessThanMaxDate: 'Invoice date can not be less than max date',
|
invoiceDateLessThanMaxDate: 'Invoice date can not be less than max date',
|
||||||
invoiceWithFutureDate: 'Exists an invoice with a future date',
|
invoiceWithFutureDate: 'Exists an invoice with a future date',
|
||||||
noTicketsToInvoice: 'There are not clients to invoice',
|
noTicketsToInvoice: 'There are not tickets to invoice',
|
||||||
criticalInvoiceError: 'Critical invoicing error, process stopped',
|
criticalInvoiceError: 'Critical invoicing error, process stopped',
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
|
|
|
@ -592,6 +592,7 @@ export default {
|
||||||
company: 'Empresa',
|
company: 'Empresa',
|
||||||
dued: 'Fecha vencimineto',
|
dued: 'Fecha vencimineto',
|
||||||
shortDued: 'F. vencimiento',
|
shortDued: 'F. vencimiento',
|
||||||
|
amount: 'Importe',
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
issued: 'Fecha emisión',
|
issued: 'Fecha emisión',
|
||||||
|
@ -627,7 +628,7 @@ export default {
|
||||||
invoiceDateLessThanMaxDate:
|
invoiceDateLessThanMaxDate:
|
||||||
'La fecha de la factura no puede ser menor que la fecha máxima',
|
'La fecha de la factura no puede ser menor que la fecha máxima',
|
||||||
invoiceWithFutureDate: 'Existe una factura con una fecha futura',
|
invoiceWithFutureDate: 'Existe una factura con una fecha futura',
|
||||||
noTicketsToInvoice: 'No hay clientes para facturar',
|
noTicketsToInvoice: 'No existen tickets para facturar',
|
||||||
criticalInvoiceError: 'Error crítico en la facturación, proceso detenido',
|
criticalInvoiceError: 'Error crítico en la facturación, proceso detenido',
|
||||||
},
|
},
|
||||||
table: {
|
table: {
|
||||||
|
|
|
@ -11,5 +11,3 @@ const quasar = useQuasar();
|
||||||
<QFooter v-if="quasar.platform.is.mobile"></QFooter>
|
<QFooter v-if="quasar.platform.is.mobile"></QFooter>
|
||||||
</QLayout>
|
</QLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ const langs = ['en', 'es'];
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QLayout view="hHh LpR fFf">
|
<QLayout view="hHh LpR fFf">
|
||||||
<QHeader reveal class="bg-vn-dark">
|
<QHeader reveal class="bg-vn-section-color">
|
||||||
<QToolbar class="justify-end">
|
<QToolbar class="justify-end">
|
||||||
<QBtn
|
<QBtn
|
||||||
id="switchLanguage"
|
id="switchLanguage"
|
||||||
|
|
|
@ -13,8 +13,8 @@ import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
const claimFilter = {
|
const claimFilter = {
|
||||||
fields: [
|
fields: [
|
||||||
|
|
|
@ -107,7 +107,11 @@ onMounted(async () => {
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv v-if="entity.claimState" :label="t('claim.card.state')">
|
<VnLv v-if="entity.claimState" :label="t('claim.card.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge :color="stateColor(entity.claimState.code)" dense>
|
<QBadge
|
||||||
|
:color="stateColor(entity.claimState.code)"
|
||||||
|
text-color="black"
|
||||||
|
dense
|
||||||
|
>
|
||||||
{{ entity.claimState.description }}
|
{{ entity.claimState.description }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -161,7 +161,7 @@ function showImportDialog() {
|
||||||
<div class="row q-gutter-md">
|
<div class="row q-gutter-md">
|
||||||
<div>
|
<div>
|
||||||
{{ t('Amount') }}
|
{{ t('Amount') }}
|
||||||
<QChip :dense="$q.screen.lt.sm">
|
<QChip :dense="$q.screen.lt.sm" text-color="white">
|
||||||
{{ toCurrency(amount) }}
|
{{ toCurrency(amount) }}
|
||||||
</QChip>
|
</QChip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,8 +11,8 @@ import FetchData from 'components/FetchData.vue';
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
const claimId = computed(() => router.currentRoute.value.params.id);
|
const claimId = computed(() => router.currentRoute.value.params.id);
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@ import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
|
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';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
@ -180,10 +181,10 @@ function openDialog(dmsId) {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link" :href="`#/claim/${entityId}/basic-data`">
|
<VnTitle
|
||||||
{{ t('claim.pageTitles.basicData') }}
|
:url="`#/claim/${entityId}/basic-data`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('claim.pageTitles.basicData')"
|
||||||
</a>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('claim.summary.created')"
|
:label="t('claim.summary.created')"
|
||||||
:value="toDate(claim.created)"
|
:value="toDate(claim.created)"
|
||||||
|
@ -226,10 +227,10 @@ function openDialog(dmsId) {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-three">
|
<QCard class="vn-three">
|
||||||
<a class="header header-link" :href="`#/claim/${entityId}/notes`">
|
<VnTitle
|
||||||
{{ t('claim.summary.notes') }}
|
:url="`#/claim/${entityId}/notes`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('claim.summary.notes')"
|
||||||
</a>
|
/>
|
||||||
<ClaimNotes
|
<ClaimNotes
|
||||||
:id="entityId"
|
:id="entityId"
|
||||||
:add-note="false"
|
:add-note="false"
|
||||||
|
@ -238,10 +239,10 @@ function openDialog(dmsId) {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-two" v-if="salesClaimed.length > 0">
|
<QCard class="vn-two" v-if="salesClaimed.length > 0">
|
||||||
<a class="header header-link" :href="`#/claim/${entityId}/lines`">
|
<VnTitle
|
||||||
{{ t('claim.summary.details') }}
|
:url="`#/claim/${entityId}/lines`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('claim.summary.details')"
|
||||||
</a>
|
/>
|
||||||
<QTable
|
<QTable
|
||||||
:columns="detailsColumns"
|
:columns="detailsColumns"
|
||||||
:rows="salesClaimed"
|
:rows="salesClaimed"
|
||||||
|
@ -271,7 +272,7 @@ function openDialog(dmsId) {
|
||||||
>
|
>
|
||||||
<ItemDescriptorProxy
|
<ItemDescriptorProxy
|
||||||
v-if="col.name == 'description'"
|
v-if="col.name == 'description'"
|
||||||
:id="props.row.id"
|
:id="props.row.sale.itemFk"
|
||||||
:sale-fk="props.row.saleFk"
|
:sale-fk="props.row.saleFk"
|
||||||
></ItemDescriptorProxy>
|
></ItemDescriptorProxy>
|
||||||
</QTh>
|
</QTh>
|
||||||
|
@ -280,11 +281,10 @@ function openDialog(dmsId) {
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-two" v-if="developments.length > 0">
|
<QCard class="vn-two" v-if="developments.length > 0">
|
||||||
<a class="header header-link" :href="claimUrl + 'development'">
|
<VnTitle
|
||||||
{{ t('claim.summary.development') }}
|
:url="claimUrl + 'development'"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('claim.summary.development')"
|
||||||
</a>
|
/>
|
||||||
|
|
||||||
<QTable
|
<QTable
|
||||||
:columns="developmentColumns"
|
:columns="developmentColumns"
|
||||||
:rows="developments"
|
:rows="developments"
|
||||||
|
@ -303,10 +303,10 @@ function openDialog(dmsId) {
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max" v-if="claimDms.length > 0">
|
<QCard class="vn-max" v-if="claimDms.length > 0">
|
||||||
<a class="header header-link" :href="`#/claim/${entityId}/photos`">
|
<VnTitle
|
||||||
{{ t('claim.summary.photos') }}
|
:url="`#/claim/${entityId}/photos`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('claim.summary.photos')"
|
||||||
</a>
|
/>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div
|
<div
|
||||||
class="multimedia-container"
|
class="multimedia-container"
|
||||||
|
@ -346,10 +346,7 @@ function openDialog(dmsId) {
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-max">
|
||||||
<a class="header header-link" :href="claimUrl + 'action'">
|
<VnTitle :url="claimUrl + 'action'" :text="t('claim.summary.actions')" />
|
||||||
{{ t('claim.summary.actions') }}
|
|
||||||
<QIcon name="open_in_new" class="link" />
|
|
||||||
</a>
|
|
||||||
<div id="slider-container" class="q-px-xl q-py-md">
|
<div id="slider-container" class="q-px-xl q-py-md">
|
||||||
<QSlider
|
<QSlider
|
||||||
v-model="claim.responsibility"
|
v-model="claim.responsibility"
|
||||||
|
|
|
@ -108,7 +108,11 @@ function navigate(event, id) {
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('claim.list.state')">
|
<VnLv :label="t('claim.list.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge :color="stateColor(row.stateCode)" dense>
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
|
:color="stateColor(row.stateCode)"
|
||||||
|
dense
|
||||||
|
>
|
||||||
{{ row.stateDescription }}
|
{{ row.stateDescription }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
@ -118,7 +122,6 @@ function navigate(event, id) {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('globals.description')"
|
:label="t('globals.description')"
|
||||||
@click.stop
|
@click.stop
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
style="margin-top: 15px"
|
style="margin-top: 15px"
|
||||||
>
|
>
|
||||||
|
|
|
@ -11,8 +11,8 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
const workers = ref([]);
|
const workers = ref([]);
|
||||||
const workersCopy = ref([]);
|
const workersCopy = ref([]);
|
||||||
|
|
|
@ -150,14 +150,14 @@ const toCustomerConsigneeEdit = (consigneeId) => {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.consignees-card {
|
.consignees-card {
|
||||||
border: 2px solid var(--vn-light-gray);
|
border: 2px solid var(--vn-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--vn-light-gray);
|
background-color: var(--vn-accent-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -180,13 +180,13 @@ const toCustomerGreugeCreate = () => {
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.consignees-card {
|
.consignees-card {
|
||||||
border: 2px solid var(--vn-light-gray);
|
border: 2px solid var(--vn-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-color {
|
.label-color {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -85,12 +85,12 @@ const toCustomerNoteCreate = () => {
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.custom-border {
|
.custom-border {
|
||||||
border: 2px solid var(--vn-light-gray);
|
border: 2px solid var(--vn-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-color {
|
.label-color {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -137,13 +137,13 @@ const toCustomerRecoverieCreate = () => {
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.consignees-card {
|
.consignees-card {
|
||||||
border: 2px solid var(--vn-light-gray);
|
border: 2px solid var(--vn-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-color {
|
.label-color {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -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 VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -62,10 +63,10 @@ const creditWarning = computed(() => {
|
||||||
<CardSummary ref="summary" :url="`Clients/${entityId}/summary`">
|
<CardSummary ref="summary" :url="`Clients/${entityId}/summary`">
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link" :href="`#/customer/${entityId}/basic-data`">
|
<VnTitle
|
||||||
{{ t('customer.summary.basicData') }}
|
:url="`#/customer/${entityId}/basic-data`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('customer.summary.basicData')"
|
||||||
</a>
|
/>
|
||||||
<VnLv :label="t('customer.summary.customerId')" :value="entity.id" />
|
<VnLv :label="t('customer.summary.customerId')" :value="entity.id" />
|
||||||
<VnLv :label="t('customer.summary.name')" :value="entity.name" />
|
<VnLv :label="t('customer.summary.name')" :value="entity.name" />
|
||||||
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
|
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
|
||||||
|
@ -96,13 +97,10 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/customer/${entityId}/fiscal-data`"
|
||||||
:href="`#/customer/${entityId}/fiscal-data`"
|
:text="t('customer.summary.fiscalAddress')"
|
||||||
>
|
/>
|
||||||
{{ t('customer.summary.fiscalAddress') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.socialName')"
|
:label="t('customer.summary.socialName')"
|
||||||
:value="entity.socialName"
|
:value="entity.socialName"
|
||||||
|
@ -124,14 +122,10 @@ const creditWarning = computed(() => {
|
||||||
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
<VnLv :label="t('customer.summary.street')" :value="entity.street" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/customer/${entityId}/fiscal-data`"
|
||||||
:href="`#/customer/${entityId}/fiscal-data`"
|
:text="t('customer.summary.fiscalData')"
|
||||||
link
|
/>
|
||||||
>
|
|
||||||
{{ t('customer.summary.fiscalData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('customer.summary.isEqualizated')"
|
:label="t('customer.summary.isEqualizated')"
|
||||||
v-model="entity.isEqualizated"
|
v-model="entity.isEqualizated"
|
||||||
|
@ -169,14 +163,10 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/customer/${entityId}/billing-data`"
|
||||||
:href="`#/customer/${entityId}/billing-data`"
|
:text="t('customer.summary.billingData')"
|
||||||
link
|
/>
|
||||||
>
|
|
||||||
{{ t('customer.summary.billingData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.payMethod')"
|
:label="t('customer.summary.payMethod')"
|
||||||
:value="entity.payMethod.name"
|
:value="entity.payMethod.name"
|
||||||
|
@ -202,14 +192,10 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.defaultAddress">
|
<QCard class="vn-one" v-if="entity.defaultAddress">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/customer/${entityId}/consignees`"
|
||||||
:href="`#/customer/${entityId}/consignees`"
|
:text="t('customer.summary.consignee')"
|
||||||
link
|
/>
|
||||||
>
|
|
||||||
{{ t('customer.summary.consignee') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.addressName')"
|
:label="t('customer.summary.addressName')"
|
||||||
:value="entity.defaultAddress.nickname"
|
:value="entity.defaultAddress.nickname"
|
||||||
|
@ -224,10 +210,10 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.account">
|
<QCard class="vn-one" v-if="entity.account">
|
||||||
<a class="header header-link" :href="`#/customer/${entityId}/web-access`">
|
<VnTitle
|
||||||
{{ t('customer.summary.webAccess') }}
|
:url="`#/customer/${entityId}/web-access`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('customer.summary.webAccess')"
|
||||||
</a>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.username')"
|
:label="t('customer.summary.username')"
|
||||||
:value="entity.account.name"
|
:value="entity.account.name"
|
||||||
|
@ -239,9 +225,7 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.account">
|
<QCard class="vn-one" v-if="entity.account">
|
||||||
<div class="header header-link">
|
<VnTitle :text="t('customer.summary.businessData')" />
|
||||||
{{ t('customer.summary.businessData') }}
|
|
||||||
</div>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.totalGreuge')"
|
:label="t('customer.summary.totalGreuge')"
|
||||||
:value="toCurrency(entity.totalGreuge)"
|
:value="toCurrency(entity.totalGreuge)"
|
||||||
|
@ -266,14 +250,11 @@ const creditWarning = computed(() => {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.account">
|
<QCard class="vn-one" v-if="entity.account">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
||||||
:href="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
:text="t('customer.summary.financialData')"
|
||||||
link
|
icon="vn:grafana"
|
||||||
>
|
/>
|
||||||
{{ t('customer.summary.financialData') }}
|
|
||||||
<QIcon name="vn:grafana" />
|
|
||||||
</a>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.risk')"
|
:label="t('customer.summary.risk')"
|
||||||
:value="toCurrency(entity?.debt?.debt)"
|
:value="toCurrency(entity?.debt?.debt)"
|
||||||
|
|
|
@ -84,7 +84,6 @@ const redirectToCreateView = () => {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openCard')"
|
:label="t('components.smartCard.openCard')"
|
||||||
@click.stop="navigate(row.id)"
|
@click.stop="navigate(row.id)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -30,16 +30,16 @@ const { t } = useI18n();
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
}
|
}
|
||||||
.title_balance {
|
.title_balance {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.key_balance {
|
.key_balance {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.value_balance {
|
.value_balance {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -207,7 +207,7 @@ const refreshData = () => {
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
|
|
||||||
<VnSubToolbar class="bg-vn-dark">
|
<VnSubToolbar>
|
||||||
<template #st-data>
|
<template #st-data>
|
||||||
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
<CustomerBalanceDueTotal :amount="balanceDueTotal" />
|
||||||
<div class="flex items-center q-ml-lg">
|
<div class="flex items-center q-ml-lg">
|
||||||
|
|
|
@ -196,7 +196,7 @@ function stateColor(row) {
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-state="{ row }">
|
<template #body-cell-state="{ row }">
|
||||||
<QTd auto-width class="text-center">
|
<QTd auto-width class="text-center">
|
||||||
<QBadge :color="stateColor(row)">
|
<QBadge text-color="black" :color="stateColor(row)">
|
||||||
{{
|
{{
|
||||||
row.isConfirmed
|
row.isConfirmed
|
||||||
? t('Confirmed')
|
? t('Confirmed')
|
||||||
|
@ -227,6 +227,7 @@ function stateColor(row) {
|
||||||
v-if="col.name == 'state'"
|
v-if="col.name == 'state'"
|
||||||
>
|
>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
:color="
|
:color="
|
||||||
stateColor(row)
|
stateColor(row)
|
||||||
"
|
"
|
||||||
|
|
|
@ -21,7 +21,7 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
|
||||||
:width="256"
|
:width="256"
|
||||||
:breakpoint="1000"
|
:breakpoint="1000"
|
||||||
>
|
>
|
||||||
<QScrollArea class="fit text-grey-8">
|
<QScrollArea class="fit">
|
||||||
<LeftMenu />
|
<LeftMenu />
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
|
@ -67,6 +67,10 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.left-menu {
|
||||||
|
color: var(--vn-font-color);
|
||||||
|
}
|
||||||
|
|
||||||
.flex-container {
|
.flex-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -36,13 +37,10 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: department }">
|
<template #body="{ entity: department }">
|
||||||
<QCard class="column">
|
<QCard class="column">
|
||||||
<a
|
<VnTitle
|
||||||
class="header header-link"
|
:url="`#/department/department/${entityId}/basic-data`"
|
||||||
:href="`#/department/department/${entityId}/basic-data`"
|
:text="t('Basic data')"
|
||||||
>
|
/>
|
||||||
{{ t('Basic data') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<div class="full-width row wrap justify-between content-between">
|
<div class="full-width row wrap justify-between content-between">
|
||||||
<div class="column" style="min-width: 50%">
|
<div class="column" style="min-width: 50%">
|
||||||
<VnLv
|
<VnLv
|
||||||
|
|
|
@ -471,6 +471,9 @@ const lockIconType = (groupingMode, mode) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.separation-row {
|
||||||
|
background-color: var(--vn-section-color) !important;
|
||||||
|
}
|
||||||
.grid-style-transition {
|
.grid-style-transition {
|
||||||
transition: transform 0.28s, background-color 0.28s;
|
transition: transform 0.28s, background-color 0.28s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,8 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
|
||||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
import { toDate, toCurrency } from 'src/filters';
|
import { toDate, toCurrency } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
@ -354,6 +353,12 @@ const fetchEntryBuys = async () => {
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.separation-row {
|
||||||
|
background-color: var(--vn-section-color) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Travel data: Datos envío
|
Travel data: Datos envío
|
||||||
|
|
|
@ -20,8 +20,8 @@ import { dashIfEmpty } from 'src/filters';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (intrastatOptions = data)"
|
@on-fetch="(data) => (intrastatOptions = data)"
|
||||||
/>
|
/>
|
||||||
<QToolbar class="bg-vn-dark justify-end">
|
<QToolbar class="justify-end">
|
||||||
<div id="st-data">
|
<div id="st-data">
|
||||||
<TableVisibleColumns
|
<TableVisibleColumns
|
||||||
:all-columns="allColumnNames"
|
:all-columns="allColumnNames"
|
||||||
|
|
|
@ -412,7 +412,7 @@ const removeTag = (index, params, search) => {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
background-color: var(--vn-light-gray);
|
background-color: var(--vn-accent-color);
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: $primary;
|
background-color: $primary;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { toCurrency, toDate } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
salixUrl.value = await getUrl('');
|
salixUrl.value = await getUrl('');
|
||||||
|
@ -209,10 +210,10 @@ function getLink(param) {
|
||||||
<!--Basic Data-->
|
<!--Basic Data-->
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a class="header header-link" :href="getLink('basic-data')">
|
<VnTitle
|
||||||
{{ t('invoiceIn.pageTitles.basicData') }}
|
:url="getLink('basic-data')"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('invoiceIn.pageTitles.basicData')"
|
||||||
</a>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.supplier')"
|
:label="t('invoiceIn.summary.supplier')"
|
||||||
|
@ -233,10 +234,10 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a class="header header-link" :href="getLink('basic-data')">
|
<VnTitle
|
||||||
{{ t('invoiceIn.pageTitles.basicData') }}
|
:url="getLink('basic-data')"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('invoiceIn.pageTitles.basicData')"
|
||||||
</a>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv
|
<VnLv
|
||||||
:ellipsis-value="false"
|
:ellipsis-value="false"
|
||||||
|
@ -258,10 +259,10 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a class="header header-link" :href="getLink('basic-data')">
|
<VnTitle
|
||||||
{{ t('invoiceIn.pageTitles.basicData') }}
|
:url="getLink('basic-data')"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('invoiceIn.pageTitles.basicData')"
|
||||||
</a>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.sage')"
|
:label="t('invoiceIn.summary.sage')"
|
||||||
|
@ -283,10 +284,10 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<a class="header header-link" :href="getLink('basic-data')">
|
<VnTitle
|
||||||
{{ t('invoiceIn.pageTitles.basicData') }}
|
:url="getLink('basic-data')"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('invoiceIn.pageTitles.basicData')"
|
||||||
</a>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pa-none">
|
<QCardSection class="q-pa-none">
|
||||||
<div class="bordered q-px-sm q-mx-auto">
|
<div class="bordered q-px-sm q-mx-auto">
|
||||||
|
@ -319,10 +320,7 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Vat-->
|
<!--Vat-->
|
||||||
<QCard v-if="invoiceIn.invoiceInTax.length">
|
<QCard v-if="invoiceIn.invoiceInTax.length">
|
||||||
<a class="header header-link" :href="getLink('vat')">
|
<VnTitle :url="getLink('vat')" :text="t('invoiceIn.card.vat')" />
|
||||||
{{ t('invoiceIn.card.vat') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QTable
|
<QTable
|
||||||
:columns="vatColumns"
|
:columns="vatColumns"
|
||||||
:rows="invoiceIn.invoiceInTax"
|
:rows="invoiceIn.invoiceInTax"
|
||||||
|
@ -352,10 +350,7 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Due Day-->
|
<!--Due Day-->
|
||||||
<QCard v-if="invoiceIn.invoiceInDueDay.length">
|
<QCard v-if="invoiceIn.invoiceInDueDay.length">
|
||||||
<a class="header header-link" :href="getLink('due-day')">
|
<VnTitle :url="getLink('due-day')" :text="t('invoiceIn.card.dueDay')" />
|
||||||
{{ t('invoiceIn.card.dueDay') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QTable
|
<QTable
|
||||||
class="full-width"
|
class="full-width"
|
||||||
:columns="dueDayColumns"
|
:columns="dueDayColumns"
|
||||||
|
@ -382,10 +377,10 @@ function getLink(param) {
|
||||||
</QCard>
|
</QCard>
|
||||||
<!--Intrastat-->
|
<!--Intrastat-->
|
||||||
<QCard v-if="invoiceIn.invoiceInIntrastat.length">
|
<QCard v-if="invoiceIn.invoiceInIntrastat.length">
|
||||||
<a class="header header-link" :href="getLink('intrastat')">
|
<VnTitle
|
||||||
{{ t('invoiceIn.card.intrastat') }}
|
:url="getLink('intrastat')"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('invoiceIn.card.intrastat')"
|
||||||
</a>
|
/>
|
||||||
<QTable
|
<QTable
|
||||||
:columns="intrastatColumns"
|
:columns="intrastatColumns"
|
||||||
:rows="invoiceIn.invoiceInIntrastat"
|
:rows="invoiceIn.invoiceInIntrastat"
|
||||||
|
@ -415,10 +410,10 @@ function getLink(param) {
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bg {
|
.bg {
|
||||||
background-color: var(--vn-light-gray);
|
background-color: var(--vn-accent-color);
|
||||||
}
|
}
|
||||||
.bordered {
|
.bordered {
|
||||||
border: 1px solid var(--vn-text);
|
border: 1px solid var(--vn-text-color);
|
||||||
max-width: 18em;
|
max-width: 18em;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -112,7 +112,6 @@ function navigate(id) {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openCard')"
|
:label="t('components.smartCard.openCard')"
|
||||||
@click.stop="navigate(row.id)"
|
@click.stop="navigate(row.id)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
type="reset"
|
type="reset"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -2,13 +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, toDate } from 'src/filters';
|
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
|
||||||
import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
|
import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
|
||||||
|
|
||||||
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
|
import { toCurrency, toDate } from 'src/filters';
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
@ -23,7 +25,6 @@ const { t } = useI18n();
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
const descriptor = ref();
|
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -42,6 +43,8 @@ const filter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const descriptor = ref();
|
||||||
|
|
||||||
function ticketFilter(invoice) {
|
function ticketFilter(invoice) {
|
||||||
return JSON.stringify({ refFk: invoice.ref });
|
return JSON.stringify({ refFk: invoice.ref });
|
||||||
}
|
}
|
||||||
|
@ -61,7 +64,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
data-key="invoiceOutData"
|
data-key="invoiceOutData"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
<InvoiceOutDescriptorMenu :invoice-out="entity" />
|
<InvoiceOutDescriptorMenu :invoice-out-data="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
<VnLv :label="t('invoiceOut.card.issued')" :value="toDate(entity.issued)" />
|
||||||
|
|
|
@ -1,40 +1,260 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
import TransferInvoiceForm from 'src/components/TransferInvoiceForm.vue';
|
||||||
|
import SendEmailDialog from 'components/common/SendEmailDialog.vue';
|
||||||
|
|
||||||
|
import useNotify from 'src/composables/useNotify';
|
||||||
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
import { usePrintService } from 'composables/usePrintService';
|
||||||
|
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
const $props = defineProps({
|
||||||
|
invoiceOutData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { notify } = useNotify();
|
||||||
|
const router = useRouter();
|
||||||
|
const session = useSession();
|
||||||
|
const token = session.getToken();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { openReport, sendEmail } = usePrintService();
|
||||||
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
|
const quasar = useQuasar();
|
||||||
|
|
||||||
|
const transferInvoiceDialogRef = ref();
|
||||||
|
const invoiceFormType = ref('pdf');
|
||||||
|
const defaultEmailAddress = ref($props.invoiceOutData.client?.email);
|
||||||
|
|
||||||
|
const showInvoicePdf = () => {
|
||||||
|
const url = `api/InvoiceOuts/${$props.invoiceOutData.id}/download?access_token=${token}`;
|
||||||
|
window.open(url, '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
|
const showInvoiceCsv = () => {
|
||||||
|
openReport(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-csv`, {
|
||||||
|
recipientId: $props.invoiceOutData.client.id,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const showSendInvoiceDialog = (type) => {
|
||||||
|
invoiceFormType.value = type;
|
||||||
|
quasar.dialog({
|
||||||
|
component: SendEmailDialog,
|
||||||
|
componentProps: {
|
||||||
|
data: {
|
||||||
|
address: defaultEmailAddress.value,
|
||||||
|
},
|
||||||
|
promise: sendEmailInvoice,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const sendEmailInvoice = async ({ address }) => {
|
||||||
|
try {
|
||||||
|
if (!address) notify(`The email can't be empty`, 'negative');
|
||||||
|
|
||||||
|
if (invoiceFormType.value === 'pdf') {
|
||||||
|
return sendEmail(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-email`, {
|
||||||
|
recipientId: $props.invoiceOutData.client.id,
|
||||||
|
recipient: address,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return sendEmail(
|
||||||
|
`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-csv-email`,
|
||||||
|
{
|
||||||
|
recipientId: $props.invoiceOutData.client.id,
|
||||||
|
recipient: address,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error sending email', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const redirectToInvoiceOutList = () => {
|
||||||
|
router.push({ name: 'InvoiceOutList' });
|
||||||
|
};
|
||||||
|
|
||||||
|
const deleteInvoice = async () => {
|
||||||
|
try {
|
||||||
|
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/delete`);
|
||||||
|
notify(t('InvoiceOut deleted'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error deleting invoice out', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const bookInvoice = async () => {
|
||||||
|
try {
|
||||||
|
await axios.post(`InvoiceOuts/${$props.invoiceOutData.ref}/book`);
|
||||||
|
notify(t('InvoiceOut booked'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error booking invoice out', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const generateInvoicePdf = async () => {
|
||||||
|
try {
|
||||||
|
await axios.post(`InvoiceOuts/${$props.invoiceOutData.id}/createPdf`);
|
||||||
|
notify(t('The invoice PDF document has been regenerated'), 'positive');
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error generating invoice out pdf', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const refundInvoice = async (withWarehouse) => {
|
||||||
|
try {
|
||||||
|
const params = { ref: $props.invoiceOutData.ref, withWarehouse: withWarehouse };
|
||||||
|
const { data } = await axios.post('InvoiceOuts/refund', params);
|
||||||
|
notify(
|
||||||
|
t('refundInvoiceSuccessMessage', {
|
||||||
|
refundTicket: data[0].id,
|
||||||
|
}),
|
||||||
|
'positive'
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error generating invoice out pdf', err);
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable @click="transferInvoiceDialogRef.show()">
|
||||||
<QItemSection>{{ t('Transfer invoice to') }}</QItemSection>
|
<QItemSection>{{ t('Transfer invoice to...') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection>{{ t('See invoice') }}</QItemSection>
|
<QItemSection>{{ t('Show invoice...') }}</QItemSection>
|
||||||
|
<QItemSection side>
|
||||||
|
<QIcon name="keyboard_arrow_right" />
|
||||||
|
</QItemSection>
|
||||||
|
<QMenu anchor="top end" self="top start">
|
||||||
|
<QList>
|
||||||
|
<QItem v-ripple clickable @click="showInvoicePdf()">
|
||||||
|
<QItemSection>{{ t('As PDF') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem v-ripple clickable @click="showInvoiceCsv()">
|
||||||
|
<QItemSection>{{ t('As CSV') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</QList>
|
||||||
|
</QMenu>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection>{{ t('Send invoice') }}</QItemSection>
|
<QItemSection>{{ t('Send invoice...') }}</QItemSection>
|
||||||
|
<QItemSection side>
|
||||||
|
<QIcon name="keyboard_arrow_right" />
|
||||||
|
</QItemSection>
|
||||||
|
<QMenu anchor="top end" self="top start">
|
||||||
|
<QList>
|
||||||
|
<QItem v-ripple clickable @click="showSendInvoiceDialog('pdf')">
|
||||||
|
<QItemSection>{{ t('Send PDF') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable @click="showSendInvoiceDialog('csv')">
|
||||||
|
<QItemSection>{{ t('Send CSV') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</QList>
|
||||||
|
</QMenu>
|
||||||
|
</QItem>
|
||||||
|
<QItem
|
||||||
|
v-ripple
|
||||||
|
clickable
|
||||||
|
@click="
|
||||||
|
openConfirmationModal(
|
||||||
|
t('Confirm deletion'),
|
||||||
|
t('Are you sure you want to delete this invoice?'),
|
||||||
|
deleteInvoice,
|
||||||
|
redirectToInvoiceOutList
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
<QItemSection>{{ t('Delete invoice') }}</QItemSection>
|
<QItemSection>{{ t('Delete invoice') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem
|
||||||
<QItemSection>{{ t('Post invoice') }}</QItemSection>
|
v-ripple
|
||||||
|
clickable
|
||||||
|
@click="
|
||||||
|
openConfirmationModal(
|
||||||
|
'',
|
||||||
|
t('Are you sure you want to book this invoice?'),
|
||||||
|
bookInvoice
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<QItemSection>{{ t('Book invoice') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem
|
||||||
|
v-ripple
|
||||||
|
clickable
|
||||||
|
@click="
|
||||||
|
openConfirmationModal(
|
||||||
|
t('Generate PDF invoice document'),
|
||||||
|
t('Are you sure you want to generate/regenerate the PDF invoice?'),
|
||||||
|
generateInvoicePdf
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<QItemSection>{{ t('Generate PDF invoice') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable>
|
||||||
<QItemSection>{{ t('Regenerate invoice PDF') }}</QItemSection>
|
<QItemSection>{{ t('Refund...') }}</QItemSection>
|
||||||
|
<QItemSection side>
|
||||||
|
<QIcon name="keyboard_arrow_right" />
|
||||||
|
</QItemSection>
|
||||||
|
<QMenu anchor="top end" self="top start">
|
||||||
|
<QList>
|
||||||
|
<QItem v-ripple clickable @click="refundInvoice(true)">
|
||||||
|
<QItemSection>{{ t('With warehouse') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable>
|
<QItem v-ripple clickable @click="refundInvoice(false)">
|
||||||
<QItemSection>{{ t('Pass') }}</QItemSection>
|
<QItemSection>{{ t('Without warehouse') }}</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
</QList>
|
||||||
|
</QMenu>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('Create a single ticket with all the content of the current invoice') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QItem>
|
||||||
|
|
||||||
|
<QDialog ref="transferInvoiceDialogRef">
|
||||||
|
<TransferInvoiceForm :invoice-out-data="invoiceOutData" />
|
||||||
|
</QDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Transfer invoice to: Transferir factura a
|
Transfer invoice to...: Transferir factura a...
|
||||||
See invoice: Ver factura
|
Show invoice...: Ver factura...
|
||||||
Send invoice: Enviar factura
|
Send invoice...: Enviar factura...
|
||||||
Delete invoice: Eliminar factura
|
Delete invoice: Eliminar factura
|
||||||
Post invoice: Asentar factura
|
Book invoice: Asentar factura
|
||||||
Regenerate invoice PDF: Regenerar PDF factura
|
Generate PDF invoice: Generar PDF factura
|
||||||
Pass: Abono
|
Refund...: Abono
|
||||||
|
As PDF: como PDF
|
||||||
|
As CSV: como CSV
|
||||||
|
Send PDF: Enviar PDF
|
||||||
|
Send CSV: Enviar CSV
|
||||||
|
With warehouse: Con almacén
|
||||||
|
Without warehouse: Sin almacén
|
||||||
|
InvoiceOut deleted: Factura eliminada
|
||||||
|
Confirm deletion: Confirmar eliminación
|
||||||
|
Are you sure you want to delete this invoice?: Estas seguro de eliminar esta factura?
|
||||||
|
Are you sure you want to book this invoice?: Estas seguro de querer asentar esta factura?
|
||||||
|
InvoiceOut booked: Factura asentada
|
||||||
|
Generate PDF invoice document: Generar PDF de la factura
|
||||||
|
Are you sure you want to generate/regenerate the PDF invoice?: ¿Seguro que quieres generar/regenerar el PDF de la factura?
|
||||||
|
The invoice PDF document has been regenerated: El documento PDF de la factura ha sido regenerado
|
||||||
|
Create a single ticket with all the content of the current invoice: Crear un ticket único con todo el contenido de la factura actual
|
||||||
|
refundInvoiceSuccessMessage: Se ha creado el siguiente ticket de abono {refundTicket}
|
||||||
|
The email can't be empty: El email no puede estar vacío
|
||||||
|
|
||||||
|
en:
|
||||||
|
refundInvoiceSuccessMessage: The following refund ticket have been created {refundTicket}
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -7,6 +7,9 @@ import { toCurrency, toDate } from 'src/filters';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
fetch();
|
fetch();
|
||||||
|
@ -67,29 +70,33 @@ const taxColumns = ref([
|
||||||
const ticketsColumns = ref([
|
const ticketsColumns = ref([
|
||||||
{
|
{
|
||||||
name: 'item',
|
name: 'item',
|
||||||
label: 'invoiceOut.summary.ticketId',
|
label: t('invoiceOut.summary.ticketId'),
|
||||||
field: (row) => row.id,
|
field: (row) => row.id,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: 'invoiceOut.summary.nickname',
|
label: t('invoiceOut.summary.nickname'),
|
||||||
field: (row) => row.nickname,
|
field: (row) => row.nickname,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
label: 'invoiceOut.summary.shipped',
|
label: t('invoiceOut.summary.shipped'),
|
||||||
field: (row) => row.shipped,
|
field: (row) => row.shipped,
|
||||||
format: (value) => toDate(value),
|
format: (value) => toDate(value),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
label: 'invoiceOut.summary.totalWithVat',
|
label: t('invoiceOut.summary.totalWithVat'),
|
||||||
field: (row) => row.totalWithVat,
|
field: (row) => row.totalWithVat,
|
||||||
format: (value) => toCurrency(value),
|
format: (value) => toCurrency(value),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
align: 'left',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
@ -105,10 +112,7 @@ const ticketsColumns = ref([
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: { invoiceOut } }">
|
<template #body="{ entity: { invoiceOut } }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link">
|
<VnTitle :text="t('invoiceOut.pageTitles.basicData')" />
|
||||||
{{ t('invoiceOut.pageTitles.basicData') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.summary.issued')"
|
:label="t('invoiceOut.summary.issued')"
|
||||||
:value="toDate(invoiceOut.issued)"
|
:value="toDate(invoiceOut.issued)"
|
||||||
|
@ -131,10 +135,7 @@ const ticketsColumns = ref([
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-three">
|
<QCard class="vn-three">
|
||||||
<a class="header header-link">
|
<VnTitle :text="t('invoiceOut.summary.taxBreakdown')" />
|
||||||
{{ t('invoiceOut.summary.taxBreakdown') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QTable :columns="taxColumns" :rows="invoiceOut.taxesBreakdown" flat>
|
<QTable :columns="taxColumns" :rows="invoiceOut.taxesBreakdown" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr :props="props">
|
<QTr :props="props">
|
||||||
|
@ -146,17 +147,23 @@ const ticketsColumns = ref([
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-three">
|
<QCard class="vn-three">
|
||||||
<a class="header header-link">
|
<VnTitle :text="t('invoiceOut.summary.tickets')" />
|
||||||
{{ t('invoiceOut.summary.tickets') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat>
|
<QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat>
|
||||||
<template #header="props">
|
<template #body-cell-item="{ value }">
|
||||||
<QTr :props="props">
|
<QTd>
|
||||||
<QTh v-for="col in props.cols" :key="col.name" :props="props">
|
<QBtn flat color="primary">
|
||||||
{{ t(col.label) }}
|
{{ value }}
|
||||||
</QTh>
|
<TicketDescriptorProxy :id="value" />
|
||||||
</QTr>
|
</QBtn>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-quantity="{ value, row }">
|
||||||
|
<QTd>
|
||||||
|
<QBtn flat color="primary" dense>
|
||||||
|
{{ value }}
|
||||||
|
<CustomerDescriptorProxy :id="row.id" />
|
||||||
|
</QBtn>
|
||||||
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
|
|
@ -21,6 +21,7 @@ const {
|
||||||
nPdfs,
|
nPdfs,
|
||||||
totalPdfs,
|
totalPdfs,
|
||||||
errors,
|
errors,
|
||||||
|
addresses,
|
||||||
} = storeToRefs(invoiceOutGlobalStore);
|
} = storeToRefs(invoiceOutGlobalStore);
|
||||||
|
|
||||||
const selectedCustomerId = ref(null);
|
const selectedCustomerId = ref(null);
|
||||||
|
@ -86,6 +87,14 @@ const selectCustomerId = (id) => {
|
||||||
selectedCustomerId.value = id;
|
selectedCustomerId.value = id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const statusText = computed(() => {
|
||||||
|
return status.value === 'invoicing'
|
||||||
|
? `${t(`status.${status.value}`)} ${
|
||||||
|
addresses.value[getAddressNumber.value]?.clientId
|
||||||
|
}`
|
||||||
|
: t(`status.${status.value}`);
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(() => (stateStore.rightDrawer = true));
|
onMounted(() => (stateStore.rightDrawer = true));
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
stateStore.rightDrawer = false;
|
stateStore.rightDrawer = false;
|
||||||
|
@ -103,7 +112,7 @@ onUnmounted(() => {
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<QCard v-if="status" class="card">
|
<QCard v-if="status" class="card">
|
||||||
<QCardSection class="card-section">
|
<QCardSection class="card-section">
|
||||||
<span class="text">{{ t(`status.${status}`) }}</span>
|
<span class="text">{{ statusText }}</span>
|
||||||
<span class="text">{{
|
<span class="text">{{
|
||||||
t('invoiceOut.globalInvoices.statusCard.percentageText', {
|
t('invoiceOut.globalInvoices.statusCard.percentageText', {
|
||||||
getPercentage: getPercentage,
|
getPercentage: getPercentage,
|
||||||
|
@ -156,7 +165,7 @@ onUnmounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--vn-dark);
|
background-color: var(--vn-section-color);
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|
||||||
.card-section {
|
.card-section {
|
||||||
|
@ -167,7 +176,7 @@ onUnmounted(() => {
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,8 @@ const { t } = useI18n();
|
||||||
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
|
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
|
||||||
|
|
||||||
// invoiceOutGlobalStore state and getters
|
// invoiceOutGlobalStore state and getters
|
||||||
const {
|
const { initialDataLoading, formInitialData, invoicing, status } =
|
||||||
initialDataLoading,
|
storeToRefs(invoiceOutGlobalStore);
|
||||||
formInitialData,
|
|
||||||
|
|
||||||
invoicing,
|
|
||||||
status,
|
|
||||||
} = storeToRefs(invoiceOutGlobalStore);
|
|
||||||
|
|
||||||
// invoiceOutGlobalStore actions
|
// invoiceOutGlobalStore actions
|
||||||
const { makeInvoice, setStatusValue } = invoiceOutGlobalStore;
|
const { makeInvoice, setStatusValue } = invoiceOutGlobalStore;
|
||||||
|
@ -32,13 +27,7 @@ const printersOptions = ref([]);
|
||||||
|
|
||||||
const clientsOptions = ref([]);
|
const clientsOptions = ref([]);
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({});
|
||||||
companyFk: null,
|
|
||||||
invoiceDate: null,
|
|
||||||
maxShipped: null,
|
|
||||||
clientId: null,
|
|
||||||
printer: null,
|
|
||||||
});
|
|
||||||
|
|
||||||
const optionsInitialData = computed(() => {
|
const optionsInitialData = computed(() => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,25 +2,32 @@
|
||||||
import { onMounted, onUnmounted, ref } from 'vue';
|
import { onMounted, onUnmounted, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { exportFile, useQuasar } from 'quasar';
|
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
||||||
import { toDate, toCurrency } from 'src/filters/index';
|
|
||||||
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
||||||
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import CardList from 'src/components/ui/CardList.vue';
|
import CardList from 'src/components/ui/CardList.vue';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
|
import CreateManualInvoiceForm from 'src/components/CreateManualInvoiceForm.vue';
|
||||||
|
|
||||||
|
import InvoiceOutFilter from './InvoiceOutFilter.vue';
|
||||||
|
import { toDate, toCurrency } from 'src/filters/index';
|
||||||
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
|
import { useSession } from 'src/composables/useSession';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const selectedCards = ref(new Map());
|
|
||||||
const quasar = useQuasar();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
const session = useSession();
|
||||||
|
const token = session.getToken();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
|
|
||||||
|
const manualInvoiceDialogRef = ref(null);
|
||||||
|
const selectedCards = ref(new Map());
|
||||||
|
|
||||||
onMounted(() => (stateStore.rightDrawer = true));
|
onMounted(() => (stateStore.rightDrawer = true));
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
|
|
||||||
|
@ -52,36 +59,36 @@ const toggleAllCards = (cardsData) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadCsv = () => {
|
const openPdf = () => {
|
||||||
|
try {
|
||||||
if (selectedCards.value.size === 0) return;
|
if (selectedCards.value.size === 0) return;
|
||||||
const selectedCardsArray = Array.from(selectedCards.value.values());
|
const selectedCardsArray = Array.from(selectedCards.value.values());
|
||||||
let file;
|
|
||||||
for (var i = 0; i < selectedCardsArray.length; i++) {
|
if (selectedCards.value.size === 1) {
|
||||||
if (i == 0) file += Object.keys(selectedCardsArray[i]).join(';') + '\n';
|
const [invoiceOut] = selectedCardsArray;
|
||||||
file +=
|
const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${token}`;
|
||||||
Object.keys(selectedCardsArray[i])
|
window.open(url, '_blank');
|
||||||
.map(function (key) {
|
|
||||||
return selectedCardsArray[i][key];
|
|
||||||
})
|
|
||||||
.join(';') + '\n';
|
|
||||||
}
|
|
||||||
const status = exportFile('file.csv', file, {
|
|
||||||
encoding: 'windows-1252',
|
|
||||||
mimeType: 'text/csv;charset=windows-1252;',
|
|
||||||
});
|
|
||||||
if (status === true) {
|
|
||||||
quasar.notify({
|
|
||||||
message: t('fileAllowed'),
|
|
||||||
color: 'positive',
|
|
||||||
icon: 'check',
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
quasar.notify({
|
const invoiceOutIdsArray = selectedCardsArray.map(
|
||||||
message: t('fileDenied'),
|
(invoiceOut) => invoiceOut.id
|
||||||
color: 'negative',
|
);
|
||||||
icon: 'warning',
|
const invoiceOutIds = invoiceOutIdsArray.join(',');
|
||||||
|
|
||||||
|
const params = new URLSearchParams({
|
||||||
|
access_token: token,
|
||||||
|
ids: invoiceOutIds,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const url = `api/InvoiceOuts/downloadZip?${params}`;
|
||||||
|
window.open(url, '_blank');
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Error opening PDF');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const openCreateInvoiceModal = () => {
|
||||||
|
manualInvoiceDialogRef.value.show();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -119,52 +126,21 @@ const downloadCsv = () => {
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
auto-load
|
auto-load
|
||||||
data-key="InvoiceOutList"
|
data-key="InvoiceOutList"
|
||||||
order="issued DESC, id DESC"
|
:order="['issued DESC', 'id DESC']"
|
||||||
url="InvoiceOuts/filter"
|
url="InvoiceOuts/filter"
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<VnSubToolbar class="bg-vn-dark justify-end">
|
<VnSubToolbar class="justify-end">
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
@click="downloadCsv()"
|
@click="openPdf()"
|
||||||
class="q-mr-xl"
|
class="q-mr-md"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
icon="cloud_download"
|
||||||
:disable="selectedCards.size === 0"
|
:disable="selectedCards.size === 0"
|
||||||
:label="t('globals.download')"
|
|
||||||
/>
|
|
||||||
<!-- <QBtnDropdown
|
|
||||||
class="q-mr-xl"
|
|
||||||
color="primary"
|
|
||||||
:disable="!manageCheckboxes && arrayElements.length < 1"
|
|
||||||
:label="t('globals.download')"
|
|
||||||
v-else
|
|
||||||
>
|
>
|
||||||
<QList>
|
<QTooltip>{{ t('downloadPdf') }}</QTooltip>
|
||||||
<QItem clickable v-close-popup @click="downloadCsv(rows)">
|
</QBtn>
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>
|
|
||||||
{{
|
|
||||||
t('globals.allRows', {
|
|
||||||
numberRows: rows.length,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
|
|
||||||
<QItem clickable v-close-popup @click="downloadCsv(rows)">
|
|
||||||
<QItemSection>
|
|
||||||
<QItemLabel>
|
|
||||||
{{
|
|
||||||
t('globals.selectRows', {
|
|
||||||
numberRows: rows.length,
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
</QItemLabel>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
</QList>
|
|
||||||
</QBtnDropdown> -->
|
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
left-label
|
left-label
|
||||||
:label="t('globals.markAll')"
|
:label="t('globals.markAll')"
|
||||||
|
@ -189,18 +165,23 @@ const downloadCsv = () => {
|
||||||
>
|
>
|
||||||
<template #list-items>
|
<template #list-items>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.list.shortIssued')"
|
:label="t('invoiceOut.list.issued')"
|
||||||
:title-label="t('invoiceOut.list.issued')"
|
|
||||||
:value="toDate(row.issued)"
|
:value="toDate(row.issued)"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.list.amount')"
|
:label="t('invoiceOut.list.amount')"
|
||||||
:value="toCurrency(row.amount)"
|
:value="toCurrency(row.amount)"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv :label="t('invoiceOut.list.client')">
|
||||||
:label="t('invoiceOut.list.client')"
|
<template #value>
|
||||||
:value="row.clientSocialName"
|
<span class="link" @click.stop>
|
||||||
|
{{ row?.clientSocialName }}
|
||||||
|
<CustomerDescriptorProxy
|
||||||
|
:id="row?.clientFk"
|
||||||
/>
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</VnLv>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceOut.list.shortCreated')"
|
:label="t('invoiceOut.list.shortCreated')"
|
||||||
:title-label="t('invoiceOut.list.created')"
|
:title-label="t('invoiceOut.list.created')"
|
||||||
|
@ -217,13 +198,6 @@ const downloadCsv = () => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<QBtn
|
|
||||||
:label="t('components.smartCard.openCard')"
|
|
||||||
@click.stop="navigate(row.id)"
|
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
|
||||||
type="reset"
|
|
||||||
/>
|
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openSummary')"
|
:label="t('components.smartCard.openSummary')"
|
||||||
@click.stop="viewSummary(row.id, InvoiceOutSummary)"
|
@click.stop="viewSummary(row.id, InvoiceOutSummary)"
|
||||||
|
@ -237,6 +211,20 @@ const downloadCsv = () => {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
|
<QPageSticky :offset="[20, 20]">
|
||||||
|
<QBtn fab icon="add" color="primary" @click="openCreateInvoiceModal()" />
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('createInvoice') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QPageSticky>
|
||||||
|
|
||||||
|
<QDialog
|
||||||
|
ref="manualInvoiceDialogRef"
|
||||||
|
transition-show="scale"
|
||||||
|
transition-hide="scale"
|
||||||
|
>
|
||||||
|
<CreateManualInvoiceForm />
|
||||||
|
</QDialog>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -246,9 +234,13 @@ en:
|
||||||
fileDenied: Browser denied file download...
|
fileDenied: Browser denied file download...
|
||||||
fileAllowed: Successful download of CSV file
|
fileAllowed: Successful download of CSV file
|
||||||
youCanSearchByInvoiceReference: You can search by invoice reference
|
youCanSearchByInvoiceReference: You can search by invoice reference
|
||||||
|
downloadPdf: Download PDF
|
||||||
|
createInvoice: Make invoice
|
||||||
es:
|
es:
|
||||||
searchInvoice: Buscar factura emitida
|
searchInvoice: Buscar factura emitida
|
||||||
fileDenied: El navegador denegó la descarga de archivos...
|
fileDenied: El navegador denegó la descarga de archivos...
|
||||||
fileAllowed: Descarga exitosa de archivo CSV
|
fileAllowed: Descarga exitosa de archivo CSV
|
||||||
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
|
||||||
|
downloadPdf: Descargar PDF
|
||||||
|
createInvoice: Crear factura
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onBeforeMount } from 'vue';
|
import { ref, computed, onBeforeMount, onMounted, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { QCheckbox, QBtn } from 'quasar';
|
|
||||||
|
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import InvoiceOutNegativeFilter from './InvoiceOutNegativeBasesFilter.vue';
|
import InvoiceOutNegativeFilter from './InvoiceOutNegativeBasesFilter.vue';
|
||||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||||
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
|
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency } from 'src/filters';
|
||||||
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
|
import { useInvoiceOutGlobalStore } from 'src/stores/invoiceOutGlobal.js';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useArrayData } from 'composables/useArrayData';
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|
||||||
|
|
||||||
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
|
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
|
@ -45,78 +45,16 @@ onBeforeMount(async () => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const componentIsRendered = ref(false);
|
||||||
|
|
||||||
|
onMounted(() =>
|
||||||
|
nextTick(() => {
|
||||||
|
componentIsRendered.value = true;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const rows = computed(() => arrayData.value.store.data);
|
const rows = computed(() => arrayData.value.store.data);
|
||||||
|
|
||||||
const selectedCustomerId = ref(0);
|
|
||||||
const selectedWorkerId = ref(0);
|
|
||||||
|
|
||||||
const tableColumnComponents = {
|
|
||||||
company: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
country: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
clientId: {
|
|
||||||
component: QBtn,
|
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
|
||||||
event: (prop) => selectCustomerId(prop.value),
|
|
||||||
},
|
|
||||||
client: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
amount: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
base: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
ticketId: {
|
|
||||||
component: 'span',
|
|
||||||
props: () => {},
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
active: {
|
|
||||||
component: QCheckbox,
|
|
||||||
props: (prop) => ({
|
|
||||||
disable: true,
|
|
||||||
'model-value': Boolean(prop.value),
|
|
||||||
}),
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
hasToInvoice: {
|
|
||||||
component: QCheckbox,
|
|
||||||
props: (prop) => ({
|
|
||||||
disable: true,
|
|
||||||
'model-value': Boolean(prop.value),
|
|
||||||
}),
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
verifiedData: {
|
|
||||||
component: QCheckbox,
|
|
||||||
props: (prop) => ({
|
|
||||||
disable: true,
|
|
||||||
'model-value': Boolean(prop.value),
|
|
||||||
}),
|
|
||||||
event: () => {},
|
|
||||||
},
|
|
||||||
comercial: {
|
|
||||||
component: QBtn,
|
|
||||||
props: () => ({ flat: true, color: 'blue' }),
|
|
||||||
event: (prop) => selectWorkerId(prop.row.comercialId),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
label: t('invoiceOut.negativeBases.company'),
|
label: t('invoiceOut.negativeBases.company'),
|
||||||
|
@ -205,20 +143,17 @@ const downloadCSV = async () => {
|
||||||
params
|
params
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectCustomerId = (id) => {
|
|
||||||
selectedCustomerId.value = id;
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectWorkerId = (id) => {
|
|
||||||
selectedWorkerId.value = id;
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<template v-if="stateStore.isHeaderMounted()">
|
<template v-if="stateStore.isHeaderMounted()">
|
||||||
<Teleport to="#st-actions" v-if="stateStore?.isSubToolbarShown()">
|
<Teleport
|
||||||
<QBtn color="primary" icon-right="archive" no-caps @click="downloadCSV()" />
|
to="#st-actions"
|
||||||
|
v-if="stateStore?.isSubToolbarShown() && componentIsRendered"
|
||||||
|
>
|
||||||
|
<QBtn color="primary" icon-right="download" no-caps @click="downloadCSV()">
|
||||||
|
<QTooltip>{{ t('Download as CSV') }}</QTooltip>
|
||||||
|
</QBtn>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||||
|
@ -236,31 +171,37 @@ const selectWorkerId = (id) => {
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
class="full-width q-mt-md"
|
class="full-width q-mt-md"
|
||||||
>
|
>
|
||||||
<template #body-cell="props">
|
<template #body-cell-clientId="{ row }">
|
||||||
<QTd :props="props">
|
<QTd>
|
||||||
<component
|
<QBtn flat dense color="blue"> {{ row.clientId }}</QBtn>
|
||||||
:is="tableColumnComponents[props.col.name].component"
|
<CustomerDescriptorProxy :id="row.clientId" />
|
||||||
class="col-content"
|
</QTd>
|
||||||
v-bind="tableColumnComponents[props.col.name].props(props)"
|
|
||||||
@click="tableColumnComponents[props.col.name].event(props)"
|
|
||||||
>
|
|
||||||
<template
|
|
||||||
v-if="
|
|
||||||
props.col.name !== 'active' &&
|
|
||||||
props.col.name !== 'hasToInvoice' &&
|
|
||||||
props.col.name !== 'verifiedData'
|
|
||||||
"
|
|
||||||
>{{ props.value }}
|
|
||||||
</template>
|
</template>
|
||||||
<CustomerDescriptorProxy
|
<template #body-cell-ticketId="{ row }">
|
||||||
v-if="props.col.name === 'clientId'"
|
<QTd>
|
||||||
:id="selectedCustomerId"
|
<QBtn flat dense color="blue"> {{ row.ticketFk }}</QBtn>
|
||||||
/>
|
<TicketDescriptorProxy :id="row.ticketFk" />
|
||||||
<VnUserLink
|
</QTd>
|
||||||
v-if="props.col.name === 'comercial'"
|
</template>
|
||||||
:worker-id="selectedWorkerId"
|
<template #body-cell-comercial="{ row }">
|
||||||
/>
|
<QTd>
|
||||||
</component>
|
<QBtn flat dense color="blue">{{ row.comercialName }}</QBtn>
|
||||||
|
<WorkerDescriptorProxy :id="row.comercialId" />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-active="{ row }">
|
||||||
|
<QTd>
|
||||||
|
<QCheckbox :model-value="!!row.isActive" disable />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-hasToInvoice="{ row }">
|
||||||
|
<QTd>
|
||||||
|
<QCheckbox :model-value="!!row.hasToInvoice" disable />
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
<template #body-cell-verifiedData="{ row }">
|
||||||
|
<QTd>
|
||||||
|
<QCheckbox :model-value="!!row.isTaxDataChecked" disable />
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
@ -274,4 +215,7 @@ const selectWorkerId = (id) => {
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<i18n></i18n>
|
<i18n>
|
||||||
|
es:
|
||||||
|
Download as CSV: Descargar como CSV
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -41,7 +41,7 @@ const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getToken } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const getItemAvatar = async () => {
|
const getItemAvatar = async () => {
|
||||||
const token = getToken();
|
const token = getTokenMultimedia();
|
||||||
const timeStamp = `timestamp=${Date.now()}`;
|
const timeStamp = `timestamp=${Date.now()}`;
|
||||||
image.value = `/api/Images/catalog/200x200/${entityId.value}/download?access_token=${token}&${timeStamp}`;
|
image.value = `/api/Images/catalog/200x200/${entityId.value}/download?access_token=${token}&${timeStamp}`;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,8 +30,15 @@ async function onSubmit() {
|
||||||
const { data } = await axios.post('Accounts/login', params);
|
const { data } = await axios.post('Accounts/login', params);
|
||||||
|
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
const {
|
||||||
|
data: { multimediaToken },
|
||||||
|
} = await axios.get('VnUsers/ShareToken', {
|
||||||
|
headers: { Authorization: data.token },
|
||||||
|
});
|
||||||
|
|
||||||
await session.login(data.token, keepLogin.value);
|
if (!multimediaToken) return;
|
||||||
|
|
||||||
|
await session.login(data.token, multimediaToken.id, keepLogin.value);
|
||||||
|
|
||||||
quasar.notify({
|
quasar.notify({
|
||||||
message: t('login.loginSuccess'),
|
message: t('login.loginSuccess'),
|
||||||
|
|
|
@ -57,10 +57,13 @@ onMounted(async () => {
|
||||||
:href="button.url"
|
:href="button.url"
|
||||||
>
|
>
|
||||||
<div class="row items-center no-wrap q-gutter-md">
|
<div class="row items-center no-wrap q-gutter-md">
|
||||||
<div class="circle q-pa-sm" style="background-color: var(--vn-gray)">
|
<div
|
||||||
|
class="circle q-pa-sm"
|
||||||
|
style="background-color: var(--vn-section-color)"
|
||||||
|
>
|
||||||
<QImg :src="button.icon" class="q-pa-md" />
|
<QImg :src="button.icon" class="q-pa-md" />
|
||||||
</div>
|
</div>
|
||||||
<div class="text-h5" style="color: var(--vn-gray)">
|
<div class="text-h5" style="color: var(--vn-section-color)">
|
||||||
{{ t(button.text) }}
|
{{ t(button.text) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -420,7 +420,7 @@ const getCategoryClass = (category, params) => {
|
||||||
|
|
||||||
.category-icon {
|
.category-icon {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: var(--vn-light-gray);
|
background-color: var(--vn-accent-color);
|
||||||
font-size: 2.6rem;
|
font-size: 2.6rem;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -11,8 +11,8 @@ import toCurrency from '../../../filters/toCurrency';
|
||||||
|
|
||||||
const DEFAULT_PRICE_KG = 0;
|
const DEFAULT_PRICE_KG = 0;
|
||||||
|
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
|
@ -88,11 +88,11 @@ const dialog = ref(null);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
color: var(--vn-text);
|
color: var(--vn-text-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ const dialog = ref(null);
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
|
||||||
.subName {
|
.subName {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ const dialog = ref(null);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 12px;
|
bottom: 12px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
background: linear-gradient($dark, $primary);
|
background: linear-gradient(var(--vn-section-color), $primary);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
|
@ -248,7 +248,7 @@ const detailsColumns = ref([
|
||||||
|
|
||||||
.subName {
|
.subName {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ function extractTags(items) {
|
||||||
.no-result {
|
.no-result {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -17,9 +17,9 @@ import axios from 'axios';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
const orderSummary = ref({
|
const orderSummary = ref({
|
||||||
total: null,
|
total: null,
|
||||||
vat: null,
|
vat: null,
|
||||||
|
@ -213,7 +213,7 @@ async function confirmOrder() {
|
||||||
gap: 2%;
|
gap: 2%;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -246,13 +246,13 @@ async function confirmOrder() {
|
||||||
}
|
}
|
||||||
|
|
||||||
.subname {
|
.subname {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-result {
|
.no-result {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -104,7 +104,7 @@ function navigate(id) {
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('order.field.landed')">
|
<VnLv :label="t('order.field.landed')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge color="positive" dense>
|
<QBadge text-color="black" color="positive" dense>
|
||||||
{{ toDate(row?.landed) }}
|
{{ toDate(row?.landed) }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -106,7 +106,7 @@ const loadVolumes = async (rows) => {
|
||||||
gap: 2%;
|
gap: 2%;
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@ -132,7 +132,7 @@ const loadVolumes = async (rows) => {
|
||||||
.no-result {
|
.no-result {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -12,8 +12,8 @@ import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
const selected = ref([]);
|
const selected = ref([]);
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -141,6 +141,7 @@ function downloadPdfs() {
|
||||||
<template #body-cell-hasCmrDms="{ value }">
|
<template #body-cell-hasCmrDms="{ value }">
|
||||||
<QTd align="center">
|
<QTd align="center">
|
||||||
<QBadge
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
:id="value ? 'true' : 'false'"
|
:id="value ? 'true' : 'false'"
|
||||||
:label="
|
:label="
|
||||||
value
|
value
|
||||||
|
|
|
@ -133,10 +133,10 @@ const showRouteReport = () => {
|
||||||
let url;
|
let url;
|
||||||
|
|
||||||
if (selectedRows.value.length <= 1) {
|
if (selectedRows.value.length <= 1) {
|
||||||
url = `api/Routes/${idString}/driver-route-pdf?access_token=${session.getToken()}`;
|
url = `api/Routes/${idString}/driver-route-pdf?access_token=${session.getTokenMultimedia()}`;
|
||||||
} else {
|
} else {
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
access_token: session.getToken(),
|
access_token: session.getTokenMultimedia(),
|
||||||
id: idString,
|
id: idString,
|
||||||
});
|
});
|
||||||
url = `api/Routes/downloadZip?${params.toString()}`;
|
url = `api/Routes/downloadZip?${params.toString()}`;
|
||||||
|
@ -224,7 +224,7 @@ const openTicketsDialog = (id) => {
|
||||||
<FetchData url="AgencyModes" @on-fetch="(data) => (agencyList = data)" auto-load />
|
<FetchData url="AgencyModes" @on-fetch="(data) => (agencyList = data)" auto-load />
|
||||||
<FetchData url="Vehicles" @on-fetch="(data) => (vehicleList = data)" auto-load />
|
<FetchData url="Vehicles" @on-fetch="(data) => (vehicleList = data)" auto-load />
|
||||||
<QPage class="column items-center">
|
<QPage class="column items-center">
|
||||||
<VnSubToolbar class="bg-vn-dark justify-end">
|
<VnSubToolbar class="justify-end">
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="vn:clone"
|
icon="vn:clone"
|
||||||
|
|
|
@ -13,9 +13,9 @@ import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
|
||||||
import VnConfirm from 'components/ui/VnConfirm.vue';
|
import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import {useSummaryDialog} from "composables/useSummaryDialog";
|
import { useSummaryDialog } from 'composables/useSummaryDialog';
|
||||||
import RoadmapSummary from "pages/Route/Roadmap/RoadmapSummary.vue";
|
import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
|
||||||
import {useRouter} from "vue-router";
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -128,7 +128,7 @@ function confirmRemove() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function navigateToRoadmapSummary(event, row) {
|
function navigateToRoadmapSummary(event, row) {
|
||||||
router.push({ name: 'RoadmapSummary', params: { id: row.id } })
|
router.push({ name: 'RoadmapSummary', params: { id: row.id } });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ function navigateToRoadmapSummary(event, row) {
|
||||||
</QCard>
|
</QCard>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPage class="column items-center">
|
<QPage class="column items-center">
|
||||||
<VnSubToolbar class="bg-vn-dark justify-end">
|
<VnSubToolbar class="justify-end">
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="vn:clone"
|
icon="vn:clone"
|
||||||
|
@ -244,7 +244,12 @@ function navigateToRoadmapSummary(event, row) {
|
||||||
name="preview"
|
name="preview"
|
||||||
size="xs"
|
size="xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click.stop="viewSummary(props?.row?.id, RoadmapSummary)"
|
@click.stop="
|
||||||
|
viewSummary(
|
||||||
|
props?.row?.id,
|
||||||
|
RoadmapSummary
|
||||||
|
)
|
||||||
|
"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Preview') }}</QTooltip>
|
<QTooltip>{{ t('Preview') }}</QTooltip>
|
||||||
|
|
|
@ -15,8 +15,8 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { openBuscaman } from 'src/utils/buscaman';
|
import { openBuscaman } from 'src/utils/buscaman';
|
||||||
import SendSmsDialog from 'components/common/SendSmsDialog.vue';
|
import SendSmsDialog from 'components/common/SendSmsDialog.vue';
|
||||||
import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue";
|
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
|
||||||
import {useStateStore} from "stores/useStateStore";
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
@ -257,7 +257,7 @@ const openSmsDialog = async () => {
|
||||||
</QCard>
|
</QCard>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPage class="column items-center">
|
<QPage class="column items-center">
|
||||||
<QToolbar class="bg-vn-dark justify-end">
|
<QToolbar class="justify-end">
|
||||||
<div id="st-actions" class="q-pa-sm">
|
<div id="st-actions" class="q-pa-sm">
|
||||||
<QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes">
|
<QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes">
|
||||||
<QTooltip>{{ t('Sort routes') }}</QTooltip>
|
<QTooltip>{{ t('Sort routes') }}</QTooltip>
|
||||||
|
|
|
@ -17,15 +17,14 @@ const quasar = useQuasar();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
function confirmRemove() {
|
function confirmRemove() {
|
||||||
quasar
|
quasar.dialog({
|
||||||
.dialog({
|
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
title: t('Confirm deletion'),
|
title: t('Confirm deletion'),
|
||||||
message: t('Are you sure you want to delete this shelving?'),
|
message: t('Are you sure you want to delete this shelving?'),
|
||||||
promise: remove
|
promise: remove,
|
||||||
},
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function remove() {
|
async function remove() {
|
||||||
|
|
|
@ -195,7 +195,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.label {
|
.label {
|
||||||
color: var(--vn-label);
|
color: var(--vn-label-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ onMounted(() => {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.border {
|
.border {
|
||||||
border-radius: 0px !important;
|
border-radius: 0px !important;
|
||||||
border: 1px solid var(--vn-text) !important;
|
border: 1px solid var(--vn-text-color) !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { getUrl } from 'src/composables/getUrl';
|
||||||
import { useRole } from 'src/composables/useRole';
|
import { useRole } from 'src/composables/useRole';
|
||||||
import { dashIfEmpty } from 'src/filters';
|
import { dashIfEmpty } from 'src/filters';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onUpdated(() => summaryRef.value.fetch());
|
onUpdated(() => summaryRef.value.fetch());
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,10 @@ const setData = (entity) =>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
|
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge :color="entity.ticketState.state.classColor">
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
|
:color="entity.ticketState.state.classColor"
|
||||||
|
>
|
||||||
{{ entity.ticketState.state.name }}
|
{{ entity.ticketState.state.name }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -12,6 +12,7 @@ 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 { getUrl } from 'src/composables/getUrl';
|
import { getUrl } from 'src/composables/getUrl';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
onUpdated(() => summaryRef.value.fetch());
|
onUpdated(() => summaryRef.value.fetch());
|
||||||
|
|
||||||
|
@ -74,7 +75,7 @@ async function changeState(value) {
|
||||||
code: value,
|
code: value,
|
||||||
};
|
};
|
||||||
|
|
||||||
await axios.post(`TicketTrackings/changeState`, formData);
|
await axios.post(`Tickets/state`, formData);
|
||||||
router.go(route.fullPath);
|
router.go(route.fullPath);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -102,8 +103,8 @@ async function changeState(value) {
|
||||||
<QBtnDropdown
|
<QBtnDropdown
|
||||||
side
|
side
|
||||||
top
|
top
|
||||||
color="orange-11"
|
color="black"
|
||||||
text-color="black"
|
text-color="white"
|
||||||
:label="t('ticket.summary.changeState')"
|
:label="t('ticket.summary.changeState')"
|
||||||
:disable="!isEditable()"
|
:disable="!isEditable()"
|
||||||
>
|
>
|
||||||
|
@ -131,10 +132,10 @@ async function changeState(value) {
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link" :href="ticketUrl + 'basic-data/step-one'">
|
<VnTitle
|
||||||
{{ t('globals.summary.basicData') }}
|
:url="ticketUrl + 'basic-data/step-one'"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('globals.summary.basicData')"
|
||||||
</a>
|
/>
|
||||||
<VnLv :label="t('ticket.summary.state')">
|
<VnLv :label="t('ticket.summary.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QChip :color="ticket.ticketState?.state?.classColor ?? 'dark'">
|
<QChip :color="ticket.ticketState?.state?.classColor ?? 'dark'">
|
||||||
|
@ -177,10 +178,10 @@ async function changeState(value) {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link" :href="ticketUrl + 'basic-data/step-one'">
|
<VnTitle
|
||||||
{{ t('globals.summary.basicData') }}
|
:url="ticketUrl + 'basic-data/step-one'"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('globals.summary.basicData')"
|
||||||
</a>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('ticket.summary.shipped')"
|
:label="t('ticket.summary.shipped')"
|
||||||
:value="toDate(ticket.shipped)"
|
:value="toDate(ticket.shipped)"
|
||||||
|
@ -220,10 +221,10 @@ async function changeState(value) {
|
||||||
/>
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="ticket.notes.length">
|
<QCard class="vn-one" v-if="ticket.notes.length">
|
||||||
<a class="header header-link" :href="ticketUrl + 'observation'">
|
<VnTitle
|
||||||
{{ t('ticket.pageTitles.notes') }}
|
:url="ticketUrl + 'observation'"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('ticket.pageTitles.notes')"
|
||||||
</a>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
v-for="note in ticket.notes"
|
v-for="note in ticket.notes"
|
||||||
:key="note.id"
|
:key="note.id"
|
||||||
|
@ -238,7 +239,6 @@ async function changeState(value) {
|
||||||
class="notes"
|
class="notes"
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
</QCard>
|
</QCard>
|
||||||
|
@ -261,13 +261,12 @@ async function changeState(value) {
|
||||||
:value="toCurrency(ticket.totalWithVat)"
|
:value="toCurrency(ticket.totalWithVat)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-max">
|
<QCard class="vn-max">
|
||||||
<a class="header header-link" :href="ticketUrl + 'sale'">
|
<VnTitle
|
||||||
{{ t('ticket.summary.saleLines') }}
|
:url="ticketUrl + 'sale'"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('ticket.summary.saleLines')"
|
||||||
</a>
|
/>
|
||||||
<QTable :rows="ticket.sales">
|
<QTable :rows="ticket.sales">
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr :props="props">
|
<QTr :props="props">
|
||||||
|
@ -402,10 +401,7 @@ async function changeState(value) {
|
||||||
class="vn-max"
|
class="vn-max"
|
||||||
v-if="ticket.packagings.length > 0 || ticket.services.length > 0"
|
v-if="ticket.packagings.length > 0 || ticket.services.length > 0"
|
||||||
>
|
>
|
||||||
<a class="header header-link" :href="ticketUrl + 'package'">
|
<VnTitle :url="ticketUrl + 'package'" :text="t('globals.packages')" />
|
||||||
{{ t('globals.packages') }}
|
|
||||||
<QIcon name="open_in_new" />
|
|
||||||
</a>
|
|
||||||
<QTable :rows="ticket.packagings" flat>
|
<QTable :rows="ticket.packagings" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr :props="props">
|
<QTr :props="props">
|
||||||
|
@ -422,11 +418,10 @@ async function changeState(value) {
|
||||||
</QTr>
|
</QTr>
|
||||||
</template>
|
</template>
|
||||||
</QTable>
|
</QTable>
|
||||||
|
<VnTitle
|
||||||
<a class="header header-link q-mt-xl" :href="ticketUrl + 'service'">
|
:url="ticketUrl + 'service'"
|
||||||
{{ t('ticket.summary.service') }}
|
:text="t('ticket.summary.service')"
|
||||||
<QIcon name="open_in_new" />
|
/>
|
||||||
</a>
|
|
||||||
<QTable :rows="ticket.services" flat>
|
<QTable :rows="ticket.services" flat>
|
||||||
<template #header="props">
|
<template #header="props">
|
||||||
<QTr :props="props">
|
<QTr :props="props">
|
||||||
|
|
|
@ -89,6 +89,7 @@ function navigate(id) {
|
||||||
<VnLv :label="t('ticket.list.state')">
|
<VnLv :label="t('ticket.list.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
:color="row.classColor ?? 'orange'"
|
:color="row.classColor ?? 'orange'"
|
||||||
class="q-ma-none"
|
class="q-ma-none"
|
||||||
dense
|
dense
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||||
import FetchData from 'src/components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
||||||
|
@ -284,9 +285,7 @@ async function setTravelData(travelData) {
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="full-width" v-if="entriesTableRows.length > 0">
|
<QCard class="full-width" v-if="entriesTableRows.length > 0">
|
||||||
<span class="header header-link">
|
<VnTitle :text="t('travel.summary.entries')" />
|
||||||
{{ t('travel.summary.entries') }}
|
|
||||||
</span>
|
|
||||||
<QTable
|
<QTable
|
||||||
:rows="entriesTableRows"
|
:rows="entriesTableRows"
|
||||||
:columns="entriesTableColumns"
|
:columns="entriesTableColumns"
|
||||||
|
|
|
@ -430,7 +430,7 @@ const handleDragScroll = (event) => {
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
</template>
|
</template>
|
||||||
<VnSubToolbar class="bg-vn-dark justify-end">
|
<VnSubToolbar class="justify-end">
|
||||||
<template #st-actions>
|
<template #st-actions>
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|
|
@ -100,6 +100,7 @@ onMounted(async () => {
|
||||||
<VnLv :label="t('globals.shipped')">
|
<VnLv :label="t('globals.shipped')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
v-if="getDateQBadgeColor(row.shipped)"
|
v-if="getDateQBadgeColor(row.shipped)"
|
||||||
:color="getDateQBadgeColor(row.shipped)"
|
:color="getDateQBadgeColor(row.shipped)"
|
||||||
class="q-ma-none"
|
class="q-ma-none"
|
||||||
|
@ -114,6 +115,7 @@ onMounted(async () => {
|
||||||
<VnLv :label="t('globals.landed')">
|
<VnLv :label="t('globals.landed')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QBadge
|
<QBadge
|
||||||
|
text-color="black"
|
||||||
v-if="getDateQBadgeColor(row.landed)"
|
v-if="getDateQBadgeColor(row.landed)"
|
||||||
:color="getDateQBadgeColor(row.landed)"
|
:color="getDateQBadgeColor(row.landed)"
|
||||||
class="q-ma-none"
|
class="q-ma-none"
|
||||||
|
@ -139,13 +141,11 @@ onMounted(async () => {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.clone')"
|
:label="t('components.smartCard.clone')"
|
||||||
@click.stop="cloneTravel(row)"
|
@click.stop="cloneTravel(row)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('addEntry')"
|
:label="t('addEntry')"
|
||||||
@click.stop="redirectCreateEntryView(row)"
|
@click.stop="redirectCreateEntryView(row)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
style="margin-top: 15px"
|
style="margin-top: 15px"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -61,7 +61,6 @@ async function remove(row) {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openCard')"
|
:label="t('components.smartCard.openCard')"
|
||||||
@click.stop="navigate(row.id)"
|
@click.stop="navigate(row.id)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -7,8 +7,8 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const session = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
const token = session.getToken();
|
const token = getTokenMultimedia();
|
||||||
|
|
||||||
const counters = ref({
|
const counters = ref({
|
||||||
alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true },
|
alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja', isTray: true },
|
||||||
|
|
|
@ -80,7 +80,6 @@ async function remove(row) {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openCard')"
|
:label="t('components.smartCard.openCard')"
|
||||||
@click.stop="navigate(row.id)"
|
@click.stop="navigate(row.id)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -22,7 +22,7 @@ const $props = defineProps({
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { getToken } = useSession();
|
const { getTokenMultimedia } = useSession();
|
||||||
|
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
|
@ -56,7 +56,7 @@ const filter = {
|
||||||
const sip = computed(() => worker.value?.sip && worker.value.sip.extension);
|
const sip = computed(() => worker.value?.sip && worker.value.sip.extension);
|
||||||
|
|
||||||
function getWorkerAvatar() {
|
function getWorkerAvatar() {
|
||||||
const token = getToken();
|
const token = getTokenMultimedia();
|
||||||
return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`;
|
return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`;
|
||||||
}
|
}
|
||||||
const data = ref(useCardDescription());
|
const data = ref(useCardDescription());
|
||||||
|
|
|
@ -8,6 +8,7 @@ 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 CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -71,10 +72,10 @@ const filter = {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: worker }">
|
<template #body="{ entity: worker }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<a class="header header-link" :href="workerUrl + `basic-data`">
|
<VnTitle
|
||||||
{{ t('worker.summary.basicData') }}
|
:url="workerUrl + `basic-data`"
|
||||||
<QIcon name="open_in_new" />
|
:text="t('worker.summary.basicData')"
|
||||||
</a>
|
/>
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.department')"
|
:label="t('worker.list.department')"
|
||||||
|
@ -111,9 +112,7 @@ const filter = {
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<div class="header header-link">
|
<VnTitle :text="t('worker.summary.userData')" />
|
||||||
{{ t('worker.summary.userData') }}
|
|
||||||
</div>
|
|
||||||
<VnLv :label="t('worker.summary.userId')" :value="worker.user.id" />
|
<VnLv :label="t('worker.summary.userId')" :value="worker.user.id" />
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker.user.nickname" />
|
||||||
<VnLv :label="t('worker.summary.role')" :value="worker.user.role.name" />
|
<VnLv :label="t('worker.summary.role')" :value="worker.user.role.name" />
|
||||||
|
|
|
@ -82,7 +82,6 @@ const redirectToCreateView = () => {
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="t('components.smartCard.openCard')"
|
:label="t('components.smartCard.openCard')"
|
||||||
@click.stop="navigate(row.id)"
|
@click.stop="navigate(row.id)"
|
||||||
class="bg-vn-dark"
|
|
||||||
outline
|
outline
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default {
|
||||||
name: 'InvoiceOutNegativeBases',
|
name: 'InvoiceOutNegativeBases',
|
||||||
meta: {
|
meta: {
|
||||||
title: 'negativeBases',
|
title: 'negativeBases',
|
||||||
icon: 'view_list',
|
icon: 'vn:ticket',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () =>
|
||||||
import('src/pages/InvoiceOut/InvoiceOutNegativeBases.vue'),
|
import('src/pages/InvoiceOut/InvoiceOutNegativeBases.vue'),
|
||||||
|
|
|
@ -73,6 +73,9 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
const stringDate = data.issued.substring(0, 10);
|
const stringDate = data.issued.substring(0, 10);
|
||||||
this.minInvoicingDate = stringDate;
|
this.minInvoicingDate = stringDate;
|
||||||
this.formInitialData.invoiceDate = stringDate;
|
this.formInitialData.invoiceDate = stringDate;
|
||||||
|
|
||||||
|
this.minInvoicingDate = new Date(data.issued);
|
||||||
|
this.formInitialData.invoiceDate = this.minInvoicingDate;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error fetching invoice out global initial data');
|
console.error('Error fetching invoice out global initial data');
|
||||||
throw new Error();
|
throw new Error();
|
||||||
|
@ -103,12 +106,8 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
|
|
||||||
if (clientsToInvoice == 'all') params.clientId = undefined;
|
if (clientsToInvoice == 'all') params.clientId = undefined;
|
||||||
|
|
||||||
const addressesResponse = await await axios.post(
|
const { data } = await axios.post('InvoiceOuts/clientsToInvoice', params);
|
||||||
'InvoiceOuts/clientsToInvoice',
|
this.addresses = data;
|
||||||
params
|
|
||||||
);
|
|
||||||
|
|
||||||
this.addresses = addressesResponse.data;
|
|
||||||
|
|
||||||
if (!this.addresses || !this.addresses.length > 0) {
|
if (!this.addresses || !this.addresses.length > 0) {
|
||||||
notify(
|
notify(
|
||||||
|
@ -118,9 +117,9 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
throw new Error("There aren't addresses to invoice");
|
throw new Error("There aren't addresses to invoice");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addresses.forEach(async (address) => {
|
for (const address of this.addresses) {
|
||||||
await this.invoiceClient(address, formData);
|
await this.invoiceClient(address, formData);
|
||||||
});
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.handleError(err);
|
this.handleError(err);
|
||||||
}
|
}
|
||||||
|
@ -186,15 +185,10 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
this.status = 'invoicing';
|
this.status = 'invoicing';
|
||||||
this.invoicing = true;
|
this.invoicing = true;
|
||||||
|
|
||||||
const invoiceResponse = await axios.post(
|
const { data } = await axios.post('InvoiceOuts/invoiceClient', params);
|
||||||
'InvoiceOuts/invoiceClient',
|
|
||||||
params
|
|
||||||
);
|
|
||||||
|
|
||||||
if (invoiceResponse.data) {
|
|
||||||
this.makePdfAndNotify(invoiceResponse.data, address);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (data) await this.makePdfAndNotify(data, address);
|
||||||
|
this.addressIndex++;
|
||||||
this.isInvoicing = false;
|
this.isInvoicing = false;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (
|
if (
|
||||||
|
@ -203,8 +197,7 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
err.response.status >= 400 &&
|
err.response.status >= 400 &&
|
||||||
err.response.status < 500
|
err.response.status < 500
|
||||||
) {
|
) {
|
||||||
this.invoiceClientError(address, err.response);
|
this.invoiceClientError(address, err.response?.data?.error?.message);
|
||||||
this.addressIndex++;
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.invoicing = false;
|
this.invoicing = false;
|
||||||
|
@ -227,12 +220,11 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
this.nPdfs++;
|
this.nPdfs++;
|
||||||
this.nRequests--;
|
this.nRequests--;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.invoiceClientError(client, err, true);
|
this.invoiceClientError(client, err.response?.data?.error?.message, true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
invoiceClientError(client, response, isWarning) {
|
invoiceClientError(client, message, isWarning) {
|
||||||
const message = response.data?.error?.message || response.message;
|
|
||||||
this.errors.unshift({ client, message, isWarning });
|
this.errors.unshift({ client, message, isWarning });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@ describe('VnLocation', () => {
|
||||||
cy.waitForElement('.q-card');
|
cy.waitForElement('.q-card');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Show all options', function() {
|
it('Show locations options', function() {
|
||||||
cy.get(inputLocation).click();
|
cy.get(inputLocation).click();
|
||||||
cy.get(locationOptions).should('have.length', 1);
|
cy.get(locationOptions).should('have.length', 5);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('InvoiceInList', () => {
|
||||||
const firstChipId =
|
const firstChipId =
|
||||||
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
||||||
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
|
const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
|
||||||
const summaryHeaders = '.summaryBody .header';
|
const summaryHeaders = '.summaryBody .header-link';
|
||||||
const screen = '.q-page-container > .q-drawer-container > .fullscreen';
|
const screen = '.q-page-container > .q-drawer-container > .fullscreen';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -17,7 +17,7 @@ describe('InvoiceInList', () => {
|
||||||
cy.get(firstChipId)
|
cy.get(firstChipId)
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
.then((content) => {
|
.then((content) => {
|
||||||
const id = content.substring(4);
|
const id = content.replace(/\D/g, '');
|
||||||
cy.get(firstCard).click();
|
cy.get(firstCard).click();
|
||||||
cy.url().should('include', `/invoice-in/${id}/summary`);
|
cy.url().should('include', `/invoice-in/${id}/summary`);
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,7 +16,10 @@ describe('WorkerList', () => {
|
||||||
it('should open the worker summary', () => {
|
it('should open the worker summary', () => {
|
||||||
cy.openListSummary(0);
|
cy.openListSummary(0);
|
||||||
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
|
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
|
||||||
cy.get('.summary .header').eq(0).invoke('text').should('include', 'Basic data');
|
cy.get('.summary .header-link')
|
||||||
cy.get('.summary .header').eq(1).should('have.text', 'User data');
|
.eq(0)
|
||||||
|
.invoke('text')
|
||||||
|
.should('include', 'Basic data');
|
||||||
|
cy.get('.summary .header-link').eq(1).should('have.text', 'User data ');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,6 +49,8 @@ describe('VnPaginate', () => {
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
vm.arrayData.hasMoreData.value = true;
|
vm.arrayData.hasMoreData.value = true;
|
||||||
|
await vm.$nextTick();
|
||||||
|
|
||||||
vm.store.data = [
|
vm.store.data = [
|
||||||
{ id: 1, name: 'Tony Stark' },
|
{ id: 1, name: 'Tony Stark' },
|
||||||
{ id: 2, name: 'Jessica Jones' },
|
{ id: 2, name: 'Jessica Jones' },
|
||||||
|
|
|
@ -54,7 +54,8 @@ describe('session', () => {
|
||||||
expect(localStorage.getItem('token')).toEqual('tokenToBeGone');
|
expect(localStorage.getItem('token')).toEqual('tokenToBeGone');
|
||||||
expect(user.value).toEqual(previousUser);
|
expect(user.value).toEqual(previousUser);
|
||||||
|
|
||||||
session.destroy();
|
vi.spyOn(axios, 'post').mockResolvedValue({ data: true });
|
||||||
|
await session.destroy();
|
||||||
|
|
||||||
user = state.getUser();
|
user = state.getUser();
|
||||||
expect(localStorage.getItem('token')).toBeNull();
|
expect(localStorage.getItem('token')).toBeNull();
|
||||||
|
@ -92,9 +93,10 @@ describe('session', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const expectedToken = 'mySessionToken';
|
const expectedToken = 'mySessionToken';
|
||||||
|
const expectedTokenMultimedia = 'mySessionTokenMultimedia';
|
||||||
const keepLogin = false;
|
const keepLogin = false;
|
||||||
|
|
||||||
await session.login(expectedToken, keepLogin);
|
await session.login(expectedToken,expectedTokenMultimedia, keepLogin);
|
||||||
|
|
||||||
const roles = state.getRoles();
|
const roles = state.getRoles();
|
||||||
const localToken = localStorage.getItem('token');
|
const localToken = localStorage.getItem('token');
|
||||||
|
@ -104,7 +106,7 @@ describe('session', () => {
|
||||||
expect(localToken).toBeNull();
|
expect(localToken).toBeNull();
|
||||||
expect(sessionToken).toEqual(expectedToken);
|
expect(sessionToken).toEqual(expectedToken);
|
||||||
|
|
||||||
session.destroy(); // this clears token and user for any other test
|
await session.destroy(); // this clears token and user for any other test
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should fetch the user roles and then set token in the localStorage', async () => {
|
it('should fetch the user roles and then set token in the localStorage', async () => {
|
||||||
|
@ -114,9 +116,10 @@ describe('session', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const expectedToken = 'myLocalToken';
|
const expectedToken = 'myLocalToken';
|
||||||
|
const expectedTokenMultimedia = 'myLocalTokenMultimedia';
|
||||||
const keepLogin = true;
|
const keepLogin = true;
|
||||||
|
|
||||||
await session.login(expectedToken, keepLogin);
|
await session.login(expectedToken, expectedTokenMultimedia, keepLogin);
|
||||||
|
|
||||||
const roles = state.getRoles();
|
const roles = state.getRoles();
|
||||||
const localToken = localStorage.getItem('token');
|
const localToken = localStorage.getItem('token');
|
||||||
|
@ -126,7 +129,7 @@ describe('session', () => {
|
||||||
expect(localToken).toEqual(expectedToken);
|
expect(localToken).toEqual(expectedToken);
|
||||||
expect(sessionToken).toBeNull();
|
expect(sessionToken).toBeNull();
|
||||||
|
|
||||||
session.destroy(); // this clears token and user for any other test
|
await session.destroy(); // this clears token and user for any other test
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue