Compare commits
69 Commits
fa26764764
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2101ee3e4f | |||
| df16a76909 | |||
|
|
2e2e7f0ae2 | ||
|
|
196fee71ae | ||
|
|
4895aed55d | ||
|
|
bfba41b4fa | ||
|
|
d0579a19fc | ||
|
|
91af420e08 | ||
|
|
da82e90b50 | ||
|
|
edb3c3f744 | ||
|
|
2fdbd4280c | ||
|
|
974f5a863f | ||
|
|
fab8721f0f | ||
|
|
5cb9dcfb0e | ||
|
|
25911c7cb9 | ||
|
|
9b750ac846 | ||
|
|
fbd2214e4c | ||
|
|
b1999fa8af | ||
|
|
a89c7319fb | ||
|
|
9a9651ba15 | ||
|
|
8f90e9c6bc | ||
|
|
3f20d5f345 | ||
|
|
d83ee39022 | ||
|
|
6a5e541622 | ||
|
|
f396c2e79d | ||
|
|
1fa34c2a44 | ||
|
|
7d17b1946f | ||
|
|
7787f4b60f | ||
|
|
db225b299f | ||
|
|
5a2b468af1 | ||
|
|
7bffc99fcb | ||
|
|
c15c4939a2 | ||
|
|
66bb5d116d | ||
|
|
429be1df99 | ||
|
|
2e52821b63 | ||
|
|
2ad3f01887 | ||
|
|
8b12878cfa | ||
|
|
37326db652 | ||
|
|
8043d66898 | ||
|
|
2c4ce1378a | ||
|
|
f569e8bc7d | ||
|
|
0904402a4b | ||
|
|
69e04c46f9 | ||
|
|
1b8da0f58a | ||
|
|
6e9be5da9e | ||
|
|
22c9db526d | ||
|
|
24401fa33d | ||
|
|
8941bb79c7 | ||
|
|
79645a70bc | ||
|
|
a7a2f53ada | ||
|
|
6ec61f802e | ||
|
|
827cac0454 | ||
|
|
3297469bcc | ||
|
|
a7acd2f48c | ||
|
|
33bd968d50 | ||
|
|
41df986d77 | ||
|
|
0284fb7c41 | ||
|
|
c90155149a | ||
|
|
51469ada6d | ||
|
|
fa29bb1064 | ||
|
|
6591120626 | ||
|
|
a061b14914 | ||
|
|
4962f9a625 | ||
|
|
942c757f13 | ||
|
|
7ff67a1f8d | ||
|
|
f2598efddf | ||
|
|
66e0b4659d | ||
|
|
ebbaaa84eb | ||
|
|
82a8b334ba |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -29,6 +29,7 @@ npm-debug.log*
|
|||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
.pnpm-debug.log*
|
.pnpm-debug.log*
|
||||||
|
firebase-debug.log*
|
||||||
|
|
||||||
# env files (can opt-in for committing if needed)
|
# env files (can opt-in for committing if needed)
|
||||||
.env*
|
.env*
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
[debug] [2026-01-23T19:18:31.890Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:31.892Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:31.892Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:31.892Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:31.901Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:31.902Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:32.021Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:32.021Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:32.022Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:32.022Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:32.057Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:32.057Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
[debug] [2026-01-23T19:18:32.058Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
||||||
[debug] [2026-01-23T19:18:32.058Z] > authorizing via signed-in user (ppradeepd@gmail.com)
|
|
||||||
@@ -7,10 +7,9 @@ const nextConfig: NextConfig = {
|
|||||||
// Image optimization
|
// Image optimization
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{ protocol: "https", hostname: "*.contabostorage.com" },
|
||||||
protocol: "https",
|
{ protocol: "https", hostname: "*.amazonaws.com" },
|
||||||
hostname: "**",
|
{ protocol: "https", hostname: "*.digitaloceanspaces.com" },
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export default function UserDetailPage() {
|
|||||||
const [verificationHistory, setVerificationHistory] = useState<VerificationHistoryEntry[]>([]);
|
const [verificationHistory, setVerificationHistory] = useState<VerificationHistoryEntry[]>([]);
|
||||||
const [agentFieldValues, setAgentFieldValues] = useState<AgentFieldValue[]>([]);
|
const [agentFieldValues, setAgentFieldValues] = useState<AgentFieldValue[]>([]);
|
||||||
const [isTogglingStatus, setIsTogglingStatus] = useState(false);
|
const [isTogglingStatus, setIsTogglingStatus] = useState(false);
|
||||||
const [pendingApprovalConfirm, setPendingApprovalConfirm] = useState(false);
|
|
||||||
|
|
||||||
// Is the agent subscription active (paid)?
|
// Is the agent subscription active (paid)?
|
||||||
const PAID_STATUSES = new Set(['ACTIVE', 'TRIALING', 'PAST_DUE']);
|
const PAID_STATUSES = new Set(['ACTIVE', 'TRIALING', 'PAST_DUE']);
|
||||||
@@ -189,23 +188,9 @@ export default function UserDetailPage() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleVerification = async (
|
const handleVerification = async (status: VerificationStatus) => {
|
||||||
status: VerificationStatus,
|
|
||||||
opts?: { skipPaymentCheck?: boolean },
|
|
||||||
) => {
|
|
||||||
if (!user) return;
|
if (!user) return;
|
||||||
|
|
||||||
// Guard: approving a user without active subscription requires extra confirmation
|
|
||||||
if (
|
|
||||||
status === 'APPROVED' &&
|
|
||||||
!opts?.skipPaymentCheck &&
|
|
||||||
!isSubscriptionActive(user.agentProfile?.subscriptionStatus)
|
|
||||||
) {
|
|
||||||
setPendingApprovalConfirm(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setPendingApprovalConfirm(false);
|
|
||||||
setIsUpdatingVerification(true);
|
setIsUpdatingVerification(true);
|
||||||
setError('');
|
setError('');
|
||||||
setUpdateSuccess('');
|
setUpdateSuccess('');
|
||||||
@@ -849,44 +834,6 @@ export default function UserDetailPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Approve-without-payment confirmation modal */}
|
|
||||||
{pendingApprovalConfirm && (
|
|
||||||
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
||||||
<div className="bg-white rounded-lg shadow-xl max-w-md w-full mx-4">
|
|
||||||
<div className="px-6 py-4 border-b border-gray-200">
|
|
||||||
<h3 className="text-lg font-semibold text-gray-900">Approve Without Payment?</h3>
|
|
||||||
</div>
|
|
||||||
<div className="px-6 py-4 space-y-3">
|
|
||||||
<p className="text-sm text-gray-700">
|
|
||||||
This user has <span className="font-semibold text-red-700">not paid</span> for a subscription.
|
|
||||||
</p>
|
|
||||||
<p className="text-sm text-gray-600">
|
|
||||||
Approving will mark the profile as verified and it will be visible in
|
|
||||||
public search results. Payment is not required for visibility.
|
|
||||||
</p>
|
|
||||||
<p className="text-sm text-gray-600">
|
|
||||||
Are you sure you want to approve this profile anyway?
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className="px-6 py-4 border-t border-gray-200 flex justify-end space-x-3">
|
|
||||||
<button
|
|
||||||
onClick={() => setPendingApprovalConfirm(false)}
|
|
||||||
disabled={isUpdatingVerification}
|
|
||||||
className="px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-50"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => handleVerification('APPROVED', { skipPaymentCheck: true })}
|
|
||||||
disabled={isUpdatingVerification}
|
|
||||||
className="px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white rounded-lg transition-colors disabled:opacity-50"
|
|
||||||
>
|
|
||||||
{isUpdatingVerification ? 'Approving...' : 'Approve Anyway'}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user