@happychef/algorithm 1.3.5 → 1.3.6
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/package.json
CHANGED
|
@@ -91,14 +91,7 @@ function fitsWithinMeal(data, dateStr, startTimeStr, duurReservatie) {
|
|
|
91
91
|
const restaurantDuur = getDuurReservatie(data);
|
|
92
92
|
const actualMealEnd = mealEndTime - restaurantDuur;
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// Debug: log for cross-midnight times
|
|
97
|
-
if (startTime >= 1380) { // 23:00+
|
|
98
|
-
console.log(`[fitsWithinMeal DEBUG] time=${startTimeStr}, startTime=${startTime}, mealEnd=${mealEndTime}, restaurantDuur=${restaurantDuur}, actualMealEnd=${actualMealEnd}, duurReservatie=${duurReservatie}, result=${result}`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return result;
|
|
94
|
+
return startTime >= mealStartTime && startTime <= actualMealEnd && startTime + duurReservatie <= mealEndTime;
|
|
102
95
|
}
|
|
103
96
|
|
|
104
97
|
function timeblocksAvailable(data, dateStr, reservations, guests, blockedSlots = [], giftcard = null, isAdmin = false, duration = null) {
|
|
@@ -119,7 +119,6 @@ function getDataByDateAndMeal(data, dateStr, mealType) {
|
|
|
119
119
|
} else if (mealType === 'dinner') {
|
|
120
120
|
// For bowling accounts, ensure dinner extends to at least 24:00 (midnight)
|
|
121
121
|
const isBowling = data?.account_type === 'bowling' || data?.accountType === 'bowling' || data?.['general-settings']?.account_type === 'bowling';
|
|
122
|
-
console.log('[BOWLING DEBUG] mealType=dinner, account_type=', data?.account_type, 'accountType=', data?.accountType, 'gs.account_type=', data?.['general-settings']?.account_type, 'isBowling=', isBowling, 'endTime=', mealData.endTime);
|
|
123
122
|
if (isBowling) {
|
|
124
123
|
const currentEndMinutes = parseTime(mealData.endTime);
|
|
125
124
|
if (currentEndMinutes < 1440) {
|