This commit is contained in:
Viet An
2026-06-08 22:37:23 +07:00
parent 853f969921
commit 5f39f5b0ec
14 changed files with 285 additions and 150 deletions

View File

@@ -7,7 +7,7 @@ const props = defineProps({
variant: Object,
});
const store = useStore();
const { $getdata, $snackbar } = useNuxtApp();
const { $getdata, $insertapi, $snackbar } = useNuxtApp();
const emit = defineEmits(["close"]);
const isLoading = ref(false);
@@ -26,7 +26,10 @@ function toggleSelected(imeiRec) {
}
function addToCart() {
store.selectedImeis = [...store.selectedImeis, ...selectedImeis.value];
// store.selectedImeis = [...store.selectedImeis, ...selectedImeis.value];
/*
insert into cart with customer =
*/
$snackbar(`Thêm ${selectedImeis.value.length} sản phẩm vào giỏ hàng`, "Success");
emit("close");
}