camper/web/templates/admin/payment/details.gohtml

149 lines
5.2 KiB
Plaintext
Raw Normal View History

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/payment.paymentDetails*/ -}}
{{ printf ( pgettext "Payment %s" "title" ) .Reference }}
{{- end }}
{{ define "breadcrumb" -}}
<li><a href="./">{{( pgettext "Payments" "title" )}}</a></li>
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/payment.paymentDetails*/ -}}
<h2>{{ template "title" . }}</h2>
<table class="payment-{{ .Status}}">
<caption>{{( pgettext "Payment" "title" )}}</caption>
<tbody>
<tr>
<th scope="row">{{( pgettext "Reference" "header" )}}</th>
<td>{{ .Reference }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Status" "header" )}}</th>
<td class="payment-status">{{ .StatusLabel }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Created at" "payment header" )}}</th>
<td>{{ .CreatedAt | formatDateTime }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Last updated at" "payment header" )}}</th>
<td>{{ .UpdatedAt | formatDateTime }}</td>
</tr>
</tbody>
</table>
<table>
<caption>{{( pgettext "Booking" "title" )}}</caption>
<tbody>
<tr>
<th scope="row">{{( pgettext "Accommodation" "title" )}}</th>
<td>{{ .CampsiteType }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Area preferences" "header" )}}</th>
<td>{{ .ZonePreferences }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Arrival date" "input" )}}</th>
<td>{{ .ArrivalDate | formatDate }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Departure date" "input" )}}</th>
<td>{{ .DepartureDate | formatDate }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Nights" "cart" )}}</th>
<td class="numeric">{{ .NumNights }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Adults aged 17 or older" "input" )}}</th>
<td class="numeric">{{ .NumAdults }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Teenagers from 11 to 16 years old" "input" )}}</th>
<td class="numeric">{{ .NumTeenagers }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Children from 2 to 10 years old" "input" )}}</th>
<td class="numeric">{{ .NumChildren }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Dogs" "input" )}}</th>
<td class="numeric">{{ .NumDogs }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Tourist tax" "cart" )}}</th>
<td class="numeric">{{ .SubtotalTouristTax | formatPrice }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Down payment" "cart" )}}</th>
<td class="numeric">{{ .DownPaymentPercent }} %, {{ .DownPayment | formatPrice }}</td>
</tr>
</tbody>
</table>
{{ with .Options -}}
<table>
<caption>{{( pgettext "Campsite Type Options" "title" )}}</caption>
<tbody>
{{ range . -}}
<tr>
<th scope="row">{{ .Label }}</th>
<td class="numeric">{{ .Units }}</td>
</tr>
{{- end }}
</tbody>
</table>
{{- end }}
{{ with .Customer -}}
<table>
<caption>{{( pgettext "Customer Details" "title" )}}</caption>
<tbody>
<tr>
<th scope="row">{{( pgettext "Full name" "input" )}}</th>
<td>{{ .FullName }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Address" "input" )}}</th>
<td>{{ .Address }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Postcode" "input" )}}</th>
<td>{{ .PostalCode }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "City" "input" )}}</th>
<td>{{ .City }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Country" "input" )}}</th>
<td>{{ .Country }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "Email" "input" )}}</th>
<td><a href="mailto:{{ .Email}}">{{ .Email }}</a></td>
</tr>
<tr>
<th scope="row">{{( pgettext "Phone" "input" )}}</th>
<td><a href="tel:{{ replaceAll .Phone " " "" }}">{{ .Phone }}</a></td>
</tr>
<tr>
<th scope="row">{{( pgettext "Language" "input" )}}</th>
<td>{{ .Language }}</td>
</tr>
<tr>
<th scope="row">{{( pgettext "ACSI card?" "input" )}}</th>
<td>{{if .ACSICard}}{{( gettext "Yes" )}}{{ else }}{{( gettext "No" )}}{{ end }}</td>
</tr>
</tbody>
</table>
{{- end }}
{{- end }}