- creato editor di Pagine (iniziato)
- fix: mancano i "t," su alcuni componenti...
This commit is contained in:
@@ -13,6 +13,7 @@ import { useI18n } from 'vue-i18n';
|
||||
|
||||
import MixinUsers from '../../mixins/mixin-users';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { ICart } from 'app/src/model';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCart',
|
||||
@@ -31,7 +32,7 @@ export default defineComponent({
|
||||
const descr_sconto = ref('')
|
||||
const caricamentodati = ref(false)
|
||||
|
||||
const myCart = computed(() => productStore.cart);
|
||||
const myCart = computed<ICart | null>(() => productStore.cart);
|
||||
const myTotalPrice = computed(() => {
|
||||
if (productStore.cart) {
|
||||
return productStore.cart.totalPrice.toFixed(2);
|
||||
@@ -56,6 +57,14 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
|
||||
const idOrdersCart = computed(() => {
|
||||
if (!!productStore.cart) {
|
||||
return productStore.cart._id;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
});
|
||||
|
||||
const numOrders = computed(() => {
|
||||
if (!!productStore.cart && productStore.cart.items) {
|
||||
return productStore.cart.items.length;
|
||||
@@ -95,12 +104,12 @@ export default defineComponent({
|
||||
codice_sconto.value = '';
|
||||
descr_sconto.value = '';
|
||||
if (rissconto.mycart) {
|
||||
recOrderCart.value = rissconto.mycart
|
||||
myCart.value = rissconto.mycart
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
console.log('error ApplicaSconto', error);
|
||||
tools.showNegativeNotif($q, `Sconto Non Applicato! ${error.message}`);
|
||||
tools.showNegativeNotif($q, `Sconto Non Applicato! ${error?.message || ''}`);
|
||||
codice_sconto.value = '';
|
||||
descr_sconto.value = '';
|
||||
} finally {
|
||||
@@ -130,6 +139,7 @@ export default defineComponent({
|
||||
confermaCodiceSconto,
|
||||
caricamentodati,
|
||||
descr_sconto,
|
||||
idOrdersCart,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user