Commit graph

104 commits

Author SHA1 Message Date
Ashwin Kumar Sivakumar
0866b7a069 fix(admin): add missing detail pages for 8 profession admin lists
All checks were successful
build-and-release / build (push) Successful in 44s
Each of these profession admin list pages (makeup artist, tutor, developer,
video editor, graphic designer, social media manager, fitness trainer,
catering services) linked "View Profile" to /admin/{role}/{id}, but only
Photographer and Company had a real [id].tsx route — every other role fell
through to the legacy catch-all module and showed a placeholder instead of
the applicant's actual profile. Converts each flat list route into a
folder (index.tsx + [id].tsx) and adds a shared ProfessionDetailPage
component, modeled on the working Photographer detail page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 21:24:02 +05:30
Ashwin Kumar Sivakumar
7ae59fee20 fix: admin panel bugs found in QA audit
All checks were successful
build-and-release / build (push) Successful in 59s
- users: wire suspend/block buttons to PATCH /api/admin/users/:id/status
  (previously only mutated local state, reverted on refresh); add
  load/action error banners instead of silently emptying the table
- [...module]: stop rendering a dead localhost:9201 iframe for legacy
  modules when VITE_LEGACY_ADMIN_ORIGIN isn't configured (it never is
  in production); show a clear "not available" message instead
- dashboard: surface a banner when /api/admin/dashboard/metrics fails
  instead of silently showing "No Data" on every widget
- credit: fix stray extra closing </Show> tag that broke the whole
  file's JSX parse; restore missing API/authHeaders module helpers
  dropped in a previous refactor (AI Credits handlers referenced them
  but they were undefined); replace a dead, broken exportLedgerCsv/
  filteredLedger implementation with one matching actual call sites;
  fix activeTab type/tab keys so the Balance & Ledger and Platform
  Ledger tabs were actually reachable (they compared against 'balance'
  /'platform' but the tab buttons only ever set 'ledger')
- roles: surface errors when fetching a role's permissions for edit
  fails, instead of silently swallowing them
- runtime-roles: surface fetch/delete errors instead of silently
  swallowing them or presenting fallback sample data as if real

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 18:24:44 +05:30
Ashwin Kumar Sivakumar
ef8f4410c7 fix: dead Add Note buttons and no-op row click in admin review pages
Some checks failed
build-and-release / build (push) Failing after 1m16s
- verification/[id].tsx: "Add Note" in the Reviewer Notes panel had no
  onClick — wired to the existing POST /api/admin/verifications/:id/notes
  endpoint.
- approval/index.tsx: Decision Notes textarea was uncontrolled and its
  "Add Note" button was a no-op; there's no standalone notes endpoint
  for approval_requests, so the textarea is now bound to state and its
  value is sent as the rejection reason when the reviewer rejects
  (the only channel the backend currently supports).
- support.tsx: removed a no-op onClick={() => {}} on the case row —
  the row isn't actually clickable, only the adjacent "View" link is
  (though that link's target route doesn't exist yet — flagged
  separately, out of scope here).
2026-07-12 17:59:03 +05:30
Ashwin Kumar Sivakumar
43d181bf5a fix: JSX structure in credit.tsx
Some checks failed
build-and-release / build (push) Failing after 1m11s
- Fix nested tag structure: AI Credits tab was incorrectly nested inside Platform Ledger section
- Close Platform Ledger section before starting AI Credits tab
- Move AI Credits tab to be a sibling of Platform Ledger tab, not a child
- Wrap AI Credits content in proper section element for consistent styling

Fixes build errors in admin-solid
2026-07-06 03:04:14 +05:30
Ashwin Kumar Sivakumar
578fb2c5a1 fix: JSX structure in credit.tsx
Some checks failed
build-and-release / build (push) Failing after 1m10s
- Fix nested tag structure: AI Credits tab was incorrectly nested inside Platform Ledger section
- Close Platform Ledger section before starting AI Credits tab
- Move AI Credits tab to be a sibling of Platform Ledger tab, not a child
- Wrap AI Credits content in proper section element for consistent styling
2026-07-06 02:49:39 +05:30
Ashwin Kumar Sivakumar
059c7569c4 feat: Add AI Credits admin UI on high-performance branch (Task 2)
Some checks failed
build-and-release / build (push) Failing after 1m10s
- pricing.tsx: AI Credit Packages tab
- credit.tsx: AI Credits panel with Balance/Ledger/Adjust/Reconcile
2026-07-06 01:49:44 +05:30
Tracewebstudio Dev
69079caa1d feat: admin invoice/credit/pricing UI overhaul with auth token injection
Some checks failed
build-and-release / build (push) Failing after 0s
- Inject Bearer token from sessionStorage into all API requests
- Add typed API helpers for invoices, credits, discounts, ledger, orders, pricing, tax
- Overhaul invoice, credit, pricing, tax admin routes with full CRUD UI
- Remove committed log files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 13:51:08 +02:00
Tracewebstudio Dev
22fe140987 Refine admin Razorpay gateway screen 2026-06-26 21:08:26 +02:00
Ashwin Kumar Sivakumar
446152648f feat(ai): add AI management page and sidebar link 2026-06-15 06:19:17 +05:30
Tracewebstudio Dev
394046fdb3 Update admin session, gateway, jobs/leads routes, login, and add API me endpoint 2026-05-08 15:34:46 +02:00
Tracewebstudio Dev
b75c99408c chore: checkpoint workspace updates 2026-04-26 23:58:42 +02:00
Tracewebstudio Dev
2c4e579725 Fix admin dashboard API endpoint and close missing bracket in create role form 2026-04-19 22:20:08 +02:00
Tracewebstudio Dev
10c7ba0934 fix: close div tag properly in department.tsx settings tab 2026-04-15 15:17:12 +02:00
Tracewebstudio Dev
232309e353 fix: update admin forms to match DB schema 2026-04-15 06:23:29 +02:00
Tracewebstudio Dev
a8b1b7cd11 feat: multi-select roles in pricing management UI 2026-04-13 01:36:15 +02:00
Ashwin Kumar
ad9be1ab15 fix(build): restore missing admin imports and api client 2026-04-10 19:57:23 +02:00
Ashwin Kumar
10b6c48f1b feat(smtp): update SMTP management page with test functionality and email templates link
- Redesign SMTP management page with two-column layout

- Add SMTP connection test functionality

- Add link to email templates page

- Show current SMTP status

- Add quick help section
2026-04-10 04:55:44 +02:00
Ashwin Kumar
2409d85b3c feat(admin): add email management page with preview and test functionality
- Add email management page with template listing

- Add email preview with iframe

- Add test email sending functionality

- Add Email Management to sidebar navigation
2026-04-10 04:50:00 +02:00
Ashwin Kumar
1c94f97d11 dashboard implementation 2026-04-10 01:17:00 +02:00
Ashwin Kumar
8950a502f6 chore: align admin management modules, auth flows, and test stability 2026-04-08 22:12:38 +02:00
Ashwin Kumar
411827f837 Fix auth headers on pricing/credit/invoice/coupon pages
- All 4 pages now send Bearer token from sessionStorage on every fetch
- Pricing: fixed endpoint from /api/admin/packages → /api/admin/tracecoin-packages;
  added search, role filter, status filter, and sort (name/price/coins)
- Coupon: added search by code/title and status filter; fixed refetch to use load()
- Invoice: refactored from createResource to onMount+signals for consistent auth
- Credit: authenticated balance, ledger, adjust, and reconcile fetch calls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 02:11:06 +02:00
Ashwin Kumar
0ec64be905 feat: unify API paths and upgrade table UIs
- Replace all /api/gateway/* with /api/* to match gateway routing
- Fix AdminShell.tsx: update UGC route to singular and fix logout URL
- Remove Applications and Responses from sidebar (unused)
- Move conflicting route files into folders (company, approval, verification, users, jobs, kb, leads, photographer) as index.tsx to avoid catch-all interference
- Upgrade ProfessionAdminListPage to match Department Management UI:
  • Dark headers with white text
  • Icons on Sort/Filters/Export buttons
  • Pagination UI
  • Improved empty state with Create button
  • Hover effects and consistent spacing
- Update all pages using ProfessionAdminListPage to benefit from new UI
- Fix jobs admin endpoint to use /api/admin/companies/jobs with auth
- Add authentication headers to jobs and leads fetch calls

These changes unify the API architecture and bring a consistent, professional look to all management tables.
2026-04-07 22:12:52 +02:00
Ashwin Kumar
ead325a3e3 fix: use formRoleKey fallback for roleKey in external dashboard preview
When roles API fails to load or roleId doesn't match a loaded role,
selectedRoleKey() returns empty string. Fall back to formRoleKey() in
all three DashboardDesignPreview instances (compact, full_preview tab,
fullscreen overlay) so the role-specific preview always renders correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 22:24:59 +02:00
Ashwin Kumar
2e3c2d6db8 feat: use dedicated admin endpoints for profession management
- Create ProfessionAdminListPage component for admin list views
- Update all 9 profession pages to use /api/admin/<profession> endpoints
- Remove unused FALLBACK_* constants from onboarding-schemas
- Improves performance and data accuracy for admin profession management
2026-04-06 19:51:47 +02:00
Ashwin Kumar
65156aafde fix: use admin jobs endpoint in admin jobs management page
- Change fetch from /api/jobs to /api/admin/jobs
- Adjust fields to match new endpoint: use salary_min/salary_max, posted_at, company_name
2026-04-06 19:12:22 +02:00
Ashwin Kumar
88a00db3bd feat: complete Knowledge Base category management and fix structure
- Added full CRUD UI for categories (create/edit/delete)
- Category form with name, slug, description, display order, active toggle
- Categories displayed as editable tags with delete icons
- Removed duplicate second implementation entirely
- Fixed file structure to have single component
- Updated package.json with solid-markdown dependency
- Integrated Markdown component into article detail page for proper rendering
2026-04-06 18:39:20 +02:00
Ashwin Kumar
44d4ce5b2a feat: add admin notification polling, KB category CRUD helpers, fix duplicate code
- AdminShell: added notification bell polling every 30s
- KB page: added createCategory, updateCategory, deleteCategory API helpers
- KB page: added category management state and handlers
- KB page: removed duplicate second implementation (partial)
- KB page: need to insert category UI in next step
2026-04-06 18:38:28 +02:00
Ashwin Kumar
0c757cf5bd feat(admin): wire verification actions, remove onboarding management, fix kb.tsx
- verification/[id].tsx: approve, reject, request-documents, request-revision
  all wired to real API endpoints with loading states and feedback banners
- Delete onboarding-management/ (flow moved to dashboard My Profile/Portfolio)
- kb.tsx: remove stray closing brace (TS1128 syntax error)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 17:20:41 +02:00
Ashwin Kumar
005572cdd2 feat(kb): migrate admin KB page to persistent API storage
- Replace runtime storage CRUD with real /api/admin/kb endpoints
- Add proper error handling and state management
- Support seed functionality via API
- Align data mapping with backend Article and Category structs
- Improves data persistence and admin UX

Closes #KB-API-Migration
2026-04-06 15:06:22 +02:00
Ashwin Kumar
82cfd3c1d7 fix: admin pricing page endpoint, JSX structure fixes
- pricing: change /api/admin/tracecoin-packages to /api/admin/packages
- modules.tsx: wrap with fragment, fix heading structure
- [...module].tsx: fix missing container div
- DashboardDesignPreview.tsx: fix '>' in text
2026-04-06 08:24:14 +02:00
Ashwin Kumar
0a0c51adc1 feat: wire admin dashboard to real metrics and fix JSX errors
- Wire dashboard home to live /api/admin/dashboard/metrics with 8 KPI widgets
- Add pending_approvals and total_revenue widget definitions
- Fix JSX syntax errors in [...module].tsx and modules.tsx
- Fix '>' character in DashboardDesignPreview.tsx
2026-04-06 06:19:14 +02:00
Ashwin Kumar
ac146c4d36 feat: implement dynamic knowledge base management and seeding 2026-04-06 03:33:11 +02:00
Ashwin Kumar
9bfaa2279c chore: update admin docs, role config, and kb management 2026-04-06 01:46:58 +02:00
Ashwin Kumar
ab658d826b Add UGC Content Creator to AdminShell; fix dashboard preview bugs
- AdminShell: add PAGE_TITLES and ROUTE_MODULE_KEYS entries for
  /admin/ugc-content-creators with UGC_CONTENT_CREATOR_MANAGEMENT keys
- DashboardDesignPreview: fix portfolioMediaConfig to include DEVELOPER and
  FITNESS_TRAINER as visual portfolio roles
- DashboardDesignPreview: add missing customerViewFor handlers for
  'applications', 'shortlisted candidates', 'my applications', 'saved jobs'
- external-dashboard-management: add 'Settings' to CUSTOMER sidebar array
- Fix launch.json PATH so npm is found in sh shell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-05 21:14:11 +02:00
Ashwin Kumar
8855b8b378 chore: sync latest dashboard and role flow updates 2026-04-05 16:52:01 +02:00
Ashwin Kumar
c526a376d5 fix(admin): convert AdminShell to persistent layout, fix company API URL
Replace per-page AdminShell wrapping with a single SolidStart layout file
(src/routes/admin.tsx) so the shell mounts once and persists across all
/admin/* navigation — eliminating the sidebar bounce and session re-check
flash that occurred on every page transition.

- Create src/routes/admin.tsx as layout with <Outlet /> for child routes
- Remove <AdminShell> import/wrapper from all 66 route files and 2 shared
  components (RoleUserManagementTablePage, UserListPage)
- Fix company.tsx: wrong fetch URL /api/admin/companies → /api/gateway/api/admin/companies
- Add missing auth headers (Authorization Bearer) to company.tsx and users.tsx
- Fix admin/index.tsx API constant from hardcoded localhost:8000 → /api/gateway

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 02:49:14 +02:00
Ashwin Kumar
8345d6574c feat(admin): wire management modules to live backend and add UGC role 2026-04-02 13:09:42 +02:00
Ashwin Kumar
82036a0608 Align admin management tables and flows with department pattern 2026-04-02 00:42:42 +02:00
Ashwin Kumar
ad8a17a766 Refine external preview flows and simplify verification/approval management 2026-03-30 21:43:49 +02:00
Ashwin Kumar
8a24700e73 feat(dashboard): add My Portfolio to all professional role dashboards
- Add full single-page portfolio preview in DashboardDesignPreview with
  profile header, about, packages, gallery, experience, testimonials,
  and FAQs sections matching Department Management design language
- Fix sidebar persona resolution to always include My Portfolio for all
  professional subtypes (Photographer, Graphic Designer, Makeup Artist,
  Tutor, Developer, Video Editor, Social Media Manager, Fitness Trainer,
  Catering Services) via a three-layer fallback: roleId lookup → role
  key from roles list → formRoleKey stored directly from dashboard record
- Add personaFromKey() helper so any professional role key maps to
  PROFESSIONAL sidebar even when the roles API returns empty data

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 14:19:00 +02:00
Ashwin Kumar
8ed523d80c Standardize admin tables and polish shell UX 2026-03-30 04:48:09 +02:00
Ashwin Kumar
d7bf5a6d56 feat(roles): add module permissions for dashboards/onboarding/external roles 2026-03-27 21:34:39 +01:00
Ashwin Kumar
93e38018dc feat(admin): runtime-gated sidebar, wire roles/employees/departments/designations 2026-03-27 21:25:00 +01:00
Ashwin Kumar
bed0942d12 fix: dashboard layout spacing and CSS cascade layer bug
Move CSS reset into @layer base so Tailwind utilities aren't overridden.
Fix settings panel: search icon overlap, cramped widget items, spacing
between header card and widget grid using inline margin styles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 20:10:08 +01:00
Ashwin Kumar
7c4ed94975 feat: wire internal role management to real API
Full wiring: load() fetches audience=INTERNAL roles, save() creates/updates
via POST/PATCH with key/name/description/department_id/permissions/settings,
delete and status toggle wired. Permission matrix uses MODULE_PERMISSIONS
with prefix_ACTION keys. Detail view fetches permission_keys from GET /{id}.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 19:27:35 +01:00
Ashwin Kumar
0d9837b8dc feat: wire department management to real API
Remove FALLBACK_DEPARTMENTS array and fallback logic. Normalize fields
from snake_case backend response (total_employees, department_head,
department_email, transfers_enabled). Empty list shown on API failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 19:22:55 +01:00
Ashwin Kumar
c911a0c450 feat: wire designation management to real API
Remove FALLBACK_DESIGNATIONS and static DEPARTMENTS array. Fetch
departments from API for dropdown, send department_id (UUID) on save,
normalize department_name/department_id from backend response.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 19:21:00 +01:00
Ashwin Kumar
2a3a336114 Refine admin dashboard layout spacing and widget settings UX 2026-03-27 18:29:21 +01:00
Ashwin Kumar
717a6c799e Fix admin approval/verification routing and align management UIs 2026-03-27 05:35:18 +01:00
Ashwin Kumar
a95c955ad4 Update admin panel routes: approval, designation, employees, dashboard mgmt, onboarding, roles, verification
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:28:34 +01:00