@@ -13,7 +13,7 @@ import {
1313 ChevronDown ,
1414 FileText ,
1515 Settings ,
16- CreditCard ,
16+ Store ,
1717 BarChart3 ,
1818 ArrowLeft ,
1919 Grid
@@ -36,7 +36,6 @@ const NAV_ITEMS: NavItem[] = [
3636const SETTINGS_ITEMS : NavItem [ ] = [
3737 { label : 'POS Profile' , path : '/pos-profile' , icon : SlidersHorizontal } ,
3838 { label : 'User' , path : '/user' , icon : Users } ,
39- { label : 'Branch' , path : '/branch' , icon : Building2 } ,
4039 { label : 'Aggregators' , path : '/aggregator' , icon : Store } ,
4140 { label : 'URY Report Settings' , path : '/report-settings' , icon : FileText } ,
4241 { label : 'Production Unit' , path : '/production-unit' , icon : Grid }
@@ -185,93 +184,36 @@ const MainPanel: React.FC<{ isManager: boolean }> = ({ isManager }) => {
185184
186185 { isAdvancedOpen && (
187186 < div className = "mt-1 pl-4 space-y-1" >
188- < NavLink
189- to = "/report-settings"
190- className = { ( { isActive } ) =>
191- `w-full flex items-center justify-between px-3 py-2 text-xs font-medium transition-all duration-200 group relative rounded-md ${
192- isActive
193- ? 'bg-white text-gray-900 shadow-sm font-semibold'
194- : 'text-gray-700 hover:bg-white/60 hover:text-gray-900'
195- } `
196- }
197- >
198- { ( { isActive } ) => (
199- < >
200- { isActive && (
201- < div className = "absolute start-0 top-1/2 -translate-y-1/2 w-1 h-4 bg-blue-600 rounded-e-full" />
202- ) }
203- < div className = "flex items-center gap-2.5 ms-1" >
204- < FileText className = "w-3.5 h-3.5 text-gray-500 flex-shrink-0" />
205- < span > Report Settings</ span >
206- </ div >
207- </ >
208- ) }
209- </ NavLink >
210- < NavLink
211- to = "/production-unit"
212- className = { ( { isActive } ) =>
213- `w-full flex items-center justify-between px-3 py-2 text-xs font-medium transition-all duration-200 group relative rounded-md ${
214- isActive
215- ? 'bg-white text-gray-900 shadow-sm font-semibold'
216- : 'text-gray-700 hover:bg-white/60 hover:text-gray-900'
217- } `
218- }
219- >
220- { ( { isActive } ) => (
221- < >
222- { isActive && (
223- < div className = "absolute start-0 top-1/2 -translate-y-1/2 w-1 h-4 bg-blue-600 rounded-e-full" />
187+ { SETTINGS_ITEMS . map ( ( item ) => {
188+ const Icon = item . icon ;
189+ return (
190+ < NavLink
191+ key = { item . path }
192+ to = { item . path }
193+ className = { ( { isActive } ) =>
194+ `w-full flex items-center justify-between px-3 py-2 text-xs font-medium transition-all duration-200 group relative rounded-md ${
195+ isActive
196+ ? 'bg-white text-gray-900 shadow-sm font-semibold'
197+ : 'text-gray-700 hover:bg-white/60 hover:text-gray-900'
198+ } `
199+ }
200+ >
201+ { ( { isActive } ) => (
202+ < >
203+ { isActive && (
204+ < div className = "absolute start-0 top-1/2 -translate-y-1/2 w-1 h-4 bg-blue-600 rounded-e-full" />
205+ ) }
206+ < div className = "flex items-center gap-2.5 ms-1" >
207+ < Icon className = "w-3.5 h-3.5 text-gray-500 flex-shrink-0" />
208+ < span > { item . label } </ span >
209+ </ div >
210+ </ >
224211 ) }
225- < div className = "flex items-center gap-2.5 ms-1" >
226- < Grid className = "w-3.5 h-3.5 text-gray-500 flex-shrink-0" />
227- < span > Production Unit</ span >
228- </ div >
229- </ >
230- ) }
231- </ NavLink >
212+ </ NavLink >
213+ ) ;
214+ } ) }
232215 </ div >
233216 ) }
234- < div className = "pt-2" >
235- < button
236- onClick = { ( ) => setIsAdvancedOpen ( ! isAdvancedOpen ) }
237- className = { `w-full flex items-center justify-between px-3.5 py-2.5 rounded-lg text-sm font-medium transition-colors ${
238- isAdvancedPath
239- ? 'text-[#2563eb] font-semibold bg-blue-50'
240- : 'text-gray-600 hover:bg-blue-50 hover:text-[#2563eb]'
241- } `}
242- >
243- < div className = "flex items-center space-x-3" >
244- < Settings className = "w-5 h-5 shrink-0" />
245- < span > Settings</ span >
246- </ div >
247- < ChevronDown
248- className = { `w-4 h-4 transition-transform duration-200 ${
249- isAdvancedOpen ? 'rotate-180 text-[#2563eb]' : 'text-gray-400'
250- } `}
251- />
252- </ button >
253-
254- { isAdvancedOpen && (
255- < div className = "mt-1 pl-4 space-y-1" >
256- { SETTINGS_ITEMS . map ( ( item ) => {
257- const Icon = item . icon ;
258- return (
259- < NavLink
260- key = { item . path }
261- to = { item . path }
262- className = { ( { isActive } ) =>
263- `flex items-center space-x-3 px-3.5 py-2 rounded-lg text-xs font-medium transition-all ${
264- isActive
265- ? 'bg-[#2563eb] text-white shadow-sm font-semibold'
266- : 'text-gray-600 hover:bg-blue-50 hover:text-[#2563eb]'
267- } `
268- }
269- >
270- < Icon className = "w-4 h-4 shrink-0" />
271- < span > { item . label } </ span >
272- </ NavLink >
273- ) ;
274- } ) }
275217 </ div >
276218 </ div >
277219 </ div >
0 commit comments