Files
docmost/apps/client/src/ee/page-verification/components/verification-status.ts
T
Philip Okugbe bd68e47e03 feat(ee): page verification workflow (#2102)
* feat: page verification workflow

* feat: refactor page-verification

* sync

* fix type

* fix

* fix

* notification icon

* use full word

* accept .license file

* - update templates
- update migration and notification

* fix copy

* update audit labels

* sync

* add space name
2026-04-13 20:20:34 +01:00

44 lines
982 B
TypeScript

import { VerificationStatus } from "@/ee/page-verification/types/page-verification.types";
export function getStatusColor(status: VerificationStatus): string {
switch (status) {
case "verified":
case "approved":
return "blue.7";
case "expiring":
case "in_approval":
return "orange.8";
case "expired":
return "red.7";
case "draft":
case "obsolete":
return "gray.6";
default:
return "gray.6";
}
}
export function getStatusLabel(
status: VerificationStatus,
t: (key: string) => string,
): string {
switch (status) {
case "verified":
return t("Verified");
case "expiring":
return t("Review needed");
case "expired":
return t("Verification expired");
case "draft":
return t("Draft");
case "in_approval":
return t("In Approval");
case "approved":
return t("Approved");
case "obsolete":
return t("Obsolete");
default:
return "";
}
}