168 lines
6.8 KiB
Plaintext
168 lines
6.8 KiB
Plaintext
@*
|
|
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
|
*@
|
|
@using Microsoft.AspNetCore.Mvc.Localization
|
|
@using gehGassi.Web.Models
|
|
@using Microsoft.Extensions.Localization
|
|
@using gehGassi.Web.Helper
|
|
@using gehGassi.Core.Services
|
|
@using gehGassi.Web.Services
|
|
@model gehGassi.Web.Models.PublicWalkRequestWithNamesVm
|
|
@inject IViewLocalizer Localizer
|
|
@inject ICountryService CountryService
|
|
@inject ICurrentTimeZoneService CurrentTimeZoneService
|
|
|
|
@{
|
|
IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer;
|
|
List<PublicWalkResponseWithNamesVm> responses = new List<PublicWalkResponseWithNamesVm>();
|
|
if(ViewBag.Responses != null)
|
|
{
|
|
responses = ViewBag.Responses;
|
|
}
|
|
TimeSpan userOffset = await CurrentTimeZoneService.GetOffsetAsync();
|
|
}
|
|
|
|
<section id="publicWalkRequestDetailsContainer">
|
|
<div class="form">
|
|
<div id="pageTitleAdd" style="display: none;">@ViewData["Title"]</div>
|
|
|
|
<div class="row mb-2">
|
|
<div class="col-sm-12">
|
|
<div class="text-center">
|
|
@if (!string.IsNullOrWhiteSpace(Model.DogOwnerPhoto))
|
|
{
|
|
<img src="/file/documents/@Model.DogOwnerPhoto" class="img-user-big" alt="" />
|
|
}
|
|
else
|
|
{
|
|
<img src="/images/icon_user.png" class="img-user-big" alt="" />
|
|
}
|
|
</div>
|
|
<h3 class="text-center">@Model.DogOwnerName</h3>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_RequestType"]</div>
|
|
@Model.RequestType.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_Status"]</div>
|
|
@Model.Status.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_Price"]</div>
|
|
@Model.Price.ToString("n2")
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Common_Created"]</div>
|
|
@Model.Created.ToOffset(userOffset).ToString("g")<br />(@Model.UpdatedAt.ToOffset(userOffset).ToString("g"))
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_StartDate"]</div>
|
|
@Model.StartDate.ToOffset(userOffset).ToString("g")
|
|
</div>
|
|
<div class="col-sm-4">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_EndDate"]</div>
|
|
@Model.EndDate.ToOffset(userOffset).ToString("g")
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@Localizer["Common_Address"]</div>
|
|
<div>
|
|
@Model.PickupAddress_AddressLine1, @Model.PickupAddress_AddressLine2, @Model.PickupAddress_Zip, @Model.PickupAddress_City, @CountryService.GetState(Model.PickupAddress_CountryCode, Model.PickupAddress_State).Name, @CountryService.GetCountry(Model.PickupAddress_CountryCode).Name
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@Localizer["Common_Dogs"] - @Model.DogCount</div>
|
|
<div>
|
|
@string.Join(", ", Model.Dogs.Select(x => x.Name))
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@annotationsLocalizer["PublicWalkRequest_Info"]</div>
|
|
<div>
|
|
@Model.Info
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-3 text-center"><h3>Antworten</h3></div>
|
|
|
|
@if(responses.Count == 0)
|
|
{
|
|
<div class="h5 mb-1 text-center">keine</div>
|
|
}
|
|
|
|
@foreach (var response in responses)
|
|
{
|
|
var css = string.Empty;
|
|
if (response.Status == PublicWalkResponseStatusVm.Accepted)
|
|
{
|
|
css = "bg-success text-white";
|
|
}
|
|
|
|
<div class="card p-3 @css">
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Common_Created"]</div>
|
|
@response.Created.ToOffset(userOffset).ToString("g")<br />(@response.UpdatedAt.ToOffset(userOffset).ToString("g"))
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@Localizer["Common_DogWalker"]</div>
|
|
@response.DogWalkerName<br/>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@Localizer["Common_Offer"]</div>
|
|
@response.Price.ToString("n2")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@Localizer["Common_Status"]</div>
|
|
@response.Status.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
</div>
|
|
@if (!string.IsNullOrWhiteSpace(response.Info))
|
|
{
|
|
<div class="row-mb3">
|
|
<div class="h5 mb-1">Info</div>
|
|
<div class="col-12">@response.Info</div>
|
|
</div>
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(response.Answer))
|
|
{
|
|
<div class="row-mb3">
|
|
<div class="h5 mb-1">Antort</div>
|
|
<div class="col-12">@response.Answer</div>
|
|
</div>
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(response.CancellationReason))
|
|
{
|
|
<div class="row-mb3">
|
|
<div class="h5 mb-1">Stornogrund</div>
|
|
<div class="col-12">@response.CancellationReason</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
|
|
<div class="row button-row">
|
|
<div class="col-12">
|
|
<div class="">
|
|
<button type="button" id="btnClose" class="btn btn-primary">@Localizer["Button_Close"]</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<system-js url="~/scripts/Views/Walks/DetailsPublicWalkRequest.js" fresh-import="true"></system-js>
|
|
</section>
|
|
|