mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 01:15:44 +01:00
Fixed bug which caused loading state in GroupForm not to be set correctly
This commit is contained in:
@@ -181,7 +181,7 @@ export function createGroupReset() {
|
||||
// modify group
|
||||
export function modifyGroup(group: Group, callback?: () => void) {
|
||||
return function(dispatch: Dispatch) {
|
||||
dispatch(modifyGroupPending());
|
||||
dispatch(modifyGroupPending(group));
|
||||
return apiClient
|
||||
.putWithContentType(group._links.update.href, group, CONTENT_TYPE_GROUP)
|
||||
.then(() => {
|
||||
@@ -196,16 +196,19 @@ export function modifyGroup(group: Group, callback?: () => void) {
|
||||
};
|
||||
}
|
||||
|
||||
export function modifyGroupPending(): Action {
|
||||
export function modifyGroupPending(group: Group): Action {
|
||||
return {
|
||||
type: MODIFY_GROUP_PENDING
|
||||
type: MODIFY_GROUP_PENDING,
|
||||
payload: group,
|
||||
itemId: group.name
|
||||
}
|
||||
}
|
||||
|
||||
export function modifyGroupSuccess(group: Group): Action {
|
||||
return {
|
||||
type: MODIFY_GROUP_SUCCESS,
|
||||
payload: group
|
||||
payload: group,
|
||||
itemId: group.name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user