Compare commits
125 Commits
feature/IO
...
master-AIO
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4043bd3d33 | ||
|
|
c1c0b35c8f | ||
|
|
4fd2f034a3 | ||
|
|
aa3b303fe9 | ||
|
|
bd25245290 | ||
|
|
468ed23f73 | ||
|
|
6472b053ed | ||
|
|
322ebd3bc7 | ||
|
|
169070594c | ||
|
|
0f800c5a4c | ||
|
|
0974e69a50 | ||
|
|
345a470731 | ||
|
|
ebde2f1581 | ||
|
|
a45808eb94 | ||
|
|
a2389b1f26 | ||
|
|
ab606a4266 | ||
|
|
da317704c4 | ||
|
|
771573409f | ||
|
|
cb9ccb7e77 | ||
|
|
a5d00d562c | ||
|
|
bdeeea0406 | ||
|
|
297d8afa8a | ||
|
|
3a12597c45 | ||
|
|
72c96f14eb | ||
|
|
de9d47272c | ||
|
|
3fd51f0140 | ||
|
|
84ec68f142 | ||
|
|
22af37e8f1 | ||
|
|
86affddc24 | ||
|
|
57fdffff09 | ||
|
|
e74be56681 | ||
|
|
f5d33a2386 | ||
|
|
edc9ba33c5 | ||
|
|
4586f32f38 | ||
|
|
281e50a43e | ||
|
|
7a50f2a2fe | ||
|
|
0c83f796db | ||
|
|
237c575bab | ||
|
|
a54e74a27d | ||
|
|
87797c7743 | ||
|
|
d227cacd68 | ||
|
|
ef4565d738 | ||
|
|
74eeceacca | ||
|
|
6e566e2f8a | ||
|
|
80697a5259 | ||
|
|
fe8d1f7e95 | ||
|
|
32f3143dca | ||
|
|
0ba207a499 | ||
|
|
f849ea9d0a | ||
|
|
e0b113e5d0 | ||
|
|
fc199279d1 | ||
|
|
fcba77fe20 | ||
|
|
f294eafde7 | ||
|
|
e0f55b8e7a | ||
|
|
ef6aee0518 | ||
|
|
d5e643b429 | ||
|
|
88ae1fb1cc | ||
|
|
c6af2b34b2 | ||
|
|
d51dcc0ef2 | ||
|
|
e6178a613d | ||
|
|
2a69115903 | ||
|
|
c8262da440 | ||
|
|
1f41a532e2 | ||
|
|
32e67b14b6 | ||
|
|
d901004751 | ||
|
|
661e019a4d | ||
|
|
82021c1edc | ||
|
|
a6156a70c1 | ||
|
|
0014a5335d | ||
|
|
cd054fcf33 | ||
|
|
5ab54433ff | ||
|
|
62c053ed87 | ||
|
|
6242e0f309 | ||
|
|
614420d7d2 | ||
|
|
3113818a91 | ||
|
|
92a3e57205 | ||
|
|
de6038038a | ||
|
|
8a043767cd | ||
|
|
1f8836d9d8 | ||
|
|
6ca0ebff5f | ||
|
|
a96a1139fa | ||
|
|
483da283dc | ||
|
|
a267d65425 | ||
|
|
9267e584ff | ||
|
|
cacda3805a | ||
|
|
69861af88c | ||
|
|
d7294ebba6 | ||
|
|
d9270102b1 | ||
|
|
af757ee71e | ||
|
|
d416780e63 | ||
|
|
b6cbfb8e45 | ||
|
|
9c97b30e8e | ||
|
|
cc48448a07 | ||
|
|
eb666f2ca1 | ||
|
|
d991e32501 | ||
|
|
2b8990950b | ||
|
|
3f2e05befc | ||
|
|
06bfdeb449 | ||
|
|
66df286ddb | ||
|
|
1b2f9fc027 | ||
|
|
1287c7ec36 | ||
|
|
fb29fa2caa | ||
|
|
6bda497d8c | ||
|
|
a018b6dc5a | ||
|
|
8a4679f86c | ||
|
|
4d558da46a | ||
|
|
90789e743f | ||
|
|
a4dbc5250e | ||
|
|
704543d823 | ||
|
|
fe848b5de4 | ||
|
|
969dd8be8d | ||
|
|
794f64dfba | ||
|
|
220b1c7968 | ||
|
|
7dab60e3bc | ||
|
|
d4c7298334 | ||
|
|
e17b57c705 | ||
|
|
4abc1a7d0f | ||
|
|
255d761210 | ||
|
|
2a5e5d2462 | ||
|
|
6ef56f97c0 | ||
|
|
97d8047a3d | ||
|
|
16220d0a27 | ||
|
|
51fba24a3d | ||
|
|
52f43a600c | ||
|
|
e25174ff97 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -149,3 +149,8 @@ docker_data
|
||||
/COPILOT.md
|
||||
/.github/copilot-instructions.md
|
||||
/GEMINI.md
|
||||
/_reference/select-component-test-plan.md
|
||||
|
||||
.terraform
|
||||
|
||||
terraform.tfvars
|
||||
File diff suppressed because it is too large
Load Diff
11
client/package-lock.json
generated
11
client/package-lock.json
generated
@@ -16,6 +16,7 @@
|
||||
"@dnd-kit/modifiers": "^9.0.0",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@documenso/embed-react": "^0.5.1",
|
||||
"@emotion/is-prop-valid": "^1.4.0",
|
||||
"@fingerprintjs/fingerprintjs": "^5.1.0",
|
||||
"@firebase/analytics": "^0.10.21",
|
||||
@@ -2593,6 +2594,16 @@
|
||||
"react": ">=16.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@documenso/embed-react": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@documenso/embed-react/-/embed-react-0.5.1.tgz",
|
||||
"integrity": "sha512-PlkZ3vrdZVBTc0J3xfG2wtPVGmxCxWgpQ/SsdR2oBMdTwsR+rDbj9k+CeTv+M9Xi5tKbLr5Y78bS9Sb8K+ltTQ==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@dotenvx/dotenvx": {
|
||||
"version": "1.59.1",
|
||||
"resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.59.1.tgz",
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"@dnd-kit/modifiers": "^9.0.0",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@documenso/embed-react": "^0.5.1",
|
||||
"@emotion/is-prop-valid": "^1.4.0",
|
||||
"@fingerprintjs/fingerprintjs": "^5.1.0",
|
||||
"@firebase/analytics": "^0.10.21",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useSplitClient } from "@splitsoftware/splitio-react";
|
||||
import { Button, Result } from "antd";
|
||||
import LogRocket from "logrocket";
|
||||
//import LogRocket from "logrocket";
|
||||
import { lazy, Suspense, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -101,13 +101,13 @@ export function App({
|
||||
client.setAttribute("imexshopid", bodyshop.imexshopid);
|
||||
|
||||
if (client.getTreatment("LogRocket_Tracking") === "on") {
|
||||
console.log("LR Start");
|
||||
LogRocket.init(
|
||||
InstanceRenderMgr({
|
||||
imex: "gvfvfw/bodyshopapp",
|
||||
rome: "rome-online/rome-online"
|
||||
})
|
||||
);
|
||||
// console.log("LR Start");
|
||||
// LogRocket.init(
|
||||
// InstanceRenderMgr({
|
||||
// imex: "gvfvfw/bodyshopapp",
|
||||
// rome: "rome-online/rome-online"
|
||||
// })
|
||||
// );
|
||||
}
|
||||
}
|
||||
}, [bodyshop, client, currentUser.authorized]);
|
||||
|
||||
@@ -509,3 +509,10 @@
|
||||
pointer-events: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.esignature-embed {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-width: 0;
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import dayjs from "../../utils/day";
|
||||
import { buildBillUpdateAuditDetails } from "../../utils/auditTrailDetails";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import BillFormContainer from "../bill-form/bill-form.container";
|
||||
import BillMarkExportedButton from "../bill-mark-exported-button/bill-mark-exported-button.component";
|
||||
@@ -134,10 +135,16 @@ export function BillDetailEditcontainer({ insertAuditTrail, bodyshop }) {
|
||||
|
||||
await Promise.all(updates);
|
||||
|
||||
const details = buildBillUpdateAuditDetails({
|
||||
originalBill: data?.bills_by_pk,
|
||||
bill,
|
||||
billlines
|
||||
});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: bill.jobid,
|
||||
jobid: bill.jobid ?? data?.bills_by_pk?.jobid,
|
||||
billid: search.billid,
|
||||
operation: AuditTrailMapping.billupdated(bill.invoice_number),
|
||||
operation: AuditTrailMapping.billupdated(bill.invoice_number, details),
|
||||
type: "billupdated"
|
||||
});
|
||||
|
||||
|
||||
@@ -435,9 +435,9 @@ export function BillEnterModalLinesComponent({
|
||||
rules: [{ required: true }]
|
||||
}),
|
||||
formInput: () => (
|
||||
<Select
|
||||
showSearch
|
||||
style={{ minWidth: "3rem" }}
|
||||
<Select
|
||||
showSearch
|
||||
style={{ minWidth: "3rem" }}
|
||||
disabled={disabled}
|
||||
tabIndex={0}
|
||||
options={
|
||||
@@ -461,7 +461,7 @@ export function BillEnterModalLinesComponent({
|
||||
name: [field.name, "location"]
|
||||
}),
|
||||
formInput: () => (
|
||||
<Select
|
||||
<Select
|
||||
disabled={disabled}
|
||||
tabIndex={0}
|
||||
options={bodyshop.md_parts_locations.map((loc) => ({ value: loc, label: loc }))}
|
||||
@@ -495,7 +495,9 @@ export function BillEnterModalLinesComponent({
|
||||
{Enhanced_Payroll.treatment === "on" ? (
|
||||
<Space>
|
||||
{t("joblines.fields.assigned_team", { name: employeeTeamName?.name })}
|
||||
{`${jobline.mod_lb_hrs} units/${t(`joblines.fields.lbr_types.${jobline.mod_lbr_ty}`)}`}
|
||||
{jobline
|
||||
? `${jobline.mod_lb_hrs} units/${t(`joblines.fields.lbr_types.${jobline.mod_lbr_ty}`)}`
|
||||
: null}
|
||||
</Space>
|
||||
) : null}
|
||||
|
||||
@@ -506,10 +508,7 @@ export function BillEnterModalLinesComponent({
|
||||
rules={[{ required: true }]}
|
||||
name={[record.name, "lbr_adjustment", "mod_lbr_ty"]}
|
||||
>
|
||||
<Select
|
||||
allowClear
|
||||
options={CiecaSelect(false, true)}
|
||||
/>
|
||||
<Select allowClear options={CiecaSelect(false, true)} />
|
||||
</Form.Item>
|
||||
|
||||
{Enhanced_Payroll.treatment === "on" ? (
|
||||
|
||||
@@ -64,7 +64,7 @@ function normalizeJobAllocations(ack) {
|
||||
* RR-specific DMS Allocations Summary
|
||||
* Focused on what we actually send to RR:
|
||||
* - ROGOG (split by taxable / non-taxable segments)
|
||||
* - ROLABOR shell
|
||||
* - ROLABOR labor rows with bill hours / rates
|
||||
*
|
||||
* The heavy lifting (ROGOG/ROLABOR split, cost allocation, tax flags)
|
||||
* is now done on the backend via buildRogogFromAllocations/buildRolaborFromRogog.
|
||||
@@ -181,21 +181,30 @@ export function RrAllocationsSummary({ socket, bodyshop, jobId, title, onAllocat
|
||||
const rolaborRows = useMemo(() => {
|
||||
if (!rolaborPreview || !Array.isArray(rolaborPreview.ops)) return [];
|
||||
|
||||
return rolaborPreview.ops.map((op, idx) => {
|
||||
const rowOpCode = opCode || op.opCode;
|
||||
return rolaborPreview.ops
|
||||
.filter((op) =>
|
||||
[op.bill?.jobTotalHrs, op.bill?.billTime, op.bill?.billRate, op.amount?.custPrice, op.amount?.totalAmt]
|
||||
.map((value) => Number.parseFloat(value ?? "0"))
|
||||
.some((value) => !Number.isNaN(value) && value !== 0)
|
||||
)
|
||||
.map((op, idx) => {
|
||||
const rowOpCode = opCode || op.opCode;
|
||||
|
||||
return {
|
||||
key: `${op.jobNo}-${idx}`,
|
||||
opCode: rowOpCode,
|
||||
jobNo: op.jobNo,
|
||||
custPayTypeFlag: op.custPayTypeFlag,
|
||||
custTxblNtxblFlag: op.custTxblNtxblFlag,
|
||||
payType: op.bill?.payType,
|
||||
amtType: op.amount?.amtType,
|
||||
custPrice: op.amount?.custPrice,
|
||||
totalAmt: op.amount?.totalAmt
|
||||
};
|
||||
});
|
||||
return {
|
||||
key: `${op.jobNo}-${idx}`,
|
||||
opCode: rowOpCode,
|
||||
jobNo: op.jobNo,
|
||||
custPayTypeFlag: op.custPayTypeFlag,
|
||||
custTxblNtxblFlag: op.custTxblNtxblFlag,
|
||||
payType: op.bill?.payType,
|
||||
jobTotalHrs: op.bill?.jobTotalHrs,
|
||||
billTime: op.bill?.billTime,
|
||||
billRate: op.bill?.billRate,
|
||||
amtType: op.amount?.amtType,
|
||||
custPrice: op.amount?.custPrice,
|
||||
totalAmt: op.amount?.totalAmt
|
||||
};
|
||||
});
|
||||
}, [rolaborPreview, opCode]);
|
||||
|
||||
// Totals for ROGOG (sum custPrice + dlrCost over all lines)
|
||||
@@ -245,6 +254,9 @@ export function RrAllocationsSummary({ socket, bodyshop, jobId, title, onAllocat
|
||||
{ title: "CustPayType", dataIndex: "custPayTypeFlag", key: "custPayTypeFlag" },
|
||||
{ title: "CustTxblFlag", dataIndex: "custTxblNtxblFlag", key: "custTxblNtxblFlag" },
|
||||
{ title: "PayType", dataIndex: "payType", key: "payType" },
|
||||
{ title: "JobTotalHrs", dataIndex: "jobTotalHrs", key: "jobTotalHrs" },
|
||||
{ title: "BillTime", dataIndex: "billTime", key: "billTime" },
|
||||
{ title: "BillRate", dataIndex: "billRate", key: "billRate" },
|
||||
{ title: "AmtType", dataIndex: "amtType", key: "amtType" },
|
||||
{ title: "CustPrice", dataIndex: "custPrice", key: "custPrice" },
|
||||
{ title: "TotalAmt", dataIndex: "totalAmt", key: "totalAmt" }
|
||||
@@ -317,12 +329,13 @@ export function RrAllocationsSummary({ socket, bodyshop, jobId, title, onAllocat
|
||||
children: (
|
||||
<>
|
||||
<Typography.Paragraph type="secondary" style={{ marginBottom: 8 }}>
|
||||
This mirrors the shell that would be sent for ROLABOR when all financials are carried in GOG.
|
||||
This mirrors the labor rows RR will receive, including weighted bill hours and rates derived from the
|
||||
job's labor lines.
|
||||
</Typography.Paragraph>
|
||||
<ResponsiveTable
|
||||
pagination={false}
|
||||
columns={rolaborColumns}
|
||||
mobileColumnKeys={["jobNo", "opCode", "breakOut", "itemType"]}
|
||||
mobileColumnKeys={["jobNo", "opCode", "billRate", "custPrice"]}
|
||||
rowKey="key"
|
||||
dataSource={rolaborRows}
|
||||
locale={{ emptyText: "No ROLABOR lines would be generated." }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Col } from "antd";
|
||||
import { Button, Checkbox, Col } from "antd";
|
||||
import ResponsiveTable from "../responsive-table/responsive-table.component";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -49,7 +49,13 @@ export default function PBSCustomerSelector({ bodyshop, socket }) {
|
||||
if (!open) return null;
|
||||
|
||||
const columns = [
|
||||
{ title: t("jobs.fields.dms.id"), dataIndex: "ContactId", key: "ContactId" },
|
||||
{ title: t("jobs.fields.dms.id"), dataIndex: "Code", key: "ContactId" },
|
||||
{
|
||||
title: t("jobs.fields.dms.IsARCustomer"),
|
||||
dataIndex: "IsARCustomer",
|
||||
key: "IsARCustomer",
|
||||
render: (text, record) => <Checkbox checked={record.IsARCustomer} disabled />
|
||||
},
|
||||
{
|
||||
title: t("jobs.fields.dms.name1"),
|
||||
key: "name1",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { Result } from "antd";
|
||||
import { Result, theme } from "antd";
|
||||
import * as markerjs2 from "markerjs2";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -9,6 +9,12 @@ import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selecto
|
||||
import { handleUpload } from "../documents-local-upload/documents-local-upload.utility";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import {
|
||||
addGreyscaleButtonToMarkerArea,
|
||||
addImageHistoryUndoToMarkerArea,
|
||||
applyGreyscaleToMarkerAreaImage,
|
||||
setMarkerAreaImageSource
|
||||
} from "./document-editor.utility";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -24,7 +30,9 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
const [imageLoaded, setImageLoaded] = useState(false);
|
||||
const [imageLoading, setImageLoading] = useState(true);
|
||||
const markerArea = useRef(null);
|
||||
const imageHistory = useRef([]);
|
||||
const { t } = useTranslation();
|
||||
const { token } = theme.useToken();
|
||||
const notification = useNotification();
|
||||
const [uploading, setUploading] = useState(false);
|
||||
|
||||
@@ -32,6 +40,7 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
async (dataUrl) => {
|
||||
if (uploading) return;
|
||||
setUploading(true);
|
||||
setLoading(true);
|
||||
const blob = await b64toBlob(dataUrl);
|
||||
const nameWithoutExt = filename.split(".").slice(0, -1).join(".").trim();
|
||||
const parts = nameWithoutExt.split("-");
|
||||
@@ -70,6 +79,23 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
[filename, jobid, notification, uploading]
|
||||
);
|
||||
|
||||
const handleGreyscale = useCallback(() => {
|
||||
if (!imgRef.current || loading || uploaded || imageLoading || !imageLoaded) return;
|
||||
|
||||
imageHistory.current.push(imgRef.current.src);
|
||||
applyGreyscaleToMarkerAreaImage(markerArea.current, imgRef.current);
|
||||
}, [imageLoaded, imageLoading, loading, uploaded]);
|
||||
|
||||
const undoImageEdit = useCallback(() => {
|
||||
if (!imgRef.current) return;
|
||||
|
||||
const previousSrc = imageHistory.current.pop();
|
||||
|
||||
if (previousSrc) {
|
||||
setMarkerAreaImageSource(markerArea.current, imgRef.current, previousSrc);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (imgRef.current !== null && imageLoaded && !markerArea.current) {
|
||||
// create a marker.js MarkerArea
|
||||
@@ -93,8 +119,10 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
markerArea.current.renderImageQuality = 1;
|
||||
//markerArea.current.settings.displayMode = "inline";
|
||||
markerArea.current.show();
|
||||
addGreyscaleButtonToMarkerArea(markerArea.current, handleGreyscale, t("documents.labels.greyscale"));
|
||||
addImageHistoryUndoToMarkerArea(markerArea.current, () => imageHistory.current.length > 0, undoImageEdit);
|
||||
}
|
||||
}, [triggerUpload, imageLoaded]);
|
||||
}, [handleGreyscale, imageLoaded, t, triggerUpload, undoImageEdit]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!imageUrl) return;
|
||||
@@ -106,6 +134,7 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
try {
|
||||
const response = await axios.get(imageUrl, { responseType: "blob", signal: controller.signal });
|
||||
const blobUrl = URL.createObjectURL(response.data);
|
||||
imageHistory.current = [];
|
||||
setLoadedImageUrl((prevUrl) => {
|
||||
if (prevUrl) URL.revokeObjectURL(prevUrl);
|
||||
return blobUrl;
|
||||
@@ -142,7 +171,7 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div style={{ background: token.colorBgBase, color: token.colorText, minHeight: "100vh" }}>
|
||||
{!loading && !uploaded && loadedImageUrl && (
|
||||
<img
|
||||
ref={imgRef}
|
||||
@@ -158,7 +187,12 @@ export function DocumentEditorLocalComponent({ imageUrl, filename, jobid }) {
|
||||
{(loading || imageLoading || !imageLoaded) && !uploaded && (
|
||||
<LoadingSpinner message={t("documents.labels.uploading")} />
|
||||
)}
|
||||
{uploaded && <Result status="success" title={t("documents.successes.edituploaded")} />}
|
||||
{uploaded && (
|
||||
<Result
|
||||
status="success"
|
||||
title={<span style={{ color: token.colorText }}>{t("documents.successes.edituploaded")}</span>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
//import "tui-image-editor/dist/tui-image-editor.css";
|
||||
import axios from "axios";
|
||||
import { Result } from "antd";
|
||||
import { Result, theme } from "antd";
|
||||
import * as markerjs2 from "markerjs2";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { handleUpload } from "../documents-upload-imgproxy/documents-upload-imgproxy.utility.js";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import {
|
||||
addGreyscaleButtonToMarkerArea,
|
||||
addImageHistoryUndoToMarkerArea,
|
||||
applyGreyscaleToMarkerAreaImage,
|
||||
setMarkerAreaImageSource
|
||||
} from "./document-editor.utility";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -27,7 +33,9 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
const [imageLoaded, setImageLoaded] = useState(false);
|
||||
const [imageLoading, setImageLoading] = useState(true);
|
||||
const markerArea = useRef(null);
|
||||
const imageHistory = useRef([]);
|
||||
const { t } = useTranslation();
|
||||
const { token } = theme.useToken();
|
||||
const notification = useNotification();
|
||||
|
||||
const triggerUpload = useCallback(
|
||||
@@ -57,6 +65,23 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
[bodyshop, currentUser, document, notification]
|
||||
);
|
||||
|
||||
const handleGreyscale = useCallback(() => {
|
||||
if (!imgRef.current || loading || uploaded || imageLoading || !imageLoaded) return;
|
||||
|
||||
imageHistory.current.push(imgRef.current.src);
|
||||
applyGreyscaleToMarkerAreaImage(markerArea.current, imgRef.current);
|
||||
}, [imageLoaded, imageLoading, loading, uploaded]);
|
||||
|
||||
const undoImageEdit = useCallback(() => {
|
||||
if (!imgRef.current) return;
|
||||
|
||||
const previousSrc = imageHistory.current.pop();
|
||||
|
||||
if (previousSrc) {
|
||||
setMarkerAreaImageSource(markerArea.current, imgRef.current, previousSrc);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (imgRef.current !== null && imageLoaded && !markerArea.current) {
|
||||
// create a marker.js MarkerArea
|
||||
@@ -80,8 +105,10 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
markerArea.current.renderImageQuality = 1;
|
||||
//markerArea.current.settings.displayMode = "inline";
|
||||
markerArea.current.show();
|
||||
addGreyscaleButtonToMarkerArea(markerArea.current, handleGreyscale, t("documents.labels.greyscale"));
|
||||
addImageHistoryUndoToMarkerArea(markerArea.current, () => imageHistory.current.length > 0, undoImageEdit);
|
||||
}
|
||||
}, [triggerUpload, imageLoaded]);
|
||||
}, [handleGreyscale, imageLoaded, t, triggerUpload, undoImageEdit]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!document?.id) return;
|
||||
@@ -100,6 +127,7 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
}
|
||||
);
|
||||
const blobUrl = URL.createObjectURL(response.data);
|
||||
imageHistory.current = [];
|
||||
setImageUrl((prevUrl) => {
|
||||
if (prevUrl) URL.revokeObjectURL(prevUrl);
|
||||
return blobUrl;
|
||||
@@ -134,7 +162,7 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div style={{ background: token.colorBgBase, color: token.colorText, minHeight: "100vh" }}>
|
||||
{!loading && !uploaded && imageUrl && (
|
||||
<img
|
||||
ref={imgRef}
|
||||
@@ -150,7 +178,12 @@ export function DocumentEditorComponent({ currentUser, bodyshop, document }) {
|
||||
{(loading || imageLoading || !imageLoaded) && !uploaded && (
|
||||
<LoadingSpinner message={t("documents.labels.uploading")} />
|
||||
)}
|
||||
{uploaded && <Result status="success" title={t("documents.successes.edituploaded")} />}
|
||||
{uploaded && (
|
||||
<Result
|
||||
status="success"
|
||||
title={<span style={{ color: token.colorText }}>{t("documents.successes.edituploaded")}</span>}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
123
client/src/components/document-editor/document-editor.utility.js
Normal file
123
client/src/components/document-editor/document-editor.utility.js
Normal file
@@ -0,0 +1,123 @@
|
||||
/**
|
||||
* Converts an image element to a greyscale data URL.
|
||||
* @param imageElement
|
||||
* @returns {string}
|
||||
*/
|
||||
export function convertImageElementToGreyscaleDataUrl(imageElement) {
|
||||
if (!imageElement?.naturalWidth || !imageElement?.naturalHeight) {
|
||||
throw new Error("Image must be loaded before it can be converted to greyscale.");
|
||||
}
|
||||
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.width = imageElement.naturalWidth;
|
||||
canvas.height = imageElement.naturalHeight;
|
||||
|
||||
const context = canvas.getContext("2d");
|
||||
context.drawImage(imageElement, 0, 0);
|
||||
|
||||
const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
|
||||
const pixels = imageData.data;
|
||||
|
||||
for (let i = 0; i < pixels.length; i += 4) {
|
||||
const luminance = Math.round(pixels[i] * 0.299 + pixels[i + 1] * 0.587 + pixels[i + 2] * 0.114);
|
||||
pixels[i] = luminance;
|
||||
pixels[i + 1] = luminance;
|
||||
pixels[i + 2] = luminance;
|
||||
}
|
||||
|
||||
context.putImageData(imageData, 0, 0);
|
||||
|
||||
return canvas.toDataURL("image/jpeg", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a greyscale button to the marker area controls if it doesn't already exist.
|
||||
* @param markerArea
|
||||
* @param onGreyscale
|
||||
* @param title
|
||||
*/
|
||||
export function addGreyscaleButtonToMarkerArea(markerArea, onGreyscale, title) {
|
||||
requestAnimationFrame(() => {
|
||||
const renderButton = markerArea?.coverDiv?.querySelector?.('[data-action="render"]');
|
||||
|
||||
if (!renderButton || markerArea.coverDiv.querySelector('[data-action="greyscale"]')) return;
|
||||
|
||||
const greyscaleButton = document.createElement("div");
|
||||
greyscaleButton.className = renderButton.className;
|
||||
greyscaleButton.innerHTML =
|
||||
'<svg viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20V2zm0 2.25v15.5a7.75 7.75 0 0 1 0-15.5z"/></svg>';
|
||||
greyscaleButton.setAttribute("role", "button");
|
||||
greyscaleButton.setAttribute("data-action", "greyscale");
|
||||
greyscaleButton.setAttribute("aria-label", title);
|
||||
greyscaleButton.title = title;
|
||||
greyscaleButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onGreyscale();
|
||||
});
|
||||
|
||||
renderButton.parentElement.insertBefore(greyscaleButton, renderButton);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a greyscale filter to the image in the marker area and updates the image source.
|
||||
* @param markerArea
|
||||
* @param imageElement
|
||||
* @returns {string}
|
||||
*/
|
||||
export function applyGreyscaleToMarkerAreaImage(markerArea, imageElement) {
|
||||
const dataUrl = convertImageElementToGreyscaleDataUrl(imageElement);
|
||||
|
||||
setMarkerAreaImageSource(markerArea, imageElement, dataUrl);
|
||||
|
||||
return dataUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image source for the marker area and updates the editing target if it's an image element.
|
||||
* @param markerArea
|
||||
* @param imageElement
|
||||
* @param src
|
||||
*/
|
||||
export function setMarkerAreaImageSource(markerArea, imageElement, src) {
|
||||
imageElement.src = src;
|
||||
|
||||
if (markerArea?.editingTarget instanceof HTMLImageElement) {
|
||||
markerArea.editingTarget.src = src;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds undo functionality for image edits to the marker area by tracking the state before and after undo actions.
|
||||
* @param markerArea
|
||||
* @param canUndoImage
|
||||
* @param undoImage
|
||||
*/
|
||||
export function addImageHistoryUndoToMarkerArea(markerArea, canUndoImage, undoImage) {
|
||||
requestAnimationFrame(() => {
|
||||
const undoButton = markerArea?.coverDiv?.querySelector?.('[data-action="undo"]');
|
||||
|
||||
if (!undoButton || undoButton.dataset.imageHistoryUndo === "true") return;
|
||||
|
||||
let markerStateBeforeUndo = null;
|
||||
|
||||
undoButton.dataset.imageHistoryUndo = "true";
|
||||
undoButton.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
markerStateBeforeUndo = JSON.stringify(markerArea.getState(true));
|
||||
},
|
||||
true
|
||||
);
|
||||
undoButton.addEventListener("click", () => {
|
||||
const markerStateAfterUndo = JSON.stringify(markerArea.getState(true));
|
||||
|
||||
if (markerStateBeforeUndo === markerStateAfterUndo && canUndoImage()) {
|
||||
undoImage();
|
||||
}
|
||||
|
||||
markerStateBeforeUndo = null;
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import i18n from "i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { INSERT_NEW_DOCUMENT } from "../../graphql/documents.queries";
|
||||
import { axiosAuthInterceptorId } from "../../utils/CleanAxios";
|
||||
import { replaceAccents } from "../../utils/replaceAccents.js";
|
||||
import client from "../../utils/GraphQLClient";
|
||||
|
||||
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
||||
@@ -144,32 +145,3 @@ export const uploadToS3 = async (
|
||||
if (onError) onError(JSON.stringify(error.message));
|
||||
}
|
||||
};
|
||||
|
||||
function replaceAccents(str) {
|
||||
// Verifies if the String has accents and replace them
|
||||
if (str.search(/[\xC0-\xFF]/g) > -1) {
|
||||
str = str
|
||||
.replace(/[\xC0-\xC5]/g, "A")
|
||||
.replace(/[\xC6]/g, "AE")
|
||||
.replace(/[\xC7]/g, "C")
|
||||
.replace(/[\xC8-\xCB]/g, "E")
|
||||
.replace(/[\xCC-\xCF]/g, "I")
|
||||
.replace(/[\xD0]/g, "D")
|
||||
.replace(/[\xD1]/g, "N")
|
||||
.replace(/[\xD2-\xD6\xD8]/g, "O")
|
||||
.replace(/[\xD9-\xDC]/g, "U")
|
||||
.replace(/[\xDD]/g, "Y")
|
||||
.replace(/[\xDE]/g, "P")
|
||||
.replace(/[\xE0-\xE5]/g, "a")
|
||||
.replace(/[\xE6]/g, "ae")
|
||||
.replace(/[\xE7]/g, "c")
|
||||
.replace(/[\xE8-\xEB]/g, "e")
|
||||
.replace(/[\xEC-\xEF]/g, "i")
|
||||
.replace(/[\xF1]/g, "n")
|
||||
.replace(/[\xF2-\xF6\xF8]/g, "o")
|
||||
.replace(/[\xF9-\xFC]/g, "u")
|
||||
.replace(/[\xFE]/g, "p")
|
||||
.replace(/[\xFD\xFF]/g, "y");
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import { Button, Upload } from "antd";
|
||||
import axios from "axios";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setEsignatureContext: (context) =>
|
||||
dispatch(
|
||||
setModalContext({
|
||||
context,
|
||||
modal: "esignature"
|
||||
})
|
||||
)
|
||||
});
|
||||
|
||||
export function EsignatureCustomDocument({ bodyshop, jobId, setEsignatureContext }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const notification = useNotification();
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!hasDocumensoApiKey(bodyshop)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const uploadCustomDocument = async ({ file, onError, onSuccess }) => {
|
||||
const formData = new FormData();
|
||||
formData.append("document", file);
|
||||
formData.append("jobid", jobId);
|
||||
formData.append("bodyshop", JSON.stringify(bodyshop));
|
||||
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
const {
|
||||
data: { token, documentId, envelopeId }
|
||||
} = await axios.post("/esign/new-custom", formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
}
|
||||
});
|
||||
|
||||
setEsignatureContext({ context: { token, documentId, envelopeId, jobid: jobId } });
|
||||
onSuccess?.({ token, documentId, envelopeId });
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
title: t("esignature.errors.upload_title"),
|
||||
description: error?.response?.data?.error || error?.response?.data?.message || error.message
|
||||
});
|
||||
onError?.(error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Upload
|
||||
accept="application/pdf,.pdf"
|
||||
beforeUpload={(file) => {
|
||||
if (file.type === "application/pdf" || file.name?.toLowerCase().endsWith(".pdf")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
notification.error({
|
||||
title: t("esignature.errors.upload_title"),
|
||||
description: t("esignature.errors.pdf_only")
|
||||
});
|
||||
return Upload.LIST_IGNORE;
|
||||
}}
|
||||
customRequest={uploadCustomDocument}
|
||||
maxCount={1}
|
||||
showUploadList={false}
|
||||
multiple={false}
|
||||
>
|
||||
<Button icon={<UploadOutlined />} loading={loading}>
|
||||
{t("esignature.actions.upload_document")}
|
||||
</Button>
|
||||
</Upload>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EsignatureCustomDocument);
|
||||
@@ -0,0 +1,101 @@
|
||||
import { EmbedUpdateDocumentV1 } from "@documenso/embed-react";
|
||||
import { Modal, notification, Result } from "antd";
|
||||
import axios from "axios";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||
import { selectEsignature } from "../../redux/modals/modals.selectors";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import { useState } from "react";
|
||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
esignatureModal: selectEsignature,
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("esignature"))
|
||||
});
|
||||
|
||||
export function EsignatureModalContainer({ esignatureModal, toggleModalVisible, bodyshop, currentUser }) {
|
||||
const { t } = useTranslation();
|
||||
const { open, context } = esignatureModal;
|
||||
const { token, envelopeId, documentId, jobid } = context;
|
||||
const [distributing, setDistributing] = useState(false);
|
||||
|
||||
if (!hasDocumensoApiKey(bodyshop)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open={open}
|
||||
title={InstanceRenderManager({
|
||||
imex: t("jobs.labels.esignature_imex"),
|
||||
rome: t("jobs.labels.esignature_rome")
|
||||
})}
|
||||
onOk={async () => {
|
||||
try {
|
||||
setDistributing(true);
|
||||
await axios.post("/esign/distribute", {
|
||||
documentId,
|
||||
envelopeId,
|
||||
jobid,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
|
||||
toggleModalVisible();
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
message: t("esignature.distribute_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
setDistributing(false);
|
||||
}}
|
||||
onCancel={async () => {
|
||||
try {
|
||||
await axios.post("/esign/delete", {
|
||||
documentId,
|
||||
envelopeId,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
|
||||
toggleModalVisible();
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
message: t("esignature.cancel_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
okButtonProps={{ loading: distributing }}
|
||||
okText={t("esignature.actions.distribute")}
|
||||
destroyOnHidden
|
||||
width={"80%"}
|
||||
>
|
||||
<div style={{ height: "80vh", width: "100%" }}>
|
||||
{token ? (
|
||||
<EmbedUpdateDocumentV1
|
||||
presignToken={token}
|
||||
host="https://sign.imex.online"
|
||||
documentId={documentId}
|
||||
externalId={`${jobid}|${currentUser?.email}`}
|
||||
className="esignature-embed"
|
||||
onDocumentUpdated={(data) => {
|
||||
console.log("Document updated:", data);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Result status="warning" title={t("esignature.errors.no_token")} />
|
||||
)}
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EsignatureModalContainer);
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SyncOutlined } from "@ant-design/icons";
|
||||
import { useQuery } from "@apollo/client/react";
|
||||
import { Button, Card, Col, Row, Tag } from "antd";
|
||||
import { Button, Card, Checkbox, Col, Row, Space, Tag } from "antd";
|
||||
import ResponsiveTable from "../responsive-table/responsive-table.component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -12,6 +12,9 @@ import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||
import BlurWrapperComponent from "../feature-wrapper/blur-wrapper.component";
|
||||
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||
import UpsellComponent, { upsellEnum } from "../upsell/upsell.component";
|
||||
import axios from "axios";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
@@ -23,6 +26,8 @@ export default connect(mapStateToProps, mapDispatchToProps)(JobAuditTrail);
|
||||
|
||||
export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
const { t } = useTranslation();
|
||||
const notification = useNotification();
|
||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||
const { loading, data, refetch } = useQuery(QUERY_AUDIT_TRAIL, {
|
||||
variables: { jobid: jobId },
|
||||
skip: !jobId,
|
||||
@@ -53,6 +58,145 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
)
|
||||
}
|
||||
];
|
||||
const esigColumns = [
|
||||
{
|
||||
title: t("esignature.fields.created_at"),
|
||||
dataIndex: "created_at",
|
||||
key: "created_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.updated_at"),
|
||||
dataIndex: "updated_at",
|
||||
key: "updated_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.title"),
|
||||
dataIndex: "title",
|
||||
key: "title",
|
||||
render: (text) => (
|
||||
<BlurWrapperComponent featureName="audit" bypass>
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.external_document_id"),
|
||||
dataIndex: "external_document_id",
|
||||
key: "external_document_id",
|
||||
render: (text) => (
|
||||
<BlurWrapperComponent featureName="audit" bypass>
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.status"),
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
render: (text) => (
|
||||
<BlurWrapperComponent featureName="audit" bypass>
|
||||
<div>{text}</div>
|
||||
</BlurWrapperComponent>
|
||||
)
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.opened"),
|
||||
dataIndex: "opened",
|
||||
key: "opened",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.rejected"),
|
||||
dataIndex: "rejected",
|
||||
key: "rejected",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.completed"),
|
||||
dataIndex: "completed",
|
||||
key: "completed",
|
||||
render: (text) => <Checkbox checked={text} disabled />
|
||||
},
|
||||
{
|
||||
title: t("esignature.fields.completed_at"),
|
||||
dataIndex: "completed_at",
|
||||
key: "completed_at",
|
||||
render: (text) => <DateTimeFormatter>{text}</DateTimeFormatter>
|
||||
},
|
||||
{
|
||||
title: t("general.labels.actions"),
|
||||
dataIndex: "actions",
|
||||
key: "actions",
|
||||
render: (_text, record) => (
|
||||
<Space wrap>
|
||||
<Button
|
||||
disabled={record.completed_at !== null || record.status === "REJECTED"}
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_delete", {});
|
||||
try {
|
||||
await axios.post("/esign/delete", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
refetch();
|
||||
} catch (error) {
|
||||
console.error("Error deleting document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.delete_error"),
|
||||
description: error?.response?.data?.error || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("esignature.actions.delete")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_redistribute", {});
|
||||
try {
|
||||
await axios.post("/esign/redistribute", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
|
||||
//Pop the success notification. Possible audit requery required.
|
||||
} catch (error) {
|
||||
console.error("Error viewing document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.view_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("esignature.actions.redistribute")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
logImEXEvent("job_esig_view", {});
|
||||
try {
|
||||
const response = await axios.post("/esign/view", {
|
||||
documentId: record.external_document_id,
|
||||
bodyshopid: bodyshop.id
|
||||
});
|
||||
window.open(response.data?.document?.downloadUrl, "_blank");
|
||||
} catch (error) {
|
||||
console.error("Error viewing document:", error?.response?.data || error.message);
|
||||
notification.error({
|
||||
message: t("esignature.view_error"),
|
||||
description: error?.response?.data?.message || error.message
|
||||
});
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("esignature.actions.view")}
|
||||
</Button>
|
||||
</Space>
|
||||
)
|
||||
}
|
||||
];
|
||||
const emailColumns = [
|
||||
{
|
||||
title: t("audit.fields.created"),
|
||||
@@ -184,6 +328,20 @@ export function JobAuditTrail({ bodyshop, jobId }) {
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
{esignatureEnabled && (
|
||||
<Col span={24}>
|
||||
<Card title={t("jobs.labels.esignatures")}>
|
||||
<ResponsiveTable
|
||||
loading={loading}
|
||||
columns={esigColumns}
|
||||
mobileColumnKeys={["title", "status"]}
|
||||
rowKey="id"
|
||||
scroll={{ x: true }}
|
||||
dataSource={data ? data.esignature_documents : []}
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
)}
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import JoblineTeamAssignment from "../job-line-team-assignment/job-line-team-ass
|
||||
import JobSendPartPriceChangeComponent from "../job-send-parts-price-change/job-send-parts-price-change.component";
|
||||
import PartsOrderDrawer from "../parts-order-list-table/parts-order-list-table-drawer.component";
|
||||
import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container";
|
||||
import { buildInHouseBillLines } from "./job-lines.in-house-bill-lines.utils";
|
||||
import JobLinesExpander from "./job-lines-expander.component";
|
||||
import JobLinesPartPriceChange from "./job-lines-part-price-change.component";
|
||||
import JobLinesExpanderSimple from "./jobs-lines-expander-simple.component";
|
||||
@@ -595,16 +596,7 @@ export function JobLinesComponent({
|
||||
isinhouse: true,
|
||||
date: dayjs(),
|
||||
total: 0,
|
||||
billlines: selectedLines.map((p) => ({
|
||||
joblineid: p.id,
|
||||
actual_price: p.act_price,
|
||||
actual_cost: 0,
|
||||
line_desc: p.line_desc,
|
||||
line_remarks: p.line_remarks,
|
||||
part_type: p.part_type,
|
||||
quantity: p.quantity || 1,
|
||||
applicable_taxes: { local: false, state: false, federal: false }
|
||||
}))
|
||||
billlines: buildInHouseBillLines(selectedLines)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export const buildInHouseBillLines = (lines) =>
|
||||
lines.map((line) => ({
|
||||
joblineid: line.id,
|
||||
actual_price: line.act_price,
|
||||
actual_cost: 0,
|
||||
line_desc: line.line_desc,
|
||||
line_remarks: line.line_remarks,
|
||||
part_type: line.part_type,
|
||||
quantity: line.part_qty ?? line.quantity ?? 1,
|
||||
applicable_taxes: { local: false, state: false, federal: false }
|
||||
}));
|
||||
@@ -0,0 +1,33 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildInHouseBillLines } from "./job-lines.in-house-bill-lines.utils";
|
||||
|
||||
describe("buildInHouseBillLines", () => {
|
||||
it("carries job line part quantity into the in-house bill line", () => {
|
||||
const billLines = buildInHouseBillLines([
|
||||
{
|
||||
id: "job-line-1",
|
||||
act_price: 125,
|
||||
line_desc: "Door shell",
|
||||
line_remarks: "Left",
|
||||
part_type: "PAA",
|
||||
part_qty: 3
|
||||
}
|
||||
]);
|
||||
|
||||
expect(billLines[0]).toMatchObject({
|
||||
joblineid: "job-line-1",
|
||||
actual_price: 125,
|
||||
actual_cost: 0,
|
||||
line_desc: "Door shell",
|
||||
line_remarks: "Left",
|
||||
part_type: "PAA",
|
||||
quantity: 3,
|
||||
applicable_taxes: { local: false, state: false, federal: false }
|
||||
});
|
||||
});
|
||||
|
||||
it("falls back to legacy quantity and then one when part quantity is absent", () => {
|
||||
expect(buildInHouseBillLines([{ id: "legacy", quantity: 2 }])[0].quantity).toBe(2);
|
||||
expect(buildInHouseBillLines([{ id: "missing" }])[0].quantity).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -67,22 +67,25 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow grow>
|
||||
<Form.Item label={t("joblines.fields.mod_lbr_ty")} name="mod_lbr_ty">
|
||||
<Select allowClear options={[
|
||||
{ value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
|
||||
{ value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
|
||||
{ value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
|
||||
{ value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
|
||||
{ value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
|
||||
{ value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
|
||||
{ value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
|
||||
{ value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
|
||||
{ value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
|
||||
{ value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
|
||||
{ value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
|
||||
{ value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
|
||||
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
|
||||
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
|
||||
]} />
|
||||
<Select
|
||||
allowClear
|
||||
options={[
|
||||
{ value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
|
||||
{ value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
|
||||
{ value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
|
||||
{ value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
|
||||
{ value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
|
||||
{ value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
|
||||
{ value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
|
||||
{ value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
|
||||
{ value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
|
||||
{ value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
|
||||
{ value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
|
||||
{ value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
|
||||
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
|
||||
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.op_code_desc")} name="op_code_desc">
|
||||
<Input />
|
||||
@@ -128,21 +131,27 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
||||
</LayoutFormRow>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("joblines.fields.part_type")} name="part_type">
|
||||
<Select allowClear options={[
|
||||
{ value: "PAA", label: t("joblines.fields.part_types.PAA") },
|
||||
{ value: "PAC", label: t("joblines.fields.part_types.PAC") },
|
||||
{ value: "PAE", label: t("joblines.fields.part_types.PAE") },
|
||||
{ value: "PAL", label: t("joblines.fields.part_types.PAL") },
|
||||
{ value: "PAM", label: t("joblines.fields.part_types.PAM") },
|
||||
{ value: "PAN", label: t("joblines.fields.part_types.PAN") },
|
||||
{ value: "PAO", label: t("joblines.fields.part_types.PAO") },
|
||||
{ value: "PAR", label: t("joblines.fields.part_types.PAR") },
|
||||
{ value: "PAS", label: t("joblines.fields.part_types.PAS") }
|
||||
]} />
|
||||
<Select
|
||||
allowClear
|
||||
options={[
|
||||
{ value: "PAA", label: t("joblines.fields.part_types.PAA") },
|
||||
{ value: "PAC", label: t("joblines.fields.part_types.PAC") },
|
||||
{ value: "PAE", label: t("joblines.fields.part_types.PAE") },
|
||||
{ value: "PAL", label: t("joblines.fields.part_types.PAL") },
|
||||
{ value: "PAM", label: t("joblines.fields.part_types.PAM") },
|
||||
{ value: "PAN", label: t("joblines.fields.part_types.PAN") },
|
||||
{ value: "PAO", label: t("joblines.fields.part_types.PAO") },
|
||||
{ value: "PAR", label: t("joblines.fields.part_types.PAR") },
|
||||
{ value: "PAS", label: t("joblines.fields.part_types.PAS") }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.oem_partno")} name="oem_partno">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.alt_partno")} name="alt_partno">
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("joblines.fields.part_qty")}
|
||||
name="part_qty"
|
||||
|
||||
@@ -14,16 +14,20 @@ import CriticalPartsScan from "../../utils/criticalPartsScan";
|
||||
import UndefinedToNull from "../../utils/undefinedtonull";
|
||||
import JobLinesUpdsertModal from "./job-lines-upsert-modal.component";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings.js";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions.js";
|
||||
import { buildJobLineInsertAuditDetails, buildJobLineUpdateAuditDetails } from "../../utils/auditTrailDetails.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
jobLineEditModal: selectJobLineEditModal,
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("jobLineEdit"))
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("jobLineEdit")),
|
||||
insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type }))
|
||||
});
|
||||
|
||||
function JobLinesUpsertModalContainer({ jobLineEditModal, toggleModalVisible, bodyshop }) {
|
||||
function JobLinesUpsertModalContainer({ jobLineEditModal, toggleModalVisible, bodyshop, insertAuditTrail }) {
|
||||
const {
|
||||
treatments: { CriticalPartsScanning }
|
||||
} = useTreatmentsWithConfig({
|
||||
@@ -74,6 +78,11 @@ function JobLinesUpsertModalContainer({ jobLineEditModal, toggleModalVisible, bo
|
||||
notification.success({
|
||||
title: t("joblines.successes.created")
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: jobLineEditModal.context.jobid,
|
||||
operation: AuditTrailMapping.jobmanuallineinsert(buildJobLineInsertAuditDetails(values)),
|
||||
type: "jobmanuallineinsert"
|
||||
});
|
||||
} else {
|
||||
notification.error({
|
||||
title: t("joblines.errors.creating", {
|
||||
@@ -103,6 +112,17 @@ function JobLinesUpsertModalContainer({ jobLineEditModal, toggleModalVisible, bo
|
||||
notification.success({
|
||||
title: t("joblines.successes.updated")
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: jobLineEditModal.context.jobid,
|
||||
operation: AuditTrailMapping.joblineupdate(
|
||||
values.line_desc || jobLineEditModal.context.line_desc || "manual line",
|
||||
buildJobLineUpdateAuditDetails({
|
||||
originalLine: jobLineEditModal.context,
|
||||
values
|
||||
})
|
||||
),
|
||||
type: "joblineupdate"
|
||||
});
|
||||
} else {
|
||||
notification.success({
|
||||
title: t("joblines.errors.updating", {
|
||||
|
||||
@@ -224,14 +224,10 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
||||
</>
|
||||
)}
|
||||
|
||||
<Form.Item
|
||||
name={["ins_co_nm"]}
|
||||
label={t("jobs.fields.ins_co_nm")}
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Form.Item name={["ins_co_nm"]} label={t("jobs.fields.ins_co_nm")} rules={[{ required: true }]}>
|
||||
<Select
|
||||
showSearch={{
|
||||
optionFilterProp:'label'
|
||||
optionFilterProp: "label"
|
||||
}}
|
||||
options={insuranceOptions}
|
||||
/>
|
||||
@@ -250,7 +246,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
||||
label={t("jobs.fields.referralsource")}
|
||||
rules={[{ required: bodyshop.enforce_referral }]}
|
||||
>
|
||||
<Select options={referralOptions} />
|
||||
<Select showSearch={{ optionFilterProp: "label" }} options={referralOptions} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra">
|
||||
@@ -272,19 +268,21 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
|
||||
>
|
||||
<Select
|
||||
showSearch={{
|
||||
optionFilterProp: 'label',
|
||||
filterOption: (input, option) =>
|
||||
(option?.label ?? "").toLowerCase().includes(input.toLowerCase())
|
||||
optionFilterProp: "label",
|
||||
filterOption: (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase())
|
||||
}}
|
||||
style={{ width: 200 }}
|
||||
|
||||
options={csrOptions}
|
||||
/>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
{bodyshop.enforce_conversion_category && (
|
||||
<Form.Item name="category" label={t("jobs.fields.category")} rules={[{ required: bodyshop.enforce_conversion_category }]}>
|
||||
<Form.Item
|
||||
name="category"
|
||||
label={t("jobs.fields.category")}
|
||||
rules={[{ required: bodyshop.enforce_conversion_category }]}
|
||||
>
|
||||
<Select allowClear options={categoryOptions} />
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
@@ -193,6 +193,9 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.referralsource")} name="referral_source">
|
||||
<Select
|
||||
showSearch={{
|
||||
optionFilterProp: "label"
|
||||
}}
|
||||
options={bodyshop.md_referral_sources.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
|
||||
@@ -43,19 +43,25 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
|
||||
<Input disabled={jobRO} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ded_status")} name="ded_status">
|
||||
<Select disabled={jobRO} options={[
|
||||
{ value: "W", label: t("jobs.labels.deductible.waived") },
|
||||
{ value: "Y", label: t("jobs.labels.deductible.stands") }
|
||||
]} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
options={[
|
||||
{ value: "W", label: t("jobs.labels.deductible.waived") },
|
||||
{ value: "Y", label: t("jobs.labels.deductible.stands") }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ded_amt")} name="ded_amt">
|
||||
<CurrencyInput disabled={jobRO} min={0} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ded_note")} name="ded_note">
|
||||
<Select disabled={jobRO} options={bodyshop.md_ded_notes.map((n) => ({
|
||||
value: n,
|
||||
label: n
|
||||
}))} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
options={bodyshop.md_ded_notes.map((n) => ({
|
||||
value: n,
|
||||
label: n
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.policy_no")} name="policy_no">
|
||||
<Input disabled={jobRO} />
|
||||
@@ -65,10 +71,14 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm">
|
||||
<Select disabled={jobRO} onChange={handleInsCoChange} options={bodyshop.md_ins_cos.map((s) => ({
|
||||
value: s.name,
|
||||
label: s.name
|
||||
}))} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
onChange={handleInsCoChange}
|
||||
options={bodyshop.md_ins_cos.map((s) => ({
|
||||
value: s.name,
|
||||
label: s.name
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1">
|
||||
<Input disabled={jobRO} />
|
||||
@@ -119,19 +129,30 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
|
||||
}
|
||||
]}
|
||||
>
|
||||
<Select disabled={jobRO} allowClear options={bodyshop.md_referral_sources.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
allowClear
|
||||
showSearch={{
|
||||
optionFilterProp: "label"
|
||||
}}
|
||||
options={bodyshop.md_referral_sources.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra">
|
||||
<Input disabled={jobRO} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.alt_transport")} name="alt_transport">
|
||||
<Select disabled={jobRO} allowClear options={bodyshop.appt_alt_transport.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
allowClear
|
||||
options={bodyshop.appt_alt_transport.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
</FormRow>
|
||||
<Row gutter={[16, 16]}>
|
||||
@@ -233,10 +254,14 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
|
||||
</FormRow>
|
||||
<FormRow header={t("jobs.forms.other")}>
|
||||
<Form.Item label={t("jobs.fields.category")} name="category">
|
||||
<Select disabled={jobRO} allowClear options={bodyshop.md_categories.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))} />
|
||||
<Select
|
||||
disabled={jobRO}
|
||||
allowClear
|
||||
options={bodyshop.md_categories.map((s) => ({
|
||||
value: s,
|
||||
label: s
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.selling_dealer")} name="selling_dealer">
|
||||
<Input disabled={jobRO} />
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Col, Row, Space } from "antd";
|
||||
import axios from "axios";
|
||||
import i18n from "i18next";
|
||||
import { isFunction } from "lodash";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import Lightbox from "react-image-lightbox";
|
||||
import "react-image-lightbox/style.css";
|
||||
@@ -12,12 +12,12 @@ import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import DocumentsUploadImgproxyComponent from "../documents-upload-imgproxy/documents-upload-imgproxy.component";
|
||||
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||
import LocalMediaGrid from "../jobs-documents-local-gallery/local-media-grid.component";
|
||||
import UpsellComponent, { upsellEnum } from "../upsell/upsell.component";
|
||||
import JobsDocumentsDownloadButton from "./jobs-document-imgproxy-gallery.download.component";
|
||||
import JobsDocumentsGalleryReassign from "./jobs-document-imgproxy-gallery.reassign.component";
|
||||
import JobsDocumentsDeleteButton from "./jobs-documents-imgproxy-gallery.delete.component";
|
||||
import JobsDocumentsGallerySelectAllComponent from "./jobs-documents-imgproxy-gallery.selectall.component";
|
||||
import LocalMediaGrid from "../jobs-documents-local-gallery/local-media-grid.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
@@ -38,6 +38,9 @@ function JobsDocumentsImgproxyComponent({
|
||||
const [galleryImages, setGalleryImages] = useState({ images: [], other: [] });
|
||||
const { t } = useTranslation();
|
||||
const [modalState, setModalState] = useState({ open: false, index: 0 });
|
||||
const [previewUrls, setPreviewUrls] = useState({});
|
||||
const [previewError, setPreviewError] = useState(null);
|
||||
const previewUrlsRef = useRef({});
|
||||
|
||||
const fetchThumbnails = useCallback(() => {
|
||||
fetchImgproxyThumbnails({ setStateCallback: setGalleryImages, jobId, billId });
|
||||
@@ -49,8 +52,86 @@ function JobsDocumentsImgproxyComponent({
|
||||
}
|
||||
}, [data, fetchThumbnails]);
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
Object.values(previewUrlsRef.current).forEach(URL.revokeObjectURL);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const selectedImage = modalState.open ? galleryImages.images[modalState.index] : null;
|
||||
|
||||
useEffect(() => {
|
||||
if (!modalState.open || !selectedImage?.id) return;
|
||||
|
||||
if (previewUrlsRef.current[selectedImage.id]) {
|
||||
setPreviewError(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const controller = new AbortController();
|
||||
|
||||
async function loadPreviewImage() {
|
||||
setPreviewError(null);
|
||||
|
||||
try {
|
||||
const response = await axios.post(
|
||||
"/media/imgproxy/original",
|
||||
{ documentId: selectedImage.id },
|
||||
{
|
||||
responseType: "blob",
|
||||
signal: controller.signal
|
||||
}
|
||||
);
|
||||
const blobUrl = URL.createObjectURL(response.data);
|
||||
|
||||
previewUrlsRef.current = {
|
||||
...previewUrlsRef.current,
|
||||
[selectedImage.id]: blobUrl
|
||||
};
|
||||
setPreviewUrls(previewUrlsRef.current);
|
||||
} catch (error) {
|
||||
if (axios.isCancel?.(error) || error.name === "CanceledError") return;
|
||||
|
||||
console.error("Failed to fetch original image blob", error);
|
||||
setPreviewError(error);
|
||||
}
|
||||
}
|
||||
|
||||
loadPreviewImage();
|
||||
|
||||
return () => {
|
||||
controller.abort();
|
||||
};
|
||||
}, [modalState.open, selectedImage?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (modalState.open && !selectedImage) {
|
||||
setModalState({ open: false, index: 0 });
|
||||
}
|
||||
}, [modalState.open, selectedImage]);
|
||||
|
||||
const openEditorForImage = useCallback((image) => {
|
||||
if (!image?.id) return;
|
||||
|
||||
const newWindow = window.open(
|
||||
`${window.location.protocol}//${window.location.host}/edit?documentId=${image.id}`,
|
||||
"_blank",
|
||||
"noopener,noreferrer"
|
||||
);
|
||||
if (newWindow) newWindow.opener = null;
|
||||
}, []);
|
||||
|
||||
const hasMediaAccess = HasFeatureAccess({ bodyshop, featureName: "media" });
|
||||
const hasMobileAccess = HasFeatureAccess({ bodyshop, featureName: "mobile" });
|
||||
const previewSrc = selectedImage ? previewUrls[selectedImage.id] : null;
|
||||
const getLightboxImageSrc = useCallback(
|
||||
(index) => {
|
||||
const image = galleryImages.images[index];
|
||||
return image ? previewUrls[image.id] || image.src : undefined;
|
||||
},
|
||||
[galleryImages.images, previewUrls]
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Row gutter={[16, 16]}>
|
||||
@@ -147,30 +228,33 @@ function JobsDocumentsImgproxyComponent({
|
||||
/>
|
||||
</Card>
|
||||
</Col>
|
||||
{modalState.open && (
|
||||
{modalState.open && selectedImage && (
|
||||
<Lightbox
|
||||
toolbarButtons={[
|
||||
<EditFilled
|
||||
key="edit"
|
||||
onClick={() => {
|
||||
const newWindow = window.open(
|
||||
`${window.location.protocol}//${window.location.host}/edit?documentId=${
|
||||
galleryImages.images[modalState.index].id
|
||||
}`,
|
||||
"_blank",
|
||||
"noopener,noreferrer"
|
||||
);
|
||||
if (newWindow) newWindow.opener = null;
|
||||
openEditorForImage(selectedImage);
|
||||
}}
|
||||
/>
|
||||
]}
|
||||
mainSrc={galleryImages.images[modalState.index].fullsize}
|
||||
nextSrc={galleryImages.images[(modalState.index + 1) % galleryImages.images.length].fullsize}
|
||||
prevSrc={
|
||||
imageLoadErrorMessage={previewError ? t("general.errors.notfound") : undefined}
|
||||
mainSrc={previewSrc || selectedImage.src}
|
||||
mainSrcThumbnail={selectedImage.src}
|
||||
nextSrc={getLightboxImageSrc((modalState.index + 1) % galleryImages.images.length)}
|
||||
nextSrcThumbnail={galleryImages.images[(modalState.index + 1) % galleryImages.images.length]?.src}
|
||||
prevSrc={getLightboxImageSrc(
|
||||
(modalState.index + galleryImages.images.length - 1) % galleryImages.images.length
|
||||
)}
|
||||
prevSrcThumbnail={
|
||||
galleryImages.images[(modalState.index + galleryImages.images.length - 1) % galleryImages.images.length]
|
||||
.fullsize
|
||||
?.src
|
||||
}
|
||||
onCloseRequest={() => setModalState({ open: false, index: 0 })}
|
||||
reactModalProps={{ ariaHideApp: false }}
|
||||
onCloseRequest={() => {
|
||||
setModalState({ open: false, index: 0 });
|
||||
setPreviewError(null);
|
||||
}}
|
||||
onMovePrevRequest={() =>
|
||||
setModalState({
|
||||
...modalState,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { notificationScenarios } from "../../utils/jobNotificationScenarios.js";
|
||||
import { Checkbox, Form } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import PropTypes from "prop-types";
|
||||
@@ -9,18 +8,18 @@ import PropTypes from "prop-types";
|
||||
* @param form
|
||||
* @param disabled
|
||||
* @param onHeaderChange
|
||||
* @param scenarioKeys
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const ColumnHeaderCheckbox = ({ channel, form, disabled = false, onHeaderChange }) => {
|
||||
const ColumnHeaderCheckbox = ({ channel, form, disabled = false, onHeaderChange, scenarioKeys }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
// Subscribe to all form values so that this component re-renders on changes.
|
||||
const formValues = Form.useWatch([], form) || {};
|
||||
|
||||
// Determine if all scenarios for this channel are checked.
|
||||
const allChecked =
|
||||
notificationScenarios.length > 0 && notificationScenarios.every((scenario) => formValues[scenario]?.[channel]);
|
||||
const allChecked = scenarioKeys.length > 0 && scenarioKeys.every((scenario) => formValues[scenario]?.[channel]);
|
||||
|
||||
const onChange = (e) => {
|
||||
const checked = e.target.checked;
|
||||
@@ -28,7 +27,7 @@ const ColumnHeaderCheckbox = ({ channel, form, disabled = false, onHeaderChange
|
||||
const currentValues = form.getFieldsValue();
|
||||
// Update each scenario for this channel.
|
||||
const newValues = { ...currentValues };
|
||||
notificationScenarios.forEach((scenario) => {
|
||||
scenarioKeys.forEach((scenario) => {
|
||||
newValues[scenario] = { ...newValues[scenario], [channel]: checked };
|
||||
});
|
||||
// Update form values.
|
||||
@@ -50,7 +49,8 @@ ColumnHeaderCheckbox.propTypes = {
|
||||
channel: PropTypes.oneOf(["app", "email", "fcm"]).isRequired,
|
||||
form: PropTypes.object.isRequired,
|
||||
disabled: PropTypes.bool,
|
||||
onHeaderChange: PropTypes.func
|
||||
onHeaderChange: PropTypes.func,
|
||||
scenarioKeys: PropTypes.arrayOf(PropTypes.string).isRequired
|
||||
};
|
||||
|
||||
export default ColumnHeaderCheckbox;
|
||||
|
||||
@@ -12,12 +12,13 @@ import {
|
||||
UPDATE_NOTIFICATION_SETTINGS,
|
||||
UPDATE_NOTIFICATIONS_AUTOADD
|
||||
} from "../../graphql/user.queries.js";
|
||||
import { notificationScenarios } from "../../utils/jobNotificationScenarios.js";
|
||||
import { getNotificationScenarios, notificationScenarioDefaults } from "../../utils/jobNotificationScenarios.js";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component.jsx";
|
||||
import PropTypes from "prop-types";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import ColumnHeaderCheckbox from "../notification-settings/column-header-checkbox.component.jsx";
|
||||
import { useIsEmployee } from "../../utils/useIsEmployee.js";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
/**
|
||||
* Notifications Settings Form
|
||||
@@ -35,6 +36,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
const [initialAutoAdd, setInitialAutoAdd] = useState(false);
|
||||
const notification = useNotification();
|
||||
const isEmployee = useIsEmployee(bodyshop, currentUser);
|
||||
const notificationScenarios = getNotificationScenarios({ includeEsign: hasDocumensoApiKey(bodyshop) });
|
||||
|
||||
// Fetch notification settings and notifications_autoadd
|
||||
const { loading, error, data } = useQuery(QUERY_NOTIFICATION_SETTINGS, {
|
||||
@@ -55,7 +57,8 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
|
||||
// Ensure each scenario has an object with { app, email, fcm }
|
||||
const formattedValues = notificationScenarios.reduce((acc, scenario) => {
|
||||
acc[scenario] = settings[scenario] ?? { app: false, email: false, fcm: false };
|
||||
acc[scenario] = settings[scenario] ??
|
||||
notificationScenarioDefaults[scenario] ?? { app: false, email: false, fcm: false };
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
@@ -65,7 +68,7 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
setInitialAutoAdd(autoAdd);
|
||||
setIsDirty(false); // Reset dirty state when new data loads
|
||||
}
|
||||
}, [data, form]);
|
||||
}, [data, form, notificationScenarios]);
|
||||
|
||||
// Handle toggle of notifications_autoadd
|
||||
const handleAutoAddToggle = async (checked) => {
|
||||
@@ -136,7 +139,14 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
width: "80%"
|
||||
},
|
||||
{
|
||||
title: <ColumnHeaderCheckbox channel="app" form={form} onHeaderChange={() => setIsDirty(true)} />,
|
||||
title: (
|
||||
<ColumnHeaderCheckbox
|
||||
channel="app"
|
||||
form={form}
|
||||
onHeaderChange={() => setIsDirty(true)}
|
||||
scenarioKeys={notificationScenarios}
|
||||
/>
|
||||
),
|
||||
dataIndex: "app",
|
||||
key: "app",
|
||||
align: "center",
|
||||
@@ -147,7 +157,14 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
)
|
||||
},
|
||||
{
|
||||
title: <ColumnHeaderCheckbox channel="email" form={form} onHeaderChange={() => setIsDirty(true)} />,
|
||||
title: (
|
||||
<ColumnHeaderCheckbox
|
||||
channel="email"
|
||||
form={form}
|
||||
onHeaderChange={() => setIsDirty(true)}
|
||||
scenarioKeys={notificationScenarios}
|
||||
/>
|
||||
),
|
||||
dataIndex: "email",
|
||||
key: "email",
|
||||
align: "center",
|
||||
@@ -162,7 +179,14 @@ const NotificationSettingsForm = ({ currentUser, bodyshop }) => {
|
||||
// Currently disabled for prod
|
||||
if (!import.meta.env.PROD) {
|
||||
columns.push({
|
||||
title: <ColumnHeaderCheckbox channel="fcm" form={form} onHeaderChange={() => setIsDirty(true)} />,
|
||||
title: (
|
||||
<ColumnHeaderCheckbox
|
||||
channel="fcm"
|
||||
form={form}
|
||||
onHeaderChange={() => setIsDirty(true)}
|
||||
scenarioKeys={notificationScenarios}
|
||||
/>
|
||||
),
|
||||
dataIndex: "fcm",
|
||||
key: "fcm",
|
||||
align: "center",
|
||||
|
||||
@@ -11,12 +11,13 @@ import ResponsiveTable from "../responsive-table/responsive-table.component";
|
||||
|
||||
export default function OwnersListComponent({ loading, owners, total, refetch }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {
|
||||
page
|
||||
// sortcolumn, sortorder
|
||||
} = search;
|
||||
const { page, pageSize } = search;
|
||||
const history = useNavigate();
|
||||
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
filteredInfo: { text: "" }
|
||||
@@ -71,10 +72,14 @@ export default function OwnersListComponent({ loading, owners, total, refetch })
|
||||
];
|
||||
|
||||
const handleTableChange = (pagination, filters, sorter) => {
|
||||
const nextPageSize = pagination?.pageSize || currentPageSize;
|
||||
const pageSizeChanged = nextPageSize !== currentPageSize;
|
||||
|
||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||
const updatedSearch = {
|
||||
...search,
|
||||
page: pagination.current,
|
||||
pageSize: nextPageSize,
|
||||
page: pageSizeChanged ? 1 : pagination.current,
|
||||
sortcolumn: sorter.columnKey,
|
||||
sortorder: sorter.order
|
||||
};
|
||||
@@ -119,7 +124,7 @@ export default function OwnersListComponent({ loading, owners, total, refetch })
|
||||
>
|
||||
<ResponsiveTable
|
||||
loading={loading}
|
||||
pagination={{ placement: "top", pageSize: pageLimit, current: parseInt(page || 1, 10), total: total }}
|
||||
pagination={{ placement: "top", pageSize: currentPageSize, current: currentPage, showSizeChanger: true, total: total }}
|
||||
columns={columns}
|
||||
mobileColumnKeys={["name", "ownr_ph1", "ownr_ph2"]}
|
||||
rowKey="id"
|
||||
|
||||
@@ -8,14 +8,19 @@ import { pageLimit } from "../../utils/config";
|
||||
|
||||
export default function OwnersListContainer() {
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const { page, sortcolumn, sortorder, search, pageSize } = searchParams;
|
||||
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_OWNERS_PAGINATED, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
variables: {
|
||||
search: search || "",
|
||||
offset: page ? (page - 1) * pageLimit : 0,
|
||||
limit: pageLimit,
|
||||
offset: (currentPage - 1) * currentPageSize,
|
||||
limit: currentPageSize,
|
||||
order: [
|
||||
{
|
||||
[sortcolumn || "created_at"]: sortorder ? (sortorder === "descend" ? "desc" : "asc") : "desc"
|
||||
|
||||
@@ -176,6 +176,9 @@ export function PartsOrderModalComponent({
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item key={`${index}job_line_id`} name={[field.name, "job_line_id"]} hidden>
|
||||
<Input type="hidden" />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("parts_orders.fields.line_remarks")}
|
||||
key={`${index}line_remarks`}
|
||||
|
||||
@@ -23,6 +23,7 @@ import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
|
||||
import _ from "lodash";
|
||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import { buildSubmittedPartsOrderLines, getSubmittedPartsOrderJobLineIds } from "./parts-order-modal.utils.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -82,15 +83,10 @@ export function PartsOrderModalContainer({
|
||||
|
||||
// Force job_line_id from context so it never gets dropped by AntD form submission behavior.
|
||||
const submittedLines = values?.parts_order_lines?.data ?? [];
|
||||
const forcedLines = submittedLines.map((p, index) => {
|
||||
const originalLine = linesToOrder?.[index];
|
||||
const jobLineId = isReturn ? originalLine?.joblineid : originalLine?.id;
|
||||
|
||||
return {
|
||||
...p,
|
||||
job_line_id: jobLineId,
|
||||
...(isReturn && { cm_received: false })
|
||||
};
|
||||
const forcedLines = buildSubmittedPartsOrderLines({
|
||||
submittedLines,
|
||||
linesToOrder,
|
||||
isReturn
|
||||
});
|
||||
|
||||
let insertResult;
|
||||
@@ -147,10 +143,7 @@ export function PartsOrderModalContainer({
|
||||
type: isReturn ? "jobspartsreturn" : "jobspartsorder"
|
||||
});
|
||||
|
||||
// Use linesToOrder from context instead of form values to preserve job line ids
|
||||
const jobLineIds = (linesToOrder ?? [])
|
||||
.filter((line) => (isReturn ? line.joblineid : line.id))
|
||||
.map((line) => (isReturn ? line.joblineid : line.id));
|
||||
const jobLineIds = getSubmittedPartsOrderJobLineIds(forcedLines);
|
||||
|
||||
try {
|
||||
const jobLinesResult = await updateJobLines({
|
||||
@@ -206,23 +199,20 @@ export function PartsOrderModalContainer({
|
||||
isinhouse: true,
|
||||
date: dayjs(),
|
||||
total: 0,
|
||||
billlines: forcedLines.map((p, index) => {
|
||||
const originalLine = linesToOrder?.[index];
|
||||
return {
|
||||
joblineid: isReturn ? originalLine?.joblineid : originalLine?.id,
|
||||
actual_price: p.act_price,
|
||||
actual_cost: 0, // p.act_price,
|
||||
line_desc: p.line_desc,
|
||||
line_remarks: p.line_remarks,
|
||||
part_type: p.part_type,
|
||||
quantity: p.quantity || 1,
|
||||
applicable_taxes: {
|
||||
local: false,
|
||||
state: false,
|
||||
federal: false
|
||||
}
|
||||
};
|
||||
})
|
||||
billlines: forcedLines.map((p) => ({
|
||||
joblineid: p.job_line_id,
|
||||
actual_price: p.act_price,
|
||||
actual_cost: 0, // p.act_price,
|
||||
line_desc: p.line_desc,
|
||||
line_remarks: p.line_remarks,
|
||||
part_type: p.part_type,
|
||||
quantity: p.quantity || 1,
|
||||
applicable_taxes: {
|
||||
local: false,
|
||||
state: false,
|
||||
federal: false
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
export const getPartsOrderJobLineId = ({ line, originalLine, isReturn }) => {
|
||||
return line?.job_line_id || (isReturn ? originalLine?.joblineid : originalLine?.id);
|
||||
};
|
||||
|
||||
export const buildSubmittedPartsOrderLines = ({ submittedLines = [], linesToOrder = [], isReturn }) => {
|
||||
return submittedLines.map((line, index) => {
|
||||
const jobLineId = getPartsOrderJobLineId({
|
||||
line,
|
||||
originalLine: linesToOrder?.[index],
|
||||
isReturn
|
||||
});
|
||||
|
||||
return {
|
||||
...line,
|
||||
job_line_id: jobLineId,
|
||||
...(isReturn && { cm_received: false })
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
export const getSubmittedPartsOrderJobLineIds = (partsOrderLines = []) => {
|
||||
return partsOrderLines.map((line) => line.job_line_id).filter(Boolean);
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildSubmittedPartsOrderLines, getSubmittedPartsOrderJobLineIds } from "./parts-order-modal.utils.js";
|
||||
|
||||
describe("parts order modal utilities", () => {
|
||||
it("preserves submitted job line ids after a row is removed", () => {
|
||||
const submittedLines = [
|
||||
{ line_desc: "second line", job_line_id: "job-line-2" },
|
||||
{ line_desc: "third line", job_line_id: "job-line-3" }
|
||||
];
|
||||
const linesToOrder = [{ id: "job-line-1" }, { id: "job-line-2" }, { id: "job-line-3" }];
|
||||
|
||||
const result = buildSubmittedPartsOrderLines({ submittedLines, linesToOrder, isReturn: false });
|
||||
|
||||
expect(result.map((line) => line.job_line_id)).toEqual(["job-line-2", "job-line-3"]);
|
||||
expect(getSubmittedPartsOrderJobLineIds(result)).toEqual(["job-line-2", "job-line-3"]);
|
||||
});
|
||||
|
||||
it("falls back to original return line ids when the form omits hidden metadata", () => {
|
||||
const submittedLines = [{ line_desc: "return line" }];
|
||||
const linesToOrder = [{ joblineid: "return-job-line-1" }];
|
||||
|
||||
const result = buildSubmittedPartsOrderLines({ submittedLines, linesToOrder, isReturn: true });
|
||||
|
||||
expect(result).toEqual([
|
||||
{
|
||||
line_desc: "return line",
|
||||
job_line_id: "return-job-line-1",
|
||||
cm_received: false
|
||||
}
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -29,7 +29,10 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
export function PartsQueueListComponent({ bodyshop }) {
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { selected, sortcolumn, sortorder, statusFilters } = searchParams;
|
||||
const { selected, sortcolumn, sortorder, statusFilters, page, pageSize } = searchParams;
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
const history = useNavigate();
|
||||
const [filter, setFilter] = useLocalStorage("filter_parts_queue", null);
|
||||
const [viewTimeStamp, setViewTimeStamp] = useLocalStorage("parts_queue_timestamps", false);
|
||||
@@ -66,7 +69,11 @@ export function PartsQueueListComponent({ bodyshop }) {
|
||||
: [];
|
||||
|
||||
const handleTableChange = (pagination, filters, sorter) => {
|
||||
// searchParams.page = pagination.current;
|
||||
const nextPageSize = pagination?.pageSize || currentPageSize;
|
||||
const pageSizeChanged = nextPageSize !== currentPageSize;
|
||||
|
||||
searchParams.pageSize = nextPageSize;
|
||||
searchParams.page = pageSizeChanged ? 1 : pagination.current;
|
||||
searchParams.sortcolumn = sorter.columnKey;
|
||||
searchParams.sortorder = sorter.order;
|
||||
|
||||
@@ -315,9 +322,10 @@ export function PartsQueueListComponent({ bodyshop }) {
|
||||
loading={loading}
|
||||
pagination={{
|
||||
placement: "top",
|
||||
pageSize: pageLimit
|
||||
// current: parseInt(page || 1),
|
||||
// total: data && data.jobs_aggregate.aggregate.count,
|
||||
pageSize: currentPageSize,
|
||||
current: currentPage,
|
||||
showSizeChanger: true,
|
||||
total: jobs.length
|
||||
}}
|
||||
columns={columns}
|
||||
mobileColumnKeys={["ro_number", "ownr_ln", "status", "vehicle", "partsstatus"]}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MailOutlined, PrinterOutlined } from "@ant-design/icons";
|
||||
import { MailOutlined, PrinterOutlined, SignatureFilled } from "@ant-design/icons";
|
||||
import { Space, Spin } from "antd";
|
||||
import { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
@@ -10,6 +10,9 @@ import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component";
|
||||
import { HasFeatureAccess } from "./../feature-wrapper/feature-wrapper.component";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import axios from "axios";
|
||||
import { setModalContext } from "../../redux/modals/modals.actions.js";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
printCenterModal: selectPrintCenter,
|
||||
@@ -17,12 +20,29 @@ const mapStateToProps = createStructuredSelector({
|
||||
technician: selectTechnician
|
||||
});
|
||||
|
||||
const mapDispatchToProps = () => ({});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setEsignatureContext: (context) =>
|
||||
dispatch(
|
||||
setModalContext({
|
||||
context: context,
|
||||
modal: "esignature"
|
||||
})
|
||||
)
|
||||
});
|
||||
|
||||
export function PrintCenterItemComponent({ printCenterModal, item, id, bodyshop, disabled, technician }) {
|
||||
export function PrintCenterItemComponent({
|
||||
printCenterModal,
|
||||
setEsignatureContext,
|
||||
item,
|
||||
id,
|
||||
bodyshop,
|
||||
disabled,
|
||||
technician
|
||||
}) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { context } = printCenterModal;
|
||||
const notification = useNotification();
|
||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||
|
||||
const renderToNewWindow = async () => {
|
||||
setLoading(true);
|
||||
@@ -39,6 +59,30 @@ export function PrintCenterItemComponent({ printCenterModal, item, id, bodyshop,
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const esignatureGenerate = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const {
|
||||
data: { token, documentId, envelopeId }
|
||||
} = await axios.post("/esign/new", {
|
||||
name: item.key,
|
||||
jobid: id,
|
||||
context,
|
||||
bodyshop,
|
||||
templateObject: {
|
||||
name: item.key,
|
||||
variables: { id: id }
|
||||
}
|
||||
});
|
||||
|
||||
setEsignatureContext({ context: { token, documentId, envelopeId, jobid: id } });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (
|
||||
disabled ||
|
||||
(item.featureNameRestricted && !HasFeatureAccess({ featureName: item.featureNameRestricted, bodyshop }))
|
||||
@@ -54,6 +98,7 @@ export function PrintCenterItemComponent({ printCenterModal, item, id, bodyshop,
|
||||
<li>
|
||||
<Space wrap>
|
||||
{item.title}
|
||||
{esignatureEnabled && <SignatureFilled onClick={esignatureGenerate} />}
|
||||
<PrinterOutlined onClick={renderToNewWindow} />
|
||||
{!technician ? (
|
||||
<MailOutlined
|
||||
|
||||
@@ -9,11 +9,13 @@ import { selectPrintCenter } from "../../redux/modals/modals.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component";
|
||||
import EsignatureCustomDocument from "../esignature-custom-document/esignature-custom-document.component";
|
||||
import PrintCenterItem from "../print-center-item/print-center-item.component";
|
||||
import PrintCenterJobsLabels from "../print-center-jobs-labels/print-center-jobs-labels.component";
|
||||
import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component";
|
||||
import { bodyshopHasDmsKey } from "../../utils/dmsUtils";
|
||||
import { bodyshopHasDmsKey, DMS_MAP, getDmsMode } from "../../utils/dmsUtils";
|
||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
printCenterModal: selectPrintCenter,
|
||||
@@ -36,6 +38,9 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
|
||||
splitKey: bodyshop.imexshopid
|
||||
});
|
||||
const hasDMSKey = bodyshopHasDmsKey(bodyshop);
|
||||
const dmsMode = getDmsMode(bodyshop, "off");
|
||||
const isReynoldsMode = dmsMode === DMS_MAP.reynolds;
|
||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||
|
||||
const Templates = !hasDMSKey
|
||||
? Object.keys(tempList)
|
||||
@@ -60,8 +65,9 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
|
||||
(temp.regions && temp.regions[bodyshop.region_config]) ||
|
||||
(temp.regions && bodyshop.region_config.includes(Object.keys(temp.regions)) === true)
|
||||
)
|
||||
.filter((temp) => !isReynoldsMode || !temp.excludedDmsModes?.includes(dmsMode))
|
||||
.filter((temp) => !technician || temp.group !== "financial");
|
||||
|
||||
|
||||
const JobsReportsList =
|
||||
Enhanced_Payroll.treatment === "on"
|
||||
? Object.keys(Templates)
|
||||
@@ -94,6 +100,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop, technicia
|
||||
extra={
|
||||
<Space wrap>
|
||||
<PrintCenterJobsLabels jobId={jobId} />
|
||||
{esignatureEnabled && <EsignatureCustomDocument jobId={jobId} />}
|
||||
<Jobd3RdPartyModal jobId={jobId} job={job} />
|
||||
<Input.Search onChange={(e) => setSearch(e.target.value)} value={search} enterButton />
|
||||
</Space>
|
||||
|
||||
@@ -80,14 +80,14 @@ const ModelInfoToolTip = ({ metadata, cardSettings }) =>
|
||||
<Col span={24}>
|
||||
<EllipsesToolTip
|
||||
title={
|
||||
metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc
|
||||
? `${metadata.v_model_yr || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc || metadata.v_color
|
||||
? `${metadata.v_model_yr || ""} ${metadata.v_color || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
: null
|
||||
}
|
||||
kiosk={cardSettings.kiosk}
|
||||
>
|
||||
{metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc ? (
|
||||
`${metadata.v_model_yr || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
{metadata.v_model_yr || metadata.v_make_desc || metadata.v_model_desc || metadata.v_color ? (
|
||||
`${metadata.v_model_yr || ""} ${metadata.v_color || ""} ${metadata.v_make_desc || ""} ${metadata.v_model_desc || ""}`
|
||||
) : (
|
||||
<span> </span>
|
||||
)}
|
||||
@@ -431,6 +431,7 @@ export default function ProductionBoardCard({ technician, card, bodyshop, cardSe
|
||||
<Card
|
||||
className={`react-trello-card ${cardSettings.kiosk ? "kiosk-mode" : ""}`}
|
||||
size="small"
|
||||
styles={{ header: { backgroundColor: "var(--card-bg-fallback)" } }}
|
||||
style={{
|
||||
backgroundColor: cardSettings?.cardcolor
|
||||
? bgColor.fallback || `rgba(${bgColor.r},${bgColor.g},${bgColor.b},${bgColor.a || 1})`
|
||||
|
||||
@@ -28,11 +28,14 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const calculateTotal = (items, key, subKey) => {
|
||||
return items.reduce((acc, item) => acc + (item[key]?.aggregate?.sum?.[subKey] || 0), 0);
|
||||
return items.reduce((acc, item) => acc + (item?.[key]?.aggregate?.sum?.[subKey] ?? 0), 0);
|
||||
};
|
||||
|
||||
const calculateTotalAmount = (items, key) => {
|
||||
return items.reduce((acc, item) => acc.add(Dinero(item[key]?.totals?.subtotal ?? Dinero())), Dinero({ amount: 0 }));
|
||||
return items.reduce(
|
||||
(acc, item) => acc.add(Dinero(item?.[key]?.totals?.subtotal ?? Dinero())),
|
||||
Dinero({ amount: 0 })
|
||||
);
|
||||
};
|
||||
|
||||
const calculateReducerTotalAmount = (lanes, key) => {
|
||||
@@ -67,58 +70,83 @@ const ProductionStatistics = ({ data, cardSettings, reducerData }) => {
|
||||
return value;
|
||||
};
|
||||
|
||||
const filteredData = cardSettings.excludeSuspended === true ? data.filter((item) => item.suspended !== true) : data;
|
||||
const filteredReducerData =
|
||||
cardSettings.excludeSuspended === true
|
||||
? {
|
||||
...reducerData,
|
||||
lanes: reducerData.lanes.map((lane) => ({
|
||||
...lane,
|
||||
cards: lane.cards.filter((card) => card.metadata.suspended !== true)
|
||||
}))
|
||||
}
|
||||
: reducerData;
|
||||
|
||||
const totalHrs = cardSettings.totalHrs
|
||||
? parseFloat((calculateTotal(data, "labhrs", "mod_lb_hrs") + calculateTotal(data, "larhrs", "mod_lb_hrs")).toFixed(2))
|
||||
? parseFloat(
|
||||
(
|
||||
calculateTotal(filteredData, "labhrs", "mod_lb_hrs") + calculateTotal(filteredData, "larhrs", "mod_lb_hrs")
|
||||
).toFixed(2)
|
||||
)
|
||||
: null;
|
||||
|
||||
const totalLAB = cardSettings.totalLAB
|
||||
? parseFloat(calculateTotal(data, "labhrs", "mod_lb_hrs").toFixed(2))
|
||||
? parseFloat(calculateTotal(filteredData, "labhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
|
||||
const totalLAR = cardSettings.totalLAR
|
||||
? parseFloat(calculateTotal(data, "larhrs", "mod_lb_hrs").toFixed(2))
|
||||
? parseFloat(calculateTotal(filteredData, "larhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
|
||||
const jobsInProduction = cardSettings.jobsInProduction ? data.length : null;
|
||||
const jobsInProduction = cardSettings.jobsInProduction ? filteredData.length : null;
|
||||
|
||||
const totalAmountInProduction = cardSettings.totalAmountInProduction
|
||||
? calculateTotalAmount(data, "job_totals").toFormat("$0,0.00")
|
||||
? calculateTotalAmount(filteredData, "job_totals").toFormat("$0,0.00")
|
||||
: null;
|
||||
|
||||
const totalAmountOnBoard = reducerData && cardSettings.totalAmountOnBoard
|
||||
? calculateReducerTotalAmount(reducerData.lanes, "job_totals").toFormat("$0,0.00")
|
||||
: null;
|
||||
const totalAmountOnBoard =
|
||||
filteredReducerData && cardSettings.totalAmountOnBoard
|
||||
? calculateReducerTotalAmount(filteredReducerData.lanes, "job_totals").toFormat("$0,0.00")
|
||||
: null;
|
||||
|
||||
const totalHrsOnBoard = reducerData && cardSettings.totalHrsOnBoard
|
||||
? parseFloat((
|
||||
calculateReducerTotal(reducerData.lanes, "labhrs", "mod_lb_hrs") +
|
||||
calculateReducerTotal(reducerData.lanes, "larhrs", "mod_lb_hrs")
|
||||
).toFixed(2))
|
||||
: null;
|
||||
const totalHrsOnBoard =
|
||||
filteredReducerData && cardSettings.totalHrsOnBoard
|
||||
? parseFloat(
|
||||
(
|
||||
calculateReducerTotal(filteredReducerData.lanes, "labhrs", "mod_lb_hrs") +
|
||||
calculateReducerTotal(filteredReducerData.lanes, "larhrs", "mod_lb_hrs")
|
||||
).toFixed(2)
|
||||
)
|
||||
: null;
|
||||
|
||||
const totalLABOnBoard = reducerData && cardSettings.totalLABOnBoard
|
||||
? parseFloat(calculateReducerTotal(reducerData.lanes, "labhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
const totalLABOnBoard =
|
||||
filteredReducerData && cardSettings.totalLABOnBoard
|
||||
? parseFloat(calculateReducerTotal(filteredReducerData.lanes, "labhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
|
||||
const totalLAROnBoard = reducerData && cardSettings.totalLAROnBoard
|
||||
? parseFloat(calculateReducerTotal(reducerData.lanes, "larhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
const totalLAROnBoard =
|
||||
filteredReducerData && cardSettings.totalLAROnBoard
|
||||
? parseFloat(calculateReducerTotal(filteredReducerData.lanes, "larhrs", "mod_lb_hrs").toFixed(2))
|
||||
: null;
|
||||
|
||||
const jobsOnBoard = reducerData && cardSettings.jobsOnBoard
|
||||
? reducerData.lanes.reduce((acc, lane) => acc + lane.cards.length, 0)
|
||||
: null;
|
||||
const jobsOnBoard =
|
||||
filteredReducerData && cardSettings.jobsOnBoard
|
||||
? filteredReducerData.lanes.reduce((acc, lane) => acc + lane.cards.length, 0)
|
||||
: null;
|
||||
|
||||
const tasksInProduction = cardSettings.tasksInProduction
|
||||
? data.reduce((acc, item) => acc + (item.tasks_aggregate?.aggregate?.count || 0), 0)
|
||||
? filteredData.reduce((acc, item) => acc + (item.tasks_aggregate?.aggregate?.count || 0), 0)
|
||||
: null;
|
||||
|
||||
const tasksOnBoard = reducerData && cardSettings.tasksOnBoard
|
||||
? reducerData.lanes.reduce((acc, lane) => {
|
||||
return (
|
||||
acc + lane.cards.reduce((laneAcc, card) => laneAcc + (card.metadata.tasks_aggregate?.aggregate?.count || 0), 0)
|
||||
);
|
||||
}, 0)
|
||||
: null;
|
||||
const tasksOnBoard =
|
||||
filteredReducerData && cardSettings.tasksOnBoard
|
||||
? filteredReducerData.lanes.reduce((acc, lane) => {
|
||||
return (
|
||||
acc +
|
||||
lane.cards.reduce((laneAcc, card) => laneAcc + (card.metadata.tasks_aggregate?.aggregate?.count || 0), 0)
|
||||
);
|
||||
}, 0)
|
||||
: null;
|
||||
|
||||
const statistics = mergeStatistics(statisticsItems, [
|
||||
{ id: 0, value: totalHrs, type: StatisticType.HOURS },
|
||||
|
||||
@@ -14,7 +14,16 @@ const StatisticsSettings = ({ t, statisticsOrder, setStatisticsOrder, setHasChan
|
||||
};
|
||||
|
||||
return (
|
||||
<Card title={t("production.settings.statistics_title")}>
|
||||
<Card
|
||||
title={t("production.settings.statistics_title")}
|
||||
extra={
|
||||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<Form.Item name="excludeSuspended" valuePropName="checked" style={{ marginBottom: 0 }}>
|
||||
<Checkbox>{t("production.settings.statistics.exclude_suspended")}</Checkbox>
|
||||
</Form.Item>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<DragDropContext onDragEnd={onDragEnd}>
|
||||
<Droppable direction="grid" droppableId="statistics">
|
||||
{(provided) => (
|
||||
|
||||
@@ -91,7 +91,8 @@ const defaultKanbanSettings = {
|
||||
subtotal: false,
|
||||
statisticsOrder: statisticsItems.map((item) => item.id),
|
||||
selectedMdInsCos: [],
|
||||
selectedEstimators: []
|
||||
selectedEstimators: [],
|
||||
excludeSuspended: false
|
||||
};
|
||||
|
||||
const defaultFilters = { search: "", employeeId: null, alert: false };
|
||||
|
||||
@@ -140,13 +140,11 @@ const productionListColumnsData = ({ technician, state, activeStatuses, data, bo
|
||||
sortOrder: state.sortedInfo.columnKey === "vehicle" && state.sortedInfo.order,
|
||||
render: (text, record) =>
|
||||
technician ? (
|
||||
<>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} ${
|
||||
record.v_color || ""
|
||||
} ${record.plate_no || ""}`}</>
|
||||
<>{`${record.v_model_yr || ""} ${record.v_color || ""}${record.v_make_desc || ""} ${record.v_model_desc || ""} ${record.plate_no || ""}`}</>
|
||||
) : (
|
||||
<Link to={`/manage/vehicles/${record.vehicleid}`}>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
} ${record.v_color || ""} ${record.plate_no || ""}`}</Link>
|
||||
<Link
|
||||
to={`/manage/vehicles/${record.vehicleid}`}
|
||||
>{`${record.v_model_yr || ""} ${record.v_color || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} ${record.plate_no || ""}`}</Link>
|
||||
)
|
||||
},
|
||||
{
|
||||
@@ -621,7 +619,7 @@ const productionListColumnsData = ({ technician, state, activeStatuses, data, bo
|
||||
sortOrder: state.sortedInfo.columnKey === "dms_id" && state.sortedInfo.order
|
||||
}
|
||||
]
|
||||
: []),
|
||||
: [])
|
||||
];
|
||||
};
|
||||
export default productionListColumnsData;
|
||||
|
||||
@@ -12,6 +12,7 @@ import { QUERY_ALL_VENDORS } from "../../graphql/vendors.queries";
|
||||
import { selectReportCenter } from "../../redux/modals/modals.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import DatePickerRanges from "../../utils/DatePickerRanges";
|
||||
import { DMS_MAP, getDmsMode } from "../../utils/dmsUtils";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import dayjs from "../../utils/day";
|
||||
@@ -48,12 +49,18 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
const Templates = TemplateList("report_center");
|
||||
const dmsMode = getDmsMode(bodyshop, "off");
|
||||
const isReynoldsMode = dmsMode === DMS_MAP.reynolds;
|
||||
const ReportsList = Object.keys(Templates)
|
||||
.map((key) => Templates[key])
|
||||
.filter((temp) => {
|
||||
const enhancedPayrollOn = Enhanced_Payroll.treatment === "on";
|
||||
const adpPayrollOn = ADPPayroll.treatment === "on";
|
||||
|
||||
if (isReynoldsMode && temp.excludedDmsModes?.includes(dmsMode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (enhancedPayrollOn && adpPayrollOn) {
|
||||
return temp.enhanced_payroll !== false || temp.adp_payroll !== false;
|
||||
}
|
||||
@@ -408,6 +415,6 @@ const restrictedReports = [
|
||||
{ key: "job_costing_ro_estimator", days: 183 },
|
||||
{ key: "job_lifecycle_date_detail", days: 183 },
|
||||
{ key: "job_lifecycle_date_summary", days: 183 },
|
||||
{ key: "customer_list", days: 183 },
|
||||
{ key: "customer_list_excel", days: 183 }
|
||||
{ key: "customer_list", days: 736 },
|
||||
{ key: "customer_list_excel", days: 736 }
|
||||
];
|
||||
|
||||
@@ -48,7 +48,7 @@ export function ScheduleVerifyIntegrity({ currentUser }) {
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (currentUser.email === "patrick@imex.prod")
|
||||
if (currentUser.email === "allan@imex.prod" || currentUser.email === "dave@imex.prod")
|
||||
return (
|
||||
<Button loading={loading} onClick={handleVerify}>
|
||||
Developer Use Only - Verify Schedule Integrity
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
|
||||
import { Button, Card, Col, Form, Input, InputNumber, Row, Select, Space, Switch } from "antd";
|
||||
import ResponsiveTable from "../responsive-table/responsive-table.component";
|
||||
import queryString from "query-string";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
@@ -52,6 +52,7 @@ const mapDispatchToProps = () => ({
|
||||
});
|
||||
|
||||
export function ShopEmployeesFormComponent({ bodyshop, form, onDirtyChange, isDirty }) {
|
||||
const submitActionRef = useRef("save");
|
||||
const { t } = useTranslation();
|
||||
const [internalIsDirty, setInternalIsDirty] = useState(false);
|
||||
const resolvedIsDirty = typeof isDirty === "boolean" ? isDirty : internalIsDirty;
|
||||
@@ -128,55 +129,117 @@ export function ShopEmployeesFormComponent({ bodyshop, form, onDirtyChange, isDi
|
||||
});
|
||||
}, [clearEmployeeFormMeta, currentEmployeeData, form]);
|
||||
|
||||
const syncEmployeeFormToSavedData = useCallback(
|
||||
(employeeData) => {
|
||||
if (employeeData) {
|
||||
form.setFieldsValue(employeeData);
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
clearEmployeeFormMeta();
|
||||
});
|
||||
},
|
||||
[clearEmployeeFormMeta, form]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
resetEmployeeFormToCurrentData();
|
||||
}, [resetEmployeeFormToCurrentData, search.employeeId]);
|
||||
|
||||
const [updateEmployee] = useMutation(UPDATE_EMPLOYEE);
|
||||
const [insertEmployees] = useMutation(INSERT_EMPLOYEES);
|
||||
const saveAndResetSubmitAction = useCallback(() => {
|
||||
const submitAction = submitActionRef.current;
|
||||
submitActionRef.current = "save";
|
||||
return submitAction;
|
||||
}, []);
|
||||
const submitEmployeeForm = useCallback(
|
||||
(submitAction = "save") => {
|
||||
submitActionRef.current = submitAction;
|
||||
form.submit();
|
||||
},
|
||||
[form]
|
||||
);
|
||||
const navigateToEmployee = useCallback(
|
||||
(employeeId) => {
|
||||
history({
|
||||
search: queryString.stringify({
|
||||
...search,
|
||||
employeeId
|
||||
})
|
||||
});
|
||||
},
|
||||
[history, search]
|
||||
);
|
||||
|
||||
const handleFinish = async (values) => {
|
||||
const submitAction = saveAndResetSubmitAction();
|
||||
const normalizedValues = {
|
||||
...values,
|
||||
user_email: values.user_email === "" ? null : values.user_email
|
||||
};
|
||||
|
||||
const handleFinish = (values) => {
|
||||
if (search.employeeId && search.employeeId !== "new") {
|
||||
//Update a record.
|
||||
logImEXEvent("shop_employee_update");
|
||||
|
||||
updateEmployee({
|
||||
variables: {
|
||||
id: search.employeeId,
|
||||
employee: {
|
||||
...values,
|
||||
user_email: values.user_email === "" ? null : values.user_email
|
||||
try {
|
||||
const result = await updateEmployee({
|
||||
variables: {
|
||||
id: search.employeeId,
|
||||
employee: normalizedValues
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
updateDirtyState(false);
|
||||
void refetch();
|
||||
notification.success({
|
||||
title: t("employees.successes.save")
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
notification.error({
|
||||
title: t("employees.errors.save", {
|
||||
message: JSON.stringify(error)
|
||||
})
|
||||
});
|
||||
});
|
||||
} else {
|
||||
//New record, insert it.
|
||||
logImEXEvent("shop_employee_insert");
|
||||
|
||||
insertEmployees({
|
||||
variables: { employees: [{ ...values, shopid: bodyshop.id }] },
|
||||
refetchQueries: ["QUERY_EMPLOYEES"]
|
||||
}).then((r) => {
|
||||
updateDirtyState(false);
|
||||
search.employeeId = r.data.insert_employees.returning[0].id;
|
||||
history({ search: queryString.stringify(search) });
|
||||
syncEmployeeFormToSavedData(result?.data?.update_employees?.returning?.[0] ?? normalizedValues);
|
||||
void refetch();
|
||||
if (submitAction === "saveAndNew") {
|
||||
navigateToEmployee("new");
|
||||
}
|
||||
notification.success({
|
||||
title: t("employees.successes.save")
|
||||
});
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
title: t("employees.errors.save", {
|
||||
message: JSON.stringify(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//New record, insert it.
|
||||
logImEXEvent("shop_employee_insert");
|
||||
|
||||
try {
|
||||
const result = await insertEmployees({
|
||||
variables: { employees: [{ ...normalizedValues, shopid: bodyshop.id }] },
|
||||
refetchQueries: ["QUERY_EMPLOYEES"]
|
||||
});
|
||||
const savedEmployee = result?.data?.insert_employees?.returning?.[0];
|
||||
|
||||
if (submitAction === "saveAndNew") {
|
||||
if (isNewEmployee) {
|
||||
resetEmployeeFormToCurrentData();
|
||||
}
|
||||
navigateToEmployee("new");
|
||||
} else if (savedEmployee?.id) {
|
||||
syncEmployeeFormToSavedData(savedEmployee ?? normalizedValues);
|
||||
navigateToEmployee(savedEmployee.id);
|
||||
} else {
|
||||
syncEmployeeFormToSavedData(savedEmployee ?? normalizedValues);
|
||||
}
|
||||
|
||||
notification.success({
|
||||
title: t("employees.successes.save")
|
||||
});
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
title: t("employees.errors.save", {
|
||||
message: JSON.stringify(error)
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -240,13 +303,24 @@ export function ShopEmployeesFormComponent({ bodyshop, form, onDirtyChange, isDi
|
||||
<Card
|
||||
title={employeeCardTitle}
|
||||
extra={
|
||||
<Button type="primary" onClick={() => form.submit()} disabled={!resolvedIsDirty} style={{ minWidth: 170 }}>
|
||||
{t("employees.actions.save_employee")}
|
||||
</Button>
|
||||
<Space wrap>
|
||||
<Button onClick={() => submitEmployeeForm("saveAndNew")} disabled={!resolvedIsDirty} style={{ minWidth: 170 }}>
|
||||
{t("general.actions.saveandnew") || "Save and New"}
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => submitEmployeeForm("save")}
|
||||
disabled={!resolvedIsDirty}
|
||||
style={{ minWidth: 170 }}
|
||||
>
|
||||
{t("employees.actions.save_employee")}
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
onFinishFailed={saveAndResetSubmitAction}
|
||||
autoComplete={"off"}
|
||||
layout="vertical"
|
||||
form={form}
|
||||
|
||||
@@ -0,0 +1,359 @@
|
||||
import { useApolloClient } from "@apollo/client/react";
|
||||
import { Form } from "antd";
|
||||
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||
import { useEffect } from "react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
DELETE_VACATION,
|
||||
INSERT_EMPLOYEES,
|
||||
QUERY_EMPLOYEE_BY_ID,
|
||||
UPDATE_EMPLOYEE
|
||||
} from "../../graphql/employees.queries";
|
||||
import { ShopEmployeesFormComponent } from "./shop-employees-form.component.jsx";
|
||||
|
||||
const insertEmployeesMock = vi.fn();
|
||||
const updateEmployeeMock = vi.fn();
|
||||
const deleteVacationMock = vi.fn();
|
||||
const useQueryMock = vi.fn();
|
||||
const useMutationMock = vi.fn();
|
||||
const navigateMock = vi.fn();
|
||||
const notification = {
|
||||
error: vi.fn(),
|
||||
success: vi.fn()
|
||||
};
|
||||
|
||||
vi.mock("@apollo/client/react", async () => {
|
||||
const actual = await vi.importActual("@apollo/client/react");
|
||||
|
||||
return {
|
||||
...actual,
|
||||
useApolloClient: vi.fn(),
|
||||
useQuery: (...args) => useQueryMock(...args),
|
||||
useMutation: (...args) => useMutationMock(...args)
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("@splitsoftware/splitio-react", () => ({
|
||||
useTreatmentsWithConfig: () => ({
|
||||
treatments: {
|
||||
Enhanced_Payroll: {
|
||||
treatment: "off"
|
||||
}
|
||||
}
|
||||
})
|
||||
}));
|
||||
|
||||
vi.mock("react-router-dom", () => ({
|
||||
useLocation: () => ({
|
||||
search: "?employeeId=new"
|
||||
}),
|
||||
useNavigate: () => navigateMock
|
||||
}));
|
||||
|
||||
vi.mock("react-i18next", () => ({
|
||||
useTranslation: () => ({
|
||||
t: (key, values = {}) => {
|
||||
const translations = {
|
||||
"bodyshop.labels.employee_options": "Employee Options",
|
||||
"bodyshop.labels.employee_rates": "Employee Rates",
|
||||
"bodyshop.labels.employee_vacation": "Employee Vacation",
|
||||
"bodyshop.labels.employees": "Employees",
|
||||
"employees.actions.addrate": "Add Rate",
|
||||
"employees.actions.addvacation": "Add Vacation",
|
||||
"employees.actions.new": "New Employee",
|
||||
"employees.actions.save_employee": "Save Employee",
|
||||
"employees.fields.active": "Active",
|
||||
"employees.fields.employee_number": "Employee Number",
|
||||
"employees.fields.external_id": "External Id",
|
||||
"employees.fields.first_name": "First Name",
|
||||
"employees.fields.flat_rate": "Flat Rate",
|
||||
"employees.fields.hire_date": "Hire Date",
|
||||
"employees.fields.last_name": "Last Name",
|
||||
"employees.fields.pin": "PIN",
|
||||
"employees.fields.rate": "Rate",
|
||||
"employees.fields.termination_date": "Termination Date",
|
||||
"employees.fields.user_email": "User Email",
|
||||
"employees.labels.active": "Active",
|
||||
"employees.successes.save": "Saved",
|
||||
"general.actions.saveandnew": "Save and New",
|
||||
"general.labels.actions": "Actions"
|
||||
};
|
||||
|
||||
if (key === "employees.errors.save") {
|
||||
return `Save failed: ${values.message ?? ""}`;
|
||||
}
|
||||
|
||||
if (key === "employees.validation.unique_employee_number") {
|
||||
return "Employee number must be unique";
|
||||
}
|
||||
|
||||
if (key === "bodyshop.validation.useremailmustexist") {
|
||||
return "User email must exist";
|
||||
}
|
||||
|
||||
return translations[key] || key;
|
||||
}
|
||||
})
|
||||
}));
|
||||
|
||||
vi.mock("../../contexts/Notifications/notificationContext.jsx", () => ({
|
||||
useNotification: () => notification
|
||||
}));
|
||||
|
||||
vi.mock("../../firebase/firebase.utils", () => ({
|
||||
logImEXEvent: vi.fn()
|
||||
}));
|
||||
|
||||
vi.mock("../alert/alert.component", () => ({
|
||||
default: ({ title }) => <div>{title}</div>
|
||||
}));
|
||||
|
||||
vi.mock("../form-fields-changed-alert/form-fields-changed-alert.component.jsx", () => ({
|
||||
default: () => null
|
||||
}));
|
||||
|
||||
vi.mock("../form-date-time-picker/form-date-time-picker.component.jsx", () => ({
|
||||
default: ({ id, value, onChange }) => (
|
||||
<input id={id} type="text" value={value ?? ""} onChange={(event) => onChange?.(event.target.value)} />
|
||||
)
|
||||
}));
|
||||
|
||||
vi.mock("../form-items-formatted/email-form-item.component.jsx", () => ({
|
||||
default: ({ id, value, onChange }) => (
|
||||
<input id={id} type="email" value={value ?? ""} onChange={(event) => onChange?.(event.target.value)} />
|
||||
)
|
||||
}));
|
||||
|
||||
vi.mock("../layout-form-row/layout-form-row.component", () => ({
|
||||
default: ({ title, extra, actions, children }) => (
|
||||
<div>
|
||||
{title}
|
||||
{extra}
|
||||
{children}
|
||||
{actions}
|
||||
</div>
|
||||
)
|
||||
}));
|
||||
|
||||
vi.mock("../layout-form-row/inline-validated-form-row.component.jsx", () => ({
|
||||
default: ({ title, extra, children }) => (
|
||||
<div>
|
||||
{title}
|
||||
{extra}
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}));
|
||||
|
||||
vi.mock("../layout-form-row/config-list-empty-state.component.jsx", () => ({
|
||||
default: ({ actionLabel }) => <div>{actionLabel}</div>
|
||||
}));
|
||||
|
||||
vi.mock("../form-list-move-arrows/form-list-move-arrows.component", () => ({
|
||||
default: () => null
|
||||
}));
|
||||
|
||||
vi.mock("../responsive-table/responsive-table.component", () => ({
|
||||
default: () => null
|
||||
}));
|
||||
|
||||
vi.mock("./shop-employees-add-vacation.component", () => ({
|
||||
default: () => null
|
||||
}));
|
||||
|
||||
vi.mock("../../utils/Ciecaselect", () => ({
|
||||
default: () => []
|
||||
}));
|
||||
|
||||
const bodyshop = {
|
||||
id: "shop-1",
|
||||
imexshopid: "split-shop-1",
|
||||
md_responsibility_centers: {
|
||||
costs: []
|
||||
}
|
||||
};
|
||||
|
||||
describe("ShopEmployeesFormComponent", () => {
|
||||
let formInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
useQueryMock.mockImplementation((query) => {
|
||||
if (query === QUERY_EMPLOYEE_BY_ID) {
|
||||
return {
|
||||
error: null,
|
||||
data: null,
|
||||
refetch: vi.fn(),
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
error: null,
|
||||
data: null,
|
||||
loading: false
|
||||
};
|
||||
});
|
||||
|
||||
useMutationMock.mockImplementation((mutation) => {
|
||||
if (mutation === INSERT_EMPLOYEES) return [insertEmployeesMock];
|
||||
if (mutation === UPDATE_EMPLOYEE) return [updateEmployeeMock];
|
||||
if (mutation === DELETE_VACATION) return [deleteVacationMock];
|
||||
return [vi.fn()];
|
||||
});
|
||||
|
||||
useApolloClient.mockReturnValue({
|
||||
query: vi.fn().mockResolvedValue({
|
||||
data: {
|
||||
employees_aggregate: {
|
||||
aggregate: {
|
||||
count: 0
|
||||
},
|
||||
nodes: []
|
||||
},
|
||||
users: []
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
insertEmployeesMock.mockResolvedValue({
|
||||
data: {
|
||||
insert_employees: {
|
||||
returning: [
|
||||
{
|
||||
id: "employee-123",
|
||||
first_name: "Jamie",
|
||||
last_name: "Rivera",
|
||||
employee_number: "42",
|
||||
active: true,
|
||||
termination_date: null,
|
||||
hire_date: "2026-04-20",
|
||||
flat_rate: false,
|
||||
rates: [],
|
||||
pin: "1234",
|
||||
user_email: null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function TestHarness({ onFormReady }) {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
useEffect(() => {
|
||||
onFormReady(form);
|
||||
}, [form, onFormReady]);
|
||||
|
||||
return <ShopEmployeesFormComponent bodyshop={bodyshop} form={form} />;
|
||||
}
|
||||
|
||||
render(
|
||||
<TestHarness
|
||||
onFormReady={(form) => {
|
||||
formInstance = form;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
it("marks a new employee form clean after save", async () => {
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "First Name" }), {
|
||||
target: { value: "Jamie" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Last Name" }), {
|
||||
target: { value: "Rivera" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Employee Number" }), {
|
||||
target: { value: "42" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "PIN" }), {
|
||||
target: { value: "1234" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Hire Date" }), {
|
||||
target: { value: "2026-04-20" }
|
||||
});
|
||||
|
||||
const saveButton = screen.getByRole("button", { name: "Save Employee" });
|
||||
|
||||
await waitFor(() => {
|
||||
expect(saveButton.disabled).toBe(false);
|
||||
});
|
||||
|
||||
fireEvent.click(saveButton);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(insertEmployeesMock).toHaveBeenCalledWith({
|
||||
variables: {
|
||||
employees: [
|
||||
expect.objectContaining({
|
||||
first_name: "Jamie",
|
||||
last_name: "Rivera",
|
||||
employee_number: "42",
|
||||
pin: "1234",
|
||||
hire_date: "2026-04-20",
|
||||
shopid: "shop-1"
|
||||
})
|
||||
]
|
||||
},
|
||||
refetchQueries: ["QUERY_EMPLOYEES"]
|
||||
});
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(formInstance.isFieldsTouched()).toBe(false);
|
||||
});
|
||||
|
||||
expect(notification.success).toHaveBeenCalledWith({
|
||||
title: "Saved"
|
||||
});
|
||||
expect(navigateMock).toHaveBeenCalledWith({
|
||||
search: "employeeId=employee-123"
|
||||
});
|
||||
});
|
||||
|
||||
it("saves a new employee and opens a fresh employee form when save and new is clicked", async () => {
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "First Name" }), {
|
||||
target: { value: "Jamie" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Last Name" }), {
|
||||
target: { value: "Rivera" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Employee Number" }), {
|
||||
target: { value: "42" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "PIN" }), {
|
||||
target: { value: "1234" }
|
||||
});
|
||||
fireEvent.change(screen.getByRole("textbox", { name: "Hire Date" }), {
|
||||
target: { value: "2026-04-20" }
|
||||
});
|
||||
|
||||
fireEvent.click(screen.getByRole("button", { name: "Save and New" }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(insertEmployeesMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(formInstance.isFieldsTouched()).toBe(false);
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByRole("textbox", { name: "First Name" })).toHaveValue("");
|
||||
expect(screen.getByRole("textbox", { name: "Last Name" })).toHaveValue("");
|
||||
expect(screen.getByRole("textbox", { name: "Employee Number" })).toHaveValue("");
|
||||
expect(screen.getByRole("textbox", { name: "PIN" })).toHaveValue("");
|
||||
expect(screen.getByRole("textbox", { name: "Hire Date" })).toHaveValue("");
|
||||
});
|
||||
|
||||
expect(screen.getByText("New Employee")).toBeInTheDocument();
|
||||
expect(navigateMock).toHaveBeenCalledWith({
|
||||
search: "employeeId=new"
|
||||
});
|
||||
expect(notification.success).toHaveBeenCalledWith({
|
||||
title: "Saved"
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -12,6 +12,8 @@ import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.c
|
||||
import { buildSectionActionButton, renderListOrEmpty } from "../layout-form-row/config-list-actions.utils.jsx";
|
||||
import InlineValidatedFormRow from "../layout-form-row/inline-validated-form-row.component.jsx";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { bodyshopHasDmsKey, DMS_MAP, getDmsMode } from "../../utils/dmsUtils.js";
|
||||
import {
|
||||
INLINE_TITLE_GROUP_STYLE,
|
||||
INLINE_TITLE_HANDLE_STYLE,
|
||||
@@ -25,16 +27,21 @@ import {
|
||||
|
||||
const timeZonesList = Intl.supportedValuesOf("timeZone");
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
|
||||
|
||||
export function ShopInfoGeneral({ form }) {
|
||||
export function ShopInfoGeneral({ form, bodyshop }) {
|
||||
const { t } = useTranslation();
|
||||
const insuranceCompanies = Form.useWatch(["md_ins_cos"], form) || [];
|
||||
const duplicateInsuranceCompanyIndexes = getDuplicateIndexSetByNormalizedName(insuranceCompanies, "name");
|
||||
const hasDMSKey = bodyshop ? bodyshopHasDmsKey(bodyshop) : false;
|
||||
const dmsMode = bodyshop ? getDmsMode(bodyshop, "off") : "none";
|
||||
const isReynoldsMode = hasDMSKey && dmsMode === DMS_MAP.reynolds;
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -174,7 +181,9 @@ export function ShopInfoGeneral({ form }) {
|
||||
>
|
||||
<div aria-hidden style={INLINE_TITLE_SEPARATOR_STYLE} />
|
||||
<div style={INLINE_TITLE_SWITCH_GROUP_STYLE}>
|
||||
<div style={INLINE_TITLE_LABEL_STYLE}>{t("bodyshop.fields.scoreboard_setup.ignore_blocked_days")}</div>
|
||||
<div style={INLINE_TITLE_LABEL_STYLE}>
|
||||
{t("bodyshop.fields.scoreboard_setup.ignore_blocked_days")}
|
||||
</div>
|
||||
<Form.Item noStyle name={["scoreboard_target", "ignoreblockeddays"]} valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
@@ -311,7 +320,12 @@ export function ShopInfoGeneral({ form }) {
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item key="use_fippa" label={t("bodyshop.fields.use_fippa")} name={["use_fippa"]} valuePropName="checked">
|
||||
<Form.Item
|
||||
key="use_fippa"
|
||||
label={t("bodyshop.fields.use_fippa")}
|
||||
name={["use_fippa"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
@@ -478,7 +492,12 @@ export function ShopInfoGeneral({ form }) {
|
||||
<div style={INLINE_TITLE_LABEL_STYLE}>
|
||||
{t("bodyshop.fields.system_settings.job_costing.use_paint_scale_data")}
|
||||
</div>
|
||||
<Form.Item noStyle key="use_paint_scale_data" name={["use_paint_scale_data"]} valuePropName="checked">
|
||||
<Form.Item
|
||||
noStyle
|
||||
key="use_paint_scale_data"
|
||||
name={["use_paint_scale_data"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
</div>
|
||||
@@ -558,7 +577,12 @@ export function ShopInfoGeneral({ form }) {
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
|
||||
<LayoutFormRow header={t("bodyshop.labels.shop_enabled_features")} id="sharing" grow style={{ marginBottom: 0 }}>
|
||||
<LayoutFormRow
|
||||
header={t("bodyshop.labels.shop_enabled_features")}
|
||||
id="sharing"
|
||||
grow
|
||||
style={{ marginBottom: 0 }}
|
||||
>
|
||||
<Form.Item
|
||||
label={t("general.actions.sharetoteams")}
|
||||
valuePropName="checked"
|
||||
@@ -566,6 +590,16 @@ export function ShopInfoGeneral({ form }) {
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
{isReynoldsMode && (
|
||||
<Form.Item
|
||||
initialValue
|
||||
label={t("bodyshop.fields.md_functionality_toggles.enhanced_early_ros")}
|
||||
name={["md_functionality_toggles", "enhanced_early_ros"]}
|
||||
valuePropName="checked"
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
)}
|
||||
</LayoutFormRow>
|
||||
</div>
|
||||
</>
|
||||
@@ -1582,7 +1616,6 @@ export function ShopInfoGeneral({ form }) {
|
||||
form={form}
|
||||
errorNames={[["md_parts_order_comment", field.name, "label"]]}
|
||||
noDivider
|
||||
titleOnly
|
||||
title={
|
||||
<div style={INLINE_TITLE_ROW_STYLE}>
|
||||
<InlineTitleListIcon style={INLINE_TITLE_HANDLE_STYLE} />
|
||||
|
||||
@@ -157,36 +157,36 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
</Col>
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ClosingPeriod.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="ClosingPeriod"
|
||||
name={["accountingconfig", "ClosingPeriod"]}
|
||||
label={t("bodyshop.fields.closingperiod")}
|
||||
>
|
||||
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="ClosingPeriod"
|
||||
name={["accountingconfig", "ClosingPeriod"]}
|
||||
label={t("bodyshop.fields.closingperiod")}
|
||||
>
|
||||
<DatePicker.RangePicker format="MM/DD/YYYY" presets={DatePickerRanges} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ADPPayroll.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="companyCode"
|
||||
name={["accountingconfig", "companyCode"]}
|
||||
label={t("bodyshop.fields.companycode")}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item
|
||||
key="companyCode"
|
||||
name={["accountingconfig", "companyCode"]}
|
||||
label={t("bodyshop.fields.companycode")}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) &&
|
||||
ADPPayroll.treatment === "on" && (
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
<Form.Item key="batchID" name={["accountingconfig", "batchID"]} label={t("bodyshop.fields.batchid")}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
)}
|
||||
{HasFeatureAccess({ featureName: "export", bodyshop }) && !hasDMSKey && (
|
||||
<>
|
||||
<Col xs={24} sm={12} xl={8}>
|
||||
@@ -512,6 +512,15 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<InputNumber min={0} max={100} suffix="%" />
|
||||
</Form.Item>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.disablecontact")}
|
||||
valuePropName="checked"
|
||||
name={["cdk_configuration", "disablecontact"]}
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
)}
|
||||
{bodyshop.pbs_serialnumber && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.disablecontactvehiclecreation")}
|
||||
@@ -810,16 +819,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
>
|
||||
<Input onBlur={handleBlur} />
|
||||
</Form.Item>
|
||||
{!hasDMSKey && (
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.responsibilitycenter_accountitem")}
|
||||
key={`${index}accountitem`}
|
||||
name={[field.name, "accountitem"]}
|
||||
rules={[{ required: true }]}
|
||||
>
|
||||
<Input onBlur={handleBlur} />
|
||||
</Form.Item>
|
||||
)}
|
||||
{hasDMSKey && !bodyshop.rr_dealerid && (
|
||||
<>
|
||||
<Form.Item
|
||||
|
||||
@@ -2,7 +2,7 @@ import { PageHeader } from "@ant-design/pro-layout";
|
||||
import { useMutation, useQuery } from "@apollo/client/react";
|
||||
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
|
||||
import { Button, Form, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
@@ -15,21 +15,27 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import dayjs from "../../utils/day";
|
||||
import TimeTicketsCommitToggleComponent from "../time-tickets-commit-toggle/time-tickets-commit-toggle.component";
|
||||
import TimeTicketModalComponent from "./time-ticket-modal.component";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions.js";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import { buildTimeTicketAuditSummary } from "../../utils/auditTrailDetails.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
timeTicketModal: selectTimeTicket,
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("timeTicket"))
|
||||
toggleModalVisible: () => dispatch(toggleModalVisible("timeTicket")),
|
||||
insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type }))
|
||||
});
|
||||
|
||||
export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible, bodyshop }) {
|
||||
export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible, bodyshop, insertAuditTrail }) {
|
||||
const [form] = Form.useForm();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
const [enterAgain, setEnterAgain] = useState(false);
|
||||
|
||||
const lastSubmittedRef = useRef(null);
|
||||
|
||||
const [lineTicketRefreshKey, setLineTicketRefreshKey] = useState(0);
|
||||
|
||||
const [insertTicket] = useMutation(INSERT_NEW_TIME_TICKET);
|
||||
@@ -48,47 +54,77 @@ export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible,
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only"
|
||||
});
|
||||
const employees = EmployeeAutoCompleteData?.employees ?? [];
|
||||
|
||||
const handleFinish = (values) => {
|
||||
lastSubmittedRef.current = values;
|
||||
setLoading(true);
|
||||
const emps = EmployeeAutoCompleteData?.employees.filter((e) => e.id === values.employeeid);
|
||||
if (timeTicketModal.context.id) {
|
||||
updateTicket({
|
||||
variables: {
|
||||
timeticketId: timeTicketModal.context.id,
|
||||
timeticket: {
|
||||
...values,
|
||||
rate: emps.length === 1 ? emps[0].rates.filter((r) => r.cost_center === values.cost_center)[0]?.rate : null
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(handleMutationSuccess)
|
||||
.catch(handleMutationError);
|
||||
} else {
|
||||
//Get selected employee rate.
|
||||
insertTicket({
|
||||
variables: {
|
||||
timeTicketInput: [
|
||||
{
|
||||
const isEdit = Boolean(timeTicketModal.context.id);
|
||||
const emps = employees.filter((employee) => employee.id === values.employeeid);
|
||||
const mutation = isEdit
|
||||
? updateTicket({
|
||||
variables: {
|
||||
timeticketId: timeTicketModal.context.id,
|
||||
timeticket: {
|
||||
...values,
|
||||
rate:
|
||||
emps.length === 1 ? emps[0].rates.filter((r) => r.cost_center === values.cost_center)[0].rate : null,
|
||||
bodyshopid: bodyshop.id,
|
||||
created_by: timeTicketModal.context.created_by
|
||||
emps.length === 1 ? emps[0].rates.filter((r) => r.cost_center === values.cost_center)[0]?.rate : null
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
.then(handleMutationSuccess)
|
||||
.catch(handleMutationError);
|
||||
}
|
||||
}
|
||||
})
|
||||
: insertTicket({
|
||||
variables: {
|
||||
timeTicketInput: [
|
||||
{
|
||||
...values,
|
||||
rate:
|
||||
emps.length === 1 ? emps[0].rates.filter((r) => r.cost_center === values.cost_center)[0].rate : null,
|
||||
bodyshopid: bodyshop.id,
|
||||
created_by: timeTicketModal.context.created_by
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
mutation.then((result) => handleMutationSuccess(result, isEdit)).catch(handleMutationError);
|
||||
};
|
||||
|
||||
const handleMutationSuccess = () => {
|
||||
const handleMutationSuccess = (result, isEdit) => {
|
||||
notification.success({
|
||||
title: t("timetickets.successes.created")
|
||||
});
|
||||
|
||||
const savedTicket =
|
||||
result?.data?.update_timetickets?.returning?.[0] ?? result?.data?.insert_timetickets?.returning?.[0] ?? {};
|
||||
const originalTicket = timeTicketModal.context?.timeticket ?? {};
|
||||
const submittedValues = {
|
||||
...(lastSubmittedRef.current ?? {}),
|
||||
date: lastSubmittedRef.current?.date ?? savedTicket.date ?? originalTicket.date ?? null,
|
||||
employeeid: lastSubmittedRef.current?.employeeid ?? savedTicket.employeeid ?? originalTicket.employeeid ?? null,
|
||||
jobid:
|
||||
lastSubmittedRef.current?.jobid ??
|
||||
savedTicket.jobid ??
|
||||
timeTicketModal.context.jobId ??
|
||||
originalTicket.job?.id ??
|
||||
originalTicket.jobid ??
|
||||
null
|
||||
};
|
||||
const auditSummary = buildTimeTicketAuditSummary({
|
||||
originalTicket,
|
||||
submittedValues,
|
||||
employees
|
||||
});
|
||||
|
||||
if (auditSummary.jobid) {
|
||||
insertAuditTrail({
|
||||
jobid: auditSummary.jobid,
|
||||
operation: isEdit
|
||||
? AuditTrailMapping.timeticketupdated(auditSummary.employeeName, auditSummary.date, auditSummary.details)
|
||||
: AuditTrailMapping.timeticketcreated(auditSummary.employeeName, auditSummary.date, auditSummary.details),
|
||||
type: isEdit ? "timeticketupdated" : "timeticketcreated"
|
||||
});
|
||||
}
|
||||
|
||||
// Refresh parent screens (Job Labor tab, etc.)
|
||||
if (timeTicketModal.actions.refetch) timeTicketModal.actions.refetch();
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ import ResponsiveTable from "../responsive-table/responsive-table.component";
|
||||
|
||||
export default function VehiclesListComponent({ loading, vehicles, total, refetch, basePath = "/manage" }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const {
|
||||
page
|
||||
//sortcolumn, sortorder,
|
||||
} = search;
|
||||
const { page, pageSize } = search;
|
||||
const history = useNavigate();
|
||||
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
|
||||
const [state, setState] = useState({
|
||||
sortedInfo: {},
|
||||
filteredInfo: { text: "" }
|
||||
@@ -43,9 +44,7 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
key: "description",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||
record.v_model_desc || ""
|
||||
} ${record.v_color || ""}`}</span>
|
||||
<span>{`${record.v_model_yr || ""} ${record.v_color || ""} ${record.v_make_desc || ""} ${record.v_model_desc || ""} `}</span>
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -62,10 +61,14 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
];
|
||||
|
||||
const handleTableChange = (pagination, filters, sorter) => {
|
||||
const nextPageSize = pagination?.pageSize || currentPageSize;
|
||||
const pageSizeChanged = nextPageSize !== currentPageSize;
|
||||
|
||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||
const updatedSearch = {
|
||||
...search,
|
||||
page: pagination.current,
|
||||
pageSize: nextPageSize,
|
||||
page: pageSizeChanged ? 1 : pagination.current,
|
||||
sortcolumn: sorter.columnKey,
|
||||
sortorder: sorter.order
|
||||
};
|
||||
@@ -106,7 +109,13 @@ export default function VehiclesListComponent({ loading, vehicles, total, refetc
|
||||
>
|
||||
<ResponsiveTable
|
||||
loading={loading}
|
||||
pagination={{ placement: "top", pageSize: pageLimit, current: parseInt(page || 1), total: total }}
|
||||
pagination={{
|
||||
placement: "top",
|
||||
pageSize: currentPageSize,
|
||||
current: currentPage,
|
||||
showSizeChanger: true,
|
||||
total: total
|
||||
}}
|
||||
columns={columns}
|
||||
mobileColumnKeys={["v_vin", "description", "plate_no"]}
|
||||
rowKey="id"
|
||||
|
||||
@@ -16,14 +16,18 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
export function VehiclesListContainer({ isPartsEntry }) {
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const { page, sortcolumn, sortorder, search, pageSize } = searchParams;
|
||||
const basePath = getPartsBasePath(isPartsEntry);
|
||||
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_VEHICLES_PAGINATED, {
|
||||
variables: {
|
||||
search: search || "",
|
||||
offset: page ? (page - 1) * pageLimit : 0,
|
||||
limit: pageLimit,
|
||||
offset: (currentPage - 1) * currentPageSize,
|
||||
limit: currentPageSize,
|
||||
order: [
|
||||
{
|
||||
[sortcolumn || "created_at"]: sortorder ? (sortorder === "descend" ? "desc" : "asc") : "desc"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getAnalytics, logEvent } from "@firebase/analytics";
|
||||
//import { getAnalytics, logEvent } from "@firebase/analytics";
|
||||
import { initializeApp } from "@firebase/app";
|
||||
import { getAuth, updatePassword, updateProfile } from "@firebase/auth";
|
||||
import { getFirestore } from "@firebase/firestore";
|
||||
import { getMessaging, getToken, onMessage } from "@firebase/messaging";
|
||||
import { store } from "../redux/store";
|
||||
//import { store } from "../redux/store";
|
||||
//import * as amplitude from '@amplitude/analytics-browser';
|
||||
// import posthog from 'posthog-js'
|
||||
|
||||
@@ -12,7 +12,7 @@ initializeApp(config);
|
||||
|
||||
export const auth = getAuth();
|
||||
export const firestore = getFirestore();
|
||||
export const analytics = getAnalytics();
|
||||
//export const analytics = getAnalytics();
|
||||
|
||||
//export default firebase;
|
||||
export const getCurrentUser = () => {
|
||||
@@ -72,34 +72,36 @@ onMessage(messaging, (payload) => {
|
||||
// ...
|
||||
});
|
||||
|
||||
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||
try {
|
||||
const state = stateProp || store.getState();
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
export const logImEXEvent = (eventName, additionalParams, _stateProp = null) => {
|
||||
// Disabled as a part of IO-3712.
|
||||
// try {
|
||||
// const state = stateProp || store.getState();
|
||||
|
||||
const eventParams = {
|
||||
shop: (state.user && state.user.bodyshop && state.user.bodyshop.shopname) || null,
|
||||
user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
partsManagementOnly: state?.user?.partsManagementOnly,
|
||||
...additionalParams
|
||||
};
|
||||
// axios.post("/ioevent", {
|
||||
// useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
||||
// operationName: eventName,
|
||||
// variables: additionalParams,
|
||||
// dbevent: false,
|
||||
// env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
||||
// });
|
||||
// console.log(
|
||||
// "%c[Analytics]",
|
||||
// "background-color: green ;font-weight:bold;",
|
||||
// eventName,
|
||||
// eventParams
|
||||
// );
|
||||
logEvent(analytics, eventName, eventParams);
|
||||
//amplitude.track(eventName, eventParams);
|
||||
//posthog.capture(eventName, eventParams);
|
||||
} finally {
|
||||
//If it fails, just keep going.
|
||||
}
|
||||
// const eventParams = {
|
||||
// shop: (state.user && state.user.bodyshop && state.user.bodyshop.shopname) || null,
|
||||
// user: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// partsManagementOnly: state?.user?.partsManagementOnly,
|
||||
// ...additionalParams
|
||||
// };
|
||||
// // axios.post("/ioevent", {
|
||||
// // useremail: (state.user && state.user.currentUser && state.user.currentUser.email) || null,
|
||||
// // bodyshopid: (state.user && state.user.bodyshop && state.user.bodyshop.id) || null,
|
||||
// // operationName: eventName,
|
||||
// // variables: additionalParams,
|
||||
// // dbevent: false,
|
||||
// // env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}`
|
||||
// // });
|
||||
// // console.log(
|
||||
// // "%c[Analytics]",
|
||||
// // "background-color: green ;font-weight:bold;",
|
||||
// // eventName,
|
||||
// // eventParams
|
||||
// // );
|
||||
// logEvent(analytics, eventName, eventParams);
|
||||
// //amplitude.track(eventName, eventParams);
|
||||
// //posthog.capture(eventName, eventParams);
|
||||
// } finally {
|
||||
// //If it fails, just keep going.
|
||||
// }
|
||||
};
|
||||
|
||||
@@ -22,6 +22,23 @@ export const QUERY_AUDIT_TRAIL = gql`
|
||||
useremail
|
||||
status
|
||||
}
|
||||
esignature_documents(where: {jobid: {_eq: $jobid}}) {
|
||||
id
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
external_document_id
|
||||
subject
|
||||
message
|
||||
title
|
||||
status
|
||||
recipients
|
||||
completed_at
|
||||
opened
|
||||
completed
|
||||
rejected
|
||||
completed_at
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
phone
|
||||
federal_tax_id
|
||||
id
|
||||
documenso_api_key
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
|
||||
@@ -14,8 +14,8 @@ import reportWebVitals from "./reportWebVitals";
|
||||
import "./translations/i18n";
|
||||
import "./utils/CleanAxios";
|
||||
// import * as amplitude from "@amplitude/analytics-browser";
|
||||
import { PostHogProvider } from "posthog-js/react";
|
||||
import posthog from "posthog-js";
|
||||
//import { PostHogProvider } from "posthog-js/react";
|
||||
//import posthog from "posthog-js";
|
||||
import { StrictMode } from "react";
|
||||
|
||||
window.global ||= window;
|
||||
@@ -44,11 +44,11 @@ Dinero.globalRoundingMode = "HALF_EVEN";
|
||||
// // }
|
||||
// });
|
||||
|
||||
posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, {
|
||||
autocapture: false,
|
||||
capture_exceptions: true,
|
||||
api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST
|
||||
});
|
||||
// posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, {
|
||||
// autocapture: false,
|
||||
// capture_exceptions: true,
|
||||
// api_host: import.meta.env.VITE_PUBLIC_POSTHOG_HOST
|
||||
// });
|
||||
|
||||
const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV6(createBrowserRouter);
|
||||
|
||||
@@ -70,9 +70,7 @@ function App() {
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<PersistGate loading={<LoadingSpinner message="Restoring your settings..." />} persistor={persistor}>
|
||||
<PostHogProvider client={posthog}>
|
||||
<RouterProvider router={router} />
|
||||
</PostHogProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
@@ -18,16 +18,20 @@ const mapStateToProps = createStructuredSelector({});
|
||||
|
||||
export function ExportLogsPageComponent() {
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const { page, sortcolumn, sortorder, search, pageSize } = searchParams;
|
||||
const history = useNavigate();
|
||||
|
||||
const currentPage = Number.parseInt(page || "1", 10);
|
||||
const parsedPageSize = Number.parseInt(pageSize || String(pageLimit), 10);
|
||||
const currentPageSize = Number.isNaN(parsedPageSize) ? pageLimit : parsedPageSize;
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_EXPORT_LOG_PAGINATED, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
variables: {
|
||||
search: search || "",
|
||||
offset: page ? (page - 1) * pageLimit : 0,
|
||||
limit: pageLimit,
|
||||
offset: (currentPage - 1) * currentPageSize,
|
||||
limit: currentPageSize,
|
||||
order: [
|
||||
{
|
||||
...(sortcolumn === "ro_number"
|
||||
@@ -61,7 +65,11 @@ export function ExportLogsPageComponent() {
|
||||
if (error) return <AlertComponent title={error.message} type="error" />;
|
||||
|
||||
const handleTableChange = (pagination, filters, sorter) => {
|
||||
searchParams.page = pagination.current;
|
||||
const nextPageSize = pagination?.pageSize || currentPageSize;
|
||||
const pageSizeChanged = nextPageSize !== currentPageSize;
|
||||
|
||||
searchParams.pageSize = nextPageSize;
|
||||
searchParams.page = pageSizeChanged ? 1 : pagination.current;
|
||||
searchParams.sortcolumn = sorter.columnKey;
|
||||
searchParams.sortorder = sorter.order;
|
||||
if (filters.status) {
|
||||
@@ -191,8 +199,9 @@ export function ExportLogsPageComponent() {
|
||||
loading={loading}
|
||||
pagination={{
|
||||
placement: "top",
|
||||
pageSize: pageLimit,
|
||||
current: parseInt(page || 1, 10),
|
||||
pageSize: currentPageSize,
|
||||
current: currentPage,
|
||||
showSizeChanger: true,
|
||||
total: data && data.search_exportlog_aggregate.aggregate.count
|
||||
}}
|
||||
columns={columns}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMutation, useQuery } from "@apollo/client/react";
|
||||
import { Button, Card, Col, Form, Input, Modal, Result, Row, Select, Space, Switch, Typography } from "antd";
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { useParams } from "react-router-dom";
|
||||
@@ -23,9 +23,8 @@ import LoadingSpinner from "../../components/loading-spinner/loading-spinner.com
|
||||
import NotFound from "../../components/not-found/not-found.component";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import RREarlyROModal from "../../components/dms-post-form/rr-early-ro-modal";
|
||||
import { GET_JOB_BY_PK, CONVERT_JOB_TO_RO } from "../../graphql/jobs.queries";
|
||||
import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { CONVERT_JOB_TO_RO, GET_JOB_BY_PK } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail, setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { useSocket } from "../../contexts/SocketIO/useSocket";
|
||||
@@ -302,7 +301,11 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader, bodyshop
|
||||
}
|
||||
]}
|
||||
>
|
||||
<Select>
|
||||
<Select
|
||||
showSearch={{
|
||||
optionFilterProp: "children"
|
||||
}}
|
||||
>
|
||||
{bodyshop?.md_referral_sources?.map((s) => (
|
||||
<Select.Option key={s} value={s}>
|
||||
{s}
|
||||
@@ -379,7 +382,13 @@ export function JobsCloseContainer({ setBreadcrumbs, setSelectedHeader, bodyshop
|
||||
</Form.Item>
|
||||
|
||||
<Space wrap style={{ marginTop: 16 }}>
|
||||
<Button disabled={submitDisabled()} type="primary" danger onClick={() => form.submit()} loading={convertLoading}>
|
||||
<Button
|
||||
disabled={submitDisabled()}
|
||||
type="primary"
|
||||
danger
|
||||
onClick={() => form.submit()}
|
||||
loading={convertLoading}
|
||||
>
|
||||
{t("jobs.actions.convert")}
|
||||
</Button>
|
||||
<Button onClick={() => setShowConvertModal(false)}>{t("general.actions.close")}</Button>
|
||||
|
||||
@@ -8,13 +8,14 @@ import { createStructuredSelector } from "reselect";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { INSERT_NEW_JOB } from "../../graphql/jobs.queries";
|
||||
import { QUERY_OWNER_FOR_JOB_CREATION } from "../../graphql/owners.queries";
|
||||
import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
|
||||
import { insertAuditTrail, setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||
import JobsCreateComponent from "./jobs-create.component";
|
||||
import JobCreateContext from "./jobs-create.context";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -22,10 +23,11 @@ const mapStateToProps = createStructuredSelector({
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
setSelectedHeader: (key) => dispatch(setSelectedHeader(key))
|
||||
setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
|
||||
insertAuditTrail: ({ jobid, operation, type }) => dispatch(insertAuditTrail({ jobid, operation, type }))
|
||||
});
|
||||
|
||||
function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, currentUser }) {
|
||||
function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, currentUser, insertAuditTrail }) {
|
||||
const { t } = useTranslation();
|
||||
const notification = useNotification();
|
||||
|
||||
@@ -84,6 +86,11 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, curr
|
||||
newJobId: resp.data.insert_jobs.returning[0].id
|
||||
});
|
||||
logImEXEvent("manual_job_create_completed", {});
|
||||
insertAuditTrail({
|
||||
jobid: resp.data.insert_jobs.returning[0].id,
|
||||
operation: AuditTrailMapping.jobmanualcreate(),
|
||||
type: "jobmanualcreate"
|
||||
});
|
||||
setIsSubmitting(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
@@ -20,6 +20,7 @@ import { FaHardHat, FaRegStickyNote, FaShieldAlt, FaTasks } from "react-icons/fa
|
||||
import { connect } from "react-redux";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import EsignatureCustomDocument from "../../components/esignature-custom-document/esignature-custom-document.component.jsx";
|
||||
import FormFieldsChanged from "../../components/form-fields-changed-alert/form-fields-changed-alert.component";
|
||||
import JobAuditTrail from "../../components/job-audit-trail/job-audit-trail.component";
|
||||
import JobsLinesContainer from "../../components/job-detail-lines/job-lines.container";
|
||||
@@ -56,6 +57,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
import { DateTimeFormat } from "../../utils/DateFormatter";
|
||||
import dayjs from "../../utils/day";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
import UndefinedToNull from "../../utils/undefinedtonull";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -104,6 +106,7 @@ export function JobsDetailPage({
|
||||
});
|
||||
const notification = useNotification();
|
||||
const { scenarioNotificationsOn } = useSocket();
|
||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||
|
||||
useEffect(() => {
|
||||
//form.setFieldsValue(transormJobToForm(job));
|
||||
@@ -285,6 +288,7 @@ export function JobsDetailPage({
|
||||
>
|
||||
{t("general.labels.refresh")}
|
||||
</Button>
|
||||
{esignatureEnabled && <EsignatureCustomDocument jobId={job.id} />}
|
||||
<JobsChangeStatus job={job} />
|
||||
<JobSyncButton job={job} />
|
||||
<Button
|
||||
|
||||
@@ -30,6 +30,8 @@ import InstanceRenderManager from "../../utils/instanceRenderMgr.js";
|
||||
import useAlertsNotifications from "../../hooks/useAlertsNotifications.jsx";
|
||||
import { selectDarkMode } from "../../redux/application/application.selectors.js";
|
||||
import { lazyDev } from "../../utils/lazyWithPreload.jsx";
|
||||
import EsignatureModalContainer from "../../components/esignature-modal/esignature-modal.container.jsx";
|
||||
import { hasDocumensoApiKey } from "../../utils/esignature.js";
|
||||
|
||||
const PrintCenterModalContainer = lazyDev(
|
||||
() => import("../../components/print-center-modal/print-center-modal.container")
|
||||
@@ -68,7 +70,9 @@ const FeatureRequestPage = lazyDev(() => import("../feature-request/feature-requ
|
||||
const JobCostingModal = lazyDev(() => import("../../components/job-costing-modal/job-costing-modal.container"));
|
||||
const ReportCenterModal = lazyDev(() => import("../../components/report-center-modal/report-center-modal.container"));
|
||||
const BillEnterModalContainer = lazyDev(() => import("../../components/bill-enter-modal/bill-enter-modal.container"));
|
||||
const TimeTicketModalContainer = lazyDev(() => import("../../components/time-ticket-modal/time-ticket-modal.container"));
|
||||
const TimeTicketModalContainer = lazyDev(
|
||||
() => import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||
);
|
||||
const TimeTicketModalTask = lazyDev(
|
||||
() => import("../../components/time-ticket-task-modal/time-ticket-task-modal.container")
|
||||
);
|
||||
@@ -110,7 +114,9 @@ const TtApprovals = lazyDev(() => import("../tt-approvals/tt-approvals.page.cont
|
||||
const MyTasksPage = lazyDev(() => import("../tasks/myTasksPageContainer.jsx"));
|
||||
const AllTasksPage = lazyDev(() => import("../tasks/allTasksPageContainer.jsx"));
|
||||
|
||||
const TaskUpsertModalContainer = lazyDev(() => import("../../components/task-upsert-modal/task-upsert-modal.container"));
|
||||
const TaskUpsertModalContainer = lazyDev(
|
||||
() => import("../../components/task-upsert-modal/task-upsert-modal.container")
|
||||
);
|
||||
const { Content } = Layout;
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -123,6 +129,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
|
||||
export function Manage({ conflict, bodyshop, partsManagementOnly, isDarkMode, currentUser }) {
|
||||
const { t } = useTranslation();
|
||||
const esignatureEnabled = hasDocumensoApiKey(bodyshop);
|
||||
const [chatVisible] = useState(false);
|
||||
const didMount = useRef(false);
|
||||
|
||||
@@ -178,6 +185,7 @@ export function Manage({ conflict, bodyshop, partsManagementOnly, isDarkMode, cu
|
||||
<TaskUpsertModalContainer />
|
||||
<BreadCrumbs />
|
||||
<BillEnterModalContainer />
|
||||
{esignatureEnabled && <EsignatureModalContainer />}
|
||||
<JobCostingModal />
|
||||
<ReportCenterModal />
|
||||
<EmailOverlayContainer />
|
||||
|
||||
@@ -27,12 +27,19 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function TechAssignedProdJobs({ setTimeTicketTaskContext, technician, bodyshop }) {
|
||||
const technicianId = technician?.id;
|
||||
const teamIds = (bodyshop?.employee_teams || [])
|
||||
.filter((employeeTeam) =>
|
||||
employeeTeam?.employee_team_members?.some((teamMember) => teamMember?.employeeid === technicianId)
|
||||
)
|
||||
.map((employeeTeam) => employeeTeam.id)
|
||||
.filter(Boolean);
|
||||
const hasAssignedTeams = Boolean(technicianId) && teamIds.length > 0;
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_JOBS_TECH_ASIGNED_TO_BY_TEAM, {
|
||||
variables: {
|
||||
teamIds: bodyshop.employee_teams
|
||||
.filter((et) => et.employee_team_members.find((etm) => etm.employeeid === technician.id))
|
||||
.map((et) => et.id)
|
||||
}
|
||||
teamIds
|
||||
},
|
||||
skip: !technicianId || !hasAssignedTeams
|
||||
});
|
||||
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
@@ -177,7 +184,7 @@ export function TechAssignedProdJobs({ setTimeTicketTaskContext, technician, bod
|
||||
<Card
|
||||
extra={
|
||||
<Space wrap>
|
||||
<Button onClick={() => refetch()} icon={<SyncOutlined />} />
|
||||
<Button disabled={!hasAssignedTeams} onClick={() => refetch()} icon={<SyncOutlined />} />
|
||||
<Input.Search
|
||||
placeholder={t("general.labels.search")}
|
||||
onChange={(e) => {
|
||||
|
||||
@@ -27,7 +27,8 @@ const INITIAL_STATE = {
|
||||
contractFinder: { ...baseModal },
|
||||
inventoryUpsert: { ...baseModal },
|
||||
ca_bc_eftTableConvert: { ...baseModal },
|
||||
cardPayment: { ...baseModal }
|
||||
cardPayment: { ...baseModal },
|
||||
esignature: { ...baseModal }
|
||||
};
|
||||
|
||||
const modalsReducer = (state = INITIAL_STATE, action) => {
|
||||
|
||||
@@ -36,3 +36,4 @@ export const selectInventoryUpsert = createSelector([selectModals], (modals) =>
|
||||
export const selectCaBcEtfTableConvert = createSelector([selectModals], (modals) => modals.ca_bc_eftTableConvert);
|
||||
|
||||
export const selectCardPayment = createSelector([selectModals], (modals) => modals.cardPayment);
|
||||
export const selectEsignature = createSelector([selectModals], (modals) => modals.esignature);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import FingerprintJS from "@fingerprintjs/fingerprintjs";
|
||||
import { setUserId, setUserProperties } from "@firebase/analytics";
|
||||
//import { setUserId, setUserProperties } from "@firebase/analytics";
|
||||
import {
|
||||
checkActionCode,
|
||||
confirmPasswordReset,
|
||||
@@ -9,14 +9,13 @@ import {
|
||||
} from "@firebase/auth";
|
||||
import { arrayUnion, doc, getDoc, setDoc, updateDoc } from "@firebase/firestore";
|
||||
import { getToken } from "@firebase/messaging";
|
||||
import * as Sentry from "@sentry/react";
|
||||
// import * as Sentry from "@sentry/react";
|
||||
import { notification } from "antd";
|
||||
import axios from "axios";
|
||||
import i18next from "i18next";
|
||||
import LogRocket from "logrocket";
|
||||
//import LogRocket from "logrocket";
|
||||
import { all, call, delay, put, select, takeLatest } from "redux-saga/effects";
|
||||
import {
|
||||
analytics,
|
||||
auth,
|
||||
firestore,
|
||||
getCurrentUser,
|
||||
@@ -49,7 +48,7 @@ import {
|
||||
validatePasswordResetSuccess
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
import posthog from "posthog-js";
|
||||
//import posthog from "posthog-js";
|
||||
import { bodyshopHasDmsKey, determineDMSTypeByBodyshop, DMS_MAP } from "../../utils/dmsUtils";
|
||||
|
||||
const fpPromise = FingerprintJS.load();
|
||||
@@ -91,9 +90,9 @@ export function* isUserAuthenticated() {
|
||||
return;
|
||||
}
|
||||
|
||||
LogRocket.identify(user.email);
|
||||
//LogRocket.identify(user.email);
|
||||
//amplitude.setUserId(user.email);
|
||||
posthog.identify(user.email);
|
||||
//posthog.identify(user.email);
|
||||
|
||||
const eulaQuery = yield client.query({
|
||||
query: QUERY_EULA,
|
||||
@@ -234,7 +233,7 @@ export function* onSignInSuccess() {
|
||||
}
|
||||
|
||||
export function* signInSuccessSaga({ payload }) {
|
||||
LogRocket.identify(payload.email);
|
||||
//LogRocket.identify(payload.email);
|
||||
|
||||
try {
|
||||
window.$crisp?.push(["set", "user:nickname", [payload.displayName || payload.email]]);
|
||||
@@ -279,17 +278,17 @@ export function* signInSuccessSaga({ payload }) {
|
||||
console.log("Error updating Crisp settings.", error);
|
||||
}
|
||||
|
||||
try {
|
||||
Sentry.setUser({
|
||||
email: payload.email,
|
||||
username: payload.displayName || payload.email
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("Error setting Sentry user.", error);
|
||||
}
|
||||
// try {
|
||||
// Sentry.setUser({
|
||||
// email: payload.email,
|
||||
// username: payload.displayName || payload.email
|
||||
// });
|
||||
// } catch (error) {
|
||||
// console.log("Error setting Sentry user.", error);
|
||||
// }
|
||||
|
||||
setUserId(analytics, payload.email);
|
||||
setUserProperties(analytics, payload);
|
||||
// setUserId(analytics, payload.email);
|
||||
// setUserProperties(analytics, payload);
|
||||
yield;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
"billdeleted": "Bill with invoice number {{invoice_number}} deleted.",
|
||||
"billmarkforreexport": "Bill with invoice number {{invoice_number}} marked for re-export.",
|
||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
||||
"billupdated": "Bill with invoice number {{invoice_number}} updated with the following details: {{details}}.",
|
||||
"failedpayment": "Failed payment attempt.",
|
||||
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
||||
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
||||
@@ -137,6 +137,9 @@
|
||||
"jobintake": "Job intake completed. Status set to {{status}}. Scheduled completion is {{scheduled_completion}}.",
|
||||
"jobinvoiced": "Job has been invoiced.",
|
||||
"jobioucreated": "IOU Created.",
|
||||
"joblineupdate": "Job line {{lineDescription}} updated with the following details: {{details}}.",
|
||||
"jobmanualcreate": "Job manually created.",
|
||||
"jobmanuallineinsert": "Job line manually added with the following details: {{details}}.",
|
||||
"jobmodifylbradj": "Labor adjustments modified {{mod_lbr_ty}} / {{hours}}.",
|
||||
"jobnoteadded": "Note added to Job.",
|
||||
"jobnotedeleted": "Note deleted from Job.",
|
||||
@@ -152,7 +155,9 @@
|
||||
"tasks_deleted": "Task '{{title}}' deleted by {{deletedBy}}",
|
||||
"tasks_uncompleted": "Task '{{title}}' uncompleted by {{uncompletedBy}}",
|
||||
"tasks_undeleted": "Task '{{title}}' undeleted by {{undeletedBy}}",
|
||||
"tasks_updated": "Task '{{title}}' updated by {{updatedBy}}"
|
||||
"tasks_updated": "Task '{{title}}' updated by {{updatedBy}}",
|
||||
"timeticketcreated": "Time Ticket for {{employee}} on {{date}} created with the following details: {{details}}.",
|
||||
"timeticketupdated": "Time Ticket for {{employee}} on {{date}} updated with the following details: {{details}}"
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
@@ -318,14 +323,14 @@
|
||||
"addtemplate": "Add Template",
|
||||
"newlaborrate": "New Labor Rate",
|
||||
"newsalestaxcode": "New Sales Tax Code",
|
||||
"save_shop_information": "Save Shop Information",
|
||||
"newstatus": "Add Status",
|
||||
"save_shop_information": "Save Shop Information",
|
||||
"testrender": "Test Render"
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "Error creating default view.",
|
||||
"duplicate_job_status": "Duplicate job status. Each job status must be unique.",
|
||||
"duplicate_insurance_company": "Duplicate insurance company name. Each insurance company name must be unique",
|
||||
"duplicate_job_status": "Duplicate job status. Each job status must be unique.",
|
||||
"loading": "Unable to load shop details. Please call technical support.",
|
||||
"saving": "Error encountered while saving. {{message}}",
|
||||
"task_preset_allocation_exceeded": "{{laborType}} task preset total is {{total}}% and cannot exceed 100%."
|
||||
@@ -365,6 +370,7 @@
|
||||
"cashierid": "Cashier ID",
|
||||
"default_journal": "Default Journal",
|
||||
"disablebillwip": "Disable bill WIP for A/P Posting",
|
||||
"disablecontact": "Disable Contact Updates/Creation",
|
||||
"disablecontactvehiclecreation": "Disable Contact & Vehicle Updates/Creation",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_control_override": "Static Control # Override",
|
||||
@@ -422,35 +428,6 @@
|
||||
"logo_img_path": "Shop Logo",
|
||||
"logo_img_path_height": "Logo Image Height",
|
||||
"logo_img_path_width": "Logo Image Width",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "Daily Body Target",
|
||||
"daily_paint_target": "Daily Paint Target",
|
||||
"ignore_blocked_days": "Ignore Blocked Days",
|
||||
"last_number_working_days": "Last Number of Working Days",
|
||||
"production_target_hours": "Production Target Hours"
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "Attach PDF to Sent Emails?",
|
||||
"from_emails": "Additional From Emails",
|
||||
"parts_order_cc": "Parts Orders CC",
|
||||
"parts_return_slip_cc": "Parts Returns CC"
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "Paint Hour Split",
|
||||
"paint_materials_hourly_cost_rate": "Paint Materials Hourly Cost Rate",
|
||||
"prep_hour_split": "Prep Hour Split",
|
||||
"shop_materials_hourly_cost_rate": "Shop Materials Hourly Cost Rate",
|
||||
"target_touch_time": "Target Touch Time",
|
||||
"use_paint_scale_data": "Use Paint Scale Data"
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "Enabled",
|
||||
"http_path": "HTTP Path",
|
||||
"network_path": "Network Path",
|
||||
"token": "Token"
|
||||
}
|
||||
},
|
||||
"md_categories": "Categories",
|
||||
"md_ccc_rates": "Courtesy Car Contract Rate Presets",
|
||||
"md_classes": "Classes",
|
||||
@@ -458,6 +435,7 @@
|
||||
"md_email_cc": "Auto Email CC: $t(parts_orders.labels.{{template}})",
|
||||
"md_from_emails": "Additional From Emails",
|
||||
"md_functionality_toggles": {
|
||||
"enhanced_early_ros": "Enable Enhance Early ROs",
|
||||
"parts_queue_toggle": "Auto Add Imported/Supplemented Jobs to Parts Queue"
|
||||
},
|
||||
"md_hour_split": {
|
||||
@@ -706,6 +684,13 @@
|
||||
},
|
||||
"schedule_end_time": "Schedule Ending Time",
|
||||
"schedule_start_time": "Schedule Starting Time",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "Daily Body Target",
|
||||
"daily_paint_target": "Daily Paint Target",
|
||||
"ignore_blocked_days": "Ignore Blocked Days",
|
||||
"last_number_working_days": "Last Number of Working Days",
|
||||
"production_target_hours": "Production Target Hours"
|
||||
},
|
||||
"shopname": "Shop Name",
|
||||
"speedprint": {
|
||||
"id": "Id",
|
||||
@@ -752,6 +737,28 @@
|
||||
"production_statuses": "Production Statuses",
|
||||
"ready_statuses": "Ready Statuses"
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "Attach PDF to Sent Emails?",
|
||||
"from_emails": "Additional From Emails",
|
||||
"parts_order_cc": "Parts Orders CC",
|
||||
"parts_return_slip_cc": "Parts Returns CC"
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "Paint Hour Split",
|
||||
"paint_materials_hourly_cost_rate": "Paint Materials Hourly Cost Rate",
|
||||
"prep_hour_split": "Prep Hour Split",
|
||||
"shop_materials_hourly_cost_rate": "Shop Materials Hourly Cost Rate",
|
||||
"target_touch_time": "Target Touch Time",
|
||||
"use_paint_scale_data": "Use Paint Scale Data"
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "Enabled",
|
||||
"http_path": "HTTP Path",
|
||||
"network_path": "Network Path",
|
||||
"token": "Token"
|
||||
}
|
||||
},
|
||||
"target_touchtime": "Target Touch Time",
|
||||
"timezone": "Timezone",
|
||||
"tt_allow_post_to_invoiced": "Allow Time Tickets to be posted to Invoiced & Exported Jobs",
|
||||
@@ -771,6 +778,7 @@
|
||||
"alljobstatuses": "All Job Statuses",
|
||||
"allopenjobstatuses": "All Open Job Statuses",
|
||||
"apptcolors": "Appointment Colors",
|
||||
"autoemail": "Auto Email",
|
||||
"businessinformation": "Business Information",
|
||||
"checklists": "Checklists",
|
||||
"consent_settings": "Phone Number Opt-Out List",
|
||||
@@ -778,7 +786,6 @@
|
||||
"customtemplates": "Custom Templates",
|
||||
"defaultcostsmapping": "Default Costs Mapping",
|
||||
"defaultprofitsmapping": "Default Profits Mapping",
|
||||
"dms_setup": "DMS Setup",
|
||||
"deliverchecklist": "Delivery Checklist",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -793,10 +800,11 @@
|
||||
"rr_dealerid": "Reynolds Store Number",
|
||||
"title": "DMS"
|
||||
},
|
||||
"dms_setup": "DMS Setup",
|
||||
"emaillater": "Email Later",
|
||||
"employee_teams": "Employee Teams",
|
||||
"employee_options": "Employee Options",
|
||||
"employee_rates": "Employee Rates",
|
||||
"employee_teams": "Employee Teams",
|
||||
"employee_vacation": "Employee Vacation",
|
||||
"employees": "Employees",
|
||||
"estimators": "Estimators",
|
||||
@@ -807,21 +815,22 @@
|
||||
"intakechecklist": "Intake Checklist",
|
||||
"intellipay_cash_discount": "Please ensure that cash discounting has been enabled on your merchant account. Reach out to IntelliPay Support if you need assistance. ",
|
||||
"job_status_options": "Job Status Options",
|
||||
"jobcosting": "Job Costing",
|
||||
"jobstatuses": "Job Statuses",
|
||||
"jump_to_section": "Jump to section",
|
||||
"laborrates": "Labor Rates",
|
||||
"licensing": "Licensing",
|
||||
"localmediaserver": "Local Media Server",
|
||||
"md_parts_scan": "Parts Scan Rules",
|
||||
"md_ro_guard": "RO Guard",
|
||||
"md_ro_guard_options": "RO Guard Options",
|
||||
"md_tasks_presets": "Tasks Presets",
|
||||
"task_preset_options": "Task Preset Options",
|
||||
"md_to_emails": "Preset To Emails",
|
||||
"md_to_emails_emails": "Emails",
|
||||
"messagingpresets": "Messaging Presets",
|
||||
"notification_options": "Notification Options",
|
||||
"notemplatesavailable": "No templates available to add.",
|
||||
"notespresets": "Notes Presets",
|
||||
"jump_to_section": "Jump to section",
|
||||
"notification_options": "Notification Options",
|
||||
"notifications": {
|
||||
"followers": "Notifications"
|
||||
},
|
||||
@@ -858,9 +867,6 @@
|
||||
"roguard": {
|
||||
"title": "RO Guard"
|
||||
},
|
||||
"autoemail": "Auto Email",
|
||||
"jobcosting": "Job Costing",
|
||||
"localmediaserver": "Local Media Server",
|
||||
"romepay": "Rome Pay",
|
||||
"scheduling": "SMART Scheduling",
|
||||
"scoreboardsetup": "Scoreboard Setup",
|
||||
@@ -872,6 +878,7 @@
|
||||
"ssbuckets": "Job Size Definitions",
|
||||
"systemsettings": "System Settings",
|
||||
"task-presets": "Task Presets",
|
||||
"task_preset_options": "Task Preset Options",
|
||||
"workingdays": "Working Days"
|
||||
},
|
||||
"operations": {
|
||||
@@ -1216,6 +1223,7 @@
|
||||
"confirmdelete": "Are you sure you want to delete these documents. This CANNOT be undone.",
|
||||
"doctype": "Document Type",
|
||||
"dragtoupload": "Click or drag files to this area to upload",
|
||||
"greyscale": "Greyscale",
|
||||
"newjobid": "Assign to Job",
|
||||
"openinexplorer": "Open in Explorer",
|
||||
"optimizedimage": "The below image is optimized. Click on the picture below to open in a new window and view it full size, or open it in explorer.",
|
||||
@@ -1346,6 +1354,31 @@
|
||||
"unique_employee_number": "You must enter a unique employee number."
|
||||
}
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "Delete",
|
||||
"distribute": "Distribute",
|
||||
"redistribute": "Redistribute",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": "View"
|
||||
},
|
||||
"errors": {
|
||||
"no_token": "Error connecting to signing server. No authorization token was provided.",
|
||||
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
|
||||
"upload_title": "Unable to prepare document for e-signature"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "Completed?",
|
||||
"completed_at": "Completed At",
|
||||
"created_at": "Created At",
|
||||
"external_document_id": "Ex. Document ID",
|
||||
"opened": "Opened?",
|
||||
"rejected": "Rejected?",
|
||||
"status": "Status",
|
||||
"title": "Title",
|
||||
"updated_at": "Updated At"
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
"buttons": {
|
||||
"accept": "Accept EULA"
|
||||
@@ -1461,8 +1494,8 @@
|
||||
"beta": "BETA",
|
||||
"cancel": "Are you sure you want to cancel? Your changes will not be saved.",
|
||||
"changelog": "Change Log",
|
||||
"click_to_begin": "Click {{action}} to begin",
|
||||
"clear": "Clear",
|
||||
"click_to_begin": "Click {{action}} to begin",
|
||||
"confirmpassword": "Confirm Password",
|
||||
"created_at": "Created At",
|
||||
"date": "Select Date",
|
||||
@@ -1782,6 +1815,7 @@
|
||||
"actions": {
|
||||
"addDocuments": "Add Job Documents",
|
||||
"addNote": "Add Note",
|
||||
"addpayer": "Add Payer",
|
||||
"addtopartsqueue": "Add to Parts Queue",
|
||||
"addtoproduction": "Add to Production",
|
||||
"addtoscoreboard": "Add to Scoreboard",
|
||||
@@ -1958,6 +1992,7 @@
|
||||
"ded_status": "Deductible Status",
|
||||
"depreciation_taxes": "Betterment/Depreciation/Taxes",
|
||||
"dms": {
|
||||
"IsARCustomer": "AR Customer?",
|
||||
"address": "Customer Address",
|
||||
"advisor": "Advisor #",
|
||||
"amount": "Amount",
|
||||
@@ -2308,6 +2343,8 @@
|
||||
"duplicateconfirm": "Are you sure you want to duplicate this Job? Some elements of this Job will not be duplicated.",
|
||||
"emailaudit": "Email Audit Trail",
|
||||
"employeeassignments": "Employee Assignments",
|
||||
"esignature_imex": "ImEX Sign",
|
||||
"esignature_rome": "Rome Sign",
|
||||
"estimatelines": "Estimate Lines",
|
||||
"estimator": "Estimator",
|
||||
"existing_jobs": "Existing Jobs",
|
||||
@@ -2747,6 +2784,9 @@
|
||||
"alternate-transport-changed": "Alternate Transport Changed",
|
||||
"bill-posted": "Bill Posted",
|
||||
"critical-parts-status-changed": "Critical Parts Status Changed",
|
||||
"esign-document-completed": "E-Sign Document Completed",
|
||||
"esign-document-opened": "E-Sign Document Opened",
|
||||
"esign-document-upload-failed": "E-Sign Document Upload Failed",
|
||||
"intake-delivery-checklist-completed": "Intake or Delivery Checklist Completed",
|
||||
"job-added-to-production": "Job Added to Production",
|
||||
"job-assigned-to-me": "Job Assigned to Me",
|
||||
@@ -3259,6 +3299,7 @@
|
||||
"information": "Information",
|
||||
"layout": "Layout",
|
||||
"statistics": {
|
||||
"exclude_suspended": "Exclude Suspended Jobs",
|
||||
"jobs_in_production": "Jobs in Production",
|
||||
"tasks_in_production": "Tasks in Production",
|
||||
"tasks_in_view": "Tasks in View",
|
||||
@@ -3750,11 +3791,11 @@
|
||||
"jobhours": "Job Related Time Tickets Summary",
|
||||
"lunch": "Lunch",
|
||||
"new": "New Time Ticket",
|
||||
"payrollclaimedtasks": "These time tickets will be automatically entered to the system as a part of claiming this task. These numbers are calculated using the jobs assigned lines. If lines are unassigned, they will be excluded from created tickets.",
|
||||
"payout_methods": {
|
||||
"commission": "Commission",
|
||||
"hourly": "Hourly"
|
||||
},
|
||||
"payrollclaimedtasks": "These time tickets will be automatically entered to the system as a part of claiming this task. These numbers are calculated using the jobs assigned lines. If lines are unassigned, they will be excluded from created tickets.",
|
||||
"pmbreak": "PM Break",
|
||||
"pmshift": "PM Shift",
|
||||
"shift": "Shift",
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
"appointmentinsert": "",
|
||||
"assignedlinehours": "",
|
||||
"billdeleted": "",
|
||||
"billposted": "",
|
||||
"billmarkforreexport": "",
|
||||
"billposted": "",
|
||||
"billupdated": "",
|
||||
"failedpayment": "",
|
||||
"jobassignmentchange": "",
|
||||
@@ -137,6 +137,9 @@
|
||||
"jobintake": "",
|
||||
"jobinvoiced": "",
|
||||
"jobioucreated": "",
|
||||
"joblineupdate": "",
|
||||
"jobmanualcreate": "",
|
||||
"jobmanuallineinsert": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobnoteadded": "",
|
||||
"jobnotedeleted": "",
|
||||
@@ -152,7 +155,9 @@
|
||||
"tasks_deleted": "",
|
||||
"tasks_uncompleted": "",
|
||||
"tasks_undeleted": "",
|
||||
"tasks_updated": ""
|
||||
"tasks_updated": "",
|
||||
"timeticketcreated": "",
|
||||
"timeticketupdated": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
@@ -318,14 +323,14 @@
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"save_shop_information": "",
|
||||
"newstatus": "",
|
||||
"save_shop_information": "",
|
||||
"testrender": ""
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "",
|
||||
"duplicate_job_status": "",
|
||||
"duplicate_insurance_company": "",
|
||||
"duplicate_job_status": "",
|
||||
"loading": "No se pueden cargar los detalles de la tienda. Por favor llame al soporte técnico.",
|
||||
"saving": "",
|
||||
"task_preset_allocation_exceeded": ""
|
||||
@@ -365,6 +370,7 @@
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablebillwip": "",
|
||||
"disablecontact": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_control_override": "",
|
||||
@@ -422,35 +428,6 @@
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"md_categories": "",
|
||||
"md_ccc_rates": "",
|
||||
"md_classes": "",
|
||||
@@ -458,6 +435,7 @@
|
||||
"md_email_cc": "",
|
||||
"md_from_emails": "",
|
||||
"md_functionality_toggles": {
|
||||
"enhanced_early_ros": "",
|
||||
"parts_queue_toggle": ""
|
||||
},
|
||||
"md_hour_split": {
|
||||
@@ -706,6 +684,13 @@
|
||||
},
|
||||
"schedule_end_time": "",
|
||||
"schedule_start_time": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"shopname": "",
|
||||
"speedprint": {
|
||||
"id": "",
|
||||
@@ -752,6 +737,28 @@
|
||||
"production_statuses": "",
|
||||
"ready_statuses": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"target_touchtime": "",
|
||||
"timezone": "",
|
||||
"tt_allow_post_to_invoiced": "",
|
||||
@@ -771,6 +778,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"apptcolors": "",
|
||||
"autoemail": "",
|
||||
"businessinformation": "",
|
||||
"checklists": "",
|
||||
"consent_settings": "",
|
||||
@@ -778,7 +786,6 @@
|
||||
"customtemplates": "",
|
||||
"defaultcostsmapping": "",
|
||||
"defaultprofitsmapping": "",
|
||||
"dms_setup": "",
|
||||
"deliverchecklist": "",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -793,10 +800,11 @@
|
||||
"rr_dealerid": "",
|
||||
"title": ""
|
||||
},
|
||||
"dms_setup": "",
|
||||
"emaillater": "",
|
||||
"employee_teams": "",
|
||||
"employee_options": "",
|
||||
"employee_rates": "",
|
||||
"employee_teams": "",
|
||||
"employee_vacation": "",
|
||||
"employees": "",
|
||||
"estimators": "",
|
||||
@@ -807,21 +815,22 @@
|
||||
"intakechecklist": "",
|
||||
"intellipay_cash_discount": "",
|
||||
"job_status_options": "",
|
||||
"jobcosting": "",
|
||||
"jobstatuses": "",
|
||||
"jump_to_section": "",
|
||||
"laborrates": "",
|
||||
"licensing": "",
|
||||
"localmediaserver": "",
|
||||
"md_parts_scan": "",
|
||||
"md_ro_guard": "",
|
||||
"md_ro_guard_options": "",
|
||||
"md_tasks_presets": "",
|
||||
"task_preset_options": "",
|
||||
"md_to_emails": "",
|
||||
"md_to_emails_emails": "",
|
||||
"messagingpresets": "",
|
||||
"notification_options": "",
|
||||
"notemplatesavailable": "",
|
||||
"notespresets": "",
|
||||
"jump_to_section": "",
|
||||
"notification_options": "",
|
||||
"notifications": {
|
||||
"followers": ""
|
||||
},
|
||||
@@ -858,9 +867,6 @@
|
||||
"roguard": {
|
||||
"title": ""
|
||||
},
|
||||
"autoemail": "",
|
||||
"jobcosting": "",
|
||||
"localmediaserver": "",
|
||||
"romepay": "",
|
||||
"scheduling": "",
|
||||
"scoreboardsetup": "",
|
||||
@@ -872,6 +878,7 @@
|
||||
"ssbuckets": "",
|
||||
"systemsettings": "",
|
||||
"task-presets": "",
|
||||
"task_preset_options": "",
|
||||
"workingdays": ""
|
||||
},
|
||||
"operations": {
|
||||
@@ -1216,6 +1223,7 @@
|
||||
"confirmdelete": "",
|
||||
"doctype": "",
|
||||
"dragtoupload": "",
|
||||
"greyscale": "Escala de grises",
|
||||
"newjobid": "",
|
||||
"openinexplorer": "",
|
||||
"optimizedimage": "",
|
||||
@@ -1346,6 +1354,31 @@
|
||||
"unique_employee_number": ""
|
||||
}
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"distribute": "",
|
||||
"redistribute": "",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": ""
|
||||
},
|
||||
"errors": {
|
||||
"no_token": "",
|
||||
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
|
||||
"upload_title": "Unable to prepare document for e-signature"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "",
|
||||
"completed_at": "",
|
||||
"created_at": "",
|
||||
"external_document_id": "",
|
||||
"opened": "",
|
||||
"rejected": "",
|
||||
"status": "",
|
||||
"title": "",
|
||||
"updated_at": ""
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
"buttons": {
|
||||
"accept": "Accept EULA"
|
||||
@@ -1461,8 +1494,8 @@
|
||||
"beta": "",
|
||||
"cancel": "",
|
||||
"changelog": "",
|
||||
"click_to_begin": "",
|
||||
"clear": "",
|
||||
"click_to_begin": "",
|
||||
"confirmpassword": "",
|
||||
"created_at": "",
|
||||
"date": "",
|
||||
@@ -1782,6 +1815,7 @@
|
||||
"actions": {
|
||||
"addDocuments": "Agregar documentos de trabajo",
|
||||
"addNote": "Añadir la nota",
|
||||
"addpayer": "",
|
||||
"addtopartsqueue": "",
|
||||
"addtoproduction": "",
|
||||
"addtoscoreboard": "",
|
||||
@@ -1958,6 +1992,7 @@
|
||||
"ded_status": "Estado deducible",
|
||||
"depreciation_taxes": "Depreciación / Impuestos",
|
||||
"dms": {
|
||||
"IsARCustomer": "",
|
||||
"address": "",
|
||||
"advisor": "",
|
||||
"amount": "",
|
||||
@@ -2308,6 +2343,8 @@
|
||||
"duplicateconfirm": "",
|
||||
"emailaudit": "",
|
||||
"employeeassignments": "",
|
||||
"esignature_imex": "",
|
||||
"esignature_rome": "",
|
||||
"estimatelines": "",
|
||||
"estimator": "",
|
||||
"existing_jobs": "Empleos existentes",
|
||||
@@ -2747,6 +2784,9 @@
|
||||
"alternate-transport-changed": "",
|
||||
"bill-posted": "",
|
||||
"critical-parts-status-changed": "",
|
||||
"esign-document-completed": "E-Sign Document Completed",
|
||||
"esign-document-opened": "E-Sign Document Opened",
|
||||
"esign-document-upload-failed": "E-Sign Document Upload Failed",
|
||||
"intake-delivery-checklist-completed": "",
|
||||
"job-added-to-production": "",
|
||||
"job-assigned-to-me": "",
|
||||
@@ -3259,6 +3299,7 @@
|
||||
"information": "",
|
||||
"layout": "",
|
||||
"statistics": {
|
||||
"exclude_suspended": "",
|
||||
"jobs_in_production": "",
|
||||
"tasks_in_production": "",
|
||||
"tasks_in_view": "",
|
||||
@@ -3750,11 +3791,11 @@
|
||||
"jobhours": "",
|
||||
"lunch": "",
|
||||
"new": "",
|
||||
"payrollclaimedtasks": "",
|
||||
"payout_methods": {
|
||||
"commission": "",
|
||||
"hourly": ""
|
||||
},
|
||||
"payrollclaimedtasks": "",
|
||||
"pmbreak": "",
|
||||
"pmshift": "",
|
||||
"shift": "",
|
||||
|
||||
@@ -137,6 +137,9 @@
|
||||
"jobintake": "",
|
||||
"jobinvoiced": "",
|
||||
"jobioucreated": "",
|
||||
"joblineupdate": "",
|
||||
"jobmanualcreate": "",
|
||||
"jobmanuallineinsert": "",
|
||||
"jobmodifylbradj": "",
|
||||
"jobnoteadded": "",
|
||||
"jobnotedeleted": "",
|
||||
@@ -152,7 +155,9 @@
|
||||
"tasks_deleted": "",
|
||||
"tasks_uncompleted": "",
|
||||
"tasks_undeleted": "",
|
||||
"tasks_updated": ""
|
||||
"tasks_updated": "",
|
||||
"timeticketcreated": "",
|
||||
"timeticketupdated": ""
|
||||
}
|
||||
},
|
||||
"billlines": {
|
||||
@@ -318,14 +323,14 @@
|
||||
"addtemplate": "",
|
||||
"newlaborrate": "",
|
||||
"newsalestaxcode": "",
|
||||
"save_shop_information": "",
|
||||
"newstatus": "",
|
||||
"save_shop_information": "",
|
||||
"testrender": ""
|
||||
},
|
||||
"errors": {
|
||||
"creatingdefaultview": "",
|
||||
"duplicate_job_status": "",
|
||||
"duplicate_insurance_company": "",
|
||||
"duplicate_job_status": "",
|
||||
"loading": "Impossible de charger les détails de la boutique. Veuillez appeler le support technique.",
|
||||
"saving": "",
|
||||
"task_preset_allocation_exceeded": ""
|
||||
@@ -365,6 +370,7 @@
|
||||
"cashierid": "",
|
||||
"default_journal": "",
|
||||
"disablebillwip": "",
|
||||
"disablecontact": "",
|
||||
"disablecontactvehiclecreation": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_control_override": "",
|
||||
@@ -422,35 +428,6 @@
|
||||
"logo_img_path": "",
|
||||
"logo_img_path_height": "",
|
||||
"logo_img_path_width": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"md_categories": "",
|
||||
"md_ccc_rates": "",
|
||||
"md_classes": "",
|
||||
@@ -458,6 +435,7 @@
|
||||
"md_email_cc": "",
|
||||
"md_from_emails": "",
|
||||
"md_functionality_toggles": {
|
||||
"enhanced_early_ros": "",
|
||||
"parts_queue_toggle": ""
|
||||
},
|
||||
"md_hour_split": {
|
||||
@@ -706,6 +684,13 @@
|
||||
},
|
||||
"schedule_end_time": "",
|
||||
"schedule_start_time": "",
|
||||
"scoreboard_setup": {
|
||||
"daily_body_target": "",
|
||||
"daily_paint_target": "",
|
||||
"ignore_blocked_days": "",
|
||||
"last_number_working_days": "",
|
||||
"production_target_hours": ""
|
||||
},
|
||||
"shopname": "",
|
||||
"speedprint": {
|
||||
"id": "",
|
||||
@@ -752,6 +737,28 @@
|
||||
"production_statuses": "",
|
||||
"ready_statuses": ""
|
||||
},
|
||||
"system_settings": {
|
||||
"auto_email": {
|
||||
"attach_pdf_to_email": "",
|
||||
"from_emails": "",
|
||||
"parts_order_cc": "",
|
||||
"parts_return_slip_cc": ""
|
||||
},
|
||||
"job_costing": {
|
||||
"paint_hour_split": "",
|
||||
"paint_materials_hourly_cost_rate": "",
|
||||
"prep_hour_split": "",
|
||||
"shop_materials_hourly_cost_rate": "",
|
||||
"target_touch_time": "",
|
||||
"use_paint_scale_data": ""
|
||||
},
|
||||
"local_media_server": {
|
||||
"enabled": "",
|
||||
"http_path": "",
|
||||
"network_path": "",
|
||||
"token": ""
|
||||
}
|
||||
},
|
||||
"target_touchtime": "",
|
||||
"timezone": "",
|
||||
"tt_allow_post_to_invoiced": "",
|
||||
@@ -771,6 +778,7 @@
|
||||
"alljobstatuses": "",
|
||||
"allopenjobstatuses": "",
|
||||
"apptcolors": "",
|
||||
"autoemail": "",
|
||||
"businessinformation": "",
|
||||
"checklists": "",
|
||||
"consent_settings": "",
|
||||
@@ -778,7 +786,6 @@
|
||||
"customtemplates": "",
|
||||
"defaultcostsmapping": "",
|
||||
"defaultprofitsmapping": "",
|
||||
"dms_setup": "",
|
||||
"deliverchecklist": "",
|
||||
"dms": {
|
||||
"cdk": {
|
||||
@@ -793,10 +800,11 @@
|
||||
"rr_dealerid": "",
|
||||
"title": ""
|
||||
},
|
||||
"dms_setup": "",
|
||||
"emaillater": "",
|
||||
"employee_teams": "",
|
||||
"employee_options": "",
|
||||
"employee_rates": "",
|
||||
"employee_teams": "",
|
||||
"employee_vacation": "",
|
||||
"employees": "",
|
||||
"estimators": "",
|
||||
@@ -807,21 +815,22 @@
|
||||
"intakechecklist": "",
|
||||
"intellipay_cash_discount": "",
|
||||
"job_status_options": "",
|
||||
"jobcosting": "",
|
||||
"jobstatuses": "",
|
||||
"jump_to_section": "",
|
||||
"laborrates": "",
|
||||
"licensing": "",
|
||||
"localmediaserver": "",
|
||||
"md_parts_scan": "",
|
||||
"md_ro_guard": "",
|
||||
"md_ro_guard_options": "",
|
||||
"md_tasks_presets": "",
|
||||
"task_preset_options": "",
|
||||
"md_to_emails": "",
|
||||
"md_to_emails_emails": "",
|
||||
"messagingpresets": "",
|
||||
"notification_options": "",
|
||||
"notemplatesavailable": "",
|
||||
"notespresets": "",
|
||||
"jump_to_section": "",
|
||||
"notification_options": "",
|
||||
"notifications": {
|
||||
"followers": ""
|
||||
},
|
||||
@@ -858,9 +867,6 @@
|
||||
"roguard": {
|
||||
"title": ""
|
||||
},
|
||||
"autoemail": "",
|
||||
"jobcosting": "",
|
||||
"localmediaserver": "",
|
||||
"romepay": "",
|
||||
"scheduling": "",
|
||||
"scoreboardsetup": "",
|
||||
@@ -872,6 +878,7 @@
|
||||
"ssbuckets": "",
|
||||
"systemsettings": "",
|
||||
"task-presets": "",
|
||||
"task_preset_options": "",
|
||||
"workingdays": ""
|
||||
},
|
||||
"operations": {
|
||||
@@ -1216,6 +1223,7 @@
|
||||
"confirmdelete": "",
|
||||
"doctype": "",
|
||||
"dragtoupload": "",
|
||||
"greyscale": "Niveaux de gris",
|
||||
"newjobid": "",
|
||||
"openinexplorer": "",
|
||||
"optimizedimage": "",
|
||||
@@ -1346,6 +1354,31 @@
|
||||
"unique_employee_number": ""
|
||||
}
|
||||
},
|
||||
"esignature": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"distribute": "",
|
||||
"redistribute": "",
|
||||
"upload_document": "Upload Document for E-Sign",
|
||||
"view": ""
|
||||
},
|
||||
"errors": {
|
||||
"no_token": "",
|
||||
"pdf_only": "Only PDF documents can be uploaded for e-signature.",
|
||||
"upload_title": "Unable to prepare document for e-signature"
|
||||
},
|
||||
"fields": {
|
||||
"completed": "",
|
||||
"completed_at": "",
|
||||
"created_at": "",
|
||||
"external_document_id": "",
|
||||
"opened": "",
|
||||
"rejected": "",
|
||||
"status": "",
|
||||
"title": "",
|
||||
"updated_at": ""
|
||||
}
|
||||
},
|
||||
"eula": {
|
||||
"buttons": {
|
||||
"accept": "Accept EULA"
|
||||
@@ -1461,8 +1494,8 @@
|
||||
"beta": "",
|
||||
"cancel": "",
|
||||
"changelog": "",
|
||||
"click_to_begin": "",
|
||||
"clear": "",
|
||||
"click_to_begin": "",
|
||||
"confirmpassword": "",
|
||||
"created_at": "",
|
||||
"date": "",
|
||||
@@ -1782,6 +1815,7 @@
|
||||
"actions": {
|
||||
"addDocuments": "Ajouter des documents de travail",
|
||||
"addNote": "Ajouter une note",
|
||||
"addpayer": "",
|
||||
"addtopartsqueue": "",
|
||||
"addtoproduction": "",
|
||||
"addtoscoreboard": "",
|
||||
@@ -1958,6 +1992,7 @@
|
||||
"ded_status": "Statut de franchise",
|
||||
"depreciation_taxes": "Amortissement / taxes",
|
||||
"dms": {
|
||||
"IsARCustomer": "",
|
||||
"address": "",
|
||||
"advisor": "",
|
||||
"amount": "",
|
||||
@@ -2308,6 +2343,8 @@
|
||||
"duplicateconfirm": "",
|
||||
"emailaudit": "",
|
||||
"employeeassignments": "",
|
||||
"esignature_imex": "",
|
||||
"esignature_rome": "",
|
||||
"estimatelines": "",
|
||||
"estimator": "",
|
||||
"existing_jobs": "Emplois existants",
|
||||
@@ -2747,6 +2784,9 @@
|
||||
"alternate-transport-changed": "",
|
||||
"bill-posted": "",
|
||||
"critical-parts-status-changed": "",
|
||||
"esign-document-completed": "E-Sign Document Completed",
|
||||
"esign-document-opened": "E-Sign Document Opened",
|
||||
"esign-document-upload-failed": "E-Sign Document Upload Failed",
|
||||
"intake-delivery-checklist-completed": "",
|
||||
"job-added-to-production": "",
|
||||
"job-assigned-to-me": "",
|
||||
@@ -3259,6 +3299,7 @@
|
||||
"information": "",
|
||||
"layout": "",
|
||||
"statistics": {
|
||||
"exclude_suspended": "",
|
||||
"jobs_in_production": "",
|
||||
"tasks_in_production": "",
|
||||
"tasks_in_view": "",
|
||||
@@ -3750,11 +3791,11 @@
|
||||
"jobhours": "",
|
||||
"lunch": "",
|
||||
"new": "",
|
||||
"payrollclaimedtasks": "",
|
||||
"payout_methods": {
|
||||
"commission": "",
|
||||
"hourly": ""
|
||||
},
|
||||
"payrollclaimedtasks": "",
|
||||
"pmbreak": "",
|
||||
"pmshift": "",
|
||||
"shift": "",
|
||||
|
||||
@@ -10,7 +10,7 @@ const AuditTrailMapping = {
|
||||
billdeleted: (invoice_number) => i18n.t("audit_trail.messages.billdeleted", { invoice_number }),
|
||||
billmarkforreexport: (invoice_number) => i18n.t("audit_trail.messages.billmarkforreexport", { invoice_number }),
|
||||
billposted: (invoice_number) => i18n.t("audit_trail.messages.billposted", { invoice_number }),
|
||||
billupdated: (invoice_number) => i18n.t("audit_trail.messages.billupdated", { invoice_number }),
|
||||
billupdated: (invoice_number, details) => i18n.t("audit_trail.messages.billupdated", { invoice_number, details }),
|
||||
jobassignmentchange: (operation, name) => i18n.t("audit_trail.messages.jobassignmentchange", { operation, name }),
|
||||
jobassignmentremoved: (operation) => i18n.t("audit_trail.messages.jobassignmentremoved", { operation }),
|
||||
jobchecklist: (type, inproduction, status) =>
|
||||
@@ -26,6 +26,10 @@ const AuditTrailMapping = {
|
||||
jobinproductionchange: (inproduction) => i18n.t("audit_trail.messages.jobinproductionchange", { inproduction }),
|
||||
jobinvoiced: () => i18n.t("audit_trail.messages.jobinvoiced"),
|
||||
jobclosedwithbypass: () => i18n.t("audit_trail.messages.jobclosedwithbypass"),
|
||||
joblineupdate: (lineDescription, details) =>
|
||||
i18n.t("audit_trail.messages.joblineupdate", { details, lineDescription }),
|
||||
jobmanualcreate: () => i18n.t("audit_trail.messages.jobmanualcreate"),
|
||||
jobmanuallineinsert: (details) => i18n.t("audit_trail.messages.jobmanuallineinsert", { details }),
|
||||
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"),
|
||||
@@ -72,7 +76,11 @@ const AuditTrailMapping = {
|
||||
i18n.t("audit_trail.messages.tasks_uncompleted", {
|
||||
title,
|
||||
uncompletedBy
|
||||
})
|
||||
}),
|
||||
timeticketcreated: (employee, date, details) =>
|
||||
i18n.t("audit_trail.messages.timeticketcreated", { employee, date, details }),
|
||||
timeticketupdated: (employee, date, details) =>
|
||||
i18n.t("audit_trail.messages.timeticketupdated", { employee, date, details })
|
||||
};
|
||||
|
||||
export default AuditTrailMapping;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import i18n from "i18next";
|
||||
//import { store } from "../redux/store";
|
||||
import { DMS_MAP } from "./dmsUtils";
|
||||
import InstanceRenderManager from "./instanceRenderMgr";
|
||||
|
||||
export const EmailSettings = {
|
||||
@@ -570,7 +571,8 @@ export const TemplateList = (type, context) => {
|
||||
key: "dms_posting_sheet",
|
||||
disabled: false,
|
||||
group: "financial",
|
||||
dms: true
|
||||
dms: true,
|
||||
excludedDmsModes: [DMS_MAP.reynolds]
|
||||
},
|
||||
worksheet_sorted_by_team: {
|
||||
title: i18n.t("printcenter.jobs.worksheet_sorted_by_team"),
|
||||
|
||||
186
client/src/utils/auditTrailDetails.js
Normal file
186
client/src/utils/auditTrailDetails.js
Normal file
@@ -0,0 +1,186 @@
|
||||
import dayjs from "./day";
|
||||
|
||||
const EMPTY_VALUE = "<<empty>>";
|
||||
const NO_CHANGES = "No changes";
|
||||
|
||||
const BILL_LINE_KEYS = ["line_desc", "quantity", "actual_price", "actual_cost", "cost_center"];
|
||||
const JOB_LINE_SKIP_KEYS = new Set(["ah_detail_line", "prt_dsmk_p"]);
|
||||
const DATE_ONLY_KEYS = new Set(["date"]);
|
||||
const DATE_TIME_KEYS = new Set(["clockon", "clockoff"]);
|
||||
const CURRENCY_KEYS = new Set(["actual_price", "actual_cost", "act_price", "db_price", "rate"]);
|
||||
const HOUR_KEYS = new Set(["productivehrs", "actualhrs", "mod_lb_hrs"]);
|
||||
|
||||
const isBlank = (value) => value == null || value === "";
|
||||
|
||||
const isStructuredValue = (value) => value != null && typeof value === "object" && !dayjs.isDayjs?.(value);
|
||||
|
||||
const formatDate = (value) => (isBlank(value) ? EMPTY_VALUE : dayjs(value).format("YYYY-MM-DD"));
|
||||
|
||||
const formatDateTime = (value) => (isBlank(value) ? EMPTY_VALUE : dayjs(value).format("YYYY-MM-DD HH:mm"));
|
||||
|
||||
const formatNumber = (value, fractionDigits) =>
|
||||
typeof value === "number" ? value.toFixed(fractionDigits) : String(value);
|
||||
|
||||
const compareValue = (key, value) => {
|
||||
if (isBlank(value)) return EMPTY_VALUE;
|
||||
if (DATE_TIME_KEYS.has(key)) return formatDateTime(value);
|
||||
if (DATE_ONLY_KEYS.has(key)) return formatDate(value);
|
||||
if (dayjs.isDayjs?.(value)) return formatDateTime(value);
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const buildFieldChangeDetails = ({ keys, original = {}, updated = {}, displayValue, skippedKeys = new Set() }) =>
|
||||
keys
|
||||
.filter((key) => key !== "__typename" && !skippedKeys.has(key))
|
||||
.filter((key) => !isStructuredValue(original[key]) && !isStructuredValue(updated[key]))
|
||||
.map((key) => {
|
||||
if (compareValue(key, original[key]) === compareValue(key, updated[key])) return null;
|
||||
return `${key}: ${displayValue(key, original[key])} -> ${displayValue(key, updated[key])}`;
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
const formatBillValue = (key, value) => {
|
||||
if (isBlank(value)) return EMPTY_VALUE;
|
||||
if (DATE_ONLY_KEYS.has(key)) return formatDate(value);
|
||||
if (CURRENCY_KEYS.has(key)) return typeof value === "number" ? `$${value.toFixed(2)}` : String(value);
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const formatJobLineValue = (key, value) => {
|
||||
if (isBlank(value)) return EMPTY_VALUE;
|
||||
if (CURRENCY_KEYS.has(key)) return typeof value === "number" ? `$${value.toFixed(2)}` : String(value);
|
||||
if (HOUR_KEYS.has(key)) return formatNumber(value, 1);
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const getEmployeeName = (employeeId, employees = [], fallbackEmployee) => {
|
||||
if (
|
||||
(employeeId == null || fallbackEmployee?.id === employeeId) &&
|
||||
(fallbackEmployee?.first_name || fallbackEmployee?.last_name)
|
||||
) {
|
||||
return [fallbackEmployee.first_name, fallbackEmployee.last_name].filter(Boolean).join(" ");
|
||||
}
|
||||
|
||||
const employee = employees.find(({ id }) => id === employeeId);
|
||||
if (employee) {
|
||||
return [employee.first_name, employee.last_name].filter(Boolean).join(" ");
|
||||
}
|
||||
|
||||
return employeeId ? String(employeeId) : EMPTY_VALUE;
|
||||
};
|
||||
|
||||
const formatTimeTicketValue = (key, value, { employees = [], fallbackEmployee } = {}) => {
|
||||
if (isBlank(value)) return EMPTY_VALUE;
|
||||
if (key === "employeeid") return getEmployeeName(value, employees, fallbackEmployee);
|
||||
if (DATE_TIME_KEYS.has(key)) return formatDateTime(value);
|
||||
if (DATE_ONLY_KEYS.has(key)) return formatDate(value);
|
||||
if (CURRENCY_KEYS.has(key)) return typeof value === "number" ? `$${value.toFixed(2)}` : String(value);
|
||||
if (HOUR_KEYS.has(key)) return formatNumber(value, 1);
|
||||
if (typeof value === "boolean") return value ? "true" : "false";
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const buildBillLineSummary = (line) =>
|
||||
BILL_LINE_KEYS.map((key) => `${key}: ${formatBillValue(key, line[key])}`).join(", ");
|
||||
|
||||
export function buildBillUpdateAuditDetails({ originalBill = {}, bill = {}, billlines = [] }) {
|
||||
const updatedBill = { ...bill, billlines };
|
||||
const billKeys = Array.from(new Set([...Object.keys(originalBill), ...Object.keys(updatedBill)])).filter(
|
||||
(key) => key !== "billlines"
|
||||
);
|
||||
|
||||
const changed = buildFieldChangeDetails({
|
||||
keys: billKeys,
|
||||
original: originalBill,
|
||||
updated: updatedBill,
|
||||
displayValue: formatBillValue
|
||||
});
|
||||
|
||||
const originalBillLines = originalBill.billlines ?? [];
|
||||
const updatedBillLines = updatedBill.billlines ?? [];
|
||||
|
||||
const addedLines = updatedBillLines
|
||||
.filter((line) => !line.id)
|
||||
.map((line) => `+${line.line_desc || line.description || "new line"} (${buildBillLineSummary(line)})`);
|
||||
|
||||
const removedLines = originalBillLines
|
||||
.filter((line) => !updatedBillLines.some((updatedLine) => updatedLine.id === line.id))
|
||||
.map(
|
||||
(line) => `-${line.line_desc || line.description || line.id || "removed line"} (${buildBillLineSummary(line)})`
|
||||
);
|
||||
|
||||
const modifiedLines = updatedBillLines
|
||||
.filter((line) => line.id)
|
||||
.flatMap((line) => {
|
||||
const originalLine = originalBillLines.find(({ id }) => id === line.id);
|
||||
if (!originalLine) return [];
|
||||
|
||||
const lineChanges = buildFieldChangeDetails({
|
||||
keys: BILL_LINE_KEYS,
|
||||
original: originalLine,
|
||||
updated: line,
|
||||
displayValue: formatBillValue
|
||||
});
|
||||
|
||||
if (!lineChanges.length) return [];
|
||||
|
||||
return [`${line.line_desc || line.description || line.id}: ${lineChanges.join("; ")}`];
|
||||
});
|
||||
|
||||
if (addedLines.length) changed.push(`billlines added: ${addedLines.join(" | ")}`);
|
||||
if (removedLines.length) changed.push(`billlines removed: ${removedLines.join(" | ")}`);
|
||||
if (modifiedLines.length) changed.push(`billlines modified: ${modifiedLines.join(" | ")}`);
|
||||
|
||||
return changed.length ? changed.join("; ") : NO_CHANGES;
|
||||
}
|
||||
|
||||
export function buildJobLineInsertAuditDetails(values = {}) {
|
||||
const details = Object.entries(values)
|
||||
.filter(([key, value]) => !JOB_LINE_SKIP_KEYS.has(key) && !isBlank(value))
|
||||
.map(([key, value]) => `${key}: ${formatJobLineValue(key, value)}`);
|
||||
|
||||
return details.length ? details.join("; ") : NO_CHANGES;
|
||||
}
|
||||
|
||||
export function buildJobLineUpdateAuditDetails({ originalLine = {}, values = {} }) {
|
||||
const details = buildFieldChangeDetails({
|
||||
keys: Object.keys(values),
|
||||
original: originalLine,
|
||||
updated: values,
|
||||
displayValue: formatJobLineValue,
|
||||
skippedKeys: JOB_LINE_SKIP_KEYS
|
||||
});
|
||||
|
||||
return details.length ? details.join("; ") : NO_CHANGES;
|
||||
}
|
||||
|
||||
export function buildTimeTicketAuditSummary({ originalTicket = {}, submittedValues = {}, employees = [] }) {
|
||||
const normalizedOriginal = {
|
||||
...originalTicket,
|
||||
jobid: originalTicket.job?.id ?? originalTicket.jobid ?? null
|
||||
};
|
||||
|
||||
const details = buildFieldChangeDetails({
|
||||
keys: Object.keys(submittedValues),
|
||||
original: normalizedOriginal,
|
||||
updated: submittedValues,
|
||||
displayValue: (key, value) =>
|
||||
formatTimeTicketValue(key, value, {
|
||||
employees,
|
||||
fallbackEmployee: key === "employeeid" ? normalizedOriginal.employee : null
|
||||
})
|
||||
});
|
||||
|
||||
const employeeName = getEmployeeName(
|
||||
submittedValues.employeeid ?? normalizedOriginal.employeeid,
|
||||
employees,
|
||||
normalizedOriginal.employee
|
||||
);
|
||||
|
||||
return {
|
||||
date: formatDate(submittedValues.date ?? normalizedOriginal.date),
|
||||
details: details.length ? details.join("; ") : NO_CHANGES,
|
||||
employeeName,
|
||||
jobid: submittedValues.jobid ?? normalizedOriginal.jobid ?? null
|
||||
};
|
||||
}
|
||||
7
client/src/utils/esignature.js
Normal file
7
client/src/utils/esignature.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export const hasDocumensoApiKey = (bodyshop) => {
|
||||
if (typeof bodyshop?.documenso_api_key === "string") {
|
||||
return bodyshop.documenso_api_key.trim().length > 0;
|
||||
}
|
||||
|
||||
return Boolean(bodyshop?.documenso_api_key);
|
||||
};
|
||||
@@ -2,7 +2,7 @@
|
||||
* @description This file contains the scenarios for job notifications.
|
||||
* @type {string[]}
|
||||
*/
|
||||
const notificationScenarios = [
|
||||
const baseNotificationScenarios = [
|
||||
"job-assigned-to-me",
|
||||
"bill-posted",
|
||||
"critical-parts-status-changed",
|
||||
@@ -20,4 +20,26 @@ const notificationScenarios = [
|
||||
// "supplement-imported", // Disabled for now
|
||||
];
|
||||
|
||||
export { notificationScenarios };
|
||||
const esignNotificationScenarios = [
|
||||
"esign-document-opened",
|
||||
"esign-document-completed",
|
||||
"esign-document-upload-failed"
|
||||
];
|
||||
|
||||
const notificationScenarios = [...baseNotificationScenarios, ...esignNotificationScenarios];
|
||||
|
||||
const getNotificationScenarios = ({ includeEsign = true } = {}) =>
|
||||
includeEsign ? notificationScenarios : baseNotificationScenarios;
|
||||
|
||||
/**
|
||||
* Default channel preferences for e-sign document notifications. By default, all e-sign related notifications will be
|
||||
* sent via the app, but not via email or FCM. These defaults can be overridden by user preferences.
|
||||
* @type {{"esign-document-opened": {app: boolean, email: boolean, fcm: boolean}, "esign-document-completed": {app: boolean, email: boolean, fcm: boolean}, "esign-document-upload-failed": {app: boolean, email: boolean, fcm: boolean}}}
|
||||
*/
|
||||
const notificationScenarioDefaults = {
|
||||
"esign-document-opened": { app: true, email: false, fcm: false },
|
||||
"esign-document-completed": { app: true, email: false, fcm: false },
|
||||
"esign-document-upload-failed": { app: true, email: false, fcm: false }
|
||||
};
|
||||
|
||||
export { esignNotificationScenarios, getNotificationScenarios, notificationScenarios, notificationScenarioDefaults };
|
||||
|
||||
28
client/src/utils/replaceAccents.js
Normal file
28
client/src/utils/replaceAccents.js
Normal file
@@ -0,0 +1,28 @@
|
||||
export const replaceAccents = (str) => {
|
||||
// Verifies if the String has accents and replace them
|
||||
if (str.search(/[\xC0-\xFF]/g) > -1) {
|
||||
str = str
|
||||
.replace(/[\xC0-\xC5]/g, "A")
|
||||
.replace(/[\xC6]/g, "AE")
|
||||
.replace(/[\xC7]/g, "C")
|
||||
.replace(/[\xC8-\xCB]/g, "E")
|
||||
.replace(/[\xCC-\xCF]/g, "I")
|
||||
.replace(/[\xD0]/g, "D")
|
||||
.replace(/[\xD1]/g, "N")
|
||||
.replace(/[\xD2-\xD6\xD8]/g, "O")
|
||||
.replace(/[\xD9-\xDC]/g, "U")
|
||||
.replace(/[\xDD]/g, "Y")
|
||||
.replace(/[\xDE]/g, "P")
|
||||
.replace(/[\xE0-\xE5]/g, "a")
|
||||
.replace(/[\xE6]/g, "ae")
|
||||
.replace(/[\xE7]/g, "c")
|
||||
.replace(/[\xE8-\xEB]/g, "e")
|
||||
.replace(/[\xEC-\xEF]/g, "i")
|
||||
.replace(/[\xF1]/g, "n")
|
||||
.replace(/[\xF2-\xF6\xF8]/g, "o")
|
||||
.replace(/[\xF9-\xFC]/g, "u")
|
||||
.replace(/[\xFE]/g, "p")
|
||||
.replace(/[\xFD\xFF]/g, "y");
|
||||
}
|
||||
return str;
|
||||
};
|
||||
24
documenso/cert/certificate.crt
Normal file
24
documenso/cert/certificate.crt
Normal file
@@ -0,0 +1,24 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID9zCCAt+gAwIBAgIUTB4OhIqfXvT0mBKHwYAwDPq79ygwDQYJKoZIhvcNAQEL
|
||||
BQAwgYoxCzAJBgNVBAYTAkNBMQswCQYDVQQIDAJCQzESMBAGA1UEBwwJVmFuY291
|
||||
dmVyMRowGAYDVQQKDBFJbUVYIFN5c3RlbXMgSW5jLjEXMBUGA1UEAwwOaW1leHN5
|
||||
c3RlbXMuY2ExJTAjBgkqhkiG9w0BCQEWFmNvbnRhY3RAaW1leHN5c3RlbXMuY2Ew
|
||||
HhcNMjYwNDEzMjAxMDIzWhcNMzYwNDEwMjAxMDIzWjCBijELMAkGA1UEBhMCQ0Ex
|
||||
CzAJBgNVBAgMAkJDMRIwEAYDVQQHDAlWYW5jb3V2ZXIxGjAYBgNVBAoMEUltRVgg
|
||||
U3lzdGVtcyBJbmMuMRcwFQYDVQQDDA5pbWV4c3lzdGVtcy5jYTElMCMGCSqGSIb3
|
||||
DQEJARYWY29udGFjdEBpbWV4c3lzdGVtcy5jYTCCASIwDQYJKoZIhvcNAQEBBQAD
|
||||
ggEPADCCAQoCggEBAPE+5bcnfYsMyLzJr50bzpHHP8I+cdSkvu7lwGysPZCCxi4Z
|
||||
vkIDq4Q5xDa3ZZCeNZ9feELqm9ZjWpnaZj4CMbXMDpIucZHQJC9USCGavYhzNYu2
|
||||
G3IU7D834jd8GkwGMQuXkGiuQmQssIZIKfX+MaZ0KKrh8gJbxXZOfCp3fdYOnFPq
|
||||
BFCR0N/gTbeRboq36dG4vo1FanDLGroMS7FycGjyUTQv3CTWkGAOAPGQVrGZgvYM
|
||||
DtFr+7M2J/KCbUMobK0uc1scAjLgetXknzVPU3qA66F3Hi7oWykoFX8m9oX/OJnK
|
||||
/Gt8rIjRMOyQSK7dKT7qXCxgQVQnqHbyUCX4WUkCAwEAAaNTMFEwHQYDVR0OBBYE
|
||||
FIRKLjeI+adC7yNg6cSDj72Kej11MB8GA1UdIwQYMBaAFIRKLjeI+adC7yNg6cSD
|
||||
j72Kej11MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAAHCSjlG
|
||||
bo5miEfisKffPyfzufBIhOLLORasuFQ3gVKBU32JytuoflABfcqy3prgZxbFLMB2
|
||||
fDcSImKuOtt79OMeMlA+ptfkWuOpFMqL2j6BilzjJ/MAlPAZlZmmuLh/fPj3lbMD
|
||||
QQds/YhSmZcTdRX8seQslnYq1AT7629BDbpCjjL3pRkntnePR7u8tgb28Pm8Vl3S
|
||||
uCnGS/mMxrS/7z+QnaDi1N/nyIwa2bQtGmsoMn+CzuUUjyMD4TYbdUJv+fca8/tR
|
||||
zezNEHcpBCKGGgZRowhifJwEoel0M1iEo8UYy5eFPDF8CoRGRIH7QSaduCfnej06
|
||||
KLtevL/vyhUpTMA=
|
||||
-----END CERTIFICATE-----
|
||||
BIN
documenso/cert/certificate.p12
Normal file
BIN
documenso/cert/certificate.p12
Normal file
Binary file not shown.
72
documenso/docker-compose.yml
Normal file
72
documenso/docker-compose.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
name: documenso-production
|
||||
|
||||
services:
|
||||
database:
|
||||
image: postgres:15
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER:?err}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
|
||||
- POSTGRES_DB=${POSTGRES_DB:?err}
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER}']
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
|
||||
documenso:
|
||||
image: documenso/documenso:latest
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- PORT=${PORT:-3000}
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:?err}
|
||||
- NEXT_PRIVATE_ENCRYPTION_KEY=${NEXT_PRIVATE_ENCRYPTION_KEY:?err}
|
||||
- NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY:?err}
|
||||
- NEXT_PRIVATE_GOOGLE_CLIENT_ID=${NEXT_PRIVATE_GOOGLE_CLIENT_ID}
|
||||
- NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=${NEXT_PRIVATE_GOOGLE_CLIENT_SECRET}
|
||||
- NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL:?err}
|
||||
- NEXT_PRIVATE_INTERNAL_WEBAPP_URL=${NEXT_PRIVATE_INTERNAL_WEBAPP_URL:-http://localhost:$PORT}
|
||||
- NEXT_PRIVATE_DATABASE_URL=${NEXT_PRIVATE_DATABASE_URL:?err}
|
||||
- NEXT_PRIVATE_DIRECT_DATABASE_URL=${NEXT_PRIVATE_DIRECT_DATABASE_URL:-${NEXT_PRIVATE_DATABASE_URL}}
|
||||
- NEXT_PUBLIC_UPLOAD_TRANSPORT=${NEXT_PUBLIC_UPLOAD_TRANSPORT:-database}
|
||||
- NEXT_PRIVATE_UPLOAD_ENDPOINT=${NEXT_PRIVATE_UPLOAD_ENDPOINT}
|
||||
- NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE=${NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE}
|
||||
- NEXT_PRIVATE_UPLOAD_REGION=${NEXT_PRIVATE_UPLOAD_REGION}
|
||||
- NEXT_PRIVATE_UPLOAD_BUCKET=${NEXT_PRIVATE_UPLOAD_BUCKET}
|
||||
- NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID=${NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID}
|
||||
- NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY=${NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY}
|
||||
- NEXT_PRIVATE_SMTP_TRANSPORT=${NEXT_PRIVATE_SMTP_TRANSPORT:?err}
|
||||
- NEXT_PRIVATE_SMTP_HOST=${NEXT_PRIVATE_SMTP_HOST}
|
||||
- NEXT_PRIVATE_SMTP_PORT=${NEXT_PRIVATE_SMTP_PORT}
|
||||
- NEXT_PRIVATE_SMTP_USERNAME=${NEXT_PRIVATE_SMTP_USERNAME}
|
||||
- NEXT_PRIVATE_SMTP_PASSWORD=${NEXT_PRIVATE_SMTP_PASSWORD}
|
||||
- NEXT_PRIVATE_SMTP_APIKEY_USER=${NEXT_PRIVATE_SMTP_APIKEY_USER}
|
||||
- NEXT_PRIVATE_SMTP_APIKEY=${NEXT_PRIVATE_SMTP_APIKEY}
|
||||
- NEXT_PRIVATE_SMTP_SECURE=${NEXT_PRIVATE_SMTP_SECURE}
|
||||
- NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS=${NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS}
|
||||
- NEXT_PRIVATE_SMTP_FROM_NAME=${NEXT_PRIVATE_SMTP_FROM_NAME:?err}
|
||||
- NEXT_PRIVATE_SMTP_FROM_ADDRESS=${NEXT_PRIVATE_SMTP_FROM_ADDRESS:?err}
|
||||
- NEXT_PRIVATE_SMTP_SERVICE=${NEXT_PRIVATE_SMTP_SERVICE}
|
||||
- NEXT_PRIVATE_RESEND_API_KEY=${NEXT_PRIVATE_RESEND_API_KEY}
|
||||
- NEXT_PRIVATE_MAILCHANNELS_API_KEY=${NEXT_PRIVATE_MAILCHANNELS_API_KEY}
|
||||
- NEXT_PRIVATE_MAILCHANNELS_ENDPOINT=${NEXT_PRIVATE_MAILCHANNELS_ENDPOINT}
|
||||
- NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN=${NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN}
|
||||
- NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR=${NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR}
|
||||
- NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY=${NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY}
|
||||
- NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT=${NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT}
|
||||
- NEXT_PUBLIC_POSTHOG_KEY=${NEXT_PUBLIC_POSTHOG_KEY}
|
||||
- NEXT_PUBLIC_DISABLE_SIGNUP=${NEXT_PUBLIC_DISABLE_SIGNUP}
|
||||
- NEXT_PRIVATE_ALLOWED_SIGNUP_DOMAINS=${NEXT_PRIVATE_ALLOWED_SIGNUP_DOMAINS}
|
||||
- NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH=${NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH:-/opt/documenso/cert.p12}
|
||||
- NEXT_PRIVATE_SIGNING_PASSPHRASE=${NEXT_PRIVATE_SIGNING_PASSPHRASE}
|
||||
- NEXT_PUBLIC_USE_INTERNAL_URL_BROWSERLESS=${NEXT_PUBLIC_USE_INTERNAL_URL_BROWSERLESS}
|
||||
ports:
|
||||
- ${PORT:-3000}:${PORT:-3000}
|
||||
volumes:
|
||||
- /opt/documenso/cert.p12:/opt/documenso/cert.p12:ro
|
||||
|
||||
volumes:
|
||||
database:
|
||||
45
documenso/terraform/.terraform.lock.hcl
generated
Normal file
45
documenso/terraform/.terraform.lock.hcl
generated
Normal file
@@ -0,0 +1,45 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/aws" {
|
||||
version = "6.38.0"
|
||||
constraints = "~> 6.0"
|
||||
hashes = [
|
||||
"h1:RDoKIzXmt7H1mNFcNIyRT+nA/gTJyO3+iW9QGN5I2eQ=",
|
||||
"zh:143f118ae71059a7a7026c6b950da23fef04a06e2362ffa688bef75e43e869ed",
|
||||
"zh:29ee220a017306effd877e1280f8b2934dc957e16e0e72ca0222e5514d0db522",
|
||||
"zh:3a31baabf7aea7aa7669f5a3d76f3445e0e6cce5e9aea0279992765c0df12aee",
|
||||
"zh:4c1908e62040dbc9901d4426ffb253f53e5dae9e3e1a9125311291ee265c8d8c",
|
||||
"zh:550f4789f5f5b00e16118d4c17770be3ef4535d6b6928af1cf91ebd30f2c263b",
|
||||
"zh:6537b7b70bf2c127771b0b84e4b726c834d10666b6104f017edae50c67ebae37",
|
||||
"zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425",
|
||||
"zh:af2f9cea0c8bdf5b2a2391f2d179a946c117196f7c829b919673cae3b71d2943",
|
||||
"zh:c53ffa685381aa4e73158fd9f529239f95938dea330e7aca0b32e7b2a1210432",
|
||||
"zh:d0995e1d64a7ec8bbc79fc3fbec3749f989e07f211a318705c37cd6a7c7d19e4",
|
||||
"zh:d2348ffcffc1282983d7a5838dd5d61f372152fe6c0d10868cd6473352318750",
|
||||
"zh:e449312efb73e4747165e689302a68a1df8ba5755e7f59097069acf82c94f011",
|
||||
"zh:ec3a538d264ef79380e56fdf107ffb6c0446814f07fc5890c36855fe1e03196b",
|
||||
"zh:f441e69699b22e32c96a8cdd3bbe694ed302c0dcfe867cd9bd683a16df362714",
|
||||
"zh:f6f8eaa605ff902234d7e9bdab4fda977185fce14f8576f7b622c914c7d98008",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/random" {
|
||||
version = "3.8.1"
|
||||
constraints = "~> 3.6"
|
||||
hashes = [
|
||||
"h1:u8AKlWVDTH5r9YLSeswoVEjiY72Rt4/ch7U+61ZDkiQ=",
|
||||
"zh:08dd03b918c7b55713026037c5400c48af5b9f468f483463321bd18e17b907b4",
|
||||
"zh:0eee654a5542dc1d41920bbf2419032d6f0d5625b03bd81339e5b33394a3e0ae",
|
||||
"zh:229665ddf060aa0ed315597908483eee5b818a17d09b6417a0f52fd9405c4f57",
|
||||
"zh:2469d2e48f28076254a2a3fc327f184914566d9e40c5780b8d96ebf7205f8bc0",
|
||||
"zh:37d7eb334d9561f335e748280f5535a384a88675af9a9eac439d4cfd663bcb66",
|
||||
"zh:741101426a2f2c52dee37122f0f4a2f2d6af6d852cb1db634480a86398fa3511",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:a902473f08ef8df62cfe6116bd6c157070a93f66622384300de235a533e9d4a9",
|
||||
"zh:b85c511a23e57a2147355932b3b6dce2a11e856b941165793a0c3d7578d94d05",
|
||||
"zh:c5172226d18eaac95b1daac80172287b69d4ce32750c82ad77fa0768be4ea4b8",
|
||||
"zh:dab4434dba34aad569b0bc243c2d3f3ff86dd7740def373f2a49816bd2ff819b",
|
||||
"zh:f49fd62aa8c5525a5c17abd51e27ca5e213881d58882fd42fec4a545b53c9699",
|
||||
]
|
||||
}
|
||||
60
documenso/terraform/README.md
Normal file
60
documenso/terraform/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Documenso on AWS
|
||||
|
||||
This Terraform stack deploys Documenso to AWS in `ca-central-1` using:
|
||||
|
||||
- ECS Fargate for the application tier
|
||||
- RDS PostgreSQL for the database tier
|
||||
- S3 for document uploads and signed PDFs
|
||||
- Application Load Balancer with ACM-managed TLS
|
||||
- Route53 DNS for `esignature.imex.online`
|
||||
- Optional SES domain identity and DKIM management for outbound email
|
||||
- Secrets Manager for generated application secrets, SMTP credentials, and the optional Documenso signing certificate
|
||||
- AWS WAF with a basic managed rule set, rate limiting, and an allowlist for trusted IPv4 CIDRs
|
||||
- CloudWatch alarms for ALB, ECS, and RDS health indicators
|
||||
|
||||
## Why this shape
|
||||
|
||||
This is the most practical fit for your Docker Compose workload if you want a balance of cost efficiency, managed operations, and scaling:
|
||||
|
||||
- Fargate gives you horizontal scaling without managing EC2 hosts.
|
||||
- RDS PostgreSQL is simpler and cheaper than Aurora for a single Documenso workload.
|
||||
- S3-backed uploads are better for production scale and keep document growth out of PostgreSQL.
|
||||
- The database stays private; the ALB is public.
|
||||
- The ECS tasks run in public subnets to avoid a NAT gateway charge. Inbound access is still restricted to the ALB security group.
|
||||
- HTTPS is terminated by the ALB using ACM. The Documenso self-signed `.p12` certificate is separate and is used for document signing, not browser TLS.
|
||||
|
||||
## Files
|
||||
|
||||
- `main.tf`: core infrastructure
|
||||
- `variables.tf`: configurable inputs
|
||||
- `outputs.tf`: useful deployment outputs
|
||||
- `terraform.tfvars.example`: example input values
|
||||
|
||||
## Assumptions built into this stack
|
||||
|
||||
1. Your DNS for `imex.online` is hosted in Route53.
|
||||
2. You want Multi-AZ RDS enabled from the start for database availability.
|
||||
3. You are comfortable starting with `documenso/documenso:latest`. For repeatable deployments, pin a version or digest after your first rollout.
|
||||
4. You will provide SES SMTP credentials. Terraform does not derive SMTP passwords for you.
|
||||
5. SES identity and DKIM might already be managed outside this stack. By default, this Terraform does not attempt to create them.
|
||||
6. You will provide a base64-encoded PKCS#12 signing certificate and passphrase if you want document signing enabled immediately. This stack injects those values through Secrets Manager instead of mounting a host file.
|
||||
7. You are comfortable with Terraform creating a dedicated IAM user and access key for Documenso S3 uploads because Documenso documents explicit S3 credentials for the upload backend.
|
||||
8. You want Terraform destroy protection enabled for both the database and the uploads bucket.
|
||||
|
||||
## Deploy
|
||||
|
||||
1. Copy `terraform.tfvars.example` to `terraform.tfvars` and fill in the SMTP values.
|
||||
2. If you want Documenso signing enabled, add `signing_certificate_base64` and `signing_certificate_passphrase`.
|
||||
3. Optionally set `upload_bucket_name` if you want a specific S3 bucket name.
|
||||
4. Set `manage_ses_resources = true` only if you want this stack to own SES identity verification and DKIM records.
|
||||
5. Set `waf_bypass_ipv4_cidrs` with any public `/32` addresses that should bypass WAF inspection. The VPC CIDR is already allowlisted automatically.
|
||||
6. Run `terraform init`.
|
||||
7. Run `terraform plan`.
|
||||
8. Run `terraform apply`.
|
||||
|
||||
## Recommended first production adjustments
|
||||
|
||||
1. Pin the Documenso image to a tested version or digest.
|
||||
2. Wire `alarm_actions` to an SNS topic, PagerDuty bridge, or your on-call system so alarms notify someone.
|
||||
3. Expand the WAF rule set if you need more aggressive filtering later.
|
||||
4. Add CloudWatch alarms on ECS 5xx errors, ALB target health, and RDS CPU/storage.
|
||||
1052
documenso/terraform/main.tf
Normal file
1052
documenso/terraform/main.tf
Normal file
File diff suppressed because it is too large
Load Diff
44
documenso/terraform/outputs.tf
Normal file
44
documenso/terraform/outputs.tf
Normal file
@@ -0,0 +1,44 @@
|
||||
output "application_url" {
|
||||
description = "Public URL for the Documenso deployment."
|
||||
value = "https://${var.domain_name}"
|
||||
}
|
||||
|
||||
output "load_balancer_dns_name" {
|
||||
description = "DNS name assigned to the application load balancer."
|
||||
value = aws_lb.this.dns_name
|
||||
}
|
||||
|
||||
output "database_endpoint" {
|
||||
description = "RDS PostgreSQL endpoint for the application."
|
||||
value = aws_db_instance.postgres.address
|
||||
}
|
||||
|
||||
output "postgres_engine_version" {
|
||||
description = "Resolved PostgreSQL engine version deployed to RDS."
|
||||
value = aws_db_instance.postgres.engine_version
|
||||
}
|
||||
|
||||
output "ecs_cluster_name" {
|
||||
description = "ECS cluster name running the Documenso service."
|
||||
value = aws_ecs_cluster.this.name
|
||||
}
|
||||
|
||||
output "secrets_manager_secret_name" {
|
||||
description = "Secrets Manager secret that stores generated and supplied application secrets."
|
||||
value = aws_secretsmanager_secret.app.name
|
||||
}
|
||||
|
||||
output "ses_identity_domain" {
|
||||
description = "SES domain used for outbound mail."
|
||||
value = local.ses_domain
|
||||
}
|
||||
|
||||
output "upload_bucket_name" {
|
||||
description = "S3 bucket used for Documenso uploads."
|
||||
value = aws_s3_bucket.uploads.bucket
|
||||
}
|
||||
|
||||
output "waf_web_acl_arn" {
|
||||
description = "ARN of the WAF web ACL attached to the ALB."
|
||||
value = aws_wafv2_web_acl.this.arn
|
||||
}
|
||||
3994
documenso/terraform/terraform.tfstate
Normal file
3994
documenso/terraform/terraform.tfstate
Normal file
File diff suppressed because one or more lines are too long
3977
documenso/terraform/terraform.tfstate.backup
Normal file
3977
documenso/terraform/terraform.tfstate.backup
Normal file
File diff suppressed because one or more lines are too long
24
documenso/terraform/terraform.tfvars.example
Normal file
24
documenso/terraform/terraform.tfvars.example
Normal file
@@ -0,0 +1,24 @@
|
||||
aws_region = "ca-central-1"
|
||||
domain_name = "esignature.imex.online"
|
||||
hosted_zone_name = "imex.online"
|
||||
documenso_image = "documenso/documenso:latest"
|
||||
smtp_username = "AKIA2MRSPON3O6PRVUPE"
|
||||
smtp_password = "pw"
|
||||
smtp_from_address = "no-reply@imex.online"
|
||||
manage_ses_resources = false
|
||||
ses_identity_domain = "imex.online"
|
||||
app_secret_name = "documenso/esignature-imex-online/app"
|
||||
# signing_certificate_base64 = "MII...base64-encoded-p12..."
|
||||
# signing_certificate_passphrase = "replace-with-your-p12-passphrase"
|
||||
# upload_bucket_name = "esignature-imex-online-documenso"
|
||||
|
||||
# Optional tuning
|
||||
# desired_count = 2
|
||||
# max_count = 6
|
||||
waf_bypass_ipv4_cidrs = ["203.0.113.10/32"]
|
||||
db_instance_class = "db.t4g.micro"
|
||||
db_publicly_accessible = true
|
||||
db_allowed_cidrs = ["64.46.30.40/32"]
|
||||
disable_signup = false
|
||||
# allowed_signup_domains = "imex.online"
|
||||
# alarm_actions = ["arn:aws:sns:ca-central-1:123456789012:ops-alerts"]
|
||||
318
documenso/terraform/variables.tf
Normal file
318
documenso/terraform/variables.tf
Normal file
@@ -0,0 +1,318 @@
|
||||
variable "aws_region" {
|
||||
description = "AWS region for the deployment."
|
||||
type = string
|
||||
default = "ca-central-1"
|
||||
}
|
||||
|
||||
variable "project_name" {
|
||||
description = "Logical name used to prefix created resources."
|
||||
type = string
|
||||
default = "documenso"
|
||||
}
|
||||
|
||||
variable "domain_name" {
|
||||
description = "Fully qualified domain name for the application."
|
||||
type = string
|
||||
default = "esignature.imex.online"
|
||||
}
|
||||
|
||||
variable "hosted_zone_name" {
|
||||
description = "Public Route53 hosted zone that contains the application hostname."
|
||||
type = string
|
||||
default = "imex.online"
|
||||
}
|
||||
|
||||
variable "ses_identity_domain" {
|
||||
description = "Domain used for SES. Defaults to the hosted zone when null. If manage_ses_resources is false, this is informational and used only for outputs/documentation."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "manage_ses_resources" {
|
||||
description = "Whether this Terraform stack should create and manage the SES domain identity, verification record, and DKIM records. Disable this when SES is already configured elsewhere."
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "documenso_image" {
|
||||
description = "Container image for Documenso. Default keeps you on the latest published image."
|
||||
type = string
|
||||
default = "documenso/documenso:latest"
|
||||
}
|
||||
|
||||
variable "app_port" {
|
||||
description = "Container port exposed by Documenso."
|
||||
type = number
|
||||
default = 3000
|
||||
}
|
||||
|
||||
variable "upload_bucket_name" {
|
||||
description = "Optional S3 bucket name for Documenso uploads. If null, Terraform generates a globally unique name based on account and region."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "s3_versioning_enabled" {
|
||||
description = "Enable S3 object versioning for uploaded documents."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "document_size_upload_limit_mb" {
|
||||
description = "Upload size limit shown in the Documenso UI, in MB."
|
||||
type = number
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "vpc_cidr" {
|
||||
description = "CIDR block used for the VPC."
|
||||
type = string
|
||||
default = "10.42.0.0/16"
|
||||
}
|
||||
|
||||
variable "fargate_cpu" {
|
||||
description = "Fargate CPU units for the task."
|
||||
type = number
|
||||
default = 512
|
||||
}
|
||||
|
||||
variable "fargate_memory" {
|
||||
description = "Fargate memory in MiB for the task."
|
||||
type = number
|
||||
default = 1024
|
||||
}
|
||||
|
||||
variable "desired_count" {
|
||||
description = "Initial number of running Documenso tasks."
|
||||
type = number
|
||||
default = 1
|
||||
}
|
||||
|
||||
variable "min_count" {
|
||||
description = "Minimum number of tasks for autoscaling."
|
||||
type = number
|
||||
default = 1
|
||||
}
|
||||
|
||||
variable "max_count" {
|
||||
description = "Maximum number of tasks for autoscaling."
|
||||
type = number
|
||||
default = 4
|
||||
}
|
||||
|
||||
variable "cpu_target_utilization" {
|
||||
description = "Target average CPU utilization for ECS autoscaling."
|
||||
type = number
|
||||
default = 65
|
||||
}
|
||||
|
||||
variable "memory_target_utilization" {
|
||||
description = "Target average memory utilization for ECS autoscaling."
|
||||
type = number
|
||||
default = 75
|
||||
}
|
||||
|
||||
variable "postgres_major_version" {
|
||||
description = "Preferred PostgreSQL major version. Terraform resolves the latest matching minor release supported by AWS."
|
||||
type = string
|
||||
default = "17"
|
||||
}
|
||||
|
||||
variable "db_name" {
|
||||
description = "Initial PostgreSQL database name."
|
||||
type = string
|
||||
default = "documenso"
|
||||
}
|
||||
|
||||
variable "db_username" {
|
||||
description = "Master PostgreSQL username for the application."
|
||||
type = string
|
||||
default = "documenso"
|
||||
}
|
||||
|
||||
variable "db_instance_class" {
|
||||
description = "RDS instance class. Graviton classes are usually the best cost/performance option for Postgres."
|
||||
type = string
|
||||
default = "db.t4g.small"
|
||||
}
|
||||
|
||||
variable "db_allocated_storage" {
|
||||
description = "Initial allocated storage in GiB."
|
||||
type = number
|
||||
default = 20
|
||||
}
|
||||
|
||||
variable "db_max_allocated_storage" {
|
||||
description = "Maximum autoscaled storage in GiB."
|
||||
type = number
|
||||
default = 100
|
||||
}
|
||||
|
||||
variable "db_backup_retention_days" {
|
||||
description = "How many days of automated backups to retain."
|
||||
type = number
|
||||
default = 7
|
||||
}
|
||||
|
||||
variable "db_multi_az" {
|
||||
description = "Enable Multi-AZ for higher database availability at higher cost."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "db_deletion_protection" {
|
||||
description = "Protect the database from accidental deletion."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "db_final_snapshot_on_destroy" {
|
||||
description = "Create a final snapshot if the database is destroyed."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "db_publicly_accessible" {
|
||||
description = "Whether the RDS instance should have a public endpoint. Requires database subnets with a route to the internet gateway."
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "db_allowed_cidrs" {
|
||||
description = "IPv4 CIDR blocks allowed to connect directly to PostgreSQL. Leave empty to disable direct public access."
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "disable_signup" {
|
||||
description = "Disable public signup in Documenso."
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "allowed_signup_domains" {
|
||||
description = "Optional comma-separated list of allowed email domains when signup is enabled."
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "smtp_port" {
|
||||
description = "SES SMTP endpoint port."
|
||||
type = number
|
||||
default = 587
|
||||
}
|
||||
|
||||
variable "smtp_secure" {
|
||||
description = "Whether to use SMTPS. Keep false for SES on port 587 with STARTTLS."
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "smtp_unsafe_ignore_tls" {
|
||||
description = "Whether the application should ignore TLS issues when sending mail."
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "smtp_username" {
|
||||
description = "SES SMTP username."
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "smtp_password" {
|
||||
description = "SES SMTP password."
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "smtp_from_name" {
|
||||
description = "Display name used in outbound email."
|
||||
type = string
|
||||
default = "ImEX Sign"
|
||||
}
|
||||
|
||||
variable "smtp_from_address" {
|
||||
description = "Verified sender email address for SES."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "signing_certificate_base64" {
|
||||
description = "Base64-encoded PKCS#12 signing certificate contents for Documenso. Leave empty to omit certificate injection."
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "signing_certificate_passphrase" {
|
||||
description = "Passphrase for the Documenso signing certificate. Leave empty to omit it."
|
||||
type = string
|
||||
default = ""
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "app_secret_name" {
|
||||
description = "Secrets Manager secret name used for Documenso application secrets. Set this if a previous secret with the default name is pending deletion."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "tags" {
|
||||
description = "Additional tags applied to all supported resources."
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "waf_rate_limit" {
|
||||
description = "Maximum requests per 5-minute window from a single IP before WAF blocks it."
|
||||
type = number
|
||||
default = 2000
|
||||
}
|
||||
|
||||
variable "waf_bypass_ipv4_cidrs" {
|
||||
description = "Additional IPv4 CIDR blocks that bypass the WAF. The VPC CIDR is always included automatically."
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "alarm_actions" {
|
||||
description = "Optional list of SNS topic ARNs or other alarm actions to invoke when CloudWatch alarms fire."
|
||||
type = list(string)
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "alb_5xx_alarm_threshold" {
|
||||
description = "Threshold for ALB 5xx count over a 5-minute period."
|
||||
type = number
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "ecs_cpu_alarm_threshold" {
|
||||
description = "Threshold for average ECS CPU utilization alarm."
|
||||
type = number
|
||||
default = 85
|
||||
}
|
||||
|
||||
variable "ecs_memory_alarm_threshold" {
|
||||
description = "Threshold for average ECS memory utilization alarm."
|
||||
type = number
|
||||
default = 85
|
||||
}
|
||||
|
||||
variable "rds_cpu_alarm_threshold" {
|
||||
description = "Threshold for average RDS CPU utilization alarm."
|
||||
type = number
|
||||
default = 80
|
||||
}
|
||||
|
||||
variable "rds_free_storage_alarm_threshold_bytes" {
|
||||
description = "Alarm threshold for low RDS free storage, in bytes."
|
||||
type = number
|
||||
default = 5368709120
|
||||
}
|
||||
|
||||
variable "documenso_license_key" {
|
||||
description = "Documenso license key. Not required for the free community edition, but required for enterprise features and support."
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
@@ -956,6 +956,7 @@
|
||||
- created_at
|
||||
- default_adjustment_rate
|
||||
- deliverchecklist
|
||||
- documenso_api_key
|
||||
- email
|
||||
- enforce_class
|
||||
- enforce_conversion_category
|
||||
@@ -1164,6 +1165,7 @@
|
||||
- notification_followers
|
||||
- state
|
||||
- md_order_statuses
|
||||
- md_ro_statuses
|
||||
retry_conf:
|
||||
interval_sec: 10
|
||||
num_retries: 0
|
||||
@@ -1184,7 +1186,8 @@
|
||||
"new": {
|
||||
"id": {{$body.event.data.new.id}},
|
||||
"shopname": {{$body.event.data.new.shopname}},
|
||||
"md_order_statuses": {{$body.event.data.new.md_order_statuses}}
|
||||
"md_order_statuses": {{$body.event.data.new.md_order_statuses}},
|
||||
"md_ro_statuses": {{$body.event.data.new.md_ro_statuses}}
|
||||
}
|
||||
},
|
||||
"op": {{$body.event.op}},
|
||||
@@ -1891,6 +1894,14 @@
|
||||
- name: job
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
array_relationships:
|
||||
- name: esignature_documents
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: documentid
|
||||
table:
|
||||
name: esignature_documents
|
||||
schema: public
|
||||
insert_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
@@ -2566,6 +2577,101 @@
|
||||
_eq: X-Hasura-User-Id
|
||||
- active:
|
||||
_eq: true
|
||||
- table:
|
||||
name: esignature_documents
|
||||
schema: public
|
||||
object_relationships:
|
||||
- name: document
|
||||
using:
|
||||
foreign_key_constraint_on: documentid
|
||||
- name: job
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
insert_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
check:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- active:
|
||||
_eq: true
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
columns:
|
||||
- completed
|
||||
- documentid
|
||||
- external_document_id
|
||||
- jobid
|
||||
- message
|
||||
- opened
|
||||
- recipients
|
||||
- rejected
|
||||
- status
|
||||
- subject
|
||||
- title
|
||||
comment: ""
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- completed
|
||||
- completed_at
|
||||
- created_at
|
||||
- documentid
|
||||
- external_document_id
|
||||
- id
|
||||
- jobid
|
||||
- message
|
||||
- opened
|
||||
- recipients
|
||||
- rejected
|
||||
- status
|
||||
- subject
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- active:
|
||||
_eq: true
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
comment: ""
|
||||
update_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- completed
|
||||
- completed_at
|
||||
- created_at
|
||||
- documentid
|
||||
- external_document_id
|
||||
- message
|
||||
- opened
|
||||
- recipients
|
||||
- rejected
|
||||
- status
|
||||
- subject
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
job:
|
||||
bodyshop:
|
||||
associations:
|
||||
_and:
|
||||
- active:
|
||||
_eq: true
|
||||
- user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
check: null
|
||||
comment: ""
|
||||
- table:
|
||||
name: eula_acceptances
|
||||
schema: public
|
||||
@@ -3464,6 +3570,13 @@
|
||||
table:
|
||||
name: email_audit_trail
|
||||
schema: public
|
||||
- name: esignature_documents
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: jobid
|
||||
table:
|
||||
name: esignature_documents
|
||||
schema: public
|
||||
- name: exportlogs
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE "public"."esignature_documents";
|
||||
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE "public"."esignature_documents" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "external_document_id" text NOT NULL, "jobid" uuid NOT NULL, "status" text NOT NULL, "recipients" jsonb[] NOT NULL, "title" text NOT NULL, "subject" text NOT NULL, "message" text NOT NULL, "viewed" boolean NOT NULL DEFAULT false, "completed" boolean NOT NULL DEFAULT false, "documentid" uuid, "rejected" boolean NOT NULL DEFAULT false, "opened" boolean NOT NULL DEFAULT false, PRIMARY KEY ("id") , FOREIGN KEY ("jobid") REFERENCES "public"."jobs"("id") ON UPDATE restrict ON DELETE restrict);COMMENT ON TABLE "public"."esignature_documents" IS E'Tracking the lifecycle of esignature documents. ';
|
||||
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
|
||||
RETURNS TRIGGER AS $$
|
||||
DECLARE
|
||||
_new record;
|
||||
BEGIN
|
||||
_new := NEW;
|
||||
_new."updated_at" = NOW();
|
||||
RETURN _new;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
CREATE TRIGGER "set_public_esignature_documents_updated_at"
|
||||
BEFORE UPDATE ON "public"."esignature_documents"
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
|
||||
COMMENT ON TRIGGER "set_public_esignature_documents_updated_at" ON "public"."esignature_documents"
|
||||
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."esignature_documents" drop constraint "esignature_documents_documentid_fkey";
|
||||
@@ -0,0 +1,5 @@
|
||||
alter table "public"."esignature_documents"
|
||||
add constraint "esignature_documents_documentid_fkey"
|
||||
foreign key ("documentid")
|
||||
references "public"."documents"
|
||||
("id") on update restrict on delete restrict;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE "public"."esignature_documents" ALTER COLUMN "recipients" TYPE ARRAY;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE "public"."esignature_documents" ALTER COLUMN "recipients" TYPE json[];
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."esignature_documents" add column "completed_at" timestamptz
|
||||
-- null;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."esignature_documents" add column "completed_at" timestamptz
|
||||
null;
|
||||
@@ -0,0 +1,4 @@
|
||||
comment on column "public"."esignature_documents"."viewed" is E'Tracking the lifecycle of esignature documents. ';
|
||||
alter table "public"."esignature_documents" alter column "viewed" set default false;
|
||||
alter table "public"."esignature_documents" alter column "viewed" drop not null;
|
||||
alter table "public"."esignature_documents" add column "viewed" bool;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."esignature_documents" drop column "viewed" cascade;
|
||||
@@ -0,0 +1,4 @@
|
||||
-- Could not auto-generate a down migration.
|
||||
-- Please write an appropriate down migration for the SQL below:
|
||||
-- alter table "public"."bodyshops" add column "documenso_api_key" text
|
||||
-- null;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."bodyshops" add column "documenso_api_key" text
|
||||
null;
|
||||
@@ -32,6 +32,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
||||
clm_no
|
||||
clm_total
|
||||
comment
|
||||
dms_id
|
||||
ins_co_nm
|
||||
owner_owing
|
||||
ownr_co_nm
|
||||
|
||||
749
package-lock.json
generated
749
package-lock.json
generated
@@ -19,6 +19,8 @@
|
||||
"@aws-sdk/credential-provider-node": "^3.972.28",
|
||||
"@aws-sdk/lib-storage": "^3.1020.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.1020.0",
|
||||
"@documenso/sdk-typescript": "^0.8.0",
|
||||
"@jsreport/nodejs-client": "^4.1.0",
|
||||
"@opensearch-project/opensearch": "^2.13.0",
|
||||
"@socket.io/admin-ui": "^0.5.1",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
@@ -54,6 +56,7 @@
|
||||
"mustache": "^4.2.0",
|
||||
"node-persist": "^4.0.4",
|
||||
"nodemailer": "^6.10.0",
|
||||
"normalize-url": "^9.0.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"phone": "^3.1.71",
|
||||
"query-string": "7.1.3",
|
||||
@@ -1360,6 +1363,18 @@
|
||||
"kuler": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@documenso/sdk-typescript": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@documenso/sdk-typescript/-/sdk-typescript-0.8.0.tgz",
|
||||
"integrity": "sha512-Emzd5j+v8tA8gxtL+M/svVuzSOKMZw3/U4bS8zRoagvQEqkt+XNU2JraPEAJzxTjf3ww6EnlURXydbglBmR7AQ==",
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.26.0",
|
||||
"zod": "^3.25.0 || ^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"mcp": "bin/mcp-server.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.27.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz",
|
||||
@@ -2196,6 +2211,18 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/@hono/node-server": {
|
||||
"version": "1.19.9",
|
||||
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz",
|
||||
"integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.14.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hono": "^4"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanfs/core": {
|
||||
"version": "0.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
|
||||
@@ -2303,12 +2330,370 @@
|
||||
"url": "https://opencollective.com/js-sdsl"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsreport/nodejs-client": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@jsreport/nodejs-client/-/nodejs-client-4.1.0.tgz",
|
||||
"integrity": "sha512-QWupUQzMzxWFvY+AlSdUZGlinJv4cKhYmVE9rIe+he7rn4B24tezFmNdnrDcTSFv3hj4x7sTNqpeHT0fItfs5Q==",
|
||||
"dependencies": {
|
||||
"axios": "1.13.2",
|
||||
"concat-stream": "2.0.0",
|
||||
"mimic-response": "2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.18"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsreport/nodejs-client/node_modules/axios": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
|
||||
"integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.4",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jsreport/nodejs-client/node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@kurkle/color": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz",
|
||||
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk": {
|
||||
"version": "1.27.1",
|
||||
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.27.1.tgz",
|
||||
"integrity": "sha512-sr6GbP+4edBwFndLbM60gf07z0FQ79gaExpnsjMGePXqFcSSb7t6iscpjk9DhFhwd+mTEQrzNafGP8/iGGFYaA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@hono/node-server": "^1.19.9",
|
||||
"ajv": "^8.17.1",
|
||||
"ajv-formats": "^3.0.1",
|
||||
"content-type": "^1.0.5",
|
||||
"cors": "^2.8.5",
|
||||
"cross-spawn": "^7.0.5",
|
||||
"eventsource": "^3.0.2",
|
||||
"eventsource-parser": "^3.0.0",
|
||||
"express": "^5.2.1",
|
||||
"express-rate-limit": "^8.2.1",
|
||||
"hono": "^4.11.4",
|
||||
"jose": "^6.1.3",
|
||||
"json-schema-typed": "^8.0.2",
|
||||
"pkce-challenge": "^5.0.0",
|
||||
"raw-body": "^3.0.0",
|
||||
"zod": "^3.25 || ^4.0",
|
||||
"zod-to-json-schema": "^3.25.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cfworker/json-schema": "^4.1.1",
|
||||
"zod": "^3.25 || ^4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@cfworker/json-schema": {
|
||||
"optional": true
|
||||
},
|
||||
"zod": {
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/accepts": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
||||
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-types": "^3.0.0",
|
||||
"negotiator": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/ajv": {
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
||||
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-uri": "^3.0.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
|
||||
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
||||
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/express": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
||||
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "^2.0.0",
|
||||
"body-parser": "^2.2.1",
|
||||
"content-disposition": "^1.0.0",
|
||||
"content-type": "^1.0.5",
|
||||
"cookie": "^0.7.1",
|
||||
"cookie-signature": "^1.2.1",
|
||||
"debug": "^4.4.0",
|
||||
"depd": "^2.0.0",
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"etag": "^1.8.1",
|
||||
"finalhandler": "^2.1.0",
|
||||
"fresh": "^2.0.0",
|
||||
"http-errors": "^2.0.0",
|
||||
"merge-descriptors": "^2.0.0",
|
||||
"mime-types": "^3.0.0",
|
||||
"on-finished": "^2.4.1",
|
||||
"once": "^1.4.0",
|
||||
"parseurl": "^1.3.3",
|
||||
"proxy-addr": "^2.0.7",
|
||||
"qs": "^6.14.0",
|
||||
"range-parser": "^1.2.1",
|
||||
"router": "^2.2.0",
|
||||
"send": "^1.1.0",
|
||||
"serve-static": "^2.2.0",
|
||||
"statuses": "^2.0.1",
|
||||
"type-is": "^2.0.1",
|
||||
"vary": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
|
||||
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.4.0",
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"on-finished": "^2.4.1",
|
||||
"parseurl": "^1.3.3",
|
||||
"statuses": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/fresh": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
||||
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/http-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "~2.0.0",
|
||||
"inherits": "~2.0.4",
|
||||
"setprototypeof": "~1.2.0",
|
||||
"statuses": "~2.0.2",
|
||||
"toidentifier": "~1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/jose": {
|
||||
"version": "6.1.3",
|
||||
"resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz",
|
||||
"integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/panva"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
||||
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
||||
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
|
||||
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "^1.54.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
|
||||
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/qs": {
|
||||
"version": "6.15.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",
|
||||
"integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/send": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
|
||||
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.4.3",
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"etag": "^1.8.1",
|
||||
"fresh": "^2.0.0",
|
||||
"http-errors": "^2.0.1",
|
||||
"mime-types": "^3.0.2",
|
||||
"ms": "^2.1.3",
|
||||
"on-finished": "^2.4.1",
|
||||
"range-parser": "^1.2.1",
|
||||
"statuses": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
|
||||
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"encodeurl": "^2.0.0",
|
||||
"escape-html": "^1.0.3",
|
||||
"parseurl": "^1.3.3",
|
||||
"send": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/statuses": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@modelcontextprotocol/sdk/node_modules/type-is": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
||||
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"content-type": "^1.0.5",
|
||||
"media-typer": "^1.1.0",
|
||||
"mime-types": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz",
|
||||
@@ -4183,6 +4568,45 @@
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
|
||||
"integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"ajv": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats/node_modules/ajv": {
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
||||
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-uri": "^3.0.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"require-from-string": "^2.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/ajv-formats/node_modules/json-schema-traverse": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ansi-colors": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
|
||||
@@ -4641,6 +5065,100 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz",
|
||||
"integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "^3.1.2",
|
||||
"content-type": "^1.0.5",
|
||||
"debug": "^4.4.3",
|
||||
"http-errors": "^2.0.0",
|
||||
"iconv-lite": "^0.7.0",
|
||||
"on-finished": "^2.4.1",
|
||||
"qs": "^6.14.1",
|
||||
"raw-body": "^3.0.1",
|
||||
"type-is": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/iconv-lite": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
|
||||
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/media-typer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
||||
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/mime-types": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
|
||||
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "^1.54.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/qs": {
|
||||
"version": "6.15.0",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz",
|
||||
"integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/body-parser/node_modules/type-is": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
||||
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"content-type": "^1.0.5",
|
||||
"media-typer": "^1.1.0",
|
||||
"mime-types": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/boolbase": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
||||
@@ -6370,6 +6888,27 @@
|
||||
"node": ">=0.8.x"
|
||||
}
|
||||
},
|
||||
"node_modules/eventsource": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
|
||||
"integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eventsource-parser": "^3.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eventsource-parser": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz",
|
||||
"integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/expect-type": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
|
||||
@@ -6426,6 +6965,24 @@
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/express-rate-limit": {
|
||||
"version": "8.2.1",
|
||||
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz",
|
||||
"integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ip-address": "10.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/express-rate-limit"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"express": ">= 4.11"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/body-parser": {
|
||||
"version": "1.20.3",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
||||
@@ -6548,6 +7105,22 @@
|
||||
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-uri": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
|
||||
"integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fastify"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/fastify"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/fast-xml-builder": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.1.4.tgz",
|
||||
@@ -7429,6 +8002,15 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/hono": {
|
||||
"version": "4.12.3",
|
||||
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.3.tgz",
|
||||
"integrity": "sha512-SFsVSjp8sj5UumXOOFlkZOG6XS9SJDKw0TbwFeV+AJ8xlST8kxK5Z/5EYa111UY8732lK2S/xB653ceuaoGwpg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/hpagent": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz",
|
||||
@@ -7687,6 +8269,15 @@
|
||||
"url": "https://opencollective.com/ioredis"
|
||||
}
|
||||
},
|
||||
"node_modules/ip-address": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz",
|
||||
"integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
||||
@@ -7928,6 +8519,12 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-promise": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
|
||||
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-regex": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
|
||||
@@ -8201,6 +8798,12 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-schema-typed": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
|
||||
"integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
|
||||
@@ -8700,6 +9303,18 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-response": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
||||
@@ -8989,6 +9604,18 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-url": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-9.0.0.tgz",
|
||||
"integrity": "sha512-z9nC87iaZXXySbWWtTHfCFJyFvKaUAW6lODhikG7ILSbVgmwuFjUqkgnheHvAUcGedO29e2QGBRXMUD64aurqQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/notepack.io": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/notepack.io/-/notepack.io-3.0.1.tgz",
|
||||
@@ -9452,6 +10079,15 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/pkce-challenge": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
|
||||
"integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/possible-typed-array-names": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
|
||||
@@ -9687,6 +10323,66 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
|
||||
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bytes": "~3.1.2",
|
||||
"http-errors": "~2.0.1",
|
||||
"iconv-lite": "~0.7.0",
|
||||
"unpipe": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/http-errors": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
||||
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"depd": "~2.0.0",
|
||||
"inherits": "~2.0.4",
|
||||
"setprototypeof": "~1.2.0",
|
||||
"statuses": "~2.0.2",
|
||||
"toidentifier": "~1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/iconv-lite": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz",
|
||||
"integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/raw-body/node_modules/statuses": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
||||
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
@@ -9852,6 +10548,15 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "2.0.0-next.5",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
|
||||
@@ -10044,6 +10749,32 @@
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/router": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
|
||||
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.4.0",
|
||||
"depd": "^2.0.0",
|
||||
"is-promise": "^4.0.0",
|
||||
"parseurl": "^1.3.3",
|
||||
"path-to-regexp": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/router/node_modules/path-to-regexp": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
||||
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/rsa-pem-from-mod-exp": {
|
||||
"version": "0.8.6",
|
||||
"resolved": "https://registry.npmjs.org/rsa-pem-from-mod-exp/-/rsa-pem-from-mod-exp-0.8.6.tgz",
|
||||
@@ -12310,6 +13041,24 @@
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "4.3.6",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
|
||||
"integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
},
|
||||
"node_modules/zod-to-json-schema": {
|
||||
"version": "3.25.1",
|
||||
"resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz",
|
||||
"integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==",
|
||||
"license": "ISC",
|
||||
"peerDependencies": {
|
||||
"zod": "^3.25 || ^4"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
"@aws-sdk/credential-provider-node": "^3.972.28",
|
||||
"@aws-sdk/lib-storage": "^3.1020.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.1020.0",
|
||||
"@documenso/sdk-typescript": "^0.8.0",
|
||||
"@jsreport/nodejs-client": "^4.1.0",
|
||||
"@opensearch-project/opensearch": "^2.13.0",
|
||||
"@socket.io/admin-ui": "^0.5.1",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
@@ -63,6 +65,7 @@
|
||||
"mustache": "^4.2.0",
|
||||
"node-persist": "^4.0.4",
|
||||
"nodemailer": "^6.10.0",
|
||||
"normalize-url": "^9.0.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"phone": "^3.1.71",
|
||||
"query-string": "7.1.3",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user