Skip to content

Commit dec2453

Browse files
Update dynamic field mapping logic in profile page
Refactor how dynamic field names are assigned based on field types. This change ensures proper naming for specific field types (15 and 16), improving data consistency and clarity.
1 parent a901230 commit dec2453

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

_pages/profile.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@ export default {
247247
this.$crud.show('apiRoutes.qform.forms', this.roleFormId, requestParams).then(response => {
248248
//Set extra blocks
249249
let blocks = response.data.blocks.map(block => {
250-
return { ...block, fields: block.fields.map(field => field.dynamicField) };
250+
return { ...block, fields: block.fields.map(field => {
251+
return {
252+
...field.dynamicField,
253+
name: field.type == '15' ? 'firstName' : field.type == '16' ? 'lastName' : field.name,
254+
}
255+
}) };
251256
});
252257
//concat block name to fields
253258
blocks.forEach((block, blockKey) => {

0 commit comments

Comments
 (0)