Open jbkey2015 opened 4 years ago
Staffs -> staffEvent: Smash
Place in staffEvents Component
const printstaffOpt = () => { let domString = ''; forEach(staff){ domString +=` <div class="form-check"> <input class="form-check-input staff" type="checkbox" name="${staff.id}" id="${staff.id}" value="${staff.name}" ${(staff.isChecked === true) ? checked : unchecked}> <label class="form-check-label" for="${staff.id}">${staff.name}</label> </div> `; } utilities.printToDom('staffSelection', domString); };
Modify Food Event
modifyStaffEvent = (staffId) => { if (checked) { staffEventData.addStaffEvent(staffId) }; };
Add Axios call const addStaffEvent = (staffId) => axios.post(${baseUrl}/staffEvents.json, staffId);
const addStaffEvent = (staffId) => axios.post(
, staffId);
Staffs -> staffEvent: Smash
Place in staffEvents Component
Modify Food Event
Add Axios call
const addStaffEvent = (staffId) => axios.post(
${baseUrl}/staffEvents.json, staffId);