cardcompnents basics

This commit is contained in:
Adam 2024-07-01 11:53:48 +02:00
parent add3685a59
commit efb11d8525
5 changed files with 128 additions and 1 deletions

View File

@ -0,0 +1,64 @@
@using BlazorAnimation
@using TIAMWebApp.Shared.Application.Interfaces
@inject IServiceProviderDataService ServiceProviderDataService
<div class=" col-12 col-xl-3">
<Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
<div class="card glass card-admin" style="border-radius: 16px;">
<div class="card-header py-2 px-4">
<div class="d-flex justify-content-between align-items-center">
<div>
<span class="fw-bold text-body">Hotel details</span>
</div>
<div>
<!--h6 class="mb-0"> <a href="#">All settings</a> </h6-->
</div>
</div>
</div>
<div class="card-body card-admin-body py-2 px-4">
<div class="d-flex flex-row mb-4 pb-2">
<div class="flex-fill">
<h4 class="bold">Your QR code</h4>
<p class="text-muted"> Use this in printed material, to gain referrals</p>
</div>
<div>
<a href="api/pictures/1" download="data:image/png;base64,@ImageSource" target="_top">
<img class="align-self-center img-fluid"
src="data:image/png;base64,@ImageSource" width="128" />
</a>
</div>
</div>
<div class="d-flex flex-column mb-4 pb-2">
<h4> Hotel name: <span class="small text-muted"> Example hotel </span></h4>
<h4> Address: <span class="small text-muted"> Budapest, Minta u. 46 </span></h4>
<h4> Phone number: <span class="small text-muted"> +36 1 123 4567</span></h4>
</div>
</div>
<div class="card-footer py-2 px-4">
<div class="d-flex justify-content-between">
<a href="#!">Modify</a>
<div class="border-start h-100"></div>
</div>
</div>
</div>
</Animation>
</div>
@code {
[Parameter] public Guid ContextID { get; set; }
public string ImageSource { get; set; } = "";
protected override async Task OnInitializedAsync()
{
ImageSource = await ServiceProviderDataService.GetQRCodeByProductIdAsync(Guid.NewGuid());
await base.OnInitializedAsync();
}
}

View File

@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Components;
using TIAM.Entities.Addresses;
using TIAM.Entities.Transfers;
using TIAM.Services;
namespace TIAMSharedUI.Shared.Components.Grids;
public class AddressCard : TiamGrid<Address>
{
public AddressCard() : base()
{
GetAllMessageTag = SignalRTags.GetAddressesByContextId;
//AddMessageTag = SignalRTags.AddAddress;
UpdateMessageTag = SignalRTags.UpdateAddress;
//RemoveMessageTag = SignalRTags.RemoveAddress; - nem törlünk címet - J.
}
protected override Task SetParametersAsyncCore(ParameterView parameters)
{
if (!IsFirstInitializeParameters)
{
//ShowFilterRow = true;
//ShowGroupPanel = true;
//AllowSort = false;
//etc...
}
return base.SetParametersAsyncCore(parameters);
}
}

View File

@ -0,0 +1,31 @@
using Microsoft.AspNetCore.Components;
using TIAM.Entities.Addresses;
using TIAM.Entities.Transfers;
using TIAM.Services;
namespace TIAMSharedUI.Shared.Components.Grids;
public class TransferCard : TiamGrid<Address>
{
public TransferCard() : base()
{
GetAllMessageTag = SignalRTags.GetTransfers;
//AddMessageTag = SignalRTags.AddAddress;
UpdateMessageTag = SignalRTags.UpdateAddress;
//RemoveMessageTag = SignalRTags.RemoveAddress; - nem törlünk címet - J.
}
protected override Task SetParametersAsyncCore(ParameterView parameters)
{
if (!IsFirstInitializeParameters)
{
//ShowFilterRow = true;
//ShowGroupPanel = true;
//AllowSort = false;
//etc...
}
return base.SetParametersAsyncCore(parameters);
}
}

View File

@ -71,6 +71,7 @@
<ItemGroup>
<Folder Include="Pages\User\Guides\" />
<Folder Include="Pages\User\Drivers\" />
</ItemGroup>
<ItemGroup>

View File

@ -50,7 +50,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TIAM.Services.Server.Tests"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TIAM.Models.Server", "TIAM.Models.Server\TIAM.Models.Server.csproj", "{D21032B0-B25F-495E-B784-1D3166FE720C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tiam.Services.Client.Tests", "Tiam.Services.Client.Tests\Tiam.Services.Client.Tests.csproj", "{EF40BC68-945A-47ED-8739-2D0BCD415019}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tiam.Services.Client.Tests", "Tiam.Services.Client.Tests\Tiam.Services.Client.Tests.csproj", "{EF40BC68-945A-47ED-8739-2D0BCD415019}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution