rounding shits

This commit is contained in:
Kima
2024-02-02 20:46:57 +01:00
parent a435f56f2e
commit 773a8f61e9
10 changed files with 161 additions and 49 deletions

View File

@@ -87,6 +87,10 @@ class GradeProvider with ChangeNotifier {
? await _database.userQuery.renamedTeachers(userId: _user.user!.id)
: {};
// v5
Map<String, String> customRoundings =
await _database.userQuery.getRoundings(userId: _user.user!.id);
for (Grade grade in _grades) {
grade.subject.renamedTo =
renamedSubjects.isNotEmpty ? renamedSubjects[grade.subject.id] : null;
@@ -109,6 +113,11 @@ class GradeProvider with ChangeNotifier {
""
? '${grade.json!["SzovegesErtekelesRovidNev"]}'.i18n
: grade.value.valueName;
// v5
grade.subject.customRounding = customRoundings.isNotEmpty
? double.parse(customRoundings[grade.subject.id] ?? '5.0')
: null;
}
notifyListeners();