Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

ReservationQv - minor changes

DanielŻuławski261d729e0f7a
diff --git a/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml b/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
index 0f2794530..9ce235d0b 100644
--- a/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
@@ -23,7 +23,12 @@
<template v-else>
<div>
<h5>@Loc["Products.Reservation.Date"]:</h5>
- <input id="reservationDatepicker" class="form-control datepicker" v-model="PopupQuickViewVueModal.StartDate" />
+ <template v-if="PopupQuickViewVueModal.RentalStartDateUtc !== null">
+ <input id="reservationDatepicker" class="form-control datepicker" v-model="PopupQuickViewVueModal.RentalStartDateUtc" />
+ </template>
+ <template v-else>
+ <input id="reservationDatepicker" class="form-control datepicker" />
+ </template>
</div>
<div>
<h5 style="margin-top:10px">@Loc["Products.Reservation.Hour"]:</h5>
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/app.js b/src/Web/Grand.Web/wwwroot/theme/script/app.js
index 20f68cc12..d546f8dcf 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/app.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/app.js
@@ -331,20 +331,20 @@
if (vm.PopupQuickViewVueModal.ProductType == 20) {
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.IntervalUnit == 10) {
+ 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;
+ }
+ } else {
if (vm.PopupQuickViewVueModal.RentalStartDateUtc !== null) {
- vm.PopupQuickViewVueModal.StartDate = this.formatDate(vm.PopupQuickViewVueModal.StartDate);
+ vm.PopupQuickViewVueModal.RentalStartDateUtc = this.formatDate(vm.PopupQuickViewVueModal.RentalStartDateUtc);
} else {
- vm.PopupQuickViewVueModal.StartDate = null;
+ vm.PopupQuickViewVueModal.RentalStartDateUtc = null;
}
}
}