@@ -77,7 +84,8 @@ const JobSearchSelect = (
}}
filterOption={false}
onSearch={handleSearch}
- notFoundContent={loading ?
:
}
+ loading={loading || idLoading}
+ //notFoundContent={loading ?
:
}
{...restProps}
>
{theOptions
@@ -99,7 +107,6 @@ const JobSearchSelect = (
))
: null}
- {idLoading || loading ?
: null}
{error ?
: null}
{idError ? (
diff --git a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
index 929c7f6d5..137c074aa 100644
--- a/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
+++ b/client/src/components/jobs-admin-mark-reexport/jobs-admin-mark-reexport.component.jsx
@@ -6,12 +6,17 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
-import { selectBodyshop } from "../../redux/user/user.selectors";
+import {
+ selectBodyshop,
+ selectCurrentUser,
+} from "../../redux/user/user.selectors";
import moment from "moment";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import { insertAuditTrail } from "../../redux/application/application.actions";
+import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
+ currentUser: selectCurrentUser,
});
const mapDispatchToProps = (dispatch) => ({
insertAuditTrail: ({ jobid, operation }) =>
@@ -22,9 +27,15 @@ export default connect(
mapDispatchToProps
)(JobAdminMarkReexport);
-export function JobAdminMarkReexport({ insertAuditTrail, bodyshop, job }) {
+export function JobAdminMarkReexport({
+ insertAuditTrail,
+ bodyshop,
+ currentUser,
+ job,
+}) {
const { t } = useTranslation();
const [loading, setLoading] = useState(false);
+ const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
const [markJobForReexport] = useMutation(gql`
mutation MARK_JOB_FOR_REEXPORT($jobId: uuid!) {
update_jobs_by_pk(
@@ -101,6 +112,20 @@ export function JobAdminMarkReexport({ insertAuditTrail, bodyshop, job }) {
variables: { jobId: job.id, date_exported: moment() },
});
+ await insertExportLog({
+ variables: {
+ logs: [
+ {
+ bodyshopid: bodyshop.id,
+ jobid: job.id,
+ successful: true,
+ message: JSON.stringify([t("general.labels.markedexported")]),
+ useremail: currentUser.email,
+ },
+ ],
+ },
+ });
+
if (!result.errors) {
notification["success"]({ message: t("jobs.successes.save") });
insertAuditTrail({
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
index a18c370df..dcbc33e76 100644
--- 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
@@ -4,14 +4,15 @@ import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
+import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
import {
- selectAuthLevel,
selectBodyshop,
+ selectCurrentUser,
} from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
- authLevel: selectAuthLevel,
+ currentUser: selectCurrentUser,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -23,6 +24,8 @@ export default connect(
)(BillMarkSelectedExported);
export function BillMarkSelectedExported({
+ bodyshop,
+ currentUser,
billids,
disabled,
loadingCallback,
@@ -31,7 +34,7 @@ export function BillMarkSelectedExported({
}) {
const { t } = useTranslation();
const [loading, setLoading] = useState(false);
-
+ const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
const [updateBill] = useMutation(gql`
mutation UPDATE_BILL($billIds: [uuid!]!) {
update_bills(where: { id: { _in: $billIds } }, _set: { exported: true }) {
@@ -49,9 +52,21 @@ export function BillMarkSelectedExported({
loadingCallback(true);
const result = await updateBill({
variables: { billIds: billids },
- update(cache){
-
- }
+ update(cache) {},
+ });
+
+ await insertExportLog({
+ variables: {
+ logs: billids.map((id) => {
+ return {
+ bodyshopid: bodyshop.id,
+ billid: id,
+ successful: true,
+ message: JSON.stringify([t("general.labels.markedexported")]),
+ useremail: currentUser.email,
+ };
+ }),
+ },
});
if (!result.errors) {
diff --git a/client/src/components/production-list-columns/production-list-columns.comment.component.jsx b/client/src/components/production-list-columns/production-list-columns.comment.component.jsx
index fafccff93..d66f72c75 100644
--- a/client/src/components/production-list-columns/production-list-columns.comment.component.jsx
+++ b/client/src/components/production-list-columns/production-list-columns.comment.component.jsx
@@ -1,6 +1,6 @@
import Icon from "@ant-design/icons";
import { useMutation } from "@apollo/client";
-import { Button, Input, Popover } from "antd";
+import { Button, Input, Popover, Tooltip } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { FaRegStickyNote } from "react-icons/fa";
@@ -69,10 +69,11 @@ export default function ProductionListColumnComment({ record }) {
cursor: "pointer",
overflow: "hidden",
textOverflow: "ellipsis",
+ display: "inline-block",
}}
>
- {record.comment || " "}
+
{record.comment || " "}