| | | 1 | | @page "/c/manageapplications/{Id}/{Tab1}/{Tab2}" |
| | | 2 | | @page "/c/manageapplications/{Id}/{Tab1}" |
| | | 3 | | @page "/c/manageapplications/{Id}" |
| | | 4 | | @page "/c/manageapplications/{Id}/application/{ApplicationId}" |
| | | 5 | | |
| | | 6 | | @inject NavigationManager navManager |
| | | 7 | | |
| | | 8 | | <div class="panel panel-default panel-with-tabs" data-sortable-id="ui-widget-10" data-init="true"> |
| | | 9 | | <div class="panel-heading ui-sortable-handle"> |
| | | 10 | | <h4 class="panel-title">Anmeldephase</h4> |
| | | 11 | | <ul class="nav nav-tabs"> |
| | 0 | 12 | | <li class="nav-item"><a @onclick="() => mode = Modes.General" class="nav-link @((mode == Modes.General) ? "a |
| | 0 | 13 | | <li class="nav-item"><a @onclick="() => mode = Modes.Roles" class="nav-link @((mode == Modes.Roles) ? "activ |
| | 0 | 14 | | <li class="nav-item"><a @onclick="() => mode = Modes.Page" class="nav-link @((mode == Modes.Page) ? "active" |
| | 0 | 15 | | <li class="nav-item"><a @onclick="() => mode = Modes.Invoice" class="nav-link @((mode == Modes.Invoice) ? "a |
| | | 16 | | </ul> |
| | | 17 | | </div> |
| | | 18 | | <div class="panel-body"> |
| | 0 | 19 | | @if (mode == Modes.General) |
| | 0 | 20 | | { |
| | | 21 | | <MUNity.BlazorServer.Components.Conference.ManageApplicationSettings ConferenceId="@Id" /> |
| | 0 | 22 | | } |
| | 0 | 23 | | else if (mode == Modes.Roles) |
| | 0 | 24 | | { |
| | | 25 | | |
| | 0 | 26 | | } |
| | 0 | 27 | | else if (mode == Modes.Page) |
| | 0 | 28 | | { |
| | | 29 | | <MUNity.BlazorServer.Components.Conference.ManageApplicationFormula ConferenceId="@Id" /> |
| | 0 | 30 | | } |
| | 0 | 31 | | else if (mode == Modes.Invoice) |
| | 0 | 32 | | { |
| | | 33 | | <MUNity.BlazorServer.Components.Conference.ApplicationInvoice ConferenceId="@Id" |
| | | 34 | | SelectedApplication="@selectedApplication"/> |
| | 0 | 35 | | } |
| | | 36 | | </div> |
| | | 37 | | </div> |
| | | 38 | | |
| | | 39 | | |
| | | 40 | | |
| | | 41 | | @code { |
| | 0 | 42 | | [Parameter] public string Id { get; set; } |
| | | 43 | | |
| | 0 | 44 | | [Parameter] public string Tab1 { get; set; } |
| | | 45 | | |
| | 0 | 46 | | [Parameter] public string Tab2 { get; set; } |
| | | 47 | | |
| | 0 | 48 | | [Parameter] public string ApplicationId { get; set; } |
| | | 49 | | |
| | 0 | 50 | | private int? selectedApplication { get; set; } |
| | | 51 | | |
| | | 52 | | private enum Modes |
| | | 53 | | { |
| | | 54 | | General, |
| | | 55 | | Roles, |
| | | 56 | | Page, |
| | | 57 | | Invoice |
| | | 58 | | } |
| | | 59 | | |
| | | 60 | | private Modes _mode; |
| | | 61 | | private Modes mode |
| | | 62 | | { |
| | 0 | 63 | | get => _mode; |
| | | 64 | | set |
| | 0 | 65 | | { |
| | 0 | 66 | | if (_mode == value) return; |
| | 0 | 67 | | _mode = value; |
| | | 68 | | // TODO: Set Uri |
| | 0 | 69 | | } |
| | | 70 | | } |
| | | 71 | | |
| | | 72 | | protected override void OnInitialized() |
| | 0 | 73 | | { |
| | 0 | 74 | | base.OnInitialized(); |
| | | 75 | | |
| | 0 | 76 | | if (Tab1 != null) |
| | 0 | 77 | | { |
| | 0 | 78 | | if (Tab1.ToLower() == "general") |
| | 0 | 79 | | mode = Modes.General; |
| | 0 | 80 | | else if (Tab1.ToLower() == "roles") |
| | 0 | 81 | | mode = Modes.Roles; |
| | 0 | 82 | | else if (Tab1.ToLower() == "formula") |
| | 0 | 83 | | mode = Modes.Page; |
| | 0 | 84 | | else if (Tab1.ToLower() == "invoice") |
| | 0 | 85 | | mode = Modes.Invoice; |
| | 0 | 86 | | } |
| | | 87 | | |
| | 0 | 88 | | if (ApplicationId != null) |
| | 0 | 89 | | { |
| | 0 | 90 | | if (int.TryParse(ApplicationId, out int appId)) |
| | 0 | 91 | | { |
| | 0 | 92 | | mode = Modes.Invoice; |
| | 0 | 93 | | selectedApplication = appId; |
| | 0 | 94 | | InvokeAsync(StateHasChanged); |
| | 0 | 95 | | } |
| | 0 | 96 | | } |
| | 0 | 97 | | } |
| | | 98 | | } |