| | 1 | | @inject MUNity.Database.Context.MunityContext context |
| | 2 | |
|
| | 3 | | <div class="col-xl-3 col-lg-4 col-md-4 col-sm-6"> |
| 0 | 4 | | <a @onclick="() => PickOrUnpickThis()" class="table-booking cursor-pointer"> |
| | 5 | | <div class="table-booking-container"> |
| | 6 | | <div class="table-booking-header" style="@UseFlagStyle"> |
| | 7 | | <div style="position: initial; display:block; left: 0; right: 0; top:0; bottom: 0; @UseFlagStyle"></div> |
| | 8 | | <div class="d-flex align-items-center"> |
| | 9 | | <div class="flex-1"> |
| 0 | 10 | | <div class="title fs-16px text-black" style="-webkit-text-stroke-width: 0.5px; -webkit-text-stro |
| 0 | 11 | | <div class="no text-black" style="-webkit-text-stroke-width: 0.5px; -webkit-text-stroke-color: w |
| 0 | 12 | | <div class="desc" style="-webkit-text-stroke-width: 0.5px; -webkit-text-stroke-color: black;">@D |
| | 13 | | </div> |
| | 14 | | @*@if (IsSelected) |
| | 15 | | { |
| | 16 | | <div class="pe-1 text-success"> |
| | 17 | | <svg width="4em" height="4em" viewBox="0 0 16 16" class="bi bi-check2-circle" fill="curr |
| | 18 | | <path fill-rule="evenodd" d="M15.354 2.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l |
| | 19 | | <path fill-rule="evenodd" d="M8 2.5A5.5 5.5 0 1 0 13.5 8a.5.5 0 0 1 1 0 6.5 6.5 0 1 |
| | 20 | | </svg> |
| | 21 | | </div> |
| | 22 | | } |
| | 23 | | else |
| | 24 | | { |
| | 25 | | <div class="text-white"> |
| | 26 | | <svg width="4em" height="4em" viewBox="0 0 16 16" class="bi bi-dash-circle" fill="curren |
| | 27 | | <path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 |
| | 28 | | <path fill-rule="evenodd" d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 |
| | 29 | | </svg> |
| | 30 | | </div> |
| | 31 | | }*@ |
| | 32 | |
|
| 0 | 33 | | @if (SelectionText != null) |
| 0 | 34 | | { |
| | 35 | | <div class="pe-1 text-success text-center"> |
| | 36 | | <svg width="4em" height="4em" viewBox="0 0 16 16" class="bi bi-check2-circle" fill="white" x |
| | 37 | |
|
| | 38 | | </svg> |
| | 39 | |
|
| 0 | 40 | | <span class="badge bg-primary rounded-pill text-white fs-24px">@SelectionText</span> |
| | 41 | | </div> |
| 0 | 42 | | } |
| | 43 | |
|
| | 44 | | </div> |
| | 45 | | </div> |
| | 46 | | <div class="table-booking-body"> |
| 0 | 47 | | @foreach (var role in Delegation.Roles) |
| 0 | 48 | | { |
| | 49 | | <div class="booking"> |
| 0 | 50 | | <div class="time">@role.RoleName</div> |
| 0 | 51 | | <div class="info">@role.CommitteeName</div> |
| 0 | 52 | | <div class="">@role.Costs €</div> |
| | 53 | | </div> |
| 0 | 54 | | } |
| | 55 | | </div> |
| | 56 | | </div> |
| | 57 | |
|
| | 58 | | </a> |
| | 59 | | </div> |
| | 60 | |
|
| | 61 | | @code { |
| | 62 | |
|
| 0 | 63 | | [Parameter] public MUNity.Schema.Conference.ApplicationAvailableDelegation Delegation { get; set; } |
| | 64 | |
|
| 0 | 65 | | [Parameter] public EventCallback<MUNity.Schema.Conference.ApplicationAvailableDelegation> Clicked { get; set; } |
| | 66 | |
|
| 0 | 67 | | [Parameter] public bool IsSelected { get; set; } |
| | 68 | |
|
| 0 | 69 | | [Parameter] public string SelectionText { get; set; } |
| | 70 | |
|
| | 71 | | private void PickOrUnpickThis() |
| 0 | 72 | | { |
| 0 | 73 | | this.Clicked.InvokeAsync(this.Delegation); |
| 0 | 74 | | } |
| | 75 | |
|
| | 76 | | public string UseFlagStyle |
| | 77 | | { |
| | 78 | | get |
| 0 | 79 | | { |
| 0 | 80 | | var flagIso = Delegation.Roles.GroupBy(n => n.CountryIso).Where(n => n.Key != null).Select(a => a.Key).First |
| 0 | 81 | | if (flagIso != null) |
| 0 | 82 | | { |
| 0 | 83 | | @if (SelectionText == null) |
| 0 | 84 | | return $"background: url(/img/flags/medium/{flagIso}.png) #aaa no-repeat center center;background-bl |
| | 85 | | else |
| 0 | 86 | | return $"background: url(/img/flags/medium/{flagIso}.png) #333 no-repeat center center;background-bl |
| | 87 | | } |
| | 88 | |
|
| 0 | 89 | | return null; |
| 0 | 90 | | } |
| | 91 | | } |
| | 92 | | } |