Initial commit

This commit is contained in:
Viet An
2026-03-02 09:45:33 +07:00
commit d17a9e2588
415 changed files with 92113 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
export interface EmailContextType {
selectedEmails: string;
selectedName: string;
selectedId: string;
setSelectedEmails: (emails: string) => void;
setSelectedName: (name: string) => void;
setSelectedId: (id: string) => void;
}

32
app/types/emailForm1.ts Normal file
View File

@@ -0,0 +1,32 @@
export interface FormData {
id: number | undefined;
name: string;
template: string;
content:{
receiver: string;
subject: string;
content: string;
imageUrl: string | null;
linkUrl: string[];
textLinkUrl: string[];
keyword: Array<string | { keyword: string; value: string }>;
html: string;
}
// emails: string;
// subject: string;
// message: string;
// template: string;
// company?: string;
// phone?: string;
// imageUrl?: string | null;
// linkUrl?: string[];
// keyWords?: string[] | { keyword: string; value: string }[];
// textLinkUrl?: string[];
}
export interface EmailFormProps {
onDataChange: (data: FormData) => void;
initialData?: FormData;
}
export type ModalType = "none" | "save-list" | "open-list" | "save-template" | "open-template";

11
app/types/emailSent.ts Normal file
View File

@@ -0,0 +1,11 @@
export interface EmailSent {
id: string;
receiver: string;
subject: string;
content: string;
status: number;
create_time: string;
update_time: string;
}
export type EmailSentStatus = "pending" | "success" | "error"| "schedule";

7
app/types/modal.ts Normal file
View File

@@ -0,0 +1,7 @@
export interface ModalProps {
active: boolean;
onClose: () => void;
height?: string | number;
width?: string | number;
children: React.ReactNode;
}

View File

@@ -0,0 +1,7 @@
export interface openListGmailProps {
emails: string;
dataEmail: { id: string; email: string; name: string }[];
onClose: () => void;
onEdit?: (id: string, name: string, emails: string) => void;
loading?: boolean;
}

View File

@@ -0,0 +1,12 @@
export interface SaveListGmailProps {
emails: string;
name?: string;
id?: string;
onClose?: () => void;
onSuccess?: () => Promise<void>;
}
export interface DataEmail {
email: string;
name: string;
}

View File

@@ -0,0 +1,32 @@
export interface saveListTemplateProps {
name?: string;
content?: {
receiver: string;
subject: string;
content: string;
imageUrl: string | null;
linkUrl: string[] | string;
textLinkUrl: string[] | string;
keyword: Array<string | { keyword: string; value: string }>;
html: string;
};
editMode?: boolean;
id?: number;
onClose?: () => void;
onSuccess?: () => Promise<void>;
}
export interface DataTemplate {
id: number;
name: string;
content: {
receiver: string;
subject: string;
content: string;
imageUrl: string | null;
linkUrl: string[] | string;
textLinkUrl: string[] | string;
keyword: Array<string | { keyword: string; value: string }>;
html: string;
}
}

11
app/types/template1.ts Normal file
View File

@@ -0,0 +1,11 @@
export interface Template1Props {
content:{
subject?: string;
message?: string;
imageUrl?: string | null;
linkUrl?: string[];
textLinkUrl?: string[];
keyword: Array<string | { keyword: string; value: string }>;
}
previewMode?: boolean;
}