Commit graph

387 commits

Author SHA1 Message Date
Tiago Yamamoto
841b1d780c feat: Email System, Avatar Upload, Email Templates UI, and Public Job Posting
- Backend: Email producer (LavinMQ), EmailService interface
- Backend: CRUD API for email_templates and email_settings
- Backend: avatar_url field in users table + UpdateMyProfile support
- Backend: StorageService for pre-signed URLs
- NestJS: Email consumer with Nodemailer and Handlebars
- Frontend: Email Templates admin pages (list/edit)
- Frontend: Updated profileApi.uploadAvatar with pre-signed URL flow
- Frontend: New /post-job public page (company registration + job creation wizard)
- Migrations: 027_create_email_system.sql, 028_add_avatar_url_to_users.sql
2025-12-26 12:21:34 -03:00
Tiago Yamamoto
b1639dbcd8 Implement secure Stripe credential management using RSA encryption 2025-12-26 11:03:52 -03:00
Tiago Yamamoto
d771e2a3a9 Hide Companies menu item for non-superadmin users 2025-12-26 10:51:44 -03:00
Tiago Yamamoto
7a1d0417bc Fix ListUsers 500 query error (use tenant_id instead of company_id) 2025-12-26 10:48:11 -03:00
Tiago Yamamoto
722e72cdbd Implement FCM Token Management (DB, Backend, Frontend, Backoffice) 2025-12-26 10:41:50 -03:00
Tiago Yamamoto
03827302e5 Add Stripe controller routes and full Plans CRUD in backoffice 2025-12-26 10:30:10 -03:00
Tiago Yamamoto
ee5a680468 Add missing CRUD routes: Companies GET by ID, Support Tickets 2025-12-26 10:20:38 -03:00
Tiago Yamamoto
d61b4db69a Regenerate Swagger docs with DeleteApplication route 2025-12-26 10:15:31 -03:00
Tiago Yamamoto
f1fc45b5ce Add company edit section to profile page for Admin users 2025-12-26 10:12:56 -03:00
Tiago Yamamoto
d52a83f94b Redirect /profile to /dashboard/profile for dashboard layout 2025-12-26 10:09:41 -03:00
Tiago Yamamoto
78857b7afe Show Backoffice menu only for Superadmin users 2025-12-26 10:08:22 -03:00
Tiago Yamamoto
fb98016afc Refactor RBAC: Admin sees only their company data, Superadmin sees all 2025-12-26 10:05:57 -03:00
Tiago Yamamoto
f9c9293a19 Fix undefined middleware.GetRequestID in backend 2025-12-26 09:58:33 -03:00
Tiago Yamamoto
e0b16e5b29 Fix profile 404/500 and user deletion 403 2025-12-26 09:55:19 -03:00
Tiago Yamamoto
f51a8dd99c fix: resolved user profile 500 error, fixed frontend build types, enhanced logging, increases test coverage 2025-12-26 01:35:34 -03:00
Tiago Yamamoto
3fa875ed98 feat: implemented delete application endpoint and dashboard action 2025-12-26 01:29:31 -03:00
Tiago Yamamoto
7b76b62490 feat(backoffice): implemented edit and delete company functionality 2025-12-26 01:23:01 -03:00
Tiago Yamamoto
43c0719664 feat(users): add company selection and status to create user modal 2025-12-26 01:18:14 -03:00
Tiago Yamamoto
6ab7e357fb fix(users): resolve 403 on update and enable role/status editing 2025-12-26 01:14:18 -03:00
Tiago Yamamoto
3d7612901d feat(seeder): add job tags seeder
- Created seeders/tags.js with area, level, and stack categories
- Area: Engineering, Design, Product, Marketing, Sales, etc.
- Level: Intern, Junior, Mid, Senior, Lead, Staff, Manager, etc.
- Stack: JavaScript, Python, Go, React, Node.js, AWS, Docker, etc.
- 79+ tags in total
2025-12-26 01:04:29 -03:00
Tiago Yamamoto
e47c25fac8 fix(companies): format JSON description in modal
- Added formatDescription helper to parse JSON and display as formatted list
- Shows tagline, stores, employees, motto etc as labeled fields
- Falls back to plain text if not JSON
2025-12-26 01:02:16 -03:00
Tiago Yamamoto
16012b701a fix(companies): remove Slug column from table 2025-12-26 01:01:10 -03:00
Tiago Yamamoto
eae3df7f38 fix(cors): add PATCH to allowed methods
Without PATCH in CORS headers, user update was failing with:
'Method PATCH is not allowed by Access-Control-Allow-Methods'
2025-12-26 00:59:04 -03:00
Tiago Yamamoto
aa97d86d0e feat(jobs): add public job posting page
- Created /register/job page with same layout as company registration
- Split panel design: info panel on left, form on right
- Two-step form: job details, then salary & company selection
- Uses same styling and animations as company registration
2025-12-26 00:54:33 -03:00
Tiago Yamamoto
73967ca52b fix(users): allow superadmin to list all users without tenant restriction
- Modified ListUsers handler to check for admin/superadmin role
- Superadmins can now list all users across tenants
- Added ListUsers method to AdminService
- Added Status field to dto.User

Fixes 403 error when superadmin tries to access /api/v1/users
2025-12-26 00:51:54 -03:00
Tiago Yamamoto
546e253a5f feat(companies): add view modal and fix createdAt field
- Added modal dialog to view company details when clicking eye icon
- Fixed createdAt field name (was created_at, Go returns camelCase)
- Expanded AdminCompany type to include all company fields
- Modal shows: status badges, contact info, description, timestamps
2025-12-26 00:47:04 -03:00
Tiago Yamamoto
f396acfb72 debug: add RBAC logging to RequireRoles middleware 2025-12-26 00:42:55 -03:00
Tiago Yamamoto
01aca8971b fix(auth): include legacy role column in getRoles query
The superadmin role was stored in users.role column but getRoles()
only checked user_roles table. Updated to use UNION query that
combines both sources for backward compatibility.

Fixes 403 Forbidden on /api/v1/users for admin users.
2025-12-25 23:20:22 -03:00
Tiago Yamamoto
14af54ec39 fix(backoffice): upgrade @fastify/cookie to v11 for Fastify 5 compatibility
- Updated @fastify/cookie from ^9.3.1 to ^11.0.0
- Fixes FST_ERR_PLUGIN_VERSION_MISMATCH error
2025-12-25 22:44:49 -03:00
Tiago Yamamoto
cb6afe9583 fix(frontend): enable job delete/update API calls and add logging
- Added update() and delete() methods to jobsApi in api.ts
- Fixed handleDeleteJob to call jobsApi.delete() instead of just local state
- Fixed handleSaveEdit to call jobsApi.update() instead of being commented out
- Added console logging to all CRUD operations for debugging
2025-12-25 22:41:38 -03:00
Tiago Yamamoto
930c57a9c7 debug(backend): add console logging to job creation endpoint
- Added debug logging to job_handler.go CreateJob
- Added debug logging to job_service.go CreateJob
- Tracks request data, userID extraction, SQL execution, and errors
2025-12-25 22:34:24 -03:00
Tiago Yamamoto
362b569c8d refactor(frontend): consolidate job creation into single page form
- Replaced 6-step wizard (673 lines) with single-page form (290 lines)
- Removed billing/payment steps for now
- All fields visible with clear section headers
- Save as Draft and Publish buttons
2025-12-25 22:11:16 -03:00
Tiago Yamamoto
151d1f4347 test(backend): add UpdateCompanyStatus tests for admin service
- Added 3 test cases: updates active status, updates verified status, and error when company not found
- All tests passing
2025-12-25 22:08:02 -03:00
Tiago Yamamoto
39d1eff80f fix(frontend): fix string/number ID comparison in jobs page
- handleDeleteJob: compare string IDs directly instead of parseInt
- handleSaveEdit: use string ID for future update logic
- IDs are now UUIDs (strings) after migration
2025-12-25 21:49:09 -03:00
Tiago Yamamoto
39fde338b4 fix(frontend): pass string ID to adminCompaniesApi.updateStatus 2025-12-25 21:00:01 -03:00
Tiago Yamamoto
59df524ed5 test: add admin, notification, audit service tests (+30% coverage increase) 2025-12-24 20:01:54 -03:00
Tiago Yamamoto
48dad702d6 fix(frontend): adjust admin jobs pagination property access 2025-12-24 19:53:54 -03:00
Tiago Yamamoto
49fdcd0168 fix(router): allow public access to tags api for recruiters 2025-12-24 19:51:52 -03:00
Tiago Yamamoto
4eae018a25 fix(backoffice): use string IDs for companies/jobs/users, fix audit log, ensure real tags support 2025-12-24 19:43:49 -03:00
Tiago Yamamoto
9784e959e4 feat: add profile page, dynamic dashboard, and backend integration tests 2025-12-24 19:38:11 -03:00
Tiago Yamamoto
cc5ac7c73c feat: add profile page, dynamic dashboard, and fix candidate 500 error 2025-12-24 19:22:14 -03:00
Tiago Yamamoto
72957b418a chore(backoffice): allow build with outdated lockfile to unblock deploy 2025-12-24 18:33:01 -03:00
Tiago Yamamoto
96571261d9 chore: update pnpm-lock.yaml 2025-12-24 18:28:23 -03:00
Tiago Yamamoto
3ab04c5fd7 feat(seeder): interleave users and companies before heavy city seeding 2025-12-24 18:25:50 -03:00
Tiago Yamamoto
4b3eb2feee feat(seeder): add detailed execution timers (stopwatch) for location data 2025-12-24 18:22:40 -03:00
Tiago Yamamoto
858df02a1d feat(seeder): optimize city loading with bulk inserts and fix migration order 2025-12-24 18:19:03 -03:00
Tiago Yamamoto
617bb5ab39 fix(rbac): add migration to fix seeded users roles and patch notifications store 2025-12-24 18:14:35 -03:00
Tiago Yamamoto
9b389e1c9f fix(services): initialize all list slices to empty array to prevent null json response 2025-12-24 18:11:17 -03:00
Tiago Yamamoto
861128571a fix(migrations): add migration to fix superadmin role and users e2e test 2025-12-24 18:06:49 -03:00
Tiago Yamamoto
06ed927ef4 fix(services): initialize slices to empty array to prevent null json response 2025-12-24 17:52:13 -03:00