| | 1 | | @using MUNity.Base |
| | 2 | | @using Microsoft.EntityFrameworkCore |
| | 3 | |
|
| | 4 | | @inject MUNity.Database.Context.MunityContext context |
| | 5 | |
|
| 0 | 6 | | @if (application != null) |
| 0 | 7 | | { |
| | 8 | | <div class="mailbox-content-header"> |
| | 9 | | <div class="btn-toolbar"> |
| | 10 | | <div class="btn-group me-2"> |
| | 11 | | <a href="javascript:;" class="btn btn-white btn-sm"><i class="fa fa-fw fa-reply"></i> <span class="d-non |
| | 12 | | </div> |
| | 13 | | <div class="btn-group me-2"> |
| | 14 | | <a href="javascript:;" class="btn btn-white btn-sm"><i class="fa fa-fw fa-trash"></i> <span class="d-non |
| | 15 | | <a href="javascript:;" class="btn btn-white btn-sm"><i class="fa fa-fw fa-archive"></i> <span class="d-n |
| | 16 | | </div> |
| | 17 | | <div class="btn-group ms-auto me-2"> |
| | 18 | | <a href="email_inbox.html" class="btn btn-white btn-sm disabled"><i class="fa fa-fw fa-arrow-up"></i></a |
| | 19 | | <a href="email_inbox.html" class="btn btn-white btn-sm"><i class="fa fa-fw fa-arrow-down"></i></a> |
| | 20 | | </div> |
| | 21 | | <div class="btn-group"> |
| | 22 | | <a href="email_inbox.html" class="btn btn-white btn-sm"><i class="fa fa-fw fa-times"></i></a> |
| | 23 | | </div> |
| | 24 | | </div> |
| | 25 | | </div> |
| | 26 | | <div class="mailbox-content-body"> |
| | 27 | | <!-- BEGIN scrollbar --> |
| | 28 | | <div data-scrollbar="true" data-height="100%" data-skip-mobile="true" class="ps" data-init="true" style="height: |
| | 29 | | <div class="p-3"> |
| | 30 | | <h3 class="mb-3">Bewerbung</h3> |
| | 31 | | <div class="d-flex mb-3"> |
| | 32 | | <div class="ps-3"> |
| | 33 | | <div class="email-from text-inverse fs-14px mb-3px fw-bold"> |
| | 34 | | Status |
| 0 | 35 | | @if (application.Status == ApplicationStatuses.Accepted) |
| 0 | 36 | | { |
| | 37 | | <span class="text-success">Angenommen</span> |
| 0 | 38 | | } |
| 0 | 39 | | else if (application.Status == ApplicationStatuses.Denied) |
| 0 | 40 | | { |
| | 41 | | <span class="text-danger">Abgelehnt</span> |
| 0 | 42 | | } |
| 0 | 43 | | else if (application.Status == ApplicationStatuses.Pending) |
| 0 | 44 | | { |
| | 45 | | <span class="text-primary">Ausstehend</span> |
| 0 | 46 | | } |
| 0 | 47 | | else if (application.Status == ApplicationStatuses.Writing) |
| 0 | 48 | | { |
| | 49 | | <span class="text-warning">Noch nicht abgeschickt</span> |
| 0 | 50 | | } |
| | 51 | | </div> |
| 0 | 52 | | <div class="mb-3px"><i class="fa fa-clock fa-fw"></i> @application.ApplyDate.ToLongDateString() |
| | 53 | | <div class="email-to"> |
| 0 | 54 | | @if (application.Users != null) |
| 0 | 55 | | { |
| 0 | 56 | | @string.Join(", ", application.Users.Where(n => n.CanWrite == true).Select(n => $"{n.Use |
| | 57 | |
|
| 0 | 58 | | } |
| | 59 | | else |
| 0 | 60 | | { |
| | 61 | | <span class="text-warning">Fehler beim Laden der Benutzer</span> |
| 0 | 62 | | } |
| | 63 | | </div> |
| | 64 | | </div> |
| | 65 | | </div> |
| | 66 | | <hr class="bg-gray-500"> |
| | 67 | | <ul class="attached-document clearfix"> |
| | 68 | | <li class="fa-file"> |
| | 69 | | <div class="document-file"> |
| | 70 | | <a href="javascript:;"> |
| | 71 | | <i class="fa fa-file-pdf"></i> |
| | 72 | | </a> |
| | 73 | | </div> |
| | 74 | | <div class="document-name"><a href="javascript:;" class="text-decoration-none">flight_ticket.pdf |
| | 75 | | </li> |
| | 76 | | <li class="fa-camera"> |
| | 77 | | <div class="document-file"> |
| | 78 | | <a href="javascript:;"> |
| | 79 | | <img src="../assets/img/gallery/gallery-11.jpg" alt=""> |
| | 80 | | </a> |
| | 81 | | </div> |
| | 82 | | <div class="document-name"><a href="javascript:;" class="text-decoration-none">front_end_mockup. |
| | 83 | | </li> |
| | 84 | | </ul> |
| | 85 | |
|
| | 86 | | <h4>Benutzer</h4> |
| | 87 | | <ul class="text-inverse"> |
| 0 | 88 | | @foreach (var userInApplication in application.Users) |
| 0 | 89 | | { |
| | 90 | | <li> |
| 0 | 91 | | @userInApplication.User.Forename @userInApplication.User.Lastname |
| 0 | 92 | | @if (userInApplication.Status == DelegationApplicationUserEntryStatuses.Joined) |
| 0 | 93 | | { |
| | 94 | | <div class="badge badge-primary">Beigetreten</div> |
| 0 | 95 | | } |
| 0 | 96 | | else if (userInApplication.Status == DelegationApplicationUserEntryStatuses.RequestJoining) |
| 0 | 97 | | { |
| | 98 | | <div class="badge badge-secondary">Möchte an Bewerbung teilnehmen</div> |
| 0 | 99 | | } |
| | 100 | | </li> |
| 0 | 101 | | } |
| | 102 | | </ul> |
| | 103 | |
|
| | 104 | | <h4>Gewünschte Delegationen</h4> |
| | 105 | | <ul class="text-inverse"> |
| 0 | 106 | | @foreach(var preferedDelegation in application.DelegationWishes.OrderBy(n => n.Priority)) |
| 0 | 107 | | { |
| 0 | 108 | | <li>@preferedDelegation.Priority @preferedDelegation.Delegation.Name</li> |
| 0 | 109 | | } |
| | 110 | | </ul> |
| | 111 | | <p class="text-inverse"> |
| | 112 | | Curabitur auctor non orci a molestie. Nunc non justo quis orci viverra pretium id ut est. <br> |
| | 113 | | Nullam vitae dolor id enim consequat fermentum. Ut vel nibh tellus. <br> |
| | 114 | | Duis finibus ante et augue fringilla, vitae scelerisque tortor pretium. <br> |
| | 115 | | Phasellus quis eros erat. Nam sed justo libero. |
| | 116 | | </p> |
| | 117 | | <p class="text-inverse"> |
| | 118 | | Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.<br> |
| | 119 | | Sed tempus dapibus libero ac commodo. |
| | 120 | | </p> |
| | 121 | | <br> |
| | 122 | | <br> |
| | 123 | | <p class="text-inverse"> |
| | 124 | | Best Regards,<br> |
| | 125 | | Sean.<br><br> |
| | 126 | | Information Technology Department,<br> |
| | 127 | | Senior Front End Designer<br> |
| | 128 | | </p> |
| | 129 | | </div> |
| | 130 | | <div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0 |
| | 131 | | </div> |
| | 132 | | <!-- END scrollbar --> |
| | 133 | | </div> |
| | 134 | | <div class="mailbox-content-footer d-flex align-items-center justify-content-end"> |
| | 135 | | <div class="btn-group me-2"> |
| | 136 | | <a href="email_inbox.html" class="btn btn-white btn-sm disabled"><i class="fa fa-fw fa-arrow-up"></i></a> |
| | 137 | | <a href="email_inbox.html" class="btn btn-white btn-sm"><i class="fa fa-fw fa-arrow-down"></i></a> |
| | 138 | | </div> |
| | 139 | | <div class="btn-group"> |
| | 140 | | <a href="email_inbox.html" class="btn btn-white btn-sm"><i class="fa fa-fw fa-times"></i></a> |
| | 141 | | </div> |
| | 142 | | </div> |
| 0 | 143 | | } |
| | 144 | | else |
| 0 | 145 | | { |
| 0 | 146 | | @if (isLoaded) |
| 0 | 147 | | { |
| | 148 | | <div class="alert alert-danger">Keine Bewerbung gefunden</div> |
| 0 | 149 | | } |
| | 150 | | else |
| 0 | 151 | | { |
| | 152 | | <div class="alert alert-primary">Wird geladen</div> |
| 0 | 153 | | } |
| 0 | 154 | | } |
| | 155 | |
|
| | 156 | | @code { |
| 0 | 157 | | [Parameter] public int ApplicationId { get; set; } |
| | 158 | |
|
| | 159 | | private MUNity.Database.Models.Conference.DelegationApplication application; |
| | 160 | |
|
| 0 | 161 | | private bool isLoaded = false; |
| | 162 | |
|
| | 163 | | protected override void OnInitialized() |
| 0 | 164 | | { |
| 0 | 165 | | base.OnInitialized(); |
| 0 | 166 | | application = context.DelegationApplications |
| 0 | 167 | | .Include(n => n.Users) |
| 0 | 168 | | .ThenInclude(n => n.User) |
| 0 | 169 | | .Include(n => n.FormulaInputs) |
| 0 | 170 | | .Include(n => n.DelegationWishes) |
| 0 | 171 | | .ThenInclude(a => a.Delegation) |
| 0 | 172 | | .FirstOrDefault(a => a.DelegationApplicationId == ApplicationId); |
| | 173 | |
|
| 0 | 174 | | isLoaded = true; |
| 0 | 175 | | } |
| | 176 | | } |