Skip to content

Commit 48a013e

Browse files
committed
Fixed release configuration build errors
1 parent c51ac7a commit 48a013e

10 files changed

+26
-9
lines changed

Angular2/ClientApp/app/components/bookProfile/bookProfile.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<p>Searching, please wait</p>
33
</div>
44

5-
<div class="row" *ngIf="!loading && success && book">
5+
<div class="row" *ngIf="!loading && success && bookFound">
66
<div class="col-xs-12">
77
<h1>{{ book.bookName }}</h1>
88
</div>

Angular2/ClientApp/app/components/bookProfile/bookProfile.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class BookProfileComponent implements OnInit, OnDestroy {
2020
loading = false;
2121
success = true;
2222
baseApiUrl = 'http://dwcheckapi.azurewebsites.net/Books/Get';
23+
bookFound = false;
2324

2425
private subscription: any;
2526
private getBookImageData: () => void;
@@ -43,6 +44,8 @@ export class BookProfileComponent implements OnInit, OnDestroy {
4344

4445
this.getBookImageData();
4546
}
47+
48+
this.bookFound = this.book != null;
4649
this.loading = false;
4750
});
4851
});

Angular2/ClientApp/app/components/books/books.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1>Book Search</h1>
1111
<p>Searching, please wait</p>
1212
</div>
1313

14-
<div class="table-responsive" *ngIf="!loading && success && books">
14+
<div class="table-responsive" *ngIf="!loading && success && hasBooks">
1515
<table class='table'>
1616
<thead>
1717
<tr>

Angular2/ClientApp/app/components/books/books.component.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ export class BooksComponent {
2828
loading: boolean;
2929
baseApiUrl: string;
3030
searchString = '';
31+
hasBooks = false;
3132
books: Book[];
32-
33+
3334
getDwBook: () => void;
35+
36+
3437
private getBookImageData: (book: Book) => void;
3538

3639
private registerFunctions() {
@@ -51,6 +54,8 @@ export class BooksComponent {
5154
this.books.push(newBook);
5255
});
5356
}
57+
58+
this.hasBooks = this.books && this.books.length > 0;
5459
this.success = resultJson.success;
5560
this.loading = false;
5661
});
@@ -68,7 +73,7 @@ export class BooksComponent {
6873
);
6974
}
7075
});
71-
}
76+
};
7277
}
7378
}
7479

Angular2/ClientApp/app/components/characters/characters.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1>Character Search</h1>
1111
<p>Searching, please wait</p>
1212
</div>
1313

14-
<div class="table-responsive" *ngIf="!loading && success && characters">
14+
<div class="table-responsive" *ngIf="!loading && success && hasCharacters">
1515
<table class='table' *ngIf="characters">
1616
<thead>
1717
<tr>

Angular2/ClientApp/app/components/characters/characters.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class CharacterComponent {
2424
success: boolean;
2525
baseApiUrl: string;
2626
searchString = '';
27+
hasCharacters = false;
2728
characters: Character[];
2829

2930
// public functions
@@ -41,10 +42,12 @@ export class CharacterComponent {
4142
this.characters.push(new Character(character.characterName, character.books));
4243
});
4344
}
45+
46+
this.hasCharacters = this.characters && this.characters.length > 0;
4447
this.success = resultJson.success;
4548
this.loading = false;
4649
});
47-
}
50+
};
4851
}
4952
}
5053

Angular2/ClientApp/app/components/series/series.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>Series Search</h1>
1010
<p>Searching, please wait</p>
1111
</div>
1212

13-
<div class="table-responsive" *ngIf="!loading && success && series">
13+
<div class="table-responsive" *ngIf="!loading && success && hasSeries">
1414
<table class='table' *ngIf="series">
1515
<thead>
1616
<tr>

Angular2/ClientApp/app/components/series/series.component.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export class SeriesComponent {
2424
loading: boolean;
2525
baseApiUrl: string;
2626
searchString = '';
27+
hasSeries = false;
2728
series: Series[];
2829

2930
// public functions
@@ -41,10 +42,12 @@ export class SeriesComponent {
4142
this.series.push(new Series(series.seriesId, series.seriesName, series.bookNames));
4243
});
4344
}
45+
46+
this.hasSeries = this.series && this.series.length > 0;
4447
this.success = resultJson.success;
4548
this.loading = false;
4649
});
47-
}
50+
};
4851
}
4952
}
5053

Angular2/ClientApp/app/components/seriesProfile/seriesProfile.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<p>Searching, please wait</p>
33
</div>
44

5-
<div *ngIf="!loading && success && books">
5+
<div *ngIf="!loading && success && hasBooks">
66
<div class="row" *ngFor="let book of books">
77
<div class="col-xs-12">
88
<h1>{{ book.bookName }}</h1>

Angular2/ClientApp/app/components/seriesProfile/seriesProfile.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export class SeriesProfileComponent implements OnInit, OnDestroy {
1818
success = true;
1919
baseApiUrl = 'http://dwcheckapi.azurewebsites.net/Books/Series';
2020
seriesId: number;
21+
hasBooks = false;
2122
books: BookBaseViewModel[];
2223

2324

@@ -42,6 +43,8 @@ export class SeriesProfileComponent implements OnInit, OnDestroy {
4243
this.books.push(newData);
4344
});
4445
}
46+
47+
this.hasBooks = this.books && this.books.length > 0;
4548
this.success = resultJson.success;
4649
this.loading = false;
4750
});

0 commit comments

Comments
 (0)