VA-38902 fix

ipd-changes-for-vida-plus
parent 4e42ea7bcc
commit 476033c925

@ -47,7 +47,10 @@ class ReferralService extends BaseService {
await baseAppClient.post(
REFER_TO_DOCTOR,
onSuccess: (dynamic response, int statusCode) {},
onSuccess: (dynamic response, int statusCode) {
hasError = false;
},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -55,7 +55,9 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
String? clinicError;
String? doctorError;
String? frequencyError;
String? priorityError;
String? remarkError;
String? extError;
stt.SpeechToText speech = stt.SpeechToText();
var recognizedWord;
var event = RobotProvider();
@ -394,7 +396,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
dropDownText: _selectedPriority != null ? _selectedPriority['Description'] : null,
enabled: false,
isTextFieldHasSuffix: true,
validationError: frequencyError,
validationError: priorityError,
onClick: () {
ListSelectDialog dialog = ListSelectDialog(
list: _priorityList,
@ -511,6 +513,7 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
height: 10,
),
AppTextFieldCustom(
validationError: extError,
hintText: TranslationBase.of(context).ext,
controller: _extController,
inputType: TextInputType.text,
@ -581,11 +584,13 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
),
),
),
bottomSheet: model.state != ViewState.Idle
? Container(
height: 0,
)
: CustomBottomSheetContainer(
bottomSheet:
// model.state != ViewState.Idle
// ? Container(
// height: 0,
// )
// :
CustomBottomSheetContainer(
label: "${TranslationBase.of(context).refer}",
onTap: () async {
setState(() {
@ -615,10 +620,20 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
frequencyError = null;
}
if (_selectedPriority == null) {
priorityError = TranslationBase.of(context).fieldRequired;
} else {
priorityError = null;
}
if (_remarksController.text.isEmpty ) {
remarkError = TranslationBase.of(context).fieldRequired;
} else {
remarkError = null;
}
if (_extController.text.isEmpty ) {
extError = TranslationBase.of(context).fieldRequired;
} else {
extError = null;
}
});
if (_selectedFrequency == null ||
_selectedPriority == null ||
@ -626,8 +641,8 @@ class _PatientMakeInPatientReferralScreenState extends State<PatientMakeInPatien
_selectedClinic == null ||
_selectedDoctor == null ||
( isVidaPlusProject && selectedDiagnosis == null) ||
_remarksController.text == null ||
_extController.text == null) return;
_remarksController.text.isEmpty ||
_extController.text.isEmpty) return;
{
GifLoaderDialogUtils.showMyDialog(context);
await model.makeInPatientReferral(

Loading…
Cancel
Save