fixed exam subject rename thing
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:filcnaplo_kreta_api/models/subject.dart';
|
||||
|
||||
import 'category.dart';
|
||||
import 'teacher.dart';
|
||||
|
||||
@@ -6,8 +8,9 @@ class Exam {
|
||||
DateTime date;
|
||||
DateTime writeDate;
|
||||
Category? mode;
|
||||
int? subjectIndex;
|
||||
String subjectName;
|
||||
// int? subjectIndex;
|
||||
// String subjectName;
|
||||
Subject subject;
|
||||
Teacher teacher;
|
||||
String description;
|
||||
String group;
|
||||
@@ -18,8 +21,9 @@ class Exam {
|
||||
required this.date,
|
||||
required this.writeDate,
|
||||
this.mode,
|
||||
this.subjectIndex,
|
||||
required this.subjectName,
|
||||
// this.subjectIndex,
|
||||
// required this.subjectName,
|
||||
required this.subject,
|
||||
required this.teacher,
|
||||
required this.description,
|
||||
required this.group,
|
||||
@@ -36,8 +40,9 @@ class Exam {
|
||||
? DateTime.parse(json["Datum"]).toLocal()
|
||||
: DateTime(0),
|
||||
mode: json["Modja"] != null ? Category.fromJson(json["Modja"]) : null,
|
||||
subjectIndex: json["OrarendiOraOraszama"],
|
||||
subjectName: json["TantargyNeve"] ?? "",
|
||||
// subjectIndex: json["OrarendiOraOraszama"],
|
||||
// subjectName: json["TantargyNeve"] ?? "",
|
||||
subject: Subject.fromJson(json["Tantargy"] ?? {}),
|
||||
teacher: Teacher.fromString((json["RogzitoTanarNeve"] ?? "").trim()),
|
||||
description: (json["Temaja"] ?? "").trim(),
|
||||
group: json["OsztalyCsoport"] != null
|
||||
|
||||
Reference in New Issue
Block a user