<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = 'Data Perumahan';
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="card card-primary card-outline card-tabs">
  <div class="card-header p-0 pt-1">
    <ul class="nav nav-tabs" id="custom-tabs-one-tab" role="tablist">
      <li class="nav-item">
        <a class="nav-link active" id="tab-data-toko" data-toggle="pill" href="#pane-data-toko" role="tab" aria-controls="pane-data-toko" aria-selected="true">Data Toko</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="tab-metode-pembayaran" data-toggle="pill" href="#pane-metode-pembayaran" role="tab" aria-controls="pane-metode-pembayaran" aria-selected="false">Metode Pembayaran</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="tab-pajak" data-toggle="pill" href="#pane-pajak" role="tab" aria-controls="pane-pajak" aria-selected="false">PPN / Pajak</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="tab-template-nota" data-toggle="pill" href="#pane-template-nota" role="tab" aria-controls="pane-template-nota" aria-selected="false">Template Nota</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="tab-pdf-struk" data-toggle="pill" href="#pane-pdf-struk" role="tab" aria-controls="pane-pdf-struk" aria-selected="false">PDF / Struk</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" id="tab-hak-akses" data-toggle="pill" href="#pane-hak-akses" role="tab" aria-controls="pane-hak-akses" aria-selected="false">Hak Akses</a>
      </li>
    </ul>
  </div>
  
  <div class="card-body">
    <div class="tab-content" id="custom-tabs-one-tabContent">
      
      <!-- TAB 1: Data Toko -->
      <div class="tab-pane fade show active" id="pane-data-toko" role="tabpanel" aria-labelledby="tab-data-toko">
        <?= Yii::$app->session->getFlash('success'); ?>
        <?php $form = ActiveForm::begin(); ?>
        <div class="row">
          <div class="col-md-6">
            <?= $form->field($model, 'vNama')->label('Nama Perumahan') ?>
            <?= $form->field($model, 'vIPL')->label('Nilai Iuran IPL per Bulan') ?>
            <?= $form->field($model, 'idCluster')->label('Kode Perumahan') ?>
            <?= $form->field($model, 'vKota')->label('Kota / Kabupaten') ?>
            <?= $form->field($model, 'vProvinsi')->label('Provinsi') ?>
          </div>
          <div class="col-md-6">
            <?= $form->field($model, 'noSK')->label('No. Rekening IPL') ?>
            <?= $form->field($model, 'vAlamat')->label('Alamat Perumahan') ?>
            <?= $form->field($model, 'vMisiVisi')->label('Jumlah Rumah') ?>
            <?= $form->field($model, 'vLokasi')->label('Lokasi GoogleMaps') ?>
          </div>
        </div>
        <div class="form-group mt-2">
          <?= Html::a('Kembali', ['index'], ['class' => 'btn btn-secondary']) ?>
          <?= Html::submitButton('Simpan', ['class' => 'btn btn-primary']) ?>
        </div>
        <?php ActiveForm::end(); ?>
      </div>
      
      <!-- TAB 2: Metode Pembayaran -->
      <div class="tab-pane fade" id="pane-metode-pembayaran" role="tabpanel" aria-labelledby="tab-metode-pembayaran">
        <p>Disini bisa ditampilkan tabel metode pembayaran, tombol tambah/edit/hapus, dsb.</p>
      </div>

      <!-- TAB 3: PPN / Pajak -->
      <div class="tab-pane fade" id="pane-pajak" role="tabpanel" aria-labelledby="tab-pajak">
        <p>Pengaturan PPN / Pajak, misal persen default, aktif/nonaktif.</p>
      </div>

      <!-- TAB 4: Template Nota -->
      <div class="tab-pane fade" id="pane-template-nota" role="tabpanel" aria-labelledby="tab-template-nota">
        <p>Pilih template nota, preview, kustomisasi layout header/footer.</p>
      </div>

      <!-- TAB 5: PDF / Struk -->
      <div class="tab-pane fade" id="pane-pdf-struk" role="tabpanel" aria-labelledby="tab-pdf-struk">
        <p>Pengaturan PDF / Struk: ukuran kertas, margin, font, header/footer.</p>
      </div>

      <!-- TAB 6: Hak Akses -->
      <div class="tab-pane fade" id="pane-hak-akses" role="tabpanel" aria-labelledby="tab-hak-akses">
        <p>Pengaturan hak akses user: admin, kasir, supervisor, dsb.</p>
      </div>

    </div>
  </div>
</div>
