- saving progress;
This commit is contained in:
@@ -5,3 +5,4 @@ REACT_APP_LOGO_FILENAME=gepafin-logo.svg
|
||||
REACT_APP_FAVICON_FILENAME=gepafin-favicon.ico
|
||||
REACT_APP_HUB_ID=p4lk3bcx1RStqTaIVVbXs
|
||||
REACT_APP_EVALUATION_FLOW_ID=1
|
||||
REACT_APP_LOCAL_DEVELOPMENT=0
|
||||
@@ -5,3 +5,4 @@ REACT_APP_LOGO_FILENAME=gepafin-logo.svg
|
||||
REACT_APP_FAVICON_FILENAME=gepafin-favicon.ico
|
||||
REACT_APP_HUB_ID=p4lk3bcx1RStqTaIVVbXs
|
||||
REACT_APP_EVALUATION_FLOW_ID=1
|
||||
REACT_APP_LOCAL_DEVELOPMENT=0
|
||||
@@ -43,6 +43,10 @@
|
||||
margin-left: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
span.companyName {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.appPage__spacer {
|
||||
|
||||
23
src/assets/scss/components/fieldsRepeater.scss
Normal file
23
src/assets/scss/components/fieldsRepeater.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
.fieldsRepeater {
|
||||
|
||||
}
|
||||
|
||||
.fieldsRepeater form {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.fieldsRepeater__panel {
|
||||
|
||||
}
|
||||
|
||||
.fieldsRepeater__heading {
|
||||
|
||||
}
|
||||
|
||||
.fieldsRepeater__fields {
|
||||
|
||||
}
|
||||
|
||||
.fieldsRepeater__addNew {
|
||||
margin-top: 30px;
|
||||
}
|
||||
@@ -44,3 +44,4 @@
|
||||
@import "./components/error404.scss";
|
||||
@import "./components/myTable.scss";
|
||||
@import "./components/evaluation.scss";
|
||||
@import "./components/fieldsRepeater.scss";
|
||||
@@ -1,6 +1,10 @@
|
||||
import React from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { head } from 'ramda';
|
||||
|
||||
// store
|
||||
import { storeGet, useStore } from '../../store';
|
||||
|
||||
// components
|
||||
import MyLatestSubmissionsTable from '../DashboardBeneficiario/components/MyLatestSubmissionsTable';
|
||||
@@ -9,15 +13,20 @@ import ErrorBoundary from '../../components/ErrorBoundary';
|
||||
|
||||
const Applications = () => {
|
||||
const navigate = useNavigate();
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const companies = useStore().main.companies();
|
||||
const company = head(companies.filter(o => o.id === chosenCompanyId));
|
||||
|
||||
const gotToBandiDisponibili = () => {
|
||||
navigate('/bandi')
|
||||
}
|
||||
|
||||
console.log('company', company, chosenCompanyId, companies)
|
||||
return(
|
||||
<div className="appPage">
|
||||
<div className="appPage__pageHeader">
|
||||
<h1>{__('Domande in Lavorazione', 'gepafin')}</h1>
|
||||
{/*{company ? <span className="companyName">{company.companyName}</span> : null}*/}
|
||||
</div>
|
||||
|
||||
<div className="appPage__spacer"></div>
|
||||
|
||||
@@ -21,12 +21,14 @@ const RepeaterFields = ({ sourceId, sourceName }) => {
|
||||
setValue,
|
||||
register,
|
||||
trigger,
|
||||
getValues
|
||||
getValues,
|
||||
watch
|
||||
} = useForm({
|
||||
defaultValues: useMemo(() => {
|
||||
return formInitialData;
|
||||
}, [formInitialData]), mode: 'onChange'
|
||||
});
|
||||
const watchName = watch('name');
|
||||
|
||||
const onSubmit = () => {
|
||||
};
|
||||
@@ -49,19 +51,20 @@ const RepeaterFields = ({ sourceId, sourceName }) => {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
trigger();
|
||||
}, [chosen]);
|
||||
|
||||
}, [chosen])
|
||||
console.log('items', items);
|
||||
return (
|
||||
<div className="fieldsRepeater">
|
||||
<form className="appForm" onSubmit={handleSubmit(onSubmit)}>
|
||||
{items
|
||||
? items.map(o => <div key={o.fieldId}>
|
||||
<div className="fieldsRepeater__Heading">
|
||||
<span>{o.name}</span>
|
||||
? items.map(o => <div key={o.fieldId} className="fieldsRepeater__panel p-panel p-component">
|
||||
<div className="fieldsRepeater__heading p-panel p-panel-header">
|
||||
<span>{chosen.fieldId === o.fieldId ? watchName : o.name}</span>
|
||||
</div>
|
||||
{chosen.fieldId === o.fieldId
|
||||
? <div className="fieldsRepeater__fields">
|
||||
? <div className="fieldsRepeater__fields p-panel-content">
|
||||
<FormField
|
||||
type="textinput"
|
||||
fieldName="name"
|
||||
@@ -91,6 +94,7 @@ const RepeaterFields = ({ sourceId, sourceName }) => {
|
||||
) : null}
|
||||
</form>
|
||||
<Button
|
||||
className="fieldsRepeater__addNew"
|
||||
type="button"
|
||||
disabled={false}
|
||||
onClick={addNew}
|
||||
|
||||
@@ -535,10 +535,10 @@ const DomandaEditPreInstructor = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
{/*<div className="appPageSection">
|
||||
<h2>{__('Documenti aggiuntivi', 'gepafin')}</h2>
|
||||
<RepeaterFields sourceId={id} sourceName="evaluation"/>
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Checklist Valutazione', 'gepafin')}</h2>
|
||||
@@ -589,7 +589,7 @@ const DomandaEditPreInstructor = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="appPageSection">
|
||||
{/*<div className="appPageSection">
|
||||
<h2>{__('Documenti di soccorso', 'gepafin')}</h2>
|
||||
<ListOfFiles
|
||||
files={data.files}
|
||||
@@ -598,7 +598,7 @@ const DomandaEditPreInstructor = () => {
|
||||
name="files"
|
||||
ndg={data.ndg}
|
||||
applicationId={id}/>
|
||||
</div>
|
||||
</div>*/}
|
||||
|
||||
<div className="appPageSection">
|
||||
<h2>{__('Punteggi di valutazione', 'gepafin')}</h2>
|
||||
|
||||
@@ -8,8 +8,8 @@ export class NetworkService {
|
||||
static REFRESH_TOKEN_KEY
|
||||
|
||||
static logApiError = (endpoint, status = 0, resp = {}) => {
|
||||
console.log('status:', status);
|
||||
if (status === 500) {
|
||||
console.log('status:', status, LOCAL_DEVELOPMENT);
|
||||
if (LOCAL_DEVELOPMENT !== '1') {
|
||||
try {
|
||||
Sentry.init({
|
||||
|
||||
Reference in New Issue
Block a user