partial update create page opnames

This commit is contained in:
2025-06-03 12:56:33 +07:00
parent a881779c4f
commit 215792ce63
24 changed files with 4407 additions and 1542 deletions

View File

@@ -0,0 +1,20 @@
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
let tableContainer = $("#stock-mutations-table");
let url = tableContainer.data("url");
let table = $("#stock-mutations-table").DataTable({
processing: true,
serverSide: true,
ajax: url,
columns: [
{ data: "product_name", name: "product_name" },
{ data: "dealer_name", name: "dealer_name" },
{ data: "user_name", name: "user_name" },
{ data: "mutation_type_label", name: "mutation_type_label" },
{ data: "quantity", name: "quantity" },
{ data: "created_at", name: "created_at" },
],
});

View File

@@ -0,0 +1,21 @@
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
let tableContainer = $("#stock-opnames-table");
let url = tableContainer.data("url");
let table = $("#stock-opnames-table").DataTable({
processing: true,
serverSide: true,
ajax: url,
columns: [
{ data: "product_name", name: "product_name" },
{ data: "dealer_name", name: "dealer_name" },
{ data: "user_name", name: "user_name" },
{ data: "system_quantity", name: "system_quantity" },
{ data: "physical_quantity", name: "physical_quantity" },
{ data: "difference", name: "difference" },
{ data: "opname_date", name: "opname_date" },
],
});

View File

@@ -215,9 +215,9 @@
</li>
@endcan
@can('view', $menus['work.index'])
@can('view', $menus['mutations.index'])
<li class="kt-menu__item" aria-haspopup="true">
<a href="{{ route('work.index') }}" class="kt-menu__link">
<a href="{{ route('mutations.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

@@ -31,6 +31,14 @@
<input type="text" name="unit" id="unit" class="form-control" required>
</div>
<div class="form-group">
<label for="active"><strong>Status Produk</strong></label>
<select name="active" class="form-control" required>
<option value="1">Aktif</option>
<option value="0">Tidak Aktif</option>
</select>
</div>
<div class="form-group">
<label for="description"><strong>Deskripsi</strong></label>
<textarea name="description" id="description" class="form-control" rows="3"></textarea>

View File

@@ -44,5 +44,5 @@
@endsection
@section('javascripts')
<script src="{{mix('js/warehouse_management/products/index.js')}}"></script>
<script src="{{ mix('js/warehouse_management/products/index.js') }}"></script>
@endsection

View File

@@ -25,13 +25,14 @@
<div class="kt-portlet__body">
<div class="table-responsive">
<!--begin: Datatable -->
<table class="table table-striped table-bordered table-hover" id="mutations-table" data-url="{{ route("mutations.index") }}">
<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>User</th>
<th>Pengguna</th>
<th>Tipe Mutasi</th>
<th>Jumlah</th>
<th>Dibuat</th>
</tr>
</thead>

View File

@@ -0,0 +1,49 @@
@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-line-chart"></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('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