Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging
This commit is contained in:
@@ -240,8 +240,8 @@ class RequestLogController extends Controller
|
|||||||
$query->orWhere('request_logs.code', 'like', "%" . $search . "%")
|
$query->orWhere('request_logs.code', 'like', "%" . $search . "%")
|
||||||
->orWhere('members.name', 'like', "%" . $search . "%")
|
->orWhere('members.name', 'like', "%" . $search . "%")
|
||||||
->orWhere('request_logs.submission_date', 'like', "%" . $search . "%")
|
->orWhere('request_logs.submission_date', 'like', "%" . $search . "%")
|
||||||
->orWhere('request_logs.service_code', 'like', "%" . ($search == 'outpatient' || $search == 'Outpatient' ? 'OP' : $search) . "%")
|
->orWhere('request_logs.discharge_date', 'like', "%" . $search . "%")
|
||||||
->orWhere('request_logs.service_code', 'like', "%" . ($search == 'inpatient' || $search == 'Inpatient' ? 'IP' : $search) . "%");
|
->orWhereRaw('(SELECT services.name FROM services WHERE services.code = request_logs.service_code LIMIT 1) LIKE ?', ["%" . $search . "%"]);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
->when($request->has('orderBy'), function ($query) use ($request) {
|
->when($request->has('orderBy'), function ($query) use ($request) {
|
||||||
@@ -296,12 +296,9 @@ class RequestLogController extends Controller
|
|||||||
END AS status
|
END AS status
|
||||||
'),
|
'),
|
||||||
'request_logs.submission_date',
|
'request_logs.submission_date',
|
||||||
|
'request_logs.discharge_date',
|
||||||
DB::raw('
|
DB::raw('
|
||||||
CASE
|
(SELECT services.name FROM services WHERE services.code = request_logs.service_code LIMIT 1) AS service_type
|
||||||
WHEN service_code = "OP" THEN "Outpatient"
|
|
||||||
WHEN service_code = "IP" THEN "Inpatient"
|
|
||||||
ELSE ""
|
|
||||||
END AS service_type
|
|
||||||
'),
|
'),
|
||||||
DB::raw('
|
DB::raw('
|
||||||
(SELECT organizations.name FROM organizations WHERE organizations.id = request_logs.organization_id LIMIT 1) AS provider
|
(SELECT organizations.name FROM organizations WHERE organizations.id = request_logs.organization_id LIMIT 1) AS provider
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
|||||||
onChange={(newValue:any) => {
|
onChange={(newValue:any) => {
|
||||||
setDischargeDate( (newValue));
|
setDischargeDate( (newValue));
|
||||||
}}
|
}}
|
||||||
inputFormat="dd-MM-yyyy"
|
inputFormat="dd-MM-yyyy HH:mm"
|
||||||
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||||
/>
|
/>
|
||||||
</LocalizationProvider>
|
</LocalizationProvider>
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export default function FormRequestClaim({ member, handleSubmitSuccess }: FormRe
|
|||||||
onChange={(newValue:any) => {
|
onChange={(newValue:any) => {
|
||||||
setSubmissionDate( (newValue));
|
setSubmissionDate( (newValue));
|
||||||
}}
|
}}
|
||||||
inputFormat="dd-MM-yyyy"
|
inputFormat="dd-MM-yyyy HH:mm"
|
||||||
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||||
/>
|
/>
|
||||||
</LocalizationProvider>
|
</LocalizationProvider>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import palette from '../../theme/palette';
|
|||||||
//import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
//import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||||
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
||||||
import { useSearchParams, useNavigate } from 'react-router-dom';
|
import { useSearchParams, useNavigate } from 'react-router-dom';
|
||||||
import { fDate, fDateSuffix } from '../../utils/formatTime';
|
import { fDate, fDateSuffix, fDateTime } from '../../utils/formatTime';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import TableMoreMenu from '../../components/table/TableMoreMenu';
|
import TableMoreMenu from '../../components/table/TableMoreMenu';
|
||||||
@@ -264,6 +264,12 @@ export default function TableListFinalLog() {
|
|||||||
label: localeData.txtServiceType,
|
label: localeData.txtServiceType,
|
||||||
isSort: true,
|
isSort: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'discharge_date',
|
||||||
|
align: 'center',
|
||||||
|
label: localeData.txtDischargeDate,
|
||||||
|
isSort: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'status',
|
id: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -358,9 +364,16 @@ export default function TableListFinalLog() {
|
|||||||
),
|
),
|
||||||
submission_date:
|
submission_date:
|
||||||
<Label>
|
<Label>
|
||||||
{obj.submission_date ? fDateSuffix(obj.submission_date) : ''}
|
{obj.submission_date ? fDateTime(obj.submission_date) : ''}
|
||||||
</Label>
|
</Label>
|
||||||
,
|
,
|
||||||
|
discharge_date:
|
||||||
|
obj.discharge_date ? (
|
||||||
|
<Label>
|
||||||
|
{obj.discharge_date ? fDateTime(obj.discharge_date) : ''}
|
||||||
|
</Label>
|
||||||
|
) : ''
|
||||||
|
,
|
||||||
action:
|
action:
|
||||||
<TableMoreMenu actions={
|
<TableMoreMenu actions={
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import palette from '../../theme/palette';
|
|||||||
//import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
//import { UserCurrentCorporateContext } from '../../contexts/UserCurrentCorporate';
|
||||||
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
import { HeadCell, Order, PaginationTableProps } from '../../@types/table';
|
||||||
import { useSearchParams, useNavigate } from 'react-router-dom';
|
import { useSearchParams, useNavigate } from 'react-router-dom';
|
||||||
import { fDate, fDateSuffix } from '../../utils/formatTime';
|
import { fDate, fDateSuffix, fDateTime } from '../../utils/formatTime';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import TableMoreMenu from '../../components/table/TableMoreMenu';
|
import TableMoreMenu from '../../components/table/TableMoreMenu';
|
||||||
@@ -356,7 +356,7 @@ export default function TableList() {
|
|||||||
),
|
),
|
||||||
submission_date:
|
submission_date:
|
||||||
<Label>
|
<Label>
|
||||||
{obj.submission_date ? fDateSuffix(obj.submission_date) : ''}
|
{obj.submission_date ? fDateTime(obj.submission_date) : ''}
|
||||||
</Label>
|
</Label>
|
||||||
,
|
,
|
||||||
action:
|
action:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export function fDate(date: Date | string | number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function fDateTime(date: Date | string | number) {
|
export function fDateTime(date: Date | string | number) {
|
||||||
return format(new Date(date), 'dd MMM yyyy hh:mm');
|
return format(new Date(date), 'dd MMM yyyy HH:mm');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fTimestamp(date: Date | string | number) {
|
export function fTimestamp(date: Date | string | number) {
|
||||||
|
|||||||
Reference in New Issue
Block a user