| | 1 | | @using MUNity.Schema.Conference |
| | 2 | |
|
| | 3 | | @inject Services.ConferenceApplicationService applicationService |
| | 4 | |
|
| | 5 | | <div class="panel panel-inverse" data-sortable-id="form-stuff-1"> |
| | 6 | | <!-- BEGIN panel-heading --> |
| | 7 | | <div class="panel-heading ui-sortable-handle"> |
| | 8 | | <h4 class="panel-title">Bewerbung</h4> |
| | 9 | | </div> |
| | 10 | | <!-- END panel-heading --> |
| | 11 | | <!-- BEGIN panel-body --> |
| | 12 | | <div class="panel-body"> |
| 0 | 13 | | @if (this.userState != null) |
| 0 | 14 | | { |
| 0 | 15 | | @if (this.userState.Status == FindUserForApplicationResult.ResultStatuses.CanBeAdded) |
| 0 | 16 | | { |
| | 17 | | <ConferenceApplicationProcessComponent ConferenceId="@ConferenceId" /> |
| 0 | 18 | | } |
| 0 | 19 | | else if (this.userState.Status == FindUserForApplicationResult.ResultStatuses.AlreadyApplying) |
| 0 | 20 | | { |
| | 21 | | <div class="row"> |
| | 22 | | <div class="alert alert-info"> |
| 0 | 23 | | <h4>Hallo @this.userState.ForeName @this.userState.LastName</h4> |
| | 24 | | <p> |
| | 25 | | Sie bewerben sich bereits auf diese Konferenz. Möglicherweise haben Sie diese Bewerbung nich |
| | 26 | | Falls Sie mehr dazu sehen wollen öffnen Sie <a href="/myapplications">Meine Bewerbungen</a> |
| | 27 | | </p> |
| | 28 | | </div> |
| | 29 | | </div> |
| 0 | 30 | | } |
| 0 | 31 | | else if (this.userState.Status == FindUserForApplicationResult.ResultStatuses.AlreadyParticipating) |
| 0 | 32 | | { |
| | 33 | | <div class="row"> |
| | 34 | | <div class="alert alert-info"> |
| 0 | 35 | | <h4>Hallo @this.userState.ForeName @this.userState.LastName</h4> |
| | 36 | | <p> |
| | 37 | | Sie nehmen bereits an dieser Konferenz teil. Dadurch ist eine Bewerbung für Sie nicht mehr m |
| | 38 | | </p> |
| | 39 | | </div> |
| | 40 | | </div> |
| 0 | 41 | | } |
| 0 | 42 | | } |
| | 43 | | </div> |
| | 44 | | </div> |
| | 45 | | @code { |
| 0 | 46 | | [Parameter] public string ConferenceId { get; set; } |
| | 47 | |
|
| 0 | 48 | | [CascadingParameter] public Task<AuthenticationState> AuthState { get; set; } |
| | 49 | |
|
| | 50 | | private FindUserForApplicationResult userState; |
| | 51 | |
|
| | 52 | | protected override async Task OnInitializedAsync() |
| 0 | 53 | | { |
| 0 | 54 | | await base.OnInitializedAsync(); |
| 0 | 55 | | var claim = (await AuthState)?.User; |
| 0 | 56 | | userState = this.applicationService.FindUserToAddToDelegationApplication(claim.Identity.Name, ConferenceId); |
| 0 | 57 | | } |
| | 58 | | } |