diff --git a/assets/images/svgs/next.svg b/assets/images/svgs/next.svg new file mode 100644 index 00000000..ec3d4fdd --- /dev/null +++ b/assets/images/svgs/next.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/svgs/prev.svg b/assets/images/svgs/prev.svg new file mode 100644 index 00000000..1b95cda7 --- /dev/null +++ b/assets/images/svgs/prev.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/core/model/dashboard/doctor_schedule.dart b/lib/core/model/dashboard/doctor_schedule.dart index 22bf324b..5c102f7b 100644 --- a/lib/core/model/dashboard/doctor_schedule.dart +++ b/lib/core/model/dashboard/doctor_schedule.dart @@ -61,21 +61,21 @@ class Scheduleforuser { } class Shiftforuser { - int? fromtime; - int? totime; + String? fromtimetext; + String? totimetext; Shiftforuser({ - this.fromtime, - this.totime, + this.fromtimetext, + this.totimetext, }); factory Shiftforuser.fromJson(Map json) => Shiftforuser( - fromtime: json["fromtime"], - totime: json["totime"], - ); + fromtimetext: json["fromtimetext"], + totimetext: json["totimetext"], + ); Map toJson() => { - "fromtime": fromtime, - "totime": totime, - }; + "fromtimetext": fromtimetext, + "totimetext": totimetext, + }; } diff --git a/lib/core/service/home/schedule_service.dart b/lib/core/service/home/schedule_service.dart index c0167592..cd4ffe46 100644 --- a/lib/core/service/home/schedule_service.dart +++ b/lib/core/service/home/schedule_service.dart @@ -31,7 +31,7 @@ class ScheduleService extends BaseService { Future getDoctorRota(String fromDate, String toDate,{int pageNo = 1}) async{ hasError = false; - String doctorId = '7826'; //await sharedPref.getString(DOCTOR_ID); + String doctorId = await sharedPref.getString(DOCTOR_ID); ////'7826'; String url = DOCTOR_SCHEDULE + '?userid='+doctorId+'&fromDate='+fromDate+'&toDate='+toDate+'&pagenumber='+pageNo.toString()+'&pagesize=10'; await baseAppClient.get( endPoint: url, onSuccess: (dynamic response, int statusCode) { _doctorRota =[]; diff --git a/lib/screens/doctor_schedule/doctor_schedule.dart b/lib/screens/doctor_schedule/doctor_schedule.dart index 19173987..a8fed416 100644 --- a/lib/screens/doctor_schedule/doctor_schedule.dart +++ b/lib/screens/doctor_schedule/doctor_schedule.dart @@ -10,10 +10,12 @@ import '../../core/viewModel/project_view_model.dart'; import '../../core/viewModel/schedule_view_model.dart'; import '../../icons_app/doctor_app_icons.dart'; import '../../utils/date-utils.dart'; +import '../../utils/dr_app_toast_msg.dart'; import '../../utils/translations_delegate_base_utils.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/errors/error_message.dart'; import '../base/base_view.dart'; +import '../patients/register_patient/CustomEditableText.dart'; class DoctorSchedulePage extends StatefulWidget { @override @@ -186,15 +188,25 @@ class _DoctorSchedulePageState extends State { // Icon(Icons.arrow_forward, size: 16.0), ], ), - Container( - height: 45, - child: ListView.builder( - itemCount: model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser!.length, - itemBuilder: (context, index3) => Row(children: [ - Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].fromtime.toString()), - Text(" To "), - Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].totime.toString()) - ]))) + Container( + height: 45, + child: ListView + .builder( + itemCount: model + .getDoctorRotation[ + index] + .scheduleforuser![ + index2]! + .shiftforuser + !.length, + itemBuilder: (context, + index3) => + Row(children: [ + Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].fromtimetext.toString()), + Text(TranslationBase.of(context).to), + Text(model.getDoctorRotation[index].scheduleforuser![index2].shiftforuser![index3].totimetext.toString()) + ]))) + // ],) ]))),