IO-1281 System setting for posting time tickets to closed RO

This commit is contained in:
Patrick Fic
2021-08-03 11:27:03 -07:00
parent 4e4c59ce4d
commit b0ec7867b5
17 changed files with 396 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ const JobSearchSelect = (
{
disabled,
convertedOnly = false,
notInvoiced = false,
notExported = true,
clm_no = false,
...restProps
@@ -30,6 +31,7 @@ const JobSearchSelect = (
variables: {
...(convertedOnly ? { isConverted: true } : {}),
...(notExported ? { notExported: true } : {}),
...(notInvoiced ? { notInvoiced: true } : {}),
},
}
: {}),

View File

@@ -444,6 +444,13 @@ export default function ShopInfoGeneral({ form }) {
>
<Switch />
</Form.Item>
<Form.Item
name={["tt_allow_post_to_invoiced"]}
label={t("bodyshop.fields.tt_allow_post_to_invoiced")}
valuePropName="checked"
>
<Switch />
</Form.Item>
</LayoutFormRow>
<LayoutFormRow grow header={t("bodyshop.labels.messagingpresets")}>
<Form.List name={["md_messaging_presets"]}>

View File

@@ -30,7 +30,10 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
},
]}
>
<JobSearchSelect />
<JobSearchSelect
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
notExported={!bodyshop.tt_allow_post_to_invoiced}
/>
</Form.Item>
<Form.Item

View File

@@ -82,7 +82,10 @@ export function TimeTicketModalComponent({
},
]}
>
<JobSearchSelect convertedOnly notExported={false} />
<JobSearchSelect
convertedOnly={!bodyshop.tt_allow_post_to_invoiced}
notExported={!bodyshop.tt_allow_post_to_invoiced}
/>
</Form.Item>
)}
</Form.Item>

View File

@@ -92,6 +92,7 @@ export const QUERY_BODYSHOP = gql`
cdk_dealerid
features
attach_pdf_to_email
tt_allow_post_to_invoiced
employees {
id
active
@@ -180,6 +181,7 @@ export const UPDATE_SHOP = gql`
md_jobline_presets
cdk_dealerid
attach_pdf_to_email
tt_allow_post_to_invoiced
employees {
id
first_name

View File

@@ -1025,6 +1025,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
$search: String
$isConverted: Boolean
$notExported: Boolean
$notInvoiced: Boolean
) {
search_jobs(
args: { search: $search }
@@ -1033,6 +1034,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
_and: {
converted: { _eq: $isConverted }
date_exported: { _is_null: $notExported }
date_invoiced: { _is_null: $notInvoiced }
}
}
) {

View File

@@ -446,6 +446,7 @@
"production_statuses": "Production Statuses"
},
"target_touchtime": "Target Touch Time",
"tt_allow_post_to_invoiced": "Allow Time Tickets to be posted to Invoiced & Exported Jobs",
"use_fippa": "Use FIPPA for Names on Generated Documents?",
"website": "Website",
"zip_post": "Zip/Postal Code"

View File

@@ -446,6 +446,7 @@
"production_statuses": ""
},
"target_touchtime": "",
"tt_allow_post_to_invoiced": "",
"use_fippa": "",
"website": "",
"zip_post": ""

View File

@@ -446,6 +446,7 @@
"production_statuses": ""
},
"target_touchtime": "",
"tt_allow_post_to_invoiced": "",
"use_fippa": "",
"website": "",
"zip_post": ""