studentdatafields.actions.ts 771 Bytes
Newer Older
1
import { STUDENTDATAFIELDS_SAVE, STUDENTDATAFIELDS_INIT } from '../constants';
2
import { Injectable } from '@angular/core';
3
import { NgRedux } from '@angular-redux/store';
4
import { IAppState } from '../store';
5
//import { UserDataService } from '../services/user-data-service';
6 7 8 9 10


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

13
  saveStudentDataFields = (studentDataFields) => {
14 15 16 17

      return this._ngRedux.dispatch({
        type: STUDENTDATAFIELDS_SAVE,
        payload: {
18
          studentDataFields
19 20 21 22 23 24
        }

      });

  };

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

33
}