| | 1 | | @using MUNity.BlazorServer.Components.Conference.Dashboard |
| | 2 | |
|
| | 3 | | @page "/c/dashboard/{Id}" |
| | 4 | |
|
| | 5 | | @inject Services.UserConferenceAuthService conferenceAuthService |
| | 6 | | @inject MunityContext dbContext |
| | 7 | |
|
| 0 | 8 | | @if (isTeamMember) |
| 0 | 9 | | { |
| | 10 | | <!-- Title --> |
| | 11 | | <h1 class="page-header"> |
| 0 | 12 | | @dbContext.Conferences.Where(n => n.ConferenceId == Id).Select(n => n.ConferenceShort).FirstOrDefault() |
| 0 | 13 | | <small>@dbContext.Conferences.Where(n => n.ConferenceId == Id).Select(n => n.Name).FirstOrDefault()</small> |
| | 14 | | </h1> |
| | 15 | |
|
| | 16 | | <div class="row"> |
| | 17 | | <!-- BEGIN col-3 --> |
| | 18 | | <div class="col-xl-3 col-md-6"> |
| | 19 | | <div class="widget widget-stats bg-blue"> |
| | 20 | | <div class="stats-icon"><i class="fa fa-desktop"></i></div> |
| | 21 | | <div class="stats-info"> |
| | 22 | | <h4>Gremien</h4> |
| 0 | 23 | | <p>@dbContext.Committees.Count(n => n.Conference.ConferenceId == Id) </p> |
| | 24 | | </div> |
| | 25 | | <div class="stats-link"> |
| | 26 | | <a href="/c/managecommittees/@Id">Gremien und Themen bearbeiten <i class="fa fa-arrow-alt-circle-rig |
| | 27 | | </div> |
| | 28 | | </div> |
| | 29 | | </div> |
| | 30 | | <!-- END col-3 --> |
| | 31 | | <!-- BEGIN col-3 --> |
| | 32 | | <div class="col-xl-3 col-md-6"> |
| | 33 | | <div class="widget widget-stats bg-info"> |
| | 34 | | <div class="stats-icon"><i class="fa fa-link"></i></div> |
| | 35 | | <div class="stats-info"> |
| | 36 | | <h4>Rollen</h4> |
| 0 | 37 | | <p>@dbContext.Conferences.Where(n => n.ConferenceId == Id).Select(n => n.Roles.Count).FirstOrDefault |
| | 38 | | </div> |
| | 39 | | <div class="stats-link"> |
| | 40 | | <a href="javascript:;">Rollen bearbeiten <i class="fa fa-arrow-alt-circle-right"></i></a> |
| | 41 | | </div> |
| | 42 | | </div> |
| | 43 | | </div> |
| | 44 | | <!-- END col-3 --> |
| | 45 | | <!-- BEGIN col-3 --> |
| | 46 | | <div class="col-xl-3 col-md-6"> |
| | 47 | | <div class="widget widget-stats bg-orange"> |
| | 48 | | <div class="stats-icon"><i class="fa fa-users"></i></div> |
| | 49 | | <div class="stats-info"> |
| | 50 | | <h4>Delegationen</h4> |
| 0 | 51 | | <p>@dbContext.Delegations.Count(n => n.Conference.ConferenceId == Id) </p> |
| | 52 | | </div> |
| | 53 | | <div class="stats-link"> |
| | 54 | | <a href="/c/managedelegations/@Id">Delegationen bearbeiten <i class="fa fa-arrow-alt-circle-right">< |
| | 55 | | </div> |
| | 56 | | </div> |
| | 57 | | </div> |
| | 58 | | <!-- END col-3 --> |
| | 59 | | <!-- BEGIN col-3 --> |
| | 60 | | <div class="col-xl-3 col-md-6"> |
| | 61 | | <div class="widget widget-stats bg-red"> |
| | 62 | | <div class="stats-icon"><i class="fa fa-clock"></i></div> |
| | 63 | | <div class="stats-info"> |
| | 64 | | <h4>TODO</h4> |
| | 65 | | <p>00:12:23</p> |
| | 66 | | </div> |
| | 67 | | <div class="stats-link"> |
| | 68 | | <a href="javascript:;">View Detail <i class="fa fa-arrow-alt-circle-right"></i></a> |
| | 69 | | </div> |
| | 70 | | </div> |
| | 71 | | </div> |
| | 72 | | <!-- END col-3 --> |
| | 73 | |
|
| | 74 | | <div class="col-xl-4 col-lg-6"> |
| | 75 | | <TeamCardComponent ConferenceId=@this.Id /> |
| | 76 | | </div> |
| | 77 | |
|
| | 78 | | <div class="col-3"> |
| | 79 | | <RepresentedCountriesComponent ConferenceId=@this.Id /> |
| | 80 | | </div> |
| | 81 | | </div> |
| | 82 | |
|
| | 83 | | <div class="d-flex flex-wrap"> |
| | 84 | | <a class="btn btn-primary me-1 mb-1" href="/c/manageroles/@Id">Teilnehmenden-Rollen bearbeiten</a> |
| | 85 | | <a class="btn btn-primary me-1 mb-1" href="/c/manageapplications/@Id">Bewerbungen/Anmeldungen</a> |
| | 86 | | <a class="btn btn-primary me-1 mb-1" href="/c/managewebsite/@Id">Website bearbeiten</a> |
| | 87 | | </div> |
| 0 | 88 | | } |
| | 89 | | else |
| 0 | 90 | | { |
| | 91 | | <p>Zugriff verweigert!</p> |
| 0 | 92 | | } |
| | 93 | |
|
| | 94 | |
|
| | 95 | |
|
| | 96 | | @code { |
| 0 | 97 | | [Parameter] public string Id { get; set; } |
| | 98 | |
|
| 0 | 99 | | [CascadingParameter] public Task<AuthenticationState> AuthStateTask { get; set; } |
| | 100 | |
|
| | 101 | | private bool isTeamMember; |
| | 102 | |
|
| | 103 | | protected override async Task OnInitializedAsync() |
| 0 | 104 | | { |
| 0 | 105 | | await base.OnInitializedAsync(); |
| 0 | 106 | | var claim = (await AuthStateTask)?.User; |
| 0 | 107 | | this.isTeamMember = await conferenceAuthService.IsUserTeamMember(Id, claim); |
| 0 | 108 | | } |
| | 109 | | } |