{
logImEXEvent("job_ca_bc_pvrt_calculate");
- form.setFieldsValue({ ca_bc_pvrt: (values.rate * values.days).toFixed(2) });
+ form.setFieldsValue({ ca_bc_pvrt: ((values.rate||0) * (values.days||0)).toFixed(2) });
setVisibility(false);
};
diff --git a/client/src/components/owner-detail-form/owner-detail-form.component.jsx b/client/src/components/owner-detail-form/owner-detail-form.component.jsx
index a41b050e9..f5fe04d5d 100644
--- a/client/src/components/owner-detail-form/owner-detail-form.component.jsx
+++ b/client/src/components/owner-detail-form/owner-detail-form.component.jsx
@@ -14,7 +14,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
return (
-
@@ -29,7 +28,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
-
@@ -50,7 +48,6 @@ export default function OwnerDetailFormComponent({ form, loading }) {
-
+
+
+
);
}
diff --git a/client/src/components/owner-find-modal/owner-find-modal.component.jsx b/client/src/components/owner-find-modal/owner-find-modal.component.jsx
index eb2a6e068..177b4326e 100644
--- a/client/src/components/owner-find-modal/owner-find-modal.component.jsx
+++ b/client/src/components/owner-find-modal/owner-find-modal.component.jsx
@@ -59,6 +59,14 @@ export default function OwnerFindModalComponent({
{record.ownr_ph2}
),
},
+ {
+ title: t("owners.fields.note"),
+ dataIndex: "note",
+ key: "note",
+ render: (text, record) => (
+ {record.note}
+ ),
+ },
];
const handleOnRowClick = (record) => {
diff --git a/client/src/components/parts-order-modal/parts-order-modal.container.jsx b/client/src/components/parts-order-modal/parts-order-modal.container.jsx
index 18bd94986..4974168e9 100644
--- a/client/src/components/parts-order-modal/parts-order-modal.container.jsx
+++ b/client/src/components/parts-order-modal/parts-order-modal.container.jsx
@@ -101,6 +101,7 @@ export function PartsOrderModalContainer({
po: [
{
...values,
+ order_date: moment().format("YYYY-MM-DD"),
orderedby: currentUser.email,
jobid: jobId,
user_email: currentUser.email,
diff --git a/client/src/components/parts-receive-modal/parts-receive-modal.container.jsx b/client/src/components/parts-receive-modal/parts-receive-modal.container.jsx
index ba5334625..9694bcf49 100644
--- a/client/src/components/parts-receive-modal/parts-receive-modal.container.jsx
+++ b/client/src/components/parts-receive-modal/parts-receive-modal.container.jsx
@@ -1,6 +1,6 @@
import { useMutation } from "@apollo/client";
import { Form, Modal, notification } from "antd";
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -31,7 +31,7 @@ export function PartsReceiveModalContainer({
bodyshop,
}) {
const { t } = useTranslation();
-
+ const [loading, setLoading] = useState(false);
const { visible, context, actions } = partsReceiveModal;
const { partsorderlines } = context;
@@ -42,7 +42,7 @@ export function PartsReceiveModalContainer({
const handleFinish = async (values) => {
logImEXEvent("parts_order_receive");
-
+ setLoading(true);
const result = await Promise.all(
values.partsorderlines.map((li) => {
return receivePartsLine({
@@ -75,7 +75,7 @@ export function PartsReceiveModalContainer({
notification["success"]({
message: t("parts_orders.successes.received"),
});
-
+ setLoading(false);
if (refetch) refetch();
toggleModalVisible();
};
@@ -96,6 +96,7 @@ export function PartsReceiveModalContainer({
title={t("parts_orders.labels.receive")}
onCancel={() => toggleModalVisible()}
onOk={() => form.submit()}
+ okButtonProps={{ loading: loading }}
destroyOnClose
forceRender
width="50%"
diff --git a/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx b/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx
new file mode 100644
index 000000000..a18c370df
--- /dev/null
+++ b/client/src/components/payable-mark-selected-exported/payable-mark-selected-exported.component.jsx
@@ -0,0 +1,79 @@
+import { gql, useMutation } from "@apollo/client";
+import { Button, notification } from "antd";
+import React, { useState } from "react";
+import { useTranslation } from "react-i18next";
+import { connect } from "react-redux";
+import { createStructuredSelector } from "reselect";
+import {
+ selectAuthLevel,
+ selectBodyshop,
+} from "../../redux/user/user.selectors";
+
+const mapStateToProps = createStructuredSelector({
+ bodyshop: selectBodyshop,
+ authLevel: selectAuthLevel,
+});
+const mapDispatchToProps = (dispatch) => ({
+ //setUserLanguage: language => dispatch(setUserLanguage(language))
+});
+
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(BillMarkSelectedExported);
+
+export function BillMarkSelectedExported({
+ billids,
+ disabled,
+ loadingCallback,
+ completedCallback,
+ refetch,
+}) {
+ const { t } = useTranslation();
+ const [loading, setLoading] = useState(false);
+
+ const [updateBill] = useMutation(gql`
+ mutation UPDATE_BILL($billIds: [uuid!]!) {
+ update_bills(where: { id: { _in: $billIds } }, _set: { exported: true }) {
+ returning {
+ id
+ exported
+ exported_at
+ }
+ }
+ }
+ `);
+
+ const handleUpdate = async () => {
+ setLoading(true);
+ loadingCallback(true);
+ const result = await updateBill({
+ variables: { billIds: billids },
+ update(cache){
+
+ }
+ });
+
+ if (!result.errors) {
+ notification["success"]({
+ message: t("bills.successes.markexported"),
+ });
+ } else {
+ notification["error"]({
+ message: t("bills.errors.saving", {
+ error: JSON.stringify(result.errors),
+ }),
+ });
+ }
+ loadingCallback(false);
+ completedCallback && completedCallback([]);
+ setLoading(false);
+ refetch && refetch();
+ };
+
+ return (
+
+ );
+}
diff --git a/client/src/components/production-list-columns/production-list-columns.add.component.jsx b/client/src/components/production-list-columns/production-list-columns.add.component.jsx
index fb3575f5d..82f884673 100644
--- a/client/src/components/production-list-columns/production-list-columns.add.component.jsx
+++ b/client/src/components/production-list-columns/production-list-columns.add.component.jsx
@@ -42,17 +42,24 @@ export function ProductionColumnsComponent({
};
const columnKeys = columns.map((i) => i.key);
-
+ const cols = dataSource({
+ technician,
+ state: tableState,
+ activeStatuses: bodyshop.md_ro_statuses.active_statuses,
+ });
const menu = (
-