-
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.
feat: onboard apps with context (#752)
Co-authored-by: Noggling <[email protected]>
- Loading branch information
Showing
20 changed files
with
762 additions
and
514 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
--- | ||
"fusion-project-portal": patch | ||
--- | ||
The portal administration now also allows onboarding applications with a specific context. |
10 changes: 5 additions & 5 deletions
10
client/apps/portal-administration/src/components/Actions/ActivateSelectedButton.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
8 changes: 4 additions & 4 deletions
8
...t/apps/portal-administration/src/components/Actions/ActivateSelectedWithContextButton.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
14 changes: 7 additions & 7 deletions
14
client/apps/portal-administration/src/components/Actions/EditSelectedButton.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 |
---|---|---|
@@ -1,29 +1,29 @@ | ||
import { Button, Icon } from '@equinor/eds-core-react'; | ||
import { PortalApp } from '../../types'; | ||
import { PortalApplication } from '../../types'; | ||
|
||
import { add_circle_outlined, edit } from '@equinor/eds-icons'; | ||
import { edit } from '@equinor/eds-icons'; | ||
|
||
type EditSelectedButtonProps = { | ||
selection: PortalApp[]; | ||
selection: PortalApplication[]; | ||
editSelection: VoidFunction; | ||
}; | ||
|
||
export const EditSelectedButton = ({ selection, editSelection }: EditSelectedButtonProps) => { | ||
const isActive = selection.some((a) => !a.isActive); | ||
const isActive = selection.length === 1 && selection[0].isContextual; | ||
|
||
if (isActive) { | ||
if (!isActive) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Button | ||
id="activate-selected" | ||
variant="ghost" | ||
variant="outlined" | ||
onClick={() => { | ||
editSelection(); | ||
}} | ||
> | ||
<Icon data={edit} size={16} /> Edit Selected | ||
<Icon data={edit} size={16} /> Edit Context | ||
</Button> | ||
); | ||
}; |
12 changes: 6 additions & 6 deletions
12
client/apps/portal-administration/src/components/Actions/MakeGlobalAppsButton.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
10 changes: 5 additions & 5 deletions
10
client/apps/portal-administration/src/components/Actions/RemoveAppsButton.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
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.