- fixed issue in datepicker;
- updated styles;
This commit is contained in:
@@ -221,22 +221,29 @@
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> li {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid var(--button-secondary-borderColor);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
&.row {
|
||||
flex-direction: row;
|
||||
}
|
||||
.appPageSection__listItem {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid var(--button-secondary-borderColor);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
|
||||
&.row {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.appPageSection__listItemRow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.appPageSection__checklist {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { classNames } from 'primereact/utils';
|
||||
import { Controller } from 'react-hook-form';
|
||||
import { is } from 'ramda';
|
||||
import { is, isEmpty } from 'ramda';
|
||||
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
|
||||
@@ -30,7 +30,7 @@ const Datepicker = ({
|
||||
rules={config}
|
||||
render={({ field, fieldState }) => (<Calendar id={field.name}
|
||||
disabled={disabled}
|
||||
value={is(String, field.value) ? new Date(field.value) : field.value}
|
||||
value={is(String, field.value) && !isEmpty(field.value) ? new Date(field.value) : field.value}
|
||||
onChange={(e) => field.onChange(e.value)}
|
||||
dateFormat="dd/mm/yy"
|
||||
hourFormat="24"
|
||||
|
||||
@@ -259,7 +259,7 @@ const DomandaEditPreInstructor = () => {
|
||||
}
|
||||
|
||||
const shouldDisableField = (fieldName) => {
|
||||
return !['EVALUATION'].includes(data.status) || ['ADMISSIBLE'].includes(data.status) && fieldName !== 'criteria'
|
||||
return !['EVALUATION', 'OPEN'].includes(data.status) || ['ADMISSIBLE'].includes(data.status) && fieldName !== 'criteria'
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -454,12 +454,8 @@ const DomandaEditPreInstructor = () => {
|
||||
<div>
|
||||
<h3>{__('Documenti allegati', 'gepafin')}</h3>
|
||||
<ol className="appPageSection__list">
|
||||
{data.files.map((o, i) => <li key={o.id}>
|
||||
<div className="appPageSection" style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between'
|
||||
}}>
|
||||
{data.files.map((o, i) => <li key={o.id} className="appPageSection__listItem">
|
||||
<div className="appPageSection__listItemRow">
|
||||
<span>{o.label}</span>
|
||||
<div className="appPageSection__iconActions">
|
||||
{o.fileDetail && o.fileDetail.length === 1
|
||||
|
||||
Reference in New Issue
Block a user