merge-requests/23/head
nextwo 3 years ago
parent 7b49f9f40e
commit 2c09cdb7e4

@ -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,

@ -153,7 +153,7 @@ class _LandPageState extends State<LandPage> {
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<LandPage> {
// 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,

Loading…
Cancel
Save