- added n/d default motivation;
This commit is contained in:
@@ -28,7 +28,7 @@ const LatestPecEmailsTable = () => {
|
||||
const [isVisibleDetails, setIsVisibleDetails] = useState(false);
|
||||
const [previewItem, setPreviewItem] = useState({});
|
||||
const [isVisibleRejectDialog, setIsVisibleRejectDialog] = useState(false);
|
||||
const [rejectMotivation, setRejectMotivation] = useState('');
|
||||
const [rejectMotivation, setRejectMotivation] = useState('N/D');
|
||||
const [pendingRejectIds, setPendingRejectIds] = useState([]);
|
||||
const toast = useRef(null);
|
||||
|
||||
@@ -115,7 +115,7 @@ const LatestPecEmailsTable = () => {
|
||||
|
||||
const hideRejectDialog = () => {
|
||||
setIsVisibleRejectDialog(false);
|
||||
setRejectMotivation('');
|
||||
setRejectMotivation('N/D');
|
||||
setPendingRejectIds([]);
|
||||
};
|
||||
|
||||
@@ -125,10 +125,10 @@ const LatestPecEmailsTable = () => {
|
||||
setIsVisibleRejectDialog(false);
|
||||
for (let id of pendingRejectIds) {
|
||||
PecEmailService.rejectUserAction(id, getUserRejectActionCallback, errGetUserRejectActionCallbacks,
|
||||
rejectMotivation ? [['motivation', rejectMotivation]] : []
|
||||
[['motivation', rejectMotivation]]
|
||||
);
|
||||
}
|
||||
setRejectMotivation('');
|
||||
setRejectMotivation('N/D');
|
||||
setPendingRejectIds([]);
|
||||
}
|
||||
|
||||
@@ -320,13 +320,12 @@ const LatestPecEmailsTable = () => {
|
||||
style={{ maxWidth: '600px', width: '100%' }}
|
||||
onHide={hideRejectDialog}>
|
||||
<div className="appForm__field">
|
||||
<label>{__('Motivazione', 'gepafin')}</label>
|
||||
<label>{__('Motivazione', 'gepafin')} *</label>
|
||||
<div translate="no">
|
||||
<Editor
|
||||
value={rejectMotivation}
|
||||
readOnly={localAsyncRequest}
|
||||
headerTemplate={headerEditor}
|
||||
placeholder={__('Digita qui la motivazione (opzionale)', 'gepafin')}
|
||||
onTextChange={(e) => setRejectMotivation(e.htmlValue)}
|
||||
style={{ height: 80 * 3, width: '100%' }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user