diff --git a/resources/js/Pages/Report/Components/ReportHeader.vue b/resources/js/Pages/Report/Components/ReportHeader.vue
index 702329e..7ca28e8 100644
--- a/resources/js/Pages/Report/Components/ReportHeader.vue
+++ b/resources/js/Pages/Report/Components/ReportHeader.vue
@@ -58,11 +58,11 @@ const currentDate = computed(() => {
- {{ authStore.userDepartment.name_full }}
+ {{ reportStore.reportInfo.department.department_name }}
-
- Ответственный: {{ reportStore.reportInfo?.report.userName }}
+
+ Ответственный: {{ reportStore.reportInfo.report.userName }}
diff --git a/resources/js/Pages/Report/Components/ReportSectionHeader.vue b/resources/js/Pages/Report/Components/ReportSectionHeader.vue
index 21714ac..87b4a0e 100644
--- a/resources/js/Pages/Report/Components/ReportSectionHeader.vue
+++ b/resources/js/Pages/Report/Components/ReportSectionHeader.vue
@@ -23,7 +23,8 @@ const fetchPatientCount = async () => {
const data = {
status: props.status,
startAt: reportStore.timestampCurrentRange[0],
- endAt: reportStore.timestampCurrentRange[1]
+ endAt: reportStore.timestampCurrentRange[1],
+ departmentId: reportStore.reportInfo.department.department_id
}
await axios.post('/api/mis/patients/count', data).then((res) => {
countPatient.value = res.data
diff --git a/resources/js/Pages/Report/Components/ReportSectionItem.vue b/resources/js/Pages/Report/Components/ReportSectionItem.vue
index e38fcff..38a5385 100644
--- a/resources/js/Pages/Report/Components/ReportSectionItem.vue
+++ b/resources/js/Pages/Report/Components/ReportSectionItem.vue
@@ -229,6 +229,7 @@ const fetchPatients = async () => {
status: props.status,
startAt: reportStore.timestampCurrentRange[0],
endAt: reportStore.timestampCurrentRange[1],
+ departmentId: reportStore.reportInfo.department.department_id
}
await axios.post('/api/mis/patients', data).then((res) => {
patientsData.value[props.status] = reportStore.addRowNumbers(res.data)
diff --git a/resources/js/Pages/Report/Components/SelectUserModal.vue b/resources/js/Pages/Report/Components/SelectUserModal.vue
index d9d4b9f..1af9dfa 100644
--- a/resources/js/Pages/Report/Components/SelectUserModal.vue
+++ b/resources/js/Pages/Report/Components/SelectUserModal.vue
@@ -1,56 +1,139 @@
@@ -68,12 +151,25 @@ const onAfterLeave = () => {
filterable
/>
+
+
+
+
+ Сводная уже создана.
+
+ Перейти
+
+
+ @click="onSubmit"
+ :disabled="reportExists">
Перейти к заполнению сводной
diff --git a/resources/js/Pages/Statistic/Components/ModalObservablePatients.vue b/resources/js/Pages/Statistic/Components/ModalObservablePatients.vue
new file mode 100644
index 0000000..0d54d55
--- /dev/null
+++ b/resources/js/Pages/Statistic/Components/ModalObservablePatients.vue
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/js/Pages/Statistic/Components/ModalUnwantedEvents.vue b/resources/js/Pages/Statistic/Components/ModalUnwantedEvents.vue
new file mode 100644
index 0000000..7aaeb9c
--- /dev/null
+++ b/resources/js/Pages/Statistic/Components/ModalUnwantedEvents.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ event.title }}
+
+
+
+ {{ event.created_at }}
+
+
+
+ {{ event.comment }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/js/Pages/Statistic/Index.vue b/resources/js/Pages/Statistic/Index.vue
index 912b9ce..3962a6a 100644
--- a/resources/js/Pages/Statistic/Index.vue
+++ b/resources/js/Pages/Statistic/Index.vue
@@ -1,9 +1,12 @@
@@ -256,9 +257,12 @@ const rowProps = (row) => {
min-height="calc(100vh - 48px - 70px)"
max-height="calc(100vh - 48px - 70px)"
:row-props="rowProps"
+ :row-class-name="rowClassName"
>
+
+
@@ -267,4 +271,9 @@ const rowProps = (row) => {
:deep(.n-data-table-td) {
font-size: var(--n-font-size);
}
+
+:deep(.total-row td) {
+ --n-td-text-color: var(--n-th-icon-color-active);
+ font-weight: 500;
+}
diff --git a/resources/js/Stores/report.js b/resources/js/Stores/report.js
index 83d186d..acfc045 100644
--- a/resources/js/Stores/report.js
+++ b/resources/js/Stores/report.js
@@ -5,6 +5,7 @@ import {router} from "@inertiajs/vue3";
export const useReportStore = defineStore('reportStore', () => {
const timestampNow = useTimestamp()
+ const reportFormRef = ref(null)
const _timestampCurrent = ref(null)
const timestampCurrent = computed({
@@ -93,7 +94,7 @@ export const useReportStore = defineStore('reportStore', () => {
return result
}
- const sendReportForm = (assignForm) => {
+ const sendReportForm = (assignForm = null) => {
const form = {
metrics: reportForm.value,
observationPatients: patientsData.value['observation'],
@@ -103,6 +104,7 @@ export const useReportStore = defineStore('reportStore', () => {
timestampCurrentRange.value[1]
],
userId: reportInfo.value.report.userId,
+ departmentId: reportInfo.value.department.department_id,
reportId: reportInfo.value.report.report_id,
...assignForm
}
@@ -206,6 +208,7 @@ export const useReportStore = defineStore('reportStore', () => {
}
return {
+ reportFormRef,
timestampNow,
timestampCurrent,
timestampCurrentRange,
diff --git a/routes/api.php b/routes/api.php
index 7c89cb3..559229d 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -1,6 +1,7 @@
group(function () {
Route::get('/department-users', [ReportController::class, 'getDepartmentUsers']);
});
+ Route::prefix('statistics')->group(function () {
+ Route::prefix('reports')->group(function () {
+ Route::get('/unwanted-events', [\App\Http\Controllers\Api\StatisticController::class, 'getUnwantedEvents']);
+ });
+ });
+
Route::prefix('report')->group(function () {
Route::get('/', [ReportController::class, 'index']);
Route::post('/', [ReportController::class, 'store']);
Route::post('/observation/remove', [ReportController::class, 'removeObservation']);
Route::delete('/unwanted-event/{unwantedEvent}', [ReportController::class, 'removeUnwantedEvent']);
+
+ Route::get('/check', [ReportController::class, 'checkReport'])
+ ->name('api.reports.check');
});
Route::prefix('app')->group(function () {
@@ -59,6 +69,9 @@ Route::middleware(['auth:sanctum'])->group(function () {
Route::post('/', [RoleController::class, 'setUserRole']);
});
});
+ Route::prefix('departments')->group(function () {
+ Route::get('/', [DepartmentController::class, 'index']);
+ });
});
});
diff --git a/routes/web.php b/routes/web.php
index b1e5140..59c43df 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -18,6 +18,19 @@ Route::prefix('api')->group(function () {
Route::get('/auth/login', [\App\Http\Controllers\Api\AuthController::class, 'login']);
});
+Route::prefix('admin')->group(function () {
+ Route::get('/', [\App\Http\Controllers\Web\Admin\AdminController::class, 'index']);
+
+ Route::prefix('users')->group(function () {
+ Route::get('/', [\App\Http\Controllers\Web\Admin\UserController::class, 'index']);
+ Route::get('/new', [\App\Http\Controllers\Web\Admin\UserController::class, 'create']);
+ Route::post('/new', [\App\Http\Controllers\Web\Admin\UserController::class, 'store']);
+ Route::prefix('{user}')->group(function () {
+ Route::get('/', [\App\Http\Controllers\Web\Admin\UserController::class, 'show']);
+ });
+ });
+});
+
Route::get('/dashboard', [\App\Http\Controllers\Web\IndexController::class, 'index'])
->middleware(['auth'])
->name('dashboard');