@bash-app/bash-common 30.46.0 → 30.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/package.json +1 -1
- package/src/utils/apiUtils.ts +0 -0
- package/src/utils/arrayUtils.ts +0 -0
- package/src/utils/awsS3Utils.ts +0 -0
- package/src/utils/dateTimeUtils.ts +0 -0
- package/src/utils/entityUtils.ts +0 -0
- package/src/utils/generalDateTimeUtils.ts +0 -0
- package/src/utils/luxonUtils.ts +6 -3
- package/src/utils/mathUtils.ts +0 -0
- package/src/utils/objUtils.ts +0 -0
- package/src/utils/paymentUtils.ts +0 -0
- package/src/utils/promoCodesUtils.ts +0 -0
- package/src/utils/qrCodeUtils.ts +0 -0
- package/src/utils/recurrenceUtils.ts +0 -0
- package/src/utils/service/apiServiceBookingApiUtils.ts +0 -0
- package/src/utils/service/attendeeOptionUtils.ts +0 -0
- package/src/utils/service/frontendServiceBookingUtils.ts +3 -3
- package/src/utils/service/regexUtils.ts +0 -0
- package/src/utils/service/serviceBookingStatusUtils.ts +14 -14
- package/src/utils/service/serviceDBUtils.ts +0 -0
- package/src/utils/service/serviceRateDBUtils.ts +0 -0
- package/src/utils/service/serviceUtils.ts +0 -0
- package/src/utils/service/venueUtils.ts +0 -0
- package/src/utils/sortUtils.ts +0 -0
- package/src/utils/stringUtils.ts +0 -0
- package/src/utils/stripeAccountUtils.ts +0 -0
- package/src/utils/ticketListUtils.ts +0 -0
- package/src/utils/typeUtils.ts +0 -0
- package/src/utils/urlUtils.ts +0 -0
- package/src/utils/userPromoCodeUtils.ts +0 -0
- package/src/utils/userSubscriptionUtils.ts +0 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/utils/apiUtils.ts
CHANGED
|
File without changes
|
package/src/utils/arrayUtils.ts
CHANGED
|
File without changes
|
package/src/utils/awsS3Utils.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/utils/entityUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/utils/luxonUtils.ts
CHANGED
|
@@ -763,7 +763,10 @@ export interface TimeSlots {
|
|
|
763
763
|
// } as TimeSlots;
|
|
764
764
|
// }
|
|
765
765
|
|
|
766
|
-
export function generateTimeSlots(
|
|
766
|
+
export function generateTimeSlots(
|
|
767
|
+
filteredHours: LuxonDateRange[],
|
|
768
|
+
incMin: number = 15
|
|
769
|
+
): TimeSlots {
|
|
767
770
|
const timeSlotsStart: string[] = [];
|
|
768
771
|
let timeSlotsEnd: string[] = [];
|
|
769
772
|
|
|
@@ -775,13 +778,13 @@ export function generateTimeSlots(filteredHours: LuxonDateRange[]): TimeSlots {
|
|
|
775
778
|
|
|
776
779
|
while (currentTime < startEnd) {
|
|
777
780
|
timeSlotsStart.push(dateTimeFormatTime(currentTime)); // Add the time in "HH:mm" format
|
|
778
|
-
currentTime = currentTime.plus({ minutes:
|
|
781
|
+
currentTime = currentTime.plus({ minutes: incMin }); // Increment by 30 minutes
|
|
779
782
|
}
|
|
780
783
|
|
|
781
784
|
currentTime = end;
|
|
782
785
|
while (currentTime < endEnd) {
|
|
783
786
|
timeSlotsEnd.push(dateTimeFormatTime(currentTime)); // Add the time in "HH:mm" format
|
|
784
|
-
currentTime = currentTime.plus({ minutes:
|
|
787
|
+
currentTime = currentTime.plus({ minutes: incMin }); // Increment by 30 minutes
|
|
785
788
|
}
|
|
786
789
|
|
|
787
790
|
const finalTime =
|
package/src/utils/mathUtils.ts
CHANGED
|
File without changes
|
package/src/utils/objUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/qrCodeUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -85,9 +85,6 @@ export function frontendServiceGetBookingDayInfo({
|
|
|
85
85
|
}: FrontendServiceGetBookingDayInfoFrontParams): FrontendServiceBookingDayInfo[] {
|
|
86
86
|
const bookingDayResults: FrontendServiceBookingDayInfo[] =
|
|
87
87
|
daysToBookParams.map((day) => {
|
|
88
|
-
const rates = serviceRatesFilter(filteredRates, [day.dateTimeRange]);
|
|
89
|
-
const { generalRate, specialRates, dailyRates } = rates;
|
|
90
|
-
|
|
91
88
|
let priceBreakdown: ServiceBookingPriceBreakdownBaseT[] = [];
|
|
92
89
|
const durationHours = dateTimeDiffHours(
|
|
93
90
|
day.dateTimeRange.start,
|
|
@@ -101,6 +98,9 @@ export function frontendServiceGetBookingDayInfo({
|
|
|
101
98
|
let hoursRemaining = durationHours;
|
|
102
99
|
let currentRange = { ...day.dateTimeRange };
|
|
103
100
|
let baseCostDiscountedCents = 0;
|
|
101
|
+
|
|
102
|
+
const rates = serviceRatesFilter(filteredRates, [day.dateTimeRange]);
|
|
103
|
+
const { generalRate, specialRates, dailyRates } = rates;
|
|
104
104
|
while (serviceRatesHasRates(rates) && hoursRemaining > 0) {
|
|
105
105
|
const pricingInfo = getServiceRatePricingInfo(
|
|
106
106
|
currentRange,
|
|
File without changes
|
|
@@ -107,20 +107,20 @@ export function serviceBookingCanHaveApprovalDecision(
|
|
|
107
107
|
errorMessage: "Approval decisions can only be made on booking requests.",
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
if (serviceBookingIsCanceled(booking)) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
if (serviceBookingIsConfirmed(booking)) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
110
|
+
// if (serviceBookingIsCanceled(booking)) {
|
|
111
|
+
// return {
|
|
112
|
+
// valid: false,
|
|
113
|
+
// errorMessage:
|
|
114
|
+
// "Approval decisions can not be made on canceled booking requests.",
|
|
115
|
+
// };
|
|
116
|
+
// }
|
|
117
|
+
// if (serviceBookingIsConfirmed(booking)) {
|
|
118
|
+
// return {
|
|
119
|
+
// valid: false,
|
|
120
|
+
// errorMessage:
|
|
121
|
+
// "Approval decisions can not be made on confirmed booking requests.",
|
|
122
|
+
// };
|
|
123
|
+
// }
|
|
124
124
|
|
|
125
125
|
return { valid: true };
|
|
126
126
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/sortUtils.ts
CHANGED
|
File without changes
|
package/src/utils/stringUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/typeUtils.ts
CHANGED
|
File without changes
|
package/src/utils/urlUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|