|
| 1 | +/* eslint-disable */ |
| 2 | +import React from "react"; |
| 3 | + |
| 4 | +interface ApplicationFilterProps { |
| 5 | + searchTerm: string; |
| 6 | + setSearchTerm: (value: string) => void; |
| 7 | + filterStatus: string; |
| 8 | + setFilterStatus: (value: string) => void; |
| 9 | + sortBy: string; |
| 10 | + setSortBy: (value: string) => void; |
| 11 | + sortOrder: string; |
| 12 | + setSortOrder: (value: string) => void; |
| 13 | +} |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +const ApplicationFilter: React.FC<ApplicationFilterProps> = ({ |
| 18 | + searchTerm, setSearchTerm, filterStatus, setFilterStatus, sortBy, setSortBy, sortOrder, setSortOrder |
| 19 | +}) => { |
| 20 | + return ( |
| 21 | + <div className="flex items-center justify-between space-x-4 mb-4"> |
| 22 | + <input |
| 23 | + type="text" |
| 24 | + placeholder="Search applicants..." |
| 25 | + value={searchTerm} |
| 26 | + onChange={(e) => setSearchTerm(e.target.value)} |
| 27 | + className="border text-sm dark:border-slate-400 dark:bg-dark-bg dark:text-white p-[0.5rem] rounded-md w-1/4" |
| 28 | + /> |
| 29 | + |
| 30 | + <div className="flex gap-4 items-center"> |
| 31 | + <select value={filterStatus} onChange={(e) => setFilterStatus(e.target.value)} |
| 32 | + className="border dark:border-slate-400 p-[0.5rem] text-sm rounded-md dark:bg-dark-bg dark:text-white " > |
| 33 | + <option value="All">All Status</option> |
| 34 | + <option value="submitted">Submitted</option> |
| 35 | + <option value="Shortlisted">Shortlisted</option> |
| 36 | + <option value="English assessment">English Assessment</option> |
| 37 | + <option value="Technical assessment">Technical Assessment</option> |
| 38 | + <option value="Done Technical assessment">Done Technical Assessment</option> |
| 39 | + <option value="Invited for Home Challenge">Invited for Home Challenge</option> |
| 40 | + <option value="Done Home Challenge">Done Home Challenge</option> |
| 41 | + <option value="Invited for Interview">Invited for Interview</option> |
| 42 | + <option value="Accepted">Accepted</option> |
| 43 | + <option value="Reject">Rejected</option> |
| 44 | + <option value="Missed English assessment">Missed English Assessment</option> |
| 45 | + <option value="Missed Technical assessment">Missed Technical Assessment</option> |
| 46 | + <option value="Missed Interview">Missed Interview</option> |
| 47 | + </select> |
| 48 | + |
| 49 | + <select value={sortBy} onChange={(e) => setSortBy(e.target.value)} className="border text-sm dark:border-slate-400 p-[0.5rem] rounded-md dark:bg-dark-bg dark:text-white"> |
| 50 | + <option value="dateOfSubmission">Date</option> |
| 51 | + <option value="firstName">First Name</option> |
| 52 | + <option value="lastName">Last Name</option> |
| 53 | + <option value="status">Status</option> |
| 54 | + </select> |
| 55 | + <select value={sortOrder} onChange={(e) => setSortOrder(e.target.value)} className="border text-sm dark:border-slate-400 p-[0.5rem] rounded-md dark:bg-dark-bg dark:text-white"> |
| 56 | + <option value="desc">DESC</option> |
| 57 | + <option value="asc">ASC</option> |
| 58 | + </select> |
| 59 | + |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + ); |
| 63 | +}; |
| 64 | + |
| 65 | +export default ApplicationFilter; |
0 commit comments