+ private getJobsForProducer(id: String) {
+ console.log('Getting jobs for producer ID: ', id);
+ this.eiSvc.getJobsForProducer(id).subscribe(jobs => {
+ this.addJobsToSubject(jobs);
+ this.rowCount = this.eiJobsSubject.getValue().length;
+ });
+ }
+
+ private addJobsToSubject(jobs: EIJob[]) {
+ const currentValue = this.eiJobsSubject.value;
+ const updatedValue = [...currentValue, ...jobs];
+ this.eiJobsSubject.next(updatedValue);
+ }
+