|
|
|
|
@ -15,6 +15,10 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class SchedulePage extends StatefulWidget {
|
|
|
|
|
DoctorList doctorList;
|
|
|
|
|
@ -49,6 +53,7 @@ class _SchedulePageState extends State<SchedulePage> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return BaseView<MedicalViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getDoctorSchedule(doctorList),
|
|
|
|
|
allowAny: true,
|
|
|
|
|
@ -97,13 +102,14 @@ class _SchedulePageState extends State<SchedulePage> {
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 20),
|
|
|
|
|
padding: projectViewModel.isArabic ? EdgeInsets.only(right: 20) : EdgeInsets.only(left: 20),
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
weeks[index][index2]['DayName'],
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
getDayMonths(
|
|
|
|
|
@ -123,21 +129,39 @@ class _SchedulePageState extends State<SchedulePage> {
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20),
|
|
|
|
|
padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 20),
|
|
|
|
|
margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7),
|
|
|
|
|
decoration: BoxDecoration(boxShadow: [
|
|
|
|
|
weeks[index][index2]['fullDay'] == false ? BoxShadow(color: Colors.green, offset: Offset(-5, 0)) : BoxShadow(),
|
|
|
|
|
DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
|
|
|
|
|
? BoxShadow(color: Colors.green, offset: Offset(projectViewModel.isArabic ? 5 : -5, 0))
|
|
|
|
|
: BoxShadow(
|
|
|
|
|
color: Colors.grey[100],
|
|
|
|
|
blurRadius: 5,
|
|
|
|
|
spreadRadius: 4,
|
|
|
|
|
offset: Offset(0, 10),
|
|
|
|
|
),
|
|
|
|
|
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Texts(
|
|
|
|
|
weeks[index][index2]['WorkingHours'],
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
|
DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
|
|
|
|
|
? Texts(
|
|
|
|
|
TranslationBase.of(context).today,
|
|
|
|
|
color: Colors.green,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
marginTop: 0,
|
|
|
|
|
)
|
|
|
|
|
: SizedBox(),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Texts(
|
|
|
|
|
weeks[index][index2]['WorkingHours'],
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
]))),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
))));
|
|
|
|
|
|