Promise.all(promises) .then(results => { const merged = concat(results[0], results[1]) return getClientsFromAggregateResponse(merged) })
export default function (state = [], action) { switch (action.type) { case SELECT_POST: return concat(state, action.payload); case UNSELECT_POST: return remove(state, id => id !== action.payload); default: return state; } }
function idConcat(cardIds, cardId) { return concat(cardIds, cardId) }
export function modelsFetchSucceeded(models) { const modelNumber = size(models.models) > 1 ? 'plural' : 'singular'; const sections = storeData.getMenu() || map(models.models, (model) => ({icon: 'fa-caret-square-o-right', name: model.name, source: model.source })); if (!storeData.getMenu()){ sections.push({ icon: 'fa-plus', name: 'button.contentType.add' }); } const menu = { sections: [ Map({ name: `menu.section.contentTypeBuilder.name.${modelNumber}`, items: List(sections), }), ], }; const data = storeData.getModel() ? { models: concat(models.models, storeData.getModel()) } : models; return { type: MODELS_FETCH_SUCCEEDED, data, menu, }; }
export function setAttributeForm(hash) { const data = setAttributeFormData(hash); const attributeRelation = Map({ name: '', params: Map({ columnName: '', target: '', targetColumnName: "", key: '', nature: 'oneToOne', required: false, unique: false, dominant: false, }), }); const attribute = includes(hash, 'attributerelation') ? attributeRelation : data.attribute; const formValidations = concat(getValidationsFromForm(data.form, []), { name: 'name', validations: { required: true } }); return { type: SET_ATTRIBUTE_FORM, form: data.form, attribute, formValidations, }; }
attr.params.key !== '-' && attr.params.key === this.props.modifiedDataAttribute.params.key && attr.params.target === this.props.modifiedDataAttribute.params.target); const sameParamsKeyAndName = filter(this.props.contentTypeData.attributes, (attr) => attr.name === this.props.modifiedDataAttribute.params.key); const formErrors = concat(errors, hasNestedValue(this.props.modifiedDataAttribute)); const isEditingParamsKey = this.props.modifiedDataAttribute.params.key !== get(this.props.contentTypeData.attributes, [attributeIndex, 'params', 'key']);