-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: APP-366 account orders (#2566)
- Loading branch information
Showing
52 changed files
with
3,827 additions
and
632 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
54 changes: 0 additions & 54 deletions
54
web-marketplace/src/components/organisms/AdminNavigation/AdminNavigation.constants.tsx
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
4 changes: 2 additions & 2 deletions
4
web-marketplace/src/components/organisms/AdminNavigation/AdminNavigation.test.tsx
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
3 changes: 0 additions & 3 deletions
3
web-marketplace/src/components/organisms/AdminNavigation/AdminNavigation.utils.ts
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
web-marketplace/src/components/organisms/AdminNavigation/AdminNavigation.utils.tsx
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,68 @@ | ||
import { i18n } from '@lingui/core'; | ||
import { msg } from '@lingui/macro'; | ||
|
||
import { CogIcon } from 'web-components/src/components/icons/CogIcon'; | ||
import { ShoppingBagIcon } from 'web-components/src/components/icons/ShoppingBagIcon'; | ||
// import { EnvelopeIcon } from 'web-components/src/components/icons/EnvelopeIcon'; | ||
// import { PaymentInfoIcon } from 'web-components/src/components/icons/PaymentInfoIcon'; | ||
// import { PrefinanceIcon } from 'web-components/src/components/icons/PrefinanceIcon'; | ||
import { UserMenuIcon } from 'web-components/src/components/icons/UserMenuIcon'; | ||
|
||
import { AdminNavigationSection } from './AdminNavigation.types'; | ||
|
||
export const getAdminNavigationSections = ({ | ||
showOrders, | ||
}: { | ||
showOrders?: boolean; | ||
}): AdminNavigationSection[] => { | ||
const sections = [ | ||
{ | ||
heading: i18n._(msg`Profile`), | ||
items: [ | ||
{ | ||
name: i18n._(msg`Edit profile`), | ||
icon: <UserMenuIcon linearGradient />, | ||
path: 'profile', | ||
}, | ||
{ | ||
name: i18n._(msg`Settings`), | ||
icon: <CogIcon linearGradient />, | ||
path: 'settings', | ||
}, | ||
// { | ||
// name: i18n._(msg`Email updates`), | ||
// icon: <EnvelopeIcon linearGradient />, | ||
// path: 'email-updates', | ||
// }, | ||
], | ||
}, | ||
]; | ||
|
||
if (showOrders) { | ||
sections.unshift({ | ||
heading: i18n._(msg`Orders`), | ||
items: [ | ||
{ | ||
name: i18n._(msg`My orders`), | ||
icon: <ShoppingBagIcon linearGradient />, | ||
path: 'my-orders', | ||
}, | ||
// { | ||
// name: i18n._(msg`My prefinance projects`), | ||
// icon: <PrefinanceIcon linearGradient width="24" height="24" />, | ||
// path: 'my-prefinance-projects', | ||
// }, | ||
// { | ||
// name: i18n._(msg`Saved payment info`), | ||
// icon: <PaymentInfoIcon linearGradient />, | ||
// path: 'payment-info', | ||
// }, | ||
], | ||
}); | ||
} | ||
return sections; | ||
}; | ||
|
||
export const isSelected = (path: string, location: string) => { | ||
return path === location.substring(location.lastIndexOf('/') + 1); | ||
}; |
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
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
Oops, something went wrong.