Merged in release/2022-06-10 (pull request #510)

release/2022-06-10

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2022-06-09 22:55:25 +00:00
8 changed files with 42 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ export function BillMarkExportedButton({
bodyshopid: bodyshop.id,
billid: bill.id,
successful: true,
message: t("general.labels.markedexported"),
message: JSON.stringify([t("general.labels.markedexported")]),
useremail: currentUser.email,
},
],

View File

@@ -169,7 +169,7 @@ export default function ScoreboardAddButton({
};
return (
<Popover content={overlay} visible={visibility}>
<Popover content={overlay} visible={visibility} placement="bottom">
<Button
loading={loading}
disabled={disabled}

View File

@@ -119,7 +119,7 @@ export function JobAdminMarkReexport({
bodyshopid: bodyshop.id,
jobid: job.id,
successful: true,
message: t("general.labels.markedexported"),
message: JSON.stringify([t("general.labels.markedexported")]),
useremail: currentUser.email,
},
],

View File

@@ -62,7 +62,7 @@ export function BillMarkSelectedExported({
bodyshopid: bodyshop.id,
billid: id,
successful: true,
message: t("general.labels.markedexported"),
message: JSON.stringify([t("general.labels.markedexported")]),
useremail: currentUser.email,
};
}),

View File

@@ -5,7 +5,7 @@ import moment from "moment";
import queryString from "query-string";
import React, { useMemo } from "react";
import { useLocation } from "react-router-dom";
import { QUERY_TIME_TICKETS_IN_RANGE } from "../../graphql/timetickets.queries";
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
@@ -59,7 +59,7 @@ export default function ScoreboardTimeTickets() {
};
}, []);
const { loading, error, data } = useQuery(QUERY_TIME_TICKETS_IN_RANGE, {
const { loading, error, data } = useQuery(QUERY_TIME_TICKETS_IN_RANGE_SB, {
variables: {
start: startDate.format("YYYY-MM-DD"),
end: endDate.format("YYYY-MM-DD"),

View File

@@ -1829,6 +1829,7 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
ins_co_id
dms_allocation
id
inproduction
ded_amt
ded_status
depreciation_taxes

View File

@@ -26,6 +26,40 @@ export const QUERY_TICKETS_BY_JOBID = gql`
`;
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
timetickets(
where: { date: { _gte: $start, _lte: $end } }
order_by: { date: desc_nulls_first }
) {
actualhrs
ciecacode
clockoff
clockon
cost_center
created_at
date
id
rate
productivehrs
memo
jobid
flat_rate
job {
id
ro_number
}
employeeid
employee {
id
employee_number
first_name
last_name
}
}
}
`;
export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
query QUERY_TIME_TICKETS_IN_RANGE(
$start: date!
$end: date!

View File

@@ -250,7 +250,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
onlyFuture={!!bodyshop.cdk_dealerid}
/>
</Form.Item>
{!jobRO && (
{!jobRO && job.inproduction && (
<Form.Item
label={t("jobs.actions.removefromproduction")}
name="removefromproduction"