Browse Source

update and fix conflict

master
ibnu 1 year ago
parent
commit
a050223f6b
  1. 4
      app/Http/Controllers/M_assetController.php
  2. 70
      resources/views/addons/SettingPlatform/manajement_asset.blade.php
  3. 4
      resources/views/addons/SettingPlatform/manajement_user.blade.php
  4. 1
      resources/views/layouts/link.blade.php
  5. 4
      resources/views/layouts/main.blade.php

4
app/Http/Controllers/M_assetController.php

@ -64,7 +64,7 @@ class M_assetController extends Controller
// Mendapatkan produk terbaru // Mendapatkan produk terbaru
$latestAsset = \App\Models\m_asset::latest()->first(); $latestAsset = \App\Models\m_asset::latest()->first();
// Mendapatkan tahun saat ini // Mendapatkan tahun saat ini
$currentYear = date("Y"); $currentYear = date("Y-m-d");
// Menghitung nomor urut untuk kode barang // Menghitung nomor urut untuk kode barang
if ($latestAsset == null) { if ($latestAsset == null) {
// Kode pertama // Kode pertama
@ -75,7 +75,7 @@ class M_assetController extends Controller
$nomorUrut = intval($lastCode) + 1; $nomorUrut = intval($lastCode) + 1;
} }
// Menggabungkan semua komponen kode barang // Menggabungkan semua komponen kode barang
$seri = 'AST' . $currentYear . str_pad($nomorUrut, STR_PAD_LEFT); $seri = 'AST' . $currentYear .'-'. str_pad($nomorUrut, STR_PAD_LEFT);
// Validasi input // Validasi input
$request->validate([ $request->validate([
'name' => 'required', 'name' => 'required',

70
resources/views/addons/SettingPlatform/manajement_asset.blade.php

@ -51,11 +51,11 @@
<th>Deskripsi</th> <th>Deskripsi</th>
<th>Gudang</th> <th>Gudang</th>
<th>Tanggal</th> <th>Tanggal</th>
<th>QR</th> <th>Jumlah QR Print</th>
<th class="text-center">Action</th> <th class="text-center">Action</th>
</tr> </tr>
</thead> </thead>
<tfoot> <!-- <tfoot>
<tr> <tr>
<th>No. Seri</th> <th>No. Seri</th>
<th>Nama</th> <th>Nama</th>
@ -65,7 +65,7 @@
<th>QR</th> <th>QR</th>
<th class="text-center">Action</th> <th class="text-center">Action</th>
</tr> </tr>
</tfoot> </tfoot> -->
<tbody> <tbody>
@foreach ($asset as $data) @foreach ($asset as $data)
<tr> <tr>
@ -76,10 +76,12 @@
<td>{{ \Carbon\Carbon::parse($data->date)->format('d-m-Y') }}</td> <td>{{ \Carbon\Carbon::parse($data->date)->format('d-m-Y') }}</td>
<td>{{ $data->qr_count }}</td> <td>{{ $data->qr_count }}</td>
<td class="text-center"> <td class="text-center">
<a href="#" data-toggle="modal"
data-target="#printQRModal{{ $data['id'] }}">
<i class="fa fa-qrcode text-warning mr-2" style="font-size: 20px"></i></a>
<a href="#" data-toggle="modal" <a href="#" data-toggle="modal"
data-target="#editDataModal{{ $data['id'] }}"> data-target="#editDataModal{{ $data['id'] }}">
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> <i class="fa fa-edit mr-2" style="font-size: 20px"></i></a>
</a>
<a href="{{ route('hapusAsset.destroy', $data->id) }}" <a href="{{ route('hapusAsset.destroy', $data->id) }}"
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')"> onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')">
<i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i> <i class="fa fa-trash text-danger mr-2" style="font-size: 20px"></i>
@ -201,4 +203,62 @@
</div> </div>
</div> </div>
@endforeach @endforeach
<!-- Modal Print QR Asset-->
@foreach ($asset as $data)
<div class="modal fade" id="printQRModal{{ $data['id'] }}" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Print QR Asset</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="{{ route('asset.update', $data->id) }}" method="POST"
enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="form-group">
<label for="name" class="col-form-label">Nama Asset:</label>
<input class="form-control" name="name" type="text" id="name"
value="{{ $data->name }}" placeholder="Masukan Nama Asset" required>
<label for="description" class="col-form-label">Deskripsi Asset:</label>
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Asset" required>{{ $data->description }}</textarea>
<label for="qr_count" class="col-form-label">QR_Count:</label>
<input class="form-control" name="qr_count" type="text" id="qr_count"
value="{{ $data->qr_count }}" placeholder="Masukan Kode QR"
onkeypress="return event.charCode >= 48 && event.charCode <= 57" required>
<label for="date" class="col-form-label">Tanggal:</label>
<input class="form-control" name="date" type="date" id="date"
value="{{ \Carbon\Carbon::parse($data->date)->format('Y-m-d') }}"
placeholder="Masukan Tanggal Asset" required>
<label for="warehouse_id" class="col-form-label">Gudang:</label>
<select class="form-control" name="warehouse_id" id="warehouse_id">
<option disabled selected>Pilih Asal Gudang</option>
@foreach ($warehouse as $data_warehouse)
<option value="{{ $data_warehouse->id }}"
@if ($data_warehouse->id == $data->warehouse_id) selected
@else @endif>
{{ $data_warehouse->name }}</option>
@endforeach
</select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
<button type="submit" class="btn btn-primary">Simpan</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endforeach
@endsection @endsection

4
resources/views/addons/SettingPlatform/manajement_user.blade.php

@ -18,9 +18,9 @@
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5> <h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5>
</div> </div>
<div class="col-6 text-right"> <div class="col-6 text-right">
{{--<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal"> <a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal">
<span class="text">+ Tambah data</span> <span class="text">+ Tambah data</span>
</a>--}} </a>
</div> </div>
</div> </div>
</div> </div>

1
resources/views/layouts/link.blade.php

@ -1,5 +1,6 @@
<!-- Custom fonts for this template--> <!-- Custom fonts for this template-->
<link href="{{ asset('assets/vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css"> <link href="{{ asset('assets/vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('assets/vendor/fontawesome-free/css/custom.min.css') }}" rel="stylesheet" type="text/css">\
<link rel="stylesheet" <link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"> href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
{{-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> --}} {{-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> --}}

4
resources/views/layouts/main.blade.php

@ -28,7 +28,7 @@
@include('layouts.navbar') @include('layouts.navbar')
<!-- Begin Page Content --> <!-- Begin Page Content -->
<!-- <div class="container-fluid"> --> <div class="container-fluid">
<!-- allert update data foto --> <!-- allert update data foto -->
{{-- @if (session()->has('success')) {{-- @if (session()->has('success'))
<div id="success-alert" class="alert alert-success floating-alert"> <div id="success-alert" class="alert alert-success floating-alert">
@ -50,7 +50,7 @@
@endif @endif
<!-- allert update data foto --> <!-- allert update data foto -->
@yield('content') @yield('content')
<!-- </div> --> </div>
<!-- /.container-fluid --> <!-- /.container-fluid -->
</div> </div>

Loading…
Cancel
Save