This repository has been archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(board): send patch and reorder requests
- Loading branch information
Showing
8 changed files
with
182 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { Action } from '@ngrx/store'; | ||
import { WorkItemService, WorkItemUI } from './../models/work-item'; | ||
|
||
export const UPDATE = '[column workitem] Update'; | ||
export const UPDATE_SUCCESS = '[column workitem] UpdateSuccess'; | ||
export const UPDATE_ERROR = '[column workitem] UpdateError'; | ||
|
||
export class Update implements Action { | ||
payload: { | ||
workItem: WorkItemUI, | ||
reorder: { | ||
workitem: WorkItemUI, | ||
destinationWorkitemID: string, | ||
direction: string | ||
}, | ||
prevColumnId: string | ||
}; | ||
|
||
constructor(payload: { | ||
workItem: WorkItemUI, | ||
reorder: { | ||
workitem: WorkItemUI, | ||
destinationWorkitemID: string, | ||
direction: string | ||
}, | ||
prevColumnId: string | ||
}) { | ||
this.payload = payload; | ||
} | ||
readonly type = UPDATE; | ||
} | ||
|
||
export class UpdateSuccess implements Action { | ||
payload: { | ||
workItemId: string, | ||
prevColumnId: string, | ||
newColumnIds: string[] | ||
}; | ||
|
||
constructor(payload: { | ||
workItemId: string, | ||
prevColumnId: string, | ||
newColumnIds: string[] | ||
}) { | ||
this.payload = payload; | ||
} | ||
readonly type = UPDATE_SUCCESS; | ||
} | ||
|
||
export class UpdateError implements Action { | ||
readonly type = UPDATE_ERROR; | ||
} | ||
|
||
export type All | ||
= Update | ||
| UpdateSuccess | ||
| UpdateError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters