From cbc723fa385e351b6368cd6f2d6cf86802b88e40 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 23 Jan 2025 12:05:35 -0800 Subject: [PATCH 1/2] IO-3108 Job Totals USA PASL Signed-off-by: Allan Carr --- server/job/job-totals-USA.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/job/job-totals-USA.js b/server/job/job-totals-USA.js index 356636c36..4e889a658 100644 --- a/server/job/job-totals-USA.js +++ b/server/job/job-totals-USA.js @@ -818,6 +818,7 @@ function CalculateTaxesTotals(job, otherTotals) { PAG: Dinero(), PAO: Dinero(), PAS: Dinero(), + PASL: Dinero(), PAP: Dinero(), PAM: Dinero(), From 11e2f5d83d2e37803f561c241729125192c98517 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Thu, 23 Jan 2025 12:57:10 -0800 Subject: [PATCH 2/2] feature/IO-3108-Job-Totals-USA-PASL - Fix submit button for Product Fruits reasons, to go into hotfix --- .../jobs-convert-button.component.jsx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx index 941de644b..bc4d28f59 100644 --- a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx +++ b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx @@ -1,7 +1,8 @@ import { useMutation } from "@apollo/client"; import { Button, Form, Input, notification, Popover, Select, Space, Switch } from "antd"; import axios from "axios"; -import React, { useState } from "react"; +import { some } from "lodash"; +import React, { useCallback, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -18,7 +19,14 @@ const mapStateToProps = createStructuredSelector({ jobRO: selectJobReadOnly }); const mapDispatchToProps = (dispatch) => ({ - insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type })) + insertAuditTrail: ({ jobid, operation, type }) => + dispatch( + insertAuditTrail({ + jobid, + operation, + type + }) + ) }); export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTrail, parentFormIsFieldsTouched }) { @@ -27,6 +35,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO); const { t } = useTranslation(); const [form] = Form.useForm(); + const allFormValues = Form.useWatch([], form); const handleConvert = async ({ employee_csr, category, ...values }) => { if (parentFormIsFieldsTouched()) { @@ -69,6 +78,8 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr setLoading(false); }; + const submitDisabled = useCallback(() => some(allFormValues, (v) => v === undefined), [allFormValues]); + const popMenu = (
-