feat: remove user verification button and related logic from AdminUserVerifyPage
This commit is contained in:
parent
3f247e2397
commit
8307654458
@ -5,7 +5,6 @@ import PageLayout from '../../components/PageLayout'
|
||||
import UserDetailModal from '../../components/UserDetailModal'
|
||||
import {
|
||||
MagnifyingGlassIcon,
|
||||
CheckIcon,
|
||||
ExclamationTriangleIcon,
|
||||
EyeIcon
|
||||
} from '@heroicons/react/24/outline'
|
||||
@ -19,9 +18,7 @@ export default function AdminUserVerifyPage() {
|
||||
const {
|
||||
pendingUsers,
|
||||
loading,
|
||||
error,
|
||||
verifying,
|
||||
verifyUser: handleVerifyUser,
|
||||
error,
|
||||
isAdmin,
|
||||
fetchPendingUsers
|
||||
} = useAdminUsers()
|
||||
@ -275,13 +272,8 @@ export default function AdminUserVerifyPage() {
|
||||
? (u.company_name?.[0] || 'C').toUpperCase()
|
||||
: `${u.first_name?.[0] || 'U'}${u.last_name?.[0] || 'U'}`.toUpperCase()
|
||||
|
||||
const isVerifying = verifying.has(u.id.toString())
|
||||
const createdDate = new Date(u.created_at).toLocaleDateString()
|
||||
|
||||
// Check if user has completed all verification steps
|
||||
const isReadyToVerify = u.email_verified === 1 && u.profile_completed === 1 &&
|
||||
u.documents_uploaded === 1 && u.contract_signed === 1
|
||||
|
||||
return (
|
||||
<tr key={u.id} className="hover:bg-blue-50">
|
||||
<td className="px-4 py-4">
|
||||
@ -314,30 +306,6 @@ export default function AdminUserVerifyPage() {
|
||||
<EyeIcon className="h-4 w-4" /> View
|
||||
</button>
|
||||
|
||||
{isReadyToVerify ? (
|
||||
<button
|
||||
onClick={() => handleVerifyUser(u.id.toString())}
|
||||
disabled={isVerifying}
|
||||
className={`inline-flex items-center gap-1 rounded-lg border px-3 py-2 text-xs font-medium transition
|
||||
${isVerifying
|
||||
? 'border-gray-200 bg-gray-100 text-gray-400 cursor-not-allowed'
|
||||
: 'border-emerald-200 bg-emerald-50 hover:bg-emerald-100 text-emerald-700'
|
||||
}`}
|
||||
>
|
||||
{isVerifying ? (
|
||||
<>
|
||||
<span className="h-3 w-3 rounded-full border-2 border-emerald-500 border-b-transparent animate-spin" />
|
||||
Verifying...
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<CheckIcon className="h-4 w-4" /> Verify
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
) : (
|
||||
<span className="text-xs text-gray-500 italic">Incomplete steps</span>
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user