Merge branch 'development' into fix-bugs10_2

merge-requests/303/head
mosazaid 5 years ago
commit 4f302694b3

@ -13,3 +13,4 @@ final DASHBOARD_DATA = 'dashboard-data';
final OTP_TYPE = 'otp-type'; final OTP_TYPE = 'otp-type';
final LAST_LOGIN_USER = 'last-login-user'; final LAST_LOGIN_USER = 'last-login-user';
final PASSWORD = 'password'; final PASSWORD = 'password';
final CLINIC_NAME = 'clinic-name';

@ -32,7 +32,7 @@ class ProcedureViewModel extends BaseViewModel {
Future getProcedureCategory({String categoryName}) async { Future getProcedureCategory({String categoryName}) async {
hasError = false; hasError = false;
//_insuranceCardService.clearInsuranceCard(); //_insuranceCardService.clearInsuranceCard();
setState(ViewState.Busy); setState(ViewState.BusyLocal);
await _procedureService.getProcedureCategory(categoryName: categoryName); await _procedureService.getProcedureCategory(categoryName: categoryName);
if (_procedureService.hasError) { if (_procedureService.hasError) {
error = _procedureService.error; error = _procedureService.error;
@ -80,6 +80,6 @@ class ProcedureViewModel extends BaseViewModel {
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
// await getProcedure(mrn: mrn); await getProcedure(mrn: mrn);
} }
} }

@ -58,6 +58,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
DoctorProfileModel profile; DoctorProfileModel profile;
bool isExpanded = false; bool isExpanded = false;
String isInpatient = ""; String isInpatient = "";
var clinicName = [];
void didChangeDependencies() async { void didChangeDependencies() async {
super.didChangeDependencies(); super.didChangeDependencies();
if (_isInit) { if (_isInit) {
@ -72,7 +73,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
.listen((IosNotificationSettings settings) { .listen((IosNotificationSettings settings) {
print("Settings registered: $settings"); print("Settings registered: $settings");
}); });
clinicName = await sharedPref.getObj(CLINIC_NAME);
print(clinicName);
_firebaseMessaging.getToken().then((String token) async { _firebaseMessaging.getToken().then((String token) async {
if (token != '') { if (token != '') {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
@ -721,10 +723,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
model.dashboardItemsList.length > 0 clinicName.length.toString(),
? getPatientCount(
model.dashboardItemsList[6])
: "",
fontSize: SizeConfig.textMultiplier * 6, fontSize: SizeConfig.textMultiplier * 6,
color: Colors.white, color: Colors.white,
), ),

@ -200,7 +200,7 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
context) context)
.size .size
.height * .height *
0.33, 0.21,
width: MediaQuery.of( width: MediaQuery.of(
context) context)
.size .size
@ -235,11 +235,11 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
), ),
), ),
Container( Container(
height: MediaQuery.of( // height: MediaQuery.of(
context) // context)
.size // .size
.height * // .height *
0.3899, // 0.3499,
width: MediaQuery.of( width: MediaQuery.of(
context) context)
.size .size
@ -348,13 +348,20 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
17.0, 17.0,
), ),
Expanded( Expanded(
child: AppText( child:
model RichText(
.prescriptionList[0] maxLines:
.entityList[index] 3,
.indication, overflow:
fontSize: 15.0), TextOverflow.ellipsis,
) strutStyle:
StrutStyle(fontSize: 12.0),
text: TextSpan(
style:
TextStyle(color: Colors.black),
text: model.prescriptionList[0].entityList[index].indication),
),
),
], ],
), ),
SizedBox( SizedBox(
@ -413,15 +420,24 @@ class _NewPrescriptionScreenState extends State<NewPrescriptionScreen> {
Expanded( Expanded(
child: child:
Container( Container(
height: // height: MediaQuery.of(context).size.height *
25, // 0.038,
child: child:
AppText( RichText(
model.prescriptionList[0].entityList[index].remarks == null // maxLines:
? "" // 2,
: model.prescriptionList[0].entityList[index].remarks, // overflow:
fontSize: // TextOverflow.ellipsis,
12.5, strutStyle:
StrutStyle(fontSize: 10.0),
text:
TextSpan(
style:
TextStyle(color: Colors.black),
text: model.prescriptionList[0].entityList[index].remarks != null
? model.prescriptionList[0].entityList[index].remarks
: "",
),
), ),
), ),
), ),

@ -441,6 +441,14 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
// .updateProcedure(); // .updateProcedure();
updateProcedureForm( updateProcedureForm(
context, context,
model:
model,
orderNo: model
.procedureList[
0]
.entityList[
index]
.orderNo,
remarks: model remarks: model
.procedureList[ .procedureList[
0] 0]

@ -14,18 +14,21 @@ import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
void updateProcedureForm(context, void updateProcedureForm(context,
{String procedureName, {String procedureName,
int orderNo,
PatiantInformtion patient, PatiantInformtion patient,
String orderType, String orderType,
String procedureId, String procedureId,
String remarks, String remarks,
ProcedureViewModel model,
String categoreId}) { String categoreId}) {
ProcedureViewModel model = ProcedureViewModel(); //ProcedureViewModel model2 = ProcedureViewModel();
TextEditingController remarksController = TextEditingController(); TextEditingController remarksController = TextEditingController();
TextEditingController orderController = TextEditingController(); TextEditingController orderController = TextEditingController();
showModalBottomSheet( showModalBottomSheet(
@ -40,6 +43,7 @@ void updateProcedureForm(context,
model: model, model: model,
procedureId: procedureId, procedureId: procedureId,
categoryId: categoreId, categoryId: categoreId,
orderNo: orderNo,
); );
}); });
} }
@ -52,6 +56,7 @@ class UpdateProcedureWidget extends StatefulWidget {
final TextEditingController remarksController; final TextEditingController remarksController;
final String procedureId; final String procedureId;
final String categoryId; final String categoryId;
final int orderNo;
UpdateProcedureWidget( UpdateProcedureWidget(
{this.model, {this.model,
@ -60,7 +65,8 @@ class UpdateProcedureWidget extends StatefulWidget {
this.remarksController, this.remarksController,
this.patient, this.patient,
this.procedureId, this.procedureId,
this.categoryId}); this.categoryId,
this.orderNo});
@override @override
_UpdateProcedureWidgetState createState() => _UpdateProcedureWidgetState(); _UpdateProcedureWidgetState createState() => _UpdateProcedureWidgetState();
} }
@ -85,7 +91,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
builder: builder:
(BuildContext context, ProcedureViewModel model, Widget child) => (BuildContext context, ProcedureViewModel model, Widget child) =>
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: widget.model,
child: DraggableScrollableSheet( child: DraggableScrollableSheet(
minChildSize: 0.90, minChildSize: 0.90,
initialChildSize: 0.95, initialChildSize: 0.95,
@ -226,6 +232,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
controller: widget.remarksController, controller: widget.remarksController,
maxLines: 3, maxLines: 3,
minLines: 2, minLines: 2,
onChanged: (value) {},
), ),
), ),
SizedBox( SizedBox(
@ -244,6 +251,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
updateProcedure( updateProcedure(
orderNo: widget.orderNo,
orderType: selectedType.toString(), orderType: selectedType.toString(),
categorieId: widget.categoryId, categorieId: widget.categoryId,
procedureId: widget.procedureId, procedureId: widget.procedureId,
@ -272,6 +280,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
updateProcedure( updateProcedure(
{ProcedureViewModel model, {ProcedureViewModel model,
String remarks, String remarks,
int orderNo,
String newProcedureId, String newProcedureId,
String newCategorieId, String newCategorieId,
List<EntityList> entityList, List<EntityList> entityList,
@ -289,7 +298,7 @@ class _UpdateProcedureWidgetState extends State<UpdateProcedureWidget> {
updateProcedureReqModel.episodeID = patient.episodeNo; updateProcedureReqModel.episodeID = patient.episodeNo;
updateProcedureReqModel.patientMRN = patient.patientMRN; updateProcedureReqModel.patientMRN = patient.patientMRN;
updateProcedureReqModel.lineItemNo = 1; updateProcedureReqModel.lineItemNo = 1;
updateProcedureReqModel.orderNo = 0; updateProcedureReqModel.orderNo = orderNo;
controls.add( controls.add(
Controls(code: "remarks", controlValue: remarks.isEmpty ? '' : remarks), Controls(code: "remarks", controlValue: remarks.isEmpty ? '' : remarks),

@ -486,7 +486,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
case 3: case 3:
return InkWell( return InkWell(
onTap: () => { onTap: () => {
authenticateUser(3, BiometricType.fingerprint.index, authProv) if (checkIfBiometricAvailable(BiometricType.fingerprint))
{
authenticateUser(
3, BiometricType.fingerprint.index, authProv)
}
}, },
child: RoundedContainer( child: RoundedContainer(
backgroundColor: backgroundColor:
@ -518,8 +522,11 @@ class _VerificationMethodsState extends State<VerificationMethods> {
break; break;
case 4: case 4:
return InkWell( return InkWell(
onTap: () => onTap: () {
{authenticateUser(4, BiometricType.face.index, authProv)}, if (checkIfBiometricAvailable(BiometricType.face)) {
authenticateUser(4, BiometricType.face.index, authProv);
}
},
child: RoundedContainer( child: RoundedContainer(
backgroundColor: checkIfBiometricAvailable(BiometricType.face) backgroundColor: checkIfBiometricAvailable(BiometricType.face)
? Colors.white ? Colors.white
@ -739,7 +746,9 @@ class _VerificationMethodsState extends State<VerificationMethods> {
sharedPref.setString(TOKEN, res['AuthenticationTokenID']); sharedPref.setString(TOKEN, res['AuthenticationTokenID']);
if (res['List_DoctorProfile'] != null) { if (res['List_DoctorProfile'] != null) {
loginProcessCompleted(res['List_DoctorProfile'][0], authProv); loginProcessCompleted(res['List_DoctorProfile'][0], authProv);
sharedPref.setObj(CLINIC_NAME, res['List_DoctorsClinic']);
} else { } else {
sharedPref.setObj(CLINIC_NAME, res['List_DoctorsClinic']);
ClinicModel clinic = ClinicModel clinic =
ClinicModel.fromJson(res['List_DoctorsClinic'][0]); ClinicModel.fromJson(res['List_DoctorsClinic'][0]);
getDocProfiles(clinic, authProv); getDocProfiles(clinic, authProv);

@ -246,8 +246,7 @@ class _TextFieldsState extends State<TextFields> {
}); });
} }
} }
if (widget.onChanged != null) widget.onChanged(value);
widget.onChanged(value);
}, },
focusNode: _focusNode, focusNode: _focusNode,
maxLength: widget.maxLength ?? null, maxLength: widget.maxLength ?? null,

@ -559,7 +559,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -830,7 +830,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -965,5 +965,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save