partial update opnames and detail table

This commit is contained in:
2025-06-04 18:29:05 +07:00
parent 8305e44c42
commit ff498cd98f
20 changed files with 864 additions and 174 deletions

View File

@@ -0,0 +1,18 @@
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
let tableContainer = $("#opnames-table");
let url = tableContainer.data("url");
let table = $("#opnames-table").DataTable({
processing: true,
serverSide: true,
ajax: url,
columns: [
{ data: "dealer_name", name: "dealer.name" },
{ data: "user_name", name: "user.name" },
{ data: "opname_date", name: "opname_date" },
{ data: "action", name: "action", orderable: false, searchable: false },
],
});

View File

@@ -215,9 +215,9 @@
</li>
@endcan
@can('view', $menus['mutations.index'])
@can('view', $menus['opnames.index'])
<li class="kt-menu__item" aria-haspopup="true">
<a href="{{ route('mutations.index') }}" class="kt-menu__link">
<a href="{{ route('opnames.index') }}" class="kt-menu__link">
<i class="fa fa-list" style="display: flex; align-items: center; margin-right: 10px;"></i>
<span class="kt-menu__link-text">Mutasi Produk</span>
</a>

View File

@@ -0,0 +1,46 @@
@extends('layouts.backapp')
@section('content')
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<span class="kt-portlet__head-icon">
<i class="kt-font-brand flaticon2-list-1"></i>
</span>
<h3 class="kt-portlet__head-title">
Tabel Opnames
</h3>
</div>
@can('create', $menus['product_categories.index'])
<div class="kt-portlet__head-toolbar">
<div class="kt-portlet__head-wrapper">
<div class="kt-portlet__head-actions">
<a href="{{ route('opnames.create') }}" class="btn btn-bold btn-label-brand btn--sm">Tambah</a>
</div>
</div>
</div>
@endcan
</div>
<div class="kt-portlet__body">
<div class="table-responsive">
<!--begin: Datatable -->
<table class="table table-striped table-bordered table-hover" id="opnames-table" data-url="{{ route("opnames.index") }}">
<thead>
<tr>
<th>Dealer</th>
<th>Pengguna</th>
<th>Tanggal Opname</th>
<th>Aksi</th>
</tr>
</thead>
</table>
<!--end: Datatable -->
</div>
</div>
</div>
@endsection
@section('javascripts')
<script src="{{ mix('js/warehouse_management/opnames/index.js') }}"></script>
@endsection

View File

@@ -1,48 +0,0 @@
@extends('layouts.backapp')
@section('content')
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<span class="kt-portlet__head-icon">
<i class="kt-font-brand flaticon2-list-1"></i>
</span>
<h3 class="kt-portlet__head-title">
Tabel Mutasi Stock Produk
</h3>
</div>
{{-- @can('create', $menus['mutations.index'])
<div class="kt-portlet__head-toolbar">
<div class="kt-portlet__head-wrapper">
<div class="kt-portlet__head-actions">
<a href="{{ route('products.create') }}" class="btn btn-bold btn-label-brand btn--sm">Tambah</a>
</div>
</div>
</div>
@endcan --}}
</div>
<div class="kt-portlet__body">
<div class="table-responsive">
<!--begin: Datatable -->
<table class="table table-striped table-bordered table-hover" id="stock-mutations-table" data-url="{{ route("mutations.index") }}">
<thead>
<tr>
<th>Produk</th>
<th>Dealer</th>
<th>Pengguna</th>
<th>Tipe Mutasi</th>
<th>Jumlah</th>
<th>Dibuat</th>
</tr>
</thead>
</table>
<!--end: Datatable -->
</div>
</div>
</div>
@endsection
@section('javascripts')
<script src="{{mix('js/warehouse_management/stock_mutations/index.js')}}"></script>
@endsection

View File

@@ -1,56 +0,0 @@
@extends('layouts.backapp')
@section('content')
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<span class="kt-portlet__head-icon">
<i class="kt-font-brand flaticon2-plus"></i>
</span>
<h3 class="kt-portlet__head-title">
Tambah Opname
</h3>
</div>
</div>
<div class="kt-portlet__body">
<form action="{{ route('opnames.store') }}" method="POST" id="opnameForm">
@csrf
<div class="form-group">
<label for="product"><strong>Produk</strong></label>
<input type="text" class="form-control" name="product" />
</div>
<div class="form-group">
<label for="dealer"><strong>Dealer</strong></label>
<input type="text" class="form-control" name="dealer" />
</div>
<div class="form-group">
<label for="system_quantity"><strong>Total Sistem</strong></label>
<input type="number" class="form-control" name="system_quantity" />
</div>
<div class="form-group">
<label for="phisycal_quantity"><strong>Total Sistem</strong></label>
<input type="number" class="form-control" name="phisycal_quantity" />
</div>
<div class="form-group">
<label for="difference"><strong>Perbedaan</strong></label>
<input type="number" class="form-control" name="difference" />
</div>
<div class="form-group mt-4">
<button type="submit" class="btn btn-primary">Simpan</button>
<a href="{{ route('opnames.index') }}" class="btn btn-secondary">Batal</a>
</div>
</form>
</div>
</div>
@endsection
@section('javascripts')
<script src="{{mix('js/warehouse_management/stock_opnames/create.js')}}"></script>
@endsection

View File

@@ -1,49 +0,0 @@
@extends('layouts.backapp')
@section('content')
<div class="kt-portlet kt-portlet--mobile" id="kt_blockui_datatable">
<div class="kt-portlet__head kt-portlet__head--lg">
<div class="kt-portlet__head-label">
<span class="kt-portlet__head-icon">
<i class="kt-font-brand flaticon2-list-1"></i>
</span>
<h3 class="kt-portlet__head-title">
Tabel Stock Opname
</h3>
</div>
@can('create', $menus['opnames.index'])
<div class="kt-portlet__head-toolbar">
<div class="kt-portlet__head-wrapper">
<div class="kt-portlet__head-actions">
<a href="{{ route('opnames.create') }}" class="btn btn-bold btn-label-brand btn--sm">Tambah</a>
</div>
</div>
</div>
@endcan
</div>
<div class="kt-portlet__body">
<div class="table-responsive">
<!--begin: Datatable -->
<table class="table table-striped table-bordered table-hover" id="stock-opnames-table" data-url="{{ route("opnames.index") }}">
<thead>
<tr>
<th>Produk</th>
<th>Dealer</th>
<th>Pengguna</th>
<th>Total Sistem</th>
<th>Total Fisik</th>
<th>Perbedaan</th>
<th>Tanggal Opname</th>
</tr>
</thead>
</table>
<!--end: Datatable -->
</div>
</div>
</div>
@endsection
@section('javascripts')
<script src="{{mix('js/warehouse_management/stock_opnames/index.js')}}"></script>
@endsection