- updated ammendment comm modal window form;
This commit is contained in:
@@ -242,7 +242,7 @@ const SoccorsoAddInstructorManager = () => {
|
||||
<div style={{marginBottom: '30px'}}>
|
||||
<div className="appForm__field">
|
||||
<label>
|
||||
{__('Files', 'gepafin')}
|
||||
{__('Allegati PEC', 'gepafin')}
|
||||
</label>
|
||||
<FileUpload
|
||||
ref={ammendmentFilesRef}
|
||||
|
||||
@@ -242,7 +242,7 @@ const SoccorsoAddPreInstructor = () => {
|
||||
<div style={{marginBottom: '30px'}}>
|
||||
<div className="appForm__field">
|
||||
<label>
|
||||
{__('Files', 'gepafin')}
|
||||
{__('Allegati PEC', 'gepafin')}
|
||||
</label>
|
||||
<FileUpload
|
||||
ref={ammendmentFilesRef}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { wrap } from 'object-path-immutable';
|
||||
import getDateFromISOstring from '../../../../helpers/getDateFromISOstring';
|
||||
import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse';
|
||||
import uniqid from '../../../../helpers/uniqid';
|
||||
import getFormatedFileSizeText from '../../../../helpers/getFormatedFileSizeText';
|
||||
|
||||
// store
|
||||
import { storeGet, useStoreValue } from '../../../../store';
|
||||
@@ -18,12 +19,11 @@ import CommunicationService from '../../../../service/communication-service';
|
||||
import { Button } from 'primereact/button';
|
||||
import { classNames } from 'primereact/utils';
|
||||
import { InputText } from 'primereact/inputtext';
|
||||
import { InputTextarea } from 'primereact/inputtextarea';
|
||||
import { Dialog } from 'primereact/dialog';
|
||||
import { Toast } from 'primereact/toast';
|
||||
import { FileUpload } from 'primereact/fileupload';
|
||||
import { defaultMaxFileSize, mimeTypes } from '../../../../configData';
|
||||
import getFormatedFileSizeText from '../../../../helpers/getFormatedFileSizeText';
|
||||
import { Editor } from 'primereact/editor';
|
||||
|
||||
const SoccorsoComunications = ({amendmentId, soccorsoStatus}) => {
|
||||
const [comms, setComms] = useState([]);
|
||||
@@ -146,6 +146,26 @@ const SoccorsoComunications = ({amendmentId, soccorsoStatus}) => {
|
||||
return userData.id === comm.senderUserId ? 'outgoing' : 'incoming';
|
||||
};
|
||||
|
||||
const renderHeader = () => {
|
||||
return (
|
||||
<span className="ql-formats">
|
||||
<button className="ql-bold" aria-label="Bold"></button>
|
||||
<button className="ql-italic" aria-label="Italic"></button>
|
||||
<button className="ql-underline" aria-label="Underline"></button>
|
||||
<button className="ql-link" aria-label="Link"></button>
|
||||
<button className="ql-list" value="ordered"></button>
|
||||
<button className="ql-header" value="2"></button>
|
||||
<button className="ql-header" value="3"></button>
|
||||
<button className="ql-blockquote"></button>
|
||||
<button className="ql-list" value="bullet"></button>
|
||||
<button className="ql-indent" value="-1"></button>
|
||||
<button className="ql-indent" value="+1"></button>
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
const header = renderHeader();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Toast ref={toast}/>
|
||||
@@ -196,7 +216,7 @@ const SoccorsoComunications = ({amendmentId, soccorsoStatus}) => {
|
||||
onHide={hideNewComDialog}>
|
||||
<div className="appForm__field">
|
||||
<label
|
||||
className={classNames({'p-error': isEmpty(newCommData.title)})}>
|
||||
className={classNames({'p-error': !newCommData.title || isEmpty(newCommData.title)})}>
|
||||
{__('Titolo', 'gepafin')}*
|
||||
</label>
|
||||
<InputText value={newCommData.title}
|
||||
@@ -205,15 +225,17 @@ const SoccorsoComunications = ({amendmentId, soccorsoStatus}) => {
|
||||
onChange={(e) => updateNewCommData(e.target.value, 'title')}/>
|
||||
|
||||
<label
|
||||
className={classNames({'p-error': isEmpty(newCommData.comment)})}>
|
||||
className={classNames({'p-error': !newCommData.comment || isEmpty(newCommData.comment)})}>
|
||||
{__('Contenuto', 'gepafin')}*
|
||||
</label>
|
||||
<InputTextarea
|
||||
<Editor
|
||||
value={newCommData.comment}
|
||||
disabled={soccorsoStatus === 'CLOSE'}
|
||||
rows={5} cols={30}
|
||||
invalid={isEmpty(newCommData.comment)}
|
||||
onChange={(e) => updateNewCommData(e.target.value, 'comment')}/>
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
readOnly={soccorsoStatus === 'CLOSE'}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => updateNewCommData(e.htmlValue, 'comment')}
|
||||
style={{ height: 80 * 3, width: '100%' }}
|
||||
/>
|
||||
{!['ROLE_CONFIDI', 'ROLE_BENEFICIARY'].includes(role)
|
||||
? <div className="appForm__field">
|
||||
<label>
|
||||
|
||||
Reference in New Issue
Block a user