-import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter} from '@angular/core';
+import {Component, OnInit, AfterViewInit, Input, Output, EventEmitter, ViewChild} 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 {AcqSearchTerm, AcqSearch} from './acq-search.service';
import {ServerStoreService} from '@eg/core/server-store.service';
@Output() searchSubmitted = new EventEmitter<AcqSearch>();
+ @ViewChild('defaultSearchSavedString', { static: true}) defaultSearchSavedString: StringComponent;
+
showForm = true;
hints = ['jub', 'acqpl', 'acqpo', 'acqinv', 'acqlid'];
private pcrud: PcrudService,
private store: ServerStoreService,
private idl: IdlService,
+ private toast: ToastService,
) {}
ngOnInit() {
return this.store.setItem(this.defaultSearchSetting, {
terms: this.searchTerms,
conjunction: this.searchConjunction
- });
+ }).then(() =>
+ this.defaultSearchSavedString.current().then(msg =>
+ this.toast.success(msg)
+ )
+ );
}
saveRunImmediately() {
return this.store.setItem(this.runImmediatelySetting, this.runImmediately);