Fixed issue of fileselect
This commit is contained in:
@@ -277,7 +277,8 @@ public class ApplicationDao {
|
|||||||
for (ApplicationFormFieldEntity applicationFormFieldEntity : applicationFormFieldEntities) {
|
for (ApplicationFormFieldEntity applicationFormFieldEntity : applicationFormFieldEntities) {
|
||||||
|
|
||||||
Optional<ContentResponseBean> fileUploadContent = contentResponseBeans.stream()
|
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()))
|
contentResponseBean.getId().equals(applicationFormFieldEntity.getFieldId()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
@@ -613,7 +614,7 @@ public class ApplicationDao {
|
|||||||
|
|
||||||
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
||||||
for (ContentResponseBean contentResponseBean : contentResponseBeans) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -669,7 +670,7 @@ public class ApplicationDao {
|
|||||||
// List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
|
// List<ContentResponseBean> contentResponseBeans=Utils.convertJsonStringToList(formEntity.getContent(),ContentResponseBean.class);
|
||||||
List<ContentResponseBean> contentResponseBeans=formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
List<ContentResponseBean> contentResponseBeans=formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
||||||
for (ContentResponseBean contentResponseBean:contentResponseBeans){
|
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())) {
|
if (contentResponseBean.getId().equals(applicationFormFieldRequestBean.getFieldId())) {
|
||||||
Object fieldValueObject = applicationFormFieldRequestBean.getFieldValue();
|
Object fieldValueObject = applicationFormFieldRequestBean.getFieldValue();
|
||||||
if (fieldValueObject instanceof String) {
|
if (fieldValueObject instanceof String) {
|
||||||
@@ -1405,7 +1406,7 @@ public class ApplicationDao {
|
|||||||
FormEntity formEntity = applicationForm.getForm();
|
FormEntity formEntity = applicationForm.getForm();
|
||||||
if (formEntity != null) {
|
if (formEntity != null) {
|
||||||
List<ContentResponseBean> contentResponseBeans = formDao.convertFormEntityToFormResponseBean(formEntity).getContent();
|
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(
|
Optional<ApplicationFormFieldEntity> formField = applicationFormFieldRepository.findByFieldIdAndApplicationFormIdAndApplicationFormApplicationId(
|
||||||
content.getId(), applicationForm.getId(), applicationId);
|
content.getId(), applicationForm.getId(), applicationId);
|
||||||
formField.ifPresent(field -> {
|
formField.ifPresent(field -> {
|
||||||
|
|||||||
@@ -2551,4 +2551,15 @@
|
|||||||
</addColumn>
|
</addColumn>
|
||||||
</changeSet>
|
</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>
|
</databaseChangeLog>
|
||||||
|
|||||||
@@ -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
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user