adjusted tabs and menu links
This commit is contained in:
36345
client/package-lock.json
generated
Normal file
36345
client/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -104,7 +104,9 @@ function Header({
|
||||
//theme="light"
|
||||
theme={"dark"}
|
||||
selectedKeys={[selectedHeader]}
|
||||
onClick={handleMenuClick}
|
||||
onClick={(e) => {
|
||||
handleMenuClick(e);
|
||||
}}
|
||||
subMenuCloseDelay={0.3}
|
||||
items={[
|
||||
{
|
||||
@@ -527,7 +529,7 @@ function Header({
|
||||
})),
|
||||
},
|
||||
]}
|
||||
></Menu>
|
||||
/>
|
||||
</Layout.Header>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,18 +11,18 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function HeaderContainer({ setUserLanguage }) {
|
||||
const handleMenuClick = (e) => {
|
||||
if (e.item.props.actiontype === "lang-select") {
|
||||
i18next.changeLanguage(e.key, (err, t) => {
|
||||
if (err) {
|
||||
logImEXEvent("language_change_error", { error: err });
|
||||
|
||||
return console.log("Error encountered when changing languages.", err);
|
||||
}
|
||||
logImEXEvent("language_change", { language: e.key });
|
||||
|
||||
setUserLanguage(e.key);
|
||||
});
|
||||
}
|
||||
console.log("Language Switching is currently disabled.");
|
||||
// TODO Enable language switching
|
||||
// if (e.item.props.actiontype === "lang-select") {
|
||||
// i18next.changeLanguage(e.key, (err, t) => {
|
||||
// if (err) {
|
||||
// logImEXEvent("language_change_error", { error: err });
|
||||
// return console.log("Error encountered when changing languages.", err);
|
||||
// }
|
||||
// logImEXEvent("language_change", { language: e.key });
|
||||
// setUserLanguage(e.key);
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
return <HeaderComponent handleMenuClick={handleMenuClick} />;
|
||||
|
||||
@@ -241,7 +241,12 @@ export function JobsConvertButton({
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Space wrap>
|
||||
<Button type="danger" onClick={() => form.submit()} loading={loading}>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => form.submit()}
|
||||
loading={loading}
|
||||
danger
|
||||
>
|
||||
{t("jobs.actions.convert")}
|
||||
</Button>
|
||||
<Button onClick={() => setVisible(false)}>
|
||||
@@ -258,7 +263,8 @@ export function JobsConvertButton({
|
||||
<Popover open={visible} content={popMenu}>
|
||||
<Button
|
||||
key="convert"
|
||||
type="danger"
|
||||
type="primary"
|
||||
danger
|
||||
// style={{ display: job.converted ? "none" : "" }}
|
||||
disabled={job.converted || jobRO}
|
||||
loading={loading}
|
||||
|
||||
@@ -75,9 +75,10 @@ function OwnerDetailFormContainer({ owner, refetch }) {
|
||||
title={t("owners.labels.deleteconfirm")}
|
||||
>
|
||||
<Button
|
||||
type="danger"
|
||||
type="primary"
|
||||
loading={loading}
|
||||
disabled={owner.jobs.length !== 0}
|
||||
danger
|
||||
>
|
||||
{t("general.actions.delete")}
|
||||
</Button>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PageHeader } from '@ant-design/pro-layout';
|
||||
import { PageHeader } from "@ant-design/pro-layout";
|
||||
import { Button, Form, Input, Space } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -65,10 +65,11 @@ export function PhonebookFormComponent({
|
||||
{t("general.actions.save")}
|
||||
</Button>
|
||||
<Button
|
||||
type="danger"
|
||||
type="primary"
|
||||
disabled={hasNoAccess}
|
||||
onClick={handleDelete}
|
||||
loading={formLoading}
|
||||
danger
|
||||
>
|
||||
{t("general.actions.delete")}
|
||||
</Button>
|
||||
|
||||
@@ -76,7 +76,12 @@ export function ProductionListSaveConfigButton({
|
||||
</Form.Item>
|
||||
|
||||
<Space wrap>
|
||||
<Button type="danger" onClick={() => form.submit()} loading={loading}>
|
||||
<Button
|
||||
type="primary"
|
||||
danger
|
||||
onClick={() => form.submit()}
|
||||
loading={loading}
|
||||
>
|
||||
{t("general.actions.save")}
|
||||
</Button>
|
||||
<Button onClick={() => setVisible(false)}>
|
||||
|
||||
@@ -43,47 +43,62 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<Tabs>
|
||||
<Tabs.TabPane key="general" tab={t("bodyshop.labels.shopinfo")}>
|
||||
<ShopInfoGeneral form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="speedprint" tab={t("bodyshop.labels.speedprint")}>
|
||||
<ShopInfoSpeedPrint form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="rbac" tab={t("bodyshop.labels.rbac")}>
|
||||
<ShopInfoRbacComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="roStatus" tab={t("bodyshop.labels.jobstatuses")}>
|
||||
<ShopInfoROStatusComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="scheduling" tab={t("bodyshop.labels.scheduling")}>
|
||||
<ShopInfoSchedulingComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
key="orderStatus"
|
||||
tab={t("bodyshop.labels.orderstatuses")}
|
||||
>
|
||||
<ShopInfoOrderStatusComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
key="responsibilityCenters"
|
||||
tab={t("bodyshop.labels.responsibilitycenters.title")}
|
||||
>
|
||||
<ShopInfoResponsibilityCenterComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
|
||||
<Tabs.TabPane key="checklists" tab={t("bodyshop.labels.checklists")}>
|
||||
<ShopInfoIntakeChecklistComponent form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="laborrates" tab={t("bodyshop.labels.laborrates")}>
|
||||
<ShopInfoLaborRates form={form} />
|
||||
</Tabs.TabPane>
|
||||
{CriticalPartsScanning.treatment === "on" && (
|
||||
<Tabs.TabPane key="partsscan" tab={t("bodyshop.labels.partsscan")}>
|
||||
<ShopInfoPartsScan form={form} />
|
||||
</Tabs.TabPane>
|
||||
)}
|
||||
</Tabs>
|
||||
<Tabs
|
||||
items={[
|
||||
{
|
||||
key: "general",
|
||||
children: <ShopInfoGeneral form={form} />,
|
||||
label: <span>{t("bodyshop.labels.shopinfo")}</span>,
|
||||
},
|
||||
{
|
||||
key: "speedprint",
|
||||
children: <ShopInfoSpeedPrint form={form} />,
|
||||
label: <span>{t("bodyshop.labels.speedprint")}</span>,
|
||||
},
|
||||
{
|
||||
key: "rbac",
|
||||
children: <ShopInfoRbacComponent form={form} />,
|
||||
label: <span>{t("bodyshop.labels.rbac")}</span>,
|
||||
},
|
||||
{
|
||||
key: "roStatus",
|
||||
children: <ShopInfoROStatusComponent form={form} />,
|
||||
label: <span>{t("bodyshop.labels.jobstatuses")}</span>,
|
||||
},
|
||||
{
|
||||
key: "scheduling",
|
||||
children: <ShopInfoSchedulingComponent form={form} />,
|
||||
label: <span>{t("bodyshop.labels.scheduling")}</span>,
|
||||
},
|
||||
{
|
||||
key: "orderStatus",
|
||||
children: <ShopInfoOrderStatusComponent form={form} />,
|
||||
label: <span>{t("bodyshop.labels.orderstatuses")}</span>,
|
||||
},
|
||||
{
|
||||
key: "responsibilityCenters",
|
||||
children: <ShopInfoResponsibilityCenterComponent form={form} />,
|
||||
label: (
|
||||
<span>{t("bodyshop.labels.responsibilitycenters.title")}</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "checklists",
|
||||
children: <ShopInfoIntakeChecklistComponent form={form} />,
|
||||
label: <span>{t("bodyshop.labels.checklists")}</span>,
|
||||
},
|
||||
{
|
||||
key: "laborrates",
|
||||
children: <ShopInfoLaborRates form={form} />,
|
||||
label: <span>{t("bodyshop.labels.laborrates")}</span>,
|
||||
},
|
||||
CriticalPartsScanning.treatment === "on" && {
|
||||
key: "partsscan",
|
||||
children: <ShopInfoPartsScan form={form} />,
|
||||
label: <span>{t("bodyshop.labels.partsscan")}</span>,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,8 @@ function VehicleDetailFormContainer({ vehicle, refetch }) {
|
||||
title={t("vehicles.labels.deleteconfirm")}
|
||||
>
|
||||
<Button
|
||||
type="danger"
|
||||
type="primary"
|
||||
danger
|
||||
loading={loading}
|
||||
disabled={vehicle.jobs.length !== 0}
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { useApolloClient } from "@apollo/client";
|
||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||
import { PageHeader } from '@ant-design/pro-layout';
|
||||
import { PageHeader } from "@ant-design/pro-layout";
|
||||
import { Button, Divider, Form, Input, InputNumber, Space, Switch } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -69,7 +69,8 @@ export function VendorsFormComponent({
|
||||
{t("general.actions.save")}
|
||||
</Button>
|
||||
<Button
|
||||
type="danger"
|
||||
type="primary"
|
||||
danger
|
||||
disabled={selectedvendor === "new"}
|
||||
onClick={handleDelete}
|
||||
loading={formLoading}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { useApolloClient, useMutation } from "@apollo/client";
|
||||
import { PageHeader } from '@ant-design/pro-layout';
|
||||
import { PageHeader } from "@ant-design/pro-layout";
|
||||
import {
|
||||
Alert,
|
||||
Button,
|
||||
@@ -164,7 +164,12 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
cancelText={t("general.labels.no")}
|
||||
title={t("jobs.labels.closeconfirm")}
|
||||
>
|
||||
<Button loading={loading} type="danger" disabled={jobRO}>
|
||||
<Button
|
||||
loading={loading}
|
||||
type="primary"
|
||||
danger
|
||||
disabled={jobRO}
|
||||
>
|
||||
{t("general.actions.close")}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
@@ -8,7 +8,7 @@ import Icon, {
|
||||
HistoryOutlined,
|
||||
SyncOutlined,
|
||||
} from "@ant-design/icons";
|
||||
import { PageHeader } from '@ant-design/pro-layout';
|
||||
import { PageHeader } from "@ant-design/pro-layout";
|
||||
import { Button, Divider, Form, notification, Space, Tabs } from "antd";
|
||||
import Axios from "axios";
|
||||
import moment from "moment";
|
||||
@@ -90,7 +90,11 @@ export function JobsDetailPage({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
job: {
|
||||
...UndefinedToNull(values, ["alt_transport", "category", "referral_source"]),
|
||||
...UndefinedToNull(values, [
|
||||
"alt_transport",
|
||||
"category",
|
||||
"referral_source",
|
||||
]),
|
||||
parts_tax_rates: {
|
||||
...job.parts_tax_rates,
|
||||
...values.parts_tax_rates,
|
||||
@@ -240,135 +244,126 @@ export function JobsDetailPage({
|
||||
<JobsDetailHeader job={job} />
|
||||
<Divider type="horizontal" />
|
||||
<FormFieldsChanged form={form} />
|
||||
|
||||
<Tabs
|
||||
defaultActiveKey={search.tab}
|
||||
onChange={(key) => history.push({ search: `?tab=${key}` })}
|
||||
tabBarStyle={{ fontWeight: "bold", borderBottom: "10px" }}
|
||||
>
|
||||
<Tabs.TabPane
|
||||
forceRender
|
||||
tab={
|
||||
<span>
|
||||
<Icon component={FaShieldAlt} />
|
||||
{t("menus.jobsdetail.general")}
|
||||
</span>
|
||||
}
|
||||
key="general"
|
||||
>
|
||||
<JobsDetailGeneral job={job} form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
forceRender
|
||||
tab={
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
{t("menus.jobsdetail.repairdata")}
|
||||
</span>
|
||||
}
|
||||
key="repairdata"
|
||||
>
|
||||
<JobsLinesContainer
|
||||
job={job}
|
||||
joblines={job.joblines}
|
||||
refetch={refetch}
|
||||
form={form}
|
||||
/>
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
forceRender
|
||||
tab={
|
||||
<span>
|
||||
<DollarCircleOutlined />
|
||||
{t("menus.jobsdetail.rates")}
|
||||
</span>
|
||||
}
|
||||
key="rates"
|
||||
>
|
||||
<JobsDetailRates job={job} form={form} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<DollarCircleOutlined />
|
||||
{t("menus.jobsdetail.totals")}
|
||||
</span>
|
||||
}
|
||||
key="totals"
|
||||
>
|
||||
<JobsDetailTotals job={job} refetch={refetch} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<ToolFilled />
|
||||
{t("menus.jobsdetail.partssublet")}
|
||||
</span>
|
||||
}
|
||||
key="partssublet"
|
||||
>
|
||||
<JobsDetailPliContainer job={job} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<Icon component={FaHardHat} />
|
||||
{t("menus.jobsdetail.labor")}
|
||||
</span>
|
||||
}
|
||||
key="labor"
|
||||
>
|
||||
<JobsDetailLaborContainer job={job} jobId={job.id} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
forceRender
|
||||
tab={
|
||||
<span>
|
||||
<CalendarFilled />
|
||||
{t("menus.jobsdetail.dates")}
|
||||
</span>
|
||||
}
|
||||
key="dates"
|
||||
>
|
||||
<JobsDetailDatesComponent job={job} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<FileImageFilled />
|
||||
{t("jobs.labels.documents")}
|
||||
</span>
|
||||
}
|
||||
key="documents"
|
||||
>
|
||||
{bodyshop.uselocalmediaserver ? (
|
||||
<JobsDocumentsLocalGallery job={job} />
|
||||
) : (
|
||||
<JobsDocumentsGalleryContainer jobId={job.id} />
|
||||
)}
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<Icon component={FaRegStickyNote} />
|
||||
{t("jobs.labels.notes")}
|
||||
</span>
|
||||
}
|
||||
key="notes"
|
||||
>
|
||||
<JobNotesContainer jobId={job.id} />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane
|
||||
tab={
|
||||
<span>
|
||||
<HistoryOutlined />
|
||||
{t("jobs.labels.audit")}
|
||||
</span>
|
||||
}
|
||||
key="audit"
|
||||
>
|
||||
<JobAuditTrail jobId={job.id} />
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
items={[
|
||||
{
|
||||
key: "general",
|
||||
children: <JobsDetailGeneral job={job} form={form} />,
|
||||
label: (
|
||||
<span>
|
||||
<Icon component={FaShieldAlt} />
|
||||
{t("menus.jobsdetail.general")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "repairdata",
|
||||
children: (
|
||||
<JobsLinesContainer
|
||||
job={job}
|
||||
joblines={job.joblines}
|
||||
refetch={refetch}
|
||||
form={form}
|
||||
/>
|
||||
),
|
||||
label: (
|
||||
<span>
|
||||
<BarsOutlined />
|
||||
{t("menus.jobsdetail.repairdata")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "rates",
|
||||
children: <JobsDetailRates job={job} form={form} />,
|
||||
label: (
|
||||
<span>
|
||||
<DollarCircleOutlined />
|
||||
{t("menus.jobsdetail.rates")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "totals",
|
||||
children: <JobsDetailTotals job={job} refetch={refetch} />,
|
||||
label: (
|
||||
<span>
|
||||
<DollarCircleOutlined />
|
||||
{t("menus.jobsdetail.totals")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "partssublet",
|
||||
children: <JobsDetailPliContainer job={job} />,
|
||||
label: (
|
||||
<span>
|
||||
<ToolFilled />
|
||||
{t("menus.jobsdetail.partssublet")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "labor",
|
||||
children: <JobsDetailLaborContainer job={job} jobId={job.id} />,
|
||||
label: (
|
||||
<span>
|
||||
<Icon component={FaHardHat} />
|
||||
{t("menus.jobsdetail.labor")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "dates",
|
||||
children: <JobsDetailDatesComponent job={job} />,
|
||||
label: (
|
||||
<span>
|
||||
<CalendarFilled />
|
||||
{t("menus.jobsdetail.dates")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "documents",
|
||||
children: bodyshop.uselocalmediaserver ? (
|
||||
<JobsDocumentsLocalGallery job={job} />
|
||||
) : (
|
||||
<JobsDocumentsGalleryContainer jobId={job.id} />
|
||||
),
|
||||
|
||||
label: (
|
||||
<span>
|
||||
<FileImageFilled />
|
||||
{t("jobs.labels.documents")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "notes",
|
||||
children: <JobNotesContainer jobId={job.id} />,
|
||||
label: (
|
||||
<span>
|
||||
<Icon component={FaRegStickyNote} />
|
||||
{t("jobs.labels.notes")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: "audit",
|
||||
children: <JobAuditTrail jobId={job.id} />,
|
||||
label: (
|
||||
<span>
|
||||
<HistoryOutlined />
|
||||
{t("jobs.labels.audit")}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -37,20 +37,30 @@ export function ShopPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
|
||||
|
||||
return (
|
||||
<RbacWrapper action="shop:config">
|
||||
<Tabs>
|
||||
<Tabs.TabPane tab={t("bodyshop.labels.shopinfo")} key="info">
|
||||
<ShopInfoContainer />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane tab={t("bodyshop.labels.employees")} key="employees">
|
||||
<ShopEmployeesContainer />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane tab={t("bodyshop.labels.licensing")} key="licensing">
|
||||
<ShopInfoUsersComponent />
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane tab={t("bodyshop.labels.csiq")} key="csiq">
|
||||
<ShopCsiConfig />
|
||||
</Tabs.TabPane>
|
||||
</Tabs>
|
||||
<Tabs
|
||||
items={[
|
||||
{
|
||||
key: "info",
|
||||
children: <ShopInfoContainer />,
|
||||
label: <span>{t("bodyshop.labels.shopinfo")}</span>,
|
||||
},
|
||||
{
|
||||
key: "employees",
|
||||
children: <ShopEmployeesContainer />,
|
||||
label: <span>{t("bodyshop.labels.employees")}</span>,
|
||||
},
|
||||
{
|
||||
key: "licensing",
|
||||
children: <ShopInfoUsersComponent />,
|
||||
label: <span>{t("bodyshop.labels.licensing")}</span>,
|
||||
},
|
||||
{
|
||||
key: "csiq",
|
||||
children: <ShopCsiConfig />,
|
||||
label: <span>{t("bodyshop.labels.csiq")}</span>,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</RbacWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
18084
client/yarn.lock
18084
client/yarn.lock
File diff suppressed because it is too large
Load Diff
11667
package-lock.json
generated
11667
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user