Skip to content

Commit

Permalink
Reservation on Quick View - minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielŻuławski committed Sep 13, 2021
1 parent c2d9f14 commit 1847cc9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<template v-else>
<div>
<h5>@Loc["Products.Reservation.Date"]:</h5>
<input id="reservationDatepicker" class="form-control datepicker" v-model="PopupQuickViewVueModal.RentalStartDateUtc" />
<input id="reservationDatepicker" class="form-control datepicker" v-model="PopupQuickViewVueModal.StartDate" />
</div>
<div>
<h5 style="margin-top:10px">@Loc["Products.Reservation.Hour"]:</h5>
Expand Down
22 changes: 18 additions & 4 deletions src/Web/Grand.Web/wwwroot/theme/script/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,24 @@
}
}
if (vm.PopupQuickViewVueModal.ProductType == 20) {
var StartDate = this.formatDate(vm.PopupQuickViewVueModal.RentalStartDateUtc);
var EndDate = this.formatDate(vm.PopupQuickViewVueModal.RentalEndDateUtc);
vm.PopupQuickViewVueModal.RentalStartDateUtc = StartDate;
vm.PopupQuickViewVueModal.RentalEndDateUtc = EndDate;
var StartDate;
var EndDate;
if (vm.PopupQuickViewVueModal.RentalStartDateUtc !== null) {
StartDate = this.formatDate(vm.PopupQuickViewVueModal.RentalStartDateUtc);
vm.PopupQuickViewVueModal.RentalStartDateUtc = StartDate;
}
if (vm.PopupQuickViewVueModal.RentalEndDateUtc !== null) {
EndDate = this.formatDate(vm.PopupQuickViewVueModal.RentalEndDateUtc);
vm.PopupQuickViewVueModal.RentalEndDateUtc = EndDate;
}
if (vm.PopupQuickViewVueModal.IntervalUnit !== 10) {
StartDate = this.formatDate(vm.PopupQuickViewVueModal.RentalStartDateUtc);
if (vm.PopupQuickViewVueModal.RentalStartDateUtc !== null) {
vm.PopupQuickViewVueModal.StartDate = this.formatDate(vm.PopupQuickViewVueModal.StartDate);
} else {
vm.PopupQuickViewVueModal.StartDate = null;
}
}
}
}
},
Expand Down

0 comments on commit 1847cc9

Please sign in to comment.