Skip to content

Commit

Permalink
bugfix(invite form): disable invite button (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Sep 25, 2023
1 parent 71df55d commit 0857ba0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
- Added Sub menu for active services in service overview
- Added Deactivate functionality
- Added image to service overview cards
- Invite Business Partner Form
- Fix loader position to center
- Disable invite button when loader is visible
- Data Space
- Last section background color issue
- Connector Deletion
Expand Down
24 changes: 18 additions & 6 deletions src/components/overlays/InviteForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
DialogContent,
DialogHeader,
Input,
LoadingButton,
Typography,
} from '@catena-x/portal-shared-components'
import debounce from 'lodash.debounce'
Expand Down Expand Up @@ -127,17 +128,28 @@ export const InviteForm = ({
></Input>
))}
</form>
<span className={`InviteFormResult ${state}`}>
{state === 'busy' && <span className="loader" />}
</span>
</DialogContent>
<DialogActions>
<Button variant="outlined" onClick={(e) => handleOverlayClose(e)}>
{`${t('global.actions.cancel')}`}
</Button>
<Button name="send" disabled={inpValid[4]} onClick={doSubmit}>
{`${t('content.invite.invite')}`}
</Button>
{state === 'busy' ? (
<LoadingButton
color="primary"
helperText=""
helperTextColor="success"
label=""
loadIndicator={t('global.actions.loading')}
loading
size="medium"
onButtonClick={() => {}}
sx={{ marginLeft: '10px' }}
/>
) : (
<Button name="send" disabled={inpValid[4]} onClick={doSubmit}>
{`${t('content.invite.invite')}`}
</Button>
)}
</DialogActions>
</Dialog>
</>
Expand Down

0 comments on commit 0857ba0

Please sign in to comment.