This commit is contained in:
Loretta 2024-09-02 16:41:13 +02:00
parent b98bbc18be
commit a132bb3949
3 changed files with 14 additions and 10 deletions

View File

@ -142,12 +142,17 @@
}).Forget(); }).Forget();
AdminSignalRClient.GetByIdAsync<List<Company>>(SignalRTags.GetCompaniesById, async response => ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAndOwnerAffiliateIdAsync([Product.ServiceProvider.AffiliateId, Product.Id]);
{
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAndOwnerAffiliateIdAsync([response.ResponseData!.First().AffiliateId, Product.Id]);
StateHasChanged();
}, Product.ServiceProviderId).Forget(); // AdminSignalRClient.GetByIdAsync<Company>(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(); await base.OnInitializedAsync();
} }

View File

@ -274,7 +274,7 @@
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
_logger = new LoggerClient<TransferCardComponent>(LogWriters.ToArray()); _logger = new LoggerClient<TransferCardComponent>(LogWriters.ToArray());
sysAdmins = await AdminSignalRClient.GetByIdAsync<List<UserModelDtoDetail>>(SignalRTags.GetAllUserModelDtoDetails, TiamConstClient.SysAdmins[0]); sysAdmins = (await AdminSignalRClient.GetByIdAsync<List<UserModelDtoDetail>>(SignalRTags.GetAllUserModelDtoDetails, TiamConstClient.SysAdmins[0]))!;
await base.OnInitializedAsync(); await base.OnInitializedAsync();
} }

View File

@ -156,11 +156,10 @@
</div> </div>
</div> </div>
<div class="card-body card-admin-body py-2 px-4"> <div class="card-body card-admin-body py-2 px-4">
@if (Id != null) @if (!Id.IsNullOrEmpty())
{ {
<MessageDetailGridComponent ContextId="@Id"></MessageDetailGridComponent> <MessageDetailGridComponent ContextId="@Id"></MessageDetailGridComponent>
} }
</div> </div>
<div class="card-footer py-2 px-4"> <div class="card-footer py-2 px-4">
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">