Skip to content
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

[#11878] Remove unused modal in AdminHomePage #12998

Merged
merged 1 commit into from
Apr 9, 2024
Merged
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 @@ -5,7 +5,6 @@ exports[`AdminHomePageComponent should snap with default view 1`] = `
accountReqs={[Function Array]}
accountService={[Function AccountService]}
activeRequests="0"
courseService={[Function CourseService]}
currentPage={[Function Number]}
formatDateDetailPipe={[Function FormatDateDetailPipe]}
instructorDetails=""
Expand All @@ -14,15 +13,9 @@ exports[`AdminHomePageComponent should snap with default view 1`] = `
instructorName=""
instructorsConsolidated={[Function Array]}
isAddingInstructors="false"
isRegisteredInstructorModalLoading="false"
items$={[Function Observable]}
linkService={[Function LinkService]}
ngbModal={[Function _NgbModal]}
pageSize={[Function Number]}
registeredInstructorAccountData={[Function Array]}
registeredInstructorIndex="0"
registeredInstructorModal={[Function TemplateRef2]}
simpleModalService={[Function SimpleModalService]}
statusMessageService={[Function StatusMessageService]}
timezoneService={[Function TimezoneService]}
>
Expand Down Expand Up @@ -140,7 +133,6 @@ exports[`AdminHomePageComponent should snap with disabled adding instructor butt
accountReqs={[Function Array]}
accountService={[Function AccountService]}
activeRequests={[Function Number]}
courseService={[Function CourseService]}
currentPage={[Function Number]}
formatDateDetailPipe={[Function FormatDateDetailPipe]}
instructorDetails=""
Expand All @@ -149,15 +141,9 @@ exports[`AdminHomePageComponent should snap with disabled adding instructor butt
instructorName=""
instructorsConsolidated={[Function Array]}
isAddingInstructors={[Function Boolean]}
isRegisteredInstructorModalLoading="false"
items$={[Function Observable]}
linkService={[Function LinkService]}
ngbModal={[Function _NgbModal]}
pageSize={[Function Number]}
registeredInstructorAccountData={[Function Array]}
registeredInstructorIndex="0"
registeredInstructorModal={[Function TemplateRef2]}
simpleModalService={[Function SimpleModalService]}
statusMessageService={[Function StatusMessageService]}
timezoneService={[Function TimezoneService]}
>
Expand Down Expand Up @@ -439,7 +425,6 @@ exports[`AdminHomePageComponent should snap with some instructors details 1`] =
accountReqs={[Function Array]}
accountService={[Function AccountService]}
activeRequests="0"
courseService={[Function CourseService]}
currentPage={[Function Number]}
formatDateDetailPipe={[Function FormatDateDetailPipe]}
instructorDetails=""
Expand All @@ -448,15 +433,9 @@ exports[`AdminHomePageComponent should snap with some instructors details 1`] =
instructorName=""
instructorsConsolidated={[Function Array]}
isAddingInstructors="false"
isRegisteredInstructorModalLoading="false"
items$={[Function Observable]}
linkService={[Function LinkService]}
ngbModal={[Function _NgbModal]}
pageSize={[Function Number]}
registeredInstructorAccountData={[Function Array]}
registeredInstructorIndex="0"
registeredInstructorModal={[Function TemplateRef2]}
simpleModalService={[Function SimpleModalService]}
statusMessageService={[Function StatusMessageService]}
timezoneService={[Function TimezoneService]}
>
Expand Down Expand Up @@ -786,85 +765,6 @@ exports[`AdminHomePageComponent should snap with some instructors details 1`] =
</span>
</td>
</tr>
<tr
tm-new-instructor-data-row=""
>
<td>
<span
id="instructor-3-name"
>
Instructor D
</span>
</td>
<td>
<span
id="instructor-3-email"
>
instructord@example.com
</span>
</td>
<td>
<span
id="instructor-3-institution"
>
Sample Institution C
</span>
</td>
<td
style="width: 17%;"
>
<div
class="button-group"
>
<button
class="action-btn btn btn-sm btn-primary text-nowrap"
id="add-instructor-3"
style="margin-right: 10px;"
>
Add
</button>
<button
class="action-btn btn btn-sm btn-info text-nowrap"
id="edit-instructor-3"
style="margin-right: 10px;"
>
Edit
</button>
<button
class="action-btn btn btn-sm btn-danger"
id="remove-instructor-3"
>
Remove
</button>
</div>
</td>
<td
style="width: 8%;"
>
FAIL
</td>
<td
style="width: 40%;"
>
<span
class="message"
id="message-instructor-3"
>
Cannot create account request as instructor has already registered.
</span>
<span>
<a
class="btn btn-link"
id="instructor-3-registered-info-button"
type="button"
>
<i
class="fas fa-info-circle"
/>
</a>
</span>
</td>
</tr>
</tbody>
</table>
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
(addInstructorEvent)="addInstructor(i)"
(removeInstructorEvent)="removeInstructor(i)"
(toggleEditModeEvent)="setInstructorRowEditModeEnabled(i, $event)"
(showRegisteredInstructorModalEvent)="showRegisteredInstructorModal(i)"
></tr>
</tbody>
</table>
Expand All @@ -84,65 +83,3 @@
</div>
</div>
</div>
<ng-template #registeredInstructorModal>
<div *tmIsLoading="isRegisteredInstructorModalLoading">
<p>
You may <a id="reset-account-request-link" href="javascript:;" (click)="resetAccountRequest(registeredInstructorIndex)">reset</a>
this account request. Alternatively, reset the Google account or use the Google ID migration script.
</p>
<p *ngIf="!registeredInstructorAccountData.length">
No accounts found for instructor associated with email
<b>{{ instructorsConsolidated[registeredInstructorIndex].email }}</b>.
</p>
<p *ngIf="registeredInstructorAccountData.length">
The following {{ registeredInstructorAccountData.length }} account(s) are associated with the email
<b>{{ instructorsConsolidated[registeredInstructorIndex].email }}</b>:
</p>
<div class="card" *ngFor="let account of registeredInstructorAccountData">
<a href="{{ account.manageAccountLink }}" target="_blank"><h5 class="card-header">{{ account.googleId }}</h5></a>
<div class="card-body">
<h6 *ngIf="!account.instructorCourses.length">No instructor courses found for this account.</h6>
<div *ngIf="account.instructorCourses.length">
<h6 class="card-title">Instructor for the following <b>{{ account.instructorCourses.length }}</b> courses:</h6>
<table class="table table-striped">
<thead>
<tr>
<th>Course ID</th>
<th>Course Name</th>
<th>Institute</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let course of account.instructorCourses">
<td class="text-break">{{ course.courseId }}</td>
<td class="text-break">{{ course.courseName }}</td>
<td class="text-break">{{ course.institute }}</td>
</tr>
</tbody>
</table>
</div>
<h6 class="mt-3" *ngIf="!account.studentCourses.length">No student courses found for this account.</h6>
<div *ngIf="account.studentCourses.length">
<h6 class="card-title mt-3">Student for the following <b>{{ account.studentCourses.length }}</b> courses:</h6>
<table class="table table-striped">
<thead>
<tr>
<th>Course ID</th>
<th>Course Name</th>
<th>Institute</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let course of account.studentCourses">
<td class="text-break">{{ course.courseId }}</td>
<td class="text-break">{{ course.courseName }}</td>
<td class="text-break">{{ course.institute }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</ng-template>
<tm-account-request-table *ngIf="accountReqs.length" [accountRequests]="accountReqs" [searchString]=""></tm-account-request-table>
Loading
Loading