Enhance payment processing and device management features

- Updated `package.json` to add a new script for pushing Prisma database changes.
- Refactored payment processing functions to include payment method handling for both wallet and transfer options.
- Improved `DevicesTable` and `AdminDevicesTable` components to support new payment method display and user association.
- Updated Prisma schema to introduce a new `PaymentType` enum and modified the `Payment` model to include a `method` field.
- Enhanced UI components to improve user experience in displaying payment and device information.

These changes improve the overall functionality and maintainability of the application, particularly in payment processing and device management.
This commit is contained in:
2025-01-08 23:04:30 +05:00
parent 0a63e4337e
commit 1a195d2307
9 changed files with 118 additions and 47 deletions

View File

@ -6,10 +6,10 @@ import Link from "next/link";
import { signup } from "@/actions/auth-actions";
import { cn } from "@/lib/utils";
import type { Island, Prisma } from "@prisma/client";
import { Loader } from "lucide-react";
import { Loader2 } from "lucide-react";
import { useSearchParams } from "next/navigation";
import { useActionState } from "react";
import * as React from "react";
import { useActionState } from "react";
import {
Select,
@ -308,7 +308,7 @@ export default function SignUpForm({ atolls }: { atolls: AtollWithIslands[] }) {
</div>
<Button disabled={isPending} className="mt-4 w-full" type="submit">
{isPending ? <Loader className="animate-spin" /> : "Submit"}
{isPending ? <Loader2 className="animate-spin" /> : "Submit"}
</Button>
</div>