update componen label

This commit is contained in:
2023-10-13 16:15:52 +07:00
parent a694bc03f3
commit c3b745e23b
8 changed files with 165 additions and 302 deletions

View File

@@ -40,6 +40,7 @@ import TableMoreMenu from '../../components/table/TableMoreMenu';
import VisibilityOutlinedIcon from '@mui/icons-material/VisibilityOutlined';
import DetailDataMember from './ListMember';
import Label from '../../components/Label';
/* ---------------------------------- types --------------------------------- */
@@ -398,28 +399,10 @@ export default function List() {
// >{obj.memberId}</Button>
// ,
start_date:
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
}} variant='overline'
>{ fDateSuffix(obj.start_date) }
</Typography>
<Label>{ fDateSuffix(obj.start_date) }</Label>
,
end_date:
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
}} variant='overline'
>{ fDateSuffix(obj.end_date) }
</Typography>
<Label> { fDateSuffix(obj.end_date) }</Label>
,
// status:
// obj.status === 1 ? (

View File

@@ -40,6 +40,7 @@ import { useSearchParams, useNavigate, Link, useParams } from 'react-router-dom'
import { fDateSuffix, fPostFormat } from '../../utils/formatTime';
import TableMoreMenu from '../../components/table/TableMoreMenu';
import VisibilityOutlinedIcon from '@mui/icons-material/VisibilityOutlined';
import Label from '../../components/Label';
/* ---------------------------------- types --------------------------------- */
@@ -400,55 +401,20 @@ export default function List() {
return {
...obj,
admission_date:
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
marginTop: 2,
}} variant='overline'
>{ fDateSuffix(obj.admission_date) }
</Typography>
<Label>{ fDateSuffix(obj.admission_date) }</Label>
,
discharge_date:
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
}} variant='overline'
>{ fDateSuffix(obj.discharge_date) }
</Typography>
<Label>{ fDateSuffix(obj.discharge_date) }</Label>
,
status:
obj.status === 'Done' ? (
<Typography
sx={{
background: 'rgba(84, 214, 44, 0.16)',
color: '#229A16',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
}} variant='overline'
>
<Label color='success'>
Done
</Typography>
</Label>
) : (
<Typography
sx={{
background: 'rgba(255, 193, 7, 0.16)',
color: '#BF6919',
paddingX: 1.5,
paddingY: 1,
borderRadius: 3,
}} variant='overline'
>
<Label color='warning'>
Ongoing
</Typography>
</Label>
),
action:
<TableMoreMenu actions={

View File

@@ -35,6 +35,7 @@ import { Timeline, TimelineConnector, TimelineContent, TimelineDot, TimelineSepa
import Select from '../../theme/overrides/Select';
import TableMoreMenu from '../../components/table/TableMoreMenu';
import { MenuItem } from '@mui/material';
import Label from '../../components/Label';
// sections
// import ListTable from '../../sections/claimreports/ListTable';
// import ClaimStatusCard from '../../sections/claimreports/ClaimStatusCard';
@@ -291,38 +292,18 @@ export default function ServiceMonitoring() {
<Grid item xs={12} lg={12} md={12}>
<Stack spacing={1}>
<Typography variant="inherit">Main Diagnosis</Typography>
<Stack direction={'row'}>
<Stack direction={'row'} gap={1}>
<Typography variant="h6">{data?.main_diagnose}</Typography>
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
borderRadius: 1,
marginLeft: 1,
paddingX: 1,
paddingY: 1,
marginRight: 'auto',
}} variant='overline'
>{data?.main_diagnose_code}</Typography>
<Label>{data?.main_diagnose_code}</Label>
</Stack>
</Stack>
</Grid>
<Grid item xs={12} lg={12} md={12}>
<Stack spacing={1}>
<Typography variant="inherit">Comparative Diagnosis</Typography>
<Stack direction={'row'}>
<Stack direction={'row'} gap={1}>
<Typography variant="h6">{data?.comparative_diagnosis}</Typography>
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
borderRadius: 1,
marginLeft: 1,
paddingX: 1,
paddingY: 1,
marginRight: 'auto',
}} variant='overline'
>{data?.comparative_diagnosis_code}</Typography>
<Label>{data?.comparative_diagnosis_code}</Label>
</Stack>
</Stack>
</Grid>
@@ -411,27 +392,9 @@ export default function ServiceMonitoring() {
<TimelineContent>
<Typography variant='h5' sx={{marginBottom: 2}}> { fDateSuffix(row.date)}</Typography>
<Card sx={{paddinX:2, paddingY:2}} >
<Stack direction={'row'} sx={{ alignItems: 'center' }}>
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
borderRadius: 1,
marginLeft: 2,
paddingX: 2,
paddingY: 1,
marginRight: 'auto',
}} variant='overline'> {row.time} </Typography>
<Typography
sx={{
background: 'rgba(84, 214, 44, 0.16)',
color: '#229A16',
borderRadius: 1,
marginRight: 2,
paddingX: 2,
paddingY: 1,
}} variant='overline'> {row.status} </Typography>
<Stack direction={'row'} sx={{ alignItems: 'center', padding: 2, justifyContent: 'space-between' }}>
<Label> {row.time} </Label>
<Label color='success' sx={{marginRight: 0}}> {row.status} </Label>
</Stack>
<hr style={{margin:10, marginLeft:15, marginRight:15, color: 'rgba(145, 158, 171, 0.32)' }}/>
<Stack spacing={3} sx={{ paddingY: 1, paddingX: 3 }}>
@@ -537,23 +500,13 @@ export default function ServiceMonitoring() {
<Grid container>
<Grid item xs={12} md={12}>
{data?.laboratorium_result.length > 0 ? data?.laboratorium_result.map((row, index) => (
<Card sx={{paddinX:2, paddingY:2, paddingX:1, marginTop:2 }} key={index} >
<Stack paddingX={5}>
<Typography variant='subtitle1'>{fDateSuffix(row[index].datetime)}</Typography>
{row.length > 0 ? row.map((list, i) => (
<Card key={i} sx={{marginTop:2, paddingX:2, paddingY:2}}>
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
borderRadius: 1,
marginBottom: 2,
paddingX: 2,
paddingY: 1,
}} variant='overline'> {list.reimbursement_code}
</Typography>
<Label> {list.reimbursement_code}
</Label>
<Table sx={{marginY:2}}>
<TableHead>
<TableRow>
@@ -566,16 +519,7 @@ export default function ServiceMonitoring() {
<TableBody>
<TableRow>
<TableCell>
<Typography
sx={{
background: 'rgba(145, 158, 171, 0.16)',
color: '#637381',
borderRadius: 1,
marginBottom: 2,
paddingX: 2,
paddingY: 1,
}} variant='overline'> {fDateTime(list.datetime)}
</Typography>
<Label> {fDateTime(list.datetime)}</Label>
</TableCell>
<TableCell>{list.examination}</TableCell>
<TableCell>{list.location}</TableCell>