0
1
Fork 0

More fixes and adjustments

This commit is contained in:
William Buezas 2024-10-03 11:44:13 -03:00
parent a97219ad59
commit ef3b41e4e2
7 changed files with 19 additions and 22 deletions

View File

@ -73,7 +73,7 @@ export default {
Reports: 'Informes', Reports: 'Informes',
Configuration: 'Configuració', Configuration: 'Configuració',
Shelves: 'Prestatgeries', Shelves: 'Prestatgeries',
Account: 'Compte', Account: 'Configuració',
Addresses: 'Adreces', Addresses: 'Adreces',
OrderSummary: 'Resum de la comanda', OrderSummary: 'Resum de la comanda',
Checkout: `Configurar l'encarrec`, Checkout: `Configurar l'encarrec`,

View File

@ -85,7 +85,7 @@ export default {
Reports: 'Reports', Reports: 'Reports',
Configuration: 'Configuration', Configuration: 'Configuration',
Shelves: 'Shelves', Shelves: 'Shelves',
Account: 'Account', Account: 'Configuration',
Addresses: 'Addresses', Addresses: 'Addresses',
OrderSummary: 'Order summary', OrderSummary: 'Order summary',
Checkout: 'Configure order', Checkout: 'Configure order',

View File

@ -67,11 +67,11 @@ export default {
'Pending orders': 'Pedidos pendientes', 'Pending orders': 'Pedidos pendientes',
'Last orders': 'Pedidos confirmados', 'Last orders': 'Pedidos confirmados',
Invoices: 'Facturas', Invoices: 'Facturas',
Basket: 'Cesta', Basket: 'Cesta de la compra',
Catalog: 'Catálogo', Catalog: 'Catálogo',
Administration: 'Administración', Administration: 'Administración',
'Control panel': 'Panel de control', 'Control panel': 'Panel de control',
Users: 'Usuarios', Users: 'Gestión de usuarios',
Connections: 'Conexiones', Connections: 'Conexiones',
Visits: 'Visitas', Visits: 'Visitas',
News: 'Gestión de noticias', News: 'Gestión de noticias',
@ -82,7 +82,7 @@ export default {
Reports: 'Informes', Reports: 'Informes',
Configuration: 'Configuración', Configuration: 'Configuración',
Shelves: 'Estanterías', Shelves: 'Estanterías',
Account: 'Cuenta', Account: 'Configuración',
Addresses: 'Direcciones', Addresses: 'Direcciones',
OrderSummary: 'Resumen del pedido', OrderSummary: 'Resumen del pedido',
Checkout: 'Configurar pedido', Checkout: 'Configurar pedido',

View File

@ -73,7 +73,7 @@ export default {
Reports: 'Rapports', Reports: 'Rapports',
Configuration: 'Configuration', Configuration: 'Configuration',
Shelves: 'Étagères', Shelves: 'Étagères',
Account: 'Compte', Account: 'Configuration',
Addresses: 'Adresses', Addresses: 'Adresses',
OrderSummary: 'Résumé de la commande', OrderSummary: 'Résumé de la commande',
Checkout: 'Configurer la commande', Checkout: 'Configurer la commande',

View File

@ -72,7 +72,7 @@ export default {
Reports: 'Informes', Reports: 'Informes',
Configuration: 'Configuração', Configuration: 'Configuração',
Shelves: 'Estantes', Shelves: 'Estantes',
Account: 'Conta', Account: 'Configuração',
Addresses: 'Moradas', Addresses: 'Moradas',
OrderSummary: 'Resumo da encomenda', OrderSummary: 'Resumo da encomenda',
Checkout: 'Configurar encomenda', Checkout: 'Configurar encomenda',

View File

@ -104,21 +104,27 @@ const fetchData = async () => {
:to="{ name: 'checkout', params: { id: orderId } }" :to="{ name: 'checkout', params: { id: orderId } }"
rounded rounded
no-caps no-caps
/> >
<QTooltip>{{ t('configureOrder') }}</QTooltip>
</QBtn>
<QBtn <QBtn
icon="shopping_bag" icon="shopping_bag"
:label="t('catalog')" :label="t('catalog')"
:to="{ name: 'catalog' }" :to="{ name: 'catalog' }"
rounded rounded
no-caps no-caps
/> >
<QTooltip>{{ t('catalog') }}</QTooltip>
</QBtn>
<QBtn <QBtn
icon="shopping_cart_checkout" icon="shopping_cart_checkout"
:label="t('checkout')" :label="t('checkout')"
:to="{ name: 'confirm', params: { id: orderId } }" :to="{ name: 'confirm', params: { id: orderId } }"
rounded rounded
no-caps no-caps
/> >
<QTooltip>{{ t('checkout') }}</QTooltip>
</QBtn>
</Teleport> </Teleport>
<QPage> <QPage>
<TicketDetails <TicketDetails

View File

@ -38,7 +38,6 @@ export const useUserStore = defineStore('user', () => {
const init = async _router => { const init = async _router => {
router = _router; router = _router;
isGuest.value = localStorage.getItem('hederaGuest') || false; isGuest.value = localStorage.getItem('hederaGuest') || false;
console.log('isGuest.value', isGuest.value);
await getToken(); await getToken();
if (!loggedIn.value) { if (!loggedIn.value) {
const autoLoginStatus = await tryAutoLogin(); const autoLoginStatus = await tryAutoLogin();
@ -179,9 +178,6 @@ export const useUserStore = defineStore('user', () => {
Math.min(ttl, tokenConfig.value?.renewPeriod) * 1000; Math.min(ttl, tokenConfig.value?.renewPeriod) * 1000;
const maxDate = created + renewPeriodInSeconds; const maxDate = created + renewPeriodInSeconds;
const now = new Date().getTime(); const now = new Date().getTime();
console.log('renewPeriodInSeconds', renewPeriodInSeconds);
console.log('maxDate', maxDate);
console.log('now', now);
if (isNaN(renewPeriodInSeconds) || now <= maxDate) { if (isNaN(renewPeriodInSeconds) || now <= maxDate) {
isCheckingToken.value = false; isCheckingToken.value = false;
@ -198,8 +194,7 @@ export const useUserStore = defineStore('user', () => {
const startInterval = () => { const startInterval = () => {
stopRenewer(); stopRenewer();
// const renewPeriod = +storage.value.getItem('renewPeriod'); const renewPeriod = +storage.value.getItem('renewPeriod');
const renewPeriod = 5;
if (!renewPeriod) return; if (!renewPeriod) return;
intervalId.value = setInterval( intervalId.value = setInterval(
() => checkValidity(), () => checkValidity(),
@ -267,12 +262,8 @@ export const useUserStore = defineStore('user', () => {
watch( watch(
[mainUser, supplantedUser], [mainUser, supplantedUser],
() => { () => (user.value = supplantedUser.value || mainUser.value),
user.value = supplantedUser.value || mainUser.value;
console.log('mainUser.value', mainUser.value);
console.log('supplantedUser.value', supplantedUser.value);
console.log('user.value', user.value);
},
{ immediate: true } { immediate: true }
); );