-
Notifications
You must be signed in to change notification settings - Fork 4
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
Jh/disable module #68
base: dev
Are you sure you want to change the base?
Conversation
…les contains '(disabled)'
Admins can disable any modules in the system
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@jhurst502 Can you add a gif or pictures of your front end changes? |
@jhurst502 It looks like you have merge conflicts and code smells |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@jhurst502 Request a few changes, let me know if you have any questions |
Co-authored-by: Jason Gallavin <jasongallavin@gmail.com>
Co-authored-by: Jason Gallavin <jasongallavin@gmail.com>
Co-authored-by: Jason Gallavin <jasongallavin@gmail.com>
Co-authored-by: Jason Gallavin <jasongallavin@gmail.com>
Kudos, SonarCloud Quality Gate passed! |
@@ -106,6 +107,7 @@ class PublicModule extends Component<PublicModuleProps, MyModuleState> { | |||
loading={this.state.startingModule} | |||
className='btn btn-primary' | |||
onClick={this.hasUserModule() ? undefined : this.startModule} | |||
toolTipText={'This lab is currently disabled'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tooltip text only shows when the button is disabled but there is no logic here to disable the button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled is set in the LabEnvironment.tsx from the disabled property of the module in the DB.
@@ -117,7 +122,7 @@ export default function ModuleEditor({match: {params: {moduleId}}}: Props) { | |||
<Col className='d-flex justify-content-end align-items-center'> | |||
{editing && Boolean(values.id) && <Button style={{marginRight: '1rem'}} type='button' variant='danger' onClick={onCancel}>Cancel</Button>} | |||
{!editing && <Button type='button' onClick={() => setEditing(true)}>Edit</Button>} | |||
{editing && <LoadingButton loading={isSubmitting} type='submit' label={values.id ? 'Save' : 'Create'}/>} | |||
{editing && <LoadingButton loading={isSubmitting} type='submit' label={values.id ? 'Save' : 'Create'} toolTipText={'This lab is currently disabled'}/>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tooltip text only shows when the button is disabled but there is no logic here to disable the button. Why would you want to disable this button anyways? Wouldn't we want a person to be able to undisable a mondule by saving it with it dechecked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The button is disabled if the module is set to disabled by someone authorized to do so. If someone authorized un-disables the module then the button will be un-disabled when the page is refreshed, since disabled is a property of a module stored in the database.
Kudos, SonarCloud Quality Gate passed! |
# Conflicts: # src/components/ModuleCard/ModuleCard.tsx # src/pages/ModuleEditor/ModuleEditor.tsx # src/types/Module.ts # yarn.lock
Kudos, SonarCloud Quality Gate passed! |
No description provided.