signature fixes

main_design2.0
Sikander Saleem 2 years ago
parent 8ada0dd0af
commit b8051a40fe

@ -12,7 +12,7 @@ class URLs {
set host(String value) => _host = value;
static String getFileUrl(String file) => file == null || file.isEmpty ? null : "$_host/attachment/$file";
static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/attachment/$file");
// API Routes
static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // post
@ -36,8 +36,11 @@ class URLs {
static get getRepairLocation => "$_baseUrl/Lookups/GetLookup?lookupEnum=504";
static get equipmentStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=601";
static get getDateOperators => "$_baseUrl/Lookups/GetLookup?lookupEnum=200";
static get getMaintenanceSituation => "$_baseUrl/Lookups/GetLookup?lookupEnum=502";
static get getAllUsers => "http://109.123.243.118:5000/api/Account/GetAllUsers";
static get getPreventiveMaintenanceVisits => "$_baseUrl/return/user/calibrations"; // get

@ -181,7 +181,7 @@ class DeviceTransferProvider extends ChangeNotifier {
"senderStartDate": newModel.timer?.startAt?.toIso8601String(),
"senderEndDate": newModel.timer?.endAt?.toIso8601String(),
"senderTravelingHours": newModel.travelingHours,
"senderAttachmentName": "${newModel.signature}.png",
"senderAttachmentName": newModel?.signature ?? "",
"destSiteId": oldModel.receiver.client.id,
"destDepartmentId": oldModel.receiver.department.id,
"receiverAssignedEmployeeId": oldModel.receiver.userId,
@ -191,7 +191,7 @@ class DeviceTransferProvider extends ChangeNotifier {
"receiverStartDate": oldModel.receiver.timer?.startAt?.toIso8601String(),
"receiverEndDate": oldModel.receiver.timer?.endAt?.toIso8601String(),
"receiverTravelingHours": oldModel.receiver.travelingHours,
"receiverAttachmentName": "${oldModel.receiver.signature}.png",
"receiverAttachmentName": oldModel.receiver?.signature ?? "",
});
} else {
body.addAll({
@ -204,7 +204,7 @@ class DeviceTransferProvider extends ChangeNotifier {
"senderStartDate": oldModel.sender.timer?.startAt?.toIso8601String(),
"senderEndDate": oldModel.sender.timer?.endAt?.toIso8601String(),
"senderTravelingHours": oldModel.sender.travelingHours,
"senderAttachmentName": "${oldModel.sender.signature}.png",
"senderAttachmentName": oldModel.sender?.signature ?? "",
"destSiteId": newModel.client.id,
"destDepartmentId": newModel.department.id,
"receiverAssignedEmployeeId": newModel.userId,
@ -214,11 +214,11 @@ class DeviceTransferProvider extends ChangeNotifier {
"receiverStartDate": newModel.timer?.startAt?.toIso8601String(),
"receiverEndDate": newModel.timer?.endAt?.toIso8601String(),
"receiverTravelingHours": newModel.travelingHours,
"receiverAttachmentName": "${newModel.signature}.png",
"receiverAttachmentName": newModel?.signature ?? "",
});
}
body.addAll(newModel.toJson(isSender));
//body.addAll(newModel.toJson(isSender));
print(body);
Response response;
try {

@ -202,7 +202,9 @@ class _UpdateDeviceTransferState extends State<UpdateDeviceTransfer> {
onSaved: (signature) {
_signature = signature;
if (signature == null || signature.isEmpty) return;
_formModel.signature = base64Encode(signature);
_formModel.signature =
"${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
// base64Encode(signature);
},
),
Padding(

@ -194,8 +194,8 @@ class RequestDetailsPage extends StatelessWidget {
info: serviceRequest.deviceNumber,
),
RequestInfoRow(
title: _subtitle.deviceSN,
info: serviceRequest.deviceSerialNumber,
title: _subtitle.assetName,
info: serviceRequest.deviceEnName,
),
RequestInfoRow(
title: _subtitle.deviceModel,

@ -18,6 +18,7 @@ class DeviceTransferInfoSection extends StatelessWidget {
Widget build(BuildContext context) {
info.userName = Provider.of<UserProvider>(context).user.username;
final subtitle = AppLocalization.of(context).subtitle;
print("url:${info.signature}");
return Column(
children: [
RequestInfoRow(

Loading…
Cancel
Save