diff --git a/Modules/Internal/Http/Controllers/Api/DoctorRatingController.php b/Modules/Internal/Http/Controllers/Api/DoctorRatingController.php
new file mode 100644
index 00000000..d874e496
--- /dev/null
+++ b/Modules/Internal/Http/Controllers/Api/DoctorRatingController.php
@@ -0,0 +1,103 @@
+where('nID', $id);
+ }
+
+ $doctorRatings = $query->with([
+ 'user' => function ($query) {
+ $query->select('nID', 'sFirstName'); // Select only necessary columns
+ }
+ ])
+ ->select('nIDUser', 'nIDDokter', 'nRating', 'sNotes', 'dCreateOn')
+ ->get();
+
+
+ // $prescriptions->toArray();
+ // dd($prescriptions);
+
+ return response()->json($doctorRatings);
+ // return response()->json(Helper::paginateResources(LivechatResource::collection($livechat)));
+ }
+
+
+
+
+ /**
+ * Show the form for creating a new resource.
+ * @return Renderable
+ */
+ public function create()
+ {
+ return view('internal::create');
+ }
+
+ /**
+ * Store a newly created resource in storage.
+ * @param Request $request
+ * @return Renderable
+ */
+ public function store(Request $request)
+ {
+ }
+
+ /**
+ * Show the specified resource.
+ * @param int $id
+ * @return Renderable
+ */
+ public function show($id)
+ {
+
+ }
+
+ /**
+ * Show the form for editing the specified resource.
+ * @param int $id
+ * @return Renderable
+ */
+ public function edit($id)
+ {
+ return view('internal::edit');
+ }
+
+ /**
+ * Update the specified resource in storage.
+ * @param Request $request
+ * @param int $id
+ * @return Renderable
+ */
+ public function update(Request $request, $id)
+ {
+ //
+ }
+
+ /**
+ * Remove the specified resource from storage.
+ * @param int $id
+ * @return Renderable
+ */
+ public function destroy($id)
+ {
+ //
+ }
+}
diff --git a/Modules/Internal/Routes/api.php b/Modules/Internal/Routes/api.php
index 716e4b7f..5c97e890 100644
--- a/Modules/Internal/Routes/api.php
+++ b/Modules/Internal/Routes/api.php
@@ -19,6 +19,7 @@ use Modules\Internal\Http\Controllers\Api\DiagnosisExclusionController;
use Modules\Internal\Http\Controllers\Api\DistrictController;
use Modules\Internal\Http\Controllers\Api\DivisionController;
use Modules\Internal\Http\Controllers\Api\DoctorController;
+use Modules\Internal\Http\Controllers\Api\DoctorRatingController;
use Modules\Internal\Http\Controllers\Api\DrugController;
use Modules\Internal\Http\Controllers\Api\FormulariumController;
use Modules\Internal\Http\Controllers\Api\Linksehat\PaymentController;
@@ -154,6 +155,8 @@ Route::prefix('internal')->group(function () {
Route::resource('live-chat', LivechatController::class);
Route::get('prescription', [PrescriptionController::class, 'index']);
Route::get('prescription/{id}', [PrescriptionController::class, 'index']);
+ Route::get('doctorrating', [DoctorRatingController::class, 'index']);
+ Route::get('doctorrating/{id}', [PrescriptionController::class, 'index']);
Route::resource('doctors', DoctorController::class);
diff --git a/app/Models/OLDLMS/DoctorRating.php b/app/Models/OLDLMS/DoctorRating.php
new file mode 100644
index 00000000..1234d0b5
--- /dev/null
+++ b/app/Models/OLDLMS/DoctorRating.php
@@ -0,0 +1,35 @@
+belongsTo(User::class, 'nIDUser');
+ }
+
+ // Include additional fields in the model's JSON form
+ protected $appends = [
+ 'user_first_name', // Include the attribute for user's first name
+ ];
+
+ // Define an accessor to get the first name of the related user
+ public function getUserFirstNameAttribute()
+ {
+ return $this->user ? $this->user->sFirstName : null;
+ }
+}
diff --git a/frontend/dashboard/src/layouts/dashboard/navbar/NavConfig.tsx b/frontend/dashboard/src/layouts/dashboard/navbar/NavConfig.tsx
index cd0ac13e..f99b2ef4 100644
--- a/frontend/dashboard/src/layouts/dashboard/navbar/NavConfig.tsx
+++ b/frontend/dashboard/src/layouts/dashboard/navbar/NavConfig.tsx
@@ -86,6 +86,8 @@ const navConfig = [
{ title: 'Live Chat', path: '/report/live-chat' },
{ title: 'Linksehat Payment', path: '/report/linksehat-payments' },
{ title: 'Prescription', path: '/report/prescription' },
+ { title: 'Doctor Rating', path: '/report/doctorrating' },
+
],
},
{
diff --git a/frontend/dashboard/src/pages/Report/DoctorRating/Index.tsx b/frontend/dashboard/src/pages/Report/DoctorRating/Index.tsx
new file mode 100644
index 00000000..69ba75c1
--- /dev/null
+++ b/frontend/dashboard/src/pages/Report/DoctorRating/Index.tsx
@@ -0,0 +1,37 @@
+import { Card, Grid, Container } from '@mui/material';
+import { useParams } from 'react-router-dom';
+import HeaderBreadcrumbs from '@/components/HeaderBreadcrumbs';
+import Page from '@/components/Page';
+import useSettings from '@/hooks/useSettings';
+import List from '../Prescription/List';
+
+export default function DoctorRating(){
+ const { themeStretch } = useSettings();
+
+ const { id } = useParams();
+
+ const pageTitle = 'Doctor Rating';
+
+ return(
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/frontend/dashboard/src/pages/Report/DoctorRating/List_2.tsx b/frontend/dashboard/src/pages/Report/DoctorRating/List_2.tsx
new file mode 100644
index 00000000..2f805900
--- /dev/null
+++ b/frontend/dashboard/src/pages/Report/DoctorRating/List_2.tsx
@@ -0,0 +1,427 @@
+import {
+ Box,
+ Button,
+ Card,
+ Collapse,
+ Paper,
+ Select,
+ SelectChangeEvent,
+ Table,
+ TableBody,
+ TableCell,
+ TableContainer,
+ TableHead,
+ TableRow,
+ TextField,
+ Typography,
+ Stack,
+ ButtonGroup,
+ Grid,
+ Chip,
+ Dialog,
+ DialogContent,
+ DialogContentText,
+ DialogActions,
+ FormControl,
+ Autocomplete,
+ InputAdornment,
+ IconButton,
+ } from '@mui/material';
+
+ import {
+ Link,
+ NavLink as RouterLink,
+ useSearchParams,
+ useNavigate,
+ useParams,
+ } from 'react-router-dom';
+ // hooks
+ import React, { ChangeEvent, Component, useEffect, useRef, useState } from 'react';
+ import useSettings from '../../../hooks/useSettings';
+ // components
+ import axios from '../../../utils/axios';
+ import { LaravelPaginatedData } from '../../../@types/paginated-data';
+ import { Icd } from '../../../@types/diagnosis';
+ import BasePagination from '../../../components/BasePagination';
+ import { Practitioner } from '../../../@types/doctor';
+ import CreateIcon from '@mui/icons-material/Create';
+ import { Props } from '../../../components/editor/index';
+ import { red } from '@mui/material/colors';
+ import { margin, padding } from '@mui/system';
+ import { enqueueSnackbar } from 'notistack';
+ import { Controller } from 'react-hook-form';
+
+
+ import SvgIconStyle from '../../../components/SvgIconStyle';
+ import { GridSearchIcon } from '@mui/x-data-grid';
+ import { Search } from '@mui/icons-material';
+ import { Icon } from '@iconify/react';
+ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
+ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
+
+ export default function List(){
+
+ const navigate = useNavigate();
+ const { organization_id } = useParams();
+ const [searchParams, setSearchParams] = useSearchParams();
+ const [searchParamsOrganizations, setSearchParamsOrganizations] = useSearchParams();
+ const [searchParamsSpecialities, setSearchParamsSpecialities] = useSearchParams();
+ const [searchParamsFilter, setSearchParamsFilter] = useSearchParams();
+
+ function Filter(props: any) {
+ // SEARCH
+ const searchInput = useRef(null);
+ const [searchText, setSearchText] = useState('');
+
+ //handle search
+ const handleSearchChange = (event: any) => {
+ const newSearchText = event.target.value ?? '';
+ setSearchText(newSearchText);
+ };
+
+ const handleSearchSubmit = (event: any) => {
+ event.preventDefault();
+
+ props.onSearch(searchText);
+ };
+
+ useEffect(() => {
+ // Trigger First Search
+ setSearchText(searchParams.get('search') ?? '');
+ }, []);
+
+ const item = [
+ {
+ id: '',
+ value: '',
+ name: 'Semua',
+ },
+ ];
+
+ return (
+
+ );
+ }
+ function FilterForm(props: any) {
+ return(
+
+
+
+
+
+ );
+ }
+
+ function createData(doctor: Practitioner): Practitioner {
+ return {
+ ...doctor,
+ /* user: doctor.user ? new User(doctor.user) : null; */
+ };
+ }
+
+ function Row(props: { row: ReturnType }) {
+ const { row } = props;
+ const [open, setOpen] = React.useState(false);
+ const [openDialog, setOpenDialog] = React.useState(false);
+
+
+
+ return (
+
+
+
+ setOpen(!open)}>
+ {open ? : }
+
+
+
+ {row.user ? row.user.sFirstName : '-'}
+ {row.nIDDokter ? row.nIDDokter : '-'}
+ {row.nRating ? row.nRating : '-'}
+ {row.sNotes ? row.sNotes : '-'}
+ {row.dCreateOn ? row.dCreateOn : '-'}
+
+ {/*
+
+
+
+
+
+ */}
+
+ {/* COLLAPSIBLE ROW */}
+
+
+ {/*
+
+
+
+
+
+ Metode Pembayaran
+
+
+ : {row.payment_method ? row.payment_method : '-'}
+
+
+
+ Jenis Benefit
+
+
+ : -
+
+
+ Durasi
+
+
+ : {row.duration ? row.duration : '-'}
+
+
+
+
+
+ */}
+
+
+
+ {/* END COLLAPSIBLE ROW */}
+
+
+ );
+ }
+
+ const headStyle = {
+ fontWeight: 'bold',
+ };
+ // Dummy Default Data
+ const [dataTableIsLoading, setDataTableLoading] = useState(true);
+ const [dataTableLastRequest, setDataTableLastRequest] = useState(0);
+ const [dataTableResponseState, setDataTableResponseState] = useState('idle');
+ const [dataTableData, setDataTableData] = useState({
+ current_page: 1,
+ data: [],
+ path: '',
+ first_page_url: '',
+ last_page: 1,
+ last_page_url: '',
+ next_page_url: '',
+ prev_page_url: '',
+ per_page: 10,
+ from: 0,
+ to: 0,
+ total: 0,
+ });
+ const [dataTablePage, setDataTablePage] = useState(5);
+
+ const loadDataTableData = async (appliedFilter: any | null = null) => {
+ setDataTableLoading(true);
+ const filter = appliedFilter ? appliedFilter : Object.fromEntries([...searchParams.entries()]);
+ const response = await axios.get('/doctorrating ', {
+ params: filter,
+ });
+ setDataTableLoading(false);
+ setDataTableData(response.data);
+ };
+
+ // const applyFilter = async (searchFilter: string) => {
+ // await loadDataTableData({ search: searchFilter });
+ // setSearchParams({ search: searchFilter });
+ // };
+
+ const applyItems = async (
+ searchFilter: string,
+ searchFilterOrganization: string,
+ searchFilterSpecialities: string
+ ) => {
+ await loadDataTableData({
+ search: searchFilter,
+ organization_id: searchFilterOrganization,
+ speciality_id: searchFilterSpecialities,
+ });
+ setSearchParamsFilter({
+ search: searchFilter,
+ organization_id: searchFilterOrganization,
+ speciality_id: searchFilterSpecialities,
+ });
+ };
+
+ const handlePageChange = (event: ChangeEvent, value: number) => {
+ const filter = Object.fromEntries([...searchParams.entries(), ['page', value]]);
+ loadDataTableData(filter);
+ setSearchParams(filter);
+ };
+
+ useEffect(() => {
+ loadDataTableData();
+ }, []);
+
+ return (
+
+ {/* */}
+
+
+
+
+ {/* The Main Table */}
+
+
+
+
+ {/* */}
+
+
+ Nama User
+
+
+ ID Dokter
+
+
+ Rating
+
+
+ Notes
+
+
+ Created On
+
+
+
+ {/*
+
+
+ Tanggal Booking
+
+
+ Tanggal Appointment
+
+
+ Faskes
+
+
+ Nama Dokter
+
+
+ Spesialisasi
+
+
+ Pasien
+
+
+ Dokter
+
+ */}
+
+ {dataTableIsLoading ? (
+
+
+
+ Loading
+
+
+
+ ) : (dataTableData.data && dataTableData.data.length === 0) ? (
+
+
+
+
+ No Data
+
+
+
+ ) : (
+
+ {dataTableData && dataTableData.map((row) => (
+
+ ))}
+
+ )}
+
+
+
+
+
+
+ );
+ }
\ No newline at end of file
diff --git a/frontend/dashboard/src/pages/Report/DoctorRating/index.tsx b/frontend/dashboard/src/pages/Report/DoctorRating/index.tsx
new file mode 100644
index 00000000..374a2335
--- /dev/null
+++ b/frontend/dashboard/src/pages/Report/DoctorRating/index.tsx
@@ -0,0 +1,38 @@
+import { Card, Grid, Container } from '@mui/material';
+import { useParams } from 'react-router-dom';
+import HeaderBreadcrumbs from '@/components/HeaderBreadcrumbs';
+import Page from '@/components/Page';
+import useSettings from '@/hooks/useSettings';
+import List from './List_2';
+
+export default function DoctorRating(){
+ const { themeStretch } = useSettings();
+
+ const { id } = useParams();
+
+ const pageTitle = 'Doctor Rating';
+
+ return(
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/frontend/dashboard/src/pages/Report/Prescription/List.tsx b/frontend/dashboard/src/pages/Report/Prescription/List.tsx
index 8ed4712c..7ca00adb 100644
--- a/frontend/dashboard/src/pages/Report/Prescription/List.tsx
+++ b/frontend/dashboard/src/pages/Report/Prescription/List.tsx
@@ -1,440 +1,428 @@
import {
- Box,
- Button,
- Card,
- Collapse,
- Paper,
- Select,
- SelectChangeEvent,
- Table,
- TableBody,
- TableCell,
- TableContainer,
- TableHead,
- TableRow,
- TextField,
- Typography,
- Stack,
- ButtonGroup,
- Grid,
- Chip,
- Dialog,
- DialogContent,
- DialogContentText,
- DialogActions,
- FormControl,
- Autocomplete,
- InputAdornment,
- IconButton,
- } from '@mui/material';
+ Box,
+ Button,
+ Card,
+ Collapse,
+ Paper,
+ Select,
+ SelectChangeEvent,
+ Table,
+ TableBody,
+ TableCell,
+ TableContainer,
+ TableHead,
+ TableRow,
+ TextField,
+ Typography,
+ Stack,
+ ButtonGroup,
+ Grid,
+ Chip,
+ Dialog,
+ DialogContent,
+ DialogContentText,
+ DialogActions,
+ FormControl,
+ Autocomplete,
+ InputAdornment,
+ IconButton,
+} from '@mui/material';
+
+import {
+ Link,
+ NavLink as RouterLink,
+ useSearchParams,
+ useNavigate,
+ useParams,
+} from 'react-router-dom';
+// hooks
+import React, { ChangeEvent, Component, useEffect, useRef, useState } from 'react';
+import useSettings from '../../../hooks/useSettings';
+// components
+import axios from '../../../utils/axios';
+import { LaravelPaginatedData } from '../../../@types/paginated-data';
+import { Icd } from '../../../@types/diagnosis';
+import BasePagination from '../../../components/BasePagination';
+import { Practitioner } from '../../../@types/doctor';
+import CreateIcon from '@mui/icons-material/Create';
+import { Props } from '../../../components/editor/index';
+import { red } from '@mui/material/colors';
+import { margin, padding } from '@mui/system';
+import { enqueueSnackbar } from 'notistack';
+import { Controller } from 'react-hook-form';
+import { User } from '../../../Models/User';
+
+
+import SvgIconStyle from '../../../components/SvgIconStyle';
+import { GridSearchIcon } from '@mui/x-data-grid';
+import { Search } from '@mui/icons-material';
+import { Icon } from '@iconify/react';
+import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
+import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
+
+export default function List(){
+
+ const navigate = useNavigate();
+ const { organization_id } = useParams();
+ const [searchParams, setSearchParams] = useSearchParams();
+ const [searchParamsOrganizations, setSearchParamsOrganizations] = useSearchParams();
+ const [searchParamsSpecialities, setSearchParamsSpecialities] = useSearchParams();
+ const [searchParamsFilter, setSearchParamsFilter] = useSearchParams();
+
+ function Filter(props: any) {
+ // SEARCH
+ const searchInput = useRef(null);
+ const [searchText, setSearchText] = useState('');
- import {
- Link,
- NavLink as RouterLink,
- useSearchParams,
- useNavigate,
- useParams,
- } from 'react-router-dom';
- // hooks
- import React, { ChangeEvent, Component, useEffect, useRef, useState } from 'react';
- import useSettings from '../../../hooks/useSettings';
- // components
- import axios from '../../../utils/axios';
- import { LaravelPaginatedData } from '../../../@types/paginated-data';
- import { Icd } from '../../../@types/diagnosis';
- import BasePagination from '../../../components/BasePagination';
- import { Practitioner } from '../../../@types/doctor';
- import CreateIcon from '@mui/icons-material/Create';
- import { Props } from '../../../components/editor/index';
- import { red } from '@mui/material/colors';
- import { margin, padding } from '@mui/system';
- import { enqueueSnackbar } from 'notistack';
- import { Controller } from 'react-hook-form';
+ //handle search
+ const handleSearchChange = (event: any) => {
+ const newSearchText = event.target.value ?? '';
+ setSearchText(newSearchText);
+ };
- import SvgIconStyle from '../../../components/SvgIconStyle';
- import { GridSearchIcon } from '@mui/x-data-grid';
- import { Search } from '@mui/icons-material';
- import { Icon } from '@iconify/react';
- import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
- import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
+ const handleSearchSubmit = (event: any) => {
+ event.preventDefault();
+
+ props.onSearch(searchText);
+ };
- export default function List(){
-
- const navigate = useNavigate();
- const { organization_id } = useParams();
- const [searchParams, setSearchParams] = useSearchParams();
- const [searchParamsOrganizations, setSearchParamsOrganizations] = useSearchParams();
- const [searchParamsSpecialities, setSearchParamsSpecialities] = useSearchParams();
- const [searchParamsFilter, setSearchParamsFilter] = useSearchParams();
-
- function Filter(props: any) {
- // SEARCH
- const searchInput = useRef(null);
- const [searchText, setSearchText] = useState('');
+ useEffect(() => {
+ // Trigger First Search
+ setSearchText(searchParams.get('search') ?? '');
+ }, []);
- //handle search
- const handleSearchChange = (event: any) => {
- const newSearchText = event.target.value ?? '';
- setSearchText(newSearchText);
- };
-
- const handleSearchSubmit = (event: any) => {
- event.preventDefault();
-
- props.onSearch(searchText);
- };
+ const item = [
+ {
+ id: '',
+ value: '',
+ name: 'Semua',
+ },
+ ];
- useEffect(() => {
- // Trigger First Search
- setSearchText(searchParams.get('search') ?? '');
- }, []);
-
- const item = [
- {
- id: '',
- value: '',
- name: 'Semua',
- },
- ];
-
- return (
-
- );
- }
- function FilterForm(props: any) {
- return(
-
-
-
-
+ return (
+
+ );
+}
+function FilterForm(props: any) {
+ return(
+
+
+
- );
- }
+
+ );
+}
- function createData(doctor: Practitioner): Practitioner {
- return {
- ...doctor,
- };
- }
+function createData(doctor: Practitioner): Practitioner {
+ return {
+ ...doctor,
+ /* user: doctor.user ? new User(doctor.user) : null; */
+ };
+}
- function Row(props: { row: ReturnType }) {
- const { row } = props;
- const [open, setOpen] = React.useState(false);
- const [openDialog, setOpenDialog] = React.useState(false);
+function Row(props: { row: ReturnType }) {
+ const { row } = props;
+ const [open, setOpen] = React.useState(false);
+ const [openDialog, setOpenDialog] = React.useState(false);
- return (
-
-
-
- setOpen(!open)}>
- {open ? : }
-
-
- {row.nID ? row.nID : '-'}
-
- {row.nIDUser ? row.nIDUser : '-'}
-
- {row.nIDDokter ? row.nIDDokter : '-'}
- {row.sDokterName ? row.sDokterName : '-'}
- {row.dTanggalResep ? row.dTanggalResep : '-'}
- {row.sSource ? row.sSource : '-'}
- {row.sKodeResep ? row.sKodeResep : '-'}
- {row.sDiagnose ? row.sDiagnose : '-'}
- {row.sStatus ? row.sStatus : '-'}
- {/*
-
-
-
-
-
- */}
-
- {/* COLLAPSIBLE ROW */}
-
-
+ return (
+
+
+
+ setOpen(!open)}>
+ {open ? : }
+
+
+
+ {row.user ? row.user.sFirstName : '-'}
+ {row.nIDDokter ? row.nIDDokter : '-'}
+ {row.nRating ? row.nRating : '-'}
+ {row.sNotes ? row.sNotes : '-'}
+ {row.dCreateOn ? row.dCreateOn : '-'}
+
+ {/*
+
+
+
+
+
+ */}
+
+ {/* COLLAPSIBLE ROW */}
+
+
{/*
-
-
-
-
-
- Metode Pembayaran
-
-
- : {row.payment_method ? row.payment_method : '-'}
-
+
+
+
+
+
+ Metode Pembayaran
+
+
+ : {row.payment_method ? row.payment_method : '-'}
+
-
- Jenis Benefit
-
-
- : -
-
-
- Durasi
-
-
- : {row.duration ? row.duration : '-'}
-
+
+ Jenis Benefit
+
+
+ : -
+
+
+ Durasi
+
+
+ : {row.duration ? row.duration : '-'}
-
- */}
-
-
+
+
+ */}
+
+
- {/* END COLLAPSIBLE ROW */}
-
-
- );
- }
-
- const headStyle = {
- fontWeight: 'bold',
- };
- // Dummy Default Data
- const [dataTableIsLoading, setDataTableLoading] = useState(true);
- const [dataTableLastRequest, setDataTableLastRequest] = useState(0);
- const [dataTableResponseState, setDataTableResponseState] = useState('idle');
- const [dataTableData, setDataTableData] = useState({
- current_page: 1,
- data: [],
- path: '',
- first_page_url: '',
- last_page: 1,
- last_page_url: '',
- next_page_url: '',
- prev_page_url: '',
- per_page: 10,
- from: 0,
- to: 0,
- total: 0,
+ {/* END COLLAPSIBLE ROW */}
+
+
+ );
+}
+
+const headStyle = {
+ fontWeight: 'bold',
+};
+// Dummy Default Data
+const [dataTableIsLoading, setDataTableLoading] = useState(true);
+const [dataTableLastRequest, setDataTableLastRequest] = useState(0);
+const [dataTableResponseState, setDataTableResponseState] = useState('idle');
+const [dataTableData, setDataTableData] = useState({
+ current_page: 1,
+ data: [],
+ path: '',
+ first_page_url: '',
+ last_page: 1,
+ last_page_url: '',
+ next_page_url: '',
+ prev_page_url: '',
+ per_page: 10,
+ from: 0,
+ to: 0,
+ total: 0,
+});
+const [dataTablePage, setDataTablePage] = useState(5);
+
+const loadDataTableData = async (appliedFilter: any | null = null) => {
+ setDataTableLoading(true);
+ const filter = appliedFilter ? appliedFilter : Object.fromEntries([...searchParams.entries()]);
+ const response = await axios.get('/doctorrating ', {
+ params: filter,
});
- const [dataTablePage, setDataTablePage] = useState(5);
+ setDataTableLoading(false);
+ setDataTableData(response.data);
+};
- const loadDataTableData = async (appliedFilter: any | null = null) => {
- setDataTableLoading(true);
- const filter = appliedFilter ? appliedFilter : Object.fromEntries([...searchParams.entries()]);
- const response = await axios.get('/prescription', {
- params: filter,
- });
- setDataTableLoading(false);
- setDataTableData(response.data);
- };
+// const applyFilter = async (searchFilter: string) => {
+// await loadDataTableData({ search: searchFilter });
+// setSearchParams({ search: searchFilter });
+// };
- // const applyFilter = async (searchFilter: string) => {
- // await loadDataTableData({ search: searchFilter });
- // setSearchParams({ search: searchFilter });
- // };
+const applyItems = async (
+ searchFilter: string,
+ searchFilterOrganization: string,
+ searchFilterSpecialities: string
+) => {
+ await loadDataTableData({
+ search: searchFilter,
+ organization_id: searchFilterOrganization,
+ speciality_id: searchFilterSpecialities,
+ });
+ setSearchParamsFilter({
+ search: searchFilter,
+ organization_id: searchFilterOrganization,
+ speciality_id: searchFilterSpecialities,
+ });
+};
- const applyItems = async (
- searchFilter: string,
- searchFilterOrganization: string,
- searchFilterSpecialities: string
- ) => {
- await loadDataTableData({
- search: searchFilter,
- organization_id: searchFilterOrganization,
- speciality_id: searchFilterSpecialities,
- });
- setSearchParamsFilter({
- search: searchFilter,
- organization_id: searchFilterOrganization,
- speciality_id: searchFilterSpecialities,
- });
- };
+const handlePageChange = (event: ChangeEvent, value: number) => {
+ const filter = Object.fromEntries([...searchParams.entries(), ['page', value]]);
+ loadDataTableData(filter);
+ setSearchParams(filter);
+};
- const handlePageChange = (event: ChangeEvent, value: number) => {
- const filter = Object.fromEntries([...searchParams.entries(), ['page', value]]);
- loadDataTableData(filter);
- setSearchParams(filter);
- };
+useEffect(() => {
+ loadDataTableData();
+}, []);
- useEffect(() => {
- loadDataTableData();
- }, []);
+return (
+
+ {/* */}
- return (
-
- {/* */}
+
+
-
-
+ {/* The Main Table */}
+
+
+
+
+ {/* */}
+
+
+ Nama User
+
+
+ ID Dokter
+
+
+ Rating
+
+
+ Notes
+
+
+ Created On
+
- {/* The Main Table */}
-
-
+
+{/*
+
+
+ Tanggal Booking
+
+
+ Tanggal Appointment
+
+
+ Faskes
+
+
+ Nama Dokter
+
+
+ Spesialisasi
+
+
+ Pasien
+
+
+ Dokter
+
+ */}
+
+ {dataTableIsLoading ? (
- {/* */}
-
-
- ID Booking
-
-
- ID User
-
-
- ID Dokter
-
-
- Nama Dokter
-
-
- Tanggal Resep
-
-
- Source
-
-
- Kode Resep
-
-
- Diagnosa
-
-
- Status
+
+ Loading
-{/*
-
-
- Tanggal Booking
-
-
- Tanggal Appointment
-
-
- Faskes
-
-
- Nama Dokter
-
-
- Spesialisasi
-
-
- Pasien
-
-
- Dokter
-
- */}
- {dataTableIsLoading ? (
-
-
-
- Loading
-
-
-
- ) : (dataTableData.data && dataTableData.data.length === 0) ? (
+ ) : (dataTableData.data && dataTableData.data.length === 0) ? (
-
-
-
- No Data
-
-
-
- ) : (
-
- {dataTableData && dataTableData.map((row) => (
-
- ))}
-
- )}
-
-
+
+
+
+ No Data
+
+
+
+ ) : (
+
+ {dataTableData && dataTableData.map((row) => (
+
+ ))}
+
+ )}
+
+
-
-
-
- );
+
+
+
+);
}
\ No newline at end of file
diff --git a/frontend/dashboard/src/pages/Report/Prescription/listnya b/frontend/dashboard/src/pages/Report/Prescription/listnya
new file mode 100644
index 00000000..e69de29b
diff --git a/frontend/dashboard/src/routes/index.tsx b/frontend/dashboard/src/routes/index.tsx
index e4b54e82..455291c5 100644
--- a/frontend/dashboard/src/routes/index.tsx
+++ b/frontend/dashboard/src/routes/index.tsx
@@ -13,6 +13,7 @@ import { AuthProvider } from '../contexts/LaravelAuthContext';
import AuthGuard from '../guards/AuthGuard';
import { Link, useParams, useSearchParams } from 'react-router-dom';
import Prescription from '@/pages/Report/Prescription/Index';
+import DoctorRating from '@/pages/Report/DoctorRating/Index';
// ----------------------------------------------------------------------
@@ -290,6 +291,10 @@ export default function Router() {
path: 'report/prescription',
element: ,
},
+ {
+ path: 'report/doctorrating',
+ element: ,
+ },
{
path: 'report/linksehat-payments',
element: ,