1- prevent the user from creating a new gas refill request if the department isn't selected.

2- working on host: https://atomsmdev.hmg.com
main_design2.0
zaid_daoud 2 years ago
parent d1d83bb614
commit 2d0c72b138

@ -3,17 +3,18 @@ class URLs {
static const host2 = "http://194.163.164.213/atoms/api";
static const host1 = "https://atomsuat.hmg.com"; // uat url
static const host3 = "https://atomsmdev.hmg.com"; // uat url
// static const host1 = "http://109.123.243.118:9000";
static String _baseUrl = "$_host/mobile";
static String _host = host1;
static String _host = host3;
set host(String value) => _host = value;
static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_baseUrl/Files/DownloadFile?fileName=$file");
// static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/attachment/$file");
// static String getFileUrl(String file) => (file == null || file.isEmpty) ? null :1 (file.contains("/") ? file : "$_host/attachment/$file");
// API Routes
static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // post

@ -85,6 +85,12 @@ class _RequestGasRefillState extends State<RequestGasRefill> {
return;
}
}
if (_gasRefillProvider.department?.name == null) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Failed to complete your request")));
_isLoading = false;
setState(() {});
return;
}
int status = widget.gasRefillModel == null
? await _gasRefillProvider.createModel(

Loading…
Cancel
Save