Skip to content

Commit 7f99533

Browse files
committed
Prevent copilot from reassigning an active task to themselves
1 parent 8f0e2ce commit 7f99533

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/components/ChallengeEditor/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,9 +1576,6 @@ class ChallengeEditor extends Component {
15761576
<div className={styles.bottomContainer}>
15771577
{!isLoading && <LastSavedDisplay timeLastSaved={draftChallenge.data.updated} />}
15781578
{!isLoading && (!isActive) && (!isCompleted) && <div className={styles.buttonContainer}>
1579-
{/* <div className={styles.button}>
1580-
<OutlineButton text={isSaving ? 'Saving...' : 'Save'} type={'success'} onClick={this.onSaveChallenge} />
1581-
</div> */}
15821579
<div className={styles.button}>
15831580
{!this.state.hasValidationErrors ? (
15841581
<PrimaryButton text={isSaving ? 'Saving...' : 'Save Draft'} type={'info'} onClick={this.createDraftHandler} />
@@ -1609,14 +1606,11 @@ class ChallengeEditor extends Component {
16091606
</div>
16101607
}
16111608
</div>}
1612-
{!isLoading && isActive && <div className={styles.buttonContainer}>
1609+
{(!isLoading) && isActive && (!preventCopilotFromActivatingTask) && <div className={styles.buttonContainer}>
16131610
<div className={styles.button}>
16141611
<OutlineButton text={isSaving ? 'Saving...' : 'Save'} type={'success'} onClick={this.onSaveChallenge} />
16151612
</div>
1616-
{(
1617-
isTask &&
1618-
!preventCopilotFromActivatingTask
1619-
) && (
1613+
{isTask && (
16201614
<div className={styles.button}>
16211615
<Tooltip content={MESSAGE.MARK_COMPLETE}>
16221616
<PrimaryButton text={'Mark Complete'} type={'success'} onClick={this.openCloseTaskConfirmation} />

0 commit comments

Comments
 (0)