diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 26a1ba3c7..086682e27 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4000,6 +4000,27 @@ + + ignoreblockeddays + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + inhousevendorid false diff --git a/client/src/components/scoreboard-display/scoreboard-display.component.jsx b/client/src/components/scoreboard-display/scoreboard-display.component.jsx index 29b3065cc..e3f3244a4 100644 --- a/client/src/components/scoreboard-display/scoreboard-display.component.jsx +++ b/client/src/components/scoreboard-display/scoreboard-display.component.jsx @@ -43,19 +43,28 @@ export function ScoreboardDisplayComponent({ useEffect(() => { //Update the locals. async function setMomentSettings() { - const { - data: { appointments }, - } = await client.query({ - query: GET_BLOCKED_DAYS, - variables: { - start: moment().startOf("month"), - end: moment().endOf("month"), - }, - }); + let appointments; + + if (!bodyshop.scoreboard_target.ignoreblockeddays) { + const { data } = await client.query({ + query: GET_BLOCKED_DAYS, + variables: { + start: moment().startOf("month"), + end: moment().endOf("month"), + }, + }); + appointments = data.appointments; + } moment.updateLocale("ca", { workingWeekdays: translateSettingsToWorkingDays(bodyshop.workingdays), - holidays: appointments.map((h) => moment(h.start).format("MM-DD-YYYY")), + ...(appointments + ? { + holidays: appointments.map((h) => + moment(h.start).format("MM-DD-YYYY") + ), + } + : {}), holidayFormat: "MM-DD-YYYY", }); } diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index db379792e..2a167fdb2 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -354,6 +354,13 @@ export default function ShopInfoGeneral({ form }) { > + + +