-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from mirea-ninja/release/v1.3.1
* feature: Create Sentry integration * docs: Add Env Variables to readme * feature: Create custom BlocObserver for Sentry (#289) Добавил логирование ошибок Bloc в Sentry * fix: Select only active LKS profile (#288) Теперь при наличии двух профилей (например, бакалавриат и магистратура), выбран будет только активный. * ui: Update `ScoresChartModal` view (#290) * ui: Add map magnifier (#291) * feature: Add feedback modals (#292) * ui: Update about app page (#293) * Удалены патроны и ссылки на Patreon * Актуализированы ссылки на соц. сети * Изменён текст. Добавлена благодарность Анне за помощь с картами * fix: Nullable edu program type with many profiles (#294) * ui: Update scores chart modal (#295) * Добавил закругление углов для модального окна * Исправлены отступы слева у первого столбца * Добавлены линии тренда и переключения между ними * Изменён внешний вид элементов легенды графика
- Loading branch information
Showing
25 changed files
with
1,117 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:rtu_mirea_app/domain/entities/edu_program.dart'; | ||
|
||
class EduProgramModel extends EduProgram { | ||
const EduProgramModel({ | ||
required eduProgram, | ||
required eduProgramCode, | ||
required department, | ||
required prodDepartment, | ||
required type, | ||
}) : super( | ||
eduProgram: eduProgram, | ||
eduProgramCode: eduProgramCode, | ||
department: department, | ||
prodDepartment: prodDepartment, | ||
type: type, | ||
); | ||
|
||
factory EduProgramModel.fromRawJson(String str) => | ||
EduProgramModel.fromJson(json.decode(str)); | ||
|
||
factory EduProgramModel.fromJson(Map<String, dynamic> json) { | ||
return EduProgramModel( | ||
eduProgramCode: json["PROPERTIES"]["OKSO_CODE"]["VALUE"], | ||
eduProgram: json["NAME"], | ||
department: json["PROPERTIES"]["DEPARTMENT"]["VALUE_TEXT"], | ||
prodDepartment: json["PROPERTIES"]["PROD_DEPARTMENT"]["VALUE_TEXT"], | ||
type: json["TYPE"], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:rtu_mirea_app/domain/entities/student.dart'; | ||
|
||
import 'edu_program_model.dart'; | ||
|
||
class StudentModel extends Student { | ||
const StudentModel({ | ||
required id, | ||
required isActive, | ||
required course, | ||
required personalNumber, | ||
required educationStartDate, | ||
required educationEndDate, | ||
required academicGroup, | ||
required code, | ||
required eduProgram, | ||
required status, | ||
}) : super( | ||
id: id, | ||
isActive: isActive, | ||
eduProgram: eduProgram, | ||
course: course, | ||
personalNumber: personalNumber, | ||
educationStartDate: educationStartDate, | ||
educationEndDate: educationEndDate, | ||
academicGroup: academicGroup, | ||
code: code, | ||
status: status, | ||
); | ||
|
||
static List<StudentModel> fromRawJson(String str) => | ||
StudentModel.fromJson(json.decode(str)); | ||
|
||
static List<StudentModel> fromJson(Map<String, dynamic> json) { | ||
final studentsRaw = json["STUDENTS"].values.where((element) => | ||
!element["PROPERTIES"]["PERSONAL_NUMBER"]["VALUE"].contains("Д") && | ||
!element["PROPERTIES"]["PERSONAL_NUMBER"]["VALUE"].contains("Ж")); | ||
|
||
return List<StudentModel>.from(studentsRaw.map( | ||
(e) => StudentModel( | ||
id: e["ID"], | ||
isActive: e["ACTIVE"] == "Y", | ||
course: int.parse(e["PROPERTIES"]["COURSE"]["VALUE"]), | ||
personalNumber: e["PROPERTIES"]["PERSONAL_NUMBER"]["VALUE"], | ||
educationEndDate: e["PROPERTIES"]["END_DATE"]["VALUE"], | ||
academicGroup: e["PROPERTIES"]["ACADEMIC_GROUP"]["VALUE_TEXT"], | ||
educationStartDate: e["PROPERTIES"]["START_DATE"]["VALUE"], | ||
code: e["CODE"], | ||
eduProgram: EduProgramModel.fromJson( | ||
json["EDU_PROGRAM"][e["PROPERTIES"]["EDU_PROGRAM"]["VALUE"]]), | ||
status: e["PROPERTIES"]["STATUS"]["VALUE_TEXT"], | ||
), | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import 'package:equatable/equatable.dart'; | ||
|
||
class EduProgram extends Equatable { | ||
final String eduProgram; | ||
final String eduProgramCode; | ||
final String department; | ||
final String prodDepartment; | ||
final String? type; | ||
|
||
const EduProgram({ | ||
required this.eduProgram, | ||
required this.eduProgramCode, | ||
required this.department, | ||
required this.prodDepartment, | ||
required this.type, | ||
}); | ||
|
||
@override | ||
List<Object?> get props => [ | ||
eduProgram, | ||
eduProgramCode, | ||
department, | ||
prodDepartment, | ||
type, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import 'package:equatable/equatable.dart'; | ||
|
||
import 'edu_program.dart'; | ||
|
||
class Student extends Equatable { | ||
final String id; | ||
final bool isActive; | ||
final int course; | ||
final String personalNumber; | ||
final String educationStartDate; | ||
final String educationEndDate; | ||
final String academicGroup; | ||
final String code; | ||
final EduProgram eduProgram; | ||
final String status; // must be 'активный' | ||
|
||
const Student({ | ||
required this.id, | ||
required this.isActive, | ||
required this.course, | ||
required this.personalNumber, | ||
required this.educationStartDate, | ||
required this.educationEndDate, | ||
required this.academicGroup, | ||
required this.code, | ||
required this.eduProgram, | ||
required this.status, | ||
}); | ||
|
||
@override | ||
List<Object?> get props => [ | ||
id, | ||
isActive, | ||
course, | ||
personalNumber, | ||
educationStartDate, | ||
educationEndDate, | ||
academicGroup, | ||
code, | ||
eduProgram, | ||
status, | ||
]; | ||
} |
Oops, something went wrong.