Cash-152 fixed UI defect CASH-405 for CASH-152
This commit is contained in:
Johnny shultz 2025-03-19 18:01:17 -04:00
parent d1f356d2e2
commit 4301ca27de
2 changed files with 35 additions and 11 deletions

View file

@ -26,43 +26,36 @@ const DAYS_OF_WEEK = [
{ {
label: "Sunday", label: "Sunday",
cssClass: "sunday", cssClass: "sunday",
index: 0, isPricingByDayUpchargeDay: true,
isPricingByDayUpchargeDay: false,
}, },
{ {
label: "Monday", label: "Monday",
cssClass: "monday", cssClass: "monday",
index: 1,
isPricingByDayUpchargeDay: true, isPricingByDayUpchargeDay: true,
}, },
{ {
label: "Tuesday", label: "Tuesday",
cssClass: "tuesday", cssClass: "tuesday",
index: 2,
isPricingByDayUpchargeDay: false, isPricingByDayUpchargeDay: false,
}, },
{ {
label: "Wednesday", label: "Wednesday",
cssClass: "wednesday", cssClass: "wednesday",
index: 3,
isPricingByDayUpchargeDay: false, isPricingByDayUpchargeDay: false,
}, },
{ {
label: "Thursday", label: "Thursday",
cssClass: "thursday", cssClass: "thursday",
index: 4,
isPricingByDayUpchargeDay: false, isPricingByDayUpchargeDay: false,
}, },
{ {
label: "Friday", label: "Friday",
cssClass: "friday", cssClass: "friday",
index: 5,
isPricingByDayUpchargeDay: true, isPricingByDayUpchargeDay: true,
}, },
{ {
label: "Saturday", label: "Saturday",
cssClass: "saturday", cssClass: "saturday",
index: 6,
isPricingByDayUpchargeDay: true, isPricingByDayUpchargeDay: true,
}, },
]; ];

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="date-picker text-center" :class="`${calendarViewDirection} ${isPricingByDayClass}`"> <div class="date-picker text-center" :class="`${calendarViewDirection} ${isPricingByDayClass} ${showPricingByDayClass}`">
<fieldset id="date-picker-fieldset" ref="datePickerFieldset"> <fieldset id="date-picker-fieldset" ref="datePickerFieldset">
<legend class="sr-only">Select a day and time</legend> <legend class="sr-only">Select a day and time</legend>
<div <div
@ -60,6 +60,7 @@
date.dateNum === 1 ? 'first-day-' + month.startDateDayIndex : '', date.dateNum === 1 ? 'first-day-' + month.startDateDayIndex : '',
date.dayClasses, date.dayClasses,
date.isSelectable ? 'selectable-day' : '', date.isSelectable ? 'selectable-day' : '',
date.isPricingByDayUpchargeDay ? 'upch-day' : '',
]"> ]">
<input <input
:disabled="!date.isSelectable" :disabled="!date.isSelectable"
@ -220,6 +221,9 @@ export default {
isPricingByDayClass() { isPricingByDayClass() {
return this.isPricingByDayExperiment ? "pricing-by-day" : ""; return this.isPricingByDayExperiment ? "pricing-by-day" : "";
}, },
showPricingByDayClass() {
return this.showPricingByDay ? "show-pricing-by-day" : "";
},
selectedDate: { selectedDate: {
get() { get() {
return this.modelValue; return this.modelValue;
@ -1143,8 +1147,8 @@ export default {
label { label {
background-color: $white; background-color: $white;
border: none; border: none;
min-width: initial; min-width: 100%;
width: initial; width: 100%;
height: -webkit-fill-available; height: -webkit-fill-available;
border-radius: 0; border-radius: 0;
cursor: pointer; cursor: pointer;
@ -1163,8 +1167,35 @@ export default {
} }
} }
} }
&.date-picker.show-pricing-by-day {
.radio-wrapper{
&.selectable-day label span{
text-decoration: none;
color: $gray-600;
font-weight: 600;
&.price{
color: $green;
}
}
&.upch-day label span.price{
color: $gray-600;
font-weight:400;
}
input[type="radio"] {
&:focus + label,
&:checked:focus + label {
color: $gray-600;
}
&:checked + label {
color: $blue;
}
}
}
}
} }
.btn-link { .btn-link {
display: block; display: block;
position: relative; position: relative;