Add scoped private business verification evidence and expiry
This commit is contained in:
@@ -5,6 +5,8 @@ import { businessModalities, businessStates } from "./business-types";
|
||||
import type { Business } from "./business-types";
|
||||
import BusinessObjects from "./business-objects";
|
||||
import type { BusinessObject } from "./business-objects";
|
||||
import BusinessVerifications from "./business-verifications";
|
||||
import type { BusinessVerification } from "./business-verifications";
|
||||
|
||||
type Props = {
|
||||
record: Business;
|
||||
@@ -14,6 +16,8 @@ type Props = {
|
||||
modalities: string[];
|
||||
objects: BusinessObject[];
|
||||
objectKinds: string[];
|
||||
verificationChecks: string[];
|
||||
verifications: BusinessVerification[];
|
||||
history: { version_no: number; action: string; created_at: string; note: string }[];
|
||||
};
|
||||
export default function BusinessPage(props: Props) {
|
||||
@@ -28,6 +32,8 @@ function Editor({
|
||||
history,
|
||||
objects,
|
||||
objectKinds,
|
||||
verificationChecks,
|
||||
verifications,
|
||||
}: Props) {
|
||||
const [payload, setPayload] = useState(record.payload);
|
||||
const [modality, setModality] = useState(record.modality);
|
||||
@@ -209,6 +215,14 @@ function Editor({
|
||||
objects={objects}
|
||||
objectKinds={objectKinds}
|
||||
/>
|
||||
<BusinessVerifications
|
||||
id={record.id}
|
||||
version={record.version_no}
|
||||
editable={canReview && record.status === "in_review" && !busy}
|
||||
checks={verificationChecks}
|
||||
findings={verifications}
|
||||
objects={objects}
|
||||
/>
|
||||
<section className={card}>
|
||||
<h2 className="text-xl font-bold">Histórico</h2>
|
||||
<ol>
|
||||
@@ -223,6 +237,7 @@ function Editor({
|
||||
archived: "Arquivado",
|
||||
object_added: "Elemento declarado acrescentado",
|
||||
object_updated: "Elemento declarado alterado",
|
||||
verification: "Verificação registada",
|
||||
} as Record<string, string>
|
||||
)[h.action] ??
|
||||
h.action}{" "}
|
||||
|
||||
Reference in New Issue
Block a user