unknown
1 year ago
70 changed files with 2150 additions and 1156 deletions
@ -0,0 +1,52 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreateCustomer extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:50', |
||||
'code_customer' => 'required|string|max:15|unique:customers,code_customer', |
||||
'lot_no' => 'required|string|max:50', |
||||
'no_tlp' => 'required|numeric', |
||||
'address' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Kolom name wajib diisi.', |
||||
'name.string' => 'Kolom name harus berupa teks.', |
||||
'name.max' => 'Kolom name tidak boleh lebih dari :max karakter.', |
||||
'code_customer.required' => 'Kolom code_customer wajib diisi.', |
||||
'code_customer.string' => 'Kolom code_customer harus berupa teks.', |
||||
'code_customer.max' => 'Kolom code_customer tidak boleh lebih dari :max karakter.', |
||||
'code_customer.unique' => 'Kolom code_customer sudah ada.', |
||||
'lot_no.required' => 'Kolom lot_no wajib diisi.', |
||||
'lot_no.string' => 'Kolom lot_no harus berupa teks.', |
||||
'no_tlp.required' => 'Kolom no_tlp wajib diisi.', |
||||
'no_tlp.numeric' => 'Kolom no_tlp harus berisi angka.', |
||||
'no_tlp.max' => 'Kolom no_tlp tidak boleh lebih dari :max karakter.', |
||||
'address.required' => 'Kolom address wajib diisi.', |
||||
'address.string' => 'Kolom address harus berupa teks.', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,60 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreatePeti extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'tipe_peti_id' => 'required|exists:type_petis,id', |
||||
'warna' => 'required|string|max:50', |
||||
'customer_id' => 'required|exists:customers,id', |
||||
'warehouse_id' => 'required|exists:m_warehouses,id', |
||||
'jumlah' => 'required|numeric|min:1', |
||||
'date_pembuatan' => 'required|date', |
||||
'status_disposal' => 'nullable|string', |
||||
'packing_no' => 'nullable|integer', |
||||
'fix_lot' => 'nullable|string|max:100', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'tipe_peti_id.required' => 'Tipe Peti harus diisi', |
||||
'tipe_peti_id.exists' => 'Tipe Peti tidak ditemukan', |
||||
'warna.required' => 'Warna harus diisi', |
||||
'warna.string' => 'Warna harus berupa string', |
||||
'warna.max' => 'Warna maksimal 50 karakter', |
||||
'customer_id.required' => 'Customer harus diisi', |
||||
'customer_id.exists' => 'Customer tidak ditemukan', |
||||
'warehouse_id.required' => 'Warehouse harus diisi', |
||||
'warehouse_id.exists' => 'Warehouse tidak ditemukan', |
||||
'jumlah.required' => 'Jumlah harus diisi', |
||||
'jumlah.numeric' => 'Jumlah harus berupa angka', |
||||
'jumlah.min' => 'Jumlah minimal 1', |
||||
'date_pembuatan.required' => 'Tanggal Pembuatan harus diisi', |
||||
'date_pembuatan.date' => 'Tanggal Pembuatan harus berupa tanggal', |
||||
'status_disposal.string' => 'Status Disposal harus berupa string', |
||||
'packing_no.integer' => 'Packing No harus berupa angka', |
||||
'fix_lot.string' => 'Fix Lot harus berupa string', |
||||
'fix_lot.max' => 'Fix Lot maksimal 100 karakter', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreateRole extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:50', |
||||
'description' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Nama Role harus diisi', |
||||
'name.string' => 'Nama Role harus berupa string', |
||||
'name.max' => 'Nama Role maksimal 50 karakter', |
||||
'description.required' => 'Deskripsi harus diisi', |
||||
'description.string' => 'Deskripsi harus berupa string', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,44 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreateType_Peti extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'type' => 'required|string|max:20', |
||||
'size_peti' => 'required|string|max:25', |
||||
'description' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'type.required' => 'Type Peti tidak boleh kosong', |
||||
'type.string' => 'Type Peti harus berupa string', |
||||
'type.max' => 'Type Peti maksimal 20 karakter', |
||||
'size_peti.required' => 'Size Peti tidak boleh kosong', |
||||
'size_peti.string' => 'Size Peti harus berupa string', |
||||
'size_peti.max' => 'Size Peti maksimal 25 karakter', |
||||
'description.required' => 'Deskripsi tidak boleh kosong', |
||||
'description.string' => 'Deskripsi harus berupa string', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,78 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreateUser extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'username' => 'required|string|max:32', |
||||
'fullname' => 'required|string|max:32', |
||||
'nip' => 'nullable|numeric|max:20', |
||||
'email' => 'required|email|string|max:45', |
||||
'no_hp' => 'nullable|numeric|max:15', |
||||
'divisi' => 'nullable|string|max:50', |
||||
'foto' => 'nullable|string|max:255', |
||||
'role_id' => 'required|exists:m_roles,id', |
||||
'warehouse_id' => 'nullable|exists:m_warehouses,id', |
||||
'address' => 'nullable|string', |
||||
'email_verified_at' => 'nullable|date', |
||||
'password' => 'required|string|min:6|max:16', |
||||
'created_by' => 'nullable|string|max:32', |
||||
'updated_by' => 'nullable|string|max:32', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'username.required' => 'Kolom username wajib diisi.', |
||||
'username.string' => 'Kolom username harus berupa teks.', |
||||
'username.max' => 'Kolom username tidak boleh lebih dari :max karakter.', |
||||
'fullname.required' => 'Kolom fullname wajib diisi.', |
||||
'fullname.string' => 'Kolom fullname harus berupa teks.', |
||||
'fullname.max' => 'Kolom fullname tidak boleh lebih dari :max karakter.', |
||||
'nip.numeric' => 'Kolom NIP harus berisi angka.', |
||||
'nip.max' => 'Kolom NIP tidak boleh lebih dari :max karakter.', |
||||
'email.required' => 'Kolom email wajib diisi.', |
||||
'email.email' => 'Format email tidak valid.', |
||||
'email.string' => 'Kolom email harus berupa teks.', |
||||
'email.max' => 'Kolom email tidak boleh lebih dari :max karakter.', |
||||
'no_hp.numeric' => 'Kolom no_hp harus berisi angka.', |
||||
'no_hp.max' => 'Kolom no_hp tidak boleh lebih dari :max karakter.', |
||||
'divisi.string' => 'Kolom divisi harus berupa teks.', |
||||
'divisi.max' => 'Kolom divisi tidak boleh lebih dari :max karakter.', |
||||
'foto.string' => 'Kolom foto harus berupa teks.', |
||||
'foto.max' => 'Kolom foto tidak boleh lebih dari :max karakter.', |
||||
'role_id.required' => 'Kolom role_id wajib diisi.', |
||||
'role_id.exists' => 'Role yang dipilih tidak valid.', |
||||
'warehouse_id.exists' => 'Warehouse yang dipilih tidak valid.', |
||||
'address.string' => 'Kolom address harus berupa teks.', |
||||
'email_verified_at.date' => 'Format tanggal email_verified_at tidak valid.', |
||||
'password.required' => 'Kolom password wajib diisi.', |
||||
'password.string' => 'Kolom password harus berupa teks.', |
||||
'password.min' => 'Kolom password minimal harus :min karakter.', |
||||
'password.max' => 'Kolom password tidak boleh lebih dari :max karakter.', |
||||
'created_by.string' => 'Kolom created_by harus berupa teks.', |
||||
'created_by.max' => 'Kolom created_by tidak boleh lebih dari :max karakter.', |
||||
'updated_by.string' => 'Kolom updated_by harus berupa teks.', |
||||
'updated_by.max' => 'Kolom updated_by tidak boleh lebih dari :max karakter.', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,45 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiCreateWarehouse extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:32', |
||||
'description' => 'required|string|max:255', |
||||
'address' => 'required|string|max:255', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Kolom nama wajib diisi.', |
||||
'name.string' => 'Kolom nama harus berupa teks.', |
||||
'name.max' => 'Kolom nama tidak boleh lebih dari :max karakter.', |
||||
'description.required' => 'Kolom deskripsi wajib diisi.', |
||||
'description.string' => 'Kolom deskripsi harus berupa teks.', |
||||
'description.max' => 'Kolom deskripsi tidak boleh lebih dari :max karakter.', |
||||
'address.required' => 'Kolom alamat wajib diisi.', |
||||
'address.string' => 'Kolom alamat harus berupa teks.', |
||||
'address.max' => 'Kolom alamat tidak boleh lebih dari :max karakter.', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,52 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdateCustomer extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:50', |
||||
'code_customer' => 'required|string|max:15|unique:customers,code_customer', |
||||
'lot_no' => 'required|string|max:50', |
||||
'no_tlp' => 'required|numeric', |
||||
'address' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Kolom name wajib diisi.', |
||||
'name.string' => 'Kolom name harus berupa teks.', |
||||
'name.max' => 'Kolom name tidak boleh lebih dari :max karakter.', |
||||
'code_customer.required' => 'Kolom code_customer wajib diisi.', |
||||
'code_customer.string' => 'Kolom code_customer harus berupa teks.', |
||||
'code_customer.max' => 'Kolom code_customer tidak boleh lebih dari :max karakter.', |
||||
'code_customer.unique' => 'Kolom code_customer sudah ada.', |
||||
'lot_no.required' => 'Kolom lot_no wajib diisi.', |
||||
'lot_no.string' => 'Kolom lot_no harus berupa teks.', |
||||
'no_tlp.required' => 'Kolom no_tlp wajib diisi.', |
||||
'no_tlp.numeric' => 'Kolom no_tlp harus berisi angka.', |
||||
'no_tlp.max' => 'Kolom no_tlp tidak boleh lebih dari :max karakter.', |
||||
'address.required' => 'Kolom address wajib diisi.', |
||||
'address.string' => 'Kolom address harus berupa teks.', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,59 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdatePeti extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'tipe_peti_id' => 'required|exists:type_petis,id', |
||||
'warna' => 'required|string|max:50', |
||||
'customer_id' => 'required|exists:customers,id', |
||||
'warehouse_id' => 'required|exists:m_warehouses,id', |
||||
'date_pembuatan' => 'required|date', |
||||
'status_disposal' => 'nullable|string', |
||||
'packing_no' => 'nullable|integer', |
||||
'fix_lot' => 'nullable|string|max:100', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'tipe_peti_id.required' => 'Tipe Peti harus diisi', |
||||
'tipe_peti_id.exists' => 'Tipe Peti tidak ditemukan', |
||||
'warna.required' => 'Warna harus diisi', |
||||
'warna.string' => 'Warna harus berupa string', |
||||
'warna.max' => 'Warna maksimal 50 karakter', |
||||
'customer_id.required' => 'Customer harus diisi', |
||||
'customer_id.exists' => 'Customer tidak ditemukan', |
||||
'warehouse_id.required' => 'Warehouse harus diisi', |
||||
'warehouse_id.exists' => 'Warehouse tidak ditemukan', |
||||
'jumlah.required' => 'Jumlah harus diisi', |
||||
'jumlah.numeric' => 'Jumlah harus berupa angka', |
||||
'jumlah.min' => 'Jumlah minimal 1', |
||||
'date_pembuatan.required' => 'Tanggal Pembuatan harus diisi', |
||||
'date_pembuatan.date' => 'Tanggal Pembuatan harus berupa tanggal', |
||||
'status_disposal.string' => 'Status Disposal harus berupa string', |
||||
'packing_no.integer' => 'Packing No harus berupa angka', |
||||
'fix_lot.string' => 'Fix Lot harus berupa string', |
||||
'fix_lot.max' => 'Fix Lot maksimal 100 karakter', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,40 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdateRole extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:50', |
||||
'description' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Nama Role harus diisi', |
||||
'name.string' => 'Nama Role harus berupa string', |
||||
'name.max' => 'Nama Role maksimal 50 karakter', |
||||
'description.required' => 'Deskripsi harus diisi', |
||||
'description.string' => 'Deskripsi harus berupa string', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,44 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdateType_Peti extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'type' => 'required|string|max:20', |
||||
'size_peti' => 'required|string|max:25', |
||||
'description' => 'required|string', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'type.required' => 'Type Peti tidak boleh kosong', |
||||
'type.string' => 'Type Peti harus berupa string', |
||||
'type.max' => 'Type Peti maksimal 20 karakter', |
||||
'size_peti.required' => 'Size Peti tidak boleh kosong', |
||||
'size_peti.string' => 'Size Peti harus berupa string', |
||||
'size_peti.max' => 'Size Peti maksimal 25 karakter', |
||||
'description.required' => 'Deskripsi tidak boleh kosong', |
||||
'description.string' => 'Deskripsi harus berupa string', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,78 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdateUser extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'username' => 'required|string|max:32', |
||||
'fullname' => 'required|string|max:32', |
||||
'nip' => 'nullable|numeric|max:20', |
||||
'email' => 'required|email|string|max:45', |
||||
'no_hp' => 'nullable|numeric|max:15', |
||||
'divisi' => 'nullable|string|max:50', |
||||
'foto' => 'nullable|string|max:255', |
||||
'role_id' => 'required|exists:m_roles,id', |
||||
'warehouse_id' => 'nullable|exists:m_warehouses,id', |
||||
'address' => 'nullable|string', |
||||
'email_verified_at' => 'nullable|date', |
||||
'password' => 'required|string|min:6|max:16', |
||||
'created_by' => 'nullable|string|max:32', |
||||
'updated_by' => 'nullable|string|max:32', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'username.required' => 'Kolom username wajib diisi.', |
||||
'username.string' => 'Kolom username harus berupa teks.', |
||||
'username.max' => 'Kolom username tidak boleh lebih dari :max karakter.', |
||||
'fullname.required' => 'Kolom fullname wajib diisi.', |
||||
'fullname.string' => 'Kolom fullname harus berupa teks.', |
||||
'fullname.max' => 'Kolom fullname tidak boleh lebih dari :max karakter.', |
||||
'nip.numeric' => 'Kolom NIP harus berisi angka.', |
||||
'nip.max' => 'Kolom NIP tidak boleh lebih dari :max karakter.', |
||||
'email.required' => 'Kolom email wajib diisi.', |
||||
'email.email' => 'Format email tidak valid.', |
||||
'email.string' => 'Kolom email harus berupa teks.', |
||||
'email.max' => 'Kolom email tidak boleh lebih dari :max karakter.', |
||||
'no_hp.numeric' => 'Kolom no_hp harus berisi angka.', |
||||
'no_hp.max' => 'Kolom no_hp tidak boleh lebih dari :max karakter.', |
||||
'divisi.string' => 'Kolom divisi harus berupa teks.', |
||||
'divisi.max' => 'Kolom divisi tidak boleh lebih dari :max karakter.', |
||||
'foto.string' => 'Kolom foto harus berupa teks.', |
||||
'foto.max' => 'Kolom foto tidak boleh lebih dari :max karakter.', |
||||
'role_id.required' => 'Kolom role_id wajib diisi.', |
||||
'role_id.exists' => 'Role yang dipilih tidak valid.', |
||||
'warehouse_id.exists' => 'Warehouse yang dipilih tidak valid.', |
||||
'address.string' => 'Kolom address harus berupa teks.', |
||||
'email_verified_at.date' => 'Format tanggal email_verified_at tidak valid.', |
||||
'password.required' => 'Kolom password wajib diisi.', |
||||
'password.string' => 'Kolom password harus berupa teks.', |
||||
'password.min' => 'Kolom password minimal harus :min karakter.', |
||||
'password.max' => 'Kolom password tidak boleh lebih dari :max karakter.', |
||||
'created_by.string' => 'Kolom created_by harus berupa teks.', |
||||
'created_by.max' => 'Kolom created_by tidak boleh lebih dari :max karakter.', |
||||
'updated_by.string' => 'Kolom updated_by harus berupa teks.', |
||||
'updated_by.max' => 'Kolom updated_by tidak boleh lebih dari :max karakter.', |
||||
]; |
||||
} |
||||
} |
@ -0,0 +1,45 @@
|
||||
<?php |
||||
|
||||
namespace App\Http\Requests; |
||||
|
||||
use Illuminate\Foundation\Http\FormRequest; |
||||
|
||||
class ValidasiUpdateWarehouse extends FormRequest |
||||
{ |
||||
/** |
||||
* Determine if the user is authorized to make this request. |
||||
*/ |
||||
public function authorize(): bool |
||||
{ |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* Get the validation rules that apply to the request. |
||||
* |
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
||||
*/ |
||||
public function rules(): array |
||||
{ |
||||
return [ |
||||
'name' => 'required|string|max:32', |
||||
'description' => 'required|string|max:255', |
||||
'address' => 'required|string|max:255', |
||||
]; |
||||
} |
||||
|
||||
public function messages() |
||||
{ |
||||
return [ |
||||
'name.required' => 'Kolom nama wajib diisi.', |
||||
'name.string' => 'Kolom nama harus berupa teks.', |
||||
'name.max' => 'Kolom nama tidak boleh lebih dari :max karakter.', |
||||
'description.required' => 'Kolom deskripsi wajib diisi.', |
||||
'description.string' => 'Kolom deskripsi harus berupa teks.', |
||||
'description.max' => 'Kolom deskripsi tidak boleh lebih dari :max karakter.', |
||||
'address.required' => 'Kolom alamat wajib diisi.', |
||||
'address.string' => 'Kolom alamat harus berupa teks.', |
||||
'address.max' => 'Kolom alamat tidak boleh lebih dari :max karakter.', |
||||
]; |
||||
} |
||||
} |
@ -1,84 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
|
||||
<head> |
||||
<style> |
||||
#customers { |
||||
font-family: Arial, Helvetica, sans-serif; |
||||
border-collapse: collapse; |
||||
width: 100%; |
||||
} |
||||
|
||||
#customers td, |
||||
#customers th { |
||||
border: 1px solid #ddd; |
||||
padding: 8px; |
||||
} |
||||
|
||||
#customers tr:nth-child(even) { |
||||
background-color: #f2f2f2; |
||||
} |
||||
|
||||
#customers tr:hover { |
||||
background-color: #ddd; |
||||
} |
||||
|
||||
#customers th { |
||||
padding-top: 12px; |
||||
padding-bottom: 12px; |
||||
text-align: left; |
||||
background-color: #4aa2dd; |
||||
color: white; |
||||
} |
||||
</style> |
||||
</head> |
||||
|
||||
<body> |
||||
|
||||
{{-- <h1>Laporan Keuangan</h1> --}} |
||||
<h1 class="text-gray-800">Tabel Asset</h1> |
||||
<div class="mb-3"> |
||||
<p>Our Item Tables are enhanced with the help of the DataTables plugin. This is a powerful tool that allows you |
||||
to explore return data in a more interactive and efficient way</p> |
||||
</div> |
||||
<table id="customers"> |
||||
<thead> |
||||
<tr> |
||||
<th>No. Seri</th> |
||||
<th>Nama</th> |
||||
<th>Deskripsi</th> |
||||
<th>Gudang</th> |
||||
<th>Tanggal</th> |
||||
<th>QR</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@forelse ($asset as $data) |
||||
<tr> |
||||
<td>{{ $data->seri }}</td> |
||||
<td>{{ $data->name }}</td> |
||||
<td>{{ $data->description }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td>{{ \Carbon\Carbon::parse($data->date)->format('d-m-Y') }}</td> |
||||
<td>{{ $data->qr_count }}</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
<tfoot> |
||||
<tr> |
||||
<th>No. Seri</th> |
||||
<th>Nama</th> |
||||
<th>Deskripsi</th> |
||||
<th>Gudang</th> |
||||
<th>Tanggal</th> |
||||
<th>QR</th> |
||||
</tr> |
||||
</tfoot> |
||||
|
||||
</table> |
||||
|
||||
</body> |
||||
|
||||
</html> |
@ -1,231 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('title', 'Setting Platform') |
||||
@section('content') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Asset</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="#" class="btn btn-success btn-icon-split" data-toggle="modal" data-target="#tambahDataModal"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
<a href="{{ route('dashboard.assetcetakpdf.cetakpdf') }}" class="btn btn-success btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Cetak PDF</span> |
||||
</a> |
||||
<a href="{{ route('dashboard.assetexport.export') }}" class="btn btn-info btn-icon-split ml-auto" |
||||
target="_blank"> |
||||
<span class="text">Cetak Exel</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No. Seri</th> |
||||
<th>Nama</th> |
||||
<th>Deskripsi</th> |
||||
<th>Gudang</th> |
||||
<th>Tanggal</th> |
||||
<th>Jumlah QR Print</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@foreach ($asset as $data) |
||||
<tr> |
||||
<td>{{ $data->seri }}</td> |
||||
<td>{{ $data->name }}</td> |
||||
<td>{{ $data->description }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td>{{ \Carbon\Carbon::parse($data->date)->format('d-m-Y') }}</td> |
||||
<td class="text-center"> |
||||
{!! QrCode::size(80)->generate(route('dashboard.asset.show', $data->id)) !!} |
||||
</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.asset.show', $data->id) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="#" data-toggle="modal" data-target="#editDataModal{{ $data->id }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.asset.destroy', $data->id) }}" method="POST" |
||||
style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@endforeach |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Modal Tambah Asset--> |
||||
<div class="modal fade" id="tambahDataModal" 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">Tambah Data</h5> |
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
||||
<span aria-hidden="true">×</span> |
||||
</button> |
||||
</div> |
||||
<div class="modal-body"> |
||||
<form action="{{ route('dashboard.asset.store') }}" method="POST" enctype="multipart/form-data"> |
||||
@csrf |
||||
<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="{{ old('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>{{ old('description') }}</textarea> |
||||
|
||||
<label for="warehouse_id" class="col-form-label">Gudang:</label> |
||||
<select class="form-control" name="warehouse_id" type="text" id="warehouse_id"> |
||||
<option disabled selected>Pilih Asal Gudang</option> |
||||
@foreach ($warehouse as $data) |
||||
<option value="{{ $data->id }}">{{ $data->name }}</option> |
||||
@endforeach |
||||
</select> |
||||
|
||||
<label for="date" class="col-form-label">Tanggal:</label> |
||||
<input class="form-control" name="date" type="date" id="date" |
||||
value="{{ old('date') }}" placeholder="Masukan Tanggal Asset" required> |
||||
</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> |
||||
|
||||
<!-- Modal Edit Asset--> |
||||
@foreach ($asset as $data) |
||||
<div class="modal fade" id="editDataModal{{ $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">Edit Data Asset</h5> |
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
||||
<span aria-hidden="true">×</span> |
||||
</button> |
||||
</div> |
||||
<div class="modal-body"> |
||||
<form action="{{ route('dashboard.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="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 |
||||
|
||||
<!-- 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">×</span> |
||||
</button> |
||||
</div> |
||||
<div class="modal-body"> |
||||
<form action="{{ route('dashboard.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 |
@ -1,65 +0,0 @@
|
||||
@extends('layouts.main') |
||||
@section('title', 'Setting Platform') |
||||
@section('content') |
||||
<div class="container-fluid"> |
||||
|
||||
<div class="card"> |
||||
<div class="card-body"> |
||||
<h1 class="h3 mb-1 text-gray-800 mb-3">Detail Asset</h1> |
||||
<hr class="border"> |
||||
<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="{{ $asset->name }}" |
||||
placeholder="Masukan Nama Asset" required readonly> |
||||
|
||||
<label for="description" class="col-form-label">Deskripsi Asset:</label> |
||||
<textarea class="form-control" name="description" id="description" placeholder="Masukkan Deskripsi Asset" required |
||||
readonly>{{ $asset->description }}</textarea> |
||||
|
||||
<label for="qr_count" class="col-form-label">QR:</label> |
||||
<div> |
||||
{!! QrCode::size(75)->generate( |
||||
'Name: ' . |
||||
$asset->name . |
||||
"\n" . |
||||
'ID Asset: ' . |
||||
$asset->id . |
||||
"\n" . |
||||
'Description: ' . |
||||
$asset->description . |
||||
"\n" . |
||||
'QR Code: ' . |
||||
$asset->qr_count . |
||||
"\n" . |
||||
'Date: ' . |
||||
\Carbon\Carbon::parse($asset->date)->format('d-m-Y') . |
||||
"\n" . |
||||
'Name WH: ' . |
||||
$asset->warehouse->name . |
||||
"\n" . |
||||
'ID WH: ' . |
||||
$asset->warehouse_id, |
||||
) !!} |
||||
</div> |
||||
|
||||
<label for="date" class="col-form-label">Tanggal:</label> |
||||
<input class="form-control" name="date" type="date" id="date" |
||||
value="{{ \Carbon\Carbon::parse($asset->date)->format('Y-m-d') }}" |
||||
placeholder="Masukan Tanggal Asset" required readonly> |
||||
|
||||
<label for="warehouse_id" class="col-form-label">Gudang:</label> |
||||
<select class="form-control" name="warehouse_id" id="warehouse_id" disabled> |
||||
<option disabled selected>Pilih Asal Gudang</option> |
||||
@foreach ($warehouse as $data_warehouse) |
||||
<option value="{{ $data_warehouse->id }}" |
||||
@if ($data_warehouse->id == $asset->warehouse_id) selected |
||||
@else @endif> |
||||
{{ $data_warehouse->name }}</option> |
||||
@endforeach |
||||
</select> |
||||
</div> |
||||
<a href="{{ route('dashboard.asset.index') }}" class="btn btn-primary ">Kembali</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,67 +1,72 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.customer.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
@include('layouts.components.alert-prompt') |
||||
@if (auth()->user()->role_id == 1) |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Customer</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.customer.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center">No</th> |
||||
<th>Nama</th> |
||||
<th>Kode Customer</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$nocustomer = 1; |
||||
@endphp |
||||
@forelse ($customer as $data_customer) |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<td class="text-center">{{ $nocustomer++ }}</td> |
||||
<td>{{ $data_customer->name }}</td> |
||||
<td>{{ $data_customer->code_customer }}</td> |
||||
<td>{{ $data_customer->no_hp }}</td> |
||||
<td>{{ $data_customer->address }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.customer.show', [$data_customer->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.customer.edit', [$data_customer->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.customer.destroy', $data_customer->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
<th class="text-center">No</th> |
||||
<th>Nama</th> |
||||
<th>Kode Customer</th> |
||||
<th>No. Telepon</th> |
||||
<th>Alamat</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$nocustomer = 1; |
||||
@endphp |
||||
@forelse ($customer as $data_customer) |
||||
<tr> |
||||
<td class="text-center">{{ $nocustomer++ }}</td> |
||||
<td>{{ $data_customer->name }}</td> |
||||
<td>{{ $data_customer->code_customer }}</td> |
||||
<td>{{ $data_customer->no_tlp }}</td> |
||||
<td>{{ $data_customer->address }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.customer.show', [$data_customer->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.customer.edit', [$data_customer->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.customer.destroy', $data_customer->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@else |
||||
@include('pages.user.Master_Data.Customer.index') |
||||
@endif |
||||
@endsection |
||||
|
@ -1,65 +1,70 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Tipe Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">Tambah Tipe Peti</span> |
||||
</a> |
||||
@include('layouts.components.alert-prompt') |
||||
@if (auth()->user()->role_id == 1) |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Tipe Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">Tambah Tipe Peti</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 20px">No</th> |
||||
<th>Tipe Peti</th> |
||||
<th>Ukuran Peti</th> |
||||
<th>Deskripsi Peti</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$notype = 1; |
||||
@endphp |
||||
@forelse ($typepeti as $data_typepeti) |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<td class="text-center">{{ $notype++ }}</td> |
||||
<td>{{ $data_typepeti->type }}</td> |
||||
<td>{{ $data_typepeti->size_peti }}</td> |
||||
<td>{{ $data_typepeti->description }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.typepeti.show', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.typepeti.edit', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.typepeti.destroy', $data_typepeti->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
<th class="text-center" style="width: 20px">No</th> |
||||
<th>Tipe Peti</th> |
||||
<th>Ukuran Peti</th> |
||||
<th>Deskripsi Peti</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$notype = 1; |
||||
@endphp |
||||
@forelse ($typepeti as $data_typepeti) |
||||
<tr> |
||||
<td class="text-center">{{ $notype++ }}</td> |
||||
<td>{{ $data_typepeti->type }}</td> |
||||
<td>{{ $data_typepeti->size_peti }}</td> |
||||
<td>{{ $data_typepeti->description }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.typepeti.show', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.typepeti.edit', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.typepeti.destroy', $data_typepeti->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@else |
||||
@include('pages.user.Master_Data.Manajemen_Peti.Type_peti.index') |
||||
@endif |
||||
@endsection |
||||
|
@ -1,80 +1,85 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.user.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
@include('layouts.components.alert-prompt') |
||||
@if (auth()->user()->role_id == 1) |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.user.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tfoot> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</tfoot> |
||||
<tbody> |
||||
@php |
||||
$noUser = 1; |
||||
@endphp |
||||
@forelse ($user as $data) |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<td class="text-center">{{ $noUser++ }}</td> |
||||
<td>{{ $data->fullname }}</td> |
||||
<td>{{ $data->email }}</td> |
||||
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td> |
||||
<td>{{ isset($data->address) ? $data->address : '-' }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.user.show', [$data->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.user.edit', [$data->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.user.destroy', $data->id) }}" method="POST" |
||||
style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</thead> |
||||
<tfoot> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</tfoot> |
||||
<tbody> |
||||
@php |
||||
$noUser = 1; |
||||
@endphp |
||||
@forelse ($user as $data) |
||||
<tr> |
||||
<td class="text-center">{{ $noUser++ }}</td> |
||||
<td>{{ $data->fullname }}</td> |
||||
<td>{{ $data->email }}</td> |
||||
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td> |
||||
<td>{{ isset($data->address) ? $data->address : '-' }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.user.show', [$data->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.user.edit', [$data->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.user.destroy', $data->id) }}" method="POST" |
||||
style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@else |
||||
@include('pages.user.Master_Data.User.index') |
||||
@endif |
||||
@endsection |
||||
|
@ -0,0 +1,26 @@
|
||||
@if ($errors->any()) |
||||
<div class="alert alert-danger"> |
||||
<ul> |
||||
@foreach ($errors->all() as $error) |
||||
<li>{{ $error }}</li> |
||||
@endforeach |
||||
</ul> |
||||
</div> |
||||
@endif |
||||
|
||||
@if (Session::has('success')) |
||||
<div class="alert alert-success alert-dismissible fade show" role="alert"> |
||||
<strong>{{ Session::get('success') }}</strong> |
||||
</div> |
||||
@endif |
||||
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> |
||||
<script> |
||||
$(document).ready(function() { |
||||
setTimeout(function() { |
||||
$(".alert.alert-danger, .alert.alert-success").fadeOut(500, function() { |
||||
$(this).remove(); |
||||
}); |
||||
}, 5000); // 5 detik |
||||
}); |
||||
</script> |
@ -0,0 +1,91 @@
|
||||
<!-- Sidebar - Brand --> |
||||
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ route('dashboard.home.user') }}"> |
||||
<div class="sidebar-brand-icon rotate-n-15"> |
||||
<i class="fas fa-laugh-wink"></i> |
||||
</div> |
||||
<div class="sidebar-brand-text mx-3">SIOPAS</div> |
||||
</a> |
||||
|
||||
<!-- Divider --> |
||||
<hr class="sidebar-divider my-0"> |
||||
<!-- Nav Item - Dashboard --> |
||||
<li class="nav-item {{ $active == 'menu-user' ? 'active' : '' }}"> |
||||
<a class="nav-link" href="{{ route('dashboard.home.user') }}"> |
||||
<i class="fas fa-fw fa-tachometer-alt"></i> |
||||
<span>Dashboard</span></a> |
||||
</li> |
||||
|
||||
<!-- Divider --> |
||||
<hr class="sidebar-divider"> |
||||
|
||||
<li class="nav-item {{ $active == 'menu-peminjaman' ? 'active' : '' }}"> |
||||
<a class="nav-link" href="{{ route('dashboard.peminjaman.index') }}"> |
||||
<i class="fas fa-fw fa-upload"></i> |
||||
<span>Peminjaman</span> |
||||
</a> |
||||
</li> |
||||
<li class="nav-item {{ $active == 'menu-pengembalian' ? 'active' : '' }}"> |
||||
<a class="nav-link" href="{{ route('dashboard.pengembalian.index') }}"> |
||||
<i class="fas fa-fw fa-download"></i> |
||||
<span>Pengembalian</span> |
||||
</a> |
||||
</li> |
||||
|
||||
<!-- Divider --> |
||||
<hr class="sidebar-divider"> |
||||
|
||||
<!-- Heading --> |
||||
<div class="sidebar-heading"> |
||||
Master Data |
||||
</div> |
||||
|
||||
@php |
||||
$isUserActive = in_array($active, ['menu-user', 'menu-role']); |
||||
@endphp |
||||
|
||||
<li class="nav-item"> |
||||
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" |
||||
aria-expanded="{{ $isUserActive ? 'true' : 'false' }}" aria-controls="collapseTwo"> |
||||
<i class="fas fa-fw fa-user"></i> |
||||
<span>Manajemen User</span> |
||||
</a> |
||||
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar"> |
||||
<div class="bg-white py-2 collapse-inner rounded"> |
||||
<a class="collapse-item {{ $active == 'menu-user' ? 'active' : '' }}" |
||||
href="{{ route('dashboard.user.index') }}">User</a> |
||||
<a class="collapse-item {{ $active == 'menu-role' ? 'active' : '' }}" |
||||
href="{{ route('dashboard.role.index') }}">Role</a> |
||||
</div> |
||||
</div> |
||||
</li> |
||||
<li class="nav-item {{ $active == 'menu-customer' ? 'active' : '' }}"> |
||||
<a class="nav-link" href="{{ route('dashboard.customer.index') }}"> |
||||
<i class="fas fa-fw fa-users"></i> |
||||
<span>Customer</span> |
||||
</a> |
||||
</li> |
||||
@php |
||||
$isPetiActive = in_array($active, ['menu-user', 'menu-role']); |
||||
@endphp |
||||
|
||||
<li class="nav-item"> |
||||
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsepeti" |
||||
aria-expanded="{{ $isPetiActive ? 'true' : 'false' }}" aria-controls="collapsepeti"> |
||||
<i class="fas fa-fw fa-user"></i> |
||||
<span>Manajemen Peti</span> |
||||
</a> |
||||
<div id="collapsepeti" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar"> |
||||
<div class="bg-white py-2 collapse-inner rounded"> |
||||
<a class="collapse-item {{ $active == 'menu-typepeti' ? 'active' : '' }}" |
||||
href="{{ route('dashboard.typepeti.index') }}">Tipe Peti</a> |
||||
<a class="collapse-item {{ $active == 'menu-peti' ? 'active' : '' }}" |
||||
href="{{ route('dashboard.peti.index') }}">Peti</a> |
||||
</div> |
||||
</div> |
||||
</li> |
||||
<li class="nav-item {{ $active == 'menu-warehouse' ? 'active' : '' }}"> |
||||
<a class="nav-link" href="{{ route('dashboard.warehouse.index') }}"> |
||||
<i class="fas fa-fw fa-table"></i> |
||||
<span>Warehouse</span> |
||||
</a> |
||||
</li> |
@ -0,0 +1,64 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Customer</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.customer.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">+ Tambah data</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center">No</th> |
||||
<th>Nama</th> |
||||
<th>Kode Customer</th> |
||||
<th>No. Telepon</th> |
||||
<th>Alamat</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$nocustomer = 1; |
||||
@endphp |
||||
@forelse ($customer as $data_customer) |
||||
<tr> |
||||
<td class="text-center">{{ $nocustomer++ }}</td> |
||||
<td>{{ $data_customer->name }}</td> |
||||
<td>{{ $data_customer->code_customer }}</td> |
||||
<td>{{ $data_customer->no_tlp }}</td> |
||||
<td>{{ $data_customer->address }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.customer.show', [$data_customer->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.customer.edit', [$data_customer->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.customer.destroy', $data_customer->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,76 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.peti.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">Tambah Peti</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 10px">No</th> |
||||
<th>User</th> |
||||
<th>Customer</th> |
||||
<th>WH</th> |
||||
<th>Kode Customer</th> |
||||
<th>Tipe Peti</th> |
||||
<th>Ukuran Peti</th> |
||||
<th>Lot No</th> |
||||
<th>Status Peti</th> |
||||
<th>Packing No</th> |
||||
<th>Fix Lot</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$nopeti = 1; |
||||
@endphp |
||||
@forelse ($peti as $data_peti) |
||||
<tr> |
||||
<td class="text-center">{{ $nopeti++ }}</td> |
||||
<td>{{ $data_peti->created_by }}</td> |
||||
<td>{{ $data_peti->customer->name }}</td> |
||||
<td>{{ $data_peti->warehouse->name }}</td> |
||||
<td>{{ $data_peti->customer->code_customer }}</td> |
||||
<td>{{ $data_peti->tipe_peti->type }}</td> |
||||
<td>{{ $data_peti->tipe_peti->size_peti }}</td> |
||||
<td>{{ $data_peti->customer->lot_no }}</td> |
||||
<td>{{ $data_peti->status_disposal }}</td> |
||||
<td class="text-right">{{ $data_peti->packing_no }}</td> |
||||
<td>{{ $data_peti->fix_lot }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.peti.show', [$data_peti->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.peti.edit', [$data_peti->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.peti.destroy', $data_peti->id) }}" method="POST" |
||||
style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,62 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Tipe Peti</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.typepeti.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">Tambah Tipe Peti</span> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 20px">No</th> |
||||
<th>Tipe Peti</th> |
||||
<th>Ukuran Peti</th> |
||||
<th>Deskripsi Peti</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$notype = 1; |
||||
@endphp |
||||
@forelse ($typepeti as $data_typepeti) |
||||
<tr> |
||||
<td class="text-center">{{ $notype++ }}</td> |
||||
<td>{{ $data_typepeti->type }}</td> |
||||
<td>{{ $data_typepeti->size_peti }}</td> |
||||
<td>{{ $data_typepeti->description }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.typepeti.show', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<a href="{{ route('dashboard.typepeti.edit', [$data_typepeti->id]) }}"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.typepeti.destroy', $data_typepeti->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,34 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Role</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px;">No</th> |
||||
<th>Nama Role</th> |
||||
<th>Deskripsi</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$norole = 1; |
||||
@endphp |
||||
@foreach ($role as $data_role) |
||||
<tr> |
||||
<td class="text-center">{{ $norole++ }}</td> |
||||
<td>{{ $data_role->name }}</td> |
||||
<td>{{ $data_role->description }}</td> |
||||
</tr> |
||||
@endforeach |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,59 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data User</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tfoot> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Nama</th> |
||||
<th>Email</th> |
||||
<th>No. HP</th> |
||||
<th>Alamat</th> |
||||
<th>Ditugaskan</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</tfoot> |
||||
<tbody> |
||||
@php |
||||
$noUser = 1; |
||||
@endphp |
||||
@forelse ($user as $data) |
||||
<tr> |
||||
<td class="text-center">{{ $noUser++ }}</td> |
||||
<td>{{ $data->fullname }}</td> |
||||
<td>{{ $data->email }}</td> |
||||
<td>{{ isset($data->no_hp) ? $data->no_hp : '-' }}</td> |
||||
<td>{{ isset($data->address) ? $data->address : '-' }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.user.show', [$data->id]) }}"> |
||||
<i class="fa fa-eye mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,37 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Gudang</h5> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center" style="width: 50px;">No.</th> |
||||
<th>Nama Gudang</th> |
||||
<th>Deskripsi</th> |
||||
<th>Alamat</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$nowarehouses = 1; |
||||
@endphp |
||||
@foreach ($warehouses as $data) |
||||
<tr> |
||||
<td class="text-center" style="width: 50px;">{{ $nowarehouses++ }}</td> |
||||
<td>{{ $data->name }}</td> |
||||
<td>{{ $data->description }}</td> |
||||
<td>{{ $data->address }}</td> |
||||
</tr> |
||||
@endforeach |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
@ -0,0 +1,65 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<div class="row"> |
||||
<div class="col-6"> |
||||
<h5 class="m-0 font-weight-bold text-primary mt-2">Data Peminjaman</h5> |
||||
</div> |
||||
<div class="col-6 text-right"> |
||||
<a href="{{ route('dashboard.peminjaman.create') }}" class="btn btn-success btn-icon-split"> |
||||
<span class="text">Tambah Peminjaman</span> |
||||
</a> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th class="text-center">No</th> |
||||
<th>Kode Peti</th> |
||||
<th>Nama Customer</th> |
||||
<th>Tgl Peminjaman</th> |
||||
<th>PJ Peminjaman</th> |
||||
<th>Asal Gudang</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$no_peminjaman = 1; |
||||
@endphp |
||||
@forelse ($peminjaman as $data_peminjaman) |
||||
<tr> |
||||
<td class="text-center">{{ $no_peminjaman++ }}</td> |
||||
<td>{{ $data_peminjaman->peti->customer->code_customer }} - |
||||
{{ $data_peminjaman->peti->tipe_peti->type }}</td> |
||||
<td>{{ $data_peminjaman->peti->customer->name }}</td> |
||||
<td>{{ \Carbon\Carbon::parse($data_peminjaman->exit_at)->format('d/m/Y') }}</td> |
||||
<td>{{ $data_peminjaman->exit_pic }}</td> |
||||
<td>{{ $data_peminjaman->warehouse->name }}</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.peminjaman.edit', $data_peminjaman->id) }}" title="Edit"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
<form action="{{ route('dashboard.peminjaman.destroy', $data_peminjaman->id) }}" |
||||
method="POST" style="display: inline;"> |
||||
@csrf |
||||
@method('DELETE') |
||||
<button type="submit" |
||||
onclick="return confirm('Apakah Anda yakin ingin menghapus data ini?')" |
||||
title="Delete" style="border: none; background: none; cursor: pointer;"> |
||||
<i class="fa fa-trash text-danger" style="font-size: 20px"></i> |
||||
</button> |
||||
</form> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,88 @@
|
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3"> |
||||
<h6 class="m-0 font-weight-bold text-primary">Data Pengembalian</h6> |
||||
</div> |
||||
<div class="card-body"> |
||||
<div class="table-responsive"> |
||||
<table class="table table-bordered" id="tablebarang" width="100%" cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th>No</th> |
||||
<th>Kode Peti</th> |
||||
<th>Tgl Peinjaman</th> |
||||
<th>Estimasi Pengembalian</th> |
||||
<th>PJ Peminjaman</th> |
||||
<th>Asal WH Peminjaman</th> |
||||
<th>Tgl Pengembalian</th> |
||||
<th>PJ Pengembalian</th> |
||||
<th>Tujuan WH Pengembalian</th> |
||||
<th>Kondisi Peti</th> |
||||
<th>Status</th> |
||||
<th class="text-center">Action</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
@php |
||||
$no_peminjaman = 1; |
||||
@endphp |
||||
{{-- @foreach ($peminjaman as $data) |
||||
|
||||
@endforeach --}} |
||||
@forelse ($peminjaman as $data) |
||||
<tr> |
||||
<td>{{ $no_peminjaman++ }}</td> |
||||
<td>{{ $data->peti->customer->code_customer }} - |
||||
{{ $data->peti->tipe_peti->type }}</td> |
||||
<td>{{ \Carbon\Carbon::parse($data->exit_at)->format('d/m/Y') }}</td> |
||||
<td>{{ \Carbon\Carbon::parse($data->est_pengembalian)->format('d/m/Y') }}</td> |
||||
<td>{{ $data->exit_pic }}</td> |
||||
<td>{{ $data->warehouse->name }}</td> |
||||
<td> |
||||
@if ($data->enter_at) |
||||
{{ \Carbon\Carbon::parse($data->enter_at)->format('d-m-Y') }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_pic) |
||||
{{ $data->enter_pic }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_warehouse) |
||||
{{ $data->warehouse->name }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->kondisi_peti) |
||||
{{ $data->kondisi_peti }} |
||||
@else |
||||
<p class="text-center font-weight-bold">-</p> |
||||
@endif |
||||
</td> |
||||
<td> |
||||
@if ($data->enter_warehouse === null) |
||||
Not Return |
||||
@else |
||||
Return |
||||
@endif |
||||
</td> |
||||
<td class="text-center"> |
||||
<a href="{{ route('dashboard.pengembalian.edit', [$data->id]) }}" title="Edit"> |
||||
<i class="fa fa-edit mr-2" style="font-size: 20px"></i> |
||||
</a> |
||||
</td> |
||||
</tr> |
||||
@empty |
||||
<p>Data Kosong</p> |
||||
@endforelse |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
</div> |
||||
</div> |
@ -0,0 +1,194 @@
|
||||
@extends('layouts.main') |
||||
@section('content') |
||||
<div class="d-sm-flex align-items-center justify-content-between mb-4"> |
||||
<h1 class="h3 mb-0 text-gray-800">Dashboard</h1> |
||||
</div> |
||||
<div class="row"> |
||||
<div class="col-xl-3 col-md-6 mb-4"> |
||||
<div class="card border-left-primary shadow h-100 py-2"> |
||||
<div class="card-body"> |
||||
<div class="row no-gutters align-items-center"> |
||||
<div class="col mr-2"> |
||||
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1" style="font-size: 14px;"> |
||||
<strong>Pengadaan</strong> |
||||
</div> |
||||
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
||||
{{ $jumlahAsset }} |
||||
</div> |
||||
</div> |
||||
<div class="col-auto"> |
||||
<i class="fas fa-clipboard-list fa-2x text-gray-300"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Earnings (Monthly) Card Example --> |
||||
<div class="col-xl-3 col-md-6 mb-4"> |
||||
<div class="card border-left-success shadow h-100 py-2"> |
||||
<div class="card-body"> |
||||
<div class="row no-gutters align-items-center"> |
||||
<div class="col mr-2"> |
||||
<div class="text-xs font-weight-bold text-success text-uppercase mb-1" style="font-size: 14px;"> |
||||
<strong>Peminjaman</strong> |
||||
</div> |
||||
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
||||
{{ $jumlahPeminjaman }}</div> |
||||
</div> |
||||
<div class="col-auto"> |
||||
<i class="fas fa-dollar-sign fa-2x text-gray-300"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Earnings (Monthly) Card Example --> |
||||
<div class="col-xl-3 col-md-6 mb-4"> |
||||
<div class="card border-left-info shadow h-100 py-2"> |
||||
<div class="card-body"> |
||||
<div class="row no-gutters align-items-center"> |
||||
<div class="col mr-2"> |
||||
<div class="text-xs font-weight-bold text-info text-uppercase mb-1" style="font-size: 14px;"> |
||||
<strong>Pengembalian</strong> |
||||
</div> |
||||
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
||||
{{ $jumlahPengembalian }}</div> |
||||
</div> |
||||
<div class="col-auto"> |
||||
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- Pending Requests Card Example --> |
||||
<div class="col-xl-3 col-md-6 mb-4"> |
||||
<div class="card border-left-warning shadow h-100 py-2"> |
||||
<div class="card-body"> |
||||
<div class="row no-gutters align-items-center"> |
||||
<div class="col mr-2"> |
||||
<div class="text-xs font-weight-bold text-warning text-uppercase mb-1" style="font-size: 13px;"> |
||||
<strong>Reminder Pengembalian</strong> |
||||
</div> |
||||
<div class="h5 mb-0 font-weight-bold text-gray-800" style="font-size: 25px;"> |
||||
{{ $reminder }}</div> |
||||
</div> |
||||
<div class="col-auto"> |
||||
<i class="fas fa-calendar fa-2x text-gray-300"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="col-xl-8 col-lg-7"> |
||||
<div class="card shadow mb-4"> |
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
||||
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6> |
||||
<div class="dropdown no-arrow"> |
||||
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" |
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
||||
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> |
||||
</a> |
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" |
||||
aria-labelledby="dropdownMenuLink"> |
||||
<div class="dropdown-header">Dropdown Header:</div> |
||||
<a class="dropdown-item" href="#">Action</a> |
||||
<a class="dropdown-item" href="#">Another action</a> |
||||
<div class="dropdown-divider"></div> |
||||
<a class="dropdown-item" href="#">Something else here</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@php |
||||
$chartData = app('App\Http\Controllers\HomeController')->generateChartData(); |
||||
@endphp |
||||
|
||||
<div class="card-body"> |
||||
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> <!-- Atur tinggi chart --> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
|
||||
<!-- Pie Chart --> |
||||
<div class="col-xl-4 col-lg-5"> |
||||
<div class="card shadow mb-4"> |
||||
<!-- Card Header - Dropdown --> |
||||
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
||||
<h6 class="m-0 font-weight-bold text-primary">Grafik Pengadaan Barang</h6> |
||||
<div class="dropdown no-arrow"> |
||||
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" |
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
||||
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> |
||||
</a> |
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" |
||||
aria-labelledby="dropdownMenuLink"> |
||||
<div class="dropdown-header">Dropdown Header:</div> |
||||
<a class="dropdown-item" href="#">Action</a> |
||||
<a class="dropdown-item" href="#">Another action</a> |
||||
<div class="dropdown-divider"></div> |
||||
<a class="dropdown-item" href="#">Something else here</a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<!-- Card Body --> |
||||
<div class="card-body"> |
||||
<div class="chart-pie pt-4 pb-2"> |
||||
<canvas id="myPieChart"></canvas> |
||||
</div> |
||||
<div class="mt-4 text-center small"> |
||||
<span class="mr-2"> |
||||
<i class="fas fa-circle text-primary"></i> Direct |
||||
</span> |
||||
<span class="mr-2"> |
||||
<i class="fas fa-circle text-success"></i> Social |
||||
</span> |
||||
<span class="mr-2"> |
||||
<i class="fas fa-circle text-info"></i> Referral |
||||
</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
@push('script') |
||||
<script> |
||||
document.addEventListener('DOMContentLoaded', function() { |
||||
var ctx = document.getElementById('ChartAssetStatus').getContext('2d'); |
||||
|
||||
var myChart = new Chart(ctx, { |
||||
type: 'bar', |
||||
data: { |
||||
labels: {!! json_encode($chartData['monthNames']) !!}, |
||||
datasets: [{ |
||||
label: 'Peminjaman', |
||||
data: {!! json_encode($chartData['exitData']) !!}, |
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)', |
||||
borderColor: 'rgba(75, 192, 192, 1)', |
||||
borderWidth: 1 |
||||
}, { |
||||
label: 'Pengembalian', |
||||
data: {!! json_encode($chartData['enterData']) !!}, |
||||
backgroundColor: 'rgba(255, 159, 64, 0.2)', |
||||
borderColor: 'rgba(255, 159, 64, 1)', |
||||
borderWidth: 1 |
||||
}] |
||||
}, |
||||
options: { |
||||
scales: { |
||||
y: { |
||||
beginAtZero: true |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
}); |
||||
</script> |
||||
@endpush |
||||
@endsection |
Loading…
Reference in new issue