studentdatafields.actions.ts 738 Bytes
Newer Older
1
import { NgRedux } from "@angular-redux/store";
2 3 4
import { Injectable } from "@angular/core";

import { STUDENTDATAFIELDS_INIT, STUDENTDATAFIELDS_SAVE } from "../constants";
5
import { IAppState } from "../store";
6 7 8

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

12
    saveStudentDataFields = (studentDataFields) => {
13

14 15 16 17 18 19
        return this._ngRedux.dispatch({
            type: STUDENTDATAFIELDS_SAVE,
            payload: {
                studentDataFields
            }
        });
20

21
    };
22

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

31
}