diff --git a/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx b/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx
index d497c9618..bfddbfefc 100644
--- a/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx
+++ b/client/src/components/jobs-admin-dates/jobs-admin-dates.component.jsx
@@ -1,14 +1,14 @@
-import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import { useMutation } from "@apollo/client";
import { Button, Form, notification } from "antd";
+import moment from "moment";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { UPDATE_JOB } from "../../graphql/jobs.queries";
-import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
-import LayoutFormRow from "../layout-form-row/layout-form-row.component";
-import moment from "moment";
-import FormDatePicker from "../form-date-picker/form-date-picker.component";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
+import FormDatePicker from "../form-date-picker/form-date-picker.component";
+import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
+import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
+import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -38,8 +38,8 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
setLoading(true);
const result = await updateJob({
variables: { jobId: job.id, job: values },
- refetchQueries: ['GET_JOB_BY_PK'],
- awaitRefetchQueries:true
+ refetchQueries: ["GET_JOB_BY_PK"],
+ awaitRefetchQueries: true,
});
const changedAuditFields = form.getFieldsValue(
@@ -126,7 +126,10 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
-
+
+
+
+
diff --git a/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx b/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx
index 51d5d33ed..7963fd05f 100644
--- a/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx
+++ b/client/src/components/jobs-admin-unvoid/jobs-admin-unvoid.component.jsx
@@ -33,8 +33,9 @@ export function JobsAdminUnvoid({
mutation UNVOID_JOB($jobId: uuid!) {
update_jobs_by_pk(pk_columns: {id: $jobId}, _set: {voided: false, status: "${
bodyshop.md_ro_statuses.default_imported
- }"}) {
+ }", date_void: null}) {
id
+ date_void
voided
status
}
diff --git a/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx b/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
index ac501c7e1..05cd1b289 100644
--- a/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
+++ b/client/src/components/jobs-detail-dates/jobs-detail-dates.component.jsx
@@ -141,6 +141,10 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
+
+
+
+
);
diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
index 48118f1c0..4565864f5 100644
--- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
+++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx
@@ -5,10 +5,10 @@ import {
Dropdown,
Form,
Menu,
- notification,
Popconfirm,
Popover,
Select,
+ notification,
} from "antd";
import React, { useMemo } from "react";
import { useTranslation } from "react-i18next";
@@ -24,12 +24,12 @@ import {
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
+import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
import JobsDetailHeaderActionsExportcustdataComponent from "./jobs-detail-header-actions.exportcustdata.component";
-import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -480,6 +480,7 @@ export function JobsDetailHeaderActions({
scheduled_in: null,
scheduled_completion: null,
inproduction: false,
+ date_void: new Date(),
},
note: [
{
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 9a226c831..afffecc3c 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -682,6 +682,7 @@ export const GET_JOB_BY_PK = gql`
date_rentalresp
date_exported
date_repairstarted
+ date_void
status
owner_owing
tax_registration_number
@@ -1078,6 +1079,7 @@ export const UPDATE_JOB = gql`
scheduled_completion
actual_in
date_repairstarted
+ date_void
}
}
}
@@ -1125,6 +1127,7 @@ export const VOID_JOB = gql`
update_jobs_by_pk(_set: $job, pk_columns: { id: $jobId }) {
id
date_exported
+ date_void
status
alt_transport
ro_number
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 345d72f08..e8a1bb563 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1439,6 +1439,7 @@
"date_repairstarted": "Repairs Started",
"date_scheduled": "Scheduled",
"date_towin": "Towed In",
+ "date_void": "Void",
"ded_amt": "Deductible",
"ded_note": "Deductible Note",
"ded_status": "Deductible Status",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index dbecbc9d1..60fc62d36 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1439,6 +1439,7 @@
"date_repairstarted": "",
"date_scheduled": "Programado",
"date_towin": "",
+ "date_void": "",
"ded_amt": "Deducible",
"ded_note": "",
"ded_status": "Estado deducible",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 88033bd4c..fe1289614 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1439,6 +1439,7 @@
"date_repairstarted": "",
"date_scheduled": "Prévu",
"date_towin": "",
+ "date_void": "",
"ded_amt": "Déductible",
"ded_note": "",
"ded_status": "Statut de franchise",
diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js
index c07e375fa..0c4c33520 100644
--- a/client/src/utils/TemplateConstants.js
+++ b/client/src/utils/TemplateConstants.js
@@ -1237,7 +1237,7 @@ export const TemplateList = (type, context) => {
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
- field: i18n.t("jobs.fields.date_open"),
+ field: i18n.t("jobs.fields.date_void"),
},
group: "sales",
},
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index ee39e05c3..12664c718 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -3495,6 +3495,7 @@
- v_model_yr
- v_vin
- vehicleid
+ - date_void
- voided
select_permissions:
- role: user
@@ -3761,6 +3762,7 @@
- v_model_yr
- v_vin
- vehicleid
+ - date_void
- voided
filter:
bodyshop:
@@ -4037,6 +4039,7 @@
- v_model_yr
- v_vin
- vehicleid
+ - date_void
- voided
filter:
bodyshop:
diff --git a/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/down.sql b/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/down.sql
new file mode 100644
index 000000000..085b24071
--- /dev/null
+++ b/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/down.sql
@@ -0,0 +1 @@
+alter table "public"."jobs" rename column "date_void" to "void_date";
diff --git a/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/up.sql b/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/up.sql
new file mode 100644
index 000000000..4a6b2bfc8
--- /dev/null
+++ b/hasura/migrations/1689978551428_alter_table_public_jobs_alter_column_void_date/up.sql
@@ -0,0 +1 @@
+alter table "public"."jobs" rename column "void_date" to "date_void";