diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index f748d37d..84f37a09 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -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 diff --git a/lib/views/pages/user/gas_refill/request_gas_refill.dart b/lib/views/pages/user/gas_refill/request_gas_refill.dart index e5242580..3faea579 100644 --- a/lib/views/pages/user/gas_refill/request_gas_refill.dart +++ b/lib/views/pages/user/gas_refill/request_gas_refill.dart @@ -85,6 +85,12 @@ class _RequestGasRefillState extends State { 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(