From a132bb39493d1487bfc0d65373239ebe267cc5d4 Mon Sep 17 00:00:00 2001 From: Loretta Date: Mon, 2 Sep 2024 16:41:13 +0200 Subject: [PATCH] fixes --- .../CardComponents/ProductCardComponent.razor | 15 ++++++++++----- .../CardComponents/TransferCardComponent.razor | 2 +- .../Pages/User/Hotels/HotelComponent.razor | 7 +++---- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/TIAMSharedUI/Pages/User/CardComponents/ProductCardComponent.razor b/TIAMSharedUI/Pages/User/CardComponents/ProductCardComponent.razor index ef24f31a..54f2550e 100644 --- a/TIAMSharedUI/Pages/User/CardComponents/ProductCardComponent.razor +++ b/TIAMSharedUI/Pages/User/CardComponents/ProductCardComponent.razor @@ -142,12 +142,17 @@ }).Forget(); - AdminSignalRClient.GetByIdAsync>(SignalRTags.GetCompaniesById, async response => - { - ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAndOwnerAffiliateIdAsync([response.ResponseData!.First().AffiliateId, Product.Id]); - StateHasChanged(); + ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAndOwnerAffiliateIdAsync([Product.ServiceProvider.AffiliateId, Product.Id]); - }, Product.ServiceProviderId).Forget(); + // AdminSignalRClient.GetByIdAsync(SignalRTags.GetCompany, async response => + // { + // if (Product.ServiceProvider.AffiliateId != response.ResponseData!.AffiliateId) + // throw new Exception($"Product.ServiceProvider.AffiliateId != response.ResponseData!.AffiliateId"); + + // ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAndOwnerAffiliateIdAsync([response.ResponseData!.AffiliateId, Product.Id]); + // StateHasChanged(); + + // }, Product.ServiceProviderId).Forget(); await base.OnInitializedAsync(); } diff --git a/TIAMSharedUI/Pages/User/CardComponents/TransferCardComponent.razor b/TIAMSharedUI/Pages/User/CardComponents/TransferCardComponent.razor index 2e16e3f0..522e9301 100644 --- a/TIAMSharedUI/Pages/User/CardComponents/TransferCardComponent.razor +++ b/TIAMSharedUI/Pages/User/CardComponents/TransferCardComponent.razor @@ -274,7 +274,7 @@ protected override async Task OnInitializedAsync() { _logger = new LoggerClient(LogWriters.ToArray()); - sysAdmins = await AdminSignalRClient.GetByIdAsync>(SignalRTags.GetAllUserModelDtoDetails, TiamConstClient.SysAdmins[0]); + sysAdmins = (await AdminSignalRClient.GetByIdAsync>(SignalRTags.GetAllUserModelDtoDetails, TiamConstClient.SysAdmins[0]))!; await base.OnInitializedAsync(); } diff --git a/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor b/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor index c8c85b75..597c7362 100644 --- a/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor +++ b/TIAMSharedUI/Pages/User/Hotels/HotelComponent.razor @@ -156,11 +156,10 @@
- @if (Id != null) -{ + @if (!Id.IsNullOrEmpty()) + { -} - + }