mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-19 04:49:37 +02:00
fix(lodging): remove console log and improve all-day event checks in lodging modal
This commit is contained in:
parent
3b0ccdb6d3
commit
36f9022872
3 changed files with 4 additions and 8 deletions
|
@ -87,8 +87,6 @@
|
||||||
|
|
||||||
lodging.timezone = lodgingTimezone || null;
|
lodging.timezone = lodgingTimezone || null;
|
||||||
|
|
||||||
console.log(lodgingTimezone);
|
|
||||||
|
|
||||||
// Auto-set end date if missing but start date exists
|
// Auto-set end date if missing but start date exists
|
||||||
if (lodging.check_in && !lodging.check_out) {
|
if (lodging.check_in && !lodging.check_out) {
|
||||||
if (isAllDay(lodging.check_in)) {
|
if (isAllDay(lodging.check_in)) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export let appVersion = 'v0.10.0-main-06182025';
|
export let appVersion = 'v0.10.0-main-06192025';
|
||||||
export let versionChangelog = 'https://github.com/seanmorley15/AdventureLog/releases/tag/v0.10.0';
|
export let versionChangelog = 'https://github.com/seanmorley15/AdventureLog/releases/tag/v0.10.0';
|
||||||
export let appTitle = 'AdventureLog';
|
export let appTitle = 'AdventureLog';
|
||||||
export let copyrightYear = '2023-2025';
|
export let copyrightYear = '2023-2025';
|
||||||
|
|
|
@ -81,8 +81,8 @@ export function groupAdventuresByDate(
|
||||||
adventure.visits.forEach((visit) => {
|
adventure.visits.forEach((visit) => {
|
||||||
if (visit.start_date) {
|
if (visit.start_date) {
|
||||||
// Check if it's all-day: start has 00:00:00 AND (no end OR end also has 00:00:00)
|
// Check if it's all-day: start has 00:00:00 AND (no end OR end also has 00:00:00)
|
||||||
const startHasZeros = visit.start_date.includes('T00:00:00');
|
const startHasZeros = isAllDay(visit.start_date);
|
||||||
const endHasZeros = visit.end_date ? visit.end_date.includes('T00:00:00') : true;
|
const endHasZeros = visit.end_date ? isAllDay(visit.end_date) : true;
|
||||||
const isAllDayEvent = startHasZeros && endHasZeros;
|
const isAllDayEvent = startHasZeros && endHasZeros;
|
||||||
|
|
||||||
let startDT: DateTime;
|
let startDT: DateTime;
|
||||||
|
@ -93,9 +93,7 @@ export function groupAdventuresByDate(
|
||||||
const dateOnly = visit.start_date.split('T')[0]; // Get 'YYYY-MM-DD'
|
const dateOnly = visit.start_date.split('T')[0]; // Get 'YYYY-MM-DD'
|
||||||
startDT = DateTime.fromISO(dateOnly); // This creates a date without time/timezone
|
startDT = DateTime.fromISO(dateOnly); // This creates a date without time/timezone
|
||||||
|
|
||||||
endDT = visit.end_date
|
endDT = visit.end_date ? DateTime.fromISO(visit.end_date.split('T')[0]) : startDT;
|
||||||
? DateTime.fromISO(visit.end_date.split('T')[0])
|
|
||||||
: startDT;
|
|
||||||
} else {
|
} else {
|
||||||
// For timed events, use timezone conversion
|
// For timed events, use timezone conversion
|
||||||
startDT = DateTime.fromISO(visit.start_date, {
|
startDT = DateTime.fromISO(visit.start_date, {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue