From 176109abdd970c0ba6a99a18a452e0dbd8e80853 Mon Sep 17 00:00:00 2001 From: shakun Date: Fri, 17 Nov 2023 11:50:30 +0545 Subject: [PATCH] customer profile layout change of js and moible format change --- .../Controllers/CustomerDocumentController.cs | 3 +- .../Views/Customer/CustomerProfile.cshtml | 42 +- .../Views/ReceiverInformation/Receiver.cshtml | 791 +++++++++--------- .../Views/Shared/_Layout2.cshtml | 20 +- 4 files changed, 432 insertions(+), 424 deletions(-) diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs index 3237a36..43bfbd6 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs +++ b/CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerDocumentController.cs @@ -89,11 +89,10 @@ namespace CustomerOnlineV2.Controllers var cd= await _business.GetCustomerImageSavePath(loginDetails.Email); - doc.fileName = SaveFileToPath(MyUploader, cd.Id, Path.GetExtension(MyUploader.FileName), MyUploader.FileName, cd.Extra1); + doc.IdType = doc.fileType; doc.fileType = MyUploader.ContentType; - //ReceiverInformationModel _response = new ReceiverInformationModel(); var Document = await _business.AddCustomerDocument(doc, loginDetails.UserId, loginDetails.Email); diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml index 7be3c12..077e668 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerProfile.cshtml @@ -354,7 +354,7 @@
- +
@@ -363,7 +363,7 @@
- +
@@ -732,10 +732,12 @@ $("#btnUpload").on('click', function () { let idtype = $('#primary-IdType').val(); - FileUpload(idtype, '11394', 'ID_Front', 'IdFrontUpload'); - FileUpload(idtype, '11395', 'ID_Back', 'IdBackUpload'); + FileUpload(idtype, '11394', 'ID_Front', 'IdFrontFileUpload','N'); + debugger; + FileUpload(idtype, '11395', 'ID_Back', 'IdBackFileUpload', 'N'); + clearUploads(); ShowAlertMessage("0", "Document uploaded successfully.", "CustomerProfile"); }); @@ -744,9 +746,24 @@ let idtype = $('#Add-IdType').val(); FileUpload(idtype, '11396', 'Additional_ID_Front', 'add_idUpload', 'Y'); - + clearUploads(); }); + function clearUploads() + { + $('.loadImg').remove(); + $('.loadImg1').remove(); + $('.loadImg3').remove(); + + $('#primary-IdType').val(''); + $('#Add-IdType').val(''); + $('#IdFrontUpload').val(''); + $('#IdBackUpload').val(''); + $('#add_idUpload').val(''); + + $('#edit-doc-details').modal('hide'); + $('#edit-doc-details1').modal('hide'); + } function FileUpload(idtype, documentType, desc, id, alert) { const formData = new FormData(); @@ -773,22 +790,11 @@ success: function (response) { if (response.responseCode != 0) { - ShowAlertMessageErrorOnly(data, response.responseMessage); + ShowAlertMessageErrorOnly(1, response.responseMessage); return false; } - $('.loadImg').remove(); - $('.loadImg1').remove(); - $('.loadImg3').remove(); - - $('#primary-IdType').val(''); - $('#Add-IdType').val(''); - $('#IdFrontUpload').val(''); - $('#IdBackUpload').val(''); - $('#add_idUpload').val(''); - - $('#edit-doc-details').modal('hide'); - $('#edit-doc-details1').modal('hide'); + if (alert === 'Y') ShowAlertMessage("0", "Document uploaded successfully.", "CustomerProfile"); diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml index 093bc60..7de1654 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/ReceiverInformation/Receiver.cshtml @@ -13,9 +13,8 @@ @* *@ - - - + @* *@ + @* *@ + + + + + + + + + + @{ @@ -160,15 +170,7 @@ *@ - - - - - - - - - +