Created
June 28, 2018 14:35
-
-
Save Akiyamka/98ee27a00507883870ac3bff31ba1c8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| activate() { | |
| this.pipeline = { | |
| A_requestModel: () => { | |
| this.params.loading = true; | |
| return this.get(newRequest(this.params)); | |
| }, | |
| B_requestDataOnce: () => { | |
| const state = this.store.getState(); | |
| this.constants = state.constants; | |
| this.currentUser = state.currentUser; | |
| return Promise.resolve(); | |
| }, | |
| C_dumpFromStore: () => { | |
| const state = this.store.getState(); | |
| this.model = state.allApprovals; | |
| this.model.data = this.model.data.map(a => this.convertStatus(a)); | |
| return Promise.resolve(); | |
| }, | |
| D_end: () => { | |
| this.loadsetLastSelectRow(this.model.data, this.lastSelectRow); | |
| this.params.loading = false; | |
| }, | |
| }; | |
| } | |
| fetchData() { | |
| this.startPipeline(this.pipeline); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment