Skip to content

Commit

Permalink
Fix book service compile bug
Browse files Browse the repository at this point in the history
  • Loading branch information
honza-rychtar committed Mar 9, 2018
1 parent 2b0b254 commit a80aa69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/app/services/book.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { Location } from '@angular/common';
import { MzModalService } from 'ng2-materialize';
import { DialogOcrComponent } from '../dialog/dialog-ocr/dialog-ocr.component';
import { request } from 'https';
import 'rxjs/add/observable/forkJoin';



@Injectable()
Expand Down Expand Up @@ -100,7 +102,7 @@ export class BookService {


private loadIssues(periodicalUuid: string, volumeUuid: string, issueUuid: string) {
this.krameriusApiService.getPeriodicalIssues(periodicalUuid, volumeUuid).subscribe(response => {
this.krameriusApiService.getPeriodicalIssues(periodicalUuid, volumeUuid, null).subscribe(response => {
const issues = this.solrService.periodicalItems(response, 'periodicalitem');
if (!issues || issues.length < 1) {
return;
Expand All @@ -126,7 +128,7 @@ export class BookService {
}

private loadMonographUnits(monographUuid: string, unitUud: string) {
this.krameriusApiService.getMonographUnits(monographUuid).subscribe(response => {
this.krameriusApiService.getMonographUnits(monographUuid, null).subscribe(response => {
const units = this.solrService.periodicalItems(response, 'monographunit');
if (!units || units.length < 1) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/kramerius-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ export class KrameriusApiService {
const modelRestriction = models.map(a => 'fedora.model:' + a).join(' OR ');
let url = this.API_URL + '/search?fl=PID,dostupnost,fedora.model,dc.title,datum_str,details&q=pid_path:'
+ pidPath + '/* AND level:' + level + ' AND (' + modelRestriction + ')';
if (query.accessibility === 'private' || query.accessibility === 'public') {
if (query && (query.accessibility === 'private' || query.accessibility === 'public')) {
url += ' AND dostupnost:' + query.accessibility;
}
if (applyYear && query.isYearRangeSet()) {
if (query && applyYear && query.isYearRangeSet()) {
url += ' AND (rok:[' + query.from + ' TO ' + query.to + '] OR (datum_begin:[* TO ' + query.to + '] AND datum_end:[' + query.from + ' TO *]))';
}
url += '&sort=datum asc,datum_str asc,fedora.model asc&rows=1500&start=0';
Expand Down

0 comments on commit a80aa69

Please sign in to comment.