334 lines
21 KiB
PHP
334 lines
21 KiB
PHP
|
<?php
|
||
|
function rupiah($angka){
|
||
|
|
||
|
$hasil_rupiah = "Rp " . number_format($angka,0,',','.');
|
||
|
return $hasil_rupiah;
|
||
|
|
||
|
}
|
||
|
?>
|
||
|
<!doctype html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<!-- Required meta tags -->
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
|
|
||
|
<!-- Bootstrap CSS -->
|
||
|
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||
|
<link rel="stylesheet" href="<?php echo base_url()?>assets/css/dataTables.bootstrap4.min.css">
|
||
|
<link data-require="sweet-alert@*" data-semver="0.4.2" rel="stylesheet" href="<?php echo base_url()?>assets/css/sweetalert.min.css" />
|
||
|
|
||
|
|
||
|
<link rel="icon" type="image/png" href="../../assets/images/favicon.png" />
|
||
|
|
||
|
<title>Aplikasi UMKM</title>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||
|
<div class="container">
|
||
|
<a class="navbar-brand" href="#">
|
||
|
<img src="../../assets/images/logo-white.png" width="100" alt="">
|
||
|
</a>
|
||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||
|
<span class="navbar-toggler-icon"></span>
|
||
|
</button>
|
||
|
|
||
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||
|
<ul class="navbar-nav mr-auto">
|
||
|
|
||
|
</ul>
|
||
|
<form methode="POST" action="../login/logout" class="form-inline my-2 my-lg-0" >
|
||
|
<button class="btn btn-outline-warning btn-sm my-2 my-sm-0" type="submit">Logout</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</nav>
|
||
|
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col-md-3" style="cursor:pointer;">
|
||
|
<div class="card" style="width: 18rem;">
|
||
|
<div class="card-header text-center">
|
||
|
<img src="../../assets/images/<?php echo $user_logged->foto_user ?>" width="125" /><br>
|
||
|
<strong><?php echo $user_logged->nama ?></strong>
|
||
|
</div>
|
||
|
<ul class="list-group list-group-flush">
|
||
|
<a href="<?php echo base_url('index.php/')?>user/dashboard" style="text-decoration:none;">
|
||
|
<li class="list-group-item border-bottom text-light active">Daftar UMKM</li>
|
||
|
</a>
|
||
|
<a href="<?php echo base_url('index.php/')?>user/setting" style="text-decoration:none;">
|
||
|
<li class="list-group-item text-dark">Setting</li>
|
||
|
</a>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-9" >
|
||
|
<div class="card">
|
||
|
<h5 class="card-header">Data UMKM</h5>
|
||
|
<div class="card-body">
|
||
|
<div>
|
||
|
<ul class="nav nav-tabs">
|
||
|
<li class="nav-item">
|
||
|
<a href="<?php echo base_url('index.php/')?>user/dashboard" class="nav-link">Daftar UMKM</a>
|
||
|
</li>
|
||
|
|
||
|
<li class="nav-item">
|
||
|
<a href="" class="nav-link active">
|
||
|
Detail Umkm > <strong><?php echo $umkm->nama ?></strong></a>
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<div class="mt-3">
|
||
|
|
||
|
<div class="row pr-2">
|
||
|
<div class="col col-md-4 pt-4">
|
||
|
<div class="form-group text-center">
|
||
|
<img src="../../assets/images/umkm/<?php echo $umkm->foto_umkm ?>" width="135" class="img-thumbnail mb-2" /><br>
|
||
|
<strong><?php echo $umkm->nama?></strong>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col col-md-8">
|
||
|
<div class="row pt-1 ml-2 mb-0 pb-0">
|
||
|
<strong>DATA TERKINI</strong>
|
||
|
</div>
|
||
|
<hr>
|
||
|
<div class="row">
|
||
|
<div class="col col-md-4">
|
||
|
<div class="card text-center">
|
||
|
<div class="card-header text-light bg-success">
|
||
|
TENAGA KERJA
|
||
|
</div>
|
||
|
<div class="card-body text-left">
|
||
|
<span class="badge badge-secondary">Laki-laki : <?php echo $karyawan_l?></span><br>
|
||
|
<span class="badge badge-secondary">Perempuan : <?php echo $karyawan_p?></span>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col col-md-4">
|
||
|
<div class="card text-center">
|
||
|
<div class="card-header bg-warning">
|
||
|
OMSET TAHUNAN
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<h6><?php echo rupiah($omset) ?></h6>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col col-md-4">
|
||
|
<div class="card text-center">
|
||
|
<div class="card-header text-light bg-info">
|
||
|
ASET TERAKHIR
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<h6><?php echo rupiah($aset) ?></h6>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col col-md-12">
|
||
|
<hr>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row pr-2">
|
||
|
<div class="col col-md-6">
|
||
|
|
||
|
<div class="row pb-2 pl-3">
|
||
|
<div class="col col-md-4 pl-2 pr-2">No Telp</div>
|
||
|
<div class="col col-md-1 pl-2 pr-2">:</div>
|
||
|
<div class="col col-md-7 pl-2 pr-2"><?php echo $umkm->telp?></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row pb-2 pl-3">
|
||
|
<div class="col col-md-4 pl-2 pr-2">Kategori</div>
|
||
|
<div class="col col-md-1 pl-2 pr-2">:</div>
|
||
|
<div class="col col-md-7 pl-2 pr-2"><?php echo $umkm->kategori?></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row pb-2 pl-3">
|
||
|
<div class="col col-md-4 pl-2 pr-2">Jenis</div>
|
||
|
<div class="col col-md-1 pl-2 pr-2">:</div>
|
||
|
<div class="col col-md-7 pl-2 pr-2"><?php echo $umkm->jenis?></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row pb-2 pl-3">
|
||
|
<div class="col col-md-4 pl-2 pr-2">Kelurahan</div>
|
||
|
<div class="col col-md-1 pl-2 pr-2">:</div>
|
||
|
<div class="col col-md-7 pl-2 pr-2"><?php echo $umkm->kelurahan?></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row pb-2 pl-3">
|
||
|
<div class="col col-md-4 pl-2 pr-2">Kecamatan</div>
|
||
|
<div class="col col-md-1 pl-2 pr-2">:</div>
|
||
|
<div class="col col-md-7 pl-2 pr-2"><?php echo $umkm->kecamatan?></div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="col col-md-6">
|
||
|
|
||
|
<div class="row pb-2">
|
||
|
<div class="col col-md-12">Alamat</div>
|
||
|
<div class="col col-md-12">
|
||
|
<textarea class="form-control" rows="1" disabled><?php echo $umkm->alamat?></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row pb-2">
|
||
|
<div class="col col-md-12">Deskripsi</div>
|
||
|
<div class="col col-md-12">
|
||
|
<textarea class="form-control" rows="2" disabled><?php echo $umkm->deskripsi?></textarea>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div class="col col-md-12">
|
||
|
<hr>
|
||
|
<ul class="nav nav-tabs">
|
||
|
<li class="nav-item">
|
||
|
<a href="<?php echo base_url('index.php/')?>user/detailumkm?id_umkm=<?php echo $umkm->id_umkm ?>" class="nav-link active">Absen</a>
|
||
|
</li>
|
||
|
<li class="nav-item">
|
||
|
<a href="<?php echo base_url('index.php/')?>user/riwayatabsensi?id_umkm=<?php echo $umkm->id_umkm ?>" class="nav-link">Riwayat Absen</a>
|
||
|
</li>
|
||
|
<li class="nav-item">
|
||
|
<a href="<?php echo base_url('index.php/')?>user/produk?id_umkm=<?php echo $umkm->id_umkm ?>" class="nav-link">Produk</a>
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
<hr>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="row mt-2">
|
||
|
<div class="col col-md-12">
|
||
|
<div class="card">
|
||
|
<div class="card-header bg-primary text-white">
|
||
|
Absen Aktif
|
||
|
</div>
|
||
|
<?php if($active_absen){?>
|
||
|
|
||
|
<div class="card-body">
|
||
|
<div class="row">
|
||
|
<div class="col col-auto">
|
||
|
<h5>Bulan <?php echo $bulan ?> Tahun <?php echo $data_absen->tahun ?></h5>
|
||
|
</div>
|
||
|
<div class="col text-right">
|
||
|
<?php if($absenisiaktif->signed==1){?>
|
||
|
<span class="badge badge-pill badge-success">Sudah Absen</span>
|
||
|
<?php }else{?>
|
||
|
<span class="badge badge-pill badge-warning text-dark">Belum Absen</span>
|
||
|
<?php } ?>
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr>
|
||
|
<div class="row">
|
||
|
<form action="" method="POST" class="needs-validation">
|
||
|
<div class="row pl-3">
|
||
|
|
||
|
<?php
|
||
|
if(isset($msg)){
|
||
|
if($msg=='success'){
|
||
|
?>
|
||
|
<div class="col col-md-12">
|
||
|
<div class="alert alert-success" role="alert">Absensi berhasil tersimpan !</div>
|
||
|
</div>
|
||
|
<?php
|
||
|
} else {
|
||
|
|
||
|
?>
|
||
|
<div class="col col-md-12">
|
||
|
<div class="alert alert-danger" role="alert">Absensi gagal !</div>
|
||
|
</div>
|
||
|
<?php
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
<div class="col col-md-6">
|
||
|
<input type="hidden" name='id_absensi' value="<?php echo $absenisiaktif->id_absensi ?>" readonly>
|
||
|
<div class="form-group">
|
||
|
<label for="aset">Aset Terkini</label>
|
||
|
<input type="number" name="aset" min="0" class="form-control" id="aset" placeholder="Aset terkini" value="<?php echo $absenisiaktif->aset ?>" required>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label for="omset">Omset Bulan Ini</label>
|
||
|
<input type="number" name="omset" min="0" class="form-control" id="omset" placeholder="Omset bulan ini" value="<?php echo $absenisiaktif->omset ?>" required>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col col-md-6">
|
||
|
<div class="form-group">
|
||
|
<label for="karyawan_l">Jumlah Tenaga Kerja (L)</label>
|
||
|
<input type="number" name="karyawan_l" class="form-control" min="0" id="karyawan_l" value="<?php echo $absenisiaktif->karyawan_l ?>" placeholder="Jumlah Karyawan laki-laki" required>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label for="karyawan_p">Jumlah Tenaga Kerja (P)</label>
|
||
|
<input type="number" name="karyawan_p" class="form-control" min="0" id="karyawan_p" value="<?php echo $absenisiaktif->karyawan_p ?>" placeholder="Jumlah Karyawan perempuan" required>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div class="col col-md-12">
|
||
|
<hr>
|
||
|
<button type="submit" class="btn btn-primary">Update Absen</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<?php } else {?>
|
||
|
<div class="card-body text-center">
|
||
|
<img src="<?php echo base_url()?>assets/images/search.png" width="150" /><br>
|
||
|
<div class="alert alert-warning" role="alert">
|
||
|
Tidak ada <strong>absen aktif</strong> saat ini.
|
||
|
</div>
|
||
|
<div>
|
||
|
<a href="<?php echo base_url('index.php/')?>admin/tambahabsen" class="btn btn-lg btn-success">Buat Absensi</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php } ?>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<!-- next -->
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<!-- Optional JavaScript -->
|
||
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||
|
<script src="<?php echo base_url()?>assets/js/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||
|
<script src="<?php echo base_url()?>assets/js/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||
|
<script src="<?php echo base_url()?>assets/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||
|
<script src="<?php echo base_url()?>assets/js/jquery.dataTables.min.js"></script>
|
||
|
<script src="<?php echo base_url()?>assets/js/dataTables.bootstrap4.min.js"></script>
|
||
|
<script src="<?php echo base_url()?>assets/js/sweetalert.min.js"></script>
|
||
|
|
||
|
<script>
|
||
|
$(document).ready(function() {
|
||
|
$('#tabeldata').DataTable();
|
||
|
} );
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|