Skip to content
Open
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 @@ -73,6 +73,7 @@ export default function LicenseDbObligationsModal({
await signOut()
} else if (response.status === StatusCodes.CREATED) {
MessageService.success(t('Added obligations successfully'))
setRefresh((prev) => !prev)
} else {
const err = (await response.json()) as ErrorDetails
throw new ApiError(err.message, {
Expand Down Expand Up @@ -132,9 +133,9 @@ export default function LicenseDbObligationsModal({
<input
className='form-check-input'
type='checkbox'
value={row.original.node[0] ?? ''}
checked={obligationIds.indexOf(row.original.node[0] ?? '') !== -1}
onChange={() => handleCheckboxes(row.original.node[0] ?? '')}
value={row.original.node[1].id ?? ''}
checked={obligationIds.indexOf(row.original.node[1].id ?? '') !== -1}
onChange={() => handleCheckboxes(row.original.node[1].id ?? '')}
/>
</div>
),
Expand Down Expand Up @@ -470,7 +471,7 @@ export default function LicenseDbObligationsModal({
await addObligationsToLicense()
handleCloseDialog()
}}
disabled={loading}
disabled={loading || obligationIds.length === 0}
>
{t('Add')}{' '}
{loading === true && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ export default function LicenseObligation({ projectId, actionType, payload, setP
}, [
pageableQueryParam,
session,
refresh,
])

useEffect(() => {
Expand Down
Loading