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