mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-08-03 09:00:23 +00:00
fix(signup-form): update header and welcome message for clarity
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 8m55s
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 8m55s
This commit is contained in:
@ -21,10 +21,12 @@ This is a web portal for SAR Link customers.
|
|||||||
- [x] Add all the filters for parental control table (mobile responsive)
|
- [x] Add all the filters for parental control table (mobile responsive)
|
||||||
- [x] Disable blocking if payment is pending or omit from the table if device payment is pending
|
- [x] Disable blocking if payment is pending or omit from the table if device payment is pending
|
||||||
|
|
||||||
|
### Topups
|
||||||
|
- [ ] add textarea in topup dialog for admin. if no detail given generate on backend otherwise take the text from text area
|
||||||
|
|
||||||
### Agreements
|
### Agreements
|
||||||
- [x] Implement file upload for admin side
|
- [x] Implement file upload for admin side
|
||||||
- [ ] Add customer relavant documents in a grid view
|
- [ ] Add customer relavant documents in a grid view
|
||||||
- [ ] Add filtering by date for agreements
|
|
||||||
|
|
||||||
## Admin Controls
|
## Admin Controls
|
||||||
### Users
|
### Users
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { Button } from "@/components/ui/button";
|
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||||
import { Input } from "@/components/ui/input";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
import { signup } from "@/actions/auth-actions";
|
|
||||||
import { cn } from "@/lib/utils";
|
|
||||||
import { Loader2 } from "lucide-react";
|
import { Loader2 } from "lucide-react";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
import { useSearchParams } from "next/navigation";
|
import { useSearchParams } from "next/navigation";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
import { signup } from "@/actions/auth-actions";
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { Input } from "@/components/ui/input";
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
SelectContent,
|
SelectContent,
|
||||||
@ -19,9 +18,8 @@ import {
|
|||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
import type { ApiResponse, Atoll } from "@/lib/backend-types";
|
import type { ApiResponse, Atoll } from "@/lib/backend-types";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
import { getAtolls } from "@/queries/islands";
|
import { getAtolls } from "@/queries/islands";
|
||||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
export default function SignUpForm() {
|
export default function SignUpForm() {
|
||||||
const { data: atolls } = useQuery<ApiResponse<Atoll>>({
|
const { data: atolls } = useQuery<ApiResponse<Atoll>>({
|
||||||
@ -82,11 +80,11 @@ export default function SignUpForm() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<h3 className="text-xl font-semibold dark:text-orange-100">
|
<h3 className="text-xl font-semibold dark:text-orange-100">
|
||||||
SAR Link Portal
|
SAR Link by OmegaTech Solutions
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 className="text-4xl font-bold mb-6">Welcome to Our Platform</h1>
|
<h1 className="text-4xl font-bold mb-6">Register your account</h1>
|
||||||
<p className="text-xl mb-8 dark:text-orange-100">
|
<p className="text-xl mb-8 dark:text-orange-100">
|
||||||
Pay for your devices and track your bills.
|
Pay for your devices and track your bills.
|
||||||
</p>
|
</p>
|
||||||
@ -112,7 +110,7 @@ export default function SignUpForm() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"text-base",
|
"text-base",
|
||||||
actionState?.errors?.fieldErrors.name &&
|
actionState?.errors?.fieldErrors.name &&
|
||||||
"border-2 border-red-500",
|
"border-2 border-red-500",
|
||||||
)}
|
)}
|
||||||
name="name"
|
name="name"
|
||||||
type="text"
|
type="text"
|
||||||
@ -146,7 +144,7 @@ export default function SignUpForm() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"text-base",
|
"text-base",
|
||||||
actionState?.errors?.fieldErrors?.id_card &&
|
actionState?.errors?.fieldErrors?.id_card &&
|
||||||
"border-2 border-red-500",
|
"border-2 border-red-500",
|
||||||
)}
|
)}
|
||||||
placeholder="ID Card"
|
placeholder="ID Card"
|
||||||
/>
|
/>
|
||||||
@ -246,7 +244,7 @@ export default function SignUpForm() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"text-base",
|
"text-base",
|
||||||
actionState?.errors?.fieldErrors?.address &&
|
actionState?.errors?.fieldErrors?.address &&
|
||||||
"border-2 border-red-500",
|
"border-2 border-red-500",
|
||||||
)}
|
)}
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
name="address"
|
name="address"
|
||||||
@ -274,7 +272,7 @@ export default function SignUpForm() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"text-base",
|
"text-base",
|
||||||
actionState?.errors?.fieldErrors?.dob &&
|
actionState?.errors?.fieldErrors?.dob &&
|
||||||
"border-2 border-red-500",
|
"border-2 border-red-500",
|
||||||
)}
|
)}
|
||||||
name="dob"
|
name="dob"
|
||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
@ -307,7 +305,7 @@ export default function SignUpForm() {
|
|||||||
className={cn(
|
className={cn(
|
||||||
"text-base",
|
"text-base",
|
||||||
actionState?.errors?.fieldErrors.accNo &&
|
actionState?.errors?.fieldErrors.accNo &&
|
||||||
"border-2 border-red-500",
|
"border-2 border-red-500",
|
||||||
)}
|
)}
|
||||||
name="accNo"
|
name="accNo"
|
||||||
type="number"
|
type="number"
|
||||||
@ -337,8 +335,8 @@ export default function SignUpForm() {
|
|||||||
disabled={isPending}
|
disabled={isPending}
|
||||||
className={cn(
|
className={cn(
|
||||||
!phoneNumberFromUrl &&
|
!phoneNumberFromUrl &&
|
||||||
actionState?.errors?.fieldErrors?.phone_number &&
|
actionState?.errors?.fieldErrors?.phone_number &&
|
||||||
"border-2 border-red-500 rounded-md",
|
"border-2 border-red-500 rounded-md",
|
||||||
)}
|
)}
|
||||||
defaultValue={NUMBER_WITHOUT_DASH ?? ""}
|
defaultValue={NUMBER_WITHOUT_DASH ?? ""}
|
||||||
readOnly={Boolean(phoneNumberFromUrl)}
|
readOnly={Boolean(phoneNumberFromUrl)}
|
||||||
|
@ -187,7 +187,7 @@ export async function blockDeviceAction(
|
|||||||
blocked: isBlocking,
|
blocked: isBlocking,
|
||||||
reason_for_blocking: session?.user?.is_superuser
|
reason_for_blocking: session?.user?.is_superuser
|
||||||
? reason_for_blocking ||
|
? reason_for_blocking ||
|
||||||
(action === "simple-block" ? "Blocked by admin" : "")
|
(action === "simple-block" ? "Blocked by admin" : "")
|
||||||
: isBlocking
|
: isBlocking
|
||||||
? "Blocked by parent"
|
? "Blocked by parent"
|
||||||
: "",
|
: "",
|
||||||
|
Reference in New Issue
Block a user