mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 13:52:16 +01:00
feat: enhance platform dashboard UX and add security controls
- Move Add Company button to Companies card header for better context - Add smart Save Changes button that only appears when data is modified - Implement navigation protection with unsaved changes warnings - Add company status checks to prevent suspended companies from processing data - Fix platform dashboard showing incorrect user counts - Add dark mode toggle to platform interface - Add copy-to-clipboard for generated credentials - Fix cookie conflicts between regular and platform auth - Add invitedBy and invitedAt tracking fields to User model - Improve overall platform management workflow and security
This commit is contained in:
@ -44,6 +44,17 @@ export async function POST(request: NextRequest) {
|
||||
return NextResponse.json({ error: "Company not found" }, { status: 404 });
|
||||
}
|
||||
|
||||
// Check if company is active and can process data
|
||||
if (company.status !== "ACTIVE") {
|
||||
return NextResponse.json(
|
||||
{
|
||||
error: `Data processing is disabled for ${company.status.toLowerCase()} companies`,
|
||||
companyStatus: company.status
|
||||
},
|
||||
{ status: 403 }
|
||||
);
|
||||
}
|
||||
|
||||
const rawSessionData = await fetchAndParseCsv(
|
||||
company.csvUrl,
|
||||
company.csvUsername as string | undefined,
|
||||
|
||||
Reference in New Issue
Block a user