insurance details

merge-requests/140/head
Sultan Khan 4 years ago
parent d81cc7119d
commit bedafa24cd

@ -254,6 +254,10 @@ const GET_PAtIENTS_INSURANCE =
"Services/Patients.svc/REST/Get_PatientInsuranceDetails";
const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS =
"Services/Patients.svc/REST/Get_InsuranceCheckList";
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
const GET_PAtIENTS_INSURANCE_APPROVALS =

@ -125,4 +125,14 @@ class InsuranceCardService extends BaseService {
throw error;
}
}
Future getInsuranceDetails() async{
dynamic localRes;
await baseAppClient.post(INSURANCE_DETAILS,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}
}

@ -72,4 +72,5 @@ class InsuranceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
}

@ -18,7 +18,8 @@ class ProjectViewModel extends BaseViewModel {
bool isError = false;
String error = '';
dynamic searchvalue;
bool isLogin = false;
bool isLogin
= false;
dynamic get searchValue => searchvalue;

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -21,6 +25,7 @@ class InsuranceCard extends StatefulWidget {
}
//TODO fix it
class _InsuranceCardState extends State<InsuranceCard> {
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
@override
Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>(
@ -140,6 +145,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
Container(
color: Colors.transparent,
child: SecondaryButton(
onTap: getDetails(),
label: TranslationBase.of(context).seeDetails,
textColor: Colors.white,
),
@ -179,4 +185,11 @@ class _InsuranceCardState extends State<InsuranceCard> {
return newDate.toString();
}
getDetails(){
_insuranceCardService.getInsuranceDetails().then((value) => {
Navigator.push(context,
FadePage(page: InsuranceCardDetails(data:value)))
});
}
}

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/config/size_config.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:html2md/html2md.dart' as html2md;
import 'package:flutter_markdown/flutter_markdown.dart';
@ -34,4 +34,5 @@ class _InsuranceCardInsuranceCardDetailsState extends State<InsuranceCardDetails
),
);
}
}

@ -223,7 +223,7 @@ class _Register extends State<Register> {
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {
ConfirmDialog.closeAlertDialog(context)
ConfirmDialog.closeAlertDialog(context),
Navigator.of(context).pushNamed(
REGISTER,
),

@ -126,7 +126,7 @@ class AppScaffold extends StatelessWidget {
description: description,
infoList: infoList,
)
: baseViewModel != null
: baseViewModel != null
? NetworkBaseView(
child: buildBodyWidget(),
baseViewModel: baseViewModel,

@ -141,7 +141,7 @@ dependencies:
screen: ^0.0.5
#google maps places
google_maps_place_picker: ^1.0.0
#Dependencies for video call implementation
native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9
@ -150,7 +150,8 @@ dependencies:
after_layout: ^1.0.7
twilio_programmable_video: ^0.5.0+3
flutter_tts: ^1.2.6
html2md: "^0.5.1"
flutter_markdown: "^0.5.0"
speech_to_text:
path: speech_to_text

Loading…
Cancel
Save