feat: add withdraw request functionality and UI components
This commit is contained in:
@@ -7,9 +7,10 @@ import UiButton from '../../components/ui/UiButton.vue';
|
||||
import EyeSvg from '../../components/svg/eye.svg';
|
||||
import UiCard from '../../components/ui/UiCard.vue';
|
||||
import RequestCard from '../../components/dashboard/RequestCard.vue';
|
||||
import { ref } from 'vue';
|
||||
import { Link } from '@inertiajs/inertia-vue3';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { Link, usePage } from '@inertiajs/inertia-vue3';
|
||||
import FastRequestModal from '../../components/dashboard/FastRequestModal.vue';
|
||||
import PaymentResultModal from '../../components/dashboard/PaymentResultModal.vue';
|
||||
import { useFastRequestStore } from '../../store/FastRequest';
|
||||
import { modalities } from '../../data/fastRequestOptions';
|
||||
import { caseColumns } from '../../data/casesTableColumns';
|
||||
@@ -22,6 +23,17 @@ const openFastRequestModal = (type) => {
|
||||
fastRequestStore.requestType = type;
|
||||
}
|
||||
|
||||
const paymentResultVisible = ref(false);
|
||||
const paymentResult = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
const result = usePage().props.value.flash?.payment_result;
|
||||
if (result) {
|
||||
paymentResult.value = result;
|
||||
paymentResultVisible.value = true;
|
||||
}
|
||||
})
|
||||
|
||||
defineProps({
|
||||
user: {
|
||||
type: Object,
|
||||
@@ -30,13 +42,17 @@ defineProps({
|
||||
cases: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
stats: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ClientLayout>
|
||||
<ActivitiesWidget />
|
||||
<ActivitiesWidget :stats="stats" />
|
||||
<UiCard title="ثبت آنی درخواست جدید" variant="default" class="mt-4">
|
||||
<p class="w-full flex items-center justify-start font-[400] text-[11px]">فقط چند قدم ساده برای ثبت درخواست کافیه.</p>
|
||||
<div class="w-full h-[179px] grid grid-cols-5 gap-3 justify-start pt-[10px]">
|
||||
@@ -77,5 +93,6 @@ defineProps({
|
||||
<ActivitiesChart />
|
||||
</UiCard>
|
||||
<fast-request-modal v-model:visible="fastRequestModalVisible"></fast-request-modal>
|
||||
<payment-result-modal v-model:visible="paymentResultVisible" :result="paymentResult"></payment-result-modal>
|
||||
</ClientLayout>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user