- 'resend emails' functionality - added role based access;
- fixed issue with displaying for instructor manager related amendments;
This commit is contained in:
@@ -11,10 +11,12 @@ import { Toast } from 'primereact/toast';
|
||||
import { Button } from 'primereact/button';
|
||||
|
||||
import { resendEmailLabelsByType } from '../../../../configData';
|
||||
import { useStoreValue } from '../../../../store';
|
||||
|
||||
const SoccorsoResendEmails = ({ emailsData = [], setDataEmailsSoccorso }) => {
|
||||
const [isResendingRequest, setIsResendingRequest] = useState(false);
|
||||
const toast = useRef(null);
|
||||
const role = useStoreValue('getRole');
|
||||
const filtered = emailsData.filter(o => !o.isEmailSend);
|
||||
|
||||
const resendEmail = (data) => {
|
||||
@@ -64,7 +66,7 @@ const SoccorsoResendEmails = ({ emailsData = [], setDataEmailsSoccorso }) => {
|
||||
}
|
||||
|
||||
return(
|
||||
filtered.length > 0 ? <>
|
||||
['ROLE_SUPER_ADMIN', 'ROLE_INSTRUCTOR_MANAGER'].includes(role) && filtered.length > 0 ? <>
|
||||
<Toast ref={toast}/>
|
||||
{filtered
|
||||
.map(o => <Button
|
||||
|
||||
Reference in New Issue
Block a user