Skip to content

Commit

Permalink
fixed syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dobeybobey committed Oct 25, 2024
1 parent a2df3aa commit 4d41536
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h5 class="modal-title">
<label><b>Name for copied session*</b></label>
<input id="copy-session-name" type="text" class="form-control" [(ngModel)]="newFeedbackSessionName" [maxlength]="FEEDBACK_SESSION_NAME_MAX_LENGTH"
required #newSessionName="ngModel">
<div [hidden]="!validName" class="invalid-field">
<div [hidden]="!(validName.value)" class="invalid-field">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
The field "Name for copied session" should not be empty.
</div>
Expand All @@ -35,5 +35,5 @@ <h5 class="modal-title">
<div class="modal-footer">
<button type="button" class="btn btn-light" (click)="activeModal.dismiss()">Cancel</button>
<button id="btn-confirm-copy-course" type="button" class="btn btn-primary" (click)="copy()"
[disabled]="!newFeedbackSessionName || copyToCourseSet.size < 1 || !validName">Copy</button>
[disabled]="!newFeedbackSessionName || copyToCourseSet.size < 1 || !(validName.value)">Copy</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,24 @@ export class CopySessionModalComponent {
* /
validName: boolean = false;
/**
* Fires the copy event.
*/
copy(): void {
/**
* check if session name is whitespace or not
* /
* check if session name is whitespace or not
*/
if (this.newFeedbackSessionName.trim().length==0) {

Check failure on line 42 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Operator '==' must be spaced

Check failure on line 42 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Expected '===' and instead saw '=='

Check failure on line 42 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Operator '==' must be spaced

Check failure on line 42 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Expected '===' and instead saw '=='
validName:false;

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unexpected labeled statement

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

'validName:' is defined but never used

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Expected an assignment or function call and instead saw an expression

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unexpected labeled statement

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

'validName:' is defined but never used

Check failure on line 43 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Expected an assignment or function call and instead saw an expression
return;

Check failure on line 44 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unnecessary return statement

Check failure on line 44 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unnecessary return statement
} else {

Check failure on line 45 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Unnecessary 'else' after 'return'

Check failure on line 45 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Unnecessary 'else' after 'return'
validName=true;

Check failure on line 46 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Operator '=' must be spaced

Check failure on line 46 in src/web/app/components/copy-session-modal/copy-session-modal.component.ts

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

Operator '=' must be spaced
this.activeModal.close({
newFeedbackSessionName: this.newFeedbackSessionName,
sessionToCopyCourseId: this.sessionToCopyCourseId,
copyToCourseList: Array.from(this.copyToCourseSet),
});
}
else {
validName=true;
this.activeModal.close({
newFeedbackSessionName: this.newFeedbackSessionName,
sessionToCopyCourseId: this.sessionToCopyCourseId,
copyToCourseList: Array.from(this.copyToCourseSet),
});
}
}

/**
Expand Down

0 comments on commit 4d41536

Please sign in to comment.