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}
|
||||
onOpenChange={(isOpen) => {
|
||||
if (!isOpen) {
|
||||
setOpen(false);
|
||||
setOpenModal(false);
|
||||
}
|
||||
}}
|
||||
trigger={
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
import Link from "next/link";
|
||||
|
||||
|
||||
export default function Organizations (){
|
||||
return (
|
||||
<>
|
||||
<Link href="/admin/organizations/971ff270-6253-4424-b100-21b9ebf0ec7f">Organization Profile</Link>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -37,7 +37,7 @@ export default function FloatingLabelInput({
|
||||
defaultValue={defaultValue}
|
||||
>
|
||||
{options?.map((option, index) => (
|
||||
<option key={index} value={option}>{option}</option>
|
||||
<option key={index} value={option.value}>{option.label}</option>
|
||||
))}
|
||||
</select>
|
||||
{button && <div className="btn-floating-right">{button}</div>}
|
||||
|
||||
@ -10,5 +10,11 @@ export const adminSchema = z.object({
|
||||
last_name: z.string(),
|
||||
first_name: z.string(),
|
||||
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 { ZodSchema } from "zod";
|
||||
export interface Option {
|
||||
label: string
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface FloatingLabelInputProps {
|
||||
label?: string;
|
||||
placeholder?: string;
|
||||
type: 'text' | 'password' | 'select' | 'email' | 'number' | 'hidden' | 'search';
|
||||
options?: string[];
|
||||
type: 'text' | 'password' | 'select' | 'email' | 'number' | 'hidden' | 'search' | 'textarea';
|
||||
options?: Option[];
|
||||
button?: React.ReactNode;
|
||||
showPasswordToggle?: boolean;
|
||||
name: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user