@@ -319,10 +320,7 @@ function getLink(param) {
-
+
-
+
-
+
diff --git a/src/pages/InvoiceIn/InvoiceInList.vue b/src/pages/InvoiceIn/InvoiceInList.vue
index 9508c669c..46c95c734 100644
--- a/src/pages/InvoiceIn/InvoiceInList.vue
+++ b/src/pages/InvoiceIn/InvoiceInList.vue
@@ -112,7 +112,6 @@ function navigate(id) {
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
index 9c1bb3649..e01706e84 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptor.vue
@@ -2,13 +2,15 @@
import { ref, computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
-import { toCurrency, toDate } from 'src/filters';
+
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnLv from 'src/components/ui/VnLv.vue';
-import useCardDescription from 'src/composables/useCardDescription';
import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
+import useCardDescription from 'src/composables/useCardDescription';
+import { toCurrency, toDate } from 'src/filters';
+
const $props = defineProps({
id: {
type: Number,
@@ -23,7 +25,6 @@ const { t } = useI18n();
const entityId = computed(() => {
return $props.id || route.params.id;
});
-const descriptor = ref();
const filter = {
include: [
@@ -42,6 +43,8 @@ const filter = {
],
};
+const descriptor = ref();
+
function ticketFilter(invoice) {
return JSON.stringify({ refFk: invoice.ref });
}
@@ -61,7 +64,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
data-key="invoiceOutData"
>
-
+
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue
index ab8b6470b..10af631bc 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutDescriptorMenu.vue
@@ -1,40 +1,260 @@
-
- {{ t('Transfer invoice to') }}
+
+ {{ t('Transfer invoice to...') }}
- {{ t('See invoice') }}
+ {{ t('Show invoice...') }}
+
+
+
+
+
+
+ {{ t('As PDF') }}
+
+
+ {{ t('As CSV') }}
+
+
+
- {{ t('Send invoice') }}
+ {{ t('Send invoice...') }}
+
+
+
+
+
+
+ {{ t('Send PDF') }}
+
+
+ {{ t('Send CSV') }}
+
+
+
-
+
{{ t('Delete invoice') }}
-
- {{ t('Post invoice') }}
+
+ {{ t('Book invoice') }}
+
+
+ {{ t('Generate PDF invoice') }}
- {{ t('Regenerate invoice PDF') }}
-
-
- {{ t('Pass') }}
+ {{ t('Refund...') }}
+
+
+
+
+
+
+ {{ t('With warehouse') }}
+
+
+ {{ t('Without warehouse') }}
+
+
+
+
+ {{ t('Create a single ticket with all the content of the current invoice') }}
+
+
+
+
+
es:
- Transfer invoice to: Transferir factura a
- See invoice: Ver factura
- Send invoice: Enviar factura
+ Transfer invoice to...: Transferir factura a...
+ Show invoice...: Ver factura...
+ Send invoice...: Enviar factura...
Delete invoice: Eliminar factura
- Post invoice: Asentar factura
- Regenerate invoice PDF: Regenerar PDF factura
- Pass: Abono
+ Book invoice: Asentar factura
+ Generate PDF invoice: Generar PDF factura
+ 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}
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
index c5c17fa87..a6a28bdde 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutSummary.vue
@@ -7,6 +7,9 @@ import { toCurrency, toDate } from 'src/filters';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue';
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 () => {
fetch();
@@ -67,29 +70,33 @@ const taxColumns = ref([
const ticketsColumns = ref([
{
name: 'item',
- label: 'invoiceOut.summary.ticketId',
+ label: t('invoiceOut.summary.ticketId'),
field: (row) => row.id,
sortable: true,
+ align: 'left',
},
{
name: 'quantity',
- label: 'invoiceOut.summary.nickname',
+ label: t('invoiceOut.summary.nickname'),
field: (row) => row.nickname,
sortable: true,
+ align: 'left',
},
{
name: 'landed',
- label: 'invoiceOut.summary.shipped',
+ label: t('invoiceOut.summary.shipped'),
field: (row) => row.shipped,
format: (value) => toDate(value),
sortable: true,
+ align: 'left',
},
{
name: 'landed',
- label: 'invoiceOut.summary.totalWithVat',
+ label: t('invoiceOut.summary.totalWithVat'),
field: (row) => row.totalWithVat,
format: (value) => toCurrency(value),
sortable: true,
+ align: 'left',
},
]);
@@ -105,10 +112,7 @@ const ticketsColumns = ref([
-
+
-
+
@@ -146,17 +147,23 @@ const ticketsColumns = ref([
-
+
-
-
-
- {{ t(col.label) }}
-
-
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+ {{ value }}
+
+
+
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobal.vue b/src/pages/InvoiceOut/InvoiceOutGlobal.vue
index 7e2b43a76..9db58d40a 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobal.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobal.vue
@@ -21,6 +21,7 @@ const {
nPdfs,
totalPdfs,
errors,
+ addresses,
} = storeToRefs(invoiceOutGlobalStore);
const selectedCustomerId = ref(null);
@@ -86,6 +87,14 @@ const selectCustomerId = (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));
onUnmounted(() => {
stateStore.rightDrawer = false;
@@ -103,7 +112,7 @@ onUnmounted(() => {
- {{ t(`status.${status}`) }}
+ {{ statusText }}
{{
t('invoiceOut.globalInvoices.statusCard.percentageText', {
getPercentage: getPercentage,
@@ -156,7 +165,7 @@ onUnmounted(() => {
display: flex;
justify-content: center;
width: 100%;
- background-color: var(--vn-dark);
+ background-color: var(--vn-section-color);
padding: 16px;
.card-section {
@@ -167,7 +176,7 @@ onUnmounted(() => {
.text {
font-size: 14px;
- color: var(--vn-text);
+ color: var(--vn-text-color);
}
}
diff --git a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
index c61b9f7ff..a000d6d4f 100644
--- a/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
+++ b/src/pages/InvoiceOut/InvoiceOutGlobalForm.vue
@@ -13,13 +13,8 @@ const { t } = useI18n();
const invoiceOutGlobalStore = useInvoiceOutGlobalStore();
// invoiceOutGlobalStore state and getters
-const {
- initialDataLoading,
- formInitialData,
-
- invoicing,
- status,
-} = storeToRefs(invoiceOutGlobalStore);
+const { initialDataLoading, formInitialData, invoicing, status } =
+ storeToRefs(invoiceOutGlobalStore);
// invoiceOutGlobalStore actions
const { makeInvoice, setStatusValue } = invoiceOutGlobalStore;
@@ -32,13 +27,7 @@ const printersOptions = ref([]);
const clientsOptions = ref([]);
-const formData = ref({
- companyFk: null,
- invoiceDate: null,
- maxShipped: null,
- clientId: null,
- printer: null,
-});
+const formData = ref({});
const optionsInitialData = computed(() => {
return (
diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue
index 08f893db2..266dac26e 100644
--- a/src/pages/InvoiceOut/InvoiceOutList.vue
+++ b/src/pages/InvoiceOut/InvoiceOutList.vue
@@ -2,25 +2,32 @@
import { onMounted, onUnmounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
-import { exportFile, useQuasar } from 'quasar';
-import { useStateStore } from 'stores/useStateStore';
+
import VnPaginate from 'src/components/ui/VnPaginate.vue';
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
-import { toDate, toCurrency } from 'src/filters/index';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
-import InvoiceOutFilter from './InvoiceOutFilter.vue';
import VnLv from 'src/components/ui/VnLv.vue';
import CardList from 'src/components/ui/CardList.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 { useSession } from 'src/composables/useSession';
const { t } = useI18n();
-const selectedCards = ref(new Map());
-const quasar = useQuasar();
const router = useRouter();
const stateStore = useStateStore();
+const session = useSession();
+const token = session.getToken();
const { viewSummary } = useSummaryDialog();
+const manualInvoiceDialogRef = ref(null);
+const selectedCards = ref(new Map());
+
onMounted(() => (stateStore.rightDrawer = true));
onUnmounted(() => (stateStore.rightDrawer = false));
@@ -52,37 +59,37 @@ const toggleAllCards = (cardsData) => {
}
};
-const downloadCsv = () => {
- if (selectedCards.value.size === 0) return;
- const selectedCardsArray = Array.from(selectedCards.value.values());
- let file;
- for (var i = 0; i < selectedCardsArray.length; i++) {
- if (i == 0) file += Object.keys(selectedCardsArray[i]).join(';') + '\n';
- file +=
- Object.keys(selectedCardsArray[i])
- .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 {
- quasar.notify({
- message: t('fileDenied'),
- color: 'negative',
- icon: 'warning',
- });
+const openPdf = () => {
+ try {
+ if (selectedCards.value.size === 0) return;
+ const selectedCardsArray = Array.from(selectedCards.value.values());
+
+ if (selectedCards.value.size === 1) {
+ const [invoiceOut] = selectedCardsArray;
+ const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${token}`;
+ window.open(url, '_blank');
+ } else {
+ const invoiceOutIdsArray = selectedCardsArray.map(
+ (invoiceOut) => invoiceOut.id
+ );
+ 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();
+};
@@ -119,52 +126,21 @@ const downloadCsv = () => {
-
+
-
+ {{ t('downloadPdf') }}
+
{
>
-
+
+
+
+ {{ row?.clientSocialName }}
+
+
+
+
{
/>
-
{
+
+
+
+ {{ t('createInvoice') }}
+
+
+
+
+
+
@@ -246,9 +234,13 @@ en:
fileDenied: Browser denied file download...
fileAllowed: Successful download of CSV file
youCanSearchByInvoiceReference: You can search by invoice reference
+ downloadPdf: Download PDF
+ createInvoice: Make invoice
es:
searchInvoice: Buscar factura emitida
fileDenied: El navegador denegó la descarga de archivos...
fileAllowed: Descarga exitosa de archivo CSV
youCanSearchByInvoiceReference: Puedes buscar por referencia de la factura
+ downloadPdf: Descargar PDF
+ createInvoice: Crear factura
diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
index aaae15111..fb3596499 100644
--- a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
+++ b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
@@ -1,17 +1,17 @@
-
-
+
+
+ {{ t('Download as CSV') }}
+
@@ -236,31 +171,37 @@ const selectWorkerId = (id) => {
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md"
>
-
-
-
- {{ props.value }}
-
-
-
-
+
+
+ {{ row.clientId }}
+
+
+
+
+
+ {{ row.ticketFk }}
+
+
+
+
+
+ {{ row.comercialName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -274,4 +215,7 @@ const selectWorkerId = (id) => {
}
-
+
+es:
+ Download as CSV: Descargar como CSV
+
diff --git a/src/pages/Item/Card/ItemDescriptor.vue b/src/pages/Item/Card/ItemDescriptor.vue
index 8c986e627..981de0632 100644
--- a/src/pages/Item/Card/ItemDescriptor.vue
+++ b/src/pages/Item/Card/ItemDescriptor.vue
@@ -41,7 +41,7 @@ const quasar = useQuasar();
const route = useRoute();
const router = useRouter();
const { t } = useI18n();
-const { getToken } = useSession();
+const { getTokenMultimedia } = useSession();
const state = useState();
const user = state.getUser();
@@ -79,7 +79,7 @@ onMounted(async () => {
});
const getItemAvatar = async () => {
- const token = getToken();
+ const token = getTokenMultimedia();
const timeStamp = `timestamp=${Date.now()}`;
image.value = `/api/Images/catalog/200x200/${entityId.value}/download?access_token=${token}&${timeStamp}`;
};
diff --git a/src/pages/Login/LoginMain.vue b/src/pages/Login/LoginMain.vue
index 9c469e611..f920854c6 100644
--- a/src/pages/Login/LoginMain.vue
+++ b/src/pages/Login/LoginMain.vue
@@ -30,8 +30,15 @@ async function onSubmit() {
const { data } = await axios.post('Accounts/login', params);
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({
message: t('login.loginSuccess'),
diff --git a/src/pages/Login/VerifyEmail.vue b/src/pages/Login/VerifyEmail.vue
index 4c02e5869..1febd0eaa 100644
--- a/src/pages/Login/VerifyEmail.vue
+++ b/src/pages/Login/VerifyEmail.vue
@@ -57,10 +57,13 @@ onMounted(async () => {
:href="button.url"
>
-
+
-
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue
index 760c48726..402df1173 100644
--- a/src/pages/Order/Card/OrderCatalogFilter.vue
+++ b/src/pages/Order/Card/OrderCatalogFilter.vue
@@ -420,7 +420,7 @@ const getCategoryClass = (category, params) => {
.category-icon {
border-radius: 50%;
- background-color: var(--vn-light-gray);
+ background-color: var(--vn-accent-color);
font-size: 2.6rem;
padding: 8px;
cursor: pointer;
diff --git a/src/pages/Order/Card/OrderCatalogItem.vue b/src/pages/Order/Card/OrderCatalogItem.vue
index ee73bcffb..0e1005493 100644
--- a/src/pages/Order/Card/OrderCatalogItem.vue
+++ b/src/pages/Order/Card/OrderCatalogItem.vue
@@ -11,8 +11,8 @@ import toCurrency from '../../../filters/toCurrency';
const DEFAULT_PRICE_KG = 0;
-const session = useSession();
-const token = session.getToken();
+const { getTokenMultimedia } = useSession();
+const token = getTokenMultimedia();
const { t } = useI18n();
defineProps({
@@ -88,11 +88,11 @@ const dialog = ref(null);
font-size: 11px;
.label {
- color: var(--vn-label);
+ color: var(--vn-label-color);
}
.value {
- color: var(--vn-text);
+ color: var(--vn-text-color);
}
}
}
@@ -125,7 +125,7 @@ const dialog = ref(null);
gap: 4px;
.subName {
- color: var(--vn-label);
+ color: var(--vn-label-color);
text-transform: uppercase;
}
@@ -163,7 +163,7 @@ const dialog = ref(null);
position: absolute;
bottom: 12px;
right: 12px;
- background: linear-gradient($dark, $primary);
+ background: linear-gradient(var(--vn-section-color), $primary);
border-radius: 50%;
width: 40px;
height: 40px;
diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue
index f9704a480..cba4723e8 100644
--- a/src/pages/Order/Card/OrderSummary.vue
+++ b/src/pages/Order/Card/OrderSummary.vue
@@ -248,7 +248,7 @@ const detailsColumns = ref([
.subName {
text-transform: uppercase;
- color: var(--vn-label);
+ color: var(--vn-label-color);
}
}
}
diff --git a/src/pages/Order/OrderCatalog.vue b/src/pages/Order/OrderCatalog.vue
index 21442d10d..1ed03c47d 100644
--- a/src/pages/Order/OrderCatalog.vue
+++ b/src/pages/Order/OrderCatalog.vue
@@ -104,7 +104,7 @@ function extractTags(items) {
.no-result {
font-size: 24px;
font-weight: bold;
- color: var(--vn-label);
+ color: var(--vn-label-color);
text-align: center;
}
diff --git a/src/pages/Order/OrderLines.vue b/src/pages/Order/OrderLines.vue
index a2ee42481..5a31598e1 100644
--- a/src/pages/Order/OrderLines.vue
+++ b/src/pages/Order/OrderLines.vue
@@ -17,9 +17,9 @@ import axios from 'axios';
const route = useRoute();
const { t } = useI18n();
-const session = useSession();
+const { getTokenMultimedia } = useSession();
const quasar = useQuasar();
-const token = session.getToken();
+const token = getTokenMultimedia();
const orderSummary = ref({
total: null,
vat: null,
@@ -213,7 +213,7 @@ async function confirmOrder() {
gap: 2%;
.label {
- color: var(--vn-label);
+ color: var(--vn-label-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -246,13 +246,13 @@ async function confirmOrder() {
}
.subname {
- color: var(--vn-label);
+ color: var(--vn-label-color);
}
.no-result {
font-size: 24px;
font-weight: bold;
- color: var(--vn-label);
+ color: var(--vn-label-color);
text-align: center;
}
diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue
index b7b233a64..203eaccd1 100644
--- a/src/pages/Order/OrderList.vue
+++ b/src/pages/Order/OrderList.vue
@@ -104,7 +104,7 @@ function navigate(id) {
/>
-
+
{{ toDate(row?.landed) }}
diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue
index 5bb106edc..67f409b45 100644
--- a/src/pages/Order/OrderVolume.vue
+++ b/src/pages/Order/OrderVolume.vue
@@ -106,7 +106,7 @@ const loadVolumes = async (rows) => {
gap: 2%;
.label {
- color: var(--vn-label);
+ color: var(--vn-label-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -132,7 +132,7 @@ const loadVolumes = async (rows) => {
.no-result {
font-size: 24px;
font-weight: bold;
- color: var(--vn-label);
+ color: var(--vn-label-color);
text-align: center;
}
diff --git a/src/pages/Route/Cmr/CmrList.vue b/src/pages/Route/Cmr/CmrList.vue
index eb1901ab8..7ddfdbe24 100644
--- a/src/pages/Route/Cmr/CmrList.vue
+++ b/src/pages/Route/Cmr/CmrList.vue
@@ -12,8 +12,8 @@ import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy
const stateStore = useStateStore();
const { t } = useI18n();
-const session = useSession();
-const token = session.getToken();
+const { getTokenMultimedia } = useSession();
+const token = getTokenMultimedia();
const selected = ref([]);
const columns = computed(() => [
@@ -141,6 +141,7 @@ function downloadPdfs() {
(agencyList = data)" auto-load />
(vehicleList = data)" auto-load />
-
+
@@ -182,7 +182,7 @@ function navigateToRoadmapSummary(event, row) {
-
+
{{ t('Preview') }}
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
index 8410232c5..c1ca5507e 100644
--- a/src/pages/Route/RouteTickets.vue
+++ b/src/pages/Route/RouteTickets.vue
@@ -15,8 +15,8 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
import FetchData from 'components/FetchData.vue';
import { openBuscaman } from 'src/utils/buscaman';
import SendSmsDialog from 'components/common/SendSmsDialog.vue';
-import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue";
-import {useStateStore} from "stores/useStateStore";
+import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
+import { useStateStore } from 'stores/useStateStore';
const { t } = useI18n();
const quasar = useQuasar();
@@ -257,7 +257,7 @@ const openSmsDialog = async () => {
-
+
{{ t('Sort routes') }}
diff --git a/src/pages/Shelving/Card/ShelvingDescriptorMenu.vue b/src/pages/Shelving/Card/ShelvingDescriptorMenu.vue
index 684a46807..16351fdd4 100644
--- a/src/pages/Shelving/Card/ShelvingDescriptorMenu.vue
+++ b/src/pages/Shelving/Card/ShelvingDescriptorMenu.vue
@@ -17,15 +17,14 @@ const quasar = useQuasar();
const { t } = useI18n();
function confirmRemove() {
- quasar
- .dialog({
- component: VnConfirm,
- componentProps: {
- title: t('Confirm deletion'),
- message: t('Are you sure you want to delete this shelving?'),
- promise: remove
- },
- })
+ quasar.dialog({
+ component: VnConfirm,
+ componentProps: {
+ title: t('Confirm deletion'),
+ message: t('Are you sure you want to delete this shelving?'),
+ promise: remove,
+ },
+ });
}
async function remove() {
diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue
index 59dd2281c..86c5e586b 100644
--- a/src/pages/Supplier/Card/SupplierConsumption.vue
+++ b/src/pages/Supplier/Card/SupplierConsumption.vue
@@ -195,7 +195,7 @@ onMounted(async () => {
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
index 3abe5a9cc..a78c376a9 100644
--- a/src/pages/Supplier/Card/SupplierContacts.vue
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -117,7 +117,7 @@ onMounted(() => {
diff --git a/src/pages/Supplier/Card/SupplierSummary.vue b/src/pages/Supplier/Card/SupplierSummary.vue
index edc2c742b..9d00ba8f7 100644
--- a/src/pages/Supplier/Card/SupplierSummary.vue
+++ b/src/pages/Supplier/Card/SupplierSummary.vue
@@ -8,6 +8,7 @@ import { getUrl } from 'src/composables/getUrl';
import { useRole } from 'src/composables/useRole';
import { dashIfEmpty } from 'src/filters';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
+import VnTitle from 'src/components/common/VnTitle.vue';
onUpdated(() => summaryRef.value.fetch());
diff --git a/src/pages/Ticket/Card/TicketDescriptor.vue b/src/pages/Ticket/Card/TicketDescriptor.vue
index f0ded019b..dfbcfc106 100644
--- a/src/pages/Ticket/Card/TicketDescriptor.vue
+++ b/src/pages/Ticket/Card/TicketDescriptor.vue
@@ -98,7 +98,10 @@ const setData = (entity) =>
-
+
{{ entity.ticketState.state.name }}
diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue
index 72bfe4a67..c0c271bfc 100644
--- a/src/pages/Ticket/Card/TicketSummary.vue
+++ b/src/pages/Ticket/Card/TicketSummary.vue
@@ -12,6 +12,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import { getUrl } from 'src/composables/getUrl';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
+import VnTitle from 'src/components/common/VnTitle.vue';
onUpdated(() => summaryRef.value.fetch());
@@ -74,7 +75,7 @@ async function changeState(value) {
code: value,
};
- await axios.post(`TicketTrackings/changeState`, formData);
+ await axios.post(`Tickets/state`, formData);
router.go(route.fullPath);
}
@@ -102,8 +103,8 @@ async function changeState(value) {
@@ -131,10 +132,10 @@ async function changeState(value) {
-
+
@@ -177,10 +178,10 @@ async function changeState(value) {
/>
-
+
-
+
-
-
+
@@ -261,13 +261,12 @@ async function changeState(value) {
:value="toCurrency(ticket.totalWithVat)"
/>
-
-
+
@@ -402,10 +401,7 @@ async function changeState(value) {
class="vn-max"
v-if="ticket.packagings.length > 0 || ticket.services.length > 0"
>
-
+
@@ -422,11 +418,10 @@ async function changeState(value) {
-
-
+
@@ -471,7 +466,7 @@ async function changeState(value) {
}
.q-card.q-card--dark.q-dark.vn-one {
- & > .bodyCard{
+ & > .bodyCard {
padding: 1%;
margin-right: 40%;
}
diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue
index 72c2da57c..c5d25fed2 100644
--- a/src/pages/Ticket/TicketList.vue
+++ b/src/pages/Ticket/TicketList.vue
@@ -89,6 +89,7 @@ function navigate(id) {
-
+
{
/>
-
+
{
{
{
diff --git a/src/pages/Wagon/Type/WagonTypeList.vue b/src/pages/Wagon/Type/WagonTypeList.vue
index a7c713039..23f56e4c3 100644
--- a/src/pages/Wagon/Type/WagonTypeList.vue
+++ b/src/pages/Wagon/Type/WagonTypeList.vue
@@ -61,7 +61,6 @@ async function remove(row) {
{
return $props.id || route.params.id;
@@ -56,7 +56,7 @@ const filter = {
const sip = computed(() => worker.value?.sip && worker.value.sip.extension);
function getWorkerAvatar() {
- const token = getToken();
+ const token = getTokenMultimedia();
return `/api/Images/user/160x160/${entityId.value}/download?access_token=${token}`;
}
const data = ref(useCardDescription());
diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue
index 9d0e18b15..dad21cda5 100644
--- a/src/pages/Worker/Card/WorkerSummary.vue
+++ b/src/pages/Worker/Card/WorkerSummary.vue
@@ -8,6 +8,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import CardSummary from 'components/ui/CardSummary.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
+import VnTitle from 'src/components/common/VnTitle.vue';
const route = useRoute();
const { t } = useI18n();
@@ -71,10 +72,10 @@ const filter = {
-
+
-
+
diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue
index 5214a9066..b11d531dd 100644
--- a/src/pages/Worker/WorkerList.vue
+++ b/src/pages/Worker/WorkerList.vue
@@ -82,7 +82,6 @@ const redirectToCreateView = () => {
import('src/pages/InvoiceOut/InvoiceOutNegativeBases.vue'),
diff --git a/src/stores/invoiceOutGlobal.js b/src/stores/invoiceOutGlobal.js
index 7151aac5f..b1bcc0e7d 100644
--- a/src/stores/invoiceOutGlobal.js
+++ b/src/stores/invoiceOutGlobal.js
@@ -73,6 +73,9 @@ export const useInvoiceOutGlobalStore = defineStore({
const stringDate = data.issued.substring(0, 10);
this.minInvoicingDate = stringDate;
this.formInitialData.invoiceDate = stringDate;
+
+ this.minInvoicingDate = new Date(data.issued);
+ this.formInitialData.invoiceDate = this.minInvoicingDate;
} catch (err) {
console.error('Error fetching invoice out global initial data');
throw new Error();
@@ -103,12 +106,8 @@ export const useInvoiceOutGlobalStore = defineStore({
if (clientsToInvoice == 'all') params.clientId = undefined;
- const addressesResponse = await await axios.post(
- 'InvoiceOuts/clientsToInvoice',
- params
- );
-
- this.addresses = addressesResponse.data;
+ const { data } = await axios.post('InvoiceOuts/clientsToInvoice', params);
+ this.addresses = data;
if (!this.addresses || !this.addresses.length > 0) {
notify(
@@ -118,9 +117,9 @@ export const useInvoiceOutGlobalStore = defineStore({
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);
- });
+ }
} catch (err) {
this.handleError(err);
}
@@ -186,15 +185,10 @@ export const useInvoiceOutGlobalStore = defineStore({
this.status = 'invoicing';
this.invoicing = true;
- const invoiceResponse = await axios.post(
- 'InvoiceOuts/invoiceClient',
- params
- );
-
- if (invoiceResponse.data) {
- this.makePdfAndNotify(invoiceResponse.data, address);
- }
+ const { data } = await axios.post('InvoiceOuts/invoiceClient', params);
+ if (data) await this.makePdfAndNotify(data, address);
+ this.addressIndex++;
this.isInvoicing = false;
} catch (err) {
if (
@@ -203,8 +197,7 @@ export const useInvoiceOutGlobalStore = defineStore({
err.response.status >= 400 &&
err.response.status < 500
) {
- this.invoiceClientError(address, err.response);
- this.addressIndex++;
+ this.invoiceClientError(address, err.response?.data?.error?.message);
return;
} else {
this.invoicing = false;
@@ -227,12 +220,11 @@ export const useInvoiceOutGlobalStore = defineStore({
this.nPdfs++;
this.nRequests--;
} catch (err) {
- this.invoiceClientError(client, err, true);
+ this.invoiceClientError(client, err.response?.data?.error?.message, true);
}
},
- invoiceClientError(client, response, isWarning) {
- const message = response.data?.error?.message || response.message;
+ invoiceClientError(client, message, isWarning) {
this.errors.unshift({ client, message, isWarning });
},
diff --git a/test/cypress/integration/VnLocation.spec.js b/test/cypress/integration/VnLocation.spec.js
index 02b924e4d..5892e3ad5 100644
--- a/test/cypress/integration/VnLocation.spec.js
+++ b/test/cypress/integration/VnLocation.spec.js
@@ -40,9 +40,9 @@ describe('VnLocation', () => {
cy.waitForElement('.q-card');
});
- it('Show all options', function() {
+ it('Show locations options', function() {
cy.get(inputLocation).click();
- cy.get(locationOptions).should('have.length', 1);
+ cy.get(locationOptions).should('have.length', 5);
});
});
})
diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
index ce79dc976..5e2a5aa4c 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -4,7 +4,7 @@ describe('InvoiceInList', () => {
const firstChipId =
':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 summaryHeaders = '.summaryBody .header';
+ const summaryHeaders = '.summaryBody .header-link';
const screen = '.q-page-container > .q-drawer-container > .fullscreen';
beforeEach(() => {
@@ -17,7 +17,7 @@ describe('InvoiceInList', () => {
cy.get(firstChipId)
.invoke('text')
.then((content) => {
- const id = content.substring(4);
+ const id = content.replace(/\D/g, '');
cy.get(firstCard).click();
cy.url().should('include', `/invoice-in/${id}/summary`);
});
diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js
index b5c57f920..c950f9fed 100644
--- a/test/cypress/integration/worker/workerList.spec.js
+++ b/test/cypress/integration/worker/workerList.spec.js
@@ -16,7 +16,10 @@ describe('WorkerList', () => {
it('should open the worker summary', () => {
cy.openListSummary(0);
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').eq(1).should('have.text', 'User data');
+ cy.get('.summary .header-link')
+ .eq(0)
+ .invoke('text')
+ .should('include', 'Basic data');
+ cy.get('.summary .header-link').eq(1).should('have.text', 'User data ');
});
});
diff --git a/test/vitest/__tests__/components/Paginate.spec.js b/test/vitest/__tests__/components/Paginate.spec.js
index 2a22ce438..cf5e5d2ea 100644
--- a/test/vitest/__tests__/components/Paginate.spec.js
+++ b/test/vitest/__tests__/components/Paginate.spec.js
@@ -49,6 +49,8 @@ describe('VnPaginate', () => {
],
});
vm.arrayData.hasMoreData.value = true;
+ await vm.$nextTick();
+
vm.store.data = [
{ id: 1, name: 'Tony Stark' },
{ id: 2, name: 'Jessica Jones' },
diff --git a/test/vitest/__tests__/composables/useSession.spec.js b/test/vitest/__tests__/composables/useSession.spec.js
index 4f900aca6..f9f3dcb80 100644
--- a/test/vitest/__tests__/composables/useSession.spec.js
+++ b/test/vitest/__tests__/composables/useSession.spec.js
@@ -54,7 +54,8 @@ describe('session', () => {
expect(localStorage.getItem('token')).toEqual('tokenToBeGone');
expect(user.value).toEqual(previousUser);
- session.destroy();
+ vi.spyOn(axios, 'post').mockResolvedValue({ data: true });
+ await session.destroy();
user = state.getUser();
expect(localStorage.getItem('token')).toBeNull();
@@ -92,9 +93,10 @@ describe('session', () => {
});
const expectedToken = 'mySessionToken';
+ const expectedTokenMultimedia = 'mySessionTokenMultimedia';
const keepLogin = false;
- await session.login(expectedToken, keepLogin);
+ await session.login(expectedToken,expectedTokenMultimedia, keepLogin);
const roles = state.getRoles();
const localToken = localStorage.getItem('token');
@@ -104,7 +106,7 @@ describe('session', () => {
expect(localToken).toBeNull();
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 () => {
@@ -114,9 +116,10 @@ describe('session', () => {
});
const expectedToken = 'myLocalToken';
+ const expectedTokenMultimedia = 'myLocalTokenMultimedia';
const keepLogin = true;
- await session.login(expectedToken, keepLogin);
+ await session.login(expectedToken, expectedTokenMultimedia, keepLogin);
const roles = state.getRoles();
const localToken = localStorage.getItem('token');
@@ -126,7 +129,7 @@ describe('session', () => {
expect(localToken).toEqual(expectedToken);
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
});
});
});
diff --git a/test/vitest/__tests__/pages/Login/Login.spec.js b/test/vitest/__tests__/pages/Login/Login.spec.js
index fadfc898f..6e2de9870 100644
--- a/test/vitest/__tests__/pages/Login/Login.spec.js
+++ b/test/vitest/__tests__/pages/Login/Login.spec.js
@@ -22,9 +22,9 @@ describe('Login', () => {
darkMode: false,
},
};
- vi.spyOn(axios, 'post').mockResolvedValue({ data: { token: 'token' } });
+ vi.spyOn(axios, 'post').mockResolvedValueOnce({ data: { token: 'token' } });
vi.spyOn(axios, 'get').mockResolvedValue({
- data: { roles: [], user: expectedUser },
+ data: { roles: [], user: expectedUser , multimediaToken: {id:'multimediaToken' }},
});
vi.spyOn(vm.quasar, 'notify');
@@ -36,7 +36,7 @@ describe('Login', () => {
expect(vm.quasar.notify).toHaveBeenCalledWith(
expect.objectContaining({ type: 'positive' })
);
- vm.session.destroy();
+ await vm.session.destroy();
});
it('should not set the token into session if any error occurred', async () => {