Autohouse Updates.

This commit is contained in:
Patrick Fic
2022-09-27 15:07:26 -07:00
parent 918bc402f6
commit e8fc29ea61
3 changed files with 7 additions and 1 deletions

View File

@@ -89,6 +89,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
let job = Object.assign(
{},
values,
{ date_open: new Date() },
{
vehicle:
state.vehicle.selectedid || state.vehicle.none

View File

@@ -57,7 +57,7 @@ exports.default = async (req, res) => {
bodyshopid: bodyshop.id,
start: start
? moment(start).startOf("day")
: moment().subtract(3, "days").startOf("day"),
: moment().subtract(5, "days").startOf("day"),
...(end && { end: moment(end).startOf("day") }),
}
);
@@ -316,6 +316,10 @@ const CreateRepairOrderTag = (job, errorCallback) => {
moment(job.date_open)
.tz(job.bodyshop.timezone)
.format(AhDateFormat)) ||
(job.created_at &&
moment(job.created_at)
.tz(job.bodyshop.timezone)
.format(AhDateFormat)) ||
"",
ScheduledArrivalDate:
(job.scheduled_in &&

View File

@@ -623,6 +623,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
}
jobs(where: {_and: [{converted: {_eq: true}}, {updated_at: {_gt: $start}}, {updated_at: {_lte: $end}}, {shopid: {_eq: $bodyshopid}}]}) {
id
created_at
ro_number
status
est_ct_fn