From 1aa18cbf4ef61abe5f2492bc271e63113177da85 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 5 Mar 2020 15:32:48 -0500 Subject: [PATCH] WIP: provider search/result stub and required IDL change Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- Open-ILS/examples/fm_IDL.xml | 2 + .../acq-provider-search-form.component.css | 5 ++ .../acq-provider-search-form.component.html | 53 +++++++++++++++ .../provider/acq-provider-search-form.component.ts | 76 ++++++++++++++++++++++ .../app/staff/acq/provider/acq-provider.module.ts | 2 + .../acq/provider/provider-results.component.html | 19 ++++++ 6 files changed, 157 insertions(+) create mode 100644 Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.css create mode 100644 Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 56bc4777f4..7f96239d21 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -8748,12 +8748,14 @@ SELECT usr, + + diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.css b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.css new file mode 100644 index 0000000000..435a067e91 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.css @@ -0,0 +1,5 @@ +#acq-provider-search-form { + border-radius: 0px 0px 7px 7px; + background-color: rgb(247, 247, 247); + box-shadow: 1px 2px 3px -1px rgba(0, 0, 0, .2); +} diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html new file mode 100644 index 0000000000..3ef2995448 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.html @@ -0,0 +1,53 @@ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts new file mode 100644 index 0000000000..66648f74ab --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider-search-form.component.ts @@ -0,0 +1,76 @@ +import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild, + OnChanges, SimpleChanges} from '@angular/core'; +import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {Router, ActivatedRoute} from '@angular/router'; +import {StaffCommonModule} from '@eg/staff/common.module'; +import {IdlService, IdlObject} from '@eg/core/idl.service'; +import {PcrudService} from '@eg/core/pcrud.service'; +import {StringComponent} from '@eg/share/string/string.component'; +import {ToastService} from '@eg/share/toast/toast.service'; +import {AcqProviderSearchTerm, AcqProviderSearch} from './acq-provider.service'; +import {ServerStoreService} from '@eg/core/server-store.service'; + +@Component({ + selector: 'eg-acq-provider-search-form', + styleUrls: ['acq-provider-search-form.component.css'], + templateUrl: './acq-provider-search-form.component.html' +}) + +export class AcqProviderSearchFormComponent implements OnInit, AfterViewInit, OnChanges { + + @Output() searchSubmitted = new EventEmitter(); + + providerName = ''; + providerCode = ''; + providerOwners = []; + contactName = ''; + providerEmail = ''; + providerPhone = ''; + providerCurrencyType = ''; + providerSAN = ''; + providerEDIDefault = null + providerURL = ''; + providerIsActive = true; + + constructor( + private router: Router, + private route: ActivatedRoute, + private pcrud: PcrudService, + private store: ServerStoreService, + private idl: IdlService, + private toast: ToastService, + ) {} + + ngOnInit() { + const self = this; + + } + + ngAfterViewInit() {} + + clearSearch() { + this.providerName = ''; + this.providerCode = ''; + this.providerOwners = []; + this.contactName = ''; + this.providerEmail = ''; + this.providerPhone = ''; + this.providerCurrencyType = ''; + this.providerSAN = ''; + this.providerEDIDefault = null + this.providerURL = ''; + this.providerIsActive = true; + } + + submitSearch() { + // tossing setTimeout here to ensure that the + // grid data source is fully initialized + setTimeout(() => { + this.searchSubmitted.emit({ + terms: this.searchTerms, + conjunction: this.searchConjunction + }); + }); + } + +} diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.module.ts b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.module.ts index 85b08bafc3..e20d667c2b 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.module.ts @@ -2,10 +2,12 @@ import {NgModule} from '@angular/core'; import {StaffCommonModule} from '@eg/staff/common.module'; import {AcqProviderRoutingModule} from './routing.module'; import {AcqProviderComponent} from './acq-provider.component'; +import {AcqProviderSearchFormComponent} from './acq-provider-search-form.component'; @NgModule({ declarations: [ AcqProviderComponent, + AcqProviderSearchFormComponent, ], imports: [ StaffCommonModule, diff --git a/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html new file mode 100644 index 0000000000..127b7a56ce --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/acq/provider/provider-results.component.html @@ -0,0 +1,19 @@ + +
    +
  • {{c.name()}}
  • +
+
+ + + + + + + + -- 2.11.0