- fixed dynamic tags aggregation #6342;
This commit is contained in:
@@ -95,12 +95,13 @@ const BandoEditFormStep3 = forwardRef(function () {
|
||||
const getFormsCallback = (resp) => {
|
||||
if (resp.status === 'SUCCESS') {
|
||||
const EXCLUDED_TYPES = new Set(['fileupload', 'fileselect', 'table', 'criteria_table', 'spreadsheet']);
|
||||
console.log('resp.data', resp.data)
|
||||
const raw = (resp.data ?? []).flatMap(form =>
|
||||
(form.content ?? [])
|
||||
.filter(f => !EXCLUDED_TYPES.has(f.name))
|
||||
.map(f => ({
|
||||
id: f.id,
|
||||
label: f.label,
|
||||
label: f.settings?.find(s => s.name === 'label')?.value ?? f.label,
|
||||
placeholder: f.settings?.find(s => s.name === 'placeholder')?.value ?? ''
|
||||
}))
|
||||
);
|
||||
@@ -109,6 +110,7 @@ const BandoEditFormStep3 = forwardRef(function () {
|
||||
if (!byLabel.has(f.label)) byLabel.set(f.label, { label: f.label, ids: [], placeholder: f.placeholder });
|
||||
byLabel.get(f.label).ids.push(f.id);
|
||||
});
|
||||
console.log('byLabel', Array.from(byLabel.values()))
|
||||
storeSet('callFormFields', Array.from(byLabel.values()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user