IO-658 IO-652 IO-657 add MPI Templates.
This commit is contained in:
@@ -33357,6 +33357,69 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>mpi_animal_checklist</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>
|
||||||
|
<name>mpi_eglass_auth</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>
|
||||||
|
<name>mpi_final_acct_sheet</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>paint_grid</name>
|
<name>paint_grid</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -37015,6 +37078,37 @@
|
|||||||
</folder_node>
|
</folder_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>schedule</name>
|
||||||
|
<children>
|
||||||
|
<folder_node>
|
||||||
|
<name>labels</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>manualevent</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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>scoreboard</name>
|
<name>scoreboard</name>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Button, Card, Col, PageHeader, Row, Space } from "antd";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
||||||
import ScheduleModal from "../schedule-job-modal/schedule-job-modal.container";
|
import ScheduleModal from "../schedule-job-modal/schedule-job-modal.container";
|
||||||
|
import ScheduleManualEvent from "../schedule-manual-event/schedule-manual-event.component";
|
||||||
import ScheduleProductionList from "../schedule-production-list/schedule-production-list.component";
|
import ScheduleProductionList from "../schedule-production-list/schedule-production-list.component";
|
||||||
|
|
||||||
export default function ScheduleCalendarComponent({ data, refetch }) {
|
export default function ScheduleCalendarComponent({ data, refetch }) {
|
||||||
@@ -23,6 +24,7 @@ export default function ScheduleCalendarComponent({ data, refetch }) {
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<ScheduleProductionList />
|
<ScheduleProductionList />
|
||||||
|
<ScheduleManualEvent />
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
import { useMutation, useLazyQuery } from "@apollo/client";
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Card,
|
||||||
|
Form,
|
||||||
|
Input,
|
||||||
|
InputNumber,
|
||||||
|
notification,
|
||||||
|
Popover,
|
||||||
|
Space,
|
||||||
|
} from "antd";
|
||||||
|
import moment from "moment";
|
||||||
|
import React, { useState, useEffect } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
|
import {
|
||||||
|
INSERT_APPOINTMENT,
|
||||||
|
UPDATE_APPOINTMENT,
|
||||||
|
} from "../../graphql/appointments.queries";
|
||||||
|
import {
|
||||||
|
INSERT_SCOREBOARD_ENTRY,
|
||||||
|
QUERY_SCOREBOARD_ENTRY,
|
||||||
|
UPDATE_SCOREBOARD_ENTRY,
|
||||||
|
} from "../../graphql/scoreboard.queries";
|
||||||
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
|
import FormDateTimePickerComponent from "../form-date-time-picker/form-date-time-picker.component";
|
||||||
|
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||||
|
|
||||||
|
export default function ScheduleManualEvent({ event }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [insertAppointment] = useMutation(INSERT_APPOINTMENT);
|
||||||
|
const [updateAppointment] = useMutation(UPDATE_APPOINTMENT);
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const [visibility, setVisibility] = useState(false);
|
||||||
|
// const [callQuery, { loading: entryLoading, data: entryData }] = useLazyQuery(
|
||||||
|
// QUERY_SCOREBOARD_ENTRY
|
||||||
|
// );
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (visibility && event) {
|
||||||
|
form.setFieldsValue({ event });
|
||||||
|
}
|
||||||
|
}, [visibility, form, event]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// if (entryData && entryData.scoreboard && entryData.scoreboard[0]) {
|
||||||
|
// console.log("Setting FOrm");
|
||||||
|
// // form.setFieldsValue(entryData.scoreboard[0]);
|
||||||
|
// }
|
||||||
|
}, [form]);
|
||||||
|
|
||||||
|
const handleFinish = async (values) => {
|
||||||
|
logImEXEvent("job_close_add_to_scoreboard");
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
let result;
|
||||||
|
if (event && event.id) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
setVisibility(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const overlay = (
|
||||||
|
<Card>
|
||||||
|
<div>
|
||||||
|
<Form form={form} layout="vertical" onFinish={handleFinish}>
|
||||||
|
<Form.Item
|
||||||
|
label={t("schedule.fields.note")}
|
||||||
|
name="note"
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("schedule.fields.start")}
|
||||||
|
name="start"
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<FormDateTimePickerComponent />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("schedule.fields.end")}
|
||||||
|
name="end"
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<FormDateTimePickerComponent />
|
||||||
|
</Form.Item>
|
||||||
|
|
||||||
|
<Space wrap>
|
||||||
|
<Button type="primary" htmlType="submit">
|
||||||
|
{t("general.actions.save")}
|
||||||
|
</Button>
|
||||||
|
<Button onClick={() => setVisibility(false)}>
|
||||||
|
{t("general.actions.cancel")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleClick = (e) => {
|
||||||
|
setVisibility(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Popover content={overlay} visible={visibility}>
|
||||||
|
<Button loading={loading} onClick={handleClick}>
|
||||||
|
{t("schedule.labels.manualevent")}
|
||||||
|
</Button>
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1991,6 +1991,9 @@
|
|||||||
"job_costing_ro": "Job Costing",
|
"job_costing_ro": "Job Costing",
|
||||||
"job_notes": "Job Notes",
|
"job_notes": "Job Notes",
|
||||||
"key_tag": "Key Tag",
|
"key_tag": "Key Tag",
|
||||||
|
"mpi_animal_checklist": "MPI - Animal Checklist",
|
||||||
|
"mpi_eglass_auth": "MPI - eGlass Auth",
|
||||||
|
"mpi_final_acct_sheet": "MPI - Final Accounting Sheet",
|
||||||
"paint_grid": "Paint Grid",
|
"paint_grid": "Paint Grid",
|
||||||
"parts_label_single": "Parts Label - Single",
|
"parts_label_single": "Parts Label - Single",
|
||||||
"parts_list": "Parts List",
|
"parts_list": "Parts List",
|
||||||
@@ -2204,6 +2207,11 @@
|
|||||||
"work_in_progress_payables": "Work in Progress - Payables"
|
"work_in_progress_payables": "Work in Progress - Payables"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schedule": {
|
||||||
|
"labels": {
|
||||||
|
"manualevent": "Add Manual Event"
|
||||||
|
}
|
||||||
|
},
|
||||||
"scoreboard": {
|
"scoreboard": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"edit": "Edit"
|
"edit": "Edit"
|
||||||
|
|||||||
@@ -1991,6 +1991,9 @@
|
|||||||
"job_costing_ro": "",
|
"job_costing_ro": "",
|
||||||
"job_notes": "",
|
"job_notes": "",
|
||||||
"key_tag": "",
|
"key_tag": "",
|
||||||
|
"mpi_animal_checklist": "",
|
||||||
|
"mpi_eglass_auth": "",
|
||||||
|
"mpi_final_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_label_single": "",
|
"parts_label_single": "",
|
||||||
"parts_list": "",
|
"parts_list": "",
|
||||||
@@ -2204,6 +2207,11 @@
|
|||||||
"work_in_progress_payables": ""
|
"work_in_progress_payables": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schedule": {
|
||||||
|
"labels": {
|
||||||
|
"manualevent": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
"scoreboard": {
|
"scoreboard": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"edit": ""
|
"edit": ""
|
||||||
|
|||||||
@@ -1991,6 +1991,9 @@
|
|||||||
"job_costing_ro": "",
|
"job_costing_ro": "",
|
||||||
"job_notes": "",
|
"job_notes": "",
|
||||||
"key_tag": "",
|
"key_tag": "",
|
||||||
|
"mpi_animal_checklist": "",
|
||||||
|
"mpi_eglass_auth": "",
|
||||||
|
"mpi_final_acct_sheet": "",
|
||||||
"paint_grid": "",
|
"paint_grid": "",
|
||||||
"parts_label_single": "",
|
"parts_label_single": "",
|
||||||
"parts_list": "",
|
"parts_list": "",
|
||||||
@@ -2204,6 +2207,11 @@
|
|||||||
"work_in_progress_payables": ""
|
"work_in_progress_payables": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"schedule": {
|
||||||
|
"labels": {
|
||||||
|
"manualevent": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
"scoreboard": {
|
"scoreboard": {
|
||||||
"actions": {
|
"actions": {
|
||||||
"edit": ""
|
"edit": ""
|
||||||
|
|||||||
@@ -374,6 +374,39 @@ export const TemplateList = (type, context) => {
|
|||||||
CA_SK: true,
|
CA_SK: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mpi_final_acct_sheet: {
|
||||||
|
title: i18n.t("printcenter.jobs.mpi_final_acct_sheet"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "mpi_final_acct_sheet",
|
||||||
|
subject: i18n.t("printcenter.jobs.mpi_final_acct_sheet"),
|
||||||
|
disabled: false,
|
||||||
|
group: "post",
|
||||||
|
regions: {
|
||||||
|
CA_MB: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mpi_eglass_auth: {
|
||||||
|
title: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "mpi_eglass_auth",
|
||||||
|
subject: i18n.t("printcenter.jobs.mpi_eglass_auth"),
|
||||||
|
disabled: false,
|
||||||
|
group: "pre",
|
||||||
|
regions: {
|
||||||
|
CA_MB: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mpi_animal_checklist: {
|
||||||
|
title: i18n.t("printcenter.jobs.mpi_animal_checklist"),
|
||||||
|
description: "Thank You Letter by RO",
|
||||||
|
key: "mpi_animal_checklist",
|
||||||
|
subject: i18n.t("printcenter.jobs.mpi_animal_checklist"),
|
||||||
|
disabled: false,
|
||||||
|
group: "pre",
|
||||||
|
regions: {
|
||||||
|
CA_MB: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
// parts_label_multi: {
|
// parts_label_multi: {
|
||||||
// title: i18n.t("printcenter.jobs.parts_label_multi"),
|
// title: i18n.t("printcenter.jobs.parts_label_multi"),
|
||||||
// description: "Thank You Letter by RO",
|
// description: "Thank You Letter by RO",
|
||||||
|
|||||||
Reference in New Issue
Block a user