Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadarif03 committed Nov 20, 2024
1 parent c476db2 commit 735ade9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,13 @@ class="img-fluid mb-n3" />
},
dataType: "json",
success: function(response) {
$.each(response.data, function(index, value) {
$('#tags').html(`<a href="#">#${value.name}</a>`);
});
if (response.data.length > 0) {
$.each(response.data, function(index, value) {
$('#tags').html(`<a href="#">#${value.name}</a>`);
});
} else {
$('#tags').append(empty());
}
},
error: function(xhr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function getCourse(page) {
dataType: "json",
success: function(response) {
$('#list-course').empty();
if (response.data.data.length > 0) {
response.data.data.forEach(data => {
renderPagination(response.data.paginate.last_page, response.data.paginate
Expand All @@ -35,7 +34,6 @@ function(page) {
});
}
function cardCourse(data) {
const statusText = data.study_percentage === 100 ? "SELESAI" : "PROSES";
var url = "{{ config('app.api_url') }}";
Expand Down

0 comments on commit 735ade9

Please sign in to comment.