diff --git a/lib/controllers/providers/api/device_transfer_provider.dart b/lib/controllers/providers/api/device_transfer_provider.dart index 1d2dc0b7..f5db6caa 100644 --- a/lib/controllers/providers/api/device_transfer_provider.dart +++ b/lib/controllers/providers/api/device_transfer_provider.dart @@ -169,7 +169,7 @@ class DeviceTransferProvider extends ChangeNotifier{ "senderComment": newModel.comment, "senderWorkingHours": newModel.workingHours, "senderTravelingHours": newModel.travelingHours, - "senderAttachmentName": "${DateTime.now().toIso8601String()}.png|${newModel.signature}", + "senderAttachmentName": "${newModel.signature}.png", } ); }else{ @@ -196,7 +196,7 @@ class DeviceTransferProvider extends ChangeNotifier{ ); print(response.body); - print("${DateTime.now().toIso8601String()}.png|${newModel.signature}"); + print("${newModel.signature}.png"); // response = await post( // Uri.parse("$host${URLs.updateDeviceTransfer}/$requestId"), // body: body, diff --git a/lib/views/pages/user/land_page.dart b/lib/views/pages/user/land_page.dart index 41c4826c..7235ed4c 100644 --- a/lib/views/pages/user/land_page.dart +++ b/lib/views/pages/user/land_page.dart @@ -153,7 +153,7 @@ class _LandPageState extends State { mainAxisSpacing: 12, childAspectRatio: 1, children: [ - if (_userProvider.user.type == UsersTypes.normal_user) + if (_userProvider?.user?.type == UsersTypes.normal_user) LandPageItem( text: _subtitle.newServiceRequest, icon: FontAwesomeIcons.tools, @@ -184,7 +184,7 @@ class _LandPageState extends State { // Navigator.of(context).pushNamed(PreventiveMaintenanceVisitsPage.id); // }, // ), - if (_userProvider.user.type != UsersTypes.engineer) + if (_userProvider?.user != null && _userProvider?.user?.type != UsersTypes.engineer) LandPageItem( text: "Request Gas Refill", icon: FontAwesomeIcons.truckFast,