Files
radicall/resources/js/Client/components/dashboard/ActivitiesWidget.vue
T

25 lines
1.2 KiB
Vue

<script setup>
import ActivityCard from './ActivityCard.vue'
import { formatPrice } from '../../utils/numberUtils'
const props = defineProps({
stats: {
type: Object,
required: true
}
})
</script>
<template>
<section class="grid grid-cols-4 max-lg:grid-cols-2 max-sm:grid-cols-1 gap-4">
<ActivityCard title="کیس در انتظار بررسی"
:count="stats.pending_cases" link="/dashboard/cases" label-link="مشاهده و بررسی" />
<ActivityCard title="کیس بررسی شده در ماه"
:count="stats.monthly_reviewed" link="/dashboard/reports" label-link="مشاهده گزارشات کیس‌ها" />
<ActivityCard :title="stats.is_doctor ? 'تومان درآمد' : 'تومان هزینه در ماه'"
:count="formatPrice(stats.monthly_amount)" :link="stats.is_doctor ? '/dashboard/wallet' : '/dashboard/invoices'" label-link="مشاهده گزارشات مالی" />
<ActivityCard v-if="stats.next_shift_hours !== null" title="ساعت تا شیفت بعدی"
:count="stats.next_shift_hours" link="/dashboard/shifts" label-link="مشاهده شیفت‌ها" />
</section>
</template>