merge-requests/487/head
Sultan Khan 5 years ago
parent 212d1dc05f
commit 1fb59c17bc

@ -837,21 +837,16 @@ const Map<String, Map<String, String>> localizedValues = {
"enter_credentials": { "enter_credentials": {
"en": "Enter the user credentials below", "en": "Enter the user credentials below",
"ar": "أدخل بيانات اعتماد المستخدم أدناه" "ar": "أدخل بيانات اعتماد المستخدم أدناه"
},
"step": {
"en": "Step",
"ar": "خطوة"
},
"fieldRequired": {
"en": "This field is required",
"ar": "هذه الخانة مطلوبه"
}, },
"step": {"en": "Step", "ar": "خطوة"},
"fieldRequired": {"en": "This field is required", "ar": "هذه الخانة مطلوبه"},
"applyOrRescheduleLeave": { "applyOrRescheduleLeave": {
"en": "Apply Or Reschedule Leave", "en": "Apply Or Reschedule Leave",
"ar": "التقدم بطلب أو إعادة جدولة الإجازة" "ar": "التقدم بطلب أو إعادة جدولة الإجازة"
},"myQRCode": { },
"en": "My QR Code", "myQRCode": {"en": "My QR Code", "ar": "My QR Code"},
"ar": "My QR Code" "patientIDMobilenational": {
"en": "Patient ID, National ID, Mobile Number",
"ar": "هوية المريض ، الهوية الوطنية ، رقم الهاتف المحمول"
}, },
}; };

@ -180,54 +180,73 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
width: 1.0, color: HexColor("#CCCCCC"))), width: 1.0, color: HexColor("#CCCCCC"))),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppTextFormField( child: AppTextFormField(
labelText: labelText: TranslationBase.of(context)
TranslationBase.of(context).patientID, .patpatientIDMobilenationalientID,
borderColor: Colors.white, borderColor: Colors.white,
textInputType: TextInputType.number, textInputType: TextInputType.number,
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
inputFormatter: ONLY_NUMBERS, inputFormatter: ONLY_NUMBERS,
focusNode: _nodeText1, focusNode: _nodeText1,
onSaved: (value) { onSaved: (value) {
value == null || value == '' if (value != null && value != '') {
? _patientSearchFormValues.setPatientID = if (value.length == 10 &&
0 (value[0] == '2' || value[0] == '1')) {
: _patientSearchFormValues.setPatientID = _patientSearchFormValues
.PatientIdentificationID = value;
} else if (value.length == 10 &&
(value[0] == '05' || value[0] == '5')) {
_patientSearchFormValues
.setPatientMobileNumber = value;
} else {
_patientSearchFormValues.setPatientID =
int.parse(value); int.parse(value);
}
if (value != null &&
value.toString().trim().isEmpty) {
_patientSearchFormValues.setPatientID = 0;
} }
// else{
// }
// value == null || value == ''
// ? _patientSearchFormValues.setPatientID =
// 0
// : _patientSearchFormValues.setPatientID =
// int.parse(value);
// if (value != null &&
// value.toString().trim().isEmpty) {
// _patientSearchFormValues.setPatientID = 0;
// }
}, },
), ),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: [ // children: [
InkWell( // InkWell(
child: this.isView == false // child: this.isView == false
? AppText( // ? AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.searchWithOther, // .searchWithOther,
color: Colors.red, // color: Colors.red,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
) // )
: AppText( // : AppText(
TranslationBase.of(context) // TranslationBase.of(context)
.hideOtherCriteria, // .hideOtherCriteria,
color: Colors.red, // color: Colors.red,
fontWeight: FontWeight.bold), // fontWeight: FontWeight.bold),
onTap: () { // onTap: () {
setState(() { // setState(() {
this.isView = !this.isView; // this.isView = !this.isView;
}); // });
}, // },
) // )
], // ],
), // ),
isView == true isView == true
? Column(children: [ ? Column(children: [
SizedBox( SizedBox(

@ -624,8 +624,7 @@ class TranslationBase {
String get applyOrRescheduleLeave => String get applyOrRescheduleLeave =>
localizedValues['applyOrRescheduleLeave'][locale.languageCode]; localizedValues['applyOrRescheduleLeave'][locale.languageCode];
String get myQRCode => String get myQRCode => localizedValues['myQRCode'][locale.languageCode];
localizedValues['myQRCode'][locale.languageCode];
String get addMedication => String get addMedication =>
localizedValues['addMedication'][locale.languageCode]; localizedValues['addMedication'][locale.languageCode];
@ -1216,13 +1215,16 @@ class TranslationBase {
String get remove => localizedValues['remove'][locale.languageCode]; String get remove => localizedValues['remove'][locale.languageCode];
String get step => localizedValues['step'][locale.languageCode]; String get step => localizedValues['step'][locale.languageCode];
String get fieldRequired => localizedValues['fieldRequired'][locale.languageCode]; String get fieldRequired =>
localizedValues['fieldRequired'][locale.languageCode];
String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode]; String get noSickLeave => localizedValues['no-sickleve'][locale.languageCode];
String get changeOfSchedule => String get changeOfSchedule =>
localizedValues['changeOfSchedule'][locale.languageCode]; localizedValues['changeOfSchedule'][locale.languageCode];
String get newSchedule => localizedValues['newSchedule'][locale.languageCode]; String get newSchedule => localizedValues['newSchedule'][locale.languageCode];
String get enterCredentials => String get enterCredentials =>
localizedValues['enter_credentials'][locale.languageCode]; localizedValues['enter_credentials'][locale.languageCode];
String get patpatientIDMobilenationalientID =>
localizedValues['patientIDMobilenational'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -17,7 +17,8 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
final double height; final double height;
PatientProfileHeaderNewDesign( PatientProfileHeaderNewDesign(
this.patient, this.patientType, this.arrivalType, {this.height = 0.0}); this.patient, this.patientType, this.arrivalType,
{this.height = 0.0});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -155,7 +156,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
color: HexColor("#20A169"), color: HexColor("#20A169"),
), ),
child: AppText( child: AppText(
patient.startTime??"", patient.startTime ?? "",
color: Colors.white, color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 1.5 * SizeConfig.textMultiplier,
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -208,7 +209,9 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Row( Row(
children: [ children: [
AppText( AppText(
patient.nationalityName ?? patient.nationality??'', patient.nationalityName ??
patient.nationality ??
'',
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
), ),

Loading…
Cancel
Save