-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2330 from Civolilah/cleanup/1842-company-switcher
[Cleanup] Adjusting Company Switcher Per New Design
- Loading branch information
Showing
17 changed files
with
598 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ | |
*/ | ||
|
||
import DefaultLogo from '../../resources/images/[email protected]'; | ||
import SmallLogo from 'public/logo180.png'; | ||
|
||
export default { | ||
logo: DefaultLogo, | ||
smallLogo: SmallLogo, | ||
}; |
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,37 @@ | ||
/** | ||
* Invoice Ninja (https://invoiceninja.com). | ||
* | ||
* @link https://github.com/invoiceninja/invoiceninja source repository | ||
* | ||
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com) | ||
* | ||
* @license https://www.elastic.co/licensing/elastic-license | ||
*/ | ||
|
||
import { useUpdateCompanyUser } from '$app/pages/settings/user/common/hooks/useUpdateCompanyUser'; | ||
import { cloneDeep, set } from 'lodash'; | ||
import { useHandleCurrentUserChangeProperty } from './useHandleCurrentUserChange'; | ||
import { useInjectUserChanges } from './useInjectUserChanges'; | ||
|
||
export function useHandleCollapseExpandSidebar() { | ||
const userChanges = useInjectUserChanges(); | ||
|
||
const updateCompanyUser = useUpdateCompanyUser(); | ||
const handleUserChange = useHandleCurrentUserChangeProperty(); | ||
|
||
return (value: boolean) => { | ||
handleUserChange('company_user.react_settings.show_mini_sidebar', value); | ||
|
||
if (userChanges) { | ||
const updatedUserChanges = cloneDeep(userChanges); | ||
|
||
set( | ||
updatedUserChanges, | ||
'company_user.react_settings.show_mini_sidebar', | ||
value | ||
); | ||
|
||
updateCompanyUser(updatedUserChanges); | ||
} | ||
}; | ||
} |
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.