Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into CambiosSolicitadosSuppliers
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
98c92abba2
|
@ -1,6 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue';
|
import { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue';
|
||||||
|
import { onBeforeRouteLeave } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
@ -8,6 +9,7 @@ import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useValidator } from 'src/composables/useValidator';
|
import { useValidator } from 'src/composables/useValidator';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import SkeletonForm from 'components/ui/SkeletonForm.vue';
|
import SkeletonForm from 'components/ui/SkeletonForm.vue';
|
||||||
|
import VnConfirm from './ui/VnConfirm.vue';
|
||||||
|
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
|
@ -97,6 +99,19 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onBeforeRouteLeave((to, from, next) => {
|
||||||
|
if (!hasChanges.value) next();
|
||||||
|
|
||||||
|
quasar.dialog({
|
||||||
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
|
title: t('Unsaved changes will be lost'),
|
||||||
|
message: t('Are you sure exit without saving?'),
|
||||||
|
promise: () => next(),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// Restauramos los datos originales en el store si se realizaron cambios en el formulario pero no se guardaron, evitando modificaciones erróneas.
|
// Restauramos los datos originales en el store si se realizaron cambios en el formulario pero no se guardaron, evitando modificaciones erróneas.
|
||||||
if (hasChanges.value) {
|
if (hasChanges.value) {
|
||||||
|
@ -264,3 +279,8 @@ watch(formUrl, async () => {
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
Unsaved changes will be lost: Los cambios que no haya guardado se perderán
|
||||||
|
Are you sure exit without saving?: ¿Seguro que quiere salir sin guardar?
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -94,16 +94,6 @@ async function send() {
|
||||||
<QSpace />
|
<QSpace />
|
||||||
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
<QBtn icon="close" :disable="isLoading" flat round dense v-close-popup />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection v-if="props.locale">
|
|
||||||
<QBanner class="bg-amber text-white" rounded dense>
|
|
||||||
<template #avatar>
|
|
||||||
<QIcon name="warning" />
|
|
||||||
</template>
|
|
||||||
<span
|
|
||||||
v-html="t('CustomerDefaultLanguage', { locale: t(props.locale) })"
|
|
||||||
></span>
|
|
||||||
</QBanner>
|
|
||||||
</QCardSection>
|
|
||||||
<QCardSection class="q-pb-xs">
|
<QCardSection class="q-pb-xs">
|
||||||
<QSelect
|
<QSelect
|
||||||
:label="t('Language')"
|
:label="t('Language')"
|
||||||
|
@ -184,11 +174,10 @@ async function send() {
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
CustomerDefaultLanguage: This customer uses <strong>{locale}</strong> as their default language
|
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Your order is pending of payment.
|
pendingPayment: 'Your order is pending of payment.
|
||||||
Please, enter the website and make the payment with a credit card. Thank you.'
|
Please, enter the website and make the payment with a credit card. Thank you.'
|
||||||
minAmount: 'A minimum amount of 50€ (VAT excluded) is required for your order
|
minAmount: 'A minimum amount of 50€ (VAT excluded) is required for your order
|
||||||
{ orderId } of { shipped } to receive it without additional shipping costs.'
|
{ orderId } of { shipped } to receive it without additional shipping costs.'
|
||||||
orderChanges: 'Order {orderId} of { shipped }: { changes }'
|
orderChanges: 'Order {orderId} of { shipped }: { changes }'
|
||||||
en: English
|
en: English
|
||||||
|
@ -197,7 +186,6 @@ en:
|
||||||
pt: Portuguese
|
pt: Portuguese
|
||||||
es:
|
es:
|
||||||
Send SMS: Enviar SMS
|
Send SMS: Enviar SMS
|
||||||
CustomerDefaultLanguage: Este cliente utiliza <strong>{locale}</strong> como idioma por defecto
|
|
||||||
Language: Idioma
|
Language: Idioma
|
||||||
Phone: Móvil
|
Phone: Móvil
|
||||||
Subject: Asunto
|
Subject: Asunto
|
||||||
|
@ -205,7 +193,7 @@ es:
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Su pedido está pendiente de pago.
|
pendingPayment: 'Su pedido está pendiente de pago.
|
||||||
Por favor, entre en la página web y efectue el pago con tarjeta. Muchas gracias.'
|
Por favor, entre en la página web y efectue el pago con tarjeta. Muchas gracias.'
|
||||||
minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido
|
minAmount: 'Es necesario un importe mínimo de 50€ (Sin IVA) en su pedido
|
||||||
{ orderId } del día { shipped } para recibirlo sin portes adicionales.'
|
{ orderId } del día { shipped } para recibirlo sin portes adicionales.'
|
||||||
orderChanges: 'Pedido {orderId} día { shipped }: { changes }'
|
orderChanges: 'Pedido {orderId} día { shipped }: { changes }'
|
||||||
en: Inglés
|
en: Inglés
|
||||||
|
@ -222,7 +210,7 @@ fr:
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Votre commande est en attente de paiement.
|
pendingPayment: 'Votre commande est en attente de paiement.
|
||||||
Veuillez vous connecter sur le site web et effectuer le paiement par carte. Merci beaucoup.'
|
Veuillez vous connecter sur le site web et effectuer le paiement par carte. Merci beaucoup.'
|
||||||
minAmount: 'Un montant minimum de 50€ (TVA non incluse) est requis pour votre commande
|
minAmount: 'Un montant minimum de 50€ (TVA non incluse) est requis pour votre commande
|
||||||
{ orderId } du { shipped } afin de la recevoir sans frais de port supplémentaires.'
|
{ orderId } du { shipped } afin de la recevoir sans frais de port supplémentaires.'
|
||||||
orderChanges: 'Commande { orderId } du { shipped }: { changes }'
|
orderChanges: 'Commande { orderId } du { shipped }: { changes }'
|
||||||
en: Anglais
|
en: Anglais
|
||||||
|
@ -239,7 +227,7 @@ pt:
|
||||||
templates:
|
templates:
|
||||||
pendingPayment: 'Seu pedido está pendente de pagamento.
|
pendingPayment: 'Seu pedido está pendente de pagamento.
|
||||||
Por favor, acesse o site e faça o pagamento com cartão. Muito obrigado.'
|
Por favor, acesse o site e faça o pagamento com cartão. Muito obrigado.'
|
||||||
minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido
|
minAmount: 'É necessário um valor mínimo de 50€ (sem IVA) em seu pedido
|
||||||
{ orderId } do dia { shipped } para recebê-lo sem custos de envio adicionais.'
|
{ orderId } do dia { shipped } para recebê-lo sem custos de envio adicionais.'
|
||||||
orderChanges: 'Pedido { orderId } dia { shipped }: { changes }'
|
orderChanges: 'Pedido { orderId } dia { shipped }: { changes }'
|
||||||
en: Inglês
|
en: Inglês
|
||||||
|
|
Loading…
Reference in New Issue