bug fixes for shifts functionality
This commit is contained in:
parent
65c786d3db
commit
88b80bc750
@ -160,8 +160,9 @@ class ShiftsController {
|
||||
|
||||
// Calculate current volunteers dynamically
|
||||
let currentVolunteers = 0;
|
||||
let allSignups = { list: [] }; // Initialize with empty list
|
||||
if (config.nocodb.shiftSignupsSheetId) {
|
||||
const allSignups = await nocodbService.getAll(config.nocodb.shiftSignupsSheetId);
|
||||
allSignups = await nocodbService.getAll(config.nocodb.shiftSignupsSheetId);
|
||||
const confirmedSignups = (allSignups.list || []).filter(signup =>
|
||||
signup['Shift ID'] === parseInt(shiftId) && signup.Status === 'Confirmed'
|
||||
);
|
||||
|
||||
@ -44,7 +44,7 @@ Controller for application settings, start location, and walk sheet config.
|
||||
|
||||
# app/controllers/shiftsController.js
|
||||
|
||||
Controller for volunteer shift management (public and admin). When users sign up for shifts, the signup record includes the shift title for better tracking and display.
|
||||
Controller for volunteer shift management (public and admin). When users sign up for shifts, the signup record includes the shift title for better tracking and display. Fixed variable scope issue in signup method to prevent "allSignups is not defined" error.
|
||||
|
||||
# app/controllers/usersController.js
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user