diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 11bcb19..8db50d4 100755 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -20,6 +20,7 @@ + @@ -55,6 +56,7 @@ let page = 1; let canPageNext = false; let canPagePrevious = false; + let perPage = 15; $(document).ready(function () { clipboard.on('success', function (e) { @@ -77,7 +79,7 @@ async: true, beforeSend: function () { $("#table-url-address-body").html("\n" + - " \n" + " "); @@ -85,10 +87,10 @@ success: function (result) { rebuildPagination(result); if (result.data.length !== 0) { - $("#table-url-address-body").html(result.data.map(m => urlAddressRowComponent(m))); + $("#table-url-address-body").html(result.data.map((m, i) => urlAddressRowComponent(m, i))); } else { $("#table-url-address-body").html("\n" + - " \n" + " "); @@ -119,7 +121,7 @@ }); } - const urlAddressRowComponent = function (urlAddressData) { + const urlAddressRowComponent = function (urlAddressData, i) { let expiredStatus = ""; if (urlAddressData.date_expired != null && urlAddressData.date_expired !== "") { expiredStatus = ""; @@ -128,6 +130,7 @@ const destination = urlAddressData.full_url_destination; const generatedURL = "{{$url}}/s/" + urlAddressData.path_generated; const row = "\n" + + " \n" + " \n" + " \n" + " \n" +
No Destination Short URL Click
\n" + + " \n" + " \n" + "
\n" + + " \n" + " You don't have any shorten url address\n" + "
" + ((page !== 1 ? (page - 1) * perPage : 0) + (i + 1)) + "" + destination + "" + generatedURL + "" + urlAddressData.click + "