Fix bundle request from pilot 3

This commit is contained in:
Amir
2022-12-26 09:34:14 +08:00
parent 002e2a99fe
commit 28eaf68a11
12 changed files with 1412 additions and 80 deletions
+1269 -55
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -24,9 +24,12 @@
"primeflex": "^3.2.1",
"primeicons": "^6.0.1",
"primevue": "^3.17.0",
"v-viewer": "^1.6.4",
"vue": "^3.2.13",
"vue-html2pdf": "^1.8.0",
"vue-router": "^4.0.14",
"vue-sweetalert2": "^5.0.5",
"vue3-youtube": "^0.1.9",
"vuex": "^4.0.2"
},
"devDependencies": {
+10
View File
@@ -5749,3 +5749,13 @@
border-radius: 6px;
font-weight: 700;
}
.blink {
animation: blinker 1s linear infinite;
}
@keyframes blinker {
80% {
opacity: 0;
}
}
+10 -7
View File
@@ -98,9 +98,7 @@
<div class="btn btn-warning btn-sm mr-4">
<terms-and-conditions></terms-and-conditions>
</div>
<a
class="btn btn-info btn-sm"
href="https://lelong.arrahn.com.my"
<a class="btn btn-info btn-sm" href="https://lelong.arrahn.com.my"
>Pautan Sistem Lelong</a
>
</div>
@@ -135,6 +133,7 @@ export default {
axios
.post("/user/login", this.form)
.then((response) => {
// console.log("doLogin", response);
if (response.data.statusAkaun == 1) {
localStorage.setItem("token", response.data.token);
localStorage.setItem("id", response.data.user.id);
@@ -154,7 +153,6 @@ export default {
detail: "Tiada akaun dalam database. Sila daftar sekarang.",
life: 10000,
});
console.log(response, "status 0");
} else if (response.data.statusAkaun == 2) {
this.$toast.add({
severity: "error",
@@ -163,7 +161,6 @@ export default {
"Akaun anda telah dibanned. Sila hubungi pihak pengurusan untuk maklumat lebih lanjut.",
life: 10000,
});
console.log(response, "status 2");
} else if (response.data.statusAkaun == 3) {
this.$toast.add({
severity: "error",
@@ -172,7 +169,6 @@ export default {
"Account rejected. Please contact administrator for further information.",
life: 10000,
});
console.log(response, "status 3");
} else if (response.data.statusAkaun == 4) {
this.$toast.add({
severity: "info",
@@ -180,7 +176,6 @@ export default {
detail: "Registration in progress,status wait for approval",
life: 10000,
});
console.log(response, "status 4");
} else if (response.data.statusAkaun == 5) {
this.$toast.add({
severity: "error",
@@ -189,6 +184,14 @@ export default {
life: 10000,
});
console.log(response);
} else if (response.data.statusAkaun == 6) {
this.$toast.add({
severity: "warn",
summary: "Akaun ini didaftar menggunakan id staff.",
detail:
"Sila log masuk menggunakan url https://adminbid.arrahn.com.my ",
life: 10000,
});
}
this.isLoading = false;
})
+7 -9
View File
@@ -285,7 +285,7 @@
</div>
</div>
<Button
icon="pi pi-delete-left"
icon="pi pi-trash"
label="Padam Surat"
data-bs-toggle="modal"
iconPos="right"
@@ -415,15 +415,13 @@
</div>
<div class="modal-footer">
<Button
class="p-button-sm p-button-text"
class="p-button-sm p-button-danger m-1"
label="Batal"
icon="pi pi-times"
iconPos="right"
data-bs-dismiss="modal"
/>
<Button
class="p-button-sm"
icon="pi pi-check"
class="p-button-sm p-button-success m-1"
icon="pi pi-file-edit"
iconPos="right"
label="Ubah"
:loading="isLoadingUbah"
@@ -486,13 +484,13 @@
</div>
<div class="modal-footer">
<Button
class="p-button-sm mr-2"
class="p-button-sm p-button-danger mr-2"
label="Batal"
data-bs-dismiss="modal"
/>
<Button
class="p-button-sm p-button-outlined"
icon="pi pi-times"
class="p-button-sm p-button-success"
icon="pi pi-trash"
iconPos="right"
label="Padam"
:loading="isLoadingPadam"
@@ -0,0 +1,61 @@
<template>
<div v-if="isSuccessCart" class="p-message p-component p-message-error" role="alert">
<div class="p-message-wrapper">
<span class="blink p-message-icon pi pi pi-info-circle"></span>
<div class="p-message-text">
<div class="font-bold">
{{itemInCart}} surat dalam Troli anda.
Sila ke<a class="ml-1 text-blue" @click="toCart()" href="#">
<span class="underline">Troli</span>
</a>
dan klik "Teruskan" bagi meneruskan bidaan anda.
</div>
</div>
</div>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
isSuccessCart: false,
itemInCart: 0,
};
},
mounted: function () {
this.getItemInCart();
},
methods: {
toCart() {
this.$router.push({ name: "cart" });
},
getItemInCart() {
axios
.get("/itemInCart", {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
params: {
user_id: localStorage.getItem("id"),
},
})
.then((response) => {
// console.log("getItemInCart", response);
if (response.data.success === true) {
this.isSuccessCart = true;
this.itemInCart = response.data.cart;
} else {
this.isSuccessCart = false;
}
})
.catch((error) => {
console.log(error);
});
},
},
};
</script>
@@ -11,7 +11,6 @@
</Message>
</div>
</div>
<div v-else></div>
</template>
<script>
+5
View File
@@ -4,6 +4,9 @@
<div class="col-12">
<result-notification></result-notification>
</div>
<div class="col-12">
<item-in-cart-notification></item-in-cart-notification>
</div>
<div class="col-12 lg:col-7">
<lelong-today></lelong-today>
<lelong-next></lelong-next>
@@ -20,6 +23,7 @@ import LelongToday from "./LelongToday.vue";
import LelongNext from "./LelongNext.vue";
import CurrentKarat from "./CurrentKarat.vue";
import ResultNotification from "./ResultNotification.vue";
import ItemInCartNotification from "./ItemInCartNotification.vue";
export default {
components: {
@@ -27,6 +31,7 @@ export default {
"lelong-next": LelongNext,
"current-karat": CurrentKarat,
"result-notification": ResultNotification,
"item-in-cart-notification": ItemInCartNotification,
},
};
</script>
+1 -1
View File
@@ -134,7 +134,7 @@
notification-mobile
"
>
<i class="pi pi-info-circle mr-2"></i> Lelongan akan tamat pada
<i class="blink pi pi-info-circle mr-2"></i> Lelongan akan tamat pada
{{ lelongOnline }}
</div>
</div>
+1 -3
View File
@@ -1,7 +1,5 @@
<template>
<div v-if="isLoading" class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<Skeleton v-if="isLoading" height="10rem" width="20rem"></Skeleton>
<Image v-else :src="dataUrl" alt="Gambar Marhun" width="250" preview>
<template #indicator> Lihat Gambar </template>
</Image>
+38 -3
View File
@@ -7,12 +7,43 @@
</template>
<template #content>
<TabView>
<TabPanel :header="'Panduan ArrahnBid'">
<p>
Berikut merupakan video panduan untuk penggunaan
ArrahnBid. Sila tonton video ini untuk memahami cara penggunaan.
</p>
<div class="lg:flex hidden justify-content-center">
<YouTube v-bind:src="theUrl" />
</div>
<div
class="
lg:hidden
md:flex
hidden
overflow-x-auto
justify-content-center
"
>
<YouTube v-bind:src="theUrl" width="480" height="360" />
</div>
<div
class="
lg:hidden
md:hidden
flex
overflow-x-auto
justify-content-center
"
>
<YouTube v-bind:src="theUrl" width="320" height="240" />
</div>
</TabPanel>
<TabPanel :header="'Terma & Syarat'">
<terms-and-conditions-details></terms-and-conditions-details>
</TabPanel>
<TabPanel :header="'Hubungi Kami'">
<div class="grid justify-content-center" style="height: 50vh">
<div class="col-12 mb-4 text-center" style="align-self:end">
<div class="col-12 mb-4 text-center" style="align-self: end">
<i class="pi pi-wrench text-8xl text-400"></i>
</div>
<div class="col-12 text-center">
@@ -24,8 +55,7 @@
</template>
</Card>
</div>
<ScrollTop :threshold="200"/>
<ScrollTop :threshold="200" />
</the-template>
</template>
@@ -36,5 +66,10 @@ export default {
components: {
"terms-and-conditions-details": TermsAndConditionsDetails,
},
data() {
return {
theUrl: "https://www.youtube.com/watch?v=lucYE9bM_PY&t=53s",
};
},
};
</script>
+7 -1
View File
@@ -51,6 +51,11 @@ import ScrollTop from 'primevue/scrolltop';
import 'maz-ui/css/main.css'
import MazPhoneNumberInput from 'maz-ui/components/MazPhoneNumberInput'
import YouTube from "vue3-youtube";
import 'viewerjs/dist/viewer.css';
import VueViewer from 'v-viewer';
import TheTemplate from './components/layouts/TheTemplate.vue'
import BaseCard from './components/base/BaseCard.vue'
import TermsAndConditions from './components/authentication/TermsAndConditions.vue'
@@ -93,9 +98,10 @@ app.component('Textarea', Textarea);
app.directive('tooltip', Tooltip);
app.component('ScrollTop', ScrollTop);
app.component('MazPhoneNumberInput', MazPhoneNumberInput)
app.component('YouTube', YouTube)
app.use(router).use(store).use(PrimeVue).use(VueSweetalert2).use(ToastService).mount('#app');
// app.use(router).use(store).use(PrimeVue).use(ToastService).mount('#app');