studentdatafields.actions.ts 738 Bytes
Newer Older
1 2 3 4
import { STUDENTDATAFIELDS_SAVE, STUDENTDATAFIELDS_INIT } from "../constants";
import { Injectable } from "@angular/core";
import { NgRedux } from "@angular-redux/store";
import { IAppState } from "../store";
5 6 7

@Injectable()
export class StudentDataFieldsActions {
8 9
    constructor(
        private _ngRedux: NgRedux<IAppState>) { }
10

11
    saveStudentDataFields = (studentDataFields) => {
12

13 14 15 16 17
        return this._ngRedux.dispatch({
            type: STUDENTDATAFIELDS_SAVE,
            payload: {
                studentDataFields
            }
18

19
        });
20

21
    };
22

23
    initStudentDataFields = () => {
24 25 26 27 28 29 30
        return this._ngRedux.dispatch({
            type: STUDENTDATAFIELDS_INIT,
            payload: {
            }
        });
    };

31
}