PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import { defineComponent, onMounted, ref, computed, watch } from 'vue'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { tools } from '@tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useProducts } from '@store/Products'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { ICart, IOrder, IOrderCart, IProduct, IShareWithUs } from '@src/model/Products'
|
||||
import type { ICart, IOrder, IOrderCart, IProduct } from '@src/model/Products';
|
||||
import { IShareWithUs } from '@src/model/Products'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
import { CSingleCart } from '../CSingleCart'
|
||||
import { CTitleBanner } from '@components'
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner'
|
||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||
|
||||
export default defineComponent({
|
||||
@@ -54,7 +55,7 @@ export default defineComponent({
|
||||
watch(() => isfinishLoading.value, (newval: boolean, oldval: boolean) => {
|
||||
if (isfinishLoading.value) {
|
||||
load()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const statusnow = computed(() => (): number => {
|
||||
@@ -75,7 +76,7 @@ export default defineComponent({
|
||||
} else {
|
||||
return productStore.getCart()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getItemsCart() {
|
||||
@@ -85,7 +86,7 @@ export default defineComponent({
|
||||
|
||||
function getNumItems(): number {
|
||||
const cart = getOrdersCart()
|
||||
if (!!cart.items)
|
||||
if (cart.items)
|
||||
return cart.items.length || 0
|
||||
else
|
||||
return 0
|
||||
@@ -138,7 +139,7 @@ export default defineComponent({
|
||||
oldrec.value = myrec.value
|
||||
note.value = mycart.value.note!
|
||||
|
||||
let options = {};
|
||||
const options = {};
|
||||
|
||||
if (mycart.value) {
|
||||
recOrderCart.value = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status: 0, note: note.value })
|
||||
@@ -236,11 +237,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function insertArticolo() {
|
||||
let lowerSearchText = search.value.trim();
|
||||
const lowerSearchText = search.value.trim();
|
||||
|
||||
const myprod = productStore.getProductByCode(lowerSearchText);
|
||||
if (myprod && myprod.active) {
|
||||
let myorder: IOrder = {
|
||||
const myorder: IOrder = {
|
||||
quantity: 1, quantitypreordered: 0,
|
||||
TotalPriceProduct: 0, TotalPriceProductCalc: 0, price: 0,
|
||||
idStorehouse: getActualIdStorehouse(myprod),
|
||||
|
||||
Reference in New Issue
Block a user