<?= $this->extend('layouts/owner') ?>

<?= $this->section('content') ?>

<div class="container-fluid">

<div class="card">

<div class="card-header d-flex justify-content-between">

<h4>Data Supplier</h4>

<a href="<?= base_url('owner/supplier/create') ?>" class="btn btn-primary">

<i class="fas fa-plus"></i> Tambah Supplier

</a>

</div>

<div class="card-body">

<table class="table table-bordered table-striped">

<thead>

<tr>

<th width="60">No</th>

<th>Nama Supplier</th>

<th>Telepon</th>

<th>Alamat</th>

<th width="170">Aksi</th>

</tr>

</thead>

<tbody>

<?php $no=1; ?>

<?php foreach($suppliers as $row): ?>

<tr>

<td><?= $no++ ?></td>

<td><?= esc($row['nama_supplier']) ?></td>

<td><?= esc($row['telepon']) ?></td>

<td><?= esc($row['alamat']) ?></td>

<td>

<a href="<?= base_url('owner/supplier/edit/'.$row['id_supplier']) ?>" class="btn btn-warning btn-sm">

Edit

</a>

<a href="<?= base_url('owner/supplier/delete/'.$row['id_supplier']) ?>" class="btn btn-danger btn-sm" onclick="return confirm('Hapus supplier?')">

Hapus

</a>

</td>

</tr>

<?php endforeach ?>

</tbody>

</table>

</div>

</div>

</div>

<?= $this->endSection() ?>