+
+
+
+
+
+ ADAKAH ANDA PASTI?
+
+
+
+
+
+ Saya bersetuju untuk membayar kesemua bidaan yang menang.
+
+
+
Anda mestilah bersetuju dengan akad lelong.
+
+
+
+ *Bidaan tidak dapat diubah selepas dihantar.
+
+
+
+
+
+
+
{
- this.isLoading = false;
+ this.isLoadingPadam = false;
if (response.data.success == true) {
+ this.$refs.deleteClose.click();
this.$swal.fire({
icon: "success",
title: "Surat Berjaya Dipadam",
@@ -731,7 +934,13 @@ export default {
});
this.$emit("reloadComponent");
} else if (response.data.success == false) {
- alert(response.data.message);
+ console.log(response);
+ this.$toast.add({
+ severity: "error",
+ summary: "Error",
+ detail: "Please refresh page to get latest data.",
+ life: 3000,
+ });
this.$emit("reloadComponent");
}
})
@@ -750,7 +959,8 @@ export default {
},
updateItem(value) {
this.v$.$validate();
- if (!this.v$.$error) {
+ if (!this.v$.tambahanBidaan.$error) {
+ this.isLoadingUbah = true;
this.formEdit.lelongBidId = value.id;
this.formEdit.hargabida = this.jumlahBidaan;
axios
@@ -760,7 +970,8 @@ export default {
},
})
.then((response) => {
- this.isLoading = true;
+ this.isLoadingUbah = false;
+ // this.isLoading = true;
this.$refs.editClose.click();
console.log(response);
this.$swal.fire({
@@ -771,21 +982,29 @@ export default {
allowOutsideClick: false,
allowEscapeKey: false,
});
- this.isLoading = false;
+ // this.isLoading = false;
this.$emit("reloadComponent");
})
.catch((error) => {
console.log(error);
- this.isLoading = false;
+ this.$toast.add({
+ severity: "error",
+ summary: "Error",
+ detail: "Please refresh page to get latest data.",
+ life: 3000,
+ });
+ this.isLoadingUbah = false;
});
} else {
+ console.log("masuk error");
}
},
bidderSelectBidItem() {
if (this.isSuccess == true) {
this.v$.$validate();
- if (!this.v$.$error) {
- this.loading = true;
+ if (!this.v$.akadLelong.$error) {
+ // this.loading = true;
+ this.isLoadingDaftar = true;
axios
.post("/bidder/biditem", this.formRegisterBid, {
headers: {
@@ -793,24 +1012,43 @@ export default {
},
})
.then((response) => {
- this.$refs.daftarBidaanClose.click();
- this.$swal.fire({
- icon: "success",
- title: "Bidaan Berjaya Didaftarkan",
- text: "Sila ke halaman rekod untuk senarai rekod bidaan.",
- confirmButtonColor: "#344871",
- confirmButtonText: "OK",
- allowOutsideClick: false,
- allowEscapeKey: false,
- });
- this.loading = false;
console.log(response);
- this.$emit("reloadComponent");
+ if (response.data.success == "success") {
+ this.isLoadingDaftar = false;
+ this.$refs.daftarBidaanClose.click();
+ this.$swal.fire({
+ icon: "success",
+ title: "Bidaan Berjaya Didaftarkan",
+ text: "Sila ke halaman rekod untuk senarai rekod bidaan.",
+ confirmButtonColor: "#344871",
+ confirmButtonText: "OK",
+ allowOutsideClick: false,
+ allowEscapeKey: false,
+ });
+ // this.loading = false;
+ console.log(response);
+ this.$emit("reloadComponent");
+ } else {
+ this.isLoadingDaftar = false;
+ console.log(response);
+ this.$toast.add({
+ severity: "error",
+ summary: "Error",
+ detail: "Please refresh page to get latest data.",
+ life: 3000,
+ });
+ }
})
.catch((error) => {
- this.$refs.daftarBidaanClose.click();
- this.loading = false;
+ // 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,
+ });
});
} else {
}
@@ -829,4 +1067,14 @@ export default {
},
},
};
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/src/components/cart/TheCart.vue b/src/components/cart/TheCart.vue
index 9f76a4f..1ed267e 100644
--- a/src/components/cart/TheCart.vue
+++ b/src/components/cart/TheCart.vue
@@ -1,31 +1,23 @@
-
-
Reload
-
-
+ -->
-
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 4e7de05..88f489d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -33,6 +33,9 @@ import InputText from 'primevue/inputtext';
import FileUpload from 'primevue/fileupload';
import Checkbox from 'primevue/checkbox';
import RadioButton from 'primevue/radiobutton';
+import Accordion from 'primevue/accordion';
+import AccordionTab from 'primevue/accordiontab';
+import Dialog from 'primevue/dialog';
import TheTemplate from './components/layouts/TheTemplate.vue'
import BaseCard from './components/base/BaseCard.vue'
@@ -61,6 +64,9 @@ app.component('FileUpload', FileUpload);
app.component('Checkbox', Checkbox);
app.component('Checkbox', Checkbox);
app.component('RadioButton', RadioButton);
+app.component('Accordion', Accordion);
+app.component('AccordionTab', AccordionTab);
+app.component('Dialog', Dialog);
app.use(router).use(store).use(PrimeVue).use(VueSweetalert2).use(ToastService).mount('#app');
// app.use(router).use(store).use(PrimeVue).use(ToastService).mount('#app');