diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index f73d4068..7a8baa56 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -48,8 +48,8 @@ class BaseAppClient { if (body['EditedBy'] == '') { body.remove("EditedBy"); } - body['TokenID'] = "@dm!n";// token ?? ''; - // body['TokenID'] = "@dm!n" ?? ''; + body['TokenID'] = token ?? ''; + // body['TokenID'] = "@dm!n" ?? ''; String lang = await sharedPref.getString(APP_Language); if (lang != null && lang == 'ar') body['LanguageID'] = 1; diff --git a/lib/config/config.dart b/lib/config/config.dart index 8464f720..93d38947 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -4,8 +4,8 @@ const MAX_SMALL_SCREEN = 660; const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; -const BASE_URL = 'https://hmgwebservices.com/'; -//const BASE_URL = 'https://uat.hmgwebservices.com/'; +//const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = diff --git a/lib/core/model/procedure/get_ordered_procedure_model.dart b/lib/core/model/procedure/get_ordered_procedure_model.dart index b7185711..c3c7718f 100644 --- a/lib/core/model/procedure/get_ordered_procedure_model.dart +++ b/lib/core/model/procedure/get_ordered_procedure_model.dart @@ -53,6 +53,7 @@ class EntityList { String remarks; String status; String template; + int doctorID; EntityList( {this.achiCode, @@ -78,10 +79,12 @@ class EntityList { this.procedureName, this.remarks, this.status, - this.template}); + this.template, + this.doctorID}); EntityList.fromJson(Map json) { achiCode = json['achiCode']; + doctorID = json['doctorID']; appointmentDate = json['appointmentDate']; appointmentNo = json['appointmentNo']; categoryID = json['categoryID']; @@ -110,6 +113,7 @@ class EntityList { Map toJson() { final Map data = new Map(); data['achiCode'] = this.achiCode; + data['doctorID'] = this.doctorID; data['appointmentDate'] = this.appointmentDate; data['appointmentNo'] = this.appointmentNo; data['categoryID'] = this.categoryID; diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 0c3d952f..3448d0be 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/model/procedure/get_ordered_procedure_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; @@ -16,7 +17,7 @@ class ProcedureCard extends StatelessWidget { final String categoryName; final int categoryID; final PatiantInformtion patient; - final String doctorName; + final int doctorID; const ProcedureCard({ Key key, @@ -25,7 +26,7 @@ class ProcedureCard extends StatelessWidget { this.categoryID, this.categoryName, this.patient, - this.doctorName, + this.doctorID, }) : super(key: key); @override Widget build(BuildContext context) { @@ -241,22 +242,27 @@ class ProcedureCard extends StatelessWidget { ), ), ),*/ - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // AppText( - // entityList.remarks.toString() ?? '', - // fontSize: 12, - // ), - // if (entityList.categoryID == 2 || - // entityList.categoryID == 4 && - // doctorName == entityList.doctorName) - // InkWell( - // child: Icon(DoctorApp.edit), - // onTap: onTap, - // ) - // ], - // ) + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: AppText( + entityList.remarks.toString() ?? '', + fontSize: 12, + ), + ), + if (entityList.categoryID == 2 || + entityList.categoryID == 4 && + doctorID == entityList.doctorID) + InkWell( + child: Icon(DoctorApp.edit), + onTap: onTap, + ) + ], + ), + ) ], ), //onTap: onTap, diff --git a/lib/screens/procedures/add-procedure-form.dart b/lib/screens/procedures/add-procedure-form.dart index b17f50ae..830b5a5e 100644 --- a/lib/screens/procedures/add-procedure-form.dart +++ b/lib/screens/procedures/add-procedure-form.dart @@ -186,7 +186,7 @@ class _AddSelectedProcedureState extends State { children: [ Container( width: MediaQuery.of(context).size.width * - 0.81, + 0.79, child: AppTextFieldCustom( hintText: TranslationBase.of(context) .searchProcedureHere, diff --git a/lib/screens/procedures/add_procedure_homeScreen.dart b/lib/screens/procedures/add_procedure_homeScreen.dart index de242cd7..4a4d8242 100644 --- a/lib/screens/procedures/add_procedure_homeScreen.dart +++ b/lib/screens/procedures/add_procedure_homeScreen.dart @@ -125,12 +125,12 @@ class _AddProcedureHomeState extends State tabWidget( screenSize, _activeTab == 0, - 'All Procedures', + "Favorite Templates", ), tabWidget( screenSize, _activeTab == 1, - "Favorite Templates", + 'All Procedures', ), ], ), @@ -144,14 +144,14 @@ class _AddProcedureHomeState extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - AddSelectedProcedure( - model: model, - patient: patient, - ), AddFavouriteProcedure( patient: patient, model: model, ), + AddSelectedProcedure( + model: model, + patient: patient, + ), ], ), ), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index b964392e..bcc7c291 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -17,12 +17,12 @@ import 'package:flutter/material.dart'; import 'ProcedureCard.dart'; class ProcedureScreen extends StatelessWidget { - String doctorNameP; + int doctorNameP; void initState() async { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - doctorNameP = doctorProfile.doctorName; + doctorNameP = doctorProfile.doctorID; } @override @@ -187,7 +187,7 @@ class ProcedureScreen extends StatelessWidget { // 'You Cant Update This Procedure'); }, patient: patient, - doctorName: doctorNameP, + doctorID: doctorNameP, ), ), if (model.state == ViewState.ErrorLocal || diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index 6190e92e..24c4ea41 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -100,7 +100,7 @@ class _UpdateProcedureWidgetState extends State { baseViewModel: model, child: SingleChildScrollView( child: Container( - height: MediaQuery.of(context).size.height * 0.65, + height: MediaQuery.of(context).size.height * 0.9, child: Form( child: Padding( padding: