Files
panel/test-user-tracking.mjs
Chop 294d8343d3 feat: Implement user tracking in projects
- Added user tracking features to the projects module, including:
  - Database schema updates to track project creator and assignee.
  - API enhancements for user management and project filtering by user.
  - UI components for user assignment in project forms and listings.
  - New query functions for retrieving users and filtering projects.
  - Security integration with role-based access and authentication requirements.

chore: Create utility scripts for database checks and project testing

- Added scripts to check the structure of the projects table.
- Created tests for project creation and user tracking functionality.
- Implemented API tests to verify project retrieval and user assignment.

fix: Update project creation and update functions to include user tracking

- Modified createProject and updateProject functions to handle user IDs for creator and assignee.
- Ensured that project updates reflect the correct user assignments and timestamps.
2025-06-25 23:08:15 +02:00

28 lines
772 B
JavaScript

import {
getAllProjects,
getAllUsersForAssignment,
} from "./src/lib/queries/projects.js";
import initializeDatabase from "./src/lib/init-db.js";
// Initialize database
initializeDatabase();
console.log("Testing user tracking in projects...\n");
console.log("1. Available users for assignment:");
const users = getAllUsersForAssignment();
console.log(JSON.stringify(users, null, 2));
console.log("\n2. Current projects with user information:");
const projects = getAllProjects();
console.log("Total projects:", projects.length);
if (projects.length > 0) {
console.log("\nFirst project details:");
console.log(JSON.stringify(projects[0], null, 2));
} else {
console.log("No projects found.");
}
console.log("\n✅ User tracking implementation test completed!");