Commit graph

319 commits

Author SHA1 Message Date
Tiago Yamamoto
2a602ab09e fix(backend): use pq.Array for PostgreSQL array syntax in dashboard queries 2025-12-22 15:27:30 -03:00
Tiago Yamamoto
940e6561f4 feat(marketplace): add password visibility toggle with eye icon on login page 2025-12-22 15:10:29 -03:00
Tiago Yamamoto
9e0601179e fix(marketplace): install dependencies and resolve vite/client type error 2025-12-22 14:55:12 -03:00
Tiago Yamamoto
e31009fe2b Update seeder env example 2025-12-22 12:05:25 -03:00
Tiago Yamamoto
09b446db89 Add open CORS handling to seeder API 2025-12-22 11:38:52 -03:00
Tiago Yamamoto
55d727f176
Merge pull request #31 from rede5/codex/refactor-api-seeder-for-environment-support
seeder-api: add .env.example, embedded Swagger and optimized Dockerfile
2025-12-22 11:31:33 -03:00
Tiago Yamamoto
52e2706d3e Add env example, swagger, and Dockerfile for seeder api 2025-12-22 11:31:18 -03:00
Tiago Yamamoto
2bfda1fc5e
Merge pull request #30 from rede5/codex/verificar-dados-dinamicos
Fix admin dashboard stats fetching in marketplace
2025-12-22 11:22:19 -03:00
Tiago Yamamoto
c288767057 Fix admin dashboard stats loading 2025-12-22 11:21:56 -03:00
Tiago Yamamoto
03a14b628b fix: seeder tables and marketplace api proxy configuration 2025-12-22 11:14:14 -03:00
Tiago Yamamoto
30b8395639 fix: add missing tables and correct order insertion logic in lean seeder 2025-12-22 11:11:00 -03:00
Tiago Yamamoto
061930a604
Merge pull request #29 from rede5/codex/fix-404-error-for-shipments-and-reviews
Add admin list endpoints for reviews and shipments
2025-12-22 10:25:35 -03:00
Tiago Yamamoto
b0b96d469c Add review and shipment admin listing endpoints 2025-12-22 10:15:27 -03:00
Tiago Yamamoto
35495b4728 fix(backend): properly load .env file manually in config.go 2025-12-22 09:47:17 -03:00
Tiago Yamamoto
08d98aaeca fix: improve login error handling for invalid credentials 2025-12-22 09:31:33 -03:00
Tiago Yamamoto
4ccfa629cc feat: add admin reviews, logistics, profile pages and update seeder 2025-12-22 09:08:42 -03:00
Tiago Yamamoto
4f6c96daf0 feat: improve admin products with store column and seeder with orders/cart
- Add Loja (store) column to ProductsPage showing which company owns product
- Optimize ProductsPage to update local state instead of reloading list
- Add orders (5-10 random) and cart items to lean seeder for testing
- Fix expires_at date format to ISO 8601 for backend compatibility
- Improve delete error message for products with related orders
2025-12-22 08:29:22 -03:00
Tiago Yamamoto
6c0b4c4cd6 fix(marketplace): fix product date format and improve UX
- Convert expires_at to ISO 8601 format for backend compatibility
- Update local state instead of reloading list on edit/create/delete
- Improve delete error message for products with related orders
2025-12-22 08:21:42 -03:00
Tiago Yamamoto
00685f7b26 fix(marketplace): fix duplicate /api in URLs and add adminService tests
- Fix adminService URLs from /api/v1 to /v1 (base URL already includes /api)
- Add adminService.test.ts with 17 unit tests for all CRUD operations
- Update productService.test.ts and auth.test.ts for new apiClient format
- All 31 frontend tests passing
2025-12-22 08:04:27 -03:00
Tiago Yamamoto
460303e90e feat(marketplace): add console logging to adminService for debugging 2025-12-22 07:51:42 -03:00
Tiago Yamamoto
59919cb875 feat(marketplace): implement admin dashboard with full CRUD operations
- Add Header component with top navigation menu
- Create DashboardLayout with nested routing under /dashboard
- Implement Users, Companies, Products, Orders CRUD pages
- Add adminService with all API operations
- Update apiClient to return data directly with patch support
- Fix TypeScript errors in existing pages
- Update seeder README with detailed user credentials table
- Fix fmt.Sprintf format verb in seeder.go
2025-12-22 07:22:01 -03:00
Tiago Yamamoto
ebfc72969c feat(seeder): implemented 4 pharmacies with staff in lean mode 2025-12-22 01:42:21 -03:00
Tiago Yamamoto
d44a8873b9 docs(seeder): update documentation, fix go.mod and ignore binary 2025-12-22 01:38:41 -03:00
Tiago Yamamoto
e624d642aa feat: RBAC implementation and Seeder refactor 2025-12-22 01:30:55 -03:00
Tiago Yamamoto
6e2b6a8e89 debug(marketplace): add component mount log to trigger deploy 2025-12-22 01:17:19 -03:00
Tiago Yamamoto
9740ba2e9b chore(marketplace): configure env vars for API and Map 2025-12-22 01:15:37 -03:00
Tiago Yamamoto
c0903f06ab debug(marketplace): add console.log to authService 2025-12-22 01:09:26 -03:00
Tiago Yamamoto
77c93346e5 debug(marketplace): add console.log to login for debugging 2025-12-22 01:05:31 -03:00
Tiago Yamamoto
9ad6d87590 fix(backend): add missing Username field to admin seeding 2025-12-22 00:45:30 -03:00
Tiago Yamamoto
a160321ca2 chore(backend): remove unused go dependencies 2025-12-22 00:38:55 -03:00
Tiago Yamamoto
a2f305be3f fix(marketplace): exclude test files from production build 2025-12-22 00:35:28 -03:00
Tiago Yamamoto
c9a08c8621 test: add automated tests for admin login
Backend:
- TestAdminLogin_Success: verify admin login with username
- TestAdminLogin_WrongPassword: verify 401 for wrong password

Frontend (Marketplace):
- auth.test.ts: mocked tests for login/logout (5 tests)
- auth.integration.test.ts: real API tests (3 tests, skipped in CI)
2025-12-22 00:31:26 -03:00
Tiago Yamamoto
fa726e5864
Merge pull request #28 from rede5/codex/verificar-erro-de-login
Corrige login do marketplace quando token JWT ausente
2025-12-22 00:06:16 -03:00
Tiago Yamamoto
f0b9d27cee Fix login token guard 2025-12-22 00:06:06 -03:00
Tiago Yamamoto
8b4304b910
Merge pull request #27 from rede5/codex/block-marketplace-search-route
Block marketplace /search route by redirecting to /dashboard
2025-12-22 00:00:43 -03:00
Tiago Yamamoto
c11652d386 Block marketplace search route 2025-12-22 00:00:27 -03:00
Tiago Yamamoto
d79e2ffee0
Merge pull request #26 from rede5/codex/fix-typeerror-for-undefined-properties
Handle missing arrays in marketplace API responses
2025-12-21 23:55:26 -03:00
Tiago Yamamoto
a87459455d Guard against missing marketplace arrays 2025-12-21 23:55:06 -03:00
Tiago Yamamoto
55342c5375
Merge pull request #25 from rede5/codex/implementar-no-marketplace
Implement marketplace authentication login integration
2025-12-21 23:40:47 -03:00
Tiago Yamamoto
b710383733 Implement marketplace auth login integration 2025-12-21 23:40:34 -03:00
Tiago Yamamoto
9997aed18a fix(backend): fix build errors, update tests, and improve documentation
- Add GetUserByEmail to Repository interface for password reset flow
- Add username to UpdateUser query
- Fix config_test.go: remove references to deleted DB pool fields
- Fix handler_test.go: add GetUserByUsername to MockRepository
- Fix usecase_test.go: add GetUserByUsername and update auth tests
- Update backend README with auth and admin seeding info
- Create seeder-api README with usage and warnings
2025-12-21 23:11:33 -03:00
Tiago Yamamoto
4612172b3c feat(backend): switch auth to username and cleanup db config 2025-12-21 23:04:47 -03:00
Tiago Yamamoto
c1f32d0165
Merge pull request #24 from rede5/codex/verify-and-implement-authentication-routes-in-swagger
Add complete auth endpoints, password reset/verify and update swagger
2025-12-21 22:39:01 -03:00
Tiago Yamamoto
b72f8f3099 Add full auth endpoints and swagger updates 2025-12-21 22:37:54 -03:00
Tiago Yamamoto
276b6bb923 refactor(backend): rename SWAGGER_HOST to BACKEND_HOST
Renames SWAGGER_HOST to BACKEND_HOST in .env.example and config. Updates main.go to use the new configuration variable.
2025-12-21 22:21:37 -03:00
Tiago Yamamoto
e162ef04a5
Merge pull request #23 from rede5/codex/add-url-selection-from-env-file
Add Swagger host and schemes env config
2025-12-21 22:16:25 -03:00
Tiago Yamamoto
73ebe3ec6d Add swagger host/scheme env config 2025-12-21 22:16:11 -03:00
Tiago Yamamoto
f71a3a320a
Merge pull request #22 from rede5/codex/fix-content-security-policy-violations
Relax Content-Security-Policy for Swagger UI under /docs
2025-12-21 22:10:19 -03:00
Tiago Yamamoto
8ab398723d Relax CSP for Swagger docs 2025-12-21 22:10:03 -03:00
Tiago Yamamoto
fd237cd9c4 fix(backend): resolving hardcoded values and test failures
Updates .env.example with missing variables. Adds missing security headers in middleware. Fixes repository tests including timezone issues and sqlmock expectations.
2025-12-21 21:43:50 -03:00