Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix #173

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const ApproveVerificationRequestModal: React.FC<
const [request, setRequest] = useState<CentralIdentityVerificationRequest>();
const [allApps, setAllApps] = useState<CentralIdentityApp[]>([]);
const [approvedApps, setApprovedApps] = useState<CentralIdentityApp[]>([]);
const [showDefaultLibs, setShowDefaultLibs] = useState<boolean>(false);

// Effects
useEffect(() => {
Expand Down Expand Up @@ -225,46 +224,35 @@ const ApproveVerificationRequestModal: React.FC<
className="mb-1r"
/>
))}
<Accordion className="mt-2p">
<Accordion.Title
active={showDefaultLibs}
index={0}
onClick={() => setShowDefaultLibs(!showDefaultLibs)}
>
<div className="flex flex-row justify-between">
<div>
<Icon name="dropdown" />
<strong>Change Default Libraries</strong>
</div>
{showDefaultLibs && (
<p
className="underline cursor-pointer"
onClick={(e) => {
e.stopPropagation();
handleSelectAllLibs();
}}
>
Select All
</p>
)}
</div>
</Accordion.Title>
<Accordion.Content active={showDefaultLibs}>
<div className="flex-col-div">
{allApps
.filter((app) => app.is_default_library)
.map((app) => (
<Checkbox
key={crypto.randomUUID()}
label={app.name}
checked={isChecked(app.id)}
onChange={() => handleCheckApp(app.id)}
className="mb-1r"
/>
))}
</div>
</Accordion.Content>
</Accordion>
<div className="mt-2">
<div className="flex flex-row justify-between items-center">
<p>
<strong>Change Default Libraries</strong>
</p>
<p
className="underline cursor-pointer"
onClick={(e) => {
e.stopPropagation();
handleSelectAllLibs();
}}
>
Select All
</p>
</div>
<div className="flex-col-div mt-4">
{allApps
.filter((app) => app.is_default_library)
.map((app) => (
<Checkbox
key={crypto.randomUUID()}
label={app.name}
checked={isChecked(app.id)}
onChange={() => handleCheckApp(app.id)}
className="mb-1r"
/>
))}
</div>
</div>
</Form>
</div>
)}
Expand Down
8 changes: 6 additions & 2 deletions client/src/components/projects/ProjectView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,7 @@ const ProjectView = (props) => {
/>
</Form.Group>
{
!projURL && !project.didCreateWorkbench && (
!project.didCreateWorkbench && (
<>
<Form.Field>
<label htmlFor='projectURL'>
Expand All @@ -2704,7 +2704,11 @@ const ProjectView = (props) => {
id='projectURL'
/>
</Form.Field>
<Button color='blue' onClick={() => setShowCreateWorkbenchModal(true)} className='!mb-4'><Icon name='plus'/>Create Book</Button>
{
!projURL && (
<Button color='blue' onClick={() => setShowCreateWorkbenchModal(true)} className='!mb-4'><Icon name='plus'/>Create Book</Button>
)
}
</>
)
}
Expand Down