- added rapresentante dynamic tag;

- added full user name dynamic tag;
- translated dynamic tags;
- fixed issue related to number form field;
This commit is contained in:
Vitalii Kiiko
2024-11-19 11:46:04 +01:00
parent 7b2a756100
commit 8570c01952
6 changed files with 69 additions and 51 deletions

View File

@@ -5,6 +5,7 @@ import { head, is, pluck, isEmpty, pathOr } from 'ramda';
import { useForm } from 'react-hook-form';
import { TZDate } from '@date-fns/tz';
import 'quill/dist/quill.core.css';
import { wrap } from 'object-path-immutable';
// store
import { storeSet, storeGet, useStore } from '../../store';
@@ -304,7 +305,8 @@ const BandoApplication = () => {
let formDataInitial = {};
let dynamicData = {
company: {},
user: {}
user: {},
custom: {}
};
if (company) {
@@ -332,6 +334,11 @@ const BandoApplication = () => {
return acc;
}, dynamicData);
const userFullName = `${userData.firstName} ${userData.lastName}`;
dynamicData = wrap(dynamicData).set(['custom', 'userFullName'], userFullName).value();
const legalRepresentantName = company.isLegalRepresentant ? userFullName : '';
dynamicData = wrap(dynamicData).set(['custom', 'legalRepresentant'], legalRepresentantName).value();
if (data.data.applicationFormResponse.content) {
// eslint-disable-next-line array-callback-return
data.data.applicationFormResponse.content.map((o) => {