update role client porta
This commit is contained in:
@@ -94,6 +94,7 @@ class PermissionTableSeeder extends Seeder
|
||||
'file-diagnosis-client-portal',
|
||||
'file-pendukung-medis-client-portal',
|
||||
'export-alarm-center-client-portal',
|
||||
'filter-alarm-center-client-portal',
|
||||
'benefit-client-portal',
|
||||
]
|
||||
],
|
||||
|
||||
@@ -19,12 +19,21 @@ import { enqueueSnackbar } from 'notistack';
|
||||
import Label from '../../components/Label';
|
||||
import { Stack } from '@mui/material';
|
||||
import { Download } from '@mui/icons-material';
|
||||
import useAuth from '../../hooks/useAuth';
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
export default function List() {
|
||||
const {user} = useAuth();
|
||||
const checkIfNameExists = (name) => {
|
||||
return user.user.permissions.some(item => item.name === name);
|
||||
};
|
||||
const exportLog = 'export-alarm-center-client-portal';
|
||||
const filterLog = 'filter-alarm-center-client-portal';
|
||||
const navigate = useNavigate();
|
||||
|
||||
const viewExportCheck = checkIfNameExists(exportLog);
|
||||
const viewFilterCheck = checkIfNameExists(filterLog);
|
||||
const { corporateValue } = useContext(UserCurrentCorporateContext);
|
||||
|
||||
const [data, setData] = useState([]);
|
||||
@@ -168,7 +177,7 @@ export default function List() {
|
||||
};
|
||||
|
||||
const filterStartDate = {
|
||||
useFilter: true,
|
||||
useFilter: viewFilterCheck ? true : false,
|
||||
startDate: startDateValue,
|
||||
setStartDate: setStartDateValue,
|
||||
handleStartDateChange: handleStartDateChanges,
|
||||
@@ -190,7 +199,7 @@ export default function List() {
|
||||
};
|
||||
|
||||
const filterEndDate = {
|
||||
useFilter: true,
|
||||
useFilter: viewFilterCheck ? true : false,
|
||||
endDate: endDateValue,
|
||||
setEndDate: setEndDateValue,
|
||||
handleEndDateChange: handleEndDateChanges,
|
||||
@@ -225,7 +234,7 @@ export default function List() {
|
||||
);
|
||||
};
|
||||
const exportReport = {
|
||||
useExport: true,
|
||||
useExport: viewExportCheck ? true : false,
|
||||
startDate: startDateValue,
|
||||
endDate: endDateValue,
|
||||
status: statusValue,
|
||||
|
||||
Reference in New Issue
Block a user