feat: email on inquiry
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import {useState, useEffect, useCallback} from "react";
|
||||
|
||||
import {
|
||||
getEmailConfigsApi,
|
||||
@@ -16,9 +16,9 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import {Card, CardContent, CardHeader, CardTitle} from "@/components/ui/card";
|
||||
import {Button} from "@/components/ui/button";
|
||||
import {Input} from "@/components/ui/input";
|
||||
|
||||
import {
|
||||
Dialog,
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
DialogFooter,
|
||||
} from "@/components/ui/dialog";
|
||||
|
||||
import { Loader2, Plus, Pencil, Trash, RefreshCw } from "lucide-react";
|
||||
import {Loader2, Plus, Pencil, Trash, RefreshCw} from "lucide-react";
|
||||
|
||||
export default function EmailPage() {
|
||||
const [emails, setEmails] = useState<any[]>([]);
|
||||
@@ -69,7 +69,7 @@ export default function EmailPage() {
|
||||
);
|
||||
|
||||
function handleChange(e: any) {
|
||||
setForm({ ...form, [e.target.name]: e.target.value });
|
||||
setForm({...form, [e.target.name]: e.target.value});
|
||||
}
|
||||
|
||||
function openAdd() {
|
||||
@@ -181,14 +181,16 @@ export default function EmailPage() {
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
onClick={() => openEdit(item)}>
|
||||
onClick={() => openEdit(item)}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
onClick={() => handleDelete(item.id)}>
|
||||
onClick={() => handleDelete(item.id)}
|
||||
>
|
||||
<Trash className="h-4 w-4" />
|
||||
</Button>
|
||||
</TableCell>
|
||||
@@ -225,10 +227,12 @@ export default function EmailPage() {
|
||||
name="type"
|
||||
value={form.type}
|
||||
onChange={handleChange}
|
||||
className="border rounded px-2 py-2 w-full">
|
||||
className="border rounded px-2 py-2 w-full"
|
||||
>
|
||||
<option value="APPOINTMENT">APPOINTMENT</option>
|
||||
<option value="CANDIDATE">CANDIDATE</option>
|
||||
<option value="ACADEMICS">ACADEMICS</option>
|
||||
<option value="INQUIRY">INQUIRY</option>
|
||||
</select>
|
||||
|
||||
<select
|
||||
@@ -240,7 +244,8 @@ export default function EmailPage() {
|
||||
isActive: e.target.value === "true",
|
||||
})
|
||||
}
|
||||
className="border rounded px-2 py-2 w-full">
|
||||
className="border rounded px-2 py-2 w-full"
|
||||
>
|
||||
<option value="true">Active</option>
|
||||
<option value="false">Inactive</option>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user