validation added, if asset not selected

design_3.0_incident_module
Sikander Saleem 1 day ago
parent 67f9081f50
commit 5d945e07cb

@ -616,6 +616,11 @@ class _CreateIncidentRequestPageState extends State<CreateIncidentRequestPage> {
Future<void> _submit() async { Future<void> _submit() async {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
if (_formKey.currentState!.validate()) { if (_formKey.currentState!.validate()) {
if (incidentType?.value == 1 && device == null) {
"Please scan or pick asset".showToast;
return;
}
if (occurrenceDate == null) { if (occurrenceDate == null) {
"Please select occurrence Data".showToast; "Please select occurrence Data".showToast;
return; return;

Loading…
Cancel
Save