Commit 8430ccf4 authored by Open Source Developer's avatar Open Source Developer

commit 8-2

parent b8331ee3
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
}
});
};
}
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
const helper_data_service_1 = require("../services/helper-data-service");
let CourseFieldsActions = class CourseFieldsActions {
constructor(_ngRedux, _hds) {
this._ngRedux = _ngRedux;
this._hds = _hds;
this.getCourseFields = () => {
const { courseFields } = this._ngRedux.getState();
if (courseFields.size === 0) {
return this._hds.getCourseFields().then(courseFields => {
return this._ngRedux.dispatch({
type: constants_1.COURSEFIELDS_RECEIVED,
payload: {
courseFields
}
});
});
}
};
this.saveCourseFieldsSelected = (courseFieldsSelected) => {
return this._ngRedux.dispatch({
type: constants_1.COURSEFIELDS_SELECTED_SAVE,
payload: {
courseFieldsSelected
}
});
};
}
};
CourseFieldsActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux,
helper_data_service_1.HelperDataService])
], CourseFieldsActions);
exports.CourseFieldsActions = CourseFieldsActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291cnNlZmllbGRzLmFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjb3Vyc2VmaWVsZHMuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsNENBQWlGO0FBQ2pGLHdDQUEyQztBQUMzQyx5Q0FBb0M7QUFFcEMseUVBQW9FO0FBR3BFLElBQWEsbUJBQW1CLEdBQWhDO0lBQ0UsWUFDVSxRQUE0QixFQUM1QixJQUF1QjtRQUR2QixhQUFRLEdBQVIsUUFBUSxDQUFvQjtRQUM1QixTQUFJLEdBQUosSUFBSSxDQUFtQjtRQUVqQyxvQkFBZSxHQUFHO1lBQ2hCLE1BQU0sRUFBRSxZQUFZLEVBQUUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDO1lBQ2xELEVBQUUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDMUIsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUMsSUFBSSxDQUFDLFlBQVk7b0JBQ2hELE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQzt3QkFDMUIsSUFBSSxFQUFFLGlDQUFxQjt3QkFDM0IsT0FBTyxFQUFFOzRCQUNMLFlBQVk7eUJBQ2Y7cUJBQ0osQ0FBQyxDQUFDO2dCQUNQLENBQUMsQ0FBQyxDQUFDO1lBQ1AsQ0FBQztRQUNILENBQUMsQ0FBQztRQUVGLDZCQUF3QixHQUFHLENBQUMsb0JBQW9CO1lBQzVDLE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQztnQkFDNUIsSUFBSSxFQUFFLHNDQUEwQjtnQkFDaEMsT0FBTyxFQUFFO29CQUNQLG9CQUFvQjtpQkFDckI7YUFDRixDQUFDLENBQUM7UUFDUCxDQUFDLENBQUM7SUF2QmtDLENBQUM7Q0F5QnRDLENBQUE7QUE1QlksbUJBQW1CO0lBRC9CLGlCQUFVLEVBQUU7cUNBR1MsbUJBQU87UUFDWCx1Q0FBaUI7R0FIdEIsbUJBQW1CLENBNEIvQjtBQTVCWSxrREFBbUIifQ==
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
let EpalClassesActions = class EpalClassesActions {
constructor(_ngRedux) {
this._ngRedux = _ngRedux;
this.saveEpalClassesSelected = (epalClasses) => {
return this._ngRedux.dispatch({
type: constants_1.EPALCLASSES_SAVE,
payload: {
epalClasses
}
});
};
}
};
EpalClassesActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux])
], EpalClassesActions);
exports.EpalClassesActions = EpalClassesActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXBhbGNsYXNzLmFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJlcGFsY2xhc3MuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsNENBQXNFO0FBQ3RFLHdDQUEyQztBQUMzQyx5Q0FBb0M7QUFLcEMsSUFBYSxrQkFBa0IsR0FBL0I7SUFDRSxZQUNVLFFBQTRCO1FBQTVCLGFBQVEsR0FBUixRQUFRLENBQW9CO1FBR3RDLDRCQUF1QixHQUFHLENBQUMsV0FBVztZQUNsQyxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUM7Z0JBQzVCLElBQUksRUFBRSw0QkFBZ0I7Z0JBQ3RCLE9BQU8sRUFBRTtvQkFDUCxXQUFXO2lCQUNaO2FBQ0YsQ0FBQyxDQUFDO1FBQ1AsQ0FBQyxDQUFDO0lBVnVDLENBQUM7Q0FZM0MsQ0FBQTtBQWRZLGtCQUFrQjtJQUQ5QixpQkFBVSxFQUFFO3FDQUdTLG1CQUFPO0dBRmhCLGtCQUFrQixDQWM5QjtBQWRZLGdEQUFrQiJ9
\ No newline at end of file
import { EPALCLASSES_SAVE } from '../constants';
import { Injectable } from '@angular/core';
import { NgRedux } from 'ng2-redux';
import { IAppState } from '../store';
@Injectable()
export class EpalClassesActions {
constructor(
private _ngRedux: NgRedux<IAppState>) {}
saveEpalClassesSelected = (epalClasses) => {
return this._ngRedux.dispatch({
type: EPALCLASSES_SAVE,
payload: {
epalClasses
}
});
};
}
"use strict";
const coursefields_actions_1 = require("./coursefields.actions");
exports.CourseFieldsActions = coursefields_actions_1.CourseFieldsActions;
const sectorfields_actions_1 = require("./sectorfields.actions");
exports.SectorFieldsActions = sectorfields_actions_1.SectorFieldsActions;
const regionschools_actions_1 = require("./regionschools.actions");
exports.RegionSchoolsActions = regionschools_actions_1.RegionSchoolsActions;
const sectorcourses_actions_1 = require("./sectorcourses.actions");
exports.SectorCoursesActions = sectorcourses_actions_1.SectorCoursesActions;
const studentdatafields_actions_1 = require("./studentdatafields.actions");
exports.StudentDataFieldsActions = studentdatafields_actions_1.StudentDataFieldsActions;
const epalclass_actions_1 = require("./epalclass.actions");
exports.EpalClassesActions = epalclass_actions_1.EpalClassesActions;
const ACTION_PROVIDERS = [coursefields_actions_1.CourseFieldsActions, sectorfields_actions_1.SectorFieldsActions, regionschools_actions_1.RegionSchoolsActions, sectorcourses_actions_1.SectorCoursesActions, studentdatafields_actions_1.StudentDataFieldsActions, ClassFieldsActions];
exports.ACTION_PROVIDERS = ACTION_PROVIDERS;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsaUVBQTZEO0FBUzNELHlFQUFtQjtBQVJyQixpRUFBNkQ7QUFTM0QseUVBQW1CO0FBUnJCLG1FQUErRDtBQVM3RCw0RUFBb0I7QUFSdEIsbUVBQStEO0FBUzdELDRFQUFvQjtBQVJ0QiwyRUFBdUU7QUFTckUsd0ZBQXdCO0FBUjFCLDJEQUF5RDtBQVN2RCxvRUFBa0I7QUFScEIsTUFBTSxnQkFBZ0IsR0FBRyxDQUFFLDBDQUFtQixFQUFFLDBDQUFtQixFQUFFLDRDQUFvQixFQUFFLDRDQUFvQixFQUFFLG9EQUF3QixFQUFFLGtCQUFrQixDQUFFLENBQUM7QUFTOUosNENBQWdCIn0=
\ No newline at end of file
......@@ -3,8 +3,8 @@ import { SectorFieldsActions } from './sectorfields.actions';
import { RegionSchoolsActions } from './regionschools.actions';
import { SectorCoursesActions } from './sectorcourses.actions';
import { StudentDataFieldsActions } from './studentdatafields.actions';
import { ClassFieldsActions } from './classfields.actions';
const ACTION_PROVIDERS = [ CourseFieldsActions, SectorFieldsActions, RegionSchoolsActions, SectorCoursesActions, StudentDataFieldsActions, ClassFieldsActions ];
import { EpalClassesActions } from './epalclass.actions';
const ACTION_PROVIDERS = [ CourseFieldsActions, SectorFieldsActions, RegionSchoolsActions, SectorCoursesActions, StudentDataFieldsActions, EpalClassesActions ];
export {
CourseFieldsActions,
......@@ -12,6 +12,6 @@ export {
RegionSchoolsActions,
SectorCoursesActions,
StudentDataFieldsActions,
ClassFieldsActions,
EpalClassesActions,
ACTION_PROVIDERS,
};
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
const helper_data_service_1 = require("../services/helper-data-service");
let RegionSchoolsActions = class RegionSchoolsActions {
constructor(_ngRedux, _hds) {
this._ngRedux = _ngRedux;
this._hds = _hds;
this.getRegionSchools = () => {
const { regions } = this._ngRedux.getState();
if (regions.size === 0) {
return this._hds.getRegionsWithSchools().then(regions => {
return this._ngRedux.dispatch({
type: constants_1.REGIONSCHOOLS_RECEIVED,
payload: {
regions
}
});
});
}
};
this.saveRegionSchoolsSelected = (regionSchoolsSelected) => {
return this._ngRedux.dispatch({
type: constants_1.REGIONSCHOOLS_SELECTED_SAVE,
payload: {
regionSchoolsSelected
}
});
};
}
};
RegionSchoolsActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux,
helper_data_service_1.HelperDataService])
], RegionSchoolsActions);
exports.RegionSchoolsActions = RegionSchoolsActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaW9uc2Nob29scy5hY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicmVnaW9uc2Nob29scy5hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSw0Q0FBbUY7QUFDbkYsd0NBQTJDO0FBQzNDLHlDQUFvQztBQUVwQyx5RUFBb0U7QUFHcEUsSUFBYSxvQkFBb0IsR0FBakM7SUFDRSxZQUNVLFFBQTRCLEVBQzVCLElBQXVCO1FBRHZCLGFBQVEsR0FBUixRQUFRLENBQW9CO1FBQzVCLFNBQUksR0FBSixJQUFJLENBQW1CO1FBRWpDLHFCQUFnQixHQUFHO1lBQ2pCLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDO1lBQzdDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDckIsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMscUJBQXFCLEVBQUUsQ0FBQyxJQUFJLENBQUMsT0FBTztvQkFDakQsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDO3dCQUMxQixJQUFJLEVBQUUsa0NBQXNCO3dCQUM1QixPQUFPLEVBQUU7NEJBQ0wsT0FBTzt5QkFDVjtxQkFDSixDQUFDLENBQUM7Z0JBQ1AsQ0FBQyxDQUFDLENBQUM7WUFDUCxDQUFDO1FBQ0gsQ0FBQyxDQUFDO1FBRUYsOEJBQXlCLEdBQUcsQ0FBQyxxQkFBcUI7WUFDOUMsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDO2dCQUM1QixJQUFJLEVBQUUsdUNBQTJCO2dCQUNqQyxPQUFPLEVBQUU7b0JBQ1AscUJBQXFCO2lCQUN0QjthQUNGLENBQUMsQ0FBQztRQUNQLENBQUMsQ0FBQztJQXZCa0MsQ0FBQztDQXlCdEMsQ0FBQTtBQTVCWSxvQkFBb0I7SUFEaEMsaUJBQVUsRUFBRTtxQ0FHUyxtQkFBTztRQUNYLHVDQUFpQjtHQUh0QixvQkFBb0IsQ0E0QmhDO0FBNUJZLG9EQUFvQiJ9
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
const helper_data_service_1 = require("../services/helper-data-service");
let SectorCoursesActions = class SectorCoursesActions {
constructor(_ngRedux, _hds) {
this._ngRedux = _ngRedux;
this._hds = _hds;
this.getSectorCourses = () => {
const { sectors } = this._ngRedux.getState();
if (sectors.size === 0) {
return this._hds.getSectorsWithCourses().then(sectors => {
return this._ngRedux.dispatch({
type: constants_1.SECTORCOURSES_RECEIVED,
payload: {
sectors
}
});
});
}
};
this.saveSectorCoursesSelected = (sectorCoursesSelected) => {
return this._ngRedux.dispatch({
type: constants_1.SECTORCOURSES_SELECTED_SAVE,
payload: {
sectorCoursesSelected
}
});
};
}
};
SectorCoursesActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux,
helper_data_service_1.HelperDataService])
], SectorCoursesActions);
exports.SectorCoursesActions = SectorCoursesActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjdG9yY291cnNlcy5hY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic2VjdG9yY291cnNlcy5hY3Rpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSw0Q0FBbUY7QUFDbkYsd0NBQTJDO0FBQzNDLHlDQUFvQztBQUVwQyx5RUFBb0U7QUFHcEUsSUFBYSxvQkFBb0IsR0FBakM7SUFDRSxZQUNVLFFBQTRCLEVBQzVCLElBQXVCO1FBRHZCLGFBQVEsR0FBUixRQUFRLENBQW9CO1FBQzVCLFNBQUksR0FBSixJQUFJLENBQW1CO1FBRWpDLHFCQUFnQixHQUFHO1lBQ2pCLE1BQU0sRUFBRSxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDO1lBQzdDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDckIsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMscUJBQXFCLEVBQUUsQ0FBQyxJQUFJLENBQUMsT0FBTztvQkFDakQsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDO3dCQUMxQixJQUFJLEVBQUUsa0NBQXNCO3dCQUM1QixPQUFPLEVBQUU7NEJBQ0wsT0FBTzt5QkFDVjtxQkFDSixDQUFDLENBQUM7Z0JBQ1AsQ0FBQyxDQUFDLENBQUM7WUFDUCxDQUFDO1FBQ0gsQ0FBQyxDQUFDO1FBRUYsOEJBQXlCLEdBQUcsQ0FBQyxxQkFBcUI7WUFDOUMsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDO2dCQUM1QixJQUFJLEVBQUUsdUNBQTJCO2dCQUNqQyxPQUFPLEVBQUU7b0JBQ1AscUJBQXFCO2lCQUN0QjthQUNGLENBQUMsQ0FBQztRQUNQLENBQUMsQ0FBQztJQXZCa0MsQ0FBQztDQXlCdEMsQ0FBQTtBQTVCWSxvQkFBb0I7SUFEaEMsaUJBQVUsRUFBRTtxQ0FHUyxtQkFBTztRQUNYLHVDQUFpQjtHQUh0QixvQkFBb0IsQ0E0QmhDO0FBNUJZLG9EQUFvQiJ9
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
const helper_data_service_1 = require("../services/helper-data-service");
let SectorFieldsActions = class SectorFieldsActions {
constructor(_ngRedux, _hds) {
this._ngRedux = _ngRedux;
this._hds = _hds;
this.getSectorFields = () => {
const { sectorFields } = this._ngRedux.getState();
if (sectorFields.size === 0) {
return this._hds.getSectorFields().then(sectorFields => {
return this._ngRedux.dispatch({
type: constants_1.SECTORFIELDS_RECEIVED,
payload: {
sectorFields
}
});
});
}
};
this.saveSectorFieldsSelected = (sectorFieldsSelected) => {
return this._ngRedux.dispatch({
type: constants_1.SECTORFIELDS_SELECTED_SAVE,
payload: {
sectorFieldsSelected
}
});
};
}
};
SectorFieldsActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux,
helper_data_service_1.HelperDataService])
], SectorFieldsActions);
exports.SectorFieldsActions = SectorFieldsActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjdG9yZmllbGRzLmFjdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzZWN0b3JmaWVsZHMuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsNENBQWlGO0FBQ2pGLHdDQUEyQztBQUMzQyx5Q0FBb0M7QUFFcEMseUVBQW9FO0FBR3BFLElBQWEsbUJBQW1CLEdBQWhDO0lBQ0UsWUFDVSxRQUE0QixFQUM1QixJQUF1QjtRQUR2QixhQUFRLEdBQVIsUUFBUSxDQUFvQjtRQUM1QixTQUFJLEdBQUosSUFBSSxDQUFtQjtRQUVqQyxvQkFBZSxHQUFHO1lBQ2hCLE1BQU0sRUFBRSxZQUFZLEVBQUUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDO1lBQ2xELEVBQUUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDMUIsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUMsSUFBSSxDQUFDLFlBQVk7b0JBQ2hELE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQzt3QkFDMUIsSUFBSSxFQUFFLGlDQUFxQjt3QkFDM0IsT0FBTyxFQUFFOzRCQUNMLFlBQVk7eUJBQ2Y7cUJBQ0osQ0FBQyxDQUFDO2dCQUNQLENBQUMsQ0FBQyxDQUFDO1lBQ1AsQ0FBQztRQUNILENBQUMsQ0FBQztRQUVGLDZCQUF3QixHQUFHLENBQUMsb0JBQW9CO1lBQzVDLE1BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQztnQkFDNUIsSUFBSSxFQUFFLHNDQUEwQjtnQkFDaEMsT0FBTyxFQUFFO29CQUNQLG9CQUFvQjtpQkFDckI7YUFDRixDQUFDLENBQUM7UUFDUCxDQUFDLENBQUM7SUF2QmtDLENBQUM7Q0F5QnRDLENBQUE7QUE1QlksbUJBQW1CO0lBRC9CLGlCQUFVLEVBQUU7cUNBR1MsbUJBQU87UUFDWCx1Q0FBaUI7R0FIdEIsbUJBQW1CLENBNEIvQjtBQTVCWSxrREFBbUIifQ==
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const constants_1 = require("../constants");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
let StudentDataFieldsActions = class StudentDataFieldsActions {
constructor(_ngRedux) {
this._ngRedux = _ngRedux;
this.saveStudentDataFields = (studentDataFields) => {
return this._ngRedux.dispatch({
type: constants_1.STUDENTDATAFIELDS_SAVE,
payload: {
studentDataFields
}
});
};
}
};
StudentDataFieldsActions = __decorate([
core_1.Injectable(),
__metadata("design:paramtypes", [ng2_redux_1.NgRedux])
], StudentDataFieldsActions);
exports.StudentDataFieldsActions = StudentDataFieldsActions;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R1ZGVudGRhdGFmaWVsZHMuYWN0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0dWRlbnRkYXRhZmllbGRzLmFjdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFrRjtBQUNsRix3Q0FBMkM7QUFDM0MseUNBQW9DO0FBT3BDLElBQWEsd0JBQXdCLEdBQXJDO0lBQ0UsWUFDVSxRQUE0QjtRQUE1QixhQUFRLEdBQVIsUUFBUSxDQUFvQjtRQUV0QywwQkFBcUIsR0FBRyxDQUFDLGlCQUFpQjtZQUV0QyxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUM7Z0JBQzVCLElBQUksRUFBRSxrQ0FBc0I7Z0JBQzVCLE9BQU8sRUFBRTtvQkFDUCxpQkFBaUI7aUJBQ2xCO2FBRUYsQ0FBQyxDQUFDO1FBRVAsQ0FBQyxDQUFDO0lBWnVDLENBQUM7Q0FjM0MsQ0FBQTtBQWhCWSx3QkFBd0I7SUFEcEMsaUJBQVUsRUFBRTtxQ0FHUyxtQkFBTztHQUZoQix3QkFBd0IsQ0FnQnBDO0FBaEJZLDREQUF3QiJ9
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
require("reflect-metadata");
require("babel-polyfill");
require("core-js/es6");
require("core-js/es7/reflect");
const core_1 = require("@angular/core");
const ng2_redux_1 = require("ng2-redux");
const platform_browser_1 = require("@angular/platform-browser");
const forms_1 = require("@angular/forms");
const router_1 = require("@angular/router");
const http_1 = require("@angular/http");
const common_1 = require("@angular/common");
const platform_browser_dynamic_1 = require("@angular/platform-browser-dynamic");
const main_1 = require("./containers/main");
const app_routes_1 = require("./app.routes");
/* Here we import services */
const helper_data_service_1 = require("./services/helper-data-service");
const user_data_service_1 = require("./services/user-data-service");
const actions_1 = require("./actions");
const ng2_smart_table_1 = require("ng2-smart-table");
class MyLocalization extends common_1.NgLocalization {
getPluralCategory(value) {
if (value < 5) {
return 'few';
}
}
}
let AppModule = class AppModule {
};
AppModule = __decorate([
core_1.NgModule({
imports: [
platform_browser_1.BrowserModule,
forms_1.FormsModule,
router_1.RouterModule,
forms_1.ReactiveFormsModule,
app_routes_1.APP_ROUTER_PROVIDERS,
http_1.HttpModule,
ng2_smart_table_1.Ng2SmartTableModule,
ng2_redux_1.NgReduxModule,
],
declarations: [
main_1.default,
app_routes_1.APP_DECLARATIONS,
],
bootstrap: [main_1.default],
providers: [
{ provide: common_1.APP_BASE_HREF, useValue: '/' },
{ provide: common_1.LocationStrategy, useClass: common_1.HashLocationStrategy },
{ provide: common_1.NgLocalization, useClass: MyLocalization },
ng2_redux_1.DevToolsExtension,
actions_1.ACTION_PROVIDERS,
// Service1, again services here
helper_data_service_1.HelperDataService,
user_data_service_1.UserDataService,
]
})
], AppModule);
platform_browser_dynamic_1.platformBrowserDynamic().bootstrapModule(AppModule);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSw0QkFBMEI7QUFDMUIsMEJBQXdCO0FBQ3hCLHVCQUFxQjtBQUNyQiwrQkFBNkI7QUFDN0Isd0NBQXlDO0FBQ3pDLHlDQUFzRTtBQUN0RSxnRUFBd0Q7QUFDeEQsMENBR3dCO0FBRXhCLDRDQUE2QztBQUM3Qyx3Q0FBMkM7QUFDM0MsNENBS3lCO0FBRXpCLGdGQUEyRTtBQUUzRSw0Q0FBcUM7QUFDckMsNkNBQXNFO0FBRXRFLDZCQUE2QjtBQUM3Qix3RUFBaUU7QUFDakUsb0VBQTZEO0FBRTdELHVDQUE2QztBQUU3QyxxREFBc0Q7QUFHdEQsb0JBQXFCLFNBQVEsdUJBQWM7SUFDeEMsaUJBQWlCLENBQUMsS0FBVTtRQUN6QixFQUFFLENBQUMsQ0FBQyxLQUFLLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNiLE1BQU0sQ0FBQyxLQUFLLENBQUM7UUFDaEIsQ0FBQztJQUNKLENBQUM7Q0FDSDtBQThCRCxJQUFNLFNBQVMsR0FBZjtDQUFrQixDQUFBO0FBQVosU0FBUztJQTVCZCxlQUFRLENBQUM7UUFDUixPQUFPLEVBQU87WUFDWixnQ0FBYTtZQUNiLG1CQUFXO1lBQ1gscUJBQVk7WUFDWiwyQkFBbUI7WUFDbkIsaUNBQW9CO1lBQ3BCLGlCQUFVO1lBQ1YscUNBQW1CO1lBQ25CLHlCQUFhO1NBRWQ7UUFDRCxZQUFZLEVBQUU7WUFDWixjQUFJO1lBQ0osNkJBQWdCO1NBQ2pCO1FBQ0QsU0FBUyxFQUFFLENBQUUsY0FBSSxDQUFFO1FBQ25CLFNBQVMsRUFBRTtZQUNULEVBQUUsT0FBTyxFQUFFLHNCQUFhLEVBQUUsUUFBUSxFQUFFLEdBQUcsRUFBRTtZQUN6QyxFQUFFLE9BQU8sRUFBRSx5QkFBZ0IsRUFBRSxRQUFRLEVBQUUsNkJBQW9CLEVBQUU7WUFDN0QsRUFBRSxPQUFPLEVBQUUsdUJBQWMsRUFBRSxRQUFRLEVBQUUsY0FBYyxFQUFFO1lBQ3JELDZCQUFpQjtZQUNqQiwwQkFBZ0I7WUFDcEIsbUNBQW1DO1lBQy9CLHVDQUFpQjtZQUNqQixtQ0FBZTtTQUNoQjtLQUNGLENBQUM7R0FDSSxTQUFTLENBQUc7QUFFbEIsaURBQXNCLEVBQUUsQ0FBQyxlQUFlLENBQUMsU0FBUyxDQUFDLENBQUMifQ==
\ No newline at end of file
"use strict";
const router_1 = require("@angular/router");
const main_routes_1 = require("./containers/main.routes");
exports.routes = [
...main_routes_1.MainRoutes
];
exports.APP_DECLARATIONS = [
...main_routes_1.MainDeclarations
];
exports.APP_ROUTER_PROVIDERS = router_1.RouterModule.forRoot(exports.routes);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLnJvdXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFwcC5yb3V0ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUFnRDtBQUVoRCwwREFDaUM7QUFFcEIsUUFBQSxNQUFNLEdBQUc7SUFDcEIsR0FBRyx3QkFBVTtDQUNkLENBQUM7QUFFVyxRQUFBLGdCQUFnQixHQUFHO0lBQzlCLEdBQUcsOEJBQWdCO0NBQ3BCLENBQUM7QUFFVyxRQUFBLG9CQUFvQixHQUFHLHFCQUFZLENBQUMsT0FBTyxDQUFDLGNBQU0sQ0FBQyxDQUFDIn0=
\ No newline at end of file
"use strict";
class AppSettings {
static get API_ENDPOINT() {
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';
}
}
exports.AppSettings = AppSettings;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLnNldHRpbmdzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYXBwLnNldHRpbmdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtJQUNVLE1BQU0sS0FBSyxZQUFZO1FBQzNCLE1BQU0sQ0FBQyw2Q0FBNkMsQ0FBQztRQUMzRCxnREFBZ0Q7UUFDaEQsMENBQTBDO1FBQzFDLHVEQUF1RDtJQUNwRCxDQUFDO0NBQ0g7QUFQRCxrQ0FPQyJ9
\ No newline at end of file
......@@ -12,7 +12,6 @@ import {
import {RouterModule} from '@angular/router';
import { HttpModule } from '@angular/http';
import {
APP_BASE_HREF,
HashLocationStrategy,
......@@ -32,6 +31,8 @@ import {UserDataService} from './services/user-data-service';
import { ACTION_PROVIDERS } from './actions';
import Home from './components/home';
import { Ng2SmartTableModule } from 'ng2-smart-table';
class MyLocalization extends NgLocalization {
getPluralCategory(value: any) {
if (value < 5) {
......@@ -49,7 +50,8 @@ class MyLocalization extends NgLocalization {
APP_ROUTER_PROVIDERS,
HttpModule,
Ng2SmartTableModule,
NgReduxModule
NgReduxModule,
],
declarations: [
Main,
......
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const core_1 = require("@angular/core");
const http_1 = require("@angular/http");
const student_1 = require("../students/student");
const app_settings_1 = require("../../app.settings");
let Form3 = class Form3 {
constructor(http) {
this.http = http;
this.student = new student_1.Student(0, '', '', '', '', 1);
}
onSubmit(studentform) {
let headers = new http_1.Headers({
//"Authorization": "Basic cmVzdHVzZXI6czNjckV0MFAwdWwwJA==", // encoded user:pass
"Authorization": "Basic bmthdHNhb3Vub3M6emVtcmFpbWU=",
"Accept": "*/*",
"Access-Control-Allow-Credentials": "true",
"Content-Type": "application/json",
// "Content-Type": "text/plain", // try to skip preflight
//"X-CSRF-Token": "hVtACDJjFRSyE4bgGJENHbXY0B9yNhF71Fw-cYHSDNY"
//"X-CSRF-Token": "fj1QtF_Z_p6kE19EdCnN08zoSjVfcT4Up-ciW6I0IG8"
"X-CSRF-Token": "LU92FaWYfImfZxfldkF5eVnssdHoV7Aa9fg8K1bWYUc"
});
let options = new http_1.RequestOptions({ headers: headers, withCredentials: true });
console.log(this.student);
this.http.post(`${app_settings_1.AppSettings.API_ENDPOINT}/entity/epal_student`, this.student, options)
.map((res) => res.json())
.subscribe(success => { alert("Η εγγραφή έγινε με επιτυχία"); console.log("success post"); }, // put the data returned from the server in our variable
error => console.log("Error HTTP POST Service"), // in case of failure show this message
() => console.log("write this message anyway")); //run this code in all cases);
}
};
Form3 = __decorate([
core_1.Component({
selector: 'form3',
template: `
<div>
<form #studentform="ngForm" (submit)="onSubmit(studentform)" class="col-sm-8">
<div class="form-group">
<label>Όνομα</label>
<input type="text" [(ngModel)]="student.name" name="name"
required class="form-control" />
</div>
<div class="form-group">
<label>Επώνυμο</label>
<input type="text" [(ngModel)]="student.surname" name="surname"
required class="form-control" />
</div>
<div class="form-group">
<label>Διεύθυνση</label>
<input type="text" [(ngModel)]="student.address" name="address"
required class="form-control" />
</div>
<div class="form-group">
<label>Ημερομηνία Γέννησης</label>
<input type="date" [(ngModel)]="student.birthdate"
class="form-control" name="birthdate" />
</div>
<input type="submit" [disabled]="!studentform.valid" value="Υποβολή" class="btn btn-success" />
</form>
</div>
`
}),
__metadata("design:paramtypes", [http_1.Http])
], Form3);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Form3;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybTMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmb3JtMy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsd0NBQXdDO0FBQ3hDLHdDQUF3RTtBQUV4RSxpREFBOEM7QUFNOUMscURBQStDO0FBZ0MvQyxJQUFxQixLQUFLLEdBQTFCO0lBSUksWUFBb0IsSUFBVTtRQUFWLFNBQUksR0FBSixJQUFJLENBQU07UUFDMUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxJQUFJLGlCQUFPLENBQUMsQ0FBQyxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUNyRCxDQUFDO0lBRUQsUUFBUSxDQUFDLFdBQWdCO1FBQ3JCLElBQUksT0FBTyxHQUFHLElBQUksY0FBTyxDQUFDO1lBQ3RCLGlGQUFpRjtZQUNoRixlQUFlLEVBQUUsb0NBQW9DO1lBQ3RELFFBQVEsRUFBRSxLQUFLO1lBQ2Ysa0NBQWtDLEVBQUUsTUFBTTtZQUMxQyxjQUFjLEVBQUUsa0JBQWtCO1lBQ2xDLDBEQUEwRDtZQUMxRCwrREFBK0Q7WUFDL0QsK0RBQStEO1lBQy9ELGNBQWMsRUFBRSw2Q0FBNkM7U0FDaEUsQ0FBQyxDQUFDO1FBQ0gsSUFBSSxPQUFPLEdBQUcsSUFBSSxxQkFBYyxDQUFDLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxlQUFlLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQztRQUM5RSxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUUxQixJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLDBCQUFXLENBQUMsWUFBWSxzQkFBc0IsRUFBRSxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQzthQUduRixHQUFHLENBQUMsQ0FBQyxHQUFhLEtBQUssR0FBRyxDQUFDLElBQUksRUFBRSxDQUFDO2FBQ2xDLFNBQVMsQ0FBQyxPQUFPLE1BQUssS0FBSyxDQUFDLDZCQUE2QixDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLGNBQWMsQ0FBQyxDQUFBLENBQUEsQ0FBQyxFQUFFLHdEQUF3RDtRQUNuSixLQUFLLElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyx5QkFBeUIsQ0FBQyxFQUFFLHVDQUF1QztRQUN4RixNQUFNLE9BQU8sQ0FBQyxHQUFHLENBQUMsMkJBQTJCLENBQUMsQ0FBQyxDQUFDLENBQUEsOEJBQThCO0lBQ3RGLENBQUM7Q0FDSixDQUFBO0FBL0JvQixLQUFLO0lBOUJ6QixnQkFBUyxDQUFDO1FBQ1AsUUFBUSxFQUFFLE9BQU87UUFDakIsUUFBUSxFQUFFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQTBCWDtLQUNGLENBQUM7cUNBSzRCLFdBQUk7R0FKYixLQUFLLENBK0J6Qjs7a0JBL0JvQixLQUFLIn0=
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
const core_1 = require("@angular/core");
let Home = class Home {
};
Home = __decorate([
core_1.Component({
selector: 'home',
template: `
<div>
<h4>e-EPAL και e-IEK application skeleton</h4>
</div>
`
})
], Home);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Home;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImhvbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLHdDQUF3QztBQVV4QyxJQUFxQixJQUFJLEdBQXpCO0NBQTZCLENBQUE7QUFBUixJQUFJO0lBUnhCLGdCQUFTLENBQUM7UUFDVCxRQUFRLEVBQUUsTUFBTTtRQUNoQixRQUFRLEVBQUU7Ozs7R0FJVDtLQUNGLENBQUM7R0FDbUIsSUFBSSxDQUFJOztrQkFBUixJQUFJIn0=
\ No newline at end of file
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
const core_1 = require("@angular/core");
const core_2 = require("@angular/core");
const studentdatafields_actions_1 = require("../../actions/studentdatafields.actions");
const router_1 = require("@angular/router");
const ng2_redux_1 = require("ng2-redux");
const constants_1 = require("../../constants");
const forms_1 = require("@angular/forms");
let StudentApplicationMain = class StudentApplicationMain {
constructor(fb, _sdfa, _ngRedux, router) {
this.fb = fb;
this._sdfa = _sdfa;
this._ngRedux = _ngRedux;
this.router = router;
this.studentDataGroup = this.fb.group({
studentAmka: ['12346', forms_1.Validators.required],
studentFirstname: ['ΝΙΚΟΣ', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
studentSurname: ['ΚΑΤΣΑΟΥΝΟΣ', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
guardianFirstname: ['ΑΝΑΣΤΑΣΙΟΣ', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
guardianSurname: ['ΚΑΤΣΑΟΥΝΟΣ', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
regionAddress: ['ΓΙΑΝΝΙΤΣΩΝ 5', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
regionTK: ['26334', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
regionArea: ['ΠΑΤΡΑ', [forms_1.Validators.pattern(constants_1.VALID_NAMES_PATTERN), forms_1.Validators.required]],
certificateType: ['Απολυτήριο Λυκείου', forms_1.Validators.required],
relationToStudent: ['Μαθητής', forms_1.Validators.required],
});
}
;
ngOnInit() {
this.studentDataFields$ = this._ngRedux.select(state => {
if (state.studentDataFields.size > 0) {
state.studentDataFields.reduce(({}, studentDataField) => {
this.studentDataGroup.setValue(studentDataField);
return studentDataField;
}, {});
}
return state.studentDataFields;
});
this.courseFields$ = this._ngRedux.select(state => {
state.courseFields.reduce(({}, courseField) => {
return courseField;
}, {});