regupersonil.blade.php

mail@pastecode.io avatar
unknown
php_laravel_blade
2 years ago
30 kB
3
Indexable
Never
{{-- Extends layout --}}
@extends('layout.default')



{{-- Content --}}
@section('content')
<div class="container-fluid">
                <div class="page-titles">
					<ol class="breadcrumb">
						<li class="breadcrumb-item active"><a href="javascript:void(0)">Personil dan Regu</a></li>
					</ol>
                </div>
                <!-- row -->

                <div class="row">
                    <div class="col-lg-12">
                        @if (session('status'))
                            <div class="alert alert-success">
                                {{ session('status') }}
                            </div>
                        @endif
                    <div class="card">
                            <!-- <div class="card-header">
                                <h4 class="card-title">Regu dan Personil</h4>
                            </div> -->
                            <div class="card-body">
                                <!-- Nav tabs -->
                                <div class="default-tab">
                                    <ul class="nav nav-tabs" role="tablist">
                                        <li class="nav-item">
                                            <a class="nav-link active" data-toggle="tab" href="#personil"><i class="la la-user mr-2"></i>Personil</a>
                                        </li>
                                        <li class="nav-item">
                                            <a class="nav-link" data-toggle="tab" href="#regu"><i class="la la-group mr-2"></i>Regu</a>
                                        </li>
                                    </ul>
                                    <div class="tab-content">
                                        <div class="tab-pane fade show active" id="personil" role="tabpanel">
                                            <div class="pt-4">
                                                <div class="card">
                                                    <!-- MODAL TAMBAH -->
                                                        <button type="button" class="btn btn-primary mb-2" data-toggle="modal" data-target="#tambahModal">+ Tambah Personil</button>
                                                        <div class="modal fade bd-example-modal-lg" id="tambahModal" tabindex="-1" role="dialog" aria-hidden="true">
                                                            <div class="modal-dialog modal-lg">
                                                                <div class="modal-content">
                                                                    <div class="modal-header">
                                                                        <h5 class="modal-title">Tambah Data Personil</h5>
                                                                        <button type="button" class="close" data-dismiss="modal"><span>&times;</span>
                                                                        </button>
                                                                    </div>
                                                                    <div class="modal-body">
                                                                        <form name="form-create-personil" method="POST" action="{{route('createpersonil')}}">
                                                                            @csrf
                                                                            <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">Nama</label>
                                                                                <div class="col-sm-9">
                                                                                    <input name="nama" type="text" class="form-control" placeholder="Masukkan Nama Personil">
                                                                                </div>
                                                                            </div>
                                                                            <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">NIK</label>
                                                                                <div class="col-sm-9">
                                                                                    <input name="nik" type="text" oninput="this.value = this.value.toUpperCase()" class="form-control" placeholder="Masukkan NIK">
                                                                                </div>
                                                                            </div>
                                                                            <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">Jabatan</label>
                                                                                <div class="col-sm-9">
                                                                                    <select name="jabatan" class="form-control" id="jabatan">
                                                                                    <option value="penjaga">Penjaga</option>
                                                                                    <option value="kajaga">Kajaga</option>
                                                                                    <option value="wakajaga">Wakajaga</option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                            <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">Status</label>
                                                                                <div class="col-sm-9">
                                                                                    <select name="status" class="form-control" id="status">
                                                                                    <option value="bekerja">Bekerja</option>
                                                                                    <option value="ganti shift">Ganti Shift</option>
                                                                                    <option value="lembur">Lembur</option>
                                                                                    <option value="cuti">Cuti</option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                            <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">Regu</label>
                                                                                <div class="col-sm-9">
                                                                                    <select name="regu" class="form-control" id="sel1">
                                                                                    <option value="1">Regu A</option>
                                                                                    <option value="2">Regu B</option>
                                                                                    <option value="3">Regu C</option>
                                                                                    <option value="4">Regu D</option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                        
                                                                    </div>
                                                                            <div class="modal-footer">
                                                                                <button type="button" class="btn btn-danger light" data-dismiss="modal">Tutup</button>
                                                                                <button type="submit" class="btn btn-primary">Tambah</button>
                                                                            </div>
                                                                        </form>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <!-- MODAL TAMBAH END -->
                                                    <div class="card-body">
                                                        <div class="table-responsive">
                                                            <table id="example" class="display min-w850">
                                                                <thead>
                                                                    <tr>
                                                                        <th>Nama</th>
                                                                        <th>NIK</th>
                                                                        <th>Jabatan</th>
                                                                        <th>Zona</th>
                                                                        <th>Regu</th>
                                                                        <th>Status</th>
                                                                        <th>Aksi</th>
                                                                    </tr>
                                                                </thead>
                                                                <tbody>
                                                                @foreach($satpams as $value )    
                                                                    <tr>
                                                                        <td>{{$value->nama}}</td>
                                                                        <td>{{$value->nik}}</td>
                                                                        <td>{{$value->jabatan}}</td>
                                                                        <td>{{$value->zona->nama}}</td>
                                                                        <td>{{$value->regu->nama}}</td>
                                                                        <td>{{$value->status}}</td>
                                                                        <td><div class="d-flex">
                                                                        <button type="button" style="border:none;" data-toggle="modal" data-target="#editModal{{$value->id}}">
                                                                            <a href="#" data-id="{{$value->id}}" class="btn btn-primary shadow btn-xs sharp mr-1 btn-edit"><i class="fa fa-pencil"></i></a></button>
                                                                                <a href="#" class="btn btn-danger shadow btn-xs sharp"><i class="fa fa-trash"></i></a>
                                                                            </div>
                                                                        </td>
                                                                    </tr>
                                                                    <div class="modal fade bd-example-modal-lg" id="editModal{{$value->id}}" tabindex="-1" role="dialog" aria-hidden="true">
                                                                        <div class="modal-dialog modal-lg">
                                                                            <div class="modal-content">
                                                                                <div class="modal-header">
                                                                                    <h5 class="modal-title">Update Data Personil</h5>
                                                                                    <button type="button" class="close" data-dismiss="modal"><span>&times;</span>
                                                                                    </button>
                                                                                </div>
                                                                                <div class="modal-body">
                                                                                    <form name="form-update-personil" method="POST" action="/regupersonil/{{$value->id}}/update"}}>
                                                                                        @csrf
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">Nama</label>
                                                                                            <div class="col-sm-9">
                                                                                                
                                                                                                <input name="nama" value="{{ $value->nama }}" type="text" class="form-control" placeholder="Masukkan Nama Personil">
                                                                                            
                                                                                                <!-- <input name="nama" value="" type="text" class="form-control" placeholder="Masukkan Nama Personil"> -->
                                                                                            
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">NIK</label>
                                                                                            <div class="col-sm-9">
                                                                                                <input name="nik" value="{{ $value->nik }}" type="text" oninput="this.value = this.value.toUpperCase()" class="form-control" placeholder="Masukkan NIK">
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">wadadadada</label>
                                                                                            <div class="col-sm-9">
                                                                                                <textarea name="nikaa" type="text" class="form-control" placeholder="Masukkan NIK"></textarea>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">wawadaw33</label>
                                                                                            <div class="col-sm-9">
                                                                                                <select name="status" class="form-control" id="status">
                                                                                                    <option value="a">222</option>
                                                                                                    <option value="b">vas</option>
                                                                                                </select>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">Jabatan</label>
                                                                                            <div class="col-sm-9">
                                                                                                <select name="jabatan" class="form-control" id="jabatan_edit" >
                                                                                                <option value="penjaga"  {{ $value->jabatan == 'penjaga' ? 'selected' : '' }}>Penjaga</option>
                                                                                                <option value="kajaga"  {{ $value->jabatan == 'kajaga' ? 'selected' : '' }}>Kajaga</option>
                                                                                                <option value="wakajaga" {{ $value->jabatan == 'wakajaga' ? 'selected' : '' }}>Wakajaga</option>
                                                                                                </select>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">Status</label>
                                                                                            <div class="col-sm-9">
                                                                                                <select name="status" class="form-control" id="status_edit">
                                                                                                <option value="bekerja" @if ($value->status == 'bekerja') selected="selected" @endif>Bekerja</option>
                                                                                                <option value="ganti shift" @if ($value->status == 'ganti shift') selected="selected" @endif>Ganti Shift</option>
                                                                                                <option value="lembur" @if ($value->status == 'lembur') selected="selected" @endif>Lembur</option>
                                                                                                <option value="cuti" @if ($value->status == 'cuti') selected="selected" @endif>Cuti</option>
                                                                                                </select>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label class="col-sm-3 col-form-label">Regu</label>
                                                                                            <div class="col-sm-9">
                                                                                                <select name="regu" class="form-control" id="regu_edit">
                                                                                                <option value="1" @if ($value->regu_id == '1') selected="selected" @endif>Regu A</option>
                                                                                                <option value="2" @if ($value->regu_id == '2') selected="selected" @endif>Regu B</option>
                                                                                                <option value="3" @if ($value->regu_id == '3') selected="selected" @endif>Regu C</option>
                                                                                                <option value="4" @if ($value->regu_id == '4') selected="selected" @endif>Regu D</option>
                                                                                                </select>
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                <label class="col-sm-3 col-form-label">Regu</label>
                                                                                <div class="col-sm-9">
                                                                                    <select name="regu2" class="form-control" id="sel1">
                                                                                    <option value="1">Regu A</option>
                                                                                    <option value="2">Regu B</option>
                                                                                    <option value="3">Regu C</option>
                                                                                    <option value="4">Regu D</option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                                </div>
                                                                                        <div class="modal-footer">
                                                                                            <button type="button" class="btn btn-danger light" data-dismiss="modal">Tutup</button>
                                                                                            <button type="submit" id="button-edit" class="btn btn-primary">Ubah</button>
                                                                                        </div>
                                                                                    </form>
                                                                                <!-- </div> -->
                                                                                        
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                @endforeach
                                                                </tbody>
                                                            </table>
                                                        </div>    
                                                    </div>
                                                </div>
                                            </div>    
                                        </div>
                                        <div class="tab-pane fade" id="regu">
                                            <div class="pt-4">
                                                <div class="card">
                                                        <div class="card-header">
                                                            <h4 class="card-title">Basic</h4>
                                                        </div>
                                                        <div class="card-body">
                                                            <div class="table-responsive">
                                                                <table class="table table-responsive-sm">
                                                                    <thead>
                                                                        <tr>
                                                                            <th>#</th>
                                                                            <th>Name</th>
                                                                            <th>Status</th>
                                                                            <th>Date</th>
                                                                            <th>Price</th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                        <tr>
                                                                            <th>1</th>
                                                                            <td>Kolor Tea Shirt For Man</td>
                                                                            <td><span class="badge badge-primary light">Sale</span>
                                                                            </td>
                                                                            <td>January 22</td>
                                                                            <td class="color-primary">$21.56</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>2</th>
                                                                            <td>Kolor Tea Shirt For Women</td>
                                                                            <td><span class="badge badge-success">Tax</span>
                                                                            </td>
                                                                            <td>January 30</td>
                                                                            <td class="color-success">$55.32</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <th>3</th>
                                                                            <td>Blue Backpack For Baby</td>
                                                                            <td><span class="badge badge-danger">Extended</span>
                                                                            </td>
                                                                            <td>January 25</td>
                                                                            <td class="color-danger">$14.85</td>
                                                                        </tr>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
</div>
@endsection