Merged in release/2023-07-21 (pull request #900)

Release/2023 07 21
This commit is contained in:
Allan Carr
2023-07-21 17:09:31 +00:00
5 changed files with 61 additions and 38 deletions

View File

@@ -59,6 +59,14 @@ export default function ContractsCarsComponent({
sortOrder: sortOrder:
state.sortedInfo.columnKey === "model" && state.sortedInfo.order, state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
}, },
{
title: t("courtesycars.fields.color"),
dataIndex: "color",
key: "color",
sorter: (a, b) => alphaSort(a.color, b.color),
sortOrder:
state.sortedInfo.columnKey === "color" && state.sortedInfo.order,
},
{ {
title: t("courtesycars.fields.plate"), title: t("courtesycars.fields.plate"),
dataIndex: "plate", dataIndex: "plate",
@@ -93,6 +101,9 @@ export default function ContractsCarsComponent({
(cc.model || "") (cc.model || "")
.toLowerCase() .toLowerCase()
.includes(state.search.toLowerCase()) || .includes(state.search.toLowerCase()) ||
(cc.color || "")
.toLowerCase()
.includes(state.search.toLowerCase()) ||
(cc.plate || "").toLowerCase().includes(state.search.toLowerCase()) (cc.plate || "").toLowerCase().includes(state.search.toLowerCase())
); );

View File

@@ -101,24 +101,25 @@ export function TechClockOffButton({
message: t("timetickets.successes.clockedout"), message: t("timetickets.successes.clockedout"),
}); });
} }
if (!isShiftTicket) {
const job_update_result = await updateJobStatus({ const job_update_result = await updateJobStatus({
variables: { variables: {
jobId: jobId, jobId: jobId,
status: status, status: status,
}, },
});
if (!!job_update_result.errors) {
notification["error"]({
message: t("jobs.errors.updating", {
message: JSON.stringify(result.errors),
}),
});
} else {
notification["success"]({
message: t("jobs.successes.updated"),
}); });
if (!!job_update_result.errors) {
notification["error"]({
message: t("jobs.errors.updating", {
message: JSON.stringify(result.errors),
}),
});
} else {
notification["success"]({
message: t("jobs.successes.updated"),
});
}
} }
setLoading(false); setLoading(false);
if (completedCallback) completedCallback(); if (completedCallback) completedCallback();
@@ -217,7 +218,6 @@ export function TechClockOffButton({
</Form.Item> </Form.Item>
</div> </div>
) : null} ) : null}
<Form.Item <Form.Item
name="cost_center" name="cost_center"
label={t("timetickets.fields.cost_center")} label={t("timetickets.fields.cost_center")}
@@ -250,26 +250,29 @@ export function TechClockOffButton({
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item {isShiftTicket ? (
name="status" <div></div>
label={t("jobs.fields.status")} ) : (
initialValue={ <Form.Item
lineTicketData && lineTicketData.jobs_by_pk.status name="status"
} label={t("jobs.fields.status")}
rules={[ initialValue={
{ lineTicketData && lineTicketData.jobs_by_pk.status
required: true, }
//message: t("general.validation.required"), rules={[
}, {
]} required: true,
> //message: t("general.validation.required"),
<Select disabled={isShiftTicket}> },
{bodyshop.md_ro_statuses.production_statuses.map((item) => ( ]}
<Select.Option key={item}></Select.Option> >
))} <Select>
</Select> {bodyshop.md_ro_statuses.production_statuses.map((item) => (
</Form.Item> <Select.Option key={item}></Select.Option>
))}
</Select>
</Form.Item>
)}
<Button type="primary" htmlType="submit" loading={loading}> <Button type="primary" htmlType="submit" loading={loading}>
{t("general.actions.save")} {t("general.actions.save")}
</Button> </Button>

View File

@@ -3300,6 +3300,7 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr
@@ -3564,6 +3565,7 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr
@@ -3839,6 +3841,7 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "completed_tasks" jsonb
-- null default jsonb_build_array();

View File

@@ -0,0 +1,2 @@
alter table "public"."jobs" add column "completed_tasks" jsonb
null default jsonb_build_array();