IO-1574 Add ignore blocked days to scoreboard.
This commit is contained in:
@@ -4000,6 +4000,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ignoreblockeddays</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>inhousevendorid</name>
|
<name>inhousevendorid</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -43,19 +43,28 @@ export function ScoreboardDisplayComponent({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
//Update the locals.
|
//Update the locals.
|
||||||
async function setMomentSettings() {
|
async function setMomentSettings() {
|
||||||
const {
|
let appointments;
|
||||||
data: { appointments },
|
|
||||||
} = await client.query({
|
if (!bodyshop.scoreboard_target.ignoreblockeddays) {
|
||||||
query: GET_BLOCKED_DAYS,
|
const { data } = await client.query({
|
||||||
variables: {
|
query: GET_BLOCKED_DAYS,
|
||||||
start: moment().startOf("month"),
|
variables: {
|
||||||
end: moment().endOf("month"),
|
start: moment().startOf("month"),
|
||||||
},
|
end: moment().endOf("month"),
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
appointments = data.appointments;
|
||||||
|
}
|
||||||
|
|
||||||
moment.updateLocale("ca", {
|
moment.updateLocale("ca", {
|
||||||
workingWeekdays: translateSettingsToWorkingDays(bodyshop.workingdays),
|
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",
|
holidayFormat: "MM-DD-YYYY",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -354,6 +354,13 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
>
|
>
|
||||||
<InputNumber min={0} max={12} precision={0} />
|
<InputNumber min={0} max={12} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.ignoreblockeddays")}
|
||||||
|
name={["scoreboard_target", "ignoreblockeddays"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.prodtargethrs")}
|
label={t("bodyshop.fields.prodtargethrs")}
|
||||||
name={["prodtargethrs"]}
|
name={["prodtargethrs"]}
|
||||||
@@ -472,7 +479,6 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
label={t("bodyshop.fields.md_email_cc", { template: "parts_order" })}
|
label={t("bodyshop.fields.md_email_cc", { template: "parts_order" })}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
|
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
type: "array",
|
type: "array",
|
||||||
},
|
},
|
||||||
@@ -492,7 +498,6 @@ export default function ShopInfoGeneral({ form }) {
|
|||||||
label={t("bodyshop.fields.md_ded_notes")}
|
label={t("bodyshop.fields.md_ded_notes")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
|
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
type: "array",
|
type: "array",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -253,6 +253,7 @@
|
|||||||
"enforce_class": "Enforce Class on Conversion?",
|
"enforce_class": "Enforce Class on Conversion?",
|
||||||
"enforce_referral": "Enforce Referrals",
|
"enforce_referral": "Enforce Referrals",
|
||||||
"federal_tax_id": "Federal Tax ID (GST/HST)",
|
"federal_tax_id": "Federal Tax ID (GST/HST)",
|
||||||
|
"ignoreblockeddays": "Scoreboard - Ignore Blocked Days",
|
||||||
"inhousevendorid": "In House Vendor ID",
|
"inhousevendorid": "In House Vendor ID",
|
||||||
"insurance_vendor_id": "Insurance Vendor ID",
|
"insurance_vendor_id": "Insurance Vendor ID",
|
||||||
"intake": {
|
"intake": {
|
||||||
|
|||||||
@@ -253,6 +253,7 @@
|
|||||||
"enforce_class": "",
|
"enforce_class": "",
|
||||||
"enforce_referral": "",
|
"enforce_referral": "",
|
||||||
"federal_tax_id": "",
|
"federal_tax_id": "",
|
||||||
|
"ignoreblockeddays": "",
|
||||||
"inhousevendorid": "",
|
"inhousevendorid": "",
|
||||||
"insurance_vendor_id": "",
|
"insurance_vendor_id": "",
|
||||||
"intake": {
|
"intake": {
|
||||||
|
|||||||
@@ -253,6 +253,7 @@
|
|||||||
"enforce_class": "",
|
"enforce_class": "",
|
||||||
"enforce_referral": "",
|
"enforce_referral": "",
|
||||||
"federal_tax_id": "",
|
"federal_tax_id": "",
|
||||||
|
"ignoreblockeddays": "",
|
||||||
"inhousevendorid": "",
|
"inhousevendorid": "",
|
||||||
"insurance_vendor_id": "",
|
"insurance_vendor_id": "",
|
||||||
"intake": {
|
"intake": {
|
||||||
|
|||||||
Reference in New Issue
Block a user