@@ -45,7 +42,6 @@
Information
-
@RenderDetailsItem("fa-solid fa-user", "Contact Name", productProfile.FullName)
@RenderDetailsItem("fa-solid fa-circle-info", "Description", Context.Description)
@@ -59,18 +55,12 @@
Use this link to send it in an email to the client
@_url
- //
Copy referral url
-
}
}
-
-
-
-
-
-
+
+
@@ -89,15 +79,11 @@
@{
-
if (!isAddressTransferDestination)
{
- //
Address:
- //
@(((Product)context.DataItem).Profile.Address.AddressText)
}
}
-
@@ -114,6 +100,15 @@
alert('Could not copy text: ' + err);
});
}
+
+ function downloadImage(base64String, filename) {
+ const link = document.createElement('a');
+ link.href = base64String;
+ link.download = filename;
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }
@code {
@@ -126,17 +121,21 @@
AccordionExpandCollapseAction ExpandCollapseAction { get; set; } = AccordionExpandCollapseAction.HeaderClick;
private Profile productProfile = new Profile();
- private List
destinations = [];
+ private List destinations = new List();
string msg;
private bool isSaveActive = false;
private bool isAddressTransferDestination = false;
private async Task CopyUrl(string url)
{
-
await JsRuntime.InvokeVoidAsync("copyToClipboard", url);
}
+ private async Task DownloadImage()
+ {
+ await JsRuntime.InvokeVoidAsync("downloadImage", $"data:image/png;base64,{ImageSource}", "QRCode.jpg");
+ }
+
protected override async Task OnInitializedAsync()
{
var productOwner = await AdminSignalRClient.GetByIdAsync>(SignalRTags.GetCompaniesById, Context.ServiceProviderId);
@@ -158,7 +157,6 @@
protected override async Task OnParametersSetAsync()
{
-
await base.OnParametersSetAsync();
}
@@ -177,8 +175,6 @@
private bool CheckDestinations(Guid addressId)
{
-
-
if (destinations != null)
{
if (destinations.Any(d => d.AddressId == addressId))
@@ -194,7 +190,6 @@
{
return false;
}
-
}
private async Task SaveAsDestination(Address address, Product product)
@@ -212,7 +207,7 @@
}
transferDestination.AddressId = address.Id;
transferDestination.AddressString = address.AddressText;
- var result = await AdminSignalRClient.PostDataAsync(SignalRTags.CreateTransferDestination, transferDestination);
+ var result = await AdminSignalRClient.PostDataAsync(SignalRTags.CreateTransferDestination, transferDestination);
await InvokeAsync(StateHasChanged);
}
}
diff --git a/TIAMSharedUI/Shared/Components/BaseComponents/UserBasePageComponent.cs b/TIAMSharedUI/Shared/Components/BaseComponents/UserBasePageComponent.cs
index d6e07503..b3a52997 100644
--- a/TIAMSharedUI/Shared/Components/BaseComponents/UserBasePageComponent.cs
+++ b/TIAMSharedUI/Shared/Components/BaseComponents/UserBasePageComponent.cs
@@ -30,9 +30,7 @@ namespace TIAMSharedUI.Shared.Components.BaseComponents
{
base.OnInitialized();
_logger = new LoggerClient(_logWriters.ToArray());
- var currentUrl = _navManager.ToBaseRelativePath(_navManager.Uri);
- _pageState.AddPageToHistory(currentUrl);
- _logger.Debug(_pageState.GetGoBackPage());
+
}
}
}