Fixed issue of fileselect

This commit is contained in:
rajesh
2025-03-03 14:49:03 +05:30
parent 507447b4e4
commit d64779ae38
3 changed files with 29 additions and 4 deletions

View File

@@ -277,7 +277,8 @@ public class ApplicationDao {
for (ApplicationFormFieldEntity applicationFormFieldEntity : applicationFormFieldEntities) {
Optional<ContentResponseBean> fileUploadContent = contentResponseBeans.stream()
.filter(contentResponseBean -> "fileupload".equals(contentResponseBean.getName()) &&
.filter(contentResponseBean -> ("fileupload".equals(contentResponseBean.getName()) ||
"fileselect".equals(contentResponseBean.getName())) &&
contentResponseBean.getId().equals(applicationFormFieldEntity.getFieldId()))
.findFirst();
@@ -613,7 +614,7 @@ public class ApplicationDao {
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
for (ContentResponseBean contentResponseBean : contentResponseBeans) {
if (Boolean.FALSE.equals(contentResponseBean.getName().equals("fileupload"))) {
if (Boolean.FALSE.equals(contentResponseBean.getName().equals("fileupload") || contentResponseBean.getName().equals("fileselect"))) {
return;
}
}
@@ -669,7 +670,7 @@ public class ApplicationDao {
// List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
List<ContentResponseBean> contentResponseBeans=formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
for (ContentResponseBean contentResponseBean:contentResponseBeans){
if(Boolean.TRUE.equals(contentResponseBean.getName().equals("fileupload"))) {
if(Boolean.TRUE.equals(contentResponseBean.getName().equals("fileupload")) || Boolean.TRUE.equals(contentResponseBean.getName().equals("fileselect"))) {
if (contentResponseBean.getId().equals(applicationFormFieldRequestBean.getFieldId())) {
Object fieldValueObject = applicationFormFieldRequestBean.getFieldValue();
if (fieldValueObject instanceof String) {
@@ -1405,7 +1406,7 @@ public class ApplicationDao {
FormEntity formEntity = applicationForm.getForm();
if (formEntity != null) {
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
contentResponseBeans.stream().filter(content -> "fileupload".equals(content.getName())).forEach(content -> {
contentResponseBeans.stream().filter(content -> "fileupload".equals(content.getName()) || "fileselect".equals(content.getName())).forEach(content -> {
Optional<ApplicationFormFieldEntity> formField = applicationFormFieldRepository.findByFieldIdAndApplicationFormIdAndApplicationFormApplicationId(
content.getId(), applicationForm.getId(), applicationId);
formField.ifPresent(field -> {

View File

@@ -2550,5 +2550,16 @@
</column>
</addColumn>
</changeSet>
<changeSet id="03-03-2025_RK_120515" author="Rajesh Khore">
<sql dbms="postgresql">select
setval('gepafin_schema.form_field_id_seq', (select
max(id)+1
from gepafin_schema.form_field), false)
</sql>
<sqlFile dbms="postgresql"
path="db/dump/update_form_field_data_03-03-2025.sql"/>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,13 @@
INSERT INTO FORM_FIELD (SORT_ORDER, NAME, LABEL, DESCRIPTION, SETTINGS, VALIDATORS, CREATED_DATE, UPDATED_DATE)
VALUES
(
23,
'fileselect',
'Caricamento File',
'Per selezionare di documenti o immagini',
'[{name: "label",value: "Seleziona File"},{ name: "isDelegation", value: false }]',
'{"isRequired":false}',
CURRENT_TIMESTAMP,
CURRENT_TIMESTAMP
);