forked from firka/student-legacy
added grade delay to details and other small shit
This commit is contained in:
parent
92fe3b7dcd
commit
7919d0e284
@ -65,6 +65,7 @@ Future loginAPI({
|
||||
parents: ['Teszt András', 'Teszt Linda'],
|
||||
json: {"a": "b"},
|
||||
address: '1117 Budapest, Gábor Dénes utca 4.',
|
||||
gradeDelay: 0,
|
||||
),
|
||||
role: Role.parent,
|
||||
refreshToken: '',
|
||||
|
@ -71,6 +71,8 @@ Future<void> syncAll(BuildContext context) {
|
||||
if (studentJson == null) return;
|
||||
Student student = Student.fromJson(studentJson);
|
||||
|
||||
// print(studentJson);
|
||||
|
||||
user.user?.name = student.name;
|
||||
|
||||
// Store user
|
||||
@ -89,13 +91,11 @@ Future<void> syncAll(BuildContext context) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Future.wait(tasks).then((value) {
|
||||
// Unlock
|
||||
lock = false;
|
||||
|
||||
if(Platform.isIOS && LiveCardProvider.hasActivityStarted == true){
|
||||
if (Platform.isIOS && LiveCardProvider.hasActivityStarted == true) {
|
||||
PlatformChannel.endLiveActivity();
|
||||
LiveCardProvider.hasActivityStarted = false;
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ class User {
|
||||
birth: DateTime.now(),
|
||||
yearId: '1',
|
||||
parents: [],
|
||||
gradeDelay: 0,
|
||||
),
|
||||
role: Role.values[map["role"] ?? 0],
|
||||
nickname: map["nickname"] ?? "",
|
||||
|
@ -11,6 +11,8 @@ class Student {
|
||||
String? address;
|
||||
String? groupId;
|
||||
List<String> parents;
|
||||
int gradeDelay;
|
||||
String? bankAccount;
|
||||
// List<String> parentsPhone;
|
||||
String? className;
|
||||
|
||||
@ -22,6 +24,8 @@ class Student {
|
||||
required this.yearId,
|
||||
this.address,
|
||||
required this.parents,
|
||||
required this.gradeDelay,
|
||||
this.bankAccount,
|
||||
// required this.parentsPhone,
|
||||
this.json,
|
||||
});
|
||||
@ -57,6 +61,10 @@ class Student {
|
||||
: null
|
||||
: null,
|
||||
parents: parents,
|
||||
gradeDelay: json["Intezmeny"]["TestreszabasBeallitasok"]
|
||||
["ErtekelesekMegjelenitesenekKesleltetesenekMerteke"] ??
|
||||
0,
|
||||
bankAccount: json["Bankszamla"]["BankszamlaSzam"],
|
||||
json: json,
|
||||
);
|
||||
}
|
||||
|
@ -4,19 +4,14 @@ import 'package:refilc/api/client.dart';
|
||||
import 'dart:io' show Platform;
|
||||
import 'package:refilc/api/login.dart';
|
||||
import 'package:refilc/theme/colors/colors.dart';
|
||||
import 'package:refilc_mobile_ui/common/bottom_sheet_menu/rounded_bottom_sheet.dart';
|
||||
import 'package:refilc_mobile_ui/common/custom_snack_bar.dart';
|
||||
import 'package:refilc_mobile_ui/common/system_chrome.dart';
|
||||
import 'package:refilc_mobile_ui/common/widgets/absence/absence_display.dart';
|
||||
import 'package:refilc_mobile_ui/screens/login/login_button.dart';
|
||||
import 'package:refilc_mobile_ui/screens/login/login_input.dart';
|
||||
import 'package:refilc_mobile_ui/screens/login/school_input/school_input.dart';
|
||||
import 'package:refilc_mobile_ui/screens/settings/privacy_view.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'login_screen.i18n.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:refilc_mobile_ui/screens/login/kreten_login.dart'; //new library for new web login
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
@ -454,6 +449,7 @@ class LoginScreenState extends State<LoginScreen> {
|
||||
// }),
|
||||
// );
|
||||
// }
|
||||
// ignore: non_constant_identifier_names
|
||||
void _NewLoginAPI({required BuildContext context}) {
|
||||
String code = codeController.text;
|
||||
|
||||
|
@ -56,6 +56,16 @@ class AccountView extends StatelessWidget {
|
||||
Detail(
|
||||
title: "parents".plural(user.student.parents.length),
|
||||
description: user.student.parents.join(", ")),
|
||||
if (user.student.gradeDelay > 0)
|
||||
Detail(
|
||||
title: "grade_delay".i18n,
|
||||
description: "hrs".i18n.fill([user.student.gradeDelay]),
|
||||
),
|
||||
// if ((user.student.bankAccount ?? "").isNotEmpty)
|
||||
// Detail(
|
||||
// title: "bank_account".i18n,
|
||||
// description: (user.student.bankAccount ?? "not_provided".i18n),
|
||||
// ),
|
||||
const SizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
|
@ -10,6 +10,8 @@ extension Localization on String {
|
||||
"address": "Home address",
|
||||
"parents": "Parent(s)",
|
||||
"parents_phone": "Parents' phone number: ",
|
||||
"grade_delay": "Grade visibility delay",
|
||||
"hrs": "%s hour(s)",
|
||||
},
|
||||
"hu_hu": {
|
||||
"birthdate": "Születési dátum",
|
||||
@ -17,6 +19,8 @@ extension Localization on String {
|
||||
"class": "Osztály",
|
||||
"address": "Lakcím",
|
||||
"parents": "Szülő(k)",
|
||||
"grade_delay": "Jegy megjelenítési késleltetés",
|
||||
"hrs": "%s óra",
|
||||
},
|
||||
"de_de": {
|
||||
"birthdate": "Geburtsdatum",
|
||||
@ -24,6 +28,8 @@ extension Localization on String {
|
||||
"class": "Klasse",
|
||||
"address": "Wohnanschrift",
|
||||
"parents": "Elter(n)",
|
||||
"grade_delay": "Notenverzögerung",
|
||||
"hrs": "%s Stunde(n)",
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user