216 lines
8.6 KiB
Plaintext
216 lines
8.6 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.WalkWithNamesVm
|
|
@inject IViewLocalizer Localizer
|
|
@inject ICountryService CountryService
|
|
@inject ICurrentTimeZoneService CurrentTimeZoneService
|
|
|
|
@{
|
|
IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer;
|
|
TimeSpan userOffset = await CurrentTimeZoneService.GetOffsetAsync();
|
|
}
|
|
|
|
<section id="walkDetailsContainer">
|
|
<div class="form">
|
|
<div id="pageTitleAdd" style="display: none;">@ViewData["Title"]</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-6">
|
|
<div class="text-center"><h5>@Localizer["Common_DogOwner"]</h5></div>
|
|
<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 class="col-sm-6">
|
|
<div class="text-center"><h5>@Localizer["Common_DogWalker"]</h5></div>
|
|
<div class="text-center">
|
|
@if (!string.IsNullOrWhiteSpace(Model.DogWalkerPhoto))
|
|
{
|
|
<img src="/file/documents/@Model.DogWalkerPhoto" class="img-user-big" alt="" />
|
|
}
|
|
else
|
|
{
|
|
<img src="/images/icon_user.png" class="img-user-big" alt="" />
|
|
}
|
|
</div>
|
|
<h3 class="text-center">@Model.DogWalkerName</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Type"]</div>
|
|
@Model.Type.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_ServiceType"]</div>
|
|
@Model.ServiceType.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Status"]</div>
|
|
@Model.Status.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_PaymentStatus"]</div>
|
|
@Model.PaymentStatus.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3">
|
|
<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-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Start"]</div>
|
|
@Model.Start.ToOffset(userOffset).ToString("g")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_End"]</div>
|
|
@Model.End.ToOffset(userOffset).ToString("g")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Price"]</div>
|
|
@Model.Price.ToString("n2")
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-6">
|
|
<div class="h5 mb-1">@Localizer["Common_Address"] 1</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 class="col-sm-6">
|
|
<div class="h5 mb-1">@Localizer["Common_Address"] 2</div>
|
|
<div>
|
|
@Model.ReturnAddress_AddressLine1, @Model.ReturnAddress_AddressLine2, @Model.ReturnAddress_Zip, @Model.ReturnAddress_City, @CountryService.GetState(Model.ReturnAddress_CountryCode, Model.ReturnAddress_State).Name, @CountryService.GetCountry(Model.ReturnAddress_CountryCode).Name
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Started"]</div>
|
|
@(Model.Started != null ? Model.Started.Value.ToOffset(userOffset).ToString("g") : "-")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Completed"]</div>
|
|
@(Model.Completed != null ? Model.Completed.Value.ToOffset(userOffset).ToString("g") : "-")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Confirmed"]</div>
|
|
@(Model.Confirmed != null ? Model.Confirmed.Value.ToOffset(userOffset).ToString("g") : "-")
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_Complained"]</div>
|
|
@(Model.Complained != null ? Model.Complained.Value.ToOffset(userOffset).ToString("g") : "-")
|
|
</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["Walk_Info"]</div>
|
|
<div>
|
|
@if (!string.IsNullOrWhiteSpace(Model.Info))
|
|
{
|
|
<span>@Model.Info</span>
|
|
}
|
|
else
|
|
{
|
|
<span>-</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_CompletedInfo"]</div>
|
|
<div>
|
|
@if (!string.IsNullOrWhiteSpace(Model.CompletedInfo))
|
|
{
|
|
<span>@Model.CompletedInfo</span>
|
|
}
|
|
else
|
|
{
|
|
<span>-</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.DeclinedReason))
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_DeclinedReason"]</div>
|
|
<div>
|
|
@Model.DeclinedReason
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@if(Model.Status == WalkStatusVm.Cancelled)
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_CancelledBy"]</div>
|
|
<div>
|
|
@Model.CancelledBy.GetDisplayName(annotationsLocalizer)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.CancelledReason))
|
|
{
|
|
<div class="row mb-3">
|
|
<div class="col-sm-12">
|
|
<div class="h5 mb-1">@annotationsLocalizer["Walk_CancelledReason"]</div>
|
|
<div>
|
|
@Model.CancelledReason
|
|
</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/details.js" fresh-import="true"></system-js>
|
|
</section>
|
|
|