Add Module Document Management
This commit is contained in:
parent
61dba7a35c
commit
74e9edc6b6
128
app/DataTables/DocumentDataTable.php
Normal file
128
app/DataTables/DocumentDataTable.php
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DataTables;
|
||||||
|
|
||||||
|
use App\Models\Document;
|
||||||
|
use Illuminate\Database\Eloquent\Builder as QueryBuilder;
|
||||||
|
use Yajra\DataTables\EloquentDataTable;
|
||||||
|
use Yajra\DataTables\Html\Builder as HtmlBuilder;
|
||||||
|
use Yajra\DataTables\Html\Button;
|
||||||
|
use Yajra\DataTables\Html\Column;
|
||||||
|
use Yajra\DataTables\Html\Editor\Editor;
|
||||||
|
use Yajra\DataTables\Html\Editor\Fields;
|
||||||
|
use Yajra\DataTables\Services\DataTable;
|
||||||
|
|
||||||
|
class DocumentDataTable extends DataTable
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Build the DataTable class.
|
||||||
|
*
|
||||||
|
* @param QueryBuilder $query Results from query() method.
|
||||||
|
*/
|
||||||
|
public function dataTable(QueryBuilder $query): EloquentDataTable
|
||||||
|
{
|
||||||
|
return (new EloquentDataTable($query))
|
||||||
|
->filter(function ($query) {
|
||||||
|
if (request()->has('search')) {
|
||||||
|
$search = request()->get('search');
|
||||||
|
$query->where('kode', 'like', "%" . $search['value'] . "%");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
->addColumn('kode_directorat',function($model){
|
||||||
|
return $model->directorat->kode;
|
||||||
|
})
|
||||||
|
->addColumn('name_directorat',function($model){
|
||||||
|
return $model->directorat->name;
|
||||||
|
})
|
||||||
|
->addColumn('kode_sub_directorat',function($model){
|
||||||
|
return $model->sub_directorat->kode;
|
||||||
|
})
|
||||||
|
->addColumn('name_sub_directorat',function($model){
|
||||||
|
return $model->sub_directorat->name;
|
||||||
|
})
|
||||||
|
->addColumn('kode_pekerjaan',function($model){
|
||||||
|
return $model->job->kode;
|
||||||
|
})
|
||||||
|
->addColumn('name_pekerjaan',function($model){
|
||||||
|
return $model->job->name;
|
||||||
|
})
|
||||||
|
->addColumn('kode_sub_pekerjaan',function($model){
|
||||||
|
return $model->sub_job->kode;
|
||||||
|
})
|
||||||
|
->addColumn('name_sub_pekerjaan',function($model){
|
||||||
|
return $model->sub_job->name;
|
||||||
|
})
|
||||||
|
->addColumn('kode_sub_sub_pekerjaan',function($model){
|
||||||
|
return $model->sub_sub_job->kode;
|
||||||
|
})
|
||||||
|
->addColumn('name_sub_sub_pekerjaan',function($model){
|
||||||
|
return $model->sub_sub_job->name;
|
||||||
|
})
|
||||||
|
->addIndexColumn()
|
||||||
|
->addColumn('action', 'pages.app.document._action')
|
||||||
|
->setRowId('id');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the query source of dataTable.
|
||||||
|
*/
|
||||||
|
public function query(Document $model): QueryBuilder
|
||||||
|
{
|
||||||
|
return $model->newQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional method if you want to use the html builder.
|
||||||
|
*/
|
||||||
|
public function html(): HtmlBuilder
|
||||||
|
{
|
||||||
|
return $this->builder()
|
||||||
|
->setTableId('document-table')
|
||||||
|
->columns($this->getColumns())
|
||||||
|
->minifiedAjax()
|
||||||
|
->stateSave(false)
|
||||||
|
->responsive()
|
||||||
|
->autoWidth(true)
|
||||||
|
->orderBy(1)
|
||||||
|
->parameters([
|
||||||
|
'scrollX' => true,
|
||||||
|
'drawCallback' => 'function() { KTMenu.createInstances(); }',
|
||||||
|
])
|
||||||
|
->addTableClass('align-middle table-row-dashed fs-6 gy-5');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the dataTable columns definition.
|
||||||
|
*/
|
||||||
|
public function getColumns(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false),
|
||||||
|
Column::make('kode'),
|
||||||
|
Column::make('kode_directorat')->title('Kode Direktorat'),
|
||||||
|
Column::make('name_directorat')->title('Nama Direktorat'),
|
||||||
|
Column::make('kode_sub_directorat')->title('Kode Sub Direktorat'),
|
||||||
|
Column::make('name_sub_directorat')->title('Nama Sub Direktorat'),
|
||||||
|
Column::make('kode_pekerjaan')->title('Kode Pekerjaan'),
|
||||||
|
Column::make('name_pekerjaan')->title('Nama Pekerjaan'),
|
||||||
|
Column::make('kode_sub_pekerjaan')->title('Kode Sub Pekerjaan'),
|
||||||
|
Column::make('name_sub_pekerjaan')->title('Nama Sub Pekerjaan'),
|
||||||
|
Column::make('kode_sub_sub_pekerjaan')->title('Kode Sub Sub Pekerjaan'),
|
||||||
|
Column::make('name_sub_sub_pekerjaan')->title('Nama Sub Sub Pekerjaan'),
|
||||||
|
Column::make('status'),
|
||||||
|
Column::computed('action')
|
||||||
|
->exportable(false)
|
||||||
|
->printable(false)
|
||||||
|
->width(60)
|
||||||
|
->addClass('text-center'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the filename for export.
|
||||||
|
*/
|
||||||
|
protected function filename(): string
|
||||||
|
{
|
||||||
|
return 'Document_' . date('YmdHis');
|
||||||
|
}
|
||||||
|
}
|
@ -30,7 +30,7 @@ class DocumentTypeDataTable extends DataTable
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
->addIndexColumn()
|
->addIndexColumn()
|
||||||
->addColumn('action', 'pages.masters.document-type._action')
|
->addColumn('action', 'pages.app.document-type._action')
|
||||||
->setRowId('id');
|
->setRowId('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
179
app/Http/Controllers/DocumentController.php
Normal file
179
app/Http/Controllers/DocumentController.php
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\DataTables\DocumentDataTable;
|
||||||
|
use App\Http\Requests\StoreDocumentRequest;
|
||||||
|
use App\Http\Requests\UpdateDocumentRequest;
|
||||||
|
use App\Models\Directorat;
|
||||||
|
use App\Models\Document;
|
||||||
|
use App\Models\DocumentDetail;
|
||||||
|
use App\Models\DocumentType;
|
||||||
|
use App\Models\Job;
|
||||||
|
use App\Models\SpecialCode;
|
||||||
|
use App\Models\SubDirectorat;
|
||||||
|
use App\Models\SubJob;
|
||||||
|
use App\Models\SubSubJob;
|
||||||
|
use Exception;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Spatie\Activitylog\Facades\CauserResolver;
|
||||||
|
|
||||||
|
class DocumentController extends Controller
|
||||||
|
{
|
||||||
|
public $user;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware(function ($request, $next) {
|
||||||
|
//$this->user = Auth::guard('web')->user();
|
||||||
|
return $next($request);
|
||||||
|
});
|
||||||
|
|
||||||
|
//CauserResolver::setCauser($this->user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*/
|
||||||
|
public function index(DocumentDataTable $dataTable)
|
||||||
|
{
|
||||||
|
/*if (is_null($this->user) || !$this->user->can('app.read')) {
|
||||||
|
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
return $dataTable->render('pages.app.document.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
/*if (is_null($this->user) || !$this->user->can('app.create')) {
|
||||||
|
abort(403, 'Sorry !! You are Unauthorized to create any master data !');
|
||||||
|
}*/
|
||||||
|
addVendor('chained-select');
|
||||||
|
|
||||||
|
$directorat = Directorat::all();
|
||||||
|
$special_code = SpecialCode::all();
|
||||||
|
$document_type = DocumentType::all();
|
||||||
|
return view('pages.app.document.create', compact('directorat', 'special_code', 'document_type'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*/
|
||||||
|
public function store(StoreDocumentRequest $request)
|
||||||
|
{
|
||||||
|
/*if (is_null($this->user) || !$this->user->can('app.create')) {
|
||||||
|
abort(403, 'Sorry !! You are Unauthorized to create any master data !');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
// Validate the request...
|
||||||
|
$validated = $request->validated();
|
||||||
|
|
||||||
|
// Store the Document...
|
||||||
|
if ($validated) {
|
||||||
|
$validated['sequence'] = 1;
|
||||||
|
try {
|
||||||
|
$created = Document::create($validated);
|
||||||
|
|
||||||
|
if ($created) {
|
||||||
|
$detail = [
|
||||||
|
'document_id' => $created->id,
|
||||||
|
'document_type_id' => $request->document_type_id,
|
||||||
|
'tanggal_upload' => date('Y-m-d'),
|
||||||
|
'tanggal_dokumen' => $request->tanggal_dokumen,
|
||||||
|
'nomor_dokumen' => $request->nomor_dokumen,
|
||||||
|
'perihal' => $request->perihal,
|
||||||
|
'kode_cabang' => $request->kode_cabang,
|
||||||
|
'jumlah_halaman' => $request->jumlah_halaman,
|
||||||
|
'custom_field_1' => $request->custom_field_1,
|
||||||
|
'custom_field_2' => $request->custom_field_2,
|
||||||
|
'custom_field_3' => $request->custom_field_3,
|
||||||
|
'custom_field_4' => $request->custom_field_4,
|
||||||
|
|
||||||
|
'nama_nasabah' => $request->nama_nasabah,
|
||||||
|
'no_rekening' => $request->no_rekening,
|
||||||
|
'no_cif' => $request->no_cif,
|
||||||
|
'group' => $request->group,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
DocumentDetail::create($detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('document.index')->with('success', 'Document created successfully.');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return redirect()->route('document.index')->with('error', 'Document created failed.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*/
|
||||||
|
public function show(Document $documents)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*/
|
||||||
|
public function edit($id)
|
||||||
|
{
|
||||||
|
$document = Document::find($id);
|
||||||
|
$directorat = Directorat::all();
|
||||||
|
$sub_directorat = SubDirectorat::where('directorat_id', $document->directorat_id)->get();
|
||||||
|
$job = Job::where('sub_directorat_id', $document->sub_directorat_id)->get();
|
||||||
|
$sub_job = SubJob::where('job_id', $document->job_id)->get();
|
||||||
|
$sub_sub_job = SubSubJob::where('sub_job_id', $document->sub_job_id)->get();
|
||||||
|
$special_code = SpecialCode::all();
|
||||||
|
$document_type = DocumentType::all();
|
||||||
|
|
||||||
|
return view('pages.app.document.edit', compact('document', 'directorat', 'sub_directorat', 'job', 'sub_job', 'sub_sub_job', 'special_code', 'document_type'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*/
|
||||||
|
public function update(UpdateDocumentRequest $request, Document $documents)
|
||||||
|
{
|
||||||
|
/*if (is_null($this->user) || !$this->user->can('app.update')) {
|
||||||
|
abort(403, 'Sorry !! You are Unauthorized to update any master data !');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// Validate the request...
|
||||||
|
$validated = $request->validated();
|
||||||
|
|
||||||
|
// Update the Document...
|
||||||
|
if ($validated) {
|
||||||
|
try {
|
||||||
|
$document = Document::find($request->id);
|
||||||
|
$update = $document->update($validated);
|
||||||
|
|
||||||
|
|
||||||
|
return redirect()->route('document.index')->with('success', 'Document updated successfully.');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return redirect()->route('document.index')->with('error', 'Document updated failed.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*/
|
||||||
|
public function destroy(Request $request)
|
||||||
|
{
|
||||||
|
$documents = Document::find($request->document);
|
||||||
|
$documents->delete();
|
||||||
|
echo json_encode(['status' => 'success', 'message' => 'Document deleted successfully.']);
|
||||||
|
}
|
||||||
|
}
|
@ -25,12 +25,17 @@ class SubSubJobController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index(SubSubJobDataTable $dataTable)
|
public function index(SubSubJobDataTable $dataTable, Request $request)
|
||||||
{
|
{
|
||||||
/*if (is_null($this->user) || !$this->user->can('masters.read')) {
|
/*if (is_null($this->user) || !$this->user->can('masters.read')) {
|
||||||
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
abort(403, 'Sorry !! You are Unauthorized to view any master data !');
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
if(isset($request->sub_job_id) && !empty($request->sub_job_id)) {
|
||||||
|
$this->show($request);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
addVendor('chained-select');
|
addVendor('chained-select');
|
||||||
|
|
||||||
$directorat = Directorat::all();
|
$directorat = Directorat::all();
|
||||||
@ -75,7 +80,18 @@ class SubSubJobController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show(Request $request)
|
public function show(Request $request)
|
||||||
{
|
{
|
||||||
|
$subSubJob = SubSubJob::where('sub_job_id', $request->sub_job_id)->get();
|
||||||
|
|
||||||
|
$data = [];
|
||||||
|
foreach ($subSubJob as $row) {
|
||||||
|
$result = [
|
||||||
|
$row->id => $row->name,
|
||||||
|
];
|
||||||
|
|
||||||
|
$data[] = $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
60
app/Http/Requests/StoreDocumentRequest.php
Normal file
60
app/Http/Requests/StoreDocumentRequest.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Validation\Validator;
|
||||||
|
|
||||||
|
class StoreDocumentRequest 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\Rule|array|string>
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
: array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'kode' => 'required|string|unique:documents,kode',
|
||||||
|
'directorat_id' => 'required|integer|exists:directorats,id',
|
||||||
|
'sub_directorat_id' => 'required|integer|exists:sub_directorats,id',
|
||||||
|
'job_id' => 'required|integer|exists:jobs,id',
|
||||||
|
'sub_job_id' => 'required|integer|exists:sub_jobs,id',
|
||||||
|
'sub_sub_job_id' => 'required|integer|exists:sub_sub_jobs,id',
|
||||||
|
'special_code_id' => 'nullable|integer|exists:special_codes,id',
|
||||||
|
'no_urut' => 'nullable|integer|min:1|max:999',
|
||||||
|
'sequence' => 'nullable|integer|min:1|max:999',
|
||||||
|
'status' => 'nullable|integer',
|
||||||
|
'keterangan' => 'nullable|string|max:255',
|
||||||
|
'jenis_dokumen' => 'nullable|string|max:255',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the validator instance.
|
||||||
|
*/
|
||||||
|
public function withValidator(Validator $validator)
|
||||||
|
: void
|
||||||
|
{
|
||||||
|
$validator->after(function (Validator $validator) {
|
||||||
|
if ($validator->errors()->any()) {
|
||||||
|
$error = json_decode($validator->errors()->toJson(), true);
|
||||||
|
foreach ($error as $key => $value) {
|
||||||
|
flash($value[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('document.index')->with('error', 'Document created failed.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
60
app/Http/Requests/UpdateDocumentRequest.php
Normal file
60
app/Http/Requests/UpdateDocumentRequest.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Validation\Validator;
|
||||||
|
|
||||||
|
class UpdateDocumentRequest 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\Rule|array|string>
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
: array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'kode' => 'required|string|unique:documents,kode,' . $this->id,
|
||||||
|
'directorat_id' => 'required|integer|exists:directorats,id',
|
||||||
|
'sub_directorat_id' => 'required|integer|exists:sub_directorats,id',
|
||||||
|
'job_id' => 'required|integer|exists:jobs,id',
|
||||||
|
'sub_job_id' => 'required|integer|exists:sub_jobs,id',
|
||||||
|
'sub_sub_job_id' => 'required|integer|exists:sub_sub_jobs,id',
|
||||||
|
'special_code_id' => 'nullable|integer|exists:special_codes,id',
|
||||||
|
'no_urut' => 'nullable|integer|min:1|max:999',
|
||||||
|
'sequence' => 'nullable|integer|min:1|max:999',
|
||||||
|
'status' => 'nullable|integer',
|
||||||
|
'keterangan' => 'nullable|string|max:255',
|
||||||
|
'jenis_dokumen' => 'nullable|string|max:255',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the validator instance.
|
||||||
|
*/
|
||||||
|
public function withValidator(Validator $validator)
|
||||||
|
: void
|
||||||
|
{
|
||||||
|
$validator->after(function (Validator $validator) {
|
||||||
|
if ($validator->errors()->any()) {
|
||||||
|
$error = json_decode($validator->errors()->toJson(), true);
|
||||||
|
foreach ($error as $key => $value) {
|
||||||
|
flash($value[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('document.index')->with('error', 'Document updated failed.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -21,7 +21,9 @@ class Document extends Model
|
|||||||
'sub_sub_job_id',
|
'sub_sub_job_id',
|
||||||
'special_code_id',
|
'special_code_id',
|
||||||
'no_urut',
|
'no_urut',
|
||||||
'kode'
|
'kode',
|
||||||
|
'sequence',
|
||||||
|
'jenis_dokumen'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function getActivitylogOptions(): LogOptions
|
public function getActivitylogOptions(): LogOptions
|
||||||
|
@ -16,15 +16,16 @@ class DocumentDetail extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'document_id',
|
'document_id',
|
||||||
'document_type_id',
|
'document_type_id',
|
||||||
'type',
|
|
||||||
'nama_nasabah',
|
'nama_nasabah',
|
||||||
'no_rekening',
|
'no_rekening',
|
||||||
'no_cif',
|
'no_cif',
|
||||||
'group',
|
'group',
|
||||||
|
'group',
|
||||||
|
|
||||||
'tanggal_upload',
|
'tanggal_upload',
|
||||||
'tanggal_document',
|
'tanggal_dokumen',
|
||||||
'no_document',
|
'nomor_dokumen',
|
||||||
'perihal',
|
'perihal',
|
||||||
'kode_cabang',
|
'kode_cabang',
|
||||||
'jumlah_halaman',
|
'jumlah_halaman',
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.0.2",
|
"php": "^8.0.2",
|
||||||
|
"anlutro/l4-settings": "^1.3",
|
||||||
"guzzlehttp/guzzle": "^7.2",
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
|
"haruncpi/laravel-id-generator": "^1.1",
|
||||||
"jackiedo/log-reader": "2.*",
|
"jackiedo/log-reader": "2.*",
|
||||||
"laracasts/flash": "^3.2",
|
"laracasts/flash": "^3.2",
|
||||||
"laravel/framework": "^10.0",
|
"laravel/framework": "^10.0",
|
||||||
|
112
composer.lock
generated
112
composer.lock
generated
@ -4,8 +4,71 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "9e90063b659e638d19ae81dade0a7fc4",
|
"content-hash": "0e87e4f9bda92e486cd97bf407e9f234",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "anlutro/l4-settings",
|
||||||
|
"version": "v1.3.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/anlutro/laravel-settings.git",
|
||||||
|
"reference": "8f3c602b6eb440fb4211d2aa028f879a779f037f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/anlutro/laravel-settings/zipball/8f3c602b6eb440fb4211d2aa028f879a779f037f",
|
||||||
|
"reference": "8f3c602b6eb440fb4211d2aa028f879a779f037f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/cache": "^4.2|^5|^6|^7|^8|^9|^10",
|
||||||
|
"illuminate/support": "^4.2|^5|^6|^7|^8|^9|^10"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/framework": ">=5.7",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
|
"phpunit/phpunit": "^8.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"illuminate/database": "Save settings to a database table.",
|
||||||
|
"illuminate/filesystem": "Save settings to a JSON file."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"aliases": {
|
||||||
|
"Setting": "anlutro\\LaravelSettings\\Facade"
|
||||||
|
},
|
||||||
|
"providers": [
|
||||||
|
"anlutro\\LaravelSettings\\ServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"anlutro\\LaravelSettings\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Andreas Lutro",
|
||||||
|
"email": "anlutro@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Persistent settings in Laravel.",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/anlutro/laravel-settings/issues",
|
||||||
|
"source": "https://github.com/anlutro/laravel-settings/tree/v1.3.1"
|
||||||
|
},
|
||||||
|
"time": "2023-03-27T09:47:32+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
@ -1041,6 +1104,53 @@
|
|||||||
],
|
],
|
||||||
"time": "2021-10-07T12:57:01+00:00"
|
"time": "2021-10-07T12:57:01+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "haruncpi/laravel-id-generator",
|
||||||
|
"version": "v1.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/haruncpi/laravel-id-generator.git",
|
||||||
|
"reference": "b227dc2391ea45e9d070f19d35dc0a5f7a8f4185"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/haruncpi/laravel-id-generator/zipball/b227dc2391ea45e9d070f19d35dc0a5f7a8f4185",
|
||||||
|
"reference": "b227dc2391ea45e9d070f19d35dc0a5f7a8f4185",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.6.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Haruncpi\\LaravelIdGenerator\\IdGeneratorServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Haruncpi\\LaravelIdGenerator\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"cc-by-4.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Md.Harun-Ur-Rashid",
|
||||||
|
"email": "harun.cox@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Easy way to generate custom ID in laravel framework",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/haruncpi/laravel-id-generator/issues",
|
||||||
|
"source": "https://github.com/haruncpi/laravel-id-generator/tree/v1.1.0"
|
||||||
|
},
|
||||||
|
"time": "2021-10-01T06:16:03+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "jackiedo/log-reader",
|
"name": "jackiedo/log-reader",
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
|
@ -24,11 +24,13 @@ return new class extends Migration
|
|||||||
$table->foreignIdFor(Job::class)->constrained()->onDelete('cascade');
|
$table->foreignIdFor(Job::class)->constrained()->onDelete('cascade');
|
||||||
$table->foreignIdFor(SubJob::class)->constrained()->onDelete('cascade');
|
$table->foreignIdFor(SubJob::class)->constrained()->onDelete('cascade');
|
||||||
$table->foreignIdFor(SubSubJob::class)->constrained()->onDelete('cascade');
|
$table->foreignIdFor(SubSubJob::class)->constrained()->onDelete('cascade');
|
||||||
$table->foreignIdFor(SpecialCode::class)->constrained()->onDelete('cascade');
|
$table->foreignIdFor(SpecialCode::class)->nullable()->constrained()->onDelete('cascade');
|
||||||
$table->string('no_urut',3);
|
$table->string('no_urut',3)->nullable();
|
||||||
|
$table->string('sequence',100)->nullable();
|
||||||
$table->string('kode', 15);
|
$table->string('kode', 15);
|
||||||
$table->string('status')->nullable();
|
$table->string('status')->nullable();
|
||||||
$table->string('keterangan')->nullable();
|
$table->string('keterangan')->nullable();
|
||||||
|
$table->enum('jenis_dokumen',['nasabah','non nasabah'])->nullable();
|
||||||
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
|
@ -16,7 +16,6 @@ return new class extends Migration
|
|||||||
$table->foreignId('document_id')->constrained('documents')->onDelete('cascade');
|
$table->foreignId('document_id')->constrained('documents')->onDelete('cascade');
|
||||||
$table->foreignId('document_type_id')->nullable()->constrained('document_types')->onDelete('cascade');
|
$table->foreignId('document_type_id')->nullable()->constrained('document_types')->onDelete('cascade');
|
||||||
|
|
||||||
$table->enum('type', ['nasabah', 'non_nasabah']);
|
|
||||||
$table->string('nama_nasabah')->nullable();
|
$table->string('nama_nasabah')->nullable();
|
||||||
$table->string('no_rekening')->nullable();
|
$table->string('no_rekening')->nullable();
|
||||||
$table->string('no_cif')->nullable();
|
$table->string('no_cif')->nullable();
|
||||||
@ -24,7 +23,7 @@ return new class extends Migration
|
|||||||
|
|
||||||
$table->date('tanggal_upload')->nullable();
|
$table->date('tanggal_upload')->nullable();
|
||||||
$table->date('tanggal_dokumen')->nullable();
|
$table->date('tanggal_dokumen')->nullable();
|
||||||
$table->string('no_dokumen')->nullable();
|
$table->string('nomor_dokumen')->nullable();
|
||||||
$table->string('perihal')->nullable();
|
$table->string('perihal')->nullable();
|
||||||
$table->string('kode_cabang')->nullable();
|
$table->string('kode_cabang')->nullable();
|
||||||
$table->string('jumlah_halaman')->nullable();
|
$table->string('jumlah_halaman')->nullable();
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if(isset($route[1]) && $route[1] == 'index')
|
@if(isset($route[1]) && $route[1] == 'index')
|
||||||
|
@if($route[0]=='document')<!--begin::Actions-->
|
||||||
|
<div class="d-flex align-items-center gap-2 gap-lg-3">
|
||||||
|
<!--begin::Primary button-->
|
||||||
|
<a href="{{ route($route[0].'.create') }}" class="btn btn-sm fw-bold btn-primary text-capitalize">Add {{ str_replace('-',' ',$route[0]) }}</a>
|
||||||
|
<!--end::Primary button-->
|
||||||
|
</div>
|
||||||
|
<!--end::Actions-->
|
||||||
|
@else
|
||||||
<!--begin::Actions-->
|
<!--begin::Actions-->
|
||||||
<div class="d-flex align-items-center gap-2 gap-lg-3">
|
<div class="d-flex align-items-center gap-2 gap-lg-3">
|
||||||
<!--begin::Primary button-->
|
<!--begin::Primary button-->
|
||||||
@ -15,6 +23,7 @@
|
|||||||
<!--end::Primary button-->
|
<!--end::Primary button-->
|
||||||
</div>
|
</div>
|
||||||
<!--end::Actions-->
|
<!--end::Actions-->
|
||||||
|
@endif
|
||||||
@elseif(isset($route[2]) && $route[2] == 'index' && $route[0] == 'user')
|
@elseif(isset($route[2]) && $route[2] == 'index' && $route[0] == 'user')
|
||||||
@if($route[1]!=='users')
|
@if($route[1]!=='users')
|
||||||
<!--begin::Actions-->
|
<!--begin::Actions-->
|
||||||
@ -25,6 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--end::Actions-->
|
<!--end::Actions-->
|
||||||
@else
|
@else
|
||||||
|
|
||||||
<!--begin::Actions-->
|
<!--begin::Actions-->
|
||||||
<div class="d-flex align-items-center gap-2 gap-lg-3">
|
<div class="d-flex align-items-center gap-2 gap-lg-3">
|
||||||
<!--begin::Primary button-->
|
<!--begin::Primary button-->
|
||||||
|
@ -197,7 +197,7 @@
|
|||||||
<!--begin:Menu item-->
|
<!--begin:Menu item-->
|
||||||
<div class="menu-item {{ $route[0] == "document" ? "here" : "" }}">
|
<div class="menu-item {{ $route[0] == "document" ? "here" : "" }}">
|
||||||
<!--begin:Menu link-->
|
<!--begin:Menu link-->
|
||||||
<a class="menu-link {{ $route[0] == "document" ? "active" : "" }}" href="/">
|
<a class="menu-link {{ $route[0] == "document" ? "active" : "" }}" href="{{ route('document.index') }}">
|
||||||
<span class="menu-icon">{!! getIcon('some-files', 'fs-2','duotone') !!}</span>
|
<span class="menu-icon">{!! getIcon('some-files', 'fs-2','duotone') !!}</span>
|
||||||
<span class="menu-title">Documents Management</span>
|
<span class="menu-title">Documents Management</span>
|
||||||
</a>
|
</a>
|
||||||
|
13
resources/views/pages/app/document/_action.blade.php
Normal file
13
resources/views/pages/app/document/_action.blade.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@php
|
||||||
|
$route = explode('.', Route::currentRouteName());
|
||||||
|
@endphp
|
||||||
|
<div class="d-flex flex-row flex-center">
|
||||||
|
<a href="{{ route($route[0].'.edit',['document' => $model->id]) }}"
|
||||||
|
class="kt_edit_form btn btn-icon btn-bg-light btn-active-light-primary btn-sm me-1">
|
||||||
|
{!! getIcon("pencil", "fs-1 text-info","duotune") !!}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{!! Form::open(['method' => 'DELETE','route' => [$route[0].'.destroy', $model->id],'class'=>'']) !!}
|
||||||
|
{{ Form::button(getIcon("trash", "fs-1 text-danger","duotune"), ['type' => 'submit', 'class' => 'delete btn btn-icon btn-bg-light btn-active-light-danger btn-sm'] ) }}
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
223
resources/views/pages/app/document/_edit.blade.php
Normal file
223
resources/views/pages/app/document/_edit.blade.php
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
@php
|
||||||
|
$route = explode('.', Route::currentRouteName());
|
||||||
|
@endphp
|
||||||
|
<!--begin:Form-->
|
||||||
|
<form class="form_{{$route[0]}}" method="POST" action="{{ route($route[0].'.update',['document' => $document->id]) }}">
|
||||||
|
@method('PUT')
|
||||||
|
@csrf
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span class="required">Kode</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="hidden" id="id" name="id" value="{{ $document->id }}" />
|
||||||
|
<input type="text" id="kode" class="form-control form-control-solid" placeholder="This Kode Generate Automatically" name="kode" value="{{ $document->kode }}" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
|
||||||
|
<div class="row gx-5 mb-5">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="directorat_id">
|
||||||
|
<span class="required">Directorat</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="directorat_id" id="directorat_id">
|
||||||
|
<option>Select Directorat</option>
|
||||||
|
@foreach($directorat as $item)
|
||||||
|
@if($item->id == $document->directorat_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_directorat_id">
|
||||||
|
<span class="required">Sub Directorat</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_directorat_id" id="sub_directorat_id">
|
||||||
|
<option>Select Sub Directorat</option>
|
||||||
|
@foreach($sub_directorat as $item)
|
||||||
|
@if($item->id == $document->sub_directorat_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="job_id">
|
||||||
|
<span class="required">Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="job_id" id="job_id">
|
||||||
|
<option>Select Job</option>
|
||||||
|
@foreach($job as $item)
|
||||||
|
@if($item->id == $document->job_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_job_id">
|
||||||
|
<span class="required">Sub Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_job_id" id="sub_job_id">
|
||||||
|
<option>Select Sub Job</option>
|
||||||
|
@foreach($sub_job as $item)
|
||||||
|
@if($item->id == $document->sub_job_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_sub_job_id">
|
||||||
|
<span class="required">Sub Sub Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_sub_job_id" id="sub_sub_job_id">
|
||||||
|
<option>Select Sub Sub Job</option>
|
||||||
|
@foreach($sub_sub_job as $item)
|
||||||
|
@if($item->id == $document->sub_sub_job_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="special_code_id">
|
||||||
|
<span class="required">Special Code</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="special_code_id" id="special_code_id">
|
||||||
|
<option>Special Code</option>
|
||||||
|
@foreach($special_code as $item)
|
||||||
|
@if($item->id == $document->special_code_id)
|
||||||
|
<option value="{{$item->id}}" selected>{{$item->name}}</option>
|
||||||
|
@else
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span >No Urut</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" placeholder="This Kode Generate Automatically" name="no_urut" value="{{ $document->no_urut }}" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="jenis_dokumen">
|
||||||
|
<span class="required">Jenis Dokumen</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="jenis_dokumen" id="jenis_dokumen">
|
||||||
|
<option value="nasabah" {{ $document->jenis_dokumen == 'nasabah' ? 'selected' : '' }} >Nasabah</option>
|
||||||
|
<option value="non nasabah" {{ $document->jenis_dokumen == 'non nasabah' ? 'selected' : '' }}>Non Nasabah</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--begin::Actions-->
|
||||||
|
<div class="text-center">
|
||||||
|
<button type="reset" data-bs-dismiss="modal" class="btn btn-light me-3">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</div>
|
||||||
|
<!--end::Actions-->
|
||||||
|
</form>
|
||||||
|
<!--end:Form-->
|
||||||
|
|
||||||
|
@push('customscript')
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#sub_directorat_id").remoteChained({
|
||||||
|
parents : "#directorat_id",
|
||||||
|
url : "/sub-directorat"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#job_id").remoteChained({
|
||||||
|
parents : "#sub_directorat_id",
|
||||||
|
url : "/job"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#sub_job_id").remoteChained({
|
||||||
|
parents : "#job_id",
|
||||||
|
url : "/sub-job"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#sub_sub_job_id").remoteChained({
|
||||||
|
parents : "#sub_job_id",
|
||||||
|
url : "/sub-sub-job"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
388
resources/views/pages/app/document/_form.blade.php
Normal file
388
resources/views/pages/app/document/_form.blade.php
Normal file
@ -0,0 +1,388 @@
|
|||||||
|
@php
|
||||||
|
$route = explode('.', Route::currentRouteName());
|
||||||
|
@endphp
|
||||||
|
<!--begin:Form-->
|
||||||
|
<form class="form_{{$route[0]}}" method="POST" action="{{ route($route[0].'.store') }}">
|
||||||
|
@csrf
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span class="required">Kode</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="hidden" id="id" name="id" />
|
||||||
|
<input type="text" id="kode" class="form-control form-control-solid" placeholder="This Kode Generate Automatically" name="kode" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
|
||||||
|
<div class="row gx-5 mb-5">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="directorat_id">
|
||||||
|
<span class="required">Directorat</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="directorat_id" id="directorat_id">
|
||||||
|
<option>Select Directorat</option>
|
||||||
|
@foreach($directorat as $item)
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_directorat_id">
|
||||||
|
<span class="required">Sub Directorat</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_directorat_id" id="sub_directorat_id">
|
||||||
|
<option>Select Sub Directorat</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="job_id">
|
||||||
|
<span class="required">Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="job_id" id="job_id">
|
||||||
|
<option>Select Job</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_job_id">
|
||||||
|
<span class="required">Sub Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_job_id" id="sub_job_id">
|
||||||
|
<option>Select Sub Job</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_sub_job_id">
|
||||||
|
<span class="required">Sub Sub Job</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="sub_sub_job_id" id="sub_sub_job_id">
|
||||||
|
<option>Select Sub Sub Job</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="special_code_id">
|
||||||
|
<span class="required">Special Code</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="special_code_id" id="special_code_id">
|
||||||
|
<option>Special Code</option>
|
||||||
|
@foreach($special_code as $item)
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>No Urut</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="no_urut" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="jenis_dokumen">
|
||||||
|
<span class="required">Jenis Dokumen</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="jenis_dokumen" id="jenis_dokumen">
|
||||||
|
<option value="nasabah" >Nasabah</option>
|
||||||
|
<option value="non nasabah">Non Nasabah</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nasabah" class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Nama Nasabah</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="nama_nasabah" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>No Rekening</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="no_rekening" Placeholder="Nomor Rekening Giro/Tabungan/Loan/Deposito" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>No CIF</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="no_cif" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Group</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="group" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="special_code_id">
|
||||||
|
<span class="required">Document Type</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<select class="form-select" name="document_type_id" id="document_type_id">
|
||||||
|
<option>Document Type</option>
|
||||||
|
@foreach($document_type as $item)
|
||||||
|
<option value="{{$item->id}}">{{$item->name}}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Tanggal Dokumen</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="date" class="form-control form-control-solid" name="tanggal_dokumen" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Nomor Dokumen</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="nomor_dokumen" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Perihal</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="perihal" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Kode Cabang</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="kode_cabang" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Jumlah Halaman</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="jumlah_halaman" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Custom Field 1</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="custom_field_1" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Custom Field 2</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="custom_field_2" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Custom Field 3</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="custom_field_3" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<!--begin::Input group-->
|
||||||
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
|
<!--begin::Label-->
|
||||||
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||||
|
<span>Custom Field 4</span>
|
||||||
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
|
</label>
|
||||||
|
<!--end::Label-->
|
||||||
|
<input type="text" class="form-control form-control-solid" name="custom_field_4" />
|
||||||
|
</div>
|
||||||
|
<!--end::Input group-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--begin::Actions-->
|
||||||
|
<div class="text-center">
|
||||||
|
<button type="reset" data-bs-dismiss="modal" class="btn btn-light me-3">Cancel</button>
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</div>
|
||||||
|
<!--end::Actions-->
|
||||||
|
</form>
|
||||||
|
<!--end:Form-->
|
||||||
|
|
||||||
|
@push('customscript')
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#sub_directorat_id").remoteChained({
|
||||||
|
parents : "#directorat_id",
|
||||||
|
url : "/sub-directorat"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#job_id").remoteChained({
|
||||||
|
parents : "#sub_directorat_id",
|
||||||
|
url : "/job"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#sub_job_id").remoteChained({
|
||||||
|
parents : "#job_id",
|
||||||
|
url : "/sub-job"
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#sub_sub_job_id").remoteChained({
|
||||||
|
parents : "#sub_job_id",
|
||||||
|
url : "/sub-sub-job"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
100
resources/views/pages/app/document/_table.blade.php
Normal file
100
resources/views/pages/app/document/_table.blade.php
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<!--begin::Table-->
|
||||||
|
{{ $dataTable->table() }}
|
||||||
|
<!--end::Table-->
|
||||||
|
|
||||||
|
{{-- Inject Scripts --}}
|
||||||
|
@section('scripts')
|
||||||
|
{{ $dataTable->scripts() }}
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('customscript')
|
||||||
|
@php
|
||||||
|
$route = explode('.', Route::currentRouteName());
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$("#searchbox").on("keyup search input paste cut", function () {
|
||||||
|
LaravelDataTables["{{$route[0]}}-table"].search(this.value).draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
const documentTitle = '{{ ucfirst($route[0]) }} Report';
|
||||||
|
var buttons = new $.fn.dataTable.Buttons(LaravelDataTables["{{$route[0]}}-table"], {
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
extend: 'copyHtml5',
|
||||||
|
title: documentTitle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'excelHtml5',
|
||||||
|
title: documentTitle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'csvHtml5',
|
||||||
|
title: documentTitle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'pdfHtml5',
|
||||||
|
title: documentTitle
|
||||||
|
},
|
||||||
|
{
|
||||||
|
extend: 'print',
|
||||||
|
title: documentTitle
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}).container().appendTo($('#kt_datatable_example_buttons'));
|
||||||
|
|
||||||
|
// Hook dropdown menu click event to datatable export buttons
|
||||||
|
const exportButtons = document.querySelectorAll('#kt_datatable_example_export_menu [data-kt-export]');
|
||||||
|
exportButtons.forEach(exportButton => {
|
||||||
|
exportButton.addEventListener('click', e => {
|
||||||
|
e.preventDefault();
|
||||||
|
console.log(e.target.getAttribute('data-kt-export'));
|
||||||
|
// Get clicked export value
|
||||||
|
const exportValue = e.target.getAttribute('data-kt-export');
|
||||||
|
const target = document.querySelector('.dt-buttons .buttons-' + exportValue);
|
||||||
|
|
||||||
|
// Trigger click event on hidden datatable export buttons
|
||||||
|
target.click();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
LaravelDataTables["{{$route[0]}}-table"].on('click', '.delete', function (event) {
|
||||||
|
var form = $(this).closest("form");
|
||||||
|
event.preventDefault();
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Are you sure?',
|
||||||
|
text: "You won't be able to revert this!",
|
||||||
|
icon: 'warning',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
cancelButtonColor: '#d33',
|
||||||
|
confirmButtonText: 'Yes, delete it!'
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: form.attr('action'),
|
||||||
|
data: form.serialize(), // serializes the form's elements.
|
||||||
|
success: function(data)
|
||||||
|
{
|
||||||
|
toastr.success('{{ucfirst($route[0])}} has been deleted.', 'Success!', {timeOut: 5000});
|
||||||
|
LaravelDataTables["{{$route[0]}}-table"].ajax.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
|
|
||||||
|
@section('styles')
|
||||||
|
<style>
|
||||||
|
.dataTables_filter {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endsection
|
16
resources/views/pages/app/document/create.blade.php
Normal file
16
resources/views/pages/app/document/create.blade.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<x-default-layout>
|
||||||
|
<!--begin::Card-->
|
||||||
|
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||||
|
<!--begin::Card body-->
|
||||||
|
<div class="card-header border-0 pt-5">
|
||||||
|
<h3 class="card-title align-items-start flex-column">
|
||||||
|
Upload New Document
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body pt-6">
|
||||||
|
@include('pages.app.document._form')
|
||||||
|
</div>
|
||||||
|
<!--end::Card body-->
|
||||||
|
</div>
|
||||||
|
<!--end::Card-->
|
||||||
|
</x-default-layout>
|
16
resources/views/pages/app/document/edit.blade.php
Normal file
16
resources/views/pages/app/document/edit.blade.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<x-default-layout>
|
||||||
|
<!--begin::Card-->
|
||||||
|
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||||
|
<!--begin::Card body-->
|
||||||
|
<div class="card-header border-0 pt-5">
|
||||||
|
<h3 class="card-title align-items-start flex-column">
|
||||||
|
Edit Document {{ $document->kode }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card-body pt-6">
|
||||||
|
@include('pages.app.document._edit')
|
||||||
|
</div>
|
||||||
|
<!--end::Card body-->
|
||||||
|
</div>
|
||||||
|
<!--end::Card-->
|
||||||
|
</x-default-layout>
|
91
resources/views/pages/app/document/index.blade.php
Normal file
91
resources/views/pages/app/document/index.blade.php
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<x-default-layout>
|
||||||
|
<!--begin::Card-->
|
||||||
|
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||||
|
<!--begin::Card body-->
|
||||||
|
<div class="card-header border-0 pt-5">
|
||||||
|
<div class="card-title align-items-start flex-column">
|
||||||
|
<div class="d-flex align-items-center position-relative my-1">
|
||||||
|
<!--begin::Svg Icon | path: icons/duotune/general/gen021.svg-->
|
||||||
|
<span class="svg-icon svg-icon-1 position-absolute ms-6">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||||
|
<rect opacity="0.5" x="17.0365" y="15.1223" width="8.15546" height="2" rx="1"
|
||||||
|
transform="rotate(45 17.0365 15.1223)" fill="currentColor"></rect>
|
||||||
|
<path
|
||||||
|
d="M11 19C6.55556 19 3 15.4444 3 11C3 6.55556 6.55556 3 11 3C15.4444 3 19 6.55556 19 11C19 15.4444 15.4444 19 11 19ZM11 5C7.53333 5 5 7.53333 5 11C5 14.4667 7.53333 17 11 17C14.4667 17 17 14.4667 17 11C17 7.53333 14.4667 5 11 5Z"
|
||||||
|
fill="currentColor"></path>
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<!--end::Svg Icon-->
|
||||||
|
<input type="text" id="searchbox"
|
||||||
|
class="form-control form-control-solid border border-gray-300 w-250px ps-15"
|
||||||
|
placeholder="Search Document">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--begin::Export buttons-->
|
||||||
|
<div id="kt_datatable_example_1_export" class="d-none"></div>
|
||||||
|
<!--end::Export buttons-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-toolbar">
|
||||||
|
|
||||||
|
<!--begin::Export dropdown-->
|
||||||
|
<button type="button" class="btn btn-light-primary" data-kt-menu-trigger="click"
|
||||||
|
data-kt-menu-placement="bottom-end">
|
||||||
|
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span class="path2"></span></i>
|
||||||
|
Export Report
|
||||||
|
</button>
|
||||||
|
<!--begin::Menu-->
|
||||||
|
<div id="kt_datatable_example_export_menu"
|
||||||
|
class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-semibold fs-7 w-200px py-4"
|
||||||
|
data-kt-menu="true">
|
||||||
|
<!--begin::Menu item-->
|
||||||
|
<div class="menu-item px-3">
|
||||||
|
<a href="#" class="menu-link px-3" data-kt-export="copy">
|
||||||
|
Copy to clipboard
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!--end::Menu item-->
|
||||||
|
<!--begin::Menu item-->
|
||||||
|
<div class="menu-item px-3">
|
||||||
|
<a href="#" class="menu-link px-3" data-kt-export="excel">
|
||||||
|
Export as Excel
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!--end::Menu item-->
|
||||||
|
<!--begin::Menu item-->
|
||||||
|
<div class="menu-item px-3">
|
||||||
|
<a href="#" class="menu-link px-3" data-kt-export="csv">
|
||||||
|
Export as CSV
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!--end::Menu item-->
|
||||||
|
<!--begin::Menu item-->
|
||||||
|
<div class="menu-item px-3">
|
||||||
|
<a href="#" class="menu-link px-3" data-kt-export="pdf">
|
||||||
|
Export as PDF
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!--end::Menu item-->
|
||||||
|
<!--begin::Menu item-->
|
||||||
|
<div class="menu-item px-3">
|
||||||
|
<a href="#" class="menu-link px-3" data-kt-export="print">
|
||||||
|
Print
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<!--end::Menu item-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--begin::Hide default export buttons-->
|
||||||
|
<div id="kt_datatable_example_buttons" class="d-none"></div>
|
||||||
|
<!--end::Hide default export buttons-->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body pt-6">
|
||||||
|
@include('pages.app.document._table')
|
||||||
|
</div>
|
||||||
|
<!--end::Card body-->
|
||||||
|
</div>
|
||||||
|
<!--end::Card-->
|
||||||
|
</x-default-layout>
|
@ -77,7 +77,7 @@
|
|||||||
<div class="d-flex flex-column mb-8 fv-row">
|
<div class="d-flex flex-column mb-8 fv-row">
|
||||||
<!--begin::Label-->
|
<!--begin::Label-->
|
||||||
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_job_id">
|
<label class="d-flex align-items-center fs-6 fw-semibold mb-2" for="sub_job_id">
|
||||||
<span class="required">Job</span>
|
<span class="required">Sub Job</span>
|
||||||
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||||
</label>
|
</label>
|
||||||
<!--end::Label-->
|
<!--end::Label-->
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use App\Http\Controllers\DashboardController;
|
use App\Http\Controllers\DashboardController;
|
||||||
use App\Http\Controllers\DirectoratController;
|
use App\Http\Controllers\DirectoratController;
|
||||||
|
use App\Http\Controllers\DocumentController;
|
||||||
use App\Http\Controllers\DocumentTypeController;
|
use App\Http\Controllers\DocumentTypeController;
|
||||||
use App\Http\Controllers\JobController;
|
use App\Http\Controllers\JobController;
|
||||||
use App\Http\Controllers\Logs\AuditLogsController;
|
use App\Http\Controllers\Logs\AuditLogsController;
|
||||||
@ -44,6 +45,9 @@ Route::group(['middleware' => ['auth', 'verified']], function () {
|
|||||||
Route::resource('special-code', SpecialCodeController::class);
|
Route::resource('special-code', SpecialCodeController::class);
|
||||||
Route::resource('document-type', DocumentTypeController::class);
|
Route::resource('document-type', DocumentTypeController::class);
|
||||||
|
|
||||||
|
Route::resource('document', DocumentController::class);
|
||||||
|
//Route::resource('document-detail', DOcumentDetailController::class);
|
||||||
|
|
||||||
// Users Management
|
// Users Management
|
||||||
Route::prefix('user')->name('user.')->group(function(){
|
Route::prefix('user')->name('user.')->group(function(){
|
||||||
Route::resource('roles', RolesController::class);
|
Route::resource('roles', RolesController::class);
|
||||||
|
Loading…
Reference in New Issue
Block a user