View | Details | Raw Unified | Return to bug 30650
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/curbside_pickups.tt (-7 / +11 lines)
Lines 566-575 Link Here
566
                    let pickupIntervalEndMoment   = listStartMoment.add(pickup_interval, 'minutes');
566
                    let pickupIntervalEndMoment   = listStartMoment.add(pickup_interval, 'minutes');
567
                    while (keep_going) {
567
                    while (keep_going) {
568
                        let available = true;
568
                        let available = true;
569
                        let display_slot = true
569
570
570
                        if (pickupIntervalStartMoment.isBefore(now)) {
571
                        if (pickupIntervalStartMoment.isBefore(now)) {
571
                            // Slots in the past are unavailable
572
                            // Slots in the past are unavailable
572
                            available = false;
573
                            available = false;
574
                            display_slot = false;
573
                        }
575
                        }
574
576
575
                        if (pickupIntervalEndMoment.isAfter(listEndMoment)) {
577
                        if (pickupIntervalEndMoment.isAfter(listEndMoment)) {
Lines 590-602 Link Here
590
                            available = false;
592
                            available = false;
591
                        }
593
                        }
592
594
593
                        pickupSlots.push(
595
                        if ( display_slot ) {
594
                            {
596
                            pickupSlots.push(
595
                                "available": available,
597
                                {
596
                                "moment": pickupIntervalStartMoment,
598
                                    "available": available,
597
                                "pickups_scheduled": pickups_scheduled
599
                                    "moment": pickupIntervalStartMoment,
598
                            }
600
                                    "pickups_scheduled": pickups_scheduled
599
                        );
601
                                }
602
                            );
603
                        }
600
604
601
                        if ( available ) {
605
                        if ( available ) {
602
                            available_count++;
606
                            available_count++;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt (-8 / +11 lines)
Lines 326-335 Link Here
326
                let pickupIntervalEndMoment   = listStartMoment.add(pickup_interval, 'minutes');
326
                let pickupIntervalEndMoment   = listStartMoment.add(pickup_interval, 'minutes');
327
                while (keep_going) {
327
                while (keep_going) {
328
                    let available = true;
328
                    let available = true;
329
                    let display_slot = true;
329
330
330
                    if (pickupIntervalStartMoment.isBefore(now)) {
331
                    if (pickupIntervalStartMoment.isBefore(now)) {
331
                        // Slots in the past are unavailable
332
                        // Slots in the past are unavailable
332
                        available = false;
333
                        available = false;
334
                        display_slot = false;
333
                    }
335
                    }
334
336
335
                    if (pickupIntervalEndMoment.isAfter(listEndMoment)) {
337
                    if (pickupIntervalEndMoment.isAfter(listEndMoment)) {
Lines 353-365 Link Here
353
                        available = false;
355
                        available = false;
354
                    }
356
                    }
355
357
356
                    pickupSlots.push(
358
                    if ( display_slot ) {
357
                        {
359
                        pickupSlots.push(
358
                            "available": available,
360
                            {
359
                            "moment": pickupIntervalStartMoment,
361
                                "available": available,
360
                            "pickups_scheduled": pickups_scheduled
362
                                "moment": pickupIntervalStartMoment,
361
                        }
363
                                "pickups_scheduled": pickups_scheduled
362
                    );
364
                            }
365
                        );
366
                    }
363
367
364
                    if ( available ) {
368
                    if ( available ) {
365
                        available_count++;
369
                        available_count++;
366
- 

Return to bug 30650