From 1e1d16b3cdc8973b7234e02b2391e8b4bcae531e Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Thu, 21 Nov 2024 12:42:03 +0100 Subject: [PATCH] - fixed issue in datepicker; - updated styles; --- src/assets/scss/components/appPage.scss | 31 ++++++++++++------- .../FormField/components/Datepicker/index.js | 4 +-- src/pages/DomandaEditPreInstructor/index.js | 10 ++---- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/assets/scss/components/appPage.scss b/src/assets/scss/components/appPage.scss index 4a1771b..c22488f 100644 --- a/src/assets/scss/components/appPage.scss +++ b/src/assets/scss/components/appPage.scss @@ -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; diff --git a/src/components/FormField/components/Datepicker/index.js b/src/components/FormField/components/Datepicker/index.js index b33c13c..f4164c5 100644 --- a/src/components/FormField/components/Datepicker/index.js +++ b/src/components/FormField/components/Datepicker/index.js @@ -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 }) => ( field.onChange(e.value)} dateFormat="dd/mm/yy" hourFormat="24" diff --git a/src/pages/DomandaEditPreInstructor/index.js b/src/pages/DomandaEditPreInstructor/index.js index 5ca8898..67bf975 100644 --- a/src/pages/DomandaEditPreInstructor/index.js +++ b/src/pages/DomandaEditPreInstructor/index.js @@ -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 = () => {

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

    - {data.files.map((o, i) =>
  1. -
    + {data.files.map((o, i) =>
  2. +
    {o.label}
    {o.fileDetail && o.fileDetail.length === 1