- added evaluation single page new sections;
This commit is contained in:
@@ -7,7 +7,7 @@ import { is, isEmpty, isNil } from 'ramda';
|
||||
import { storeSet, useStore } from '../../store';
|
||||
|
||||
// tools
|
||||
import getNumberWithCurrency from '../../helpers/getNumberWithCurrency';
|
||||
//import getNumberWithCurrency from '../../helpers/getNumberWithCurrency';
|
||||
//import getDateFromISOstring from '../../helpers/getDateFromISOstring';
|
||||
|
||||
// components
|
||||
@@ -15,16 +15,19 @@ import { Skeleton } from 'primereact/skeleton';
|
||||
import { Button } from 'primereact/button';
|
||||
import { Messages } from 'primereact/messages';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import { Checkbox } from 'primereact/checkbox';
|
||||
import { Editor } from 'primereact/editor';
|
||||
|
||||
const EvaluationEdit = () => {
|
||||
const DomandaEdit = () => {
|
||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||
const { id } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const [data, setData] = useState({});
|
||||
const [message, setMessage] = useState('');
|
||||
const pageMsgs = useRef(null);
|
||||
|
||||
const goToEvaluationsPage = () => {
|
||||
navigate('/valutazioni');
|
||||
navigate('/domande');
|
||||
}
|
||||
|
||||
/*const getCallback = (data) => {
|
||||
@@ -53,6 +56,26 @@ const EvaluationEdit = () => {
|
||||
return data;
|
||||
};*/
|
||||
|
||||
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();
|
||||
|
||||
useEffect(() => {
|
||||
const parsed = parseInt(id)
|
||||
const entityId = !isNaN(parsed) ? parsed : 0;
|
||||
@@ -75,6 +98,36 @@ const EvaluationEdit = () => {
|
||||
//BandoService.getBando(entityId, getCallback, errGetCallback);
|
||||
}, [id]);
|
||||
|
||||
// TODO
|
||||
const checklist = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Requisiti di ammissibilità soddisfatti'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Documentazione completa'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Obiettivi del progetto chiari e misurabili'
|
||||
}
|
||||
];
|
||||
const documents = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Doc 1'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Bilancio ultimo esercizio Bilancio ultimo esercizio Bilancio ultimo esercizio'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Bilancio ultimo esercizio'
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
@@ -139,7 +192,16 @@ const EvaluationEdit = () => {
|
||||
{data.criteria.map(o => <tr key={o.id}>
|
||||
<td>{o.title}</td>
|
||||
<td>{o.score}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<div className="appPageSection__iconActions">
|
||||
<Button icon="pi pi-eye" rounded outlined severity="info"
|
||||
aria-label={__('Mostra', 'gepafin')}/>
|
||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||
aria-label={__('Su', 'gepafin')}/>
|
||||
<Button icon="pi pi-thumbs-down" rounded outlined
|
||||
aria-label={__('Giu', 'gepafin')}/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>)}
|
||||
<tr>
|
||||
<td>{__('Punteggio:', 'gepafin')}</td>
|
||||
@@ -157,8 +219,49 @@ const EvaluationEdit = () => {
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Checklist Valutazione', 'gepafin')}</h2>
|
||||
<div className="appPageSection columns">
|
||||
<div>
|
||||
<h3>{__('Lista', 'gepafin')}</h3>
|
||||
<div className="appPageSection__withBorder grey">
|
||||
<div className="appPageSection__checklist">
|
||||
{checklist.map(o => <div key={o.id}>
|
||||
<Checkbox
|
||||
inputId={`checklist_${o.id}`}
|
||||
onChange={(e) => console.log(e.checked)}
|
||||
checked={false}></Checkbox>
|
||||
<label htmlFor={`checklist_${o.id}`}>{o.title}</label>
|
||||
</div>)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3>{__('Note', 'gepafin')}</h3>
|
||||
<div>
|
||||
<Editor
|
||||
value={message}
|
||||
placeholder={__('Digita qui il messagio', 'gepafin')}
|
||||
headerTemplate={header}
|
||||
onTextChange={(e) => setMessage(e.htmlValue)}
|
||||
style={{ height: 80 * 3, width: '100%' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>{__('Documenti allegati', 'gepafin')}</h3>
|
||||
<ol className="appPageSection__list">
|
||||
{documents.map(o => <li key={o.id}>
|
||||
<span>{o.title}</span>
|
||||
<div className="appPageSection__iconActions">
|
||||
<Button icon="pi pi-eye" rounded outlined severity="info"
|
||||
aria-label={__('Mostra', 'gepafin')}/>
|
||||
<Button icon="pi pi-thumbs-up" rounded outlined
|
||||
aria-label={__('Su', 'gepafin')}/>
|
||||
<Button icon="pi pi-thumbs-down" rounded outlined
|
||||
aria-label={__('Giu', 'gepafin')}/>
|
||||
</div>
|
||||
</li>)}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
@@ -174,7 +277,7 @@ const EvaluationEdit = () => {
|
||||
outlined
|
||||
label={<>
|
||||
{__('Richiedi Soccorso Istruttorio', 'gepafin')}
|
||||
<i style={{marginLeft: 7}}>
|
||||
<i style={{ marginLeft: 7 }}>
|
||||
<svg width="15" height="14" viewBox="0 0 15 14" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g clipPath="url(#clip0_1665_1656)">
|
||||
@@ -199,18 +302,18 @@ const EvaluationEdit = () => {
|
||||
icon="pi pi-save" iconPos="right"/>
|
||||
<Button
|
||||
type="button"
|
||||
label={__('Richiedi Soccorso Istruttorio', 'gepafin')}
|
||||
label={__('Approva Domanda', 'gepafin')}
|
||||
icon="pi pi-check" iconPos="right"/>
|
||||
<Button
|
||||
type="button"
|
||||
label={__('Richiedi Soccorso Istruttorio', 'gepafin')}
|
||||
label={__('Respingi Domanda', 'gepafin')}
|
||||
icon="pi pi-times" iconPos="right"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
: <>
|
||||
<Skeleton width="20%" height="1rem" className="mb-2"></Skeleton>
|
||||
<Skeleton width="20%" height="1rem" className="mb-2"></Skeleton>
|
||||
<Skeleton width="100%" height="2rem" className="mb-8"></Skeleton>
|
||||
<Skeleton width="20%" height="1rem" className="mb-2"></Skeleton>
|
||||
<Skeleton width="100%" height="4rem" className="mb-8"></Skeleton>
|
||||
@@ -224,4 +327,4 @@ const EvaluationEdit = () => {
|
||||
|
||||
}
|
||||
|
||||
export default EvaluationEdit;
|
||||
export default DomandaEdit;
|
||||
@@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n';
|
||||
// components
|
||||
import PreInstructorDomandeTable from '../DashboardPreInstructor/components/PreInstructorDomandeTable';
|
||||
|
||||
const Bandi = () => {
|
||||
const DomandePreInstructor = () => {
|
||||
return(
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
@@ -20,4 +20,4 @@ const Bandi = () => {
|
||||
)
|
||||
}
|
||||
|
||||
export default Bandi;
|
||||
export default DomandePreInstructor;
|
||||
Reference in New Issue
Block a user