[UPD] Out of service popover

This commit is contained in:
Pablo
2019-01-22 20:20:52 +01:00
parent 0afa058733
commit 4eb5a86081
4 changed files with 29 additions and 6 deletions

View File

@@ -67,6 +67,7 @@ class BusHotelCalendar(models.TransientModel):
'pending_amount': vals['pending_amount'],
'amount_paid': vals['amount_paid'],
'type': vals['reservation_type'],
'closure_reason': vals['closure_reason'],
'out_service_description': vals['out_service_description'],
'splitted': vals['splitted'],
'real_dates': vals['real_dates'],

View File

@@ -113,6 +113,7 @@ class HotelReservation(models.Model):
'pending_amount': reserv['pending_amount'],
'amount_paid': reserv['amount_total'] - (reserv['pending_amount'] or 0.0),
'type': reserv['reservation_type'] or 'normal',
'closure_reason': reserv['closure_reason'],
'out_service_description': reserv['out_service_description']
or _('No reason given'),
'splitted': reserv['splitted'],

View File

@@ -756,6 +756,7 @@ var PMSCalendarController = AbstractController.extend({
'pending_amount': Number(tp['pending_amount']).toLocaleString(),
'amount_paid': Number(tp['amount_paid']).toLocaleString(),
'reservation_type': tp['type'],
'closure_reason': tp['closure_reason'],
'out_service_description': tp['out_service_description'],
'splitted': tp['splitted'],
'channel_type': tp['channel_type'],

View File

@@ -223,17 +223,37 @@
<t t-name="HotelCalendar.TooltipReservation.out">
<div class="container">
<div class="row">
<div class="col-sm-12 bg-gray-dark py-5">
<div class="row row-eq-height">
<div class="col-sm-6 bg-gray-lighter">
<i class="fa fa-ban fa-2x fa-pull-left"/>
<h2><t t-esc="name"/> <small class="text-white"><t t-esc="out_service_description"/></small> </h2>
<span class="fa fa-external-link fa-2x fa-border fa-pull-right" role="button"
title="View Details" />
<header><t t-esc="name"/></header>
<p><t t-esc="closure_reason"/></p>
</div>
<div class="col-sm-6 bg-gray-light">
<i class="fa fa-hotel fa-2x fa-pull-left"/>
<header><t t-esc="room_type_name"/></header>
<p><t t-esc="out_service_description"/></p>
</div>
</div>
<t t-call="HotelCalendar.TooltipReservation.Dates"/>
<div class="row row-eq-height mt-10">
<div class="col-sm-2 btn_popover_open_folio">
<i class="fa fa-file-text-o fa-2x fa-pull-left" role="button"
title="View Folio Details"> <span class="fa-text-inside"><t t-esc="folio_name"/></span></i>
</div>
<div class="col-sm-2 btn_popover_open_reservation">
<span class="fa fa-suitcase fa-2x" role="button"
title="View Reservation Details" />
</div>
<div class="col-sm-2 btn_popover_close">
<span class="fa fa-window-close fa-2x" role="button"
title="Close" />
</div>
</div>
</div>
</t>
<t t-name="HotelCalendar.TooltipReservation">
<t t-call="HotelCalendar.TooltipReservation.#{ reservation_type }"/>
</t>