BOD-17 Added header blocks to contract detail.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Descriptions, Card } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
export default function ContractCourtesyCarBlock({ courtesyCar }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Link to={`/manage/courtesycars/${courtesyCar && courtesyCar.id}`}>
|
||||
<Card title={t("courtesycars.labels.courtesycar")}>
|
||||
<Descriptions size="small" column={1}>
|
||||
<Descriptions.Item label={t("courtesycars.fields.fleetnumber")}>
|
||||
{(courtesyCar && courtesyCar.fleetnumber) || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("courtesycars.fields.plate")}>
|
||||
{(courtesyCar && courtesyCar.plate) || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("courtesycars.labels.vehicle")}>
|
||||
{`${(courtesyCar && courtesyCar.year) || ""} ${(courtesyCar &&
|
||||
courtesyCar.make) ||
|
||||
""} ${(courtesyCar && courtesyCar.model) || ""}`}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Card>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
@@ -10,26 +10,30 @@ export default function ContractFormComponent() {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<Input value={state} onChange={e => setState(e.target.value)} />
|
||||
<Button
|
||||
onClick={() => {
|
||||
console.log("state", state);
|
||||
//let data = state;
|
||||
<div style={{ background: "#f00" }}>
|
||||
TEST AREA
|
||||
<Input value={state} onChange={e => setState(e.target.value)} />
|
||||
<Button
|
||||
onClick={() => {
|
||||
console.log("state", state);
|
||||
//let data = state;
|
||||
|
||||
var data =
|
||||
"%FLDELRAY BEACH^DOE$JOHN$^4818 S FEDERAL BLVD^ ? ;6360100462172082009=2101198299090=? #! 33435 I 1600 ECCECC00000?";
|
||||
data = data.replace(/\n/, "");
|
||||
// replace spaces with regular space
|
||||
data = data.replace(/\s/g, " ");
|
||||
var track = data.match(/(.*?\?)(.*?\?)(.*?\?)/);
|
||||
console.log("data", data);
|
||||
console.log("track", track);
|
||||
const a = aamva.stripe(data);
|
||||
console.log(JSON.stringify(a));
|
||||
}}
|
||||
>
|
||||
Decode
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
var data =
|
||||
"%FLDELRAY BEACH^DOE$JOHN$^4818 S FEDERAL BLVD^ ? ;6360100462172082009=2101198299090=? #! 33435 I 1600 ECCECC00000?";
|
||||
data = data.replace(/\n/, "");
|
||||
// replace spaces with regular space
|
||||
data = data.replace(/\s/g, " ");
|
||||
var track = data.match(/(.*?\?)(.*?\?)(.*?\?)/);
|
||||
console.log("data", data);
|
||||
console.log("track", track);
|
||||
const a = aamva.stripe(data);
|
||||
console.log(JSON.stringify(a));
|
||||
}}
|
||||
>
|
||||
Decode
|
||||
</Button>
|
||||
<Form.Item
|
||||
label={t("contracts.fields.status")}
|
||||
name="status"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Descriptions, Card } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export default function ContractJobBlock({ job }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Link to={`/manage/jobs/${job && job.id}`}>
|
||||
<Card title={t("jobs.labels.job")}>
|
||||
<Descriptions size="small" column={1}>
|
||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||
{(job && job.ro_number) || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
||||
{`${(job && job.v_model_yr) || ""} ${(job && job.v_make_desc) ||
|
||||
""} ${(job && job.v_model_desc) || ""}`}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.owner")}>
|
||||
{`${(job && job.ownr_fn) || ""} ${(job && job.ownr_ln) ||
|
||||
""} ${(job && job.ownr_co_nm) || ""}`}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Card>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user