Files
onboard/resources/js/Pages/Index.vue
brusnitsyn 2805e5e4bc * исправление подсчета операций пациентов
* поправил поле выбора даты
* добавил индикатор в контроле
* окно выбора пользователя для сводной
* привязка окна для ввода причины контроля
* добавил привязку историй пациентов для просмотра статистики по дням
* поправил фиксацию фио ответственного, убрал при диапазоне
* отключение ролей адм и зав от реплики
2026-01-30 17:26:16 +09:00

74 lines
2.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup>
import AppLayout from "../Layouts/AppLayout.vue";
import {useAuthStore} from "../Stores/auth.js";
import {NH1, NSpace, NP, NFlex} from 'naive-ui'
import StartButton from "../Components/StartButton.vue";
import {computed, ref} from "vue";
import {format} from "date-fns";
import {ru} from "date-fns/locale";
import {useNow} from "@vueuse/core";
import {TbArticle, TbChartTreemap, TbDoorExit} from "vue-icons-plus/tb";
import {useReportStore} from "../Stores/report.js";
import SelectUserModal from "./Report/Components/SelectUserModal.vue";
import {Link} from "@inertiajs/vue3";
const authStore = useAuthStore()
const reportStore = useReportStore()
const currentDate = computed(() => {
const formatted = format(useNow().value, 'PPPPpp', {
locale: ru
})
return formatted.charAt(0).toUpperCase() + formatted.slice(1)
})
const showSelectUserModal = ref(false)
const onShowSelectUserModal = () => {
if (authStore.isDoctor)
showSelectUserModal.value = true
}
const reportButtonType = computed(() => authStore.isDoctor ? 'button' : Link)
</script>
<template>
<AppLayout>
<div class="flex flex-col justify-start items-center mt-12">
<NFlex vertical align="center" justify="center" class="max-w-xl w-full">
<NSpace vertical align="center">
<NH1 class="mb-0!">
Привет {{authStore.user.name}}!
</NH1>
<NP class="mb-4!">
{{ currentDate }}
</NP>
</NSpace>
<StartButton title="Заполнить сводную"
description="Заполняется регулярно"
href="/report"
:tag="reportButtonType"
@click="onShowSelectUserModal"
:icon="TbArticle"
/>
<StartButton title="Статистика моего отделения"
:description="`Ваше отделение в системе: ${authStore.userDepartment.name_short}`"
:href="`/statistic?sent_at=${reportStore.timestampCurrentRange}&groupId=1`"
:icon="TbChartTreemap"
/>
<StartButton title="Выйти из системы"
description="Завершение работы с текущей учетной записью"
href="/dashboard"
:icon="TbDoorExit"
/>
</NFlex>
</div>
<SelectUserModal v-model:show="showSelectUserModal" />
</AppLayout>
</template>
<style scoped>
</style>