From 64bfad8f09bc1fac6525b70fa47e33e1c02e2a50 Mon Sep 17 00:00:00 2001 From: Amir Date: Tue, 11 Oct 2022 04:41:20 +0800 Subject: [PATCH] fix list --- src/components/cart/CartListNew.vue | 56 +++-- src/components/list/ListItem.vue | 378 +++++++++++++++++++--------- src/components/list/TheList.vue | 2 +- 3 files changed, 302 insertions(+), 134 deletions(-) diff --git a/src/components/cart/CartListNew.vue b/src/components/cart/CartListNew.vue index 882f11d..3556949 100644 --- a/src/components/cart/CartListNew.vue +++ b/src/components/cart/CartListNew.vue @@ -980,11 +980,15 @@ export default { this.$emit("reloadComponent"); } else if (response.data.success == false) { console.log(response); - this.$toast.add({ - severity: "error", - summary: "Error", - detail: "Please refresh page to get latest data.", - life: 3000, + this.$swal.fire({ + toast: true, + icon: "error", + title: "Gagal! Sila refresh page semula.", + animation: false, + position: "bottom", + showConfirmButton: false, + timer: 5000, + timerProgressBar: true, }); this.$emit("reloadComponent"); } @@ -1032,11 +1036,15 @@ export default { }) .catch((error) => { console.log(error); - this.$toast.add({ - severity: "error", - summary: "Error", - detail: "Please refresh page to get latest data.", - life: 3000, + this.$swal.fire({ + toast: true, + icon: "error", + title: "Gagal! Sila refresh page semula.", + animation: false, + position: "bottom", + showConfirmButton: false, + timer: 5000, + timerProgressBar: true, }); this.isLoadingUbah = false; }); @@ -1076,11 +1084,15 @@ export default { } else { this.isLoadingDaftar = false; console.log(response); - this.$toast.add({ - severity: "error", - summary: "Error", - detail: "Please refresh page to get latest data.", - life: 3000, + this.$swal.fire({ + toast: true, + icon: "error", + title: "Gagal! Sila refresh page semula.", + animation: false, + position: "bottom", + showConfirmButton: false, + timer: 5000, + timerProgressBar: true, }); } }) @@ -1088,11 +1100,15 @@ export default { // this.$refs.daftarBidaanClose.click(); // this.loading = false; console.log(error); - this.$toast.add({ - severity: "error", - summary: "Error", - detail: "Please refresh page to get latest data.", - life: 3000, + this.$swal.fire({ + toast: true, + icon: "error", + title: "Gagal! Sila refresh page semula.", + animation: false, + position: "bottom", + showConfirmButton: false, + timer: 5000, + timerProgressBar: true, }); }); } else { diff --git a/src/components/list/ListItem.vue b/src/components/list/ListItem.vue index ba068fe..5850bcd 100644 --- a/src/components/list/ListItem.vue +++ b/src/components/list/ListItem.vue @@ -1,10 +1,10 @@