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">
<Container maxWidth={themeStretch ? false : 'xl'}>
<HeaderBreadcrumbs
heading={'Coporate'}
heading={'Corporate'}
links={[
{ name: 'Dashboard', href: '/dashboard' },
{

View File

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