diff --git a/src/assets/scss/components/appPage.scss b/src/assets/scss/components/appPage.scss index 2bd10e3..f6d8b31 100644 --- a/src/assets/scss/components/appPage.scss +++ b/src/assets/scss/components/appPage.scss @@ -88,6 +88,18 @@ display: flex; flex-direction: column; align-items: flex-start; + width: 100%; + + &.columns { + display: grid; + gap: 1rem; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + width: 100%; + + /*> div { + max-width: 50%; + }*/ + } h2 { color: var(--global-textColor); @@ -103,6 +115,13 @@ gap: 1rem; align-items: center; padding: 5px 0; + width: 100%; + } + + .col { + display: flex; + flex-direction: column; + gap: 1rem; } } @@ -117,6 +136,10 @@ container-name: section_with_border; container-type: inline-size; + &.grey { + border-color: var(--table-border-color) + } + &.disabled { filter: grayscale(1); opacity: 0.8; @@ -171,6 +194,37 @@ } } +.appPageSection__list { + display: flex; + flex-direction: column; + padding: 0; + + li { + padding: 15px; + border-bottom: 1px solid var(--button-secondary-borderColor); + display: flex; + justify-content: space-between; + align-items: center; + gap: 1rem; + } +} + +.appPageSection__checklist { + display: flex; + flex-direction: column; + gap: 1rem; + + div { + display: flex; + gap: 0.5rem; + } +} + +.appPageSection__iconActions { + display: flex; + gap: 0.5em; +} + @container section_with_border (max-width: 600px) { .appPageSection__withBorder { .row { diff --git a/src/pages/EvaluationEdit/index.js b/src/pages/DomandaEdit/index.js similarity index 66% rename from src/pages/EvaluationEdit/index.js rename to src/pages/DomandaEdit/index.js index b098abd..b101bf5 100644 --- a/src/pages/EvaluationEdit/index.js +++ b/src/pages/DomandaEdit/index.js @@ -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 ( + + + + + + + + + + + + + + ); + }; + + 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 (
@@ -139,7 +192,16 @@ const EvaluationEdit = () => { {data.criteria.map(o => {o.title} {o.score} - + +
+
+ )} {__('Punteggio:', 'gepafin')} @@ -157,8 +219,49 @@ const EvaluationEdit = () => {

{__('Checklist Valutazione', 'gepafin')}

+
+
+

{__('Lista', 'gepafin')}

+
+
+ {checklist.map(o =>
+ console.log(e.checked)} + checked={false}> + +
)} +
+
- +

{__('Note', 'gepafin')}

+
+ setMessage(e.htmlValue)} + style={{ height: 80 * 3, width: '100%' }} + /> +
+
+
+

{__('Documenti allegati', 'gepafin')}

+
    + {documents.map(o =>
  1. + {o.title} +
    +
    +
  2. )} +
+
+
@@ -174,7 +277,7 @@ const EvaluationEdit = () => { outlined label={<> {__('Richiedi Soccorso Istruttorio', 'gepafin')} - + @@ -199,18 +302,18 @@ const EvaluationEdit = () => { icon="pi pi-save" iconPos="right"/>
: <> - + @@ -224,4 +327,4 @@ const EvaluationEdit = () => { } -export default EvaluationEdit; \ No newline at end of file +export default DomandaEdit; \ No newline at end of file diff --git a/src/pages/Evaluations/index.js b/src/pages/DomandePreInstructor/index.js similarity index 88% rename from src/pages/Evaluations/index.js rename to src/pages/DomandePreInstructor/index.js index 480b27e..1a24b3d 100644 --- a/src/pages/Evaluations/index.js +++ b/src/pages/DomandePreInstructor/index.js @@ -4,7 +4,7 @@ import { __ } from '@wordpress/i18n'; // components import PreInstructorDomandeTable from '../DashboardPreInstructor/components/PreInstructorDomandeTable'; -const Bandi = () => { +const DomandePreInstructor = () => { return(
@@ -20,4 +20,4 @@ const Bandi = () => { ) } -export default Bandi; \ No newline at end of file +export default DomandePreInstructor; \ No newline at end of file diff --git a/src/routes.js b/src/routes.js index da13510..a6f4764 100644 --- a/src/routes.js +++ b/src/routes.js @@ -27,9 +27,9 @@ import AddCompany from './pages/AddCompany'; import ResetPassword from './pages/ResetPassword'; import DashboardPreInstructor from './pages/DashboardPreInstructor'; import ProfileBeneficiario from './pages/ProfileBeneficiario'; -import Evaluations from './pages/Evaluations'; -import EvaluationEdit from './pages/EvaluationEdit'; import Domande from './pages/Domande'; +import DomandePreInstructor from './pages/DomandePreInstructor'; +import DomandaEdit from './pages/DomandaEdit'; const routes = ({ role, chosenCompanyId }) => { @@ -84,12 +84,12 @@ const routes = ({ role, chosenCompanyId }) => { {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} - {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null} {'ROLE_BENEFICIARY' === role ? : null} - {'ROLE_PRE_INSTRUCTOR' === role ? : null} + {'ROLE_PRE_INSTRUCTOR' === role ? : null} }/> {'ROLE_SUPER_ADMIN' === role ? : null}