Merge branch 'development_new_design_2.0' into haroon-new-design

# Conflicts:
#	lib/config/localized_values.dart
#	lib/pages/BookAppointment/DoctorProfile.dart
#	lib/pages/MyAppointments/SchedulePage.dart
#	lib/uitl/translations_delegate_base.dart
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 5c64ce4795

@ -12,8 +12,8 @@ const PACKAGES_PRODUCTS = '/api/products';
const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -1288,7 +1288,12 @@ const Map localizedValues = {
"verification_message_code": {"en": "Please enter verification code", "ar": "الرجاء إدخال رمز التحقق"},
"select-location": {"en": "Select Location", "ar": "اختر موقعا"},
"result-header": {"en": "Get the result in Few Hours", "ar": "احصل على النتيجة خلال عدة ساعات"},
"covid-info": { "en": "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.", "ar": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية" },
"covid-info": {
"en":
"Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.",
"ar":
"تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية"
},
"select-appo": {"en": "Kindly select one of the available appointments from below:", "ar": "يرجى اختيار أحد المواعيد المتاحة من أدناه:"},
"covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"},
"covid-alert-info": {
@ -1506,4 +1511,6 @@ const Map localizedValues = {
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " },
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" },
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"}
"seeDoctorsList": {"en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء"},
"doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}
};

@ -1,30 +1,32 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
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;
AppoitmentAllHistoryResultList appo;
SchedulePage({
this.appo,
this.doctorList,
});
@override
_SchedulePageState createState() => _SchedulePageState();
}
@ -42,7 +44,6 @@ class _SchedulePageState extends State<SchedulePage> {
bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences();
@override
void initState() {
this.doctorList = widget.doctorList;
@ -52,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,
@ -74,7 +76,7 @@ class _SchedulePageState extends State<SchedulePage> {
isShowDecPage: false,
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: model.freeSlots.length > 0 ? Stack(
child: Stack(
children: [
Container(
margin: EdgeInsets.only(top: 40),
@ -100,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(
@ -126,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,
),
)
],
)
]))),
)
],
))));
@ -152,27 +173,16 @@ class _SchedulePageState extends State<SchedulePage> {
length: weeks.length,
)
],
) : Container(
child: Center(
child: Text(TranslationBase.of(context).emptySchedule, style: TextStyle(
fontSize: 16.0,
color: Color(0xffC5272D)
)),
),
)));
}));
}
generateWeeksSchedules() {
if (this.doctorScheduleResponse.length > 0) {
this.weeks.clear();
for (var i = 0; i < 8; i++) {
var weekSchedule = generateNewWeekSchedule(i);
this.markWeekFreeDays(weekSchedule);
this.weeks.add(weekSchedule);
}
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule);
this.weeks.clear();
for (var i = 0; i < 8; i++) {
var weekSchedule = generateNewWeekSchedule(i);
this.markWeekFreeDays(weekSchedule);
this.weeks.add(weekSchedule);
}
//print(this.weeks);
}

@ -2260,6 +2260,7 @@ class TranslationBase {
String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode];
String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode];
String get doctorScheduleNot => localizedValues["doctorScheduleNot"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save