Admin Course Page Preparation for Course Users
authorKyle Huckins <khuckins@catalyte.io>
Sun, 8 Dec 2019 05:15:03 +0000 (05:15 +0000)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 26 Aug 2020 22:53:46 +0000 (15:53 -0700)
- Add a new tab for managing Users associated with
the course, in preparation for the User Dialog code.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.html
modified:   Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.ts

Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.ts

index ec1e4f8..0361526 100644 (file)
@@ -5,6 +5,8 @@
   [bannerIcon]="currentCourse.is_archived() == 't' ? 'lock' : null">
 </eg-staff-banner>
 <ngb-tabset class="mb-3">
+
+  <!-- Edit Tab -->
   <ngb-tab title="Edit Course" i18n-title id="edit">
     <ng-template ngbTabContent>
       <div class="row">
@@ -27,6 +29,8 @@
       </div>
     </ng-template>
   </ngb-tab>
+
+  <!-- Materials Tab -->
   <ngb-tab title="Course Materials" i18n-title id="courseMaterials">
     <ng-template ngbTabContent>
       <div class="row mt-3">
       </ng-template>
     </ng-template>
   </ngb-tab>
+
+  <!-- Users Tab -->
+  <ngb-tab title="Course Users" i18n-title id="courseUsers">
+    <ng-template ngbTabContent>
+      <div class="row mt-3">
+        <div class="col-lg-4 mt-3">
+          <div class="row mt-3">
+            <div class="col-lg-12 d-flex">
+              <div class="input-group">
+                <div class="input-group-prepend">
+                  <span class="input-group-text" i18n>Patron Barcode</span>
+                </div>
+                <input type="text" class="flex-grow-1" [(ngModel)]="userBarcode"
+                  (click)="$event.target.select()" 
+                  [disabled]="currentCourse && currentCourse.is_archived() == 't'" />
+                  <!--(keyup.enter)="associateUser(userBarcode)"-->
+              </div>
+            </div>
+          </div>
+          <div class="row mt-3">
+            <div class="col-lg-12 d-flex">
+              <div class="input-group">
+                <div class="input-group-prepend">
+                  <span class="input-group-text" i18n>Role</span>
+                </div>
+                <input type="text" [(ngModel)]="userRoleInput"
+                  [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+                  placeholder-i18n placeholder="e.g. Student, TA, Instructor..."
+                  class="flex-grow-1" />
+              </div>
+            </div>
+          </div>
+          <div class="row mt-3">
+            <div class="col-lg-12 text-right">
+              <!--(click)="associateUser(userBarcode)"-->
+              <button class="btn btn-primary"
+                [disabled]="currentCourse && currentCourse.is_archived() == 't'"
+                i18n [disabled]="!userBarcode">
+                Add User
+              </button>
+            </div>
+          </div>
+        </div>
+        <div class="col-lg-8 mt-3">
+          <!-- eg-grid -->
+        </div>
+      </div>
+    </ng-template>
+  </ngb-tab>
 </ngb-tabset>
 
 <eg-string #archiveFailedString i18n-text text="Archival of Course failed or was not allowed"></eg-string>
index 944bd64..3765496 100644 (file)
@@ -58,6 +58,9 @@ export class CoursePageComponent implements OnInit {
     @Input() isModifyingCallNumber: Boolean;
     @Input() isModifyingLocation: Boolean;
 
+    // Users Tab
+    @Input() userBarcode: String;
+    @Input() userRoleInput: String;
     constructor(
         private auth: AuthService,
         private course: CourseService,