Misc Issues

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-01-11 15:11:28 -05:00
parent 49131ba68b
commit 663dfe0441
5 changed files with 54 additions and 35 deletions

View File

@@ -16,15 +16,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(FormDatePicker);
const dateFormat = "MM/DD/YYYY";
export function FormDatePicker({
bodyshop,
value,
onChange,
onBlur,
onlyFuture,
isDateOnly = true,
...restProps
}) {
export function FormDatePicker({bodyshop, value, onChange, onBlur, onlyFuture, isDateOnly = true, ...restProps }) {
const ref = useRef();
const handleChange = (newDate) => {

View File

@@ -12,7 +12,8 @@ import Icon, {
FileAddOutlined,
FileFilled,
HomeFilled,
ImportOutlined, InfoCircleOutlined,
ImportOutlined,
InfoCircleOutlined,
LineChartOutlined,
PaperClipOutlined,
PhoneOutlined,
@@ -64,7 +65,19 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(setModalContext({context: context, modal: "cardPayment"})),
});
function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOutStart, setBillEnterContext, setTimeTicketContext, setPaymentContext, setReportCenterContext, recentItems, setCardPaymentContext}) {
function Header({
handleMenuClick,
currentUser,
bodyshop,
selectedHeader,
signOutStart,
setBillEnterContext,
setTimeTicketContext,
setPaymentContext,
setReportCenterContext,
recentItems,
setCardPaymentContext
}) {
const {treatments: {ImEXPay, DmsAp, Simple_Inventory}} = useSplitTreatments({
attributes: {},
@@ -76,7 +89,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
useEffect(() => {
const isBeta = checkBeta();
setBetaSwitch(isBeta );
setBetaSwitch(isBeta);
}, []);
@@ -186,7 +199,7 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
{
key: 'receivables',
label: (<Link to="/manage/accounting/receivables">{t("menus.header.accounting-receivables")}</Link>)
}
},
]
if (!((bodyshop && bodyshop.cdk_dealerid) || (bodyshop && bodyshop.pbs_serialnumber)) || DmsAp.treatment === "on") {
@@ -206,17 +219,20 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
});
}
accountingExportChildren.push(
{
key: 'exportlogs',
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
},
accountingExportChildren.push({
type: 'divider',
}, {
key: 'exportlogs',
label: (<Link to="/manage/accounting/exportlogs">{t("menus.header.export-logs")}</Link>)
});
accountingChildren.push(
{
key: 'accountingexport',
icon: <ExportOutlined/>,
label: t("menus.header.export"),
children: accountingExportChildren
}
},
);
const menuItems = [
@@ -467,20 +483,20 @@ function Header({handleMenuClick, currentUser, bodyshop, selectedHeader, signOut
];
menuItems.push({
key: 'beta-switch',
style: { marginLeft: 'auto' },
label: (
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
<InfoCircleOutlined />
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
<Switch
checked={betaSwitch}
onChange={betaSwitchChange}
/>
</Tooltip>
)
});
menuItems.push({
key: 'beta-switch',
style: {marginLeft: 'auto'},
label: (
<Tooltip title="A faster more modern ImEX Online is ready for you to try! You can switch back at any time.">
<InfoCircleOutlined/>
<span style={{marginRight: 8}}>Try the new ImEX Online</span>
<Switch
checked={betaSwitch}
onChange={betaSwitchChange}
/>
</Tooltip>
)
});
return (
<Layout.Header>

View File

@@ -69,8 +69,9 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
}),
});
}
form.resetFields();
form.resetFields();
setLoading(false);
//Get the owner details, populate it all back into the job.
};

View File

@@ -588,6 +588,7 @@ export function JobsDetailHeaderActions({
const menuItems = [
{
key: 'schedule',
disabled: !jobInPreProduction || !job.converted || jobRO,
label: t("jobs.actions.schedule"),
onClick: () => {
@@ -603,6 +604,7 @@ export function JobsDetailHeaderActions({
},
},
{
key: 'cancelallappointments',
disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled,
label: job.status !== bodyshop.md_ro_statuses.default_scheduled ? (
t("menus.jobsactions.cancelallappointments")
@@ -648,6 +650,7 @@ export function JobsDetailHeaderActions({
)
},
{
key: 'intake',
disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO,
label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? (
t("jobs.actions.intake")
@@ -658,6 +661,7 @@ export function JobsDetailHeaderActions({
)
},
{
key: 'deliver',
disabled: !jobInProduction || jobRO,
label: !jobInProduction ? (
t("jobs.actions.deliver")
@@ -668,6 +672,7 @@ export function JobsDetailHeaderActions({
)
},
{
key: 'checklist',
disabled: !job.converted,
label: <Link to={`/manage/jobs/${job.id}/checklist`}>
{t("jobs.actions.viewchecklist")}
@@ -771,6 +776,7 @@ export function JobsDetailHeaderActions({
label: t("menus.jobsactions.duplicate"),
children: [
{
key: 'duplicate',
label: <Popconfirm
title={t("jobs.labels.duplicateconfirm")}
okText="Yes"
@@ -783,6 +789,7 @@ export function JobsDetailHeaderActions({
</Popconfirm>
},
{
key: 'duplicatenolines',
label: <Popconfirm
title={t("jobs.labels.duplicateconfirm")}
okText="Yes"
@@ -949,6 +956,7 @@ export function JobsDetailHeaderActions({
if (job && !job.converted) {
menuItems.push(
{
key: 'deletejob',
label: <Popconfirm
title={t("jobs.labels.deleteconfirm")}
okText={t("general.labels.yes")}
@@ -965,6 +973,7 @@ export function JobsDetailHeaderActions({
menuItems.push(
{
key: 'manualevent',
onClick: (e) => {
setVisibility(true);
},
@@ -974,6 +983,7 @@ export function JobsDetailHeaderActions({
if (!jobRO && job.converted) {
menuItems.push({
key: 'voidjob',
label: <RbacWrapper action="jobs:void" noauth>
<Popconfirm
title={t("jobs.labels.voidjob")}

View File

@@ -129,7 +129,7 @@ export function ScheduleJobModalContainer({
jobid: jobId,
bodyshopid: bodyshop.id,
start: dayjs(values.start),
end: dayjs(values.start).add(bodyshop.appt_length || 60, "minutes"),
end: dayjs(values.start).add(bodyshop.appt_length || 60, "minute"),
color: values.color,
note: values.note,
created_by: currentUser.email,