use pricing matrix in existing usePaidStatus funcitons

This commit is contained in:
miloschwartz
2026-02-09 18:17:18 -08:00
committed by Owen
parent df1bf09163
commit 5ca598139e
12 changed files with 33 additions and 17 deletions

View File

@@ -40,6 +40,7 @@ import {
import { useParams } from "next/navigation";
import { FaApple, FaWindows, FaLinux } from "react-icons/fa";
import { SiAndroid } from "react-icons/si";
import { tierMatrix } from "@server/lib/billing/tierMatrix";
function formatTimestamp(timestamp: number | null | undefined): string {
if (!timestamp) return "-";
@@ -156,8 +157,11 @@ export default function GeneralPage() {
const showApprovalFeatures = build !== "oss" && isPaidUser;
const formatPostureValue = (value: boolean | null | undefined) => {
if (value === null || value === undefined) return "-";
const formatPostureValue = (
value: boolean | null | undefined | "-"
) => {
if (value === null || value === undefined || value === "-")
return "-";
return (
<div className="flex items-center gap-2">
{value ? (
@@ -594,7 +598,7 @@ export default function GeneralPage() {
{t("biometricsEnabled")}
</InfoSectionTitle>
<InfoSectionContent>
{isPaidUser
{isPaidUser(tierMatrix.devicePosture)
? formatPostureValue(
client.posture
.biometricsEnabled

View File

@@ -44,6 +44,7 @@ import { getUserDisplayName } from "@app/lib/getUserDisplayName";
import { orgQueries, resourceQueries } from "@app/lib/queries";
import { zodResolver } from "@hookform/resolvers/zod";
import { build } from "@server/build";
import { tierMatrix } from "@server/lib/billing/tierMatrix";
import { UserType } from "@server/types/UserTypes";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import SetResourcePasswordForm from "components/SetResourcePasswordForm";
@@ -164,7 +165,7 @@ export default function ResourceAuthenticationPage() {
const allIdps = useMemo(() => {
if (build === "saas") {
if (isPaidUser) {
if (isPaidUser(tierMatrix.orgOidc)) {
return orgIdps.map((idp) => ({
id: idp.idpId,
text: idp.name