forked from BinaryStudioAcademy/bsa-2023-towhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
th-288: Redesign sidebar (BinaryStudioAcademy#292)
* th-288: * redesign sidebar * th-288: * changed styling * th-288: * fix * th-288: * fix * th-288: * minor refactoring * th-288: * resolve comments * th-288: * divider fix * th-288: * driver sidebar * th-288: * enum fix * th-288: * resolved comments * th-288: * import fix
- Loading branch information
1 parent
769dca6
commit 98c0992
Showing
11 changed files
with
130 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const SidebarTabsName = { | ||
ORDERS: 'orders', | ||
TRUCKS: 'trucks', | ||
TRUCK: 'truck', | ||
DRIVERS: 'drivers', | ||
PROFILE: 'profile', | ||
} as const; | ||
|
||
export { SidebarTabsName }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const SidebarTabsPath = { | ||
ORDERS: 'orders', | ||
TRUCKS: 'trucks', | ||
DRIVERS: 'drivers', | ||
CHOOSE_TRUCK: 'choose-truck', | ||
PROFILE: 'profile', | ||
} as const; | ||
|
||
export { SidebarTabsPath }; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import { | ||
type SidebarTabsName, | ||
type SidebarTabsPath, | ||
} from '~/libs/enums/enums.js'; | ||
import { type IconName } from '~/libs/enums/icon-name.enum.js'; | ||
import { type ValueOf } from '~/libs/types/types.js'; | ||
|
||
import { type TabsName } from '../enums/sidebar-tabs.enum.js'; | ||
|
||
type TabsType = { | ||
name: ValueOf<typeof TabsName>; | ||
name: ValueOf<typeof SidebarTabsName>; | ||
path: ValueOf<typeof SidebarTabsPath>; | ||
icon: ValueOf<typeof IconName>; | ||
}; | ||
|
||
type TabName = ValueOf<typeof TabsName>; | ||
type TabName = ValueOf<typeof SidebarTabsName>; | ||
|
||
export { type TabName, type TabsType }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
frontend/src/pages/dashboard/components/sidebar/libs/tabs.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { | ||
IconName, | ||
SidebarTabsName, | ||
SidebarTabsPath, | ||
} from '~/libs/enums/enums.js'; | ||
import { type TabsType } from '~/libs/types/types.js'; | ||
|
||
const BUSINESS_TABS: TabsType[] = [ | ||
{ | ||
name: SidebarTabsName.ORDERS, | ||
path: SidebarTabsPath.ORDERS, | ||
icon: IconName.LIST, | ||
}, | ||
{ | ||
name: SidebarTabsName.TRUCKS, | ||
path: SidebarTabsPath.TRUCKS, | ||
icon: IconName.TRUCK, | ||
}, | ||
{ | ||
name: SidebarTabsName.DRIVERS, | ||
path: SidebarTabsPath.DRIVERS, | ||
icon: IconName.USERS, | ||
}, | ||
]; | ||
|
||
const DRIVER_TABS: TabsType[] = [ | ||
{ | ||
name: SidebarTabsName.ORDERS, | ||
path: SidebarTabsPath.ORDERS, | ||
icon: IconName.LIST, | ||
}, | ||
{ | ||
name: SidebarTabsName.TRUCK, | ||
path: SidebarTabsPath.CHOOSE_TRUCK, | ||
icon: IconName.TRUCK, | ||
}, | ||
{ | ||
name: SidebarTabsName.PROFILE, | ||
path: SidebarTabsPath.PROFILE, | ||
icon: IconName.USER_PEN, | ||
}, | ||
]; | ||
|
||
export { BUSINESS_TABS, DRIVER_TABS }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.