Suspendedremoval
All checks were successful
Build and Push / build (push) Successful in 1m28s

This commit is contained in:
2026-05-01 18:17:04 +02:00
parent de1bb9bd02
commit a79d0defa4
2 changed files with 9 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import { useState } from "react";
import { useRouter } from "next/navigation";
import { useTranslations, useFormatter } from "next-intl";
import { Modal } from "@/components/ui/modal";
import { formatRelative } from "@/lib/format";
interface Props {
tenantName: string;
@@ -198,7 +199,6 @@ export function SubscriptionToggle({
// Owner with pending resume request: render the request status
// card with cancel.
if (pendingResumeRequest) {
const submittedDate = new Date(pendingResumeRequest.createdAt);
return (
<div>
<div className="rounded-xl border border-amber-500/30 bg-amber-500/5 px-4 py-3">
@@ -206,8 +206,8 @@ export function SubscriptionToggle({
{t("resumeRequestPendingTitle")}
</div>
<div className="text-xs text-text-secondary">
{t.rich("resumeRequestPendingDescription", {
when: f.relativeTime(submittedDate),
{t("resumeRequestPendingDescription", {
when: formatRelative(pendingResumeRequest.createdAt, f),
})}
</div>
<button

View File

@@ -233,8 +233,13 @@ export interface TenantRequest {
* reactivation of a suspended tenant). Default 'provision' for all
* pre-existing rows; resume rows have most provision fields null
* but tenant_name set to the tenant being requested.
*
* Optional on the TS type so provision-only callers (like the
* onboarding wizard's create flow) don't need to know about resume
* requests. The DB column is NOT NULL DEFAULT 'provision', so rows
* loaded via `mapRow` always have a value populated.
*/
requestType: "provision" | "resume";
requestType?: "provision" | "resume";
createdAt: string;
updatedAt: string;
}