Updates & Fixes

dev_3.3_faiz_payfort
haroon amjad 2 years ago
parent 98a5b7d049
commit ac52ba75a7

@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';

@ -42,9 +42,10 @@ class ReportsService extends BaseService {
}, body: _requestReportsInpatient.toJson());
}
Future getInpatientAdmissionsList() async {
Future getInpatientAdmissionsList(int languageID) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['IsForMedicalReport'] = true;
body['LanguageID'] = languageID;
hasError = false;
await baseAppClient.post(GET_INPATIENT_ADMISSIONS, onSuccess: (dynamic response, int statusCode) {
admissionsMedicalReport.clear();

@ -26,7 +26,7 @@ class ReportsViewModel extends BaseViewModel {
List<AdmissionMedicalReport> get admissionsMedicalReportList => _reportsService.admissionsMedicalReport;
getReports() async {
getReports(int languageID) async {
setState(ViewState.Busy);
reportsOrderRequestList.clear();
reportsOrderReadyList.clear();
@ -37,7 +37,7 @@ class ReportsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
_filterList();
await _reportsService.getInpatientAdmissionsList();
await _reportsService.getInpatientAdmissionsList(languageID);
setState(ViewState.Idle);
}
}

@ -31,6 +31,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
TabController _tabController_new;
List<ImagesInfo> imagesInfo = List();
int _currentPage = 0;
ProjectViewModel projectViewModel;
@override
void initState() {
@ -46,7 +47,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/0.png'));
imagesInfo.add(ImagesInfo(
@ -55,7 +56,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/medical-reorts/ar/2.png'));
return BaseView<ReportsViewModel>(
onModelReady: (model) {
model.getReports();
model.getReports(projectViewModel.isArabic ? 1 : 2);
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
@ -160,7 +161,9 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
FadePage(
page: InPatientMedicalReports(
admissionMedicalReport: admissionMedicalReport,
)));
),
),
);
},
child: Container(
// height: 100.0,
@ -259,7 +262,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
page: MedicalReports(),
),
).then((value) {
model.getReports();
model.getReports(projectViewModel.isArabic ? 1 : 2);
}),
),
)

@ -222,7 +222,7 @@ class _AppDrawerState extends State<AppDrawer> {
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(padding: EdgeInsets.all(10), child: Text(''));
return Padding(padding: EdgeInsets.all(10), child:CircularProgressIndicator());
default:
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(snapshot.error));

Loading…
Cancel
Save