Compare commits

..

4 Commits

Author SHA1 Message Date
Patrick Fic
08749b0c92 Add audit log to job close with bypass. 2024-04-11 13:24:45 -07:00
Patrick Fic
ea73af371e Minor bug fixes. 2024-04-11 13:07:43 -07:00
Patrick Fic
453236cf3a Bug fixes and formatting for RO guard. 2024-04-11 09:49:00 -07:00
Patrick Fic
e5599ff4c4 Update prettier config and add as dev dependency. 2024-04-09 12:23:10 -07:00
32 changed files with 336 additions and 322 deletions

View File

@@ -9,10 +9,10 @@ const config = {
arrowParens: "always",
jsxSingleQuote: false,
bracketSameLine: false,
endOfLine: "lf",
importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
importOrderSeparation: true,
importOrderSortSpecifiers: true
endOfLine: "lf"
// importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
// importOrderSeparation: true,
// importOrderSortSpecifiers: true
};
module.exports = config;

View File

@@ -1,4 +1,4 @@
<babeledit_project be_version="2.7.1" version="1.2">
<babeledit_project version="1.2" be_version="2.7.1">
<!--
BabelEdit project file
@@ -1789,6 +1789,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>jobclosedwithbypass</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>jobconverted</name>
<definition_loaded>false</definition_loaded>
@@ -34201,6 +34222,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>profitbypassrequired</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>profits</name>
<definition_loaded>false</definition_loaded>
@@ -34587,27 +34629,6 @@
<folder_node>
<name>ro_guard</name>
<children>
<concept_node>
<name>eforce_profit</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_ar</name>
<definition_loaded>false</definition_loaded>
@@ -34713,6 +34734,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_profit</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>enforce_sublet</name>
<definition_loaded>false</definition_loaded>

View File

@@ -1,8 +1,9 @@
import { CalculatorFilled } from "@ant-design/icons";
import { Button, Form, InputNumber, Popover, Space } from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Button, Form, InputNumber, Popover } from "antd";
import { logImEXEvent } from "../../firebase/firebase.utils";
import { useTranslation } from "react-i18next";
import { CalculatorFilled } from "@ant-design/icons";
export default function CABCpvrtCalculator({ disabled, form }) {
const [visibility, setVisibility] = useState(false);
@@ -26,14 +27,10 @@ export default function CABCpvrtCalculator({ disabled, form }) {
<Form.Item name="days" label={t("jobs.labels.ca_bc_pvrt.days")}>
<InputNumber precision={0} min={0} />
</Form.Item>
<div style={{ display: "flex", justifyContent: "flex-end" }}>
<Space>
<Button type="primary" htmlType="submit">
{t("general.actions.calculate")}
</Button>
<Button onClick={() => setVisibility(false)}>Close</Button>
</Space>
</div>
<Button type="primary" htmlType="submit">
{t("general.actions.calculate")}
</Button>
<Button onClick={() => setVisibility(false)}>Close</Button>
</Form>
</div>
);

View File

@@ -11,15 +11,11 @@ import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel
import CourtesyCarReadiness from "../courtesy-car-readiness-select/courtesy-car-readiness-select.component";
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
//import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
export default function CourtesyCarCreateFormComponent({
form,
saveLoading,
newCC,
}) {
export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
const { t } = useTranslation();
const client = useApolloClient();
@@ -34,7 +30,7 @@ export default function CourtesyCarCreateFormComponent({
}
/>
{newCC ? null : <FormFieldsChanged form={form} />}
{/* <FormFieldsChanged form={form} /> */}
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
<Form.Item
label={t("courtesycars.fields.year")}

View File

@@ -1,11 +1,11 @@
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from 'antd';
import Dinero from 'dinero.js';
import React from 'react';
import { useTranslation } from 'react-i18next';
import InstanceRenderManager from '../../utils/instanceRenderMgr';
import AlertComponent from '../alert/alert.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import './job-bills-total.styles.scss';
import { Alert, Card, Col, Row, Space, Statistic, Tooltip, Typography } from "antd";
import Dinero from "dinero.js";
import React from "react";
import { useTranslation } from "react-i18next";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import AlertComponent from "../alert/alert.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
import "./job-bills-total.styles.scss";
export default function JobBillsTotalComponent({
loading,
@@ -13,16 +13,16 @@ export default function JobBillsTotalComponent({
partsOrders,
jobTotals,
showWarning,
warningCallback,
warningCallback
}) {
const { t } = useTranslation();
if (loading) return <LoadingSkeleton />;
if (!!!jobTotals) {
if (showWarning && warningCallback && typeof warningCallback === 'function') {
warningCallback({ key: 'bills', warning: t('jobs.errors.nofinancial') });
if (showWarning && warningCallback && typeof warningCallback === "function") {
warningCallback({ key: "bills", warning: t("jobs.errors.nofinancial") });
}
return <AlertComponent type="error" message={t('jobs.errors.nofinancial')} />;
return <AlertComponent type="error" message={t("jobs.errors.nofinancial")} />;
}
const totals = jobTotals;
@@ -109,64 +109,60 @@ export default function JobBillsTotalComponent({
const discrepWithCms = discrepWithLbrAdj.add(totalReturns);
const calculatedCreditsNotReceived = totalReturns.subtract(billCms); //billCms is tracked as a negative number.
if (showWarning && warningCallback && typeof warningCallback === 'function') {
if (
discrepWithCms.getAmount() !== 0 ||
discrepWithLbrAdj.getAmount() !== 0 ||
discrepancy.getAmount() !== 0
) {
if (showWarning && warningCallback && typeof warningCallback === "function") {
if (discrepWithCms.getAmount() !== 0) {
warningCallback({
key: 'bills',
warning: t('jobs.labels.outstanding_reconciliation_discrep'),
key: "bills",
warning: t("jobs.labels.outstanding_reconciliation_discrep")
});
}
if (calculatedCreditsNotReceived.getAmount() > 0) {
warningCallback({ key: 'cm', warning: t('jobs.labels.outstanding_credit_memos') });
warningCallback({ key: "cm", warning: t("jobs.labels.outstanding_credit_memos") });
}
}
return (
<Row gutter={[16, 16]}>
<Col md={24} lg={18}>
<Card title={t('jobs.labels.jobtotals')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.jobtotals")} style={{ height: "100%" }}>
<Space wrap size="large">
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.partstotal'),
__html: t("jobs.labels.plitooltips.partstotal")
}}
/>
}
>
<Statistic title={t('jobs.labels.rosaletotal')} value={totalPartsSublet.toFormat()} />
<Statistic title={t("jobs.labels.rosaletotal")} value={totalPartsSublet.toFormat()} />
</Tooltip>
<Typography.Title>-</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.billtotal'),
__html: t("jobs.labels.plitooltips.billtotal")
}}
/>
}
>
<Statistic title={t('bills.labels.retailtotal')} value={billTotals.toFormat()} />
<Statistic title={t("bills.labels.retailtotal")} value={billTotals.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep1'),
__html: t("jobs.labels.plitooltips.discrep1")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepancy.getAmount() === 0 ? 'green' : 'red',
color: discrepancy.getAmount() === 0 ? "green" : "red"
}}
value={discrepancy.toFormat()}
/>
@@ -176,27 +172,27 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.laboradj'),
__html: t("jobs.labels.plitooltips.laboradj")
}}
/>
}
>
<Statistic title={t('bills.labels.dedfromlbr')} value={lbrAdjustments.toFormat()} />
<Statistic title={t("bills.labels.dedfromlbr")} value={lbrAdjustments.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep2'),
__html: t("jobs.labels.plitooltips.discrep2")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepWithLbrAdj.getAmount() === 0 ? 'green' : 'red',
color: discrepWithLbrAdj.getAmount() === 0 ? "green" : "red"
}}
value={discrepWithLbrAdj.toFormat()}
/>
@@ -206,27 +202,27 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.creditmemos'),
__html: t("jobs.labels.plitooltips.creditmemos")
}}
/>
}
>
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
</Tooltip>
<Typography.Title>=</Typography.Title>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.discrep3'),
__html: t("jobs.labels.plitooltips.discrep3")
}}
/>
}
>
<Statistic
title={t('bills.labels.discrepancy')}
title={t("bills.labels.discrepancy")}
valueStyle={{
color: discrepWithCms.getAmount() === 0 ? 'green' : 'red',
color: discrepWithCms.getAmount() === 0 ? "green" : "red"
}}
value={discrepWithCms.toFormat()}
/>
@@ -238,40 +234,40 @@ export default function JobBillsTotalComponent({
discrepWithLbrAdj.getAmount() !== 0 ||
discrepancy.getAmount() !== 0) && (
<Alert
style={{ margin: '8px 0px' }}
style={{ margin: "8px 0px" }}
type="warning"
message={t('jobs.labels.outstanding_reconciliation_discrep')}
message={t("jobs.labels.outstanding_reconciliation_discrep")}
/>
)}
</Card>
</Col>
<Col md={24} lg={6}>
<Card title={t('jobs.labels.returntotals')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.returntotals")} style={{ height: "100%" }}>
<Space wrap>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.totalreturns'),
__html: t("jobs.labels.plitooltips.totalreturns")
}}
/>
}
>
<Statistic title={t('bills.labels.totalreturns')} value={totalReturns.toFormat()} />
<Statistic title={t("bills.labels.totalreturns")} value={totalReturns.toFormat()} />
</Tooltip>
<Tooltip
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.calculatedcreditsnotreceived'),
__html: t("jobs.labels.plitooltips.calculatedcreditsnotreceived")
}}
/>
}
>
<Statistic
title={t('bills.labels.calculatedcreditsnotreceived')}
title={t("bills.labels.calculatedcreditsnotreceived")}
valueStyle={{
color: calculatedCreditsNotReceived.getAmount() <= 0 ? 'green' : 'red',
color: calculatedCreditsNotReceived.getAmount() <= 0 ? "green" : "red"
}}
value={
calculatedCreditsNotReceived.getAmount() >= 0
@@ -284,15 +280,15 @@ export default function JobBillsTotalComponent({
title={
<div
dangerouslySetInnerHTML={{
__html: t('jobs.labels.plitooltips.creditsnotreceived'),
__html: t("jobs.labels.plitooltips.creditsnotreceived")
}}
/>
}
>
<Statistic
title={t('bills.labels.creditsnotreceived')}
title={t("bills.labels.creditsnotreceived")}
valueStyle={{
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? 'green' : 'red',
color: totalReturnsMarkedNotReceived.getAmount() <= 0 ? "green" : "red"
}}
value={
totalReturnsMarkedNotReceived.getAmount() >= 0
@@ -303,11 +299,7 @@ export default function JobBillsTotalComponent({
</Tooltip>
</Space>
{showWarning && calculatedCreditsNotReceived.getAmount() > 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_credit_memos')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_credit_memos")} />
)}
</Card>
</Col>

View File

@@ -1,20 +1,20 @@
import React from 'react';
import React from "react";
import { useQuery } from '@apollo/client';
import { useSplitTreatments } from '@splitsoftware/splitio-react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { GET_LINE_TICKET_BY_PK } from '../../graphql/jobs-lines.queries';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import AlertComponent from '../alert/alert.component';
import LaborAllocationsTableComponent from '../labor-allocations-table/labor-allocations-table.component';
import PayrollLaborAllocationsTable from '../labor-allocations-table/labor-allocations-table.payroll.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import { useQuery } from "@apollo/client";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import LaborAllocationsTableComponent from "../labor-allocations-table/labor-allocations-table.component";
import PayrollLaborAllocationsTable from "../labor-allocations-table/labor-allocations-table.payroll.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -24,21 +24,21 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardLabor
export function JobCloseRoGuardLabor({ job, jobRO, bodyshop, form, warningCallback }) {
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
variables: { id: job.id },
fetchPolicy: 'network-only',
nextFetchPolicy: 'network-only',
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
const {
treatments: { Enhanced_Payroll },
treatments: { Enhanced_Payroll }
} = useSplitTreatments({
attributes: {},
names: ['Enhanced_Payroll'],
splitKey: bodyshop.imexshopid,
names: ["Enhanced_Payroll"],
splitKey: bodyshop.imexshopid
});
if (loading) return <LoadingSkeleton />;
if (error) return <AlertComponent message={error.message} type="error" />;
return Enhanced_Payroll.treatment === 'on' ? (
return Enhanced_Payroll.treatment === "on" ? (
<PayrollLaborAllocationsTable
jobId={job.id}
timetickets={data ? data.timetickets : []}

View File

@@ -1,19 +1,19 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
import { Alert, Card } from 'antd';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import { useMemo } from 'react';
import Dinero from 'dinero.js';
import DataLabel from '../data-label/data-label.component';
import { Alert, Card } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useMemo } from "react";
import Dinero from "dinero.js";
import DataLabel from "../data-label/data-label.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -41,25 +41,21 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
useEffect(() => {
if (balance.getAmount() !== 0) {
warningCallback({ key: 'ar', warning: t('jobs.labels.outstanding_ar') });
warningCallback({ key: "ar", warning: t("jobs.labels.outstanding_ar") });
}
}, [balance, t, warningCallback]);
return (
<Card title={t('jobs.labels.accountsreceivable')} style={{ height: '100%' }}>
<DataLabel label={t('payments.labels.totalpayments')}>{total.toFormat()}</DataLabel>
<Card title={t("jobs.labels.accountsreceivable")} style={{ height: "100%" }}>
<DataLabel label={t("payments.labels.totalpayments")}>{total.toFormat()}</DataLabel>
<DataLabel
valueStyle={{ color: balance.getAmount() !== 0 ? 'red' : 'green' }}
label={t('payments.labels.balance')}
valueStyle={{ color: balance.getAmount() !== 0 ? "red" : "green" }}
label={t("payments.labels.balance")}
>
{balance.toFormat()}
</DataLabel>
{balance.getAmount() !== 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_ar')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_ar")} />
)}
</Card>
);

View File

@@ -1,17 +1,17 @@
import React from 'react';
import React from "react";
import { useQuery } from '@apollo/client';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { QUERY_BILLS_BY_JOBID } from '../../graphql/bills.queries';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import AlertComponent from '../alert/alert.component';
import JobBillsTotalComponent from '../job-bills-total/job-bills-total.component';
import { useQuery } from "@apollo/client";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { QUERY_BILLS_BY_JOBID } from "../../graphql/bills.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import JobBillsTotalComponent from "../job-bills-total/job-bills-total.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -21,8 +21,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRoGuardBills
export function JobCloseRoGuardBills({ job, jobRO, bodyshop, form, warningCallback }) {
const { loading, error, data } = useQuery(QUERY_BILLS_BY_JOBID, {
variables: { jobid: job.id },
fetchPolicy: 'network-only',
nextFetchPolicy: 'network-only',
fetchPolicy: "network-only",
nextFetchPolicy: "network-only"
});
if (error) return <AlertComponent message={error.message} type="error" />;

View File

@@ -76,20 +76,21 @@ export function JobCloseRoGuardContainer({ job, jobRO, bodyshop, form }) {
<Col className="ro-guard-col-multiple" md={24} lg={6}>
<Row gutter={[32, 32]} style={{ height: "100%" }}>
<Col span={24}>
<JobCloseRoGuardProfit
job={job}
form={form} //warningCallback={warningCallback}
/>
<JobCloseRoGuardProfit job={job} form={form} warningCallback={warningCallback} />
</Col>
<Col span={24}>
<JobCloseRoGuardAr job={job} form={form} warningCallback={warningCallback} />
</Col>
</Row>
</Col>
<Col className="ro-guard-col-50" md={24} lg={8}>
<JobCloseRoGuardSublet job={job} warningCallback={warningCallback} />
{InstanceRenderManager({ rome: <JobCloseRoGuardPpd job={job} warningCallback={warningCallback} /> })}
</Col>
{InstanceRenderManager({
rome: (
<Col md={24} lg={8}>
{/* <JobCloseRoGuardSublet job={job} warningCallback={warningCallback} /> */}
<JobCloseRoGuardPpd job={job} warningCallback={warningCallback} />
</Col>
)
})}
<Col className="ro-guard-col" md={24} lg={10}>
<JobCloseRoGuardLabor job={job} form={form} warningCallback={warningCallback} />
</Col>

View File

@@ -1,20 +1,19 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState } from "react";
import { LockOutlined } from '@ant-design/icons';
import { Card, Form, Input } from 'antd';
import axios from 'axios';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import JobCostingStatistics from '../job-costing-statistics/job-costing-statistics.component';
import LoadingSkeleton from '../loading-skeleton/loading-skeleton.component';
import { Alert, Card } from "antd";
import axios from "axios";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import JobCostingStatistics from "../job-costing-statistics/job-costing-statistics.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -31,7 +30,7 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
try {
if (job.id) {
setLoading(true);
const { data } = await axios.post('/job/costing', { jobid: job.id });
const { data } = await axios.post("/job/costing", { jobid: job.id });
setCostingData(data);
}
} catch (error) {}
@@ -45,16 +44,19 @@ export function JobCloseRoGuardProfit({ job, jobRO, bodyshop, form, warningCallb
parseFloat(costingData?.summaryData.gppercent) < bodyshop?.md_ro_guard?.totalgppercent_minimum;
useEffect(() => {
if (enforceProfitPassword && typeof warningCallback === 'function') {
warningCallback({ key: 'profit', warning: t('jobs.labels.profitbypassrequired') });
if (enforceProfitPassword && typeof warningCallback === "function") {
warningCallback({ key: "profit", warning: t("jobs.labels.profitbypassrequired") });
}
}, [enforceProfitPassword, t, warningCallback]);
if (loading || !costingData) return <LoadingSkeleton />;
return (
<Card title={t('jobs.labels.profits')} style={{ height: '100%' }}>
<Card title={t("jobs.labels.profits")} style={{ height: "100%" }}>
<JobCostingStatistics summaryData={costingData?.summaryData} onlyGP />
{enforceProfitPassword && (
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.profitbypassrequired")} />
)}
</Card>
);
}

View File

@@ -1,17 +1,17 @@
import React, { useEffect } from 'react';
import React, { useEffect } from "react";
import { Alert, Card, Table } from 'antd';
import { t } from 'i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import CurrencyFormatter from '../../utils/CurrencyFormatter';
import { alphaSort } from '../../utils/sorters';
import { Alert, Card, Table } from "antd";
import { t } from "i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { alphaSort } from "../../utils/sorters";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -20,69 +20,56 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobCloseRGuardSublet
export function JobCloseRGuardSublet({ job, jobRO, bodyshop, form, warningCallback }) {
const subletsNotDone = job?.joblines.filter(
(j) =>
(j.part_type === 'PAS' || j.part_type === 'PASL') &&
(!j.sublet_completed || !j.sublet_ignored)
(j) => (j.part_type === "PAS" || j.part_type === "PASL") && (!j.sublet_completed || !j.sublet_ignored)
);
const columns = [
{
title: t('joblines.fields.line_desc'),
dataIndex: 'line_desc',
fixed: 'left',
key: 'line_desc',
title: t("joblines.fields.line_desc"),
dataIndex: "line_desc",
fixed: "left",
key: "line_desc",
sorter: (a, b) => alphaSort(a.line_desc, b.line_desc),
onCell: (record) => ({
className: record.manual_line && 'job-line-manual',
className: record.manual_line && "job-line-manual",
style: {
...(record.critical ? { boxShadow: ' -.5em 0 0 #FFC107' } : {}),
},
...(record.critical ? { boxShadow: " -.5em 0 0 #FFC107" } : {})
}
}),
ellipsis: true,
ellipsis: true
},
{
title: t('joblines.fields.act_price'),
dataIndex: 'act_price',
key: 'act_price',
title: t("joblines.fields.act_price"),
dataIndex: "act_price",
key: "act_price",
sorter: (a, b) => a.act_price - b.act_price,
ellipsis: true,
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>,
render: (text, record) => <CurrencyFormatter>{record.act_price}</CurrencyFormatter>
},
{
title: t('joblines.fields.part_qty'),
dataIndex: 'part_qty',
key: 'part_qty',
title: t("joblines.fields.part_qty"),
dataIndex: "part_qty",
key: "part_qty"
},
{
title: t('joblines.fields.notes'),
dataIndex: 'notes',
key: 'notes',
},
title: t("joblines.fields.notes"),
dataIndex: "notes",
key: "notes"
}
];
useEffect(() => {
if (subletsNotDone.length > 0) {
warningCallback({ key: 'sublet', warning: t('jobs.labels.outstanding_sublets') });
warningCallback({ key: "sublet", warning: t("jobs.labels.outstanding_sublets") });
}
}, [subletsNotDone.length, warningCallback]);
return (
<Card title={t('jobs.labels.subletsnotcompleted')}>
<Table
dataSource={subletsNotDone}
columns={columns}
pagination={false}
rowKey="id"
bordered
size="small"
/>
<Card title={t("jobs.labels.subletsnotcompleted")}>
<Table dataSource={subletsNotDone} columns={columns} pagination={false} rowKey="id" bordered size="small" />
{subletsNotDone.length > 0 && (
<Alert
style={{ margin: '8px 0px' }}
type="warning"
message={t('jobs.labels.outstanding_sublets')}
/>
<Alert style={{ margin: "8px 0px" }} type="warning" message={t("jobs.labels.outstanding_sublets")} />
)}
</Card>
);

View File

@@ -1,14 +1,14 @@
import React from 'react';
import React from "react";
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectJobReadOnly } from '../../redux/application/application.selectors';
import { selectBodyshop } from '../../redux/user/user.selectors';
import JobLifecycleComponent from '../job-lifecycle/job-lifecycle.component';
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import JobLifecycleComponent from "../job-lifecycle/job-lifecycle.component";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop,
jobRO: selectJobReadOnly,
jobRO: selectJobReadOnly
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))

View File

@@ -97,7 +97,7 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) {
: [
{
key: "no-orders",
children: t("bills.labels.nobilllines")
children: t("parts_orders.labels.notyetordered")
}
]
}

View File

@@ -592,35 +592,32 @@ function ResolveCCCLineIssues(estData, bodyshop) {
//Group by line no
// For everything but the first one, strip out the price number in
InstanceRenderManager({
executeFunction: true,
args: [],
promanager: () => {
const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
Object.keys(groupedByLineRef).forEach((lineRef) => {
let index0ActPrice;
groupedByLineRef[lineRef].forEach((line, index) => {
//Let the first one keep it
if (index === 0) {
index0ActPrice = line.act_price;
return;
}
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
if (line.unq_seq === 0) return;
if (index0ActPrice !== line.act_price) {
line.notes += ` | Price override.`;
return;
}
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
estData.joblines.data[
indexInEstData
].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
estData.joblines.data[indexInEstData].act_price = 0;
estData.joblines.data[indexInEstData].db_price = 0;
});
});
}
});
// InstanceRenderManager({executeFunction:true, args:[], promanager: () => {
// const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
// Object.keys(groupedByLineRef).forEach((lineRef) => {
// let index0ActPrice;
// groupedByLineRef[lineRef].forEach((line, index) => {
// //Let the first one keep it
// if (index === 0){
// index0ActPrice = line.act_price;
// return;}
// //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
// if (line.unq_seq === 0) return;
// if(index0ActPrice !== line.act_price){
// line.notes += ` | Price override.`;
// return;
// }
// const indexInEstData = estData.joblines.data.findIndex(
// (l) => l.unq_seq === line.unq_seq
// );
// estData.joblines.data[
// indexInEstData
// ].notes += ` | Scrubbed due to the line_ref issue. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
// estData.joblines.data[indexInEstData].act_price = 0;
// estData.joblines.data[indexInEstData].db_price = 0;
// });
// })
// }})
InstanceRenderManager({
executeFunction: true,

View File

@@ -8,18 +8,16 @@ import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectCurrentUser } from "../../redux/user/user.selectors";
import { selectPayment } from "../../redux/modals/modals.selectors";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
paymentModal: selectPayment
currentUser: selectCurrentUser
});
const mapDispatchToProps = (dispatch) => ({
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
});
const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentContext, currentUser, paymentModal }) => {
const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentContext, currentUser }) => {
const { t } = useTranslation();
const [insertExportLog, { loading: exportLogLoading }] = useMutation(INSERT_EXPORT_LOG);
const [updatePayment, { loading: updatePaymentLoading }] = useMutation(UPDATE_PAYMENT);
@@ -58,19 +56,16 @@ const PaymentMarkForExportButton = ({ bodyshop, payment, refetch, setPaymentCont
refetch
},
context: {
...paymentModal.context,
...payment,
exportedat: today
}
});
if (refetch) {
if (paymentModal.context.refetchRequiresContext) {
refetch(paymentUpdateResponse && paymentUpdateResponse.data.update_payments.returning[0]);
} else {
refetch();
}
}
if (refetch)
refetch(
paymentUpdateResponse &&
paymentUpdateResponse.data.update_payments.returning[0]
);
} else {
notification["error"]({
message: t("payments.errors.exporting", {

View File

@@ -1,4 +1,5 @@
import { useMutation } from "@apollo/client";
import { Button, Form, Modal, notification, Space } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -90,13 +91,7 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
}
}
if (actions.refetch) {
if (context.refetchRequiresContext) {
actions.refetch(updatedPayment && updatedPayment.data.update_payments.returning[0]);
} else {
actions.refetch();
}
}
if (actions.refetch) actions.refetch(updatedPayment && updatedPayment.data.update_payments.returning[0]);
if (enterAgain) {
const prev = form.getFieldsValue(["date"]);
@@ -171,7 +166,13 @@ function PaymentModalContainer({ paymentModal, toggleModalVisible, bodyshop, cur
</Space>
)}
<Form onFinish={handleFinish} autoComplete={"off"} form={form} layout="vertical" disabled={context?.exportedat}>
<Form
onFinish={handleFinish}
autoComplete={"off"}
form={form}
layout="vertical"
disabled={context?.exportedat}
>
<PaymentForm form={form} />
</Form>
</Modal>

View File

@@ -5,18 +5,12 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectPayment } from "../../redux/modals/modals.selectors";
import { createStructuredSelector } from "reselect";
const mapStateToProps = createStructuredSelector({
paymentModal: selectPayment
});
const mapDispatchToProps = (dispatch) => ({
setPaymentContext: (context) => dispatch(setModalContext({ context: context, modal: "payment" }))
});
const PaymentReexportButton = ({ paymentModal, payment, refetch, setPaymentContext }) => {
const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
const { t } = useTranslation();
const [updatePayment, { loading }] = useMutation(UPDATE_PAYMENT);
@@ -40,19 +34,15 @@ const PaymentReexportButton = ({ paymentModal, payment, refetch, setPaymentConte
refetch
},
context: {
...paymentModal.context,
...payment,
exportedat: null
}
});
if (refetch) {
if (paymentModal.context.refetchRequiresContext) {
refetch(paymentUpdateResponse && paymentUpdateResponse.data.update_payments.returning[0]);
} else {
refetch();
}
}
if (refetch)
refetch(
paymentUpdateResponse &&
paymentUpdateResponse.data.update_payments.returning[0]
);
} else {
notification["error"]({
message: t("payments.errors.exporting", {
@@ -69,4 +59,4 @@ const PaymentReexportButton = ({ paymentModal, payment, refetch, setPaymentConte
);
};
export default connect(mapStateToProps, mapDispatchToProps)(PaymentReexportButton);
export default connect(null, mapDispatchToProps)(PaymentReexportButton);

View File

@@ -171,7 +171,7 @@ export function PaymentsListPaginated({
}
: refetch
},
context: { ...(apolloResults ? apolloResults : record), refetchRequiresContext: true }
context: apolloResults ? apolloResults : record
});
}}
>

View File

@@ -41,7 +41,7 @@ export const QUERY_AVAILABLE_CC = gql`
`;
export const CHECK_CC_FLEET_NUMBER = gql`
query CHECK_CC_FLEET_NUMBER($name: String!) {
query CHECK_VENDOR_NAME($name: String!) {
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
aggregate {
count

View File

@@ -216,7 +216,7 @@ export function BillsListPage({ loading, data, refetch, total, setPartsOrderCont
extra={
<Space wrap>
{search.search && (
<Space align="center">
<>
<Typography.Title level={4}>
{t("general.labels.searchresults", { search: search.search })}
</Typography.Title>
@@ -229,7 +229,7 @@ export function BillsListPage({ loading, data, refetch, total, setPartsOrderCont
>
{t("general.actions.clear")}
</Button>
</Space>
</>
)}
<Button onClick={() => refetch()}>
<SyncOutlined />

View File

@@ -72,11 +72,7 @@ export function CourtesyCarCreateContainer({ bodyshop, setBreadcrumbs, setSelect
<RbacWrapper action="courtesycar:create">
<FeatureWrapperComponent featureName="courtesycars">
<Form form={form} autoComplete="new-password" onFinish={handleFinish} layout="vertical">
<CourtesyCarFormComponent
form={form}
saveLoading={loading}
newCC={true}
/>
<CourtesyCarFormComponent form={form} saveLoading={loading} />
</Form>
</FeatureWrapperComponent>
</RbacWrapper>

View File

@@ -41,7 +41,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import JobCloseRoGuardContainer from '../../components/job-close-ro-guard/job-close-ro-guard.container';
import JobCloseRoGuardContainer from "../../components/job-close-ro-guard/job-close-ro-guard.container";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -120,6 +120,13 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
operation: AuditTrailMapping.jobinvoiced(),
type: "jobinvoiced"
});
if (values.masterbypass) {
insertAuditTrail({
jobid: job.id,
operation: AuditTrailMapping.jobclosedwithbypass(),
type: "jobclosedwithbypass"
});
}
// history(`/manage/jobs/${job.id}`);
} else {
setLoading(false);
@@ -184,7 +191,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail }) {
</Space>
}
/>
<JobCloseRoGuardContainer form={form} job={job} />
<JobCloseRoGuardContainer form={form} job={job} />
<Space wrap direction="vertical" style={{ width: "100%" }}>
<FormsFieldChanged form={form} />
{!job.actual_in && job.scheduled_in && <Alert type="warning" message={t("jobs.labels.actual_in_inferred")} />}

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
"jobclosedwithbypass": "Job was invoiced using the master bypass password. ",
"jobconverted": "Job converted and assigned number {{ro_number}}.",
"jobdelivery": "Job intake completed. Status set to {{status}}. Actual completion is {{actual_completion}}.",
"jobexported": "",
@@ -223,9 +224,8 @@
"markexported": "Mark Exported",
"markforreexport": "Mark for Re-export",
"new": "New Bill",
"nobilllines": "This part has not yet been recieved.",
"noneselected": "No bill selected.",
"onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
"onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
"printlabels": "Print Labels",
"retailtotal": "Bills Retail Total",
"savewithdiscrepancy": "You are about to save this bill with a discrepancy. The system will continue to use the calculated amount using the bill lines. Press cancel to return to the bill.",
@@ -1975,7 +1975,7 @@
"outstanding_ar": "A balance is outstanding on this RO. Payments can still be entered when the job is closed. ",
"outstanding_credit_memos": "Outstanding credit memos have not been entered against this job. Credit Memos may still be posted once the job is closed.",
"outstanding_ppd": "There are outstanding PPDs that may not have been synced back to the estimate.",
"outstanding_reconciliation_discrep": "At least one discrepancy is not 0. This may indicate that this job is not properly reconciled and should not be closed.",
"outstanding_reconciliation_discrep": "At least one discrepancy is not $0. This may indicate that this job is not properly reconciled and should not be closed.",
"outstanding_sublets": "There are sublet lines on the job which have not been marked as completed. ",
"outstandinghours": "There are outstanding hours on the job that have not been paid or have been overpaid.",
"override_header": "Override estimate header on import?",
@@ -2004,6 +2004,7 @@
"ppc": "This line contains a part price change.",
"ppdnotexported": "PPDs not Exported",
"profileadjustments": "Profile Disc./Mkup",
"profitbypassrequired": "Minimum gross profit requirements have not been met.",
"profits": "Job Profits",
"prt_dsmk_total": "Line Item Adjustment",
"rates": "Rates",
@@ -2025,12 +2026,12 @@
"remove_from_ar": "Remove from AR",
"returntotals": "Return Totals",
"ro_guard": {
"eforce_profit": "Profit margins enforced.",
"enforce_ar": "AR collection enforced.",
"enforce_bills": "Bill discrepancy enforced.",
"enforce_cm": "Credit memo entry enforced.",
"enforce_labor": "Labor allocations enforced.",
"enforce_ppd": "PPD sync enforced.",
"enforce_profit": "Profit margins enforced.",
"enforce_sublet": "Sublet completion enforced.",
"enforce_validation": "Master Bypass Required: {{message}}",
"enforced": "This check has been enforced by your shop manager. Enter the master bypass password to close the Job."

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
"jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -2003,6 +2004,7 @@
"ppc": "",
"ppdnotexported": "",
"profileadjustments": "",
"profitbypassrequired": "",
"profits": "",
"prt_dsmk_total": "",
"rates": "Tarifas",
@@ -2024,12 +2026,12 @@
"remove_from_ar": "",
"returntotals": "",
"ro_guard": {
"eforce_profit": "",
"enforce_ar": "",
"enforce_bills": "",
"enforce_cm": "",
"enforce_labor": "",
"enforce_ppd": "",
"enforce_profit": "",
"enforce_sublet": "",
"enforce_validation": "",
"enforced": ""

View File

@@ -116,6 +116,7 @@
"jobassignmentchange": "",
"jobassignmentremoved": "",
"jobchecklist": "",
"jobclosedwithbypass": "",
"jobconverted": "",
"jobdelivery": "",
"jobexported": "",
@@ -2003,6 +2004,7 @@
"ppc": "",
"ppdnotexported": "",
"profileadjustments": "",
"profitbypassrequired": "",
"profits": "",
"prt_dsmk_total": "",
"rates": "Les taux",
@@ -2024,12 +2026,12 @@
"remove_from_ar": "",
"returntotals": "",
"ro_guard": {
"eforce_profit": "",
"enforce_ar": "",
"enforce_bills": "",
"enforce_cm": "",
"enforce_labor": "",
"enforce_ppd": "",
"enforce_profit": "",
"enforce_sublet": "",
"enforce_validation": "",
"enforced": ""

View File

@@ -24,6 +24,7 @@ const AuditTrailMapping = {
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"),
jobmodifylbradj: ({ mod_lbr_ty, hours }) => i18n.t("audit_trail.messages.jobmodifylbradj", { mod_lbr_ty, hours }),
jobnoteadded: () => i18n.t("audit_trail.messages.jobnoteadded"),
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),

View File

@@ -969,7 +969,6 @@
- md_rbac
- md_referral_sources
- md_responsibility_centers
- md_ro_guard
- md_ro_statuses
- md_tasks_presets
- md_to_emails
@@ -1069,7 +1068,6 @@
- md_rbac
- md_referral_sources
- md_responsibility_centers
- md_ro_guard
- md_ro_statuses
- md_tasks_presets
- md_to_emails

View File

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

View File

@@ -1,2 +0,0 @@
alter table "public"."bodyshops" add column "md_ro_guard" jsonb
null default jsonb_build_object();

16
package-lock.json generated
View File

@@ -56,6 +56,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
"prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
},
"engines": {
@@ -5900,6 +5901,21 @@
"node": ">= 0.8.0"
}
},
"node_modules/prettier": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",

View File

@@ -66,6 +66,7 @@
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"concurrently": "^8.2.2",
"prettier": "^3.2.5",
"source-map-explorer": "^2.5.2"
}
}

View File

@@ -770,7 +770,7 @@ const getAdditionalCostCenter = (jl, profitCenters) => {
return profitCenters["TOW"];
} else if (jl.act_price > 0) {
//TODO:AIO Ensure that this is tested.
return profitCenters["PAO"];
ret.profitcenter_part = defaults.profits["PAO"];
} else {
return null;
}