Skip to content

Commit

Permalink
Update: Add context referencing for chatbot (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Jun 21, 2024
1 parent 877bd7a commit e144c16
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
11 changes: 8 additions & 3 deletions MovieVerse-Frontend/js/movie-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1639,9 +1639,14 @@ function createImdbRatingCircle(imdbRating, imdbId) {
if (imdbRating === 'N/A' || imdbRating === null || imdbRating === undefined) {
imdbRating = 'N/A';
}

if (imdbRating === 'N/A') {
imdbRating = imdbRating.toFixed(1);
else {
imdbRating = parseFloat(imdbRating);
if (!isNaN(imdbRating)) {
imdbRating = imdbRating.toFixed(1);
}
else {
imdbRating = 'N/A';
}
}

let circleContainer = document.getElementById('imdbRatingCircleContainer');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1639,9 +1639,14 @@ function createImdbRatingCircle(imdbRating, imdbId) {
if (imdbRating === 'N/A' || imdbRating === null || imdbRating === undefined) {
imdbRating = 'N/A';
}

if (imdbRating === 'N/A') {
imdbRating = imdbRating.toFixed(1);
else {
imdbRating = parseFloat(imdbRating);
if (!isNaN(imdbRating)) {
imdbRating = imdbRating.toFixed(1);
}
else {
imdbRating = 'N/A';
}
}

let circleContainer = document.getElementById('imdbRatingCircleContainer');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1639,9 +1639,14 @@ function createImdbRatingCircle(imdbRating, imdbId) {
if (imdbRating === 'N/A' || imdbRating === null || imdbRating === undefined) {
imdbRating = 'N/A';
}

if (imdbRating === 'N/A') {
imdbRating = imdbRating.toFixed(1);
else {
imdbRating = parseFloat(imdbRating);
if (!isNaN(imdbRating)) {
imdbRating = imdbRating.toFixed(1);
}
else {
imdbRating = 'N/A';
}
}

let circleContainer = document.getElementById('imdbRatingCircleContainer');
Expand Down
11 changes: 8 additions & 3 deletions MovieVerse-Mobile/www/MovieVerse-Frontend/js/movie-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -1639,9 +1639,14 @@ function createImdbRatingCircle(imdbRating, imdbId) {
if (imdbRating === 'N/A' || imdbRating === null || imdbRating === undefined) {
imdbRating = 'N/A';
}

if (imdbRating === 'N/A') {
imdbRating = imdbRating.toFixed(1);
else {
imdbRating = parseFloat(imdbRating);
if (!isNaN(imdbRating)) {
imdbRating = imdbRating.toFixed(1);
}
else {
imdbRating = 'N/A';
}
}

let circleContainer = document.getElementById('imdbRatingCircleContainer');
Expand Down

0 comments on commit e144c16

Please sign in to comment.