-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aliarmaganuygun
committed
Oct 20, 2024
1 parent
88a63ca
commit 23c4b67
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="card shadow border-0 my-4"> | ||
<div class="card-header bg-secondary bg-gradient ml-0 py-3"> | ||
<div class="row"> | ||
<div class="col-12 text-center"> | ||
<h2 class="text-white py-2">Order List</h2> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-body p-4"> | ||
<table id="tblData" class="table table-bordered table-striped" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>Id</th> | ||
<th>Name</th> | ||
<th>Phone Number</th> | ||
<th>Email</th> | ||
<th>Status</th> | ||
<th>Total</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
@section Scripts { | ||
<script src="~/js/order.js"></script> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var dataTable; | ||
$(document).ready(function () { | ||
loadDataTable(); | ||
}); | ||
|
||
function loadDataTable() { | ||
dataTable = $('#tblData').DataTable({ | ||
"ajax": { url: '/admin/order/getall' }, | ||
"columns": [ | ||
{ data: 'id', width: '5%' }, | ||
{ data: 'name', width: '15%' }, | ||
{ data: 'phoneNumber', width: '20%' }, | ||
{ data: 'applicationUser.email', width: '15%' }, | ||
{ data: 'orderStatus', width: '10%' }, | ||
{ data: 'orderTotal', width: '10%' }, | ||
{ | ||
data: 'id', | ||
"render": function (data) { | ||
return `<div class="w-75 btn-group" role="group"> | ||
<a href="/admin/order/details?id=${data}" class="btn btn-primary mx-2"><i class="bi bi-pencil-square"></i></a> | ||
</div>` | ||
}, | ||
width: '25%' | ||
} | ||
] | ||
}); | ||
} |