Commit b8331ee3 authored by Open Source Developer's avatar Open Source Developer

test

parent 0472ed33
import { CLASSFIELDS_RECEIVED, CLASSFIELDS_SELECTED_SAVE } from '../constants';
import { Injectable } from '@angular/core';
import { NgRedux } from 'ng2-redux';
import { IAppState } from '../store';
import { HelperDataService } from '../services/helper-data-service';
@Injectable()
export class ClassFieldsActions {
constructor(
private _ngRedux: NgRedux<IAppState>,
private _hds: HelperDataService) {}
getClassFields = () => {
const { classFields } = this._ngRedux.getState();
if (classFields.size === 0) {
return this._hds.getClassFields().then(classFields => {
return this._ngRedux.dispatch({
type: CLASSFIELDS_RECEIVED,
payload: {
classFields
}
});
});
}
};
saveClassFieldsSelected = (classFieldsSelected) => {
return this._ngRedux.dispatch({
type: CLASSFIELDS_SELECTED_SAVE,
payload: {
classFieldsSelected
}
});
};
}
......@@ -3,7 +3,8 @@ import { SectorFieldsActions } from './sectorfields.actions';
import { RegionSchoolsActions } from './regionschools.actions';
import { SectorCoursesActions } from './sectorcourses.actions';
import { StudentDataFieldsActions } from './studentdatafields.actions';
const ACTION_PROVIDERS = [ CourseFieldsActions, SectorFieldsActions, RegionSchoolsActions, SectorCoursesActions, StudentDataFieldsActions ];
import { ClassFieldsActions } from './classfields.actions';
const ACTION_PROVIDERS = [ CourseFieldsActions, SectorFieldsActions, RegionSchoolsActions, SectorCoursesActions, StudentDataFieldsActions, ClassFieldsActions ];
export {
CourseFieldsActions,
......@@ -11,5 +12,6 @@ export {
RegionSchoolsActions,
SectorCoursesActions,
StudentDataFieldsActions,
ClassFieldsActions,
ACTION_PROVIDERS,
};
export class AppSettings {
public static get API_ENDPOINT(): string {
return 'http://localhost/dist';
return 'http://localhost/angular/eepal-front/drupal';
// return 'http://localhost/drupal-8.2.5';
// return 'http://eepal.dev/drupal';
// return 'http://eduslim2.minedu.gov.gr/drupal';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment