체험 계정도 연장 승인되도록 수정
This commit is contained in:
@@ -5,20 +5,17 @@ import { useRouter } from "next/navigation";
|
||||
import { Plus } from "lucide-react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { PAID_ACCOUNT_TYPE_VALUES } from "@/lib/constants";
|
||||
import { formatDateTime, getAccountTypeLabel, getRequestStatusLabel } from "@/lib/utils";
|
||||
import type { MaestroDetail } from "@/lib/maestros";
|
||||
|
||||
type ExtensionRequestsSectionProps = {
|
||||
maestroID: number;
|
||||
accountType: number;
|
||||
totalCount: number;
|
||||
extensionRequests: MaestroDetail["extensionRequests"];
|
||||
};
|
||||
|
||||
export function ExtensionRequestsSection({
|
||||
maestroID,
|
||||
accountType,
|
||||
totalCount,
|
||||
extensionRequests,
|
||||
}: ExtensionRequestsSectionProps) {
|
||||
@@ -27,7 +24,6 @@ export function ExtensionRequestsSection({
|
||||
const [isCreating, setIsCreating] = useState(false);
|
||||
const [errorMessage, setErrorMessage] = useState("");
|
||||
|
||||
const isPaidAccount = (PAID_ACCOUNT_TYPE_VALUES as readonly number[]).includes(accountType);
|
||||
const isDisabled = isCreating || isPending;
|
||||
|
||||
async function handleCreate() {
|
||||
@@ -73,7 +69,7 @@ export function ExtensionRequestsSection({
|
||||
</div>
|
||||
<div className="flex flex-col items-start gap-1 sm:items-end">
|
||||
<Button
|
||||
disabled={isDisabled || !isPaidAccount}
|
||||
disabled={isDisabled}
|
||||
onClick={() => void handleCreate()}
|
||||
size="sm"
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user