feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
import { Card, Divider, Form, Input, Select, Switch, Tooltip } from "antd";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
/**
|
||||
* Reynolds & Reynolds Configuration Section
|
||||
* Stored under bodyshop.rr_configuration (JSONB)
|
||||
*
|
||||
* NOTE:
|
||||
* - Do NOT put credentials/endpoints here. Those live in env secrets.
|
||||
* - These are dealer/location-specific values that the backend reads from rr_configuration.
|
||||
* Keys match server usage: dealer_code, dealer_name, location_id, store_number, branch_number, etc.
|
||||
*/
|
||||
export default function ShopInfoRRConfigurationComponent() {
|
||||
return (
|
||||
<Card title="Reynolds & Reynolds Configuration" variant={false}>
|
||||
{/* Dealer / Location identifiers (dealer-specific, not secrets) */}
|
||||
<Form.Item
|
||||
label="Dealer Code"
|
||||
name={["rr_configuration", "dealer_code"]}
|
||||
tooltip="Your RR Dealer Code / Dealer Number provided in the welcome kit."
|
||||
rules={[{ required: true, message: "Dealer Code is required for RR integration" }]}
|
||||
>
|
||||
<Input placeholder="e.g. 12345" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Dealer Name"
|
||||
name={["rr_configuration", "dealer_name"]}
|
||||
tooltip="Optional display name for this dealer as it should appear on outbound requests."
|
||||
>
|
||||
<Input placeholder="e.g. Rome Collision Centre" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Location ID"
|
||||
name={["rr_configuration", "location_id"]}
|
||||
tooltip="If your RR account uses Location/Branch identifiers, enter the Location ID here."
|
||||
>
|
||||
<Input placeholder="e.g. 01" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Store Number"
|
||||
name={["rr_configuration", "store_number"]}
|
||||
tooltip="Optional: RR Store # (from welcome kit)."
|
||||
>
|
||||
<Input placeholder="e.g. 0001" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Branch Number"
|
||||
name={["rr_configuration", "branch_number"]}
|
||||
tooltip="Optional: RR Branch # (from welcome kit)."
|
||||
>
|
||||
<Input placeholder="e.g. 10" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Default Advisor ID"
|
||||
name={["rr_configuration", "default_advisor_id"]}
|
||||
tooltip="Default Service Advisor to assign on RO export (can be overridden per export)."
|
||||
>
|
||||
<Input placeholder="e.g. 007" />
|
||||
</Form.Item>
|
||||
|
||||
<Divider />
|
||||
|
||||
{/* Feature flags (safe to store in config) */}
|
||||
<Form.Item
|
||||
label="Enable RR Integration"
|
||||
name={["rr_configuration", "enable_rr_integration"]}
|
||||
valuePropName="checked"
|
||||
tooltip="Master switch to enable/disable RR export for this shop."
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Sandbox Mode"
|
||||
name={["rr_configuration", "sandbox_mode"]}
|
||||
valuePropName="checked"
|
||||
tooltip="Toggles sandbox behavior on the app side. Credentials and URLs remain in env secrets."
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Log XML Requests/Responses"
|
||||
name={["rr_configuration", "log_xml"]}
|
||||
valuePropName="checked"
|
||||
tooltip="When enabled, request/response XML is logged (masked where applicable)."
|
||||
>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
|
||||
<Divider />
|
||||
|
||||
{/* Optional UX/format defaults */}
|
||||
<Form.Item
|
||||
label="Default RO Prefix"
|
||||
name={["rr_configuration", "default_ro_prefix"]}
|
||||
tooltip="Optional Repair Order prefix used when generating RO numbers."
|
||||
>
|
||||
<Input placeholder="e.g. RO" />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={
|
||||
<span>
|
||||
Timezone{" "}
|
||||
<Tooltip title="Used for date/time fields when building RR payloads.">
|
||||
<span style={{ cursor: "help", color: "var(--ant-color-text-tertiary)" }}>ⓘ</span>
|
||||
</Tooltip>
|
||||
</span>
|
||||
}
|
||||
name={["rr_configuration", "timezone"]}
|
||||
rules={[{ required: true, message: "Timezone is required" }]}
|
||||
>
|
||||
<Select showSearch placeholder="Select timezone">
|
||||
<Option value="America/Toronto">America/Toronto</Option>
|
||||
<Option value="America/New_York">America/New_York</Option>
|
||||
<Option value="America/Chicago">America/Chicago</Option>
|
||||
<Option value="America/Los_Angeles">America/Los_Angeles</Option>
|
||||
<Option value="UTC">UTC</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -688,6 +688,7 @@
|
||||
"payers": "Payers"
|
||||
},
|
||||
"cdk_dealerid": "CDK Dealer ID",
|
||||
"rr_dealerid": "Reynolds Store Number",
|
||||
"costsmapping": "Costs Mapping",
|
||||
"dms_allocations": "DMS Allocations",
|
||||
"pbs_serialnumber": "PBS Serial Number",
|
||||
|
||||
@@ -688,6 +688,7 @@
|
||||
"payers": ""
|
||||
},
|
||||
"cdk_dealerid": "",
|
||||
"rr_dealerid": "",
|
||||
"costsmapping": "",
|
||||
"dms_allocations": "",
|
||||
"pbs_serialnumber": "",
|
||||
|
||||
@@ -688,6 +688,7 @@
|
||||
"payers": ""
|
||||
},
|
||||
"cdk_dealerid": "",
|
||||
"rr_dealerid": "",
|
||||
"costsmapping": "",
|
||||
"dms_allocations": "",
|
||||
"pbs_serialnumber": "",
|
||||
|
||||
Reference in New Issue
Block a user