update bugs fix corporate

This commit is contained in:
2023-10-09 14:10:03 +07:00
parent a8828b2d79
commit 1a182aaf9e
2 changed files with 12 additions and 8 deletions

View File

@@ -105,7 +105,7 @@ export default function Drugs() {
<Page title="Corporate"> <Page title="Corporate">
<Container maxWidth={themeStretch ? false : 'xl'}> <Container maxWidth={themeStretch ? false : 'xl'}>
<HeaderBreadcrumbs <HeaderBreadcrumbs
heading={'Coporate'} heading={'Corporate'}
links={[ links={[
{ name: 'Dashboard', href: '/dashboard' }, { name: 'Dashboard', href: '/dashboard' },
{ {

View File

@@ -275,13 +275,13 @@ export default function List() {
<Typography variant="h6" color={'#637381'} >Welcome Messages</Typography> <Typography variant="h6" color={'#637381'} >Welcome Messages</Typography>
</Grid> </Grid>
<Grid item xs={12} md={8} > <Grid item xs={12} md={8} >
<Typography variant="h6">{currentCorporate?.welcome_message.replace(/<[^>]*>/g, '')}</Typography> <Typography variant="h6">{currentCorporate?.welcome_message ? currentCorporate?.welcome_message.replace(/<[^>]*>/g, '') : '-'}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={3} > <Grid item xs={12} md={3} >
<Typography variant="h6" color={'#637381'} >Help Text</Typography> <Typography variant="h6" color={'#637381'} >Help Text</Typography>
</Grid> </Grid>
<Grid item xs={12} md={8} > <Grid item xs={12} md={8} >
<Typography variant="h6">{currentCorporate?.help_text.replace(/<[^>]*>/g, '')}</Typography> <Typography variant="h6">{currentCorporate?.help_text ? currentCorporate?.help_text.replace(/<[^>]*>/g, '') : '-'}</Typography>
</Grid> </Grid>
<Grid item xs={12} md={3} > <Grid item xs={12} md={3} >
<Typography variant="h6" color={'#637381'} >Linking Rules</Typography> <Typography variant="h6" color={'#637381'} >Linking Rules</Typography>
@@ -289,11 +289,15 @@ export default function List() {
<Grid item xs={12} md={8} > <Grid item xs={12} md={8} >
<Typography variant="h6" sx={{marginLeft: '20px'}}> <Typography variant="h6" sx={{marginLeft: '20px'}}>
<ul> <ul>
{currentCorporate?.linking_rules {currentCorporate?.linking_rules ? (
.filter(rule => rule) // Menghapus elemen yang kosong atau null currentCorporate.linking_rules
.map((rule, index) => ( .filter(rule => rule)
<li key={index}>{rule}</li> .map((rule, index) => (
))} <li key={index}>{rule}</li>
))
) : (
<li>-</li>
)}
</ul> </ul>
</Typography> </Typography>
</Grid> </Grid>