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

Updates & fixes

See merge request Cloud_Solution/diplomatic-quarter!491
merge-requests/490/merge
haroon amjad 3 years ago
commit 464df82da0

@ -28,7 +28,7 @@ class MyBalanceService extends BaseService {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
MyBalanceService() { MyBalanceService() {
getFamilyFiles(); // getFamilyFiles();
} }
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {

@ -159,7 +159,7 @@ class RRTViewModel extends BaseViewModel {
} }
Future<bool> cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async { Future<bool> cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async {
Map<String, dynamic> body = {"Id": order.iD, "ClickButton": 16}; Map<String, dynamic> body = {"Id": order.iD, "ClickButton": 14};
var success = false; var success = false;
await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) { await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) {
success = true; success = true;

@ -50,7 +50,7 @@ class _DentalComplaintsState extends State<DentalComplaints> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: "Symptoms", appBarTitle: TranslationBase.of(context).chiefComplaints,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
isShowDecPage: false, isShowDecPage: false,
@ -77,13 +77,15 @@ class _DentalComplaintsState extends State<DentalComplaints> {
: Container( : Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0),
child: Text(TranslationBase.of(context).dentalProcedureList, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold, letterSpacing: 0.5)), child: Text(TranslationBase.of(context).dentalProcedureList, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, letterSpacing: -0.46)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 20.0), decoration: cardRadius(10),
margin: EdgeInsets.all(12.0),
child: Table( child: Table(
children: getProceduresData(), children: getProceduresData(),
), ),
@ -148,17 +150,14 @@ class _DentalComplaintsState extends State<DentalComplaints> {
children: [ children: [
Container( Container(
child: Container( child: Container(
child: Center( margin: EdgeInsets.all(12.0),
child: Text(TranslationBase.of(context).procedureName, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), child: Text(TranslationBase.of(context).procedureName, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
),
), ),
), ),
Container( Container(
child: Container( child: Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.all(12.0),
child: Center( child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
), ),
), ),
], ],
@ -167,18 +166,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) {
tableRow.add(TableRow(children: [ tableRow.add(TableRow(children: [
Container( Container(
child: Container( margin: EdgeInsets.all(12.0),
child: Center( child: Text(procedure.procedureName, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
child: Text(procedure.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
), ),
Container( Container(
child: Container( margin: EdgeInsets.all(12.0),
child: Center( child: Text(procedure.neededTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
child: Text(procedure.neededTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)),
),
),
), ),
])); ]));
}); });
@ -186,19 +179,12 @@ class _DentalComplaintsState extends State<DentalComplaints> {
TableRow( TableRow(
children: [ children: [
Container( Container(
child: Container( margin: EdgeInsets.all(12.0),
child: Center( child: Text(TranslationBase.of(context).totalTimeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
child: Text(TranslationBase.of(context).totalTimeNeeded, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
), ),
Container( Container(
child: Container( margin: EdgeInsets.all(12.0),
margin: EdgeInsets.only(bottom: 10.0), child: Text(totalAppointmentTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
child: Center(
child: Text(totalAppointmentTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
), ),
], ],
), ),

@ -320,7 +320,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
"Select Project", TranslationBase.of(context).selectHospital,
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 11,
letterSpacing: -0.44, letterSpacing: -0.44,
@ -332,7 +332,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<String>(
key: projectDropdownKey, key: projectDropdownKey,
hint: new Text("Select Project"), hint: new Text(TranslationBase.of(context).selectHospital),
value: projectDropdownValue, value: projectDropdownValue,
iconSize: 0, iconSize: 0,
isExpanded: true, isExpanded: true,

@ -67,8 +67,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) { if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) {
int status = order.statusId; int status = order.statusId;
String _statusDisp = order.statusText; _statusDisp = order.statusText;
Color _color;
if (status == 1) { if (status == 1) {
//pending //pending
_color = Color(0xffCC9B14); _color = Color(0xffCC9B14);
@ -184,7 +183,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
if (order.statusId == 1 || order.statusId == 2) if (order.statusId == 1 || order.statusId == 2)
InkWell( InkWell(
onTap: () { onTap: () {
showConfirmMessage(widget.amRequestViewModel, order.iD); showConfirmMessage(widget.amRequestViewModel, order.iD, context);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
@ -374,21 +373,21 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
); );
} }
void showConfirmMessage(AmRequestViewModel model, int presOrderID) { void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmWithMessageDialog( child: ConfirmWithMessageDialog(
message: TranslationBase.of(context).cancelOrderMsg, message: TranslationBase.of(context).cancelOrderMsg,
onTap: () { onTap: () {
Future.delayed(new Duration(milliseconds: 300)).then((value) async { Future.delayed(new Duration(milliseconds: 300)).then((value) async {
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
await model.updatePressOrder(presOrderID: presOrderID); await model.updatePressOrder(presOrderID: presOrderID);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
} else { } else {
AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
} }
}); });
}, },

@ -23,21 +23,21 @@ class OrderLogPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(AmRequestViewModel model, int presOrderID) { void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmWithMessageDialog( child: ConfirmWithMessageDialog(
message: TranslationBase.of(context).cancelOrderMsg, message: TranslationBase.of(context).cancelOrderMsg,
onTap: () { onTap: () {
Future.delayed(new Duration(milliseconds: 300)).then((value) async { Future.delayed(new Duration(milliseconds: 300)).then((value) async {
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
await model.updatePressOrder(presOrderID: presOrderID); await model.updatePressOrder(presOrderID: presOrderID);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
} else { } else {
AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
} }
}); });
}, },
@ -73,6 +73,7 @@ class OrderLogPage extends StatelessWidget {
} }
return Container( return Container(
margin: EdgeInsets.only(bottom: 12.0),
decoration: BoxDecoration( decoration: BoxDecoration(
color: _color, color: _color,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -88,7 +89,7 @@ class OrderLogPage extends StatelessWidget {
), ),
child: Container( child: Container(
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), padding: EdgeInsets.symmetric(vertical: 13, horizontal: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all(color: Colors.white, width: 1), border: Border.all(color: Colors.white, width: 1),
@ -150,7 +151,7 @@ class OrderLogPage extends StatelessWidget {
], ],
), ),
SizedBox( SizedBox(
height: 20.0, height: 13.0,
), ),
], ],
), ),
@ -163,7 +164,7 @@ class OrderLogPage extends StatelessWidget {
if (order.statusId == 1 || order.statusId == 2) if (order.statusId == 1 || order.statusId == 2)
InkWell( InkWell(
onTap: () { onTap: () {
showConfirmMessage(amRequestViewModel, order.iD); showConfirmMessage(amRequestViewModel, order.iD, context);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class PaymentMethod extends StatefulWidget { class PaymentMethod extends StatefulWidget {
Function onSelectedMethod; Function onSelectedMethod;
@ -214,8 +215,9 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container( Container(
height: 60.0, height: 60.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: 60, width: 90,
child: Image.asset("assets/images/new/payment/installments.png"), // child: Image.asset("assets/images/new/payment/installments.png"),
child: SvgPicture.asset("assets/images/new/payment/instalmt.svg"),
), ),
mFlex(1), mFlex(1),
if (selectedPaymentMethod == "Installment") if (selectedPaymentMethod == "Installment")

@ -61,7 +61,10 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getHospitals(), onModelReady: (model) {
model.getHospitals();
model.getFamilyFiles();
},
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
@ -396,7 +399,8 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) { void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
if (getAllSharedRecordsByStatusList.isNotEmpty) { if (getAllSharedRecordsByStatusList.isNotEmpty) {
List<RadioSelectionDialogModel> list = [ List<RadioSelectionDialogModel> list = [
for (int i = 0; i < getAllSharedRecordsByStatusList.length; i++) RadioSelectionDialogModel(getAllSharedRecordsByStatusList[i].patientName, i), for (int i = 0; i < getAllSharedRecordsByStatusList.length; i++)
if (getAllSharedRecordsByStatusList[i].status == 3) RadioSelectionDialogModel(getAllSharedRecordsByStatusList[i].patientName, i),
]; ];
showDialog( showDialog(
context: context, context: context,

@ -90,6 +90,7 @@ class HospitalLocation extends StatelessWidget {
Widget contactButton(IconData _iconData, String title, VoidCallback callback) { Widget contactButton(IconData _iconData, String title, VoidCallback callback) {
return SizedBox( return SizedBox(
height: 32, height: 32,
width: 100.0,
child: FlatButton.icon( child: FlatButton.icon(
color: Color(0xffF5F5F5), color: Color(0xffF5F5F5),
shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)), shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)),

Loading…
Cancel
Save