Further UI Updates
This commit is contained in:
@@ -9207,6 +9207,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>status</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>usage</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>vehicle</name>
|
<name>vehicle</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -24132,6 +24174,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>relatedjobs</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>updateowner</name>
|
<name>updateowner</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -29159,6 +29222,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>timetickets</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>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
@@ -31765,6 +31849,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>relatedjobs</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>updatevehicle</name>
|
<name>updatevehicle</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ export default function AccountingPayablesTableComponent({ loading, bills }) {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top", pageSize: 50 }}
|
pagination={{ position: "top", pageSize: 50 }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ export default function AccountingPayablesTableComponent({
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top", pageSize: 50 }}
|
pagination={{ position: "top", pageSize: 50 }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import AuditTrailValuesComponent from "../audit-trail-values/audit-trail-values.
|
|||||||
export default function AuditTrailListComponent({ loading, data }) {
|
export default function AuditTrailListComponent({ loading, data }) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
filteredInfo: {}
|
filteredInfo: {},
|
||||||
});
|
});
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -22,7 +22,7 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
),
|
),
|
||||||
sorter: (a, b) => a.created - b.created,
|
sorter: (a, b) => a.created - b.created,
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "created" && state.sortedInfo.order
|
state.sortedInfo.columnKey === "created" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("audit.fields.operation"),
|
title: t("audit.fields.operation"),
|
||||||
@@ -31,7 +31,7 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
width: "10%",
|
width: "10%",
|
||||||
sorter: (a, b) => alphaSort(a.operation, b.operation),
|
sorter: (a, b) => alphaSort(a.operation, b.operation),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "operation" && state.sortedInfo.order
|
state.sortedInfo.columnKey === "operation" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("audit.fields.values"),
|
title: t("audit.fields.values"),
|
||||||
@@ -43,7 +43,7 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
oldV={record.old_val}
|
oldV={record.old_val}
|
||||||
newV={record.new_val}
|
newV={record.new_val}
|
||||||
/>
|
/>
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("audit.fields.useremail"),
|
title: t("audit.fields.useremail"),
|
||||||
@@ -52,19 +52,19 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
width: "10%",
|
width: "10%",
|
||||||
sorter: (a, b) => alphaSort(a.useremail, b.useremail),
|
sorter: (a, b) => alphaSort(a.useremail, b.useremail),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "useremail" && state.sortedInfo.order
|
state.sortedInfo.columnKey === "useremail" && state.sortedInfo.order,
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const formItemLayout = {
|
const formItemLayout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 12 },
|
xs: { span: 12 },
|
||||||
sm: { span: 5 }
|
sm: { span: 5 },
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 12 }
|
sm: { span: 12 },
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
@@ -74,9 +74,8 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
<Table
|
<Table
|
||||||
{...formItemLayout}
|
{...formItemLayout}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
pagination={{ position: "top", defaultPageSize: 25 }}
|
||||||
columns={columns.map(item => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { EyeFilled, SyncOutlined } from "@ant-design/icons";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Card,
|
||||||
Checkbox,
|
Checkbox,
|
||||||
Descriptions,
|
Descriptions,
|
||||||
|
Drawer,
|
||||||
|
Grid,
|
||||||
Input,
|
Input,
|
||||||
|
PageHeader,
|
||||||
Space,
|
Space,
|
||||||
Table,
|
Table,
|
||||||
Typography,
|
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -45,7 +48,21 @@ export function BillsListTableComponent({
|
|||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [selectedBillLinesByBill, setSelectedBillLinesByBill] = useState({});
|
const [selectedBillLinesByBill, setSelectedBillLinesByBill] = useState({});
|
||||||
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
|
.filter((screen) => !!screen[1])
|
||||||
|
.slice(-1)[0];
|
||||||
|
|
||||||
|
const bpoints = {
|
||||||
|
xs: "100%",
|
||||||
|
sm: "100%",
|
||||||
|
md: "100%",
|
||||||
|
lg: "75%",
|
||||||
|
xl: "75%",
|
||||||
|
xxl: "65%",
|
||||||
|
};
|
||||||
|
const drawerPercentage = selectedBreakpoint
|
||||||
|
? bpoints[selectedBreakpoint[0]]
|
||||||
|
: "100%";
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
});
|
});
|
||||||
@@ -54,6 +71,34 @@ export function BillsListTableComponent({
|
|||||||
const Templates = TemplateList("bill");
|
const Templates = TemplateList("bill");
|
||||||
const bills = billsQuery.data ? billsQuery.data.bills : [];
|
const bills = billsQuery.data ? billsQuery.data.bills : [];
|
||||||
const { refetch } = billsQuery;
|
const { refetch } = billsQuery;
|
||||||
|
const recordActions = (record, showView = false) => (
|
||||||
|
<Space wrap>
|
||||||
|
{showView && (
|
||||||
|
<Button onClick={() => handleOnRowClick(record)}>
|
||||||
|
<EyeFilled />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{record.exported ? (
|
||||||
|
<Button disabled>{t("bills.actions.edit")}</Button>
|
||||||
|
) : (
|
||||||
|
<Link
|
||||||
|
to={`/manage/bills?billid=${record.id}&vendorid=${record.vendorid}`}
|
||||||
|
>
|
||||||
|
<Button>{t("bills.actions.edit")}</Button>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
<BillDeleteButton bill={record} />
|
||||||
|
{record.isinhouse && (
|
||||||
|
<PrintWrapperComponent
|
||||||
|
templateObject={{
|
||||||
|
name: Templates.inhouse_invoice.key,
|
||||||
|
variables: { id: record.id },
|
||||||
|
}}
|
||||||
|
messageObject={{ subject: Templates.inhouse_invoice.subject }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t("bills.fields.vendorname"),
|
title: t("bills.fields.vendorname"),
|
||||||
@@ -116,31 +161,10 @@ export function BillsListTableComponent({
|
|||||||
title: t("general.labels.actions"),
|
title: t("general.labels.actions"),
|
||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => recordActions(record, true),
|
||||||
<Space wrap>
|
|
||||||
{record.exported ? (
|
|
||||||
<Button disabled>{t("bills.actions.edit")}</Button>
|
|
||||||
) : (
|
|
||||||
<Link
|
|
||||||
to={`/manage/bills?billid=${record.id}&vendorid=${record.vendorid}`}
|
|
||||||
>
|
|
||||||
<Button>{t("bills.actions.edit")}</Button>
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
<BillDeleteButton bill={record} />
|
|
||||||
{record.isinhouse && (
|
|
||||||
<PrintWrapperComponent
|
|
||||||
templateObject={{
|
|
||||||
name: Templates.inhouse_invoice.key,
|
|
||||||
variables: { id: record.id },
|
|
||||||
}}
|
|
||||||
messageObject={{ subject: Templates.inhouse_invoice.subject }}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
const selectedBillRecord = bills.find((r) => r.id === selectedBill);
|
||||||
|
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
@@ -240,7 +264,6 @@ export function BillsListTableComponent({
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleOnBillrowclick = (selectedRows) => {
|
const handleOnBillrowclick = (selectedRows) => {
|
||||||
setSelectedBillLinesByBill({
|
setSelectedBillLinesByBill({
|
||||||
...selectedBillLinesByBill,
|
...selectedBillLinesByBill,
|
||||||
@@ -249,10 +272,14 @@ export function BillsListTableComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Typography.Title level={3}>{`${t("bills.fields.invoice_number")} ${
|
<PageHeader
|
||||||
record.invoice_number
|
title={
|
||||||
}`}</Typography.Title>
|
record &&
|
||||||
|
`${t("bills.fields.invoice_number")} ${record.invoice_number}`
|
||||||
|
}
|
||||||
|
extra={recordActions(record)}
|
||||||
|
/>
|
||||||
<Descriptions>
|
<Descriptions>
|
||||||
<Descriptions.Item label={t("bills.fields.federal_tax_rate")}>
|
<Descriptions.Item label={t("bills.fields.federal_tax_rate")}>
|
||||||
{`${record.federal_tax_rate}%` || ""}
|
{`${record.federal_tax_rate}%` || ""}
|
||||||
@@ -301,9 +328,7 @@ export function BillsListTableComponent({
|
|||||||
{t("bills.actions.return")}
|
{t("bills.actions.return")}
|
||||||
</Button>
|
</Button>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
scroll={{ x: "50%", y: "40rem" }}
|
scroll={{ x: "50%", y: "40rem" }}
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={record.billlines}
|
dataSource={record.billlines}
|
||||||
@@ -318,94 +343,77 @@ export function BillsListTableComponent({
|
|||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Card
|
||||||
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
|
title={t("bills.labels.bills")}
|
||||||
|
extra={
|
||||||
|
<Space wrap>
|
||||||
|
<Button onClick={() => refetch()}>
|
||||||
|
<SyncOutlined />
|
||||||
|
</Button>
|
||||||
|
{job ? (
|
||||||
|
<>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setBillEnterContext({
|
||||||
|
actions: { refetch: billsQuery.refetch },
|
||||||
|
context: {
|
||||||
|
job,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("jobs.actions.postbills")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setReconciliationContext({
|
||||||
|
actions: { refetch: billsQuery.refetch },
|
||||||
|
context: {
|
||||||
|
job,
|
||||||
|
bills: (billsQuery.data && billsQuery.data.bills) || [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("jobs.actions.reconcile")}
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
<Input.Search
|
||||||
|
placeholder={t("general.labels.search")}
|
||||||
|
onChange={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Drawer
|
||||||
|
placement="right"
|
||||||
|
onClose={() => handleOnRowClick(null)}
|
||||||
|
visible={selectedBill}
|
||||||
|
//getContainer={false}
|
||||||
|
style={{ position: "absolute" }}
|
||||||
|
closable
|
||||||
|
width={drawerPercentage}
|
||||||
|
>
|
||||||
|
{selectedBillRecord && rowExpander(selectedBillRecord)}
|
||||||
|
</Drawer>
|
||||||
<Table
|
<Table
|
||||||
loading={billsQuery.loading}
|
loading={billsQuery.loading}
|
||||||
size="small"
|
scroll={{ x: true, y: "50rem" }}
|
||||||
title={() => (
|
|
||||||
<div className="imex-table-header">
|
|
||||||
<Button onClick={() => refetch()}>
|
|
||||||
<SyncOutlined />
|
|
||||||
</Button>
|
|
||||||
{job ? (
|
|
||||||
<div>
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
setBillEnterContext({
|
|
||||||
actions: { refetch: billsQuery.refetch },
|
|
||||||
context: {
|
|
||||||
job,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("jobs.actions.postbills")}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
setReconciliationContext({
|
|
||||||
actions: { refetch: billsQuery.refetch },
|
|
||||||
context: {
|
|
||||||
job,
|
|
||||||
bills: (billsQuery.data && billsQuery.data.bills) || [],
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("jobs.actions.reconcile")}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
<div className="imex-table-header__search">
|
|
||||||
<Input.Search
|
|
||||||
placeholder={t("general.labels.search")}
|
|
||||||
onChange={(e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
scroll={{ x: "50%", y: "40rem" }}
|
|
||||||
expandedRowRender={rowExpander}
|
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={bills}
|
dataSource={bills}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
expandable={{
|
|
||||||
expandedRowKeys: [selectedBill],
|
|
||||||
onExpand: (expanded, record) => {
|
|
||||||
handleOnRowClick(expanded ? record : null);
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
rowSelection={{
|
|
||||||
onSelect: (record) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
},
|
|
||||||
selectedRowKeys: [selectedBill],
|
|
||||||
type: "radio",
|
|
||||||
}}
|
|
||||||
onRow={(record, rowIndex) => {
|
|
||||||
return {
|
|
||||||
onClick: (event) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
}, // click row
|
|
||||||
onDoubleClick: (event) => {}, // double click row
|
|
||||||
onContextMenu: (event) => {}, // right button click row
|
|
||||||
onMouseEnter: (event) => {}, // mouse enter row
|
|
||||||
onMouseLeave: (event) => {}, // mouse leave row
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ export default function BillsVendorsList() {
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ export function ChatConversationListComponent({
|
|||||||
<div className="chat-list-container">
|
<div className="chat-list-container">
|
||||||
<List
|
<List
|
||||||
bordered
|
bordered
|
||||||
size="small"
|
|
||||||
dataSource={conversationList}
|
dataSource={conversationList}
|
||||||
renderItem={(item) => (
|
renderItem={(item) => (
|
||||||
<List.Item
|
<List.Item
|
||||||
|
|||||||
@@ -77,10 +77,7 @@ export function ChatMediaSelector({
|
|||||||
visible={visible}
|
visible={visible}
|
||||||
onVisibleChange={handleVisibleChange}
|
onVisibleChange={handleVisibleChange}
|
||||||
>
|
>
|
||||||
<Badge
|
<Badge count={selectedMedia.filter((s) => s.isSelected).length}>
|
||||||
size="small"
|
|
||||||
count={selectedMedia.filter((s) => s.isSelected).length}
|
|
||||||
>
|
|
||||||
<PictureFilled style={{ margin: "0 .5rem" }} />
|
<PictureFilled style={{ margin: "0 .5rem" }} />
|
||||||
</Badge>
|
</Badge>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ export default function ContractsCarsComponent({
|
|||||||
onChange={(e) => setState({ ...state, search: e.target.value })}
|
onChange={(e) => setState({ ...state, search: e.target.value })}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export default function ContractCourtesyCarBlock({ courtesyCar }) {
|
|||||||
return (
|
return (
|
||||||
<Link to={`/manage/courtesycars/${courtesyCar && courtesyCar.id}`}>
|
<Link to={`/manage/courtesycars/${courtesyCar && courtesyCar.id}`}>
|
||||||
<Card title={t("courtesycars.labels.courtesycar")}>
|
<Card title={t("courtesycars.labels.courtesycar")}>
|
||||||
<Descriptions size="small" column={1}>
|
<Descriptions column={1}>
|
||||||
<Descriptions.Item label={t("courtesycars.fields.fleetnumber")}>
|
<Descriptions.Item label={t("courtesycars.fields.fleetnumber")}>
|
||||||
{(courtesyCar && courtesyCar.fleetnumber) || ""}
|
{(courtesyCar && courtesyCar.fleetnumber) || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
@@ -15,9 +15,9 @@ export default function ContractCourtesyCarBlock({ courtesyCar }) {
|
|||||||
{(courtesyCar && courtesyCar.plate) || ""}
|
{(courtesyCar && courtesyCar.plate) || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("courtesycars.labels.vehicle")}>
|
<Descriptions.Item label={t("courtesycars.labels.vehicle")}>
|
||||||
{`${(courtesyCar && courtesyCar.year) || ""} ${(courtesyCar &&
|
{`${(courtesyCar && courtesyCar.year) || ""} ${
|
||||||
courtesyCar.make) ||
|
(courtesyCar && courtesyCar.make) || ""
|
||||||
""} ${(courtesyCar && courtesyCar.model) || ""}`}
|
} ${(courtesyCar && courtesyCar.model) || ""}`}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -8,17 +8,19 @@ export default function ContractJobBlock({ job }) {
|
|||||||
return (
|
return (
|
||||||
<Link to={`/manage/jobs/${job && job.id}`}>
|
<Link to={`/manage/jobs/${job && job.id}`}>
|
||||||
<Card title={t("jobs.labels.job")}>
|
<Card title={t("jobs.labels.job")}>
|
||||||
<Descriptions size="small" column={1}>
|
<Descriptions column={1}>
|
||||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||||
{(job && job.ro_number) || ""}
|
{(job && job.ro_number) || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
||||||
{`${(job && job.v_model_yr) || ""} ${(job && job.v_make_desc) ||
|
{`${(job && job.v_model_yr) || ""} ${
|
||||||
""} ${(job && job.v_model_desc) || ""}`}
|
(job && job.v_make_desc) || ""
|
||||||
|
} ${(job && job.v_model_desc) || ""}`}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label={t("jobs.fields.owner")}>
|
<Descriptions.Item label={t("jobs.fields.owner")}>
|
||||||
{`${(job && job.ownr_fn) || ""} ${(job && job.ownr_ln) ||
|
{`${(job && job.ownr_fn) || ""} ${(job && job.ownr_ln) || ""} ${
|
||||||
""} ${(job && job.ownr_co_nm) || ""}`}
|
(job && job.ownr_co_nm) || ""
|
||||||
|
}`}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ export default function ContractsJobsComponent({
|
|||||||
onChange={(e) => setState({ ...state, search: e.target.value })}
|
onChange={(e) => setState({ ...state, search: e.target.value })}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
size="small"
|
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
defaultPageSize: 3,
|
defaultPageSize: 3,
|
||||||
|
|||||||
@@ -144,7 +144,6 @@ export default function ContractsList({ loading, contracts, refetch, total }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
size="small"
|
|
||||||
scroll={{ x: "50%", y: "40rem" }}
|
scroll={{ x: "50%", y: "40rem" }}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table } from "antd";
|
import { Card, Table } from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -84,19 +84,20 @@ export default function CourtesyCarContractListComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card title={t("menus.header.courtesycars-contracts")}>
|
||||||
size="small"
|
<Table
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: totalContracts,
|
total: totalContracts,
|
||||||
}}
|
}}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={contracts}
|
dataSource={contracts}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
/>
|
/>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Form, Input, InputNumber } from "antd";
|
import { Button, Form, Input, InputNumber, PageHeader } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
||||||
@@ -13,15 +13,21 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<PageHeader
|
||||||
type="primary"
|
title={t("menus.header.courtesycars")}
|
||||||
loading={saveLoading}
|
extra={
|
||||||
onClick={() => form.submit()}
|
<Button
|
||||||
>
|
type="primary"
|
||||||
{t("general.actions.save")}
|
loading={saveLoading}
|
||||||
</Button>
|
onClick={() => form.submit()}
|
||||||
|
>
|
||||||
|
{t("general.actions.save")}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<FormFieldsChanged form={form} />
|
<FormFieldsChanged form={form} />
|
||||||
<LayoutFormRow>
|
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.make")}
|
label={t("courtesycars.fields.make")}
|
||||||
name="make"
|
name="make"
|
||||||
@@ -95,7 +101,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<LayoutFormRow>
|
<LayoutFormRow header={t("courtesycars.labels.usage")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.mileage")}
|
label={t("courtesycars.fields.mileage")}
|
||||||
name="mileage"
|
name="mileage"
|
||||||
@@ -139,19 +145,21 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
<FormDatePicker />
|
<FormDatePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Form.Item
|
|
||||||
label={t("courtesycars.fields.fuel")}
|
<LayoutFormRow header={t("courtesycars.labels.status")}>
|
||||||
name="fuel"
|
<Form.Item
|
||||||
rules={[
|
span={24}
|
||||||
{
|
label={t("courtesycars.fields.fuel")}
|
||||||
required: true,
|
name="fuel"
|
||||||
message: t("general.validation.required"),
|
rules={[
|
||||||
},
|
{
|
||||||
]}
|
required: true,
|
||||||
>
|
message: t("general.validation.required"),
|
||||||
<CourtesyCarFuelSlider />
|
},
|
||||||
</Form.Item>
|
]}
|
||||||
<LayoutFormRow>
|
>
|
||||||
|
<CourtesyCarFuelSlider />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.status")}
|
label={t("courtesycars.fields.status")}
|
||||||
name="status"
|
name="status"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table, Button, Input } from "antd";
|
import { Table, Button, Input, Card, Space } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@@ -118,10 +118,10 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
)
|
)
|
||||||
: courtesycars;
|
: courtesycars;
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("menus.header.courtesycars")}
|
||||||
title={() => (
|
extra={
|
||||||
<div className="imex-table-header">
|
<Space wrap>
|
||||||
<Button onClick={() => refetch()}>
|
<Button onClick={() => refetch()}>
|
||||||
<SyncOutlined />
|
<SyncOutlined />
|
||||||
</Button>
|
</Button>
|
||||||
@@ -137,14 +137,17 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
value={searchText}
|
value={searchText}
|
||||||
enterButton
|
enterButton
|
||||||
/>
|
/>
|
||||||
</div>
|
</Space>
|
||||||
)}
|
}
|
||||||
size="small"
|
>
|
||||||
pagination={{ position: "top" }}
|
<Table
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
loading={loading}
|
||||||
rowKey="id"
|
pagination={{ position: "top" }}
|
||||||
dataSource={tableData}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
onChange={handleTableChange}
|
rowKey="id"
|
||||||
/>
|
dataSource={tableData}
|
||||||
|
onChange={handleTableChange}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ export default function CsiResponseListPaginated({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size="small"
|
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import Icon, {
|
|||||||
UnorderedListOutlined,
|
UnorderedListOutlined,
|
||||||
UserOutlined,
|
UserOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Menu } from "antd";
|
import { Layout, Menu } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { BsKanban } from "react-icons/bs";
|
import { BsKanban } from "react-icons/bs";
|
||||||
@@ -67,10 +67,11 @@ function Header({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ display: "flex", alignContent: "center" }}>
|
<Layout.Header>
|
||||||
<Menu
|
<Menu
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
theme="light"
|
//theme="light"
|
||||||
|
theme={"dark"}
|
||||||
style={{ flex: 5 }}
|
style={{ flex: 5 }}
|
||||||
selectedKeys={[selectedHeader]}
|
selectedKeys={[selectedHeader]}
|
||||||
onClick={handleMenuClick}
|
onClick={handleMenuClick}
|
||||||
@@ -351,7 +352,7 @@ function Header({
|
|||||||
))}
|
))}
|
||||||
</Menu.SubMenu>
|
</Menu.SubMenu>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</Layout.Header>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Statistic } from "antd";
|
import { Card, Space, Statistic } from "antd";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -56,44 +56,46 @@ export default function JobBillsTotalComponent({ loading, bills, jobTotals }) {
|
|||||||
|
|
||||||
const discrepWithCms = discrepWithLbrAdj.subtract(billCms);
|
const discrepWithCms = discrepWithLbrAdj.subtract(billCms);
|
||||||
return (
|
return (
|
||||||
<div className="job-bills-totals-container">
|
<Card title={t("jobs.labels.jobtotals")}>
|
||||||
<Statistic
|
<Space wrap size="large">
|
||||||
title={t("jobs.labels.rosaletotal")}
|
<Statistic
|
||||||
value={totalPartsSublet.toFormat()}
|
title={t("jobs.labels.rosaletotal")}
|
||||||
/>
|
value={totalPartsSublet.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.retailtotal")}
|
<Statistic
|
||||||
value={billTotals.toFormat()}
|
title={t("bills.labels.retailtotal")}
|
||||||
/>
|
value={billTotals.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.discrepancy")}
|
<Statistic
|
||||||
valueStyle={{
|
title={t("bills.labels.discrepancy")}
|
||||||
color: discrepancy.getAmount === 0 ? "green" : "red",
|
valueStyle={{
|
||||||
}}
|
color: discrepancy.getAmount === 0 ? "green" : "red",
|
||||||
value={discrepancy.toFormat()}
|
}}
|
||||||
/>
|
value={discrepancy.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.dedfromlbr")}
|
<Statistic
|
||||||
value={lbrAdjustments.toFormat()}
|
title={t("bills.labels.dedfromlbr")}
|
||||||
/>
|
value={lbrAdjustments.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.discrepwithlbradj")}
|
<Statistic
|
||||||
valueStyle={{
|
title={t("bills.labels.discrepwithlbradj")}
|
||||||
color: discrepWithLbrAdj.getAmount === 0 ? "green" : "red",
|
valueStyle={{
|
||||||
}}
|
color: discrepWithLbrAdj.getAmount === 0 ? "green" : "red",
|
||||||
value={discrepWithLbrAdj.toFormat()}
|
}}
|
||||||
/>
|
value={discrepWithLbrAdj.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.billcmtotal")}
|
<Statistic
|
||||||
value={billCms.toFormat()}
|
title={t("bills.labels.billcmtotal")}
|
||||||
/>
|
value={billCms.toFormat()}
|
||||||
<Statistic
|
/>
|
||||||
title={t("bills.labels.discrepwithcms")}
|
<Statistic
|
||||||
valueStyle={{
|
title={t("bills.labels.discrepwithcms")}
|
||||||
color: discrepWithCms.getAmount === 0 ? "green" : "red",
|
valueStyle={{
|
||||||
}}
|
color: discrepWithCms.getAmount === 0 ? "green" : "red",
|
||||||
value={discrepWithCms.toFormat()}
|
}}
|
||||||
/>
|
value={discrepWithCms.toFormat()}
|
||||||
</div>
|
/>
|
||||||
|
</Space>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ export default function JobCostingPartsTable({ job, data, summaryData }) {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
title={() => {
|
title={() => {
|
||||||
return (
|
return (
|
||||||
<div className="imex-table-header">
|
<div className="imex-table-header">
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export default function JobDetailCardsNotesComponent({ loading, data }) {
|
|||||||
{data ? (
|
{data ? (
|
||||||
<Container>
|
<Container>
|
||||||
<List
|
<List
|
||||||
size="small"
|
|
||||||
bordered
|
bordered
|
||||||
dataSource={data.notes}
|
dataSource={data.notes}
|
||||||
renderItem={(item) => (
|
renderItem={(item) => (
|
||||||
|
|||||||
@@ -62,16 +62,6 @@ export function JobLinesComponent({
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "line_no" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "line_no" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t("joblines.fields.line_ind"),
|
|
||||||
dataIndex: "line_ind",
|
|
||||||
key: "line_ind",
|
|
||||||
fixed: "left",
|
|
||||||
sorter: (a, b) => alphaSort(a.line_ind, b.line_ind),
|
|
||||||
sortOrder:
|
|
||||||
state.sortedInfo.columnKey === "line_ind" && state.sortedInfo.order,
|
|
||||||
responsive: ["md"],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: t("joblines.fields.line_desc"),
|
title: t("joblines.fields.line_desc"),
|
||||||
dataIndex: "line_desc",
|
dataIndex: "line_desc",
|
||||||
@@ -192,6 +182,15 @@ export function JobLinesComponent({
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "mod_lb_hrs" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "mod_lb_hrs" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("joblines.fields.line_ind"),
|
||||||
|
dataIndex: "line_ind",
|
||||||
|
key: "line_ind",
|
||||||
|
sorter: (a, b) => alphaSort(a.line_ind, b.line_ind),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "line_ind" && state.sortedInfo.order,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("joblines.fields.notes"),
|
title: t("joblines.fields.notes"),
|
||||||
dataIndex: "notes",
|
dataIndex: "notes",
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ export default function JobReconciliationBillsTable({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
scroll={{ y: "40vh", x: true }}
|
scroll={{ y: "40vh", x: true }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ export default function JobReconcilitionPartsTable({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
scroll={{ y: "40vh", x: true }}
|
scroll={{ y: "40vh", x: true }}
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ export default function JobTotalsTableLabor({ job }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
console.log("sorter :>> ", sorter);
|
|
||||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { DownloadOutlined, SyncOutlined } from "@ant-design/icons";
|
import { DownloadOutlined, SyncOutlined } from "@ant-design/icons";
|
||||||
import { Button, Input, notification, Space, Table } from "antd";
|
import { Button, Card, Input, notification, Space, Table } from "antd";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -37,9 +37,11 @@ export function JobsAvailableScan({ partnerVersion, refetch }) {
|
|||||||
});
|
});
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
//Came through
|
//Came through
|
||||||
if(refetch) refetch()
|
if (refetch) refetch();
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({ message: t("jobs.errors.scanimport", {message: response.data.error}) });
|
notification["error"]({
|
||||||
|
message: t("jobs.errors.scanimport", { message: response.data.error }),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
@@ -120,40 +122,37 @@ export function JobsAvailableScan({ partnerVersion, refetch }) {
|
|||||||
: [];
|
: [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("jobs.labels.diskscan")}
|
||||||
title={() => {
|
extra={
|
||||||
return (
|
<Space wrap>
|
||||||
<div className="imex-table-header">
|
<Button
|
||||||
<Space>
|
loading={loading}
|
||||||
<strong>{t("jobs.labels.diskscan")}</strong>
|
disabled={!partnerVersion}
|
||||||
<Button
|
onClick={() => {
|
||||||
loading={loading}
|
scanEstimates();
|
||||||
disabled={!partnerVersion}
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
scanEstimates();
|
<SyncOutlined />
|
||||||
}}
|
</Button>
|
||||||
>
|
|
||||||
<SyncOutlined />
|
<Input.Search
|
||||||
</Button>
|
placeholder={t("general.labels.search")}
|
||||||
</Space>
|
onChange={(e) => {
|
||||||
<div className="imex-table-header__search">
|
setSearchText(e.currentTarget.value);
|
||||||
<Input.Search
|
}}
|
||||||
placeholder={t("general.labels.search")}
|
/>
|
||||||
onChange={(e) => {
|
</Space>
|
||||||
setSearchText(e.currentTarget.value);
|
}
|
||||||
}}
|
>
|
||||||
/>
|
<Table
|
||||||
</div>
|
loading={loading}
|
||||||
</div>
|
pagination={{ position: "top" }}
|
||||||
);
|
columns={columns}
|
||||||
}}
|
rowKey="id"
|
||||||
size="small"
|
dataSource={data}
|
||||||
pagination={{ position: "top" }}
|
onChange={handleTableChange}
|
||||||
columns={columns}
|
/>
|
||||||
rowKey="id"
|
</Card>
|
||||||
dataSource={data}
|
|
||||||
onChange={handleTableChange}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Input, notification, Space, Table } from "antd";
|
import { Button, Card, Input, notification, Space, Table } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
@@ -176,58 +176,54 @@ export default function JobsAvailableComponent({
|
|||||||
: [];
|
: [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("jobs.labels.availablejobs")}
|
||||||
title={() => {
|
extra={
|
||||||
return (
|
<Space wrap>
|
||||||
<div className="imex-table-header">
|
<Button
|
||||||
<Space>
|
onClick={() => {
|
||||||
<strong>{t("jobs.labels.availablejobs")}</strong>
|
refetch();
|
||||||
<Button
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
|
<SyncOutlined />
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
deleteAllAvailableJobs()
|
||||||
|
.then((r) => {
|
||||||
|
notification["success"]({
|
||||||
|
message: t("jobs.successes.all_deleted", {
|
||||||
|
count: r.data.delete_available_jobs.affected_rows,
|
||||||
|
}),
|
||||||
|
});
|
||||||
refetch();
|
refetch();
|
||||||
}}
|
})
|
||||||
>
|
.catch((r) => {
|
||||||
<SyncOutlined />
|
notification["error"]({
|
||||||
</Button>
|
message: t("jobs.errors.deleted") + " " + r.message,
|
||||||
<Button
|
});
|
||||||
onClick={() => {
|
});
|
||||||
deleteAllAvailableJobs()
|
}}
|
||||||
.then((r) => {
|
>
|
||||||
notification["success"]({
|
{t("general.actions.deleteall")}
|
||||||
message: t("jobs.successes.all_deleted", {
|
</Button>
|
||||||
count: r.data.delete_available_jobs.affected_rows,
|
|
||||||
}),
|
<Input.Search
|
||||||
});
|
placeholder={t("general.labels.search")}
|
||||||
refetch();
|
onChange={(e) => {
|
||||||
})
|
setSearchText(e.currentTarget.value);
|
||||||
.catch((r) => {
|
}}
|
||||||
notification["error"]({
|
/>
|
||||||
message: t("jobs.errors.deleted") + " " + r.message,
|
</Space>
|
||||||
});
|
}
|
||||||
});
|
>
|
||||||
}}
|
<Table
|
||||||
>
|
loading={loading}
|
||||||
{t("general.actions.deleteall")}
|
columns={columns}
|
||||||
</Button>
|
rowKey="id"
|
||||||
</Space>
|
dataSource={availableJobs}
|
||||||
<div className="imex-table-header__search">
|
onChange={handleTableChange}
|
||||||
<Input.Search
|
/>
|
||||||
placeholder={t("general.labels.search")}
|
</Card>
|
||||||
onChange={(e) => {
|
|
||||||
setSearchText(e.currentTarget.value);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
|
||||||
columns={columns}
|
|
||||||
rowKey="id"
|
|
||||||
dataSource={availableJobs}
|
|
||||||
onChange={handleTableChange}
|
|
||||||
/>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
useMutation,
|
useMutation,
|
||||||
useQuery,
|
useQuery,
|
||||||
} from "@apollo/client";
|
} from "@apollo/client";
|
||||||
import { notification } from "antd";
|
import { Col, notification, Row } from "antd";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -354,14 +354,20 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) {
|
|||||||
onCancel={onJobModalCancel}
|
onCancel={onJobModalCancel}
|
||||||
modalSearchState={modalSearchState}
|
modalSearchState={modalSearchState}
|
||||||
/>
|
/>
|
||||||
<JobsAvailableTableComponent
|
<Row gutter={[16, 16]}>
|
||||||
loading={loading}
|
<Col span={24}>
|
||||||
data={data}
|
<JobsAvailableTableComponent
|
||||||
refetch={refetch}
|
loading={loading}
|
||||||
addJobAsNew={addJobAsNew}
|
data={data}
|
||||||
addJobAsSupp={addJobAsSupp}
|
refetch={refetch}
|
||||||
/>
|
addJobAsNew={addJobAsNew}
|
||||||
<JobsAvailableScan refetch={refetch} />
|
addJobAsSupp={addJobAsSupp}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<JobsAvailableScan refetch={refetch} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</LoadingSpinner>
|
</LoadingSpinner>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ export default function JobsCreateOwnerInfoSearchComponent({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size="small"
|
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ export default function JobsCreateVehicleInfoSearchComponent({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size="small"
|
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
|
import { Col, Row } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
|
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
|
||||||
import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component";
|
|
||||||
import TimeTicketList from "../time-ticket-list/time-ticket-list.component";
|
import TimeTicketList from "../time-ticket-list/time-ticket-list.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -13,6 +12,41 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
|
|
||||||
export default connect(mapStateToProps, null)(JobsDetailLaborContainer);
|
export default connect(mapStateToProps, null)(JobsDetailLaborContainer);
|
||||||
|
|
||||||
|
const ticketSpan = {
|
||||||
|
xs: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
sm: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
md: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
lg: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
xl: {
|
||||||
|
span: 16,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const adjSpan = {
|
||||||
|
xs: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
sm: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
md: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
lg: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
xl: {
|
||||||
|
span: 8,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export function JobsDetailLaborContainer({
|
export function JobsDetailLaborContainer({
|
||||||
jobRO,
|
jobRO,
|
||||||
jobId,
|
jobId,
|
||||||
@@ -23,27 +57,26 @@ export function JobsDetailLaborContainer({
|
|||||||
techConsole,
|
techConsole,
|
||||||
adjustments,
|
adjustments,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Row gutter={[16, 16]}>
|
||||||
{techConsole ? null : (
|
<Col {...ticketSpan}>
|
||||||
<TimeTicketEnterButton actions={{ refetch }} context={{ jobId: jobId }}>
|
<TimeTicketList
|
||||||
{t("timetickets.actions.enter")}
|
loading={loading}
|
||||||
</TimeTicketEnterButton>
|
timetickets={timetickets}
|
||||||
)}
|
refetch={refetch}
|
||||||
<LaborAllocationsTableComponent
|
techConsole={techConsole}
|
||||||
jobId={jobId}
|
disabled={jobRO}
|
||||||
joblines={joblines}
|
jobId={jobId}
|
||||||
timetickets={timetickets}
|
/>
|
||||||
adjustments={adjustments}
|
</Col>
|
||||||
/>
|
<Col {...adjSpan}>
|
||||||
<TimeTicketList
|
<LaborAllocationsTableComponent
|
||||||
loading={loading}
|
jobId={jobId}
|
||||||
timetickets={timetickets}
|
joblines={joblines}
|
||||||
refetch={refetch}
|
timetickets={timetickets}
|
||||||
techConsole={techConsole}
|
adjustments={adjustments}
|
||||||
disabled={jobRO}
|
/>
|
||||||
/>
|
</Col>
|
||||||
</div>
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,25 +3,8 @@ import React from "react";
|
|||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import BillsListTable from "../bills-list-table/bills-list-table.component";
|
import BillsListTable from "../bills-list-table/bills-list-table.component";
|
||||||
import JobBillsTotal from "../job-bills-total/job-bills-total.component";
|
import JobBillsTotal from "../job-bills-total/job-bills-total.component";
|
||||||
import PartsOrderModal from "../parts-order-modal/parts-order-modal.container";
|
|
||||||
import PartsOrderListTableComponent from "../parts-order-list-table/parts-order-list-table.component";
|
import PartsOrderListTableComponent from "../parts-order-list-table/parts-order-list-table.component";
|
||||||
const tableCol = {
|
import PartsOrderModal from "../parts-order-modal/parts-order-modal.container";
|
||||||
xs: {
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
md: {
|
|
||||||
span: 20,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const totalsCol = {
|
|
||||||
xs: {
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
md: {
|
|
||||||
span: 4,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function JobsDetailPliComponent({
|
export default function JobsDetailPliComponent({
|
||||||
job,
|
job,
|
||||||
@@ -35,26 +18,29 @@ export default function JobsDetailPliComponent({
|
|||||||
{billsQuery.error ? (
|
{billsQuery.error ? (
|
||||||
<AlertComponent message={billsQuery.error.message} type="error" />
|
<AlertComponent message={billsQuery.error.message} type="error" />
|
||||||
) : null}
|
) : null}
|
||||||
<Row>
|
|
||||||
<Col {...tableCol}>
|
<Row gutter={[16, 16]}>
|
||||||
<PartsOrderListTableComponent
|
<Col span={24}>
|
||||||
job={job}
|
|
||||||
handleOnRowClick={handlePartsOrderOnRowClick}
|
|
||||||
billsQuery={billsQuery}
|
|
||||||
/>
|
|
||||||
<BillsListTable
|
|
||||||
job={job}
|
|
||||||
handleOnRowClick={handleBillOnRowClick}
|
|
||||||
billsQuery={billsQuery}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
<Col {...totalsCol}>
|
|
||||||
<JobBillsTotal
|
<JobBillsTotal
|
||||||
bills={billsQuery.data ? billsQuery.data.bills : []}
|
bills={billsQuery.data ? billsQuery.data.bills : []}
|
||||||
loading={billsQuery.loading}
|
loading={billsQuery.loading}
|
||||||
jobTotals={job.job_totals}
|
jobTotals={job.job_totals}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<PartsOrderListTableComponent
|
||||||
|
job={job}
|
||||||
|
handleOnRowClick={handlePartsOrderOnRowClick}
|
||||||
|
billsQuery={billsQuery}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<BillsListTable
|
||||||
|
job={job}
|
||||||
|
handleOnRowClick={handleBillOnRowClick}
|
||||||
|
billsQuery={billsQuery}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { FileExcelFilled } from "@ant-design/icons";
|
import { FileExcelFilled } from "@ant-design/icons";
|
||||||
import { Card } from "antd";
|
import { Card, Col, Row, Space } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import Gallery from "react-grid-gallery";
|
import Gallery from "react-grid-gallery";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -104,78 +104,87 @@ function JobsDocumentsComponent({
|
|||||||
}, [data, setgalleryImages, t]);
|
}, [data, setgalleryImages, t]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="clearfix">
|
<div className="clea rfix">
|
||||||
<div className="imex-flex-row">
|
<Row gutter={[16, 16]}>
|
||||||
<JobsDocumentsGallerySelectAllComponent
|
<Col span={24}>
|
||||||
galleryImages={galleryImages}
|
<Space wrap>
|
||||||
setGalleryImages={setgalleryImages}
|
<JobsDocumentsGallerySelectAllComponent
|
||||||
/>
|
galleryImages={galleryImages}
|
||||||
<JobsDocumentsDownloadButton galleryImages={galleryImages} />
|
setGalleryImages={setgalleryImages}
|
||||||
<JobsDocumentsDeleteButton
|
/>
|
||||||
galleryImages={galleryImages}
|
<JobsDocumentsDownloadButton galleryImages={galleryImages} />
|
||||||
deletionCallback={billsCallback || refetch}
|
<JobsDocumentsDeleteButton
|
||||||
/>
|
galleryImages={galleryImages}
|
||||||
<JobsDocumentsGalleryReassign galleryImages={galleryImages} />
|
deletionCallback={billsCallback || refetch}
|
||||||
</div>
|
/>
|
||||||
<DocumentsUploadComponent
|
<JobsDocumentsGalleryReassign galleryImages={galleryImages} />
|
||||||
jobId={jobId}
|
</Space>
|
||||||
billId={billId}
|
</Col>
|
||||||
callbackAfterUpload={billsCallback || refetch}
|
<Col span={24}>
|
||||||
tagsArray={["test"]}
|
<Card>
|
||||||
></DocumentsUploadComponent>
|
<DocumentsUploadComponent
|
||||||
<div style={{ marginTop: "2rem" }}>
|
jobId={jobId}
|
||||||
<Card title={t("jobs.labels.documents-images")}>
|
billId={billId}
|
||||||
<Gallery
|
callbackAfterUpload={billsCallback || refetch}
|
||||||
images={galleryImages.images}
|
/>
|
||||||
backdropClosesModal={true}
|
</Card>
|
||||||
onClickImage={(props) => {
|
</Col>
|
||||||
window.open(
|
|
||||||
props.target.src,
|
|
||||||
"_blank",
|
|
||||||
"toolbar=0,location=0,menubar=0"
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
onSelectImage={(index, image) => {
|
|
||||||
setgalleryImages({
|
|
||||||
...galleryImages,
|
|
||||||
images: galleryImages.images.map((g, idx) =>
|
|
||||||
index === idx ? { ...g, isSelected: !g.isSelected } : g
|
|
||||||
),
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<Card title={t("jobs.labels.documents-other")}>
|
<Col span={24}>
|
||||||
<Gallery
|
<Card title={t("jobs.labels.documents-images")}>
|
||||||
images={galleryImages.other}
|
<Gallery
|
||||||
backdropClosesModal={true}
|
images={galleryImages.images}
|
||||||
enableLightbox={false}
|
backdropClosesModal={true}
|
||||||
thumbnailStyle={() => {
|
onClickImage={(props) => {
|
||||||
return {
|
window.open(
|
||||||
backgroundImage: <FileExcelFilled />,
|
props.target.src,
|
||||||
height: "100%",
|
"_blank",
|
||||||
width: "100%",
|
"toolbar=0,location=0,menubar=0"
|
||||||
};
|
);
|
||||||
}}
|
}}
|
||||||
onClickThumbnail={(index) => {
|
onSelectImage={(index, image) => {
|
||||||
window.open(
|
setgalleryImages({
|
||||||
galleryImages.other[index].src,
|
...galleryImages,
|
||||||
"_blank",
|
images: galleryImages.images.map((g, idx) =>
|
||||||
"toolbar=0,location=0,menubar=0"
|
index === idx ? { ...g, isSelected: !g.isSelected } : g
|
||||||
);
|
),
|
||||||
}}
|
});
|
||||||
onSelectImage={(index) => {
|
}}
|
||||||
setgalleryImages({
|
/>
|
||||||
...galleryImages,
|
</Card>
|
||||||
other: galleryImages.other.map((g, idx) =>
|
</Col>
|
||||||
index === idx ? { ...g, isSelected: !g.isSelected } : g
|
<Col span={24}>
|
||||||
),
|
<Card title={t("jobs.labels.documents-other")}>
|
||||||
});
|
<Gallery
|
||||||
}}
|
images={galleryImages.other}
|
||||||
/>
|
backdropClosesModal={true}
|
||||||
</Card>
|
enableLightbox={false}
|
||||||
</div>
|
thumbnailStyle={() => {
|
||||||
|
return {
|
||||||
|
backgroundImage: <FileExcelFilled />,
|
||||||
|
height: "100%",
|
||||||
|
width: "100%",
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
onClickThumbnail={(index) => {
|
||||||
|
window.open(
|
||||||
|
galleryImages.other[index].src,
|
||||||
|
"_blank",
|
||||||
|
"toolbar=0,location=0,menubar=0"
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
onSelectImage={(index) => {
|
||||||
|
setgalleryImages({
|
||||||
|
...galleryImages,
|
||||||
|
other: galleryImages.other.map((g, idx) =>
|
||||||
|
index === idx ? { ...g, isSelected: !g.isSelected } : g
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ export default function JobsDocumentsGallerySelectAllComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Space wrap>
|
||||||
<Button onClick={handleSelectAll}>
|
<Button onClick={handleSelectAll}>
|
||||||
{t("general.actions.selectall")}
|
{t("general.actions.selectall")}
|
||||||
</Button>
|
</Button>
|
||||||
@@ -62,6 +62,6 @@ export default function JobsDocumentsGallerySelectAllComponent({
|
|||||||
<Button onClick={handleDeselectAll}>
|
<Button onClick={handleDeselectAll}>
|
||||||
{t("general.actions.deselectall")}
|
{t("general.actions.deselectall")}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</Space>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,6 @@ export default function JobsFindModalComponent({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "bottom" }}
|
pagination={{ position: "bottom" }}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -194,7 +194,6 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
|
|||||||
@@ -244,7 +244,6 @@ export function JobsList({ bodyshop }) {
|
|||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
EyeInvisibleFilled,
|
EyeInvisibleFilled,
|
||||||
WarningFilled,
|
WarningFilled,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Button, Table } from "antd";
|
import { Button, Card, Table } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -110,28 +110,32 @@ export function JobNotesComponent({
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Card
|
||||||
|
title={t("jobs.labels.notes")}
|
||||||
|
extra={
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setNoteUpsertContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
jobId: jobId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("notes.actions.new")}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
>
|
||||||
<NoteUpsertModal />
|
<NoteUpsertModal />
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
setNoteUpsertContext({
|
|
||||||
actions: { refetch: refetch },
|
|
||||||
context: {
|
|
||||||
jobId: jobId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("notes.actions.new")}
|
|
||||||
</Button>
|
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ position: "bottom" }}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent);
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { EditFilled } from "@ant-design/icons";
|
import { EditFilled } from "@ant-design/icons";
|
||||||
import { Typography } from "antd";
|
import { Card, Space, Table } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
||||||
import "./labor-allocations-table.styles.scss";
|
import "./labor-allocations-table.styles.scss";
|
||||||
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
||||||
@@ -22,6 +23,15 @@ export function LaborAllocationsTable({
|
|||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [totals, setTotals] = useState([]);
|
const [totals, setTotals] = useState([]);
|
||||||
|
const [state, setState] = useState({
|
||||||
|
sortedInfo: {
|
||||||
|
columnKey: "cost_center",
|
||||||
|
field: "cost_center",
|
||||||
|
order: "ascend",
|
||||||
|
},
|
||||||
|
filteredInfo: {},
|
||||||
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!!joblines && !!timetickets && !!bodyshop);
|
if (!!joblines && !!timetickets && !!bodyshop);
|
||||||
setTotals(
|
setTotals(
|
||||||
@@ -35,65 +45,92 @@ export function LaborAllocationsTable({
|
|||||||
if (!jobId) setTotals([]);
|
if (!jobId) setTotals([]);
|
||||||
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
|
}, [joblines, timetickets, bodyshop, adjustments, jobId]);
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: t("timetickets.fields.cost_center"),
|
||||||
|
dataIndex: "cost_center",
|
||||||
|
key: "cost_center",
|
||||||
|
defaultSortOrder: "cost_center",
|
||||||
|
sorter: (a, b) => alphaSort(a.cost_center, b.cost_center),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "cost_center" && state.sortedInfo.order,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.labels.hrs_total"),
|
||||||
|
dataIndex: "total",
|
||||||
|
key: "total",
|
||||||
|
sorter: (a, b) => a.total - b.total,
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "total" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => record.total.toFixed(1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.labels.hrs_claimed"),
|
||||||
|
dataIndex: "hrs_claimed",
|
||||||
|
key: "hrs_claimed",
|
||||||
|
sorter: (a, b) => a.claimed - b.claimed,
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "claimed" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => record.claimed && record.claimed.toFixed(1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.labels.adjustments"),
|
||||||
|
dataIndex: "adjustments",
|
||||||
|
key: "adjustments",
|
||||||
|
sorter: (a, b) => a.adjustments - b.adjustments,
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "adjustments" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => (
|
||||||
|
<Space wrap>
|
||||||
|
{record.adjustments.toFixed(1)}
|
||||||
|
<LaborAllocationsAdjustmentEdit
|
||||||
|
jobId={jobId}
|
||||||
|
adjustments={adjustments}
|
||||||
|
mod_lbr_ty={record.opcode}
|
||||||
|
>
|
||||||
|
<EditFilled />
|
||||||
|
</LaborAllocationsAdjustmentEdit>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.labels.difference"),
|
||||||
|
dataIndex: "difference",
|
||||||
|
|
||||||
|
key: "difference",
|
||||||
|
sorter: (a, b) => a.difference - b.difference,
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "difference" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => (
|
||||||
|
<strong
|
||||||
|
style={{
|
||||||
|
color: record.difference > 0 ? "green" : "red",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{record.difference}
|
||||||
|
</strong>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log("totals :>> ", totals);
|
||||||
return (
|
return (
|
||||||
<div>
|
<Card title={t("jobs.labels.laborallocations")}>
|
||||||
<div className="imex-flex-row" style={{ margin: ".5rem" }}>
|
<Table
|
||||||
<Typography.Title level={3}>
|
columns={columns}
|
||||||
{t("jobs.labels.laborallocations")}
|
rowKey="cost_center"
|
||||||
</Typography.Title>
|
pagination={false}
|
||||||
<div className="labor-allocations-table">
|
onChange={handleTableChange}
|
||||||
<table>
|
dataSource={totals}
|
||||||
<thead>
|
scroll={{
|
||||||
<tr>
|
x: true,
|
||||||
<th>
|
}}
|
||||||
<strong>{t("timetickets.fields.cost_center")}</strong>
|
/>
|
||||||
</th>
|
</Card>
|
||||||
<th>
|
|
||||||
<strong>{t("jobs.labels.hrs_total")}</strong>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<strong>{t("jobs.labels.hrs_claimed")}</strong>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<strong>{t("jobs.labels.adjustments")}</strong>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<strong>{t("jobs.labels.difference")}</strong>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{totals.map((t, idx) => (
|
|
||||||
<tr key={idx}>
|
|
||||||
<td>{t.cost_center}</td>
|
|
||||||
<td>{t.total.toFixed(1)}</td>
|
|
||||||
<td>{t.claimed.toFixed(1)}</td>
|
|
||||||
<td>
|
|
||||||
{t.adjustments.toFixed(1)}
|
|
||||||
<LaborAllocationsAdjustmentEdit
|
|
||||||
jobId={jobId}
|
|
||||||
adjustments={adjustments}
|
|
||||||
mod_lbr_ty={t.opcode}
|
|
||||||
>
|
|
||||||
<EditFilled style={{ marginLeft: ".2rem" }} />
|
|
||||||
</LaborAllocationsAdjustmentEdit>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<strong
|
|
||||||
style={{
|
|
||||||
color: t.difference > 0 ? "green" : "red",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t.difference}
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(mapStateToProps, null)(LaborAllocationsTable);
|
export default connect(mapStateToProps, null)(LaborAllocationsTable);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Form, Input, Switch } from "antd";
|
import { Form, Input, Switch } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
@@ -13,20 +13,7 @@ export default function OwnerDetailFormComponent({ form, loading }) {
|
|||||||
const { getFieldValue } = form;
|
const { getFieldValue } = form;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="imex-flex-row imex-flex-row__flex-space-around">
|
<FormFieldsChanged form={form} />
|
||||||
<Button
|
|
||||||
className="imex-flex-row__margin-large"
|
|
||||||
type="primary"
|
|
||||||
key="submit"
|
|
||||||
loading={loading}
|
|
||||||
htmlType="submit"
|
|
||||||
>
|
|
||||||
{t("general.actions.save")}
|
|
||||||
</Button>
|
|
||||||
<div className="imex-flex-row__grow imex-flex-row__margin-large">
|
|
||||||
<FormFieldsChanged form={form} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<LayoutFormRow header={t("owners.forms.name")}>
|
<LayoutFormRow header={t("owners.forms.name")}>
|
||||||
<Form.Item label={t("owners.fields.ownr_title")} name="ownr_title">
|
<Form.Item label={t("owners.fields.ownr_title")} name="ownr_title">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Form, notification } from "antd";
|
import { Button, Form, notification, PageHeader } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -37,15 +37,29 @@ function OwnerDetailFormContainer({ owner, refetch }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form
|
<>
|
||||||
form={form}
|
<PageHeader
|
||||||
onFinish={handleFinish}
|
title={t("menus.header.owners")}
|
||||||
autoComplete="off"
|
extra={
|
||||||
layout="vertical"
|
<Button
|
||||||
initialValues={owner}
|
type="primary"
|
||||||
>
|
loading={loading}
|
||||||
<OwnerDetailFormComponent loading={loading} form={form} />
|
onClick={() => form.submit()}
|
||||||
</Form>
|
>
|
||||||
|
{t("general.actions.save")}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Form
|
||||||
|
form={form}
|
||||||
|
onFinish={handleFinish}
|
||||||
|
autoComplete="off"
|
||||||
|
layout="vertical"
|
||||||
|
initialValues={owner}
|
||||||
|
>
|
||||||
|
<OwnerDetailFormComponent loading={loading} form={form} />
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default OwnerDetailFormContainer;
|
export default OwnerDetailFormContainer;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table } from "antd";
|
import { Card, Table } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -59,44 +59,47 @@ function OwnerDetailJobsComponent({ bodyshop, owner }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
title={() => (
|
title={t("owners.labels.relatedjobs")}
|
||||||
<div>
|
extra={
|
||||||
<OwnerDetailUpdateJobsComponent
|
<OwnerDetailUpdateJobsComponent
|
||||||
selectedJobs={selectedJobs}
|
selectedJobs={selectedJobs}
|
||||||
owner={owner}
|
owner={owner}
|
||||||
disabled={selectedJobs.length === 0}
|
disabled={selectedJobs.length === 0}
|
||||||
/>
|
/>
|
||||||
</div>
|
}
|
||||||
)}
|
>
|
||||||
pagination={{ position: "bottom" }}
|
<Table
|
||||||
columns={columns}
|
pagination={{ position: "bottom" }}
|
||||||
scroll={{ x: true }}
|
columns={columns}
|
||||||
rowKey="id"
|
scroll={{ x: true }}
|
||||||
dataSource={owner.jobs}
|
rowKey="id"
|
||||||
rowSelection={{
|
dataSource={owner.jobs}
|
||||||
onSelect: (record, selected, selectedRows) => {
|
rowSelection={{
|
||||||
setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []);
|
onSelect: (record, selected, selectedRows) => {
|
||||||
},
|
setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []);
|
||||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
},
|
||||||
setSelectedJobs(
|
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||||
selectedRows
|
setSelectedJobs(
|
||||||
? selectedRows
|
selectedRows
|
||||||
.filter((i) =>
|
? selectedRows
|
||||||
bodyshop.md_ro_statuses.active_statuses.includes(i.status)
|
.filter((i) =>
|
||||||
)
|
bodyshop.md_ro_statuses.active_statuses.includes(i.status)
|
||||||
.map((i) => i.id)
|
)
|
||||||
: []
|
.map((i) => i.id)
|
||||||
);
|
: []
|
||||||
},
|
);
|
||||||
selectedRowKeys: selectedJobs,
|
},
|
||||||
getCheckboxProps: (record) => ({
|
selectedRowKeys: selectedJobs,
|
||||||
disabled: bodyshop.md_ro_statuses.active_statuses
|
getCheckboxProps: (record) => ({
|
||||||
? !bodyshop.md_ro_statuses.active_statuses.includes(record.status)
|
disabled: bodyshop.md_ro_statuses.active_statuses
|
||||||
: true,
|
? !bodyshop.md_ro_statuses.active_statuses.includes(record.status)
|
||||||
}),
|
: true,
|
||||||
}}
|
}),
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, null)(OwnerDetailJobsComponent);
|
export default connect(mapStateToProps, null)(OwnerDetailJobsComponent);
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ export default function OwnerFindModalComponent({
|
|||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
title={() => t("owners.labels.existing_owners")}
|
title={() => t("owners.labels.existing_owners")}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "bottom" }}
|
pagination={{ position: "bottom" }}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ export default function OwnerTagPopoverComponent({ job }) {
|
|||||||
<div style={{ width: "400px" }}>
|
<div style={{ width: "400px" }}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Descriptions
|
<Descriptions title={t("owners.labels.fromclaim")} column={1}>
|
||||||
title={t("owners.labels.fromclaim")}
|
|
||||||
size="small"
|
|
||||||
column={1}
|
|
||||||
>
|
|
||||||
<Descriptions.Item key="1" label={t("jobs.fields.owner")}>{`${
|
<Descriptions.Item key="1" label={t("jobs.fields.owner")}>{`${
|
||||||
job.ownr_fn || ""
|
job.ownr_fn || ""
|
||||||
} ${job.ownr_ln || ""} ${job.ownr_co_nm || ""}`}</Descriptions.Item>
|
} ${job.ownr_ln || ""} ${job.ownr_co_nm || ""}`}</Descriptions.Item>
|
||||||
@@ -31,11 +27,7 @@ export default function OwnerTagPopoverComponent({ job }) {
|
|||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Descriptions
|
<Descriptions title={t("owners.labels.fromowner")} column={1}>
|
||||||
title={t("owners.labels.fromowner")}
|
|
||||||
size="small"
|
|
||||||
column={1}
|
|
||||||
>
|
|
||||||
<Descriptions.Item key="1" label={t("jobs.fields.owner")}>{`${
|
<Descriptions.Item key="1" label={t("jobs.fields.owner")}>{`${
|
||||||
job.owner.ownr_fn || ""
|
job.owner.ownr_fn || ""
|
||||||
} ${job.owner.ownr_ln || ""} ${
|
} ${job.owner.ownr_ln || ""} ${
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
import { Button, Input, Table } from "antd";
|
import { Button, Card, Input, Space, Table } from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -74,38 +74,38 @@ export default function OwnersListComponent({
|
|||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("menus.header.owners")}
|
||||||
title={() => {
|
extra={
|
||||||
return (
|
<Space wrap>
|
||||||
<div className="imex-table-header">
|
<Button onClick={() => refetch()}>
|
||||||
<Button onClick={() => refetch()}>
|
<SyncOutlined />
|
||||||
<SyncOutlined />
|
</Button>
|
||||||
</Button>
|
<Input.Search
|
||||||
<Input.Search
|
placeholder={t("general.labels.search")}
|
||||||
className="imex-table-header__search"
|
onSearch={(value) => {
|
||||||
placeholder={t("general.labels.search")}
|
search.search = value;
|
||||||
onSearch={(value) => {
|
history.push({ search: queryString.stringify(search) });
|
||||||
search.search = value;
|
}}
|
||||||
history.push({ search: queryString.stringify(search) });
|
enterButton
|
||||||
}}
|
/>
|
||||||
enterButton
|
</Space>
|
||||||
/>
|
}
|
||||||
</div>
|
>
|
||||||
);
|
<Table
|
||||||
}}
|
loading={loading}
|
||||||
size="small"
|
pagination={{
|
||||||
pagination={{
|
position: "top",
|
||||||
position: "top",
|
pageSize: 25,
|
||||||
pageSize: 25,
|
current: parseInt(page || 1),
|
||||||
current: parseInt(page || 1),
|
total: total,
|
||||||
total: total,
|
}}
|
||||||
}}
|
columns={columns}
|
||||||
columns={columns}
|
rowKey="id"
|
||||||
rowKey="id"
|
scroll={{ x: true }}
|
||||||
scroll={{ x: true }}
|
dataSource={owners}
|
||||||
dataSource={owners}
|
onChange={handleTableChange}
|
||||||
onChange={handleTableChange}
|
/>
|
||||||
/>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export function PartsOrderBackorderEta({
|
|||||||
{isAlreadyBackordered && (
|
{isAlreadyBackordered && (
|
||||||
<CalendarFilled style={{ cursor: "pointer" }} onClick={handlePopover} />
|
<CalendarFilled style={{ cursor: "pointer" }} onClick={handlePopover} />
|
||||||
)}
|
)}
|
||||||
{loading && <Spin size="small" />}
|
{loading && <Spin />}
|
||||||
</Popover>
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { EyeFilled, SyncOutlined } from "@ant-design/icons";
|
||||||
import { Button, Checkbox, Input, Space, Table, Typography } from "antd";
|
import {
|
||||||
|
Button,
|
||||||
|
Card,
|
||||||
|
Checkbox,
|
||||||
|
Drawer,
|
||||||
|
Grid,
|
||||||
|
Input,
|
||||||
|
PageHeader,
|
||||||
|
Space,
|
||||||
|
Table,
|
||||||
|
} from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -40,6 +50,21 @@ export function PartsOrderListTableComponent({
|
|||||||
handleOnRowClick,
|
handleOnRowClick,
|
||||||
setPartsReceiveContext,
|
setPartsReceiveContext,
|
||||||
}) {
|
}) {
|
||||||
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
|
.filter((screen) => !!screen[1])
|
||||||
|
.slice(-1)[0];
|
||||||
|
|
||||||
|
const bpoints = {
|
||||||
|
xs: "100%",
|
||||||
|
sm: "100%",
|
||||||
|
md: "100%",
|
||||||
|
lg: "75%",
|
||||||
|
xl: "75%",
|
||||||
|
xxl: "65%",
|
||||||
|
};
|
||||||
|
const drawerPercentage = selectedBreakpoint
|
||||||
|
? bpoints[selectedBreakpoint[0]]
|
||||||
|
: "100%";
|
||||||
const responsibilityCenters = bodyshop.md_responsibility_centers;
|
const responsibilityCenters = bodyshop.md_responsibility_centers;
|
||||||
const Templates = TemplateList("partsorder");
|
const Templates = TemplateList("partsorder");
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -51,6 +76,86 @@ export function PartsOrderListTableComponent({
|
|||||||
|
|
||||||
const parts_orders = billsQuery.data ? billsQuery.data.parts_orders : [];
|
const parts_orders = billsQuery.data ? billsQuery.data.parts_orders : [];
|
||||||
const { refetch } = billsQuery;
|
const { refetch } = billsQuery;
|
||||||
|
|
||||||
|
const recordActions = (record, showView = false) => (
|
||||||
|
<Space wrap>
|
||||||
|
{showView && (
|
||||||
|
<Button onClick={() => handleOnRowClick(record)}>
|
||||||
|
<EyeFilled />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
<Button
|
||||||
|
disabled={jobRO || record.return}
|
||||||
|
onClick={() => {
|
||||||
|
logImEXEvent("parts_order_receive_bill");
|
||||||
|
|
||||||
|
setPartsReceiveContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
jobId: job.id,
|
||||||
|
job: job,
|
||||||
|
partsorderlines: record.parts_order_lines.map((pol) => {
|
||||||
|
return {
|
||||||
|
joblineid: pol.job_line_id,
|
||||||
|
line_desc: pol.line_desc,
|
||||||
|
quantity: pol.quantity,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("parts_orders.actions.receive")}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
disabled={jobRO}
|
||||||
|
onClick={() => {
|
||||||
|
logImEXEvent("parts_order_receive_bill");
|
||||||
|
|
||||||
|
setBillEnterContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
job: job,
|
||||||
|
bill: {
|
||||||
|
vendorid: record.vendor.id,
|
||||||
|
is_credit_memo: record.return,
|
||||||
|
billlines: record.parts_order_lines.map((pol) => {
|
||||||
|
return {
|
||||||
|
joblineid: pol.job_line_id,
|
||||||
|
line_desc: pol.line_desc,
|
||||||
|
quantity: pol.quantity,
|
||||||
|
|
||||||
|
actual_price: pol.act_price,
|
||||||
|
cost_center: pol.jobline.part_type
|
||||||
|
? responsibilityCenters.defaults.costs[
|
||||||
|
pol.jobline.part_type
|
||||||
|
] || null
|
||||||
|
: null,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("parts_orders.actions.receivebill")}
|
||||||
|
</Button>
|
||||||
|
<PrintWrapper
|
||||||
|
templateObject={{
|
||||||
|
name: record.return
|
||||||
|
? Templates.parts_return_slip.key
|
||||||
|
: Templates.parts_order.key,
|
||||||
|
variables: { id: record.id },
|
||||||
|
}}
|
||||||
|
messageObject={{
|
||||||
|
subject: record.return
|
||||||
|
? Templates.parts_return_slip.subject
|
||||||
|
: Templates.parts_order.subject,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t("vendors.fields.name"),
|
title: t("vendors.fields.name"),
|
||||||
@@ -105,79 +210,7 @@ export function PartsOrderListTableComponent({
|
|||||||
title: t("general.labels.actions"),
|
title: t("general.labels.actions"),
|
||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => recordActions(record, true),
|
||||||
<Space wrap>
|
|
||||||
<Button
|
|
||||||
disabled={jobRO || record.return}
|
|
||||||
onClick={() => {
|
|
||||||
logImEXEvent("parts_order_receive_bill");
|
|
||||||
|
|
||||||
setPartsReceiveContext({
|
|
||||||
actions: { refetch: refetch },
|
|
||||||
context: {
|
|
||||||
jobId: job.id,
|
|
||||||
job: job,
|
|
||||||
partsorderlines: record.parts_order_lines.map((pol) => {
|
|
||||||
return {
|
|
||||||
joblineid: pol.job_line_id,
|
|
||||||
line_desc: pol.line_desc,
|
|
||||||
quantity: pol.quantity,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("parts_orders.actions.receive")}
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
disabled={jobRO}
|
|
||||||
onClick={() => {
|
|
||||||
logImEXEvent("parts_order_receive_bill");
|
|
||||||
|
|
||||||
setBillEnterContext({
|
|
||||||
actions: { refetch: refetch },
|
|
||||||
context: {
|
|
||||||
job: job,
|
|
||||||
bill: {
|
|
||||||
vendorid: record.vendor.id,
|
|
||||||
is_credit_memo: record.return,
|
|
||||||
billlines: record.parts_order_lines.map((pol) => {
|
|
||||||
return {
|
|
||||||
joblineid: pol.job_line_id,
|
|
||||||
line_desc: pol.line_desc,
|
|
||||||
quantity: pol.quantity,
|
|
||||||
|
|
||||||
actual_price: pol.act_price,
|
|
||||||
cost_center: pol.jobline.part_type
|
|
||||||
? responsibilityCenters.defaults.costs[
|
|
||||||
pol.jobline.part_type
|
|
||||||
] || null
|
|
||||||
: null,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("parts_orders.actions.receivebill")}
|
|
||||||
</Button>
|
|
||||||
<PrintWrapper
|
|
||||||
templateObject={{
|
|
||||||
name: record.return
|
|
||||||
? Templates.parts_return_slip.key
|
|
||||||
: Templates.parts_order.key,
|
|
||||||
variables: { id: record.id },
|
|
||||||
}}
|
|
||||||
messageObject={{
|
|
||||||
subject: record.return
|
|
||||||
? Templates.parts_return_slip.subject
|
|
||||||
: Templates.parts_order.subject,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -280,89 +313,70 @@ export function PartsOrderListTableComponent({
|
|||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<div>
|
<PartsOrderLineBackorderButton
|
||||||
<PartsOrderLineBackorderButton
|
disabled={jobRO}
|
||||||
disabled={jobRO}
|
partsOrderStatus={record.status}
|
||||||
partsOrderStatus={record.status}
|
partsLineId={record.id}
|
||||||
partsLineId={record.id}
|
jobLineId={record.job_line_id}
|
||||||
jobLineId={record.job_line_id}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ margin: ".5rem" }}>
|
<>
|
||||||
|
<PageHeader
|
||||||
|
title={record && `${record.vendor.name} - ${record.order_number}`}
|
||||||
|
extra={recordActions(record)}
|
||||||
|
/>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
scroll={{ x: true, y: "50rem" }}
|
||||||
scroll={{ x: "50%", y: "40rem" }}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={record.parts_order_lines}
|
dataSource={record.parts_order_lines}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Card
|
||||||
<Typography.Title level={4}>
|
title={t("parts_orders.labels.parts_orders")}
|
||||||
{t("parts_orders.labels.parts_orders")}
|
extra={
|
||||||
</Typography.Title>
|
<Space wrap>
|
||||||
|
<Button onClick={() => refetch()}>
|
||||||
|
<SyncOutlined />
|
||||||
|
</Button>
|
||||||
|
<Input.Search
|
||||||
|
placeholder={t("general.labels.search")}
|
||||||
|
onChange={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
<PartsReceiveModalContainer />
|
<PartsReceiveModalContainer />
|
||||||
|
<Drawer
|
||||||
|
placement="right"
|
||||||
|
onClose={() => handleOnRowClick(null)}
|
||||||
|
visible={selectedpartsorder}
|
||||||
|
//getContainer={false}
|
||||||
|
style={{ position: "absolute" }}
|
||||||
|
closable
|
||||||
|
width={drawerPercentage}
|
||||||
|
>
|
||||||
|
{selectedPartsOrderRecord && rowExpander(selectedPartsOrderRecord)}
|
||||||
|
</Drawer>
|
||||||
<Table
|
<Table
|
||||||
loading={billsQuery.loading}
|
loading={billsQuery.loading}
|
||||||
size="small"
|
scroll={{ x: true, y: "50rem" }}
|
||||||
title={() => (
|
|
||||||
<div className="imex-table-header">
|
|
||||||
<Button onClick={() => refetch()}>
|
|
||||||
<SyncOutlined />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<div className="imex-table-header__search">
|
|
||||||
<Input.Search
|
|
||||||
placeholder={t("general.labels.search")}
|
|
||||||
onChange={(e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
scroll={{ x: "50%", y: "40rem" }}
|
|
||||||
expandedRowRender={rowExpander}
|
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={parts_orders}
|
dataSource={parts_orders}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
expandable={{
|
|
||||||
expandedRowKeys: [selectedpartsorder],
|
|
||||||
onExpand: (expanded, record) => {
|
|
||||||
handleOnRowClick(expanded ? record : null);
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
rowSelection={{
|
|
||||||
onSelect: (record) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
},
|
|
||||||
selectedRowKeys: [selectedpartsorder],
|
|
||||||
type: "radio",
|
|
||||||
}}
|
|
||||||
onRow={(record, rowIndex) => {
|
|
||||||
return {
|
|
||||||
onClick: (event) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
}, // click row
|
|
||||||
onDoubleClick: (event) => {}, // double click row
|
|
||||||
onContextMenu: (event) => {}, // right button click row
|
|
||||||
onMouseEnter: (event) => {}, // mouse enter row
|
|
||||||
onMouseLeave: (event) => {}, // mouse leave row
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -178,7 +178,6 @@ export function PaymentsListPaginated({
|
|||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function PrintCenterItemComponent({
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{loading && <Spin size="small" />}
|
{loading && <Spin />}
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function PrintWrapperComponent({
|
|||||||
{children || null}
|
{children || null}
|
||||||
<PrinterFilled onClick={() => handlePrint("p")} />
|
<PrinterFilled onClick={() => handlePrint("p")} />
|
||||||
<MailFilled onClick={() => handlePrint("e")} />
|
<MailFilled onClick={() => handlePrint("e")} />
|
||||||
{loading && <Spin size="small" />}
|
{loading && <Spin />}
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ export default function ProductionBoardCard(technician, card) {
|
|||||||
<Card
|
<Card
|
||||||
className="react-kanban-card imex-kanban-card tight-antd-rows"
|
className="react-kanban-card imex-kanban-card tight-antd-rows"
|
||||||
style={{ margin: ".2rem 0rem" }}
|
style={{ margin: ".2rem 0rem" }}
|
||||||
size="small"
|
|
||||||
title={`${card.ro_number || t("general.labels.na")} - ${
|
title={`${card.ro_number || t("general.labels.na")} - ${
|
||||||
card.v_model_yr
|
card.v_model_yr
|
||||||
} ${card.v_make_desc || ""} ${card.v_model_desc || ""}`}
|
} ${card.v_make_desc || ""} ${card.v_model_desc || ""}`}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export function ProductionListColumnStatus({ record, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<div style={{ width: "100%", height: "19px", cursor: "pointer" }}>
|
<div style={{ width: "100%", height: "19px", cursor: "pointer" }}>
|
||||||
{record.status}
|
{record.status}
|
||||||
{loading && <Spin size="small" />}
|
{loading && <Spin />}
|
||||||
</div>
|
</div>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export default function ProductionListDetail({ jobs }) {
|
|||||||
{!loading && data && (
|
{!loading && data && (
|
||||||
<div>
|
<div>
|
||||||
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} />
|
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} />
|
||||||
<Descriptions bordered size="small" column={1}>
|
<Descriptions bordered column={1}>
|
||||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||||
{theJob.ro_number || ""}
|
{theJob.ro_number || ""}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ export function ProductionListTable({
|
|||||||
handleSelector=".prod-header-dropdown"
|
handleSelector=".prod-header-dropdown"
|
||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
components={{
|
components={{
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export default function ProductionSubletsManageComponent({ subletJobLines }) {
|
|||||||
const popContent = (
|
const popContent = (
|
||||||
<div style={{ minWidth: "20rem" }}>
|
<div style={{ minWidth: "20rem" }}>
|
||||||
<List
|
<List
|
||||||
size="small"
|
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
dataSource={subletJobLines}
|
dataSource={subletJobLines}
|
||||||
renderItem={(s) => (
|
renderItem={(s) => (
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export default function ProfileShopsComponent({
|
|||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
)}
|
)}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ export default function ScoreboardJobsList({ scoreBoardlist }) {
|
|||||||
const overlay = (
|
const overlay = (
|
||||||
<div style={{ width: "50vw", padding: "1rem" }}>
|
<div style={{ width: "50vw", padding: "1rem" }}>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ export default function ShopEmployeesListComponent({
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export default function ShopInfoUsersComponent() {
|
|||||||
<div>
|
<div>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
columns={columns.map((item) => ({ ...item }))}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export function TechClockedInList({ technician }) {
|
|||||||
<DateTimeFormatter>{ticket.clockon}</DateTimeFormatter>
|
<DateTimeFormatter>{ticket.clockon}</DateTimeFormatter>
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
<DataLabel label={t("timetickets.fields.cost_center")}>
|
<DataLabel label={t("timetickets.fields.cost_center")}>
|
||||||
{ticket.cost_center}{" "}
|
{ticket.cost_center}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
</Card>
|
</Card>
|
||||||
</List.Item>
|
</List.Item>
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ export function TechLookupJobsList({ bodyshop }) {
|
|||||||
return (
|
return (
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table } from "antd";
|
import { Card, Space, Table } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useMemo, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -15,6 +15,7 @@ export default function TimeTicketList({
|
|||||||
timetickets,
|
timetickets,
|
||||||
refetch,
|
refetch,
|
||||||
techConsole,
|
techConsole,
|
||||||
|
jobId,
|
||||||
}) {
|
}) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
@@ -157,8 +158,8 @@ export default function TimeTicketList({
|
|||||||
dataIndex: "actions",
|
dataIndex: "actions",
|
||||||
key: "actions",
|
key: "actions",
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<div>
|
<Space wrap>
|
||||||
{!!techConsole && (
|
{techConsole && (
|
||||||
<TimeTicketEnterButton
|
<TimeTicketEnterButton
|
||||||
actions={{ refetch }}
|
actions={{ refetch }}
|
||||||
context={{ id: record.id, timeticket: record }}
|
context={{ id: record.id, timeticket: record }}
|
||||||
@@ -186,7 +187,7 @@ export default function TimeTicketList({
|
|||||||
</TimeTicketEnterButton>
|
</TimeTicketEnterButton>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
)}
|
)}
|
||||||
</div>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -196,37 +197,54 @@ export default function TimeTicketList({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("timetickets.labels.timetickets")}
|
||||||
size="small"
|
extra={
|
||||||
pagination={{ position: "top" }}
|
jobId &&
|
||||||
columns={columns.map((item) => ({ ...item }))}
|
(techConsole ? null : (
|
||||||
rowKey="id"
|
<TimeTicketEnterButton
|
||||||
dataSource={timetickets}
|
actions={{ refetch }}
|
||||||
onChange={handleTableChange}
|
context={{ jobId: jobId }}
|
||||||
summary={() => {
|
>
|
||||||
return (
|
{t("timetickets.actions.enter")}
|
||||||
<Table.Summary.Row>
|
</TimeTicketEnterButton>
|
||||||
<Table.Summary.Cell>
|
))
|
||||||
{t("general.labels.totals")}
|
}
|
||||||
</Table.Summary.Cell>
|
>
|
||||||
<Table.Summary.Cell />
|
<Table
|
||||||
<Table.Summary.Cell />
|
loading={loading}
|
||||||
<Table.Summary.Cell>{totals.productivehrs}</Table.Summary.Cell>
|
columns={columns}
|
||||||
<Table.Summary.Cell>{totals.actualhrs}</Table.Summary.Cell>
|
rowKey="id"
|
||||||
<Table.Summary.Cell>
|
scroll={{
|
||||||
{totals.actualhrs === 0 || !totals.actualhrs
|
x: true,
|
||||||
? "∞"
|
}}
|
||||||
: `${((totals.productivehrs / totals.actualhrs) * 100).toFixed(
|
dataSource={timetickets}
|
||||||
2
|
onChange={handleTableChange}
|
||||||
)}% ${t("timetickets.labels.efficiency")}`}
|
summary={() => {
|
||||||
</Table.Summary.Cell>
|
return (
|
||||||
<Table.Summary.Cell />
|
<Table.Summary.Row>
|
||||||
<Table.Summary.Cell />
|
<Table.Summary.Cell>
|
||||||
<Table.Summary.Cell />
|
{t("general.labels.totals")}
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Cell>
|
||||||
);
|
<Table.Summary.Cell />
|
||||||
}}
|
<Table.Summary.Cell />
|
||||||
/>
|
<Table.Summary.Cell>{totals.productivehrs}</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell>{totals.actualhrs}</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell>
|
||||||
|
{totals.actualhrs === 0 || !totals.actualhrs
|
||||||
|
? "∞"
|
||||||
|
: `${(
|
||||||
|
(totals.productivehrs / totals.actualhrs) *
|
||||||
|
100
|
||||||
|
).toFixed(2)}% ${t("timetickets.labels.efficiency")}`}
|
||||||
|
</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell />
|
||||||
|
<Table.Summary.Cell />
|
||||||
|
<Table.Summary.Cell />
|
||||||
|
</Table.Summary.Row>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Form, Input } from "antd";
|
import { Form, Input } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
@@ -10,20 +10,7 @@ export default function VehicleDetailFormComponent({ form, loading }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="imex-flex-row imex-flex-row__flex-space-around">
|
<FormFieldsChanged form={form} />
|
||||||
<Button
|
|
||||||
className="imex-flex-row__margin-large"
|
|
||||||
type="primary"
|
|
||||||
key="submit"
|
|
||||||
htmlType="submit"
|
|
||||||
loading={loading}
|
|
||||||
>
|
|
||||||
{t("general.actions.save")}
|
|
||||||
</Button>
|
|
||||||
<div className="imex-flex-row__grow imex-flex-row__margin-large">
|
|
||||||
<FormFieldsChanged form={form} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<LayoutFormRow header={t("vehicles.forms.detail")}>
|
<LayoutFormRow header={t("vehicles.forms.detail")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@@ -136,7 +123,6 @@ export default function VehicleDetailFormComponent({ form, loading }) {
|
|||||||
<FormDatePicker />
|
<FormDatePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{
|
{
|
||||||
|
|
||||||
//Removed as a part of IO-446.
|
//Removed as a part of IO-446.
|
||||||
//No values have been captured in this field as of yet.
|
//No values have been captured in this field as of yet.
|
||||||
// <Form.Item
|
// <Form.Item
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Form, notification } from "antd";
|
import { Button, Form, notification, PageHeader } from "antd";
|
||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import VehicleDetailFormComponent from "./vehicle-detail-form.component";
|
import VehicleDetailFormComponent from "./vehicle-detail-form.component";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -37,18 +37,32 @@ function VehicleDetailFormContainer({ vehicle, refetch }) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form
|
<>
|
||||||
onFinish={handleFinish}
|
<PageHeader
|
||||||
form={form}
|
title={t("menus.header.owners")}
|
||||||
autoComplete="off"
|
extra={
|
||||||
layout="vertical"
|
<Button
|
||||||
initialValues={{
|
type="primary"
|
||||||
...vehicle,
|
loading={loading}
|
||||||
v_prod_dt: vehicle.v_prod_dt ? moment(vehicle.v_prod_dt) : null,
|
onClick={() => form.submit()}
|
||||||
}}
|
>
|
||||||
>
|
{t("general.actions.save")}
|
||||||
<VehicleDetailFormComponent form={form} loading={loading} />
|
</Button>
|
||||||
</Form>
|
}
|
||||||
|
/>
|
||||||
|
<Form
|
||||||
|
onFinish={handleFinish}
|
||||||
|
form={form}
|
||||||
|
autoComplete="off"
|
||||||
|
layout="vertical"
|
||||||
|
initialValues={{
|
||||||
|
...vehicle,
|
||||||
|
v_prod_dt: vehicle.v_prod_dt ? moment(vehicle.v_prod_dt) : null,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<VehicleDetailFormComponent form={form} loading={loading} />
|
||||||
|
</Form>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Table } from "antd";
|
import { Card, Table } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -62,44 +62,45 @@ export function VehicleDetailJobsComponent({ vehicle, bodyshop }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
title={() => (
|
title={t("vehicles.labels.relatedjobs")}
|
||||||
<div>
|
extra={
|
||||||
<VehicleDetailUpdateJobsComponent
|
<VehicleDetailUpdateJobsComponent
|
||||||
selectedJobs={selectedJobs}
|
selectedJobs={selectedJobs}
|
||||||
vehicle={vehicle}
|
vehicle={vehicle}
|
||||||
disabled={selectedJobs.length === 0}
|
disabled={selectedJobs.length === 0}
|
||||||
/>
|
/>
|
||||||
</div>
|
}
|
||||||
)}
|
>
|
||||||
pagination={{ position: "bottom" }}
|
<Table
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
dataSource={vehicle.jobs}
|
dataSource={vehicle.jobs}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
onSelect: (record, selected, selectedRows) => {
|
onSelect: (record, selected, selectedRows) => {
|
||||||
setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []);
|
setSelectedJobs(selectedRows ? selectedRows.map((i) => i.id) : []);
|
||||||
},
|
},
|
||||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||||
setSelectedJobs(
|
setSelectedJobs(
|
||||||
selectedRows
|
selectedRows
|
||||||
? selectedRows
|
? selectedRows
|
||||||
.filter((i) =>
|
.filter((i) =>
|
||||||
bodyshop.md_ro_statuses.active_statuses.includes(i.status)
|
bodyshop.md_ro_statuses.active_statuses.includes(i.status)
|
||||||
)
|
)
|
||||||
.map((i) => i.id)
|
.map((i) => i.id)
|
||||||
: []
|
: []
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
selectedRowKeys: selectedJobs,
|
selectedRowKeys: selectedJobs,
|
||||||
getCheckboxProps: (record) => ({
|
getCheckboxProps: (record) => ({
|
||||||
disabled: bodyshop.md_ro_statuses.active_statuses
|
disabled: bodyshop.md_ro_statuses.active_statuses
|
||||||
? !bodyshop.md_ro_statuses.active_statuses.includes(record.status)
|
? !bodyshop.md_ro_statuses.active_statuses.includes(record.status)
|
||||||
: true,
|
: true,
|
||||||
}),
|
}),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,7 @@ export default function VehicleTagPopoverComponent({ job }) {
|
|||||||
<div style={{ width: "400px" }}>
|
<div style={{ width: "400px" }}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Descriptions
|
<Descriptions title={t("owners.labels.fromclaim")} column={1}>
|
||||||
title={t("owners.labels.fromclaim")}
|
|
||||||
size="small"
|
|
||||||
column={1}
|
|
||||||
>
|
|
||||||
<Descriptions.Item key="1" label={t("jobs.fields.vehicle")}>
|
<Descriptions.Item key="1" label={t("jobs.fields.vehicle")}>
|
||||||
{`${job.v_model_yr || t("general.labels.na")} ${
|
{`${job.v_model_yr || t("general.labels.na")} ${
|
||||||
job.v_color || ""
|
job.v_color || ""
|
||||||
@@ -36,11 +32,7 @@ export default function VehicleTagPopoverComponent({ job }) {
|
|||||||
</Descriptions>
|
</Descriptions>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Descriptions
|
<Descriptions title={t("vehicles.labels.fromvehicle")} column={1}>
|
||||||
title={t("vehicles.labels.fromvehicle")}
|
|
||||||
size="small"
|
|
||||||
column={1}
|
|
||||||
>
|
|
||||||
<Descriptions.Item key="1" label={t("jobs.fields.vehicle")}>
|
<Descriptions.Item key="1" label={t("jobs.fields.vehicle")}>
|
||||||
{`${job.vehicle.v_model_yr || t("general.labels.na")}
|
{`${job.vehicle.v_model_yr || t("general.labels.na")}
|
||||||
${job.vehicle.v_make_desc || t("general.labels.na")}
|
${job.vehicle.v_make_desc || t("general.labels.na")}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
import { Button, Input, Table } from "antd";
|
import { Button, Card, Input, Space, Table } from "antd";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -62,38 +62,38 @@ export default function VehiclesListComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
title={t("menus.header.vehicles")}
|
||||||
title={() => {
|
extra={
|
||||||
return (
|
<Space wrap>
|
||||||
<div className="imex-table-header">
|
<Button onClick={() => refetch()}>
|
||||||
<Button onClick={() => refetch()}>
|
<SyncOutlined />
|
||||||
<SyncOutlined />
|
</Button>
|
||||||
</Button>
|
<Input.Search
|
||||||
<Input.Search
|
placeholder={t("general.labels.search")}
|
||||||
className="imex-table-header__search"
|
onSearch={(value) => {
|
||||||
placeholder={t("general.labels.search")}
|
search.search = value;
|
||||||
onSearch={(value) => {
|
history.push({ search: queryString.stringify(search) });
|
||||||
search.search = value;
|
}}
|
||||||
history.push({ search: queryString.stringify(search) });
|
enterButton
|
||||||
}}
|
/>
|
||||||
enterButton
|
</Space>
|
||||||
/>
|
}
|
||||||
</div>
|
>
|
||||||
);
|
<Table
|
||||||
}}
|
loading={loading}
|
||||||
size="small"
|
pagination={{
|
||||||
pagination={{
|
position: "top",
|
||||||
position: "top",
|
pageSize: 25,
|
||||||
pageSize: 25,
|
current: parseInt(page || 1),
|
||||||
current: parseInt(page || 1),
|
total: total,
|
||||||
total: total,
|
}}
|
||||||
}}
|
columns={columns}
|
||||||
columns={columns}
|
rowKey="id"
|
||||||
rowKey="id"
|
scroll={{ x: true }}
|
||||||
scroll={{ x: true }}
|
dataSource={vehicles}
|
||||||
dataSource={vehicles}
|
onChange={handleTableChange}
|
||||||
onChange={handleTableChange}
|
/>
|
||||||
/>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ export default function VendorsListComponent({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size="small"
|
|
||||||
pagination={{ position: "top" }}
|
pagination={{ position: "top" }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ export function BillsListPage({
|
|||||||
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
|
<Typography.Title level={4}>{t("bills.labels.bills")}</Typography.Title>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
size="small"
|
|
||||||
title={() => (
|
title={() => (
|
||||||
<div className="imex-table-header">
|
<div className="imex-table-header">
|
||||||
<Button onClick={() => refetch()}>
|
<Button onClick={() => refetch()}>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import CourtesyCarCreateFormComponent from "../../components/courtesy-car-form/courtesy-car-form.component";
|
import CourtesyCarCreateFormComponent from "../../components/courtesy-car-form/courtesy-car-form.component";
|
||||||
import CourtesyCarContractListComponent from "../../components/courtesy-car-contract-list/courtesy-car-contract-list.component";
|
import CourtesyCarContractListComponent from "../../components/courtesy-car-contract-list/courtesy-car-contract-list.component";
|
||||||
|
import { Col, Divider, Row } from "antd";
|
||||||
|
|
||||||
export default function CourtesyCarDetailPageComponent({
|
export default function CourtesyCarDetailPageComponent({
|
||||||
contracts,
|
contracts,
|
||||||
@@ -9,12 +10,17 @@ export default function CourtesyCarDetailPageComponent({
|
|||||||
totalContracts,
|
totalContracts,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<Row gutter={[16, 16]}>
|
||||||
<CourtesyCarCreateFormComponent form={form} saveLoading={saveLoading} />
|
<Col span={24}>
|
||||||
<CourtesyCarContractListComponent
|
<CourtesyCarCreateFormComponent form={form} saveLoading={saveLoading} />
|
||||||
contracts={contracts}
|
</Col>
|
||||||
totalContracts={totalContracts}
|
<Divider type="horizontal" />
|
||||||
/>
|
<Col span={24}>
|
||||||
</div>
|
<CourtesyCarContractListComponent
|
||||||
|
contracts={contracts}
|
||||||
|
totalContracts={totalContracts}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button } from "antd";
|
import { Button, PageHeader } from "antd";
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -7,7 +7,7 @@ import JobsAvailableTableContainer from "../../components/jobs-available-table/j
|
|||||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
import {
|
import {
|
||||||
setBreadcrumbs,
|
setBreadcrumbs,
|
||||||
setSelectedHeader
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
@@ -32,9 +32,14 @@ export function JobsAvailablePageContainer({
|
|||||||
return (
|
return (
|
||||||
<RbacWrapper action="jobs:available-list">
|
<RbacWrapper action="jobs:available-list">
|
||||||
<div>
|
<div>
|
||||||
<Link to="/manage/jobs/new">
|
<PageHeader
|
||||||
<Button>{t("jobs.actions.manualnew")}</Button>
|
title={t("titles.bc.availablejobs")}
|
||||||
</Link>
|
extra={
|
||||||
|
<Link to="/manage/jobs/new">
|
||||||
|
<Button>{t("jobs.actions.manualnew")}</Button>
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
|
/>
|
||||||
<JobsAvailableTableContainer />
|
<JobsAvailableTableContainer />
|
||||||
</div>
|
</div>
|
||||||
</RbacWrapper>
|
</RbacWrapper>
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
|
import { Col, Divider, Row } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import OwnerDetailForm from "../../components/owner-detail-form/owner-detail-form.container";
|
import OwnerDetailForm from "../../components/owner-detail-form/owner-detail-form.container";
|
||||||
import OwnerDetailJobsComponent from "../../components/owner-detail-jobs/owner-detail-jobs.component";
|
import OwnerDetailJobsComponent from "../../components/owner-detail-jobs/owner-detail-jobs.component";
|
||||||
|
|
||||||
export default function OwnersDetailComponent({ owner, refetch }) {
|
export default function OwnersDetailComponent({ owner, refetch }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<Row gutter={[16, 16]}>
|
||||||
<OwnerDetailForm owner={owner} refetch={refetch} />
|
<Col span={24}>
|
||||||
<OwnerDetailJobsComponent owner={owner} />
|
<OwnerDetailForm owner={owner} refetch={refetch} />
|
||||||
</div>
|
</Col>
|
||||||
|
<Divider type="horizontal" />
|
||||||
|
<Col span={24}>
|
||||||
|
<OwnerDetailJobsComponent owner={owner} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Button, Input, Table } from "antd";
|
import { Button, Card, Input, Space, Table } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -212,35 +212,35 @@ export function PartsQueuePageComponent({ bodyshop }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table
|
<Card
|
||||||
loading={loading}
|
extra={
|
||||||
size="small"
|
<Space wrap>
|
||||||
pagination={false}
|
<Button onClick={() => refetch()}>
|
||||||
columns={columns}
|
<SyncOutlined />
|
||||||
rowKey="id"
|
</Button>
|
||||||
dataSource={jobs}
|
<Input.Search
|
||||||
style={{ height: "100%" }}
|
className="imex-table-header__search"
|
||||||
scroll={{ x: true }}
|
placeholder={t("general.labels.search")}
|
||||||
title={() => {
|
onChange={(e) => {
|
||||||
return (
|
setSearchText(e.target.value);
|
||||||
<div className="imex-table-header">
|
}}
|
||||||
<Button onClick={() => refetch()}>
|
value={searchText}
|
||||||
<SyncOutlined />
|
enterButton
|
||||||
</Button>
|
/>
|
||||||
<Input.Search
|
</Space>
|
||||||
className="imex-table-header__search"
|
}
|
||||||
placeholder={t("general.labels.search")}
|
>
|
||||||
onChange={(e) => {
|
<Table
|
||||||
setSearchText(e.target.value);
|
loading={loading}
|
||||||
}}
|
pagination={false}
|
||||||
value={searchText}
|
columns={columns}
|
||||||
enterButton
|
rowKey="id"
|
||||||
/>
|
dataSource={jobs}
|
||||||
</div>
|
style={{ height: "100%" }}
|
||||||
);
|
scroll={{ x: true }}
|
||||||
}}
|
onChange={handleTableChange}
|
||||||
onChange={handleTableChange}
|
/>
|
||||||
/>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Col, Divider, Row } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import VehicleDetailFormContainer from "../../components/vehicle-detail-form/vehicle-detail-form.container";
|
import VehicleDetailFormContainer from "../../components/vehicle-detail-form/vehicle-detail-form.container";
|
||||||
import VehicleDetailJobsComponent from "../../components/vehicle-detail-jobs/vehicle-detail-jobs.component";
|
import VehicleDetailJobsComponent from "../../components/vehicle-detail-jobs/vehicle-detail-jobs.component";
|
||||||
@@ -5,8 +6,15 @@ import VehicleDetailJobsComponent from "../../components/vehicle-detail-jobs/veh
|
|||||||
export default function VehicleDetailComponent({ vehicle, refetch }) {
|
export default function VehicleDetailComponent({ vehicle, refetch }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<VehicleDetailFormContainer vehicle={vehicle} refetch={refetch} />
|
<Row gutter={[16, 16]}>
|
||||||
<VehicleDetailJobsComponent vehicle={vehicle} />
|
<Col span={24}>
|
||||||
|
<VehicleDetailFormContainer vehicle={vehicle} refetch={refetch} />
|
||||||
|
</Col>
|
||||||
|
<Divider type="horizontal" />
|
||||||
|
<Col span={24}>
|
||||||
|
<VehicleDetailJobsComponent vehicle={vehicle} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -582,6 +582,8 @@
|
|||||||
},
|
},
|
||||||
"outwith": "Out With",
|
"outwith": "Out With",
|
||||||
"return": "Return Courtesy Car",
|
"return": "Return Courtesy Car",
|
||||||
|
"status": "Status",
|
||||||
|
"usage": "Usage",
|
||||||
"vehicle": "Vehicle Description"
|
"vehicle": "Vehicle Description"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
@@ -1446,6 +1448,7 @@
|
|||||||
"existing_owners": "Existing Owners",
|
"existing_owners": "Existing Owners",
|
||||||
"fromclaim": "Current Claim",
|
"fromclaim": "Current Claim",
|
||||||
"fromowner": "Historical Owner Record",
|
"fromowner": "Historical Owner Record",
|
||||||
|
"relatedjobs": "Related Jobs",
|
||||||
"updateowner": "Update Owner"
|
"updateowner": "Update Owner"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -1776,7 +1779,8 @@
|
|||||||
"pmshift": "PM Shift",
|
"pmshift": "PM Shift",
|
||||||
"shift": "Shift",
|
"shift": "Shift",
|
||||||
"shiftalreadyclockedon": "Active Shift Time Tickets",
|
"shiftalreadyclockedon": "Active Shift Time Tickets",
|
||||||
"straight_time": "Straight Time"
|
"straight_time": "Straight Time",
|
||||||
|
"timetickets": "Time Tickets"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"clockedin": "Clocked in successfully.",
|
"clockedin": "Clocked in successfully.",
|
||||||
@@ -1924,6 +1928,7 @@
|
|||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"fromvehicle": "Historical Vehicle Record",
|
"fromvehicle": "Historical Vehicle Record",
|
||||||
|
"relatedjobs": "Related Jobs",
|
||||||
"updatevehicle": "Update Vehicle Information"
|
"updatevehicle": "Update Vehicle Information"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
@@ -582,6 +582,8 @@
|
|||||||
},
|
},
|
||||||
"outwith": "",
|
"outwith": "",
|
||||||
"return": "",
|
"return": "",
|
||||||
|
"status": "",
|
||||||
|
"usage": "",
|
||||||
"vehicle": ""
|
"vehicle": ""
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
@@ -1446,6 +1448,7 @@
|
|||||||
"existing_owners": "Propietarios existentes",
|
"existing_owners": "Propietarios existentes",
|
||||||
"fromclaim": "",
|
"fromclaim": "",
|
||||||
"fromowner": "",
|
"fromowner": "",
|
||||||
|
"relatedjobs": "",
|
||||||
"updateowner": ""
|
"updateowner": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -1776,7 +1779,8 @@
|
|||||||
"pmshift": "",
|
"pmshift": "",
|
||||||
"shift": "",
|
"shift": "",
|
||||||
"shiftalreadyclockedon": "",
|
"shiftalreadyclockedon": "",
|
||||||
"straight_time": ""
|
"straight_time": "",
|
||||||
|
"timetickets": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"clockedin": "",
|
"clockedin": "",
|
||||||
@@ -1924,6 +1928,7 @@
|
|||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"fromvehicle": "",
|
"fromvehicle": "",
|
||||||
|
"relatedjobs": "",
|
||||||
"updatevehicle": ""
|
"updatevehicle": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
@@ -582,6 +582,8 @@
|
|||||||
},
|
},
|
||||||
"outwith": "",
|
"outwith": "",
|
||||||
"return": "",
|
"return": "",
|
||||||
|
"status": "",
|
||||||
|
"usage": "",
|
||||||
"vehicle": ""
|
"vehicle": ""
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
@@ -1446,6 +1448,7 @@
|
|||||||
"existing_owners": "Propriétaires existants",
|
"existing_owners": "Propriétaires existants",
|
||||||
"fromclaim": "",
|
"fromclaim": "",
|
||||||
"fromowner": "",
|
"fromowner": "",
|
||||||
|
"relatedjobs": "",
|
||||||
"updateowner": ""
|
"updateowner": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
@@ -1776,7 +1779,8 @@
|
|||||||
"pmshift": "",
|
"pmshift": "",
|
||||||
"shift": "",
|
"shift": "",
|
||||||
"shiftalreadyclockedon": "",
|
"shiftalreadyclockedon": "",
|
||||||
"straight_time": ""
|
"straight_time": "",
|
||||||
|
"timetickets": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"clockedin": "",
|
"clockedin": "",
|
||||||
@@ -1924,6 +1928,7 @@
|
|||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"fromvehicle": "",
|
"fromvehicle": "",
|
||||||
|
"relatedjobs": "",
|
||||||
"updatevehicle": ""
|
"updatevehicle": ""
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
|
|||||||
Reference in New Issue
Block a user