forked from verdnatura/hedera-web
Add tooltips in pending orders cards action buttons
This commit is contained in:
parent
59e8285bd2
commit
79ddbe4916
|
@ -9,14 +9,14 @@ import VnSearchBar from 'src/components/ui/VnSearchBar.vue';
|
|||
import { useAppStore } from 'stores/app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useUserStore } from 'stores/user';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
// import useNotify from 'src/composables/useNotify.js';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const { isHeaderMounted } = storeToRefs(appStore);
|
||||
const { notify } = useNotify();
|
||||
// const { notify } = useNotify();
|
||||
|
||||
const loading = ref(false);
|
||||
const users = ref([]);
|
||||
|
@ -32,12 +32,13 @@ const onSearch = data => (users.value = data || []);
|
|||
|
||||
const supplantUser = async user => {
|
||||
try {
|
||||
console.log('supplant user');
|
||||
await userStore.supplantUser(user);
|
||||
await appStore.getMenuLinks();
|
||||
router.push({ name: 'confirmedOrders' });
|
||||
} catch (error) {
|
||||
console.error('Error supplanting user:', error);
|
||||
notify(error.message, 'negative');
|
||||
// notify(error.message, 'negative');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -85,9 +85,7 @@ onMounted(async () => {
|
|||
>
|
||||
<template #content>
|
||||
<QItemLabel class="text-bold q-mb-sm">
|
||||
{{
|
||||
formatDateTitle(order.sent)
|
||||
}}
|
||||
{{ formatDateTitle(order.sent) }}
|
||||
</QItemLabel>
|
||||
<QItemLabel> #{{ order.id }} </QItemLabel>
|
||||
<QItemLabel>{{ order.nickname }}</QItemLabel>
|
||||
|
@ -106,13 +104,17 @@ onMounted(async () => {
|
|||
() => removeOrder(order.id, index)
|
||||
)
|
||||
"
|
||||
/>
|
||||
>
|
||||
<QTooltip>{{ t('deleteOrder') }}</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
icon="shopping_bag"
|
||||
flat
|
||||
rounded
|
||||
@click.stop.prevent="loadOrder(order.id)"
|
||||
/>
|
||||
>
|
||||
<QTooltip>{{ t('loadOrderIntoCart') }}</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
</CardList>
|
||||
</QPage>
|
||||
|
@ -124,16 +126,26 @@ onMounted(async () => {
|
|||
en-US:
|
||||
newOrder: New order
|
||||
areYouSureDeleteOrder: Are you sure you want to delete the order?
|
||||
deleteOrder: Delete order
|
||||
loadOrderIntoCart: Load order into cart
|
||||
es-ES:
|
||||
newOrder: Nuevo pedido
|
||||
areYouSureDeleteOrder: ¿Seguro que quieres borrar el pedido?
|
||||
deleteOrder: Eliminar pedido
|
||||
loadOrderIntoCart: Cargar pedido en la cesta
|
||||
ca-ES:
|
||||
newOrder: Nova comanda
|
||||
areYouSureDeleteOrder: Segur que vols esborrar la comanda?
|
||||
deleteOrder: Eliminar comanda
|
||||
loadOrderIntoCart: Carregar comanda a la cistella
|
||||
fr-FR:
|
||||
newOrder: Nouvelle commande
|
||||
areYouSureDeleteOrder: Êtes-vous sûr de vouloir supprimer la commande?
|
||||
deleteOrder: Supprimer la commande
|
||||
loadOrderIntoCart: Charger la commande dans le panier
|
||||
pt-PT:
|
||||
newOrder: Novo pedido
|
||||
areYouSureDeleteOrder: Tem certeza de que deseja excluir o pedido?
|
||||
deleteOrder: Excluir pedido
|
||||
loadOrderIntoCart: Carregar pedido no carrinho
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue