2026-03-26 06:20:22 +01:00
import { For , Show , createMemo , createSignal , onMount } from 'solid-js' ;
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
import AdminShell from '~/components/AdminShell' ;
2026-03-27 02:28:34 +01:00
import { ChevronDown , SlidersHorizontal , Download , MoreVertical } from 'lucide-solid' ;
type DesignationRecord = {
id : string ;
name : string ;
code : string ;
department : string ;
level : string ;
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
description? : string ;
2026-03-27 02:28:34 +01:00
totalEmployees : number ;
status : 'ACTIVE' | 'INACTIVE' ;
createdDate : string ;
2026-03-26 06:20:22 +01:00
canManageTeam? : boolean ;
canApprove? : boolean ;
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
} ;
2026-03-26 06:20:22 +01:00
const FALLBACK_DESIGNATIONS : DesignationRecord [ ] = [
2026-03-27 02:28:34 +01:00
{ id : 'z1' , name : 'Senior Software Engineer' , code : 'SSE-001' , department : 'Engineering' , level : 'Senior' , totalEmployees : 12 , status : 'ACTIVE' , createdDate : '2024-01-15' } ,
{ id : 'z2' , name : 'Marketing Manager' , code : 'MM-002' , department : 'Marketing' , level : 'Manager' , totalEmployees : 8 , status : 'ACTIVE' , createdDate : '2024-01-20' } ,
{ id : 'z3' , name : 'Sales Executive' , code : 'SE-003' , department : 'Sales' , level : 'Executive' , totalEmployees : 15 , status : 'ACTIVE' , createdDate : '2024-02-01' } ,
{ id : 'z4' , name : 'HR Specialist' , code : 'HRS-004' , department : 'Human Resources' , level : 'Specialist' , totalEmployees : 5 , status : 'ACTIVE' , createdDate : '2024-02-10' } ,
{ id : 'z5' , name : 'Financial Analyst' , code : 'FA-005' , department : 'Finance' , level : 'Analyst' , totalEmployees : 6 , status : 'ACTIVE' , createdDate : '2024-02-15' } ,
{ id : 'z6' , name : 'Operations Manager' , code : 'OM-006' , department : 'Operations' , level : 'Manager' , totalEmployees : 4 , status : 'INACTIVE' , createdDate : '2024-03-01' } ,
{ id : 'z7' , name : 'Customer Support Lead' , code : 'CSL-007' , department : 'Customer Support' , level : 'Lead' , totalEmployees : 9 , status : 'ACTIVE' , createdDate : '2024-03-05' } ,
{ id : 'z8' , name : 'Product Designer' , code : 'PD-008' , department : 'Product' , level : 'Designer' , totalEmployees : 7 , status : 'ACTIVE' , createdDate : '2024-03-10' } ,
2026-03-26 06:20:22 +01:00
] ;
2026-03-27 02:28:34 +01:00
const LEVELS = [ 'Intern' , 'Junior' , 'Mid-Level' , 'Senior' , 'Lead' , 'Manager' , 'Director' , 'VP' , 'C-Level' , 'Executive' , 'Specialist' , 'Analyst' , 'Designer' ] ;
const DEPARTMENTS = [ 'Engineering' , 'Marketing' , 'Sales' , 'Human Resources' , 'Finance' , 'Operations' , 'Product' , 'Customer Support' ] ;
function levelBadge ( level : string ) {
const map : Record < string , { bg : string ; color : string ; border : string } > = {
Senior : { bg : '#EFF6FF' , color : '#1D4ED8' , border : '#BFDBFE' } ,
Manager : { bg : '#F5F3FF' , color : '#7C3AED' , border : '#DDD6FE' } ,
Executive : { bg : '#ECFDF5' , color : '#059669' , border : '#A7F3D0' } ,
Specialist : { bg : '#F0FDFA' , color : '#0D9488' , border : '#99F6E4' } ,
Analyst : { bg : '#FFF7ED' , color : '#EA580C' , border : '#FED7AA' } ,
Lead : { bg : '#EFF6FF' , color : '#2563EB' , border : '#BFDBFE' } ,
Designer : { bg : '#FDF4FF' , color : '#A21CAF' , border : '#F0ABFC' } ,
Director : { bg : '#FFF1F2' , color : '#BE123C' , border : '#FECDD3' } ,
} ;
const s = map [ level ] ? ? { bg : '#F3F4F6' , color : '#4B5563' , border : '#D1D5DB' } ;
return (
< span style = { ` display:inline-flex;align-items:center;border-radius:9999px;border:1px solid ${ s . border } ;background: ${ s . bg } ;color: ${ s . color } ;padding:2px 10px;font-size:12px;font-weight:500 ` } >
{ level }
< / span >
) ;
}
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
function StatusBadge ( props : { status : string } ) {
const active = ( ) = > props . status === 'ACTIVE' ;
return (
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< span style = { ` display:inline-flex;align-items:center;border-radius:9999px;border:1px solid ${ active ( ) ? '#FFD8C2' : '#D1D5DB' } ;background: ${ active ( ) ? '#FFF1EB' : '#F3F4F6' } ;color: ${ active ( ) ? '#FF5E13' : '#4B5563' } ;padding:2px 10px;font-size:12px;font-weight:500 ` } >
< span style = { ` display:inline-block;width:6px;height:6px;border-radius:50%;background: ${ active ( ) ? '#FF5E13' : '#9CA3AF' } ;margin-right:5px;flex-shrink:0 ` } / >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
{ active ( ) ? 'Active' : 'Inactive' }
< / span >
) ;
}
2026-03-27 02:28:34 +01:00
function Toggle ( props : { on : boolean ; onChange : ( v : boolean ) = > void } ) {
return (
< button
type = "button"
onClick = { ( ) = > props . onChange ( ! props . on ) }
style = { ` width:40px;height:22px;border-radius:11px;background: ${ props . on ? '#FF5E13' : '#E5E7EB' } ;position:relative;cursor:pointer;border:none;padding:0;flex-shrink:0 ` }
>
< span style = { ` position:absolute;width:18px;height:18px;border-radius:50%;background:white;top:2px;transition:left 0.2s;left: ${ props . on ? '20px' : '2px' } ` } / >
< / button >
) ;
}
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
function FormInput ( props : { label : string ; required? : boolean ; value : string ; onInput : ( v : string ) = > void ; placeholder? : string ; type ? : string } ) {
return (
< label style = "display:block" >
< span style = "font-size:13px;font-weight:600;color:#374151" >
{ props . label } { props . required && < span style = "margin-left:2px;color:#FF5E13" > * < / span > }
< / span >
< input
type = { props . type ? ? 'text' }
value = { props . value }
onInput = { ( e ) = > props . onInput ( e . currentTarget . value ) }
placeholder = { props . placeholder }
style = "display:block;margin-top:6px;height:40px;width:100%;border-radius:10px;border:1px solid #E5E7EB;background:white;padding:0 14px;font-size:13px;color:#111827;outline:none;box-sizing:border-box"
/ >
< / label >
) ;
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
}
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
function FormSelect ( props : { label : string ; required? : boolean ; value : string ; onChange : ( v : string ) = > void ; children : any } ) {
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
return (
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< label style = "display:block" >
< span style = "font-size:13px;font-weight:600;color:#374151" >
{ props . label } { props . required && < span style = "margin-left:2px;color:#FF5E13" > * < / span > }
< / span >
< select
value = { props . value }
onChange = { ( e ) = > props . onChange ( e . currentTarget . value ) }
style = "display:block;margin-top:6px;height:40px;width:100%;border-radius:10px;border:1px solid #E5E7EB;background:white;padding:0 14px;font-size:13px;color:#111827;outline:none;box-sizing:border-box;appearance:none"
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
>
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
{ props . children }
< / select >
< / label >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
) ;
}
2026-03-26 06:20:22 +01:00
export default function DesignationManagementPage() {
2026-03-27 02:28:34 +01:00
const [ mainTab , setMainTab ] = createSignal < 'all' | 'create' > ( 'all' ) ;
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
const [ formTab , setFormTab ] = createSignal < 'general' | 'settings' | 'permissions' > ( 'general' ) ;
2026-03-26 06:20:22 +01:00
const [ search , setSearch ] = createSignal ( '' ) ;
const [ rows , setRows ] = createSignal < DesignationRecord [ ] > ( [ ] ) ;
const [ openMenuId , setOpenMenuId ] = createSignal < string | null > ( null ) ;
2026-03-27 02:28:34 +01:00
// form state
2026-03-26 06:20:22 +01:00
const [ name , setName ] = createSignal ( '' ) ;
const [ code , setCode ] = createSignal ( '' ) ;
const [ department , setDepartment ] = createSignal ( '' ) ;
const [ level , setLevel ] = createSignal ( '' ) ;
const [ description , setDescription ] = createSignal ( '' ) ;
2026-03-27 02:28:34 +01:00
const [ formStatus , setFormStatus ] = createSignal < 'ACTIVE' | 'INACTIVE' > ( 'ACTIVE' ) ;
2026-03-26 06:20:22 +01:00
const [ canManageTeam , setCanManageTeam ] = createSignal ( false ) ;
const [ canApprove , setCanApprove ] = createSignal ( false ) ;
2026-03-27 02:28:34 +01:00
// permissions toggles
const [ permViewEmp , setPermViewEmp ] = createSignal ( false ) ;
const [ permCreateEmp , setPermCreateEmp ] = createSignal ( false ) ;
const [ permEditEmp , setPermEditEmp ] = createSignal ( false ) ;
const [ permDeleteEmp , setPermDeleteEmp ] = createSignal ( false ) ;
const [ permAssignRoles , setPermAssignRoles ] = createSignal ( false ) ;
2026-03-26 06:20:22 +01:00
const load = async ( ) = > {
try {
2026-03-27 02:28:34 +01:00
const res = await fetch ( ` /api/gateway/api/admin/designations?page=1&limit=100 ` ) ;
2026-03-26 06:20:22 +01:00
if ( res . ok ) {
const payload = await res . json ( ) . catch ( ( ) = > null ) ;
const list = Array . isArray ( payload ) ? payload : Array.isArray ( payload ? . data ) ? payload.data : Array.isArray ( payload ? . items ) ? payload . items : [ ] ;
if ( list . length > 0 ) {
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
setRows ( list . map ( ( item : any , i : number ) = > ( {
id : String ( item . id ? ? ` des- ${ i + 1 } ` ) ,
name : String ( item . name ? ? '' ) ,
code : String ( item . code ? ? '' ) ,
department : String ( item . department ? ? item . department_name ? ? '' ) ,
level : String ( item . level ? ? '' ) ,
description : String ( item . description ? ? '' ) ,
totalEmployees : Number ( item . totalEmployees ? ? item . total_employees ? ? 0 ) ,
status : String ( item . status ? ? 'ACTIVE' ) . toUpperCase ( ) === 'INACTIVE' ? 'INACTIVE' : 'ACTIVE' ,
createdDate : String ( item . createdDate ? ? item . created_at ? ? '' ) ,
} ) ) ) ;
2026-03-26 06:20:22 +01:00
return ;
}
}
} catch { }
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
setRows ( FALLBACK_DESIGNATIONS ) ;
2026-03-26 06:20:22 +01:00
} ;
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
2026-03-26 06:20:22 +01:00
onMount ( ( ) = > void load ( ) ) ;
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
const filteredRows = createMemo ( ( ) = > {
const q = search ( ) . toLowerCase ( ) ;
2026-03-27 02:28:34 +01:00
if ( ! q ) return rows ( ) ;
return rows ( ) . filter ( ( d ) = >
d . name . toLowerCase ( ) . includes ( q ) || d . code . toLowerCase ( ) . includes ( q ) || d . department . toLowerCase ( ) . includes ( q )
) ;
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
} ) ;
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
const resetForm = ( ) = > {
2026-03-27 02:28:34 +01:00
setName ( '' ) ; setCode ( '' ) ; setDepartment ( '' ) ; setLevel ( '' ) ;
setDescription ( '' ) ; setFormStatus ( 'ACTIVE' ) ;
setCanManageTeam ( false ) ; setCanApprove ( false ) ;
setPermViewEmp ( false ) ; setPermCreateEmp ( false ) ;
setPermEditEmp ( false ) ; setPermDeleteEmp ( false ) ;
setPermAssignRoles ( false ) ;
setFormTab ( 'general' ) ;
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
} ;
2026-03-27 02:28:34 +01:00
const handleTabChange = ( tab : 'all' | 'create' ) = > {
setMainTab ( tab ) ;
if ( tab === 'create' ) resetForm ( ) ;
setOpenMenuId ( null ) ;
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
} ;
2026-03-27 02:28:34 +01:00
const formatDate = ( d : string ) = > {
if ( ! d ) return '—' ;
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
try {
2026-03-27 02:28:34 +01:00
return new Date ( d ) . toLocaleDateString ( 'en-IN' , { day : '2-digit' , month : 'short' , year : 'numeric' } ) ;
} catch { return d ; }
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
} ;
2026-03-26 06:20:22 +01:00
return (
< AdminShell >
2026-03-27 02:28:34 +01:00
< div style = "padding:24px" >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
{ /* Page header */ }
2026-03-27 02:28:34 +01:00
< div >
< h1 style = "font-size:24px;font-weight:700;color:#111827;margin:0" > Designation Management < / h1 >
< p style = "font-size:13px;color:#6B7280;margin-top:4px;margin-bottom:0" > Manage all designations and job positions < / p >
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
< / div >
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
2026-03-27 02:28:34 +01:00
{ /* Main tabs */ }
< div style = "display:flex;align-items:center;gap:24px;border-bottom:1px solid #E5E7EB;margin-top:24px" >
< button
type = "button"
onClick = { ( ) = > handleTabChange ( 'all' ) }
style = { ` padding-bottom:12px;font-size:14px;font-weight:500;background:none;border:none;border-top:none;border-left:none;border-right:none;cursor:pointer; ${ mainTab ( ) === 'all' ? 'color:#FF5E13;border-bottom:2px solid #FF5E13;margin-bottom:-1px' : 'color:#6B7280;border-bottom:2px solid transparent;margin-bottom:-1px' } ` }
>
All Designations
< / button >
< button
type = "button"
onClick = { ( ) = > handleTabChange ( 'create' ) }
style = { ` padding-bottom:12px;font-size:14px;font-weight:500;background:none;border:none;border-top:none;border-left:none;border-right:none;cursor:pointer; ${ mainTab ( ) === 'create' ? 'color:#FF5E13;border-bottom:2px solid #FF5E13;margin-bottom:-1px' : 'color:#6B7280;border-bottom:2px solid transparent;margin-bottom:-1px' } ` }
>
Create Designation
< / button >
< / div >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
2026-03-27 02:28:34 +01:00
{ /* All Designations view */ }
< Show when = { mainTab ( ) === 'all' } >
< div style = "margin-top:20px;margin-left:-24px;margin-right:-24px;border-radius:0;overflow:hidden;border-top:1px solid #E5E7EB;border-bottom:1px solid #E5E7EB;background:white" >
{ /* Filter bar */ }
< div style = "display:flex;align-items:center;gap:8px;padding:14px 20px;border-bottom:1px solid #F3F4F6" >
< input
type = "text"
placeholder = "Search designations..."
value = { search ( ) }
onInput = { ( e ) = > setSearch ( e . currentTarget . value ) }
style = "height:34px;flex:1;max-width:240px;border-radius:8px;border:1px solid #E5E7EB;padding:0 12px;font-size:13px;outline:none;color:#111827;background:white"
/ >
< button
type = "button"
style = "display:inline-flex;align-items:center;height:34px;padding:0 12px;border-radius:8px;border:1px solid #E5E7EB;background:white;font-size:13px;color:#374151;gap:6px;cursor:pointer"
>
< ChevronDown size = { 14 } / >
Sort
< / button >
< button
type = "button"
style = "display:inline-flex;align-items:center;height:34px;padding:0 12px;border-radius:8px;border:1px solid #E5E7EB;background:white;font-size:13px;color:#374151;gap:6px;cursor:pointer"
>
< SlidersHorizontal size = { 14 } / >
Filters
< / button >
< button
type = "button"
style = "display:inline-flex;align-items:center;height:34px;padding:0 14px;border-radius:8px;background:#0D0D2A;color:white;font-size:13px;font-weight:500;border:none;cursor:pointer;gap:6px"
>
< Download size = { 14 } / >
Export
< / button >
< / div >
2026-03-26 06:20:22 +01:00
2026-03-27 02:28:34 +01:00
{ /* Table */ }
< div style = "overflow-x:auto" >
< table style = "width:100%;border-collapse:collapse" >
< thead >
< tr style = "background:#0D0D2A" >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Designation Name < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Designation Code < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Department < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Level < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Total Employees < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Status < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Created Date < / th >
< th style = "padding:10px 20px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#FFFFFF;white-space:nowrap;text-align:left" > Actions < / th >
< / tr >
< / thead >
< tbody >
< For each = { filteredRows ( ) } >
{ ( row ) = > (
< tr style = "border-bottom:1px solid #F3F4F6" >
< td style = "padding:12px 20px;font-size:14px;color:#111827;font-weight:600" > { row . name } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > { row . code } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > { row . department } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > { levelBadge ( row . level ) } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > { row . totalEmployees } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > < StatusBadge status = { row . status } / > < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827" > { formatDate ( row . createdDate ) } < / td >
< td style = "padding:12px 20px;font-size:14px;color:#111827;position:relative" >
< button
type = "button"
onClick = { ( ) = > setOpenMenuId ( openMenuId ( ) === row . id ? null : row . id ) }
style = "display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:6px;border:1px solid #E5E7EB;background:white;cursor:pointer;color:#374151"
>
< MoreVertical size = { 16 } / >
< / button >
< Show when = { openMenuId ( ) === row . id } >
< div style = "position:absolute;right:20px;top:44px;z-index:50;background:white;border:1px solid #E5E7EB;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.1);min-width:140px;overflow:hidden" >
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< button
type = "button"
2026-03-27 02:28:34 +01:00
onClick = { ( ) = > { setOpenMenuId ( null ) ; } }
style = "display:block;width:100%;text-align:left;padding:9px 14px;font-size:13px;color:#374151;background:none;border:none;cursor:pointer"
class = "hover:bg-[#FAFAFA]"
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
>
2026-03-27 02:28:34 +01:00
Edit
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< / button >
2026-03-27 02:28:34 +01:00
< button
type = "button"
onClick = { ( ) = > { setOpenMenuId ( null ) ; } }
style = "display:block;width:100%;text-align:left;padding:9px 14px;font-size:13px;color:#DC2626;background:none;border:none;cursor:pointer"
class = "hover:bg-[#FFF5F5]"
>
Delete
< / button >
< / div >
< / Show >
< / td >
< / tr >
) }
< / For >
< / tbody >
< / table >
< / div >
2026-03-26 06:20:22 +01:00
2026-03-27 02:28:34 +01:00
{ /* Pagination */ }
< div style = "display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-top:1px solid #F3F4F6" >
< span style = "font-size:13px;color:#6B7280" >
Showing 1 - { filteredRows ( ) . length } of { filteredRows ( ) . length } designations
< / span >
< div style = "display:flex;align-items:center;gap:4px" >
< button
type = "button"
style = "display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;border:1px solid #E5E7EB;background:white;color:#374151;cursor:pointer;font-size:13px"
>
‹
< / button >
< button
type = "button"
style = "display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;background:#FF5E13;color:white;border:none;cursor:pointer;font-size:13px;font-weight:500"
>
1
< / button >
< button
type = "button"
style = "display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;border:1px solid #E5E7EB;background:white;color:#374151;cursor:pointer;font-size:13px"
>
›
< / button >
< / div >
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< / div >
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
< / div >
2026-03-26 06:20:22 +01:00
< / Show >
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
2026-03-27 02:28:34 +01:00
{ /* Create Designation view */ }
< Show when = { mainTab ( ) === 'create' } >
< div style = "margin-top:20px;border-radius:16px;border:1px solid #E5E7EB;background:white;overflow:hidden" >
{ /* Form sub-tabs */ }
< div style = "display:flex;align-items:center;gap:0;border-bottom:1px solid #E5E7EB;padding:0 24px" >
< button
type = "button"
onClick = { ( ) = > setFormTab ( 'general' ) }
style = { ` padding:14px 0;margin-right:24px;font-size:14px;background:none;border:none;border-top:none;border-left:none;border-right:none;cursor:pointer; ${ formTab ( ) === 'general' ? 'color:#0D0D2A;border-bottom:2px solid #0D0D2A;margin-bottom:-1px;font-weight:600' : 'color:#6B7280;border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:500' } ` }
>
General Information
< / button >
< button
type = "button"
onClick = { ( ) = > setFormTab ( 'settings' ) }
style = { ` padding:14px 0;margin-right:24px;font-size:14px;background:none;border:none;border-top:none;border-left:none;border-right:none;cursor:pointer; ${ formTab ( ) === 'settings' ? 'color:#0D0D2A;border-bottom:2px solid #0D0D2A;margin-bottom:-1px;font-weight:600' : 'color:#6B7280;border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:500' } ` }
>
Designation Settings
< / button >
< button
type = "button"
onClick = { ( ) = > setFormTab ( 'permissions' ) }
style = { ` padding:14px 0;margin-right:24px;font-size:14px;background:none;border:none;border-top:none;border-left:none;border-right:none;cursor:pointer; ${ formTab ( ) === 'permissions' ? 'color:#0D0D2A;border-bottom:2px solid #0D0D2A;margin-bottom:-1px;font-weight:600' : 'color:#6B7280;border-bottom:2px solid transparent;margin-bottom:-1px;font-weight:500' } ` }
>
Permissions
< / button >
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
< / div >
2026-03-26 00:01:15 +01:00
2026-03-27 02:28:34 +01:00
{ /* General Information tab */ }
< Show when = { formTab ( ) === 'general' } >
< div style = "padding:24px" >
< div style = "display:grid;grid-template-columns:1fr 1fr;gap:20px" >
< FormInput
label = "Designation Name"
required
value = { name ( ) }
onInput = { setName }
placeholder = "e.g. Senior Software Engineer"
/ >
< FormInput
label = "Designation Code"
required
value = { code ( ) }
onInput = { setCode }
placeholder = "e.g. SSE-001"
/ >
< FormSelect
label = "Department"
required
value = { department ( ) }
onChange = { setDepartment }
>
< option value = "" > Select department < / option >
< For each = { DEPARTMENTS } > { ( d ) = > < option value = { d } > { d } < / option > } < / For >
< / FormSelect >
< FormSelect
label = "Designation Level"
required
value = { level ( ) }
onChange = { setLevel }
>
< option value = "" > Select level < / option >
< For each = { LEVELS } > { ( l ) = > < option value = { l } > { l } < / option > } < / For >
< / FormSelect >
< div style = "grid-column:1 / -1" >
< label style = "display:block" >
< span style = "font-size:13px;font-weight:600;color:#374151" > Description < / span >
< textarea
value = { description ( ) }
onInput = { ( e ) = > setDescription ( e . currentTarget . value ) }
placeholder = "Describe the designation role and responsibilities..."
rows = { 4 }
style = "display:block;margin-top:6px;width:100%;border-radius:10px;border:1px solid #E5E7EB;background:white;padding:10px 14px;font-size:13px;color:#111827;outline:none;box-sizing:border-box;resize:vertical;font-family:inherit"
/ >
< / label >
2026-03-26 06:20:22 +01:00
< / div >
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
< / div >
2026-03-27 02:28:34 +01:00
< / div >
< / Show >
{ /* Designation Settings tab */ }
< Show when = { formTab ( ) === 'settings' } >
< div style = "padding:24px;display:flex;flex-direction:column;gap:24px" >
{ /* Status */ }
< div >
< p style = "font-size:13px;font-weight:600;color:#374151;margin:0 0 10px 0" > Designation Status < / p >
< div style = "display:flex;gap:10px" >
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< button
type = "button"
2026-03-27 02:28:34 +01:00
onClick = { ( ) = > setFormStatus ( 'ACTIVE' ) }
style = { ` height:36px;padding:0 20px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer; ${ formStatus ( ) === 'ACTIVE' ? 'border:1px solid #FF5E13;background:#FFF3EE;color:#FF5E13' : 'border:1px solid #E5E7EB;background:white;color:#6B7280' } ` }
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
>
2026-03-27 02:28:34 +01:00
Active
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< / button >
< button
type = "button"
2026-03-27 02:28:34 +01:00
onClick = { ( ) = > setFormStatus ( 'INACTIVE' ) }
style = { ` height:36px;padding:0 20px;border-radius:8px;font-size:14px;font-weight:500;cursor:pointer; ${ formStatus ( ) === 'INACTIVE' ? 'border:1px solid #FF5E13;background:#FFF3EE;color:#FF5E13' : 'border:1px solid #E5E7EB;background:white;color:#6B7280' } ` }
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
>
2026-03-27 02:28:34 +01:00
Inactive
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< / button >
< / div >
2026-03-26 06:20:22 +01:00
< / div >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
2026-03-27 02:28:34 +01:00
{ /* Toggle: Manage Team */ }
< div style = "border-radius:12px;border:1px solid #E5E7EB;padding:16px 20px;display:flex;align-items:center;justify-content:space-between" >
< div >
< p style = "font-size:14px;font-weight:500;color:#111827;margin:0 0 2px 0" > Allow Designation to Manage Team Members < / p >
< p style = "font-size:12px;color:#6B7280;margin:0" > Enable this to allow team member management capabilities < / p >
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
< / div >
2026-03-27 02:28:34 +01:00
< Toggle on = { canManageTeam ( ) } onChange = { setCanManageTeam } / >
2026-03-26 06:20:22 +01:00
< / div >
2026-03-27 02:28:34 +01:00
{ /* Toggle: Approval Permissions */ }
< div style = "border-radius:12px;border:1px solid #E5E7EB;padding:16px 20px;display:flex;align-items:center;justify-content:space-between" >
< div >
< p style = "font-size:14px;font-weight:500;color:#111827;margin:0 0 2px 0" > Allow Approval Permissions < / p >
< p style = "font-size:12px;color:#6B7280;margin:0" > Enable this to allow approving requests and actions < / p >
< / div >
< Toggle on = { canApprove ( ) } onChange = { setCanApprove } / >
< / div >
< / div >
< / Show >
{ /* Permissions tab */ }
< Show when = { formTab ( ) === 'permissions' } >
< div style = "padding:24px" >
{ /* Employee Management */ }
< p style = "font-size:14px;font-weight:600;color:#111827;margin:0 0 12px 0" > Employee Management < / p >
< div style = "display:flex;flex-direction:column;gap:0" >
{ [
{ label : 'View Employees' , sig : permViewEmp , set : setPermViewEmp } ,
{ label : 'Create Employees' , sig : permCreateEmp , set : setPermCreateEmp } ,
{ label : 'Edit Employees' , sig : permEditEmp , set : setPermEditEmp } ,
{ label : 'Delete Employees' , sig : permDeleteEmp , set : setPermDeleteEmp } ,
] . map ( ( item ) = > (
< div style = "border-radius:8px;border:1px solid #E5E7EB;padding:12px 16px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between" >
< span style = "font-size:14px;color:#374151" > { item . label } < / span >
< Toggle on = { item . sig ( ) } onChange = { item . set } / >
< / div >
) ) }
< / div >
{ /* Additional Permissions */ }
< p style = "font-size:14px;font-weight:600;color:#111827;margin:20px 0 12px 0" > Additional Permissions < / p >
< div style = "border-radius:8px;border:1px solid #E5E7EB;padding:12px 16px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between" >
< span style = "font-size:14px;color:#374151" > Assign Roles < / span >
< Toggle on = { permAssignRoles ( ) } onChange = { setPermAssignRoles } / >
< / div >
< / div >
< / Show >
{ /* Form footer */ }
< div style = "display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid #E5E7EB" >
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< button
type = "button"
2026-03-27 02:28:34 +01:00
onClick = { ( ) = > { resetForm ( ) ; setMainTab ( 'all' ) ; } }
style = "height:38px;padding:0 20px;border-radius:8px;border:1px solid #E5E7EB;background:white;color:#374151;font-size:14px;cursor:pointer"
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
>
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
Cancel
< / button >
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
< button
type = "button"
2026-03-27 02:28:34 +01:00
onClick = { ( ) = > {
if ( ! name ( ) . trim ( ) ) { setFormTab ( 'general' ) ; return ; }
setMainTab ( 'all' ) ;
resetForm ( ) ;
} }
style = "height:38px;padding:0 20px;border-radius:8px;background:#0D0D2A;color:white;font-size:14px;font-weight:500;border:none;cursor:pointer"
feat(admin): pixel-perfect UI overhaul for department, designation, roles, employees pages
- Rewrote all layout/spacing with inline styles (Tailwind v4 doesn't generate most utility classes)
- AdminSidebar: all 37 modules in 9 groups, scrollable, 220px/64px collapse, no bottom user section
- AdminShell: header height 64px, user avatar top-right (Gmail-style), removed search bar
- Department: orange-only status badges, dark navy table header (white text), edge-to-edge table, View/Create/All tabs, View action in row menu, form with inline styles
- Designation: full rewrite matching department pattern — same tabs, filter bar, table, form
- Roles/Employees: compact filter bar and table cell sizing fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:56:55 +01:00
>
2026-03-27 02:28:34 +01:00
Create Designation
feat(admin): redesign sidebar, dashboard, dept, designation & roles UI
- Sidebar: white bg, rounded pill nav items, orange left indicator for active
- Dashboard: remove Export/View All buttons, add Customise Dashboard + drag handles on widgets
- Department/Designation/Roles: new design system with orange label header, stat cards, light table header, 3-dot action menus, status badges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 08:01:23 +01:00
< / button >
2026-03-26 06:20:22 +01:00
< / div >
< / div >
< / Show >
ui(step-1): match reference layout for dept/designation/employees/roles pages
- All pages: white sticky page header + tab bar with orange underline,
-mx-6 -mt-6 negative margin to stretch headers edge-to-edge
- department: full columns (ID, Name, Description, Created By, etc.),
icon-only action buttons, navy Add Department button
- designation: Designations List / Add Designation tabs, status filter
dropdown, inline create/edit form, full columns with status badge
- employees: View/Add tabs, icon-only action buttons, status badges
- roles/index: clean table with Name+code subtext, Description, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 04:47:05 +01:00
< / div >
feat(admin): build complete admin panel with UI parity and search/filter
- Implement all admin management pages (employees, users, jobs, leads, orders, companies, customers, candidates, approval, invoices, reviews, support, KB, pricing, coupons, credits, discounts, tax, reports, ledger)
- Implement 9 professional vertical pages (developers, designers, tutors, video editors, photographers, makeup artists, graphic designers, social media managers, fitness trainers)
- Implement internal/external dashboard and role management with builder UI
- Fix tab styling: replace inline border-bottom styles with admin-tab CSS class across 8+ pages
- Add search/filter functionality to invoice and review pages
- Add toggle status (activate/deactivate) to employees page with PATCH /api/admin/employees/{id}
- Align UI styling with NextJS admin panel for visual parity
- Add stat cards to approval page showing counts by status
- Implement graceful empty states for all list views
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-19 13:04:10 +01:00
< / AdminShell >
) ;
}