when Med Aid is selected as No. on submit the fields will be cleared

This commit is contained in:
2024-08-08 16:01:47 +02:00
parent caa0c571fc
commit e7979854cb

View File

@@ -523,6 +523,15 @@ class _EditPatientState extends State<EditPatient> {
void submitForm() {
if (isFieldsFilled()) {
if (!medRequired) {
setState(() {
medMainMemController.text = "";
medNoController.text = "";
medAidCodeController.text = "";
medNameController.text = "";
medSchemeController.text = "";
});
}
updatePatientApiCall();
} else {
showDialog(