studentdatafields.transformers.ts 1.33 KB
Newer Older
1
import { IStudentDataFields, IStudentDataField } from "./studentdatafields.types";
2
3
4

export function deimmutifyStudentDataFields(state: IStudentDataFields): IStudentDataField[] {
    let fetchedStudentDataFields = new Array();
5
    state.forEach(studentdataField => {
6
7
8
9
10
11
12
13
14
15
16
17
        fetchedStudentDataFields.push(<IStudentDataField>{
            epaluser_id: studentdataField.epaluser_id,
            name: studentdataField.name, studentsurname: studentdataField.studentsurname, studentbirthdate: studentdataField.studentbirthdate,
            fatherfirstname: studentdataField.fatherfirstname, fathersurname: studentdataField.fathersurname,
            motherfirstname: studentdataField.motherfirstname, mothersurname: studentdataField.mothersurname,
            studentamka: studentdataField.studentamka, regionaddress: studentdataField.regionaddress,
            regiontk: studentdataField.regiontk, regionarea: studentdataField.regionarea,
            lastschool_schoolname: studentdataField.lastschool_schoolname,
            lastschool_schoolyear: studentdataField.lastschool_schoolyear,
            lastschool_class: studentdataField.lastschool_class,
            relationtostudent: studentdataField.relationtostudent,
            currentclass: studentdataField.currentclass, points: studentdataField.points
18
        });
19
20
21
    });
    return fetchedStudentDataFields;
};