LP1840773 SCKO Angular
authorBill Erickson <berickxx@gmail.com>
Mon, 13 Jun 2022 17:51:15 +0000 (13:51 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 14 Jun 2022 19:37:22 +0000 (15:37 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/routing.module.ts
Open-ILS/src/eg2/src/app/scko/routing.module.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/scko/scko.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/scko/scko.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/scko/scko.component.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/scko/scko.module.ts [new file with mode: 0644]

index 9385e99..087c0cc 100644 (file)
@@ -17,6 +17,10 @@ const routes: Routes = [
     path: 'staff',
     resolve : {startup : BaseResolver},
     loadChildren: () => import('./staff/staff.module').then(m => m.StaffModule)
+  }, {
+    path: 'scko',
+    resolve : {startup : BaseResolver},
+    loadChildren: () => import('./scko/scko.module').then(m => m.SckoModule)
   }
 ];
 
diff --git a/Open-ILS/src/eg2/src/app/scko/routing.module.ts b/Open-ILS/src/eg2/src/app/scko/routing.module.ts
new file mode 100644 (file)
index 0000000..be056ad
--- /dev/null
@@ -0,0 +1,16 @@
+import {NgModule} from '@angular/core';
+import {RouterModule, Routes} from '@angular/router';
+import {SckoComponent} from './scko.component';
+
+const routes: Routes = [{
+  path: '',
+  component: SckoComponent
+}];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+
+export class SckoRoutingModule {}
+
diff --git a/Open-ILS/src/eg2/src/app/scko/scko.component.css b/Open-ILS/src/eg2/src/app/scko/scko.component.css
new file mode 100644 (file)
index 0000000..3da1af8
--- /dev/null
@@ -0,0 +1,29 @@
+body {                                                                         
+    font-family: Arial, Verdana;                                               
+    font-size: 13px;                                                           
+}                                                                              
+                                                                               
+#scko-banner {                                                         
+    background: #00593d; /* Old browsers */                                    
+/* IE9 SVG, needs conditional override of 'filter' to 'none' */                
+    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwNTkzZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDdhNTQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+    background: -moz-linear-gradient(top,  #00593d 0%, #007a54 100%); /* FF3.6+ */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00593d), color-stop(100%,#007a54)); /* Chrome,Safari4+ */
+    background: -webkit-linear-gradient(top,  #00593d 0%,#007a54 100%); /* Chrome10+,Safari5.1+ */
+    background: -o-linear-gradient(top,  #00593d 0%,#007a54 100%); /* Opera 11.10+ */
+    background: -ms-linear-gradient(top,  #00593d 0%,#007a54 100%); /* IE10+ */
+    background: linear-gradient(to bottom,  #00593d 0%,#007a54 100%); /* W3C */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00593d', endColorstr='#007a54',GradientType=0 ); /* IE6-8 */
+    padding-top: 20px;                                                         
+    text-align: center;                                                        
+    font-weight:bold;                                                          
+}  
+
+#scko-scan-input-text {                                                       
+  font-size: 16px;                                                           
+  background: none repeat scroll 0 0 #252525;                                
+  color: white;                                                              
+  padding: 10px;                                                             
+} 
+
+
diff --git a/Open-ILS/src/eg2/src/app/scko/scko.component.html b/Open-ILS/src/eg2/src/app/scko/scko.component.html
new file mode 100644 (file)
index 0000000..33a7795
--- /dev/null
@@ -0,0 +1,42 @@
+
+<div id="scko-banner" class="pb-2">
+       <div id="scko-logo-div">
+               <img src="/images/self_eg_logo.png"/>
+       </div>
+  <div class="scko-scan-container mt-3">
+    <ng-container *ngIf="!patron">
+      <div id="scko-scan-input-text" i18n>
+        Please log in with your username or library barcode.
+      </div>
+      <div class="row form-validated form-inline d-flex mt-3 mb-3">
+        <div class="flex-1"></div>
+        <div>
+          <label class="sr-only" for="patron-username" i18n>Username or Barcode</label>
+          <input type="text" class="form-control border border-dark shadow-rounded" 
+            id="patron-username" placeholder="Username or Barcode" i18n-placeholder>
+          <label class="sr-only" for="patron-password" i18n>Password</label>
+          <input type="text" class="form-control shadow border border-dark rounded ml-2" 
+            id="patron-password" placeholder="Password" i18n-placeholder>
+            <button type="submit" class="btn btn-dark ml-2">Submit</button>
+          </div>
+        <div class="flex-1"></div>
+      </div>
+    </ng-container>
+  </div>
+</div>
+
+<div id='staff-content-container'>
+  <!-- page content -->
+  <router-outlet></router-outlet>
+</div>
+
+<!-- global toast alerts -->
+<eg-toast></eg-toast>
+
+<!-- global print handler component -->
+<eg-print></eg-print>
+
+<!-- context menu DOM insertion point -->
+<eg-context-menu-container></eg-context-menu-container>
+
+
diff --git a/Open-ILS/src/eg2/src/app/scko/scko.component.ts b/Open-ILS/src/eg2/src/app/scko/scko.component.ts
new file mode 100644 (file)
index 0000000..2ca8289
--- /dev/null
@@ -0,0 +1,27 @@
+import {Component, OnInit, NgZone, HostListener} from '@angular/core';
+import {Router, ActivatedRoute, NavigationEnd} from '@angular/router';
+import {AuthService, AuthWsState} from '@eg/core/auth.service';
+import {NetService} from '@eg/core/net.service';
+import {IdlObject, IdlService} from '@eg/core/idl.service';
+
+@Component({
+  templateUrl: 'scko.component.html',
+  styleUrls: ['scko.component.css']
+})
+
+export class SckoComponent implements OnInit {
+
+    // Currently active patron account object.
+    patron: IdlObject;
+
+    constructor(
+        private router: Router,
+        private route: ActivatedRoute,
+        private net: NetService,
+        private auth: AuthService,
+    ) {}
+
+    ngOnInit() {
+    }
+}
+
diff --git a/Open-ILS/src/eg2/src/app/scko/scko.module.ts b/Open-ILS/src/eg2/src/app/scko/scko.module.ts
new file mode 100644 (file)
index 0000000..f386f6b
--- /dev/null
@@ -0,0 +1,22 @@
+import {NgModule} from '@angular/core';
+import {EgCommonModule} from '@eg/common.module';
+import {CommonWidgetsModule} from '@eg/share/common-widgets.module';
+import {AudioService} from '@eg/share/util/audio.service';
+import {TitleComponent} from '@eg/share/title/title.component';
+
+import {SckoComponent} from './scko.component';
+import {SckoRoutingModule} from './routing.module';
+
+@NgModule({
+  declarations: [
+    SckoComponent,
+  ],
+  imports: [
+    EgCommonModule,
+    CommonWidgetsModule,
+    SckoRoutingModule
+  ]
+})
+
+export class SckoModule {}
+