Merged in feature/IO-2364-UnInvoice-Audit-Trail (pull request #906)
Feature/IO-2364 UnInvoice Audit Trail
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { gql, useMutation } from "@apollo/client";
|
||||
import { Button, notification } from "antd";
|
||||
import { gql } from "@apollo/client";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import moment from "moment";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
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,
|
||||
@@ -150,6 +149,10 @@ export function JobAdminMarkReexport({
|
||||
|
||||
if (!result.errors) {
|
||||
notification["success"]({ message: t("jobs.successes.save") });
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_jobuninvoice(),
|
||||
});
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
"messages": {
|
||||
"admin_jobmarkexported": "ADMIN: Job marked as exported.",
|
||||
"admin_jobmarkforreexport": "ADMIN: Job marked for re-export.",
|
||||
"admin_jobuninvoice": "ADMIN: Job has been uninvoiced.",
|
||||
"admin_jobunvoid": "ADMIN: Job has been unvoided.",
|
||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
"messages": {
|
||||
"admin_jobmarkexported": "",
|
||||
"admin_jobmarkforreexport": "",
|
||||
"admin_jobuninvoice": "",
|
||||
"admin_jobunvoid": "",
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
"messages": {
|
||||
"admin_jobmarkexported": "",
|
||||
"admin_jobmarkforreexport": "",
|
||||
"admin_jobuninvoice": "",
|
||||
"admin_jobunvoid": "",
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
|
||||
@@ -36,6 +36,7 @@ const AuditTrailMapping = {
|
||||
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
|
||||
jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
|
||||
admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"),
|
||||
admin_jobuninvoice: () => i18n.t("audit_trail.messages.admin_jobuninvoice"),
|
||||
admin_jobmarkforreexport: () =>
|
||||
i18n.t("audit_trail.messages.admin_jobmarkforreexport"),
|
||||
admin_jobmarkexported: () =>
|
||||
|
||||
Reference in New Issue
Block a user