feat: add organizations data-table page
This commit is contained in:
parent
c7489f6a23
commit
0f8267a984
@ -348,7 +348,7 @@ export default function Admins() {
|
|||||||
open={openModal}
|
open={openModal}
|
||||||
onOpenChange={(isOpen) => {
|
onOpenChange={(isOpen) => {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
setOpen(false);
|
setOpenModal(false);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
trigger={
|
trigger={
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
|
|
||||||
export default function Organizations (){
|
export default function Organizations (){
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Link href="/admin/organizations/971ff270-6253-4424-b100-21b9ebf0ec7f">Organization Profile</Link>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ export default function FloatingLabelInput({
|
|||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
>
|
>
|
||||||
{options?.map((option, index) => (
|
{options?.map((option, index) => (
|
||||||
<option key={index} value={option}>{option}</option>
|
<option key={index} value={option.value}>{option.label}</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
{button && <div className="btn-floating-right">{button}</div>}
|
{button && <div className="btn-floating-right">{button}</div>}
|
||||||
|
|||||||
@ -10,5 +10,11 @@ export const adminSchema = z.object({
|
|||||||
last_name: z.string(),
|
last_name: z.string(),
|
||||||
first_name: z.string(),
|
first_name: z.string(),
|
||||||
email: z.string().min(1, "L'email est requis").email("Email invalide"),
|
email: z.string().min(1, "L'email est requis").email("Email invalide"),
|
||||||
organization: z.string().optional(),
|
});
|
||||||
});
|
|
||||||
|
export const companySchema = z.object({
|
||||||
|
name: z.string().min(1, "Le nom est requis"),
|
||||||
|
description: z.string(),
|
||||||
|
status: z.string(),
|
||||||
|
owner: z.string()
|
||||||
|
})
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
import { FormEventHandler, ReactNode } from "react";
|
import { FormEventHandler, ReactNode } from "react";
|
||||||
import { ZodSchema } from "zod";
|
import { ZodSchema } from "zod";
|
||||||
|
export interface Option {
|
||||||
|
label: string
|
||||||
|
value: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface FloatingLabelInputProps {
|
export interface FloatingLabelInputProps {
|
||||||
label?: string;
|
label?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type: 'text' | 'password' | 'select' | 'email' | 'number' | 'hidden' | 'search';
|
type: 'text' | 'password' | 'select' | 'email' | 'number' | 'hidden' | 'search' | 'textarea';
|
||||||
options?: string[];
|
options?: Option[];
|
||||||
button?: React.ReactNode;
|
button?: React.ReactNode;
|
||||||
showPasswordToggle?: boolean;
|
showPasswordToggle?: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user