Template
initial commit yusron
This commit is contained in:
No files matched your search
@@ -0,0 +1,48 @@
|
||||
@extends('layouts.admin_master')
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table mr-1"></i>
|
||||
Dashboard
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row" id="card-pasien">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('script')
|
||||
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: "http://10.10.123.135:8083/api/v1/healthcare",
|
||||
type: 'GET',
|
||||
dataType: 'json', // added data type
|
||||
success: function(res) {
|
||||
let data = res.data
|
||||
$.each(data, function(index) {
|
||||
$('#card-pasien')
|
||||
.append(`<div class="col-xl-3 col-md-6">
|
||||
<div class="card bg-primary text-white mb-4">
|
||||
<div class="card-body">
|
||||
<h3>${data[index].id+10}</h3>
|
||||
${data[index].name}
|
||||
</div>
|
||||
<div class="card-footer d-flex align-items-center justify-content-between">
|
||||
<a class="small text-white stretched-link" href="{{ route('list.pasien') }}">View Details</a>
|
||||
<div class="small text-white"><i class="fas fa-angle-right"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user