diff --git a/lib/new_ui/screens/railway_screen/railway_screen.dart b/lib/new_ui/screens/railway_screen/railway_screen.dart index 020d9d3a..20d24f11 100644 --- a/lib/new_ui/screens/railway_screen/railway_screen.dart +++ b/lib/new_ui/screens/railway_screen/railway_screen.dart @@ -277,9 +277,10 @@ class _RailwayConcessionScreenState } void clearValues() { - if (!_formKey.currentState!.validate()) { + /*if (!_formKey.currentState!.validate()) { + print("HELLO"); return; - } + }*/ ConcessionDetailsModel? concessionDetails = ref.watch(concessionDetailsProvider); firstNameController.text = concessionDetails?.firstName ?? ""; @@ -290,11 +291,11 @@ class _RailwayConcessionScreenState dateOfBirthController.text = concessionDetails?.dob != null ? DateFormat('dd MMM yyyy').format(concessionDetails!.dob!) : ""; - travelLane = concessionDetails?.travelLane ?? ""; - gender = concessionDetails?.gender ?? ""; - travelClass = concessionDetails?.type ?? ""; - duration = concessionDetails?.duration ?? ""; - travelLane = concessionDetails?.travelLane ?? ""; + travelLane = concessionDetails?.travelLane ?? "Western"; + gender = concessionDetails?.gender ?? "Male"; + travelClass = concessionDetails?.type ?? "II"; + duration = concessionDetails?.duration ?? "Monthly"; + travelLane = concessionDetails?.travelLane ?? "Western"; // toStation = concessionDetails?.to ?? ""; homeStation = concessionDetails?.from ?? ""; idCardPhotoTemp = idCardPhoto; @@ -326,7 +327,7 @@ class _RailwayConcessionScreenState address: addressController.text, dob: _selectedDate ?? DateTime.now(), phoneNum: int.parse(phoneNumController.text), - travelLane: travelLane ?? "Western", + travelLane: travelLane ?? "Central", type: travelClass ?? "I", ); @@ -768,6 +769,7 @@ class _RailwayConcessionScreenState children: [ FilledButton( onPressed: () { + print("Cleared Section"); clearValues(); }, style: FilledButton.styleFrom( @@ -825,6 +827,8 @@ class _RailwayConcessionScreenState ), ), ), + + SizedBox(height: !editMode ? 20 : 0), !editMode && canIssuePass(concessionDetails, lastPassIssued, duration) diff --git a/lib/new_ui/screens/timetable_screen/timetable_screen.dart b/lib/new_ui/screens/timetable_screen/timetable_screen.dart index 05318501..c6f81c44 100644 --- a/lib/new_ui/screens/timetable_screen/timetable_screen.dart +++ b/lib/new_ui/screens/timetable_screen/timetable_screen.dart @@ -36,6 +36,7 @@ class TimeTable extends ConsumerWidget { offset: const Offset(0, 1), ); UserModel? data = ref.watch(userModelProvider); + print(data); if (data != null) { NotificationType.makeTopic(ref, data.studentModel); diff --git a/lib/new_ui/screens/timetable_screen/widgets/card_display.dart b/lib/new_ui/screens/timetable_screen/widgets/card_display.dart index 6ba94eca..1fc18401 100644 --- a/lib/new_ui/screens/timetable_screen/widgets/card_display.dart +++ b/lib/new_ui/screens/timetable_screen/widgets/card_display.dart @@ -107,8 +107,8 @@ class _CardDisplayState extends ConsumerState { lectureEndTime: timeTableDay[index].lectureEndTime, lectureName: timeTableDay[index].lectureName, lectureStartTime: timeTableDay[index].lectureStartTime, - facultyImageurl: getFacultyImagebyName(lectureFacultyname), facultyName: !checkTimetable(lectureFacultyname) ? "---------" : lectureFacultyname, + facultyImageurl: !checkTimetable(lectureFacultyname) ? getFacultyImagebyName(lectureFacultyname) : "", lectureBatch: timeTableDay[index].lectureBatch, ); }, @@ -124,12 +124,19 @@ class _CardDisplayState extends ConsumerState { } List getTimetablebyDay(Map data, String day) { + List timeTableDay = []; final daylist = data[day]; for (final item in daylist) { StudentModel? studentModel = ref.watch(userModelProvider)?.studentModel; + if (item['lectureBatch'] == studentModel!.batch.toString() || item['lectureBatch'] == 'All') { - timeTableDay.add(TimetableModel.fromJson(item)); + if(item['lectureFacultyName'] != null) { + timeTableDay.add(TimetableModel.fromJson(item)); + }else{ + item['lectureFacultyName'] = " "; + timeTableDay.add(TimetableModel.fromJson(item)); + } } } return timeTableDay; diff --git a/lib/new_ui/screens/timetable_screen/widgets/schedule_card.dart b/lib/new_ui/screens/timetable_screen/widgets/schedule_card.dart index ff03ff48..3c31b635 100644 --- a/lib/new_ui/screens/timetable_screen/widgets/schedule_card.dart +++ b/lib/new_ui/screens/timetable_screen/widgets/schedule_card.dart @@ -102,7 +102,7 @@ class ScheduleCard extends StatelessWidget { color: Colors.grey, fontWeight: FontWeight.bold), ), - ) + ), ], ) ], diff --git a/pubspec.yaml b/pubspec.yaml index c905d1d1..d1040504 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,7 +21,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.2+2 environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=2.17.0 <=4.0.0" dependencies: