mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 07:52:10 +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:
@ -366,6 +366,9 @@ export async function processQueuedImports(
|
||||
const unprocessedImports = await prisma.sessionImport.findMany({
|
||||
where: {
|
||||
session: null, // No session created yet
|
||||
company: {
|
||||
status: "ACTIVE" // Only process imports from active companies
|
||||
}
|
||||
},
|
||||
take: batchSize,
|
||||
orderBy: {
|
||||
|
||||
@ -172,6 +172,11 @@ export class ProcessingStatusManager {
|
||||
where: {
|
||||
stage,
|
||||
status: ProcessingStatus.PENDING,
|
||||
session: {
|
||||
company: {
|
||||
status: "ACTIVE" // Only process sessions from active companies
|
||||
}
|
||||
}
|
||||
},
|
||||
include: {
|
||||
session: {
|
||||
|
||||
@ -17,7 +17,9 @@ export function startCsvImportScheduler() {
|
||||
);
|
||||
|
||||
cron.schedule(config.csvImport.interval, async () => {
|
||||
const companies = await prisma.company.findMany();
|
||||
const companies = await prisma.company.findMany({
|
||||
where: { status: "ACTIVE" } // Only process active companies
|
||||
});
|
||||
for (const company of companies) {
|
||||
try {
|
||||
const rawSessionData = await fetchAndParseCsv(
|
||||
|
||||
Reference in New Issue
Block a user