Changeset View
Changeset View
Standalone View
Standalone View
lib/subject/subject-types/_batch_action.js
Show All 39 Lines | for (const i in params.sources) { | ||||
const field_in_collection = fields[i]; | const field_in_collection = fields[i]; | ||||
const field_name = map_to[i]; | const field_name = map_to[i]; | ||||
field_names.push(field_name); | field_names.push(field_name); | ||||
possible_field_values.push( | possible_field_values.push( | ||||
resources.map(resource => { | resources.map(resource => { | ||||
if (field_in_collection === "id") { | if (field_in_collection === "id") { | ||||
return resource.id; | return resource.id; | ||||
} else { | } else { | ||||
return resource.body[ | return resource[field_in_collection]; | ||||
field_in_collection | |||||
]; | |||||
} | } | ||||
}) | }) | ||||
); | ); | ||||
} | } | ||||
}); | }); | ||||
to_await.push(promise); | to_await.push(promise); | ||||
} | } | ||||
} | } | ||||
Show All 14 Lines |