+ loadJobs() {
+ this.loadingSubject.next(true);
+ let jobs = [];
+ this.eiSvc.getProducerIds().pipe(
+ mergeMap(prodIds =>
+ forkJoin(prodIds.map(id => this.eiSvc.getJobsForProducer(id)))),
+ mergeMap(result => result),
+ finalize(() => this.loadingSubject.next(false))
+ ).subscribe(result => {
+ jobs = jobs.concat(result);
+ this.jobsSubject.next(jobs);