feat: new menu cooperation finish in dashboard
This commit is contained in:
parent
c0bf629239
commit
c67fabcbe3
@ -13,6 +13,16 @@
|
||||
|
||||
class CooperationCompletionController extends Controller
|
||||
{
|
||||
// Main page: Penyelesaian Kerjasama
|
||||
public function index(Request $request){
|
||||
return view('dashboard.cooperation-completions.index', [
|
||||
'title' => 'Penyelesaian Kerjasama',
|
||||
'date' => $request->input('date', null),
|
||||
'month' => $request->input('month', null),
|
||||
'year' => $request->input('year', null),
|
||||
]);
|
||||
}
|
||||
|
||||
public function store(CooperationCompletionRequest $request, $id){
|
||||
$validatedData = $request->validated();
|
||||
|
||||
@ -21,7 +31,16 @@ public function store(CooperationCompletionRequest $request, $id){
|
||||
|
||||
$validatedData['invoice'] = store_file($validatedData['invoice'], 'uploads/cooperation-completions')['randomFileName'];
|
||||
|
||||
$validatedData['other_document'] = store_file($validatedData['other_document'], 'uploads/cooperation-completions')['randomFileName'];
|
||||
$validatedData['bank_reference'] = store_file($validatedData['bank_reference'], 'uploads/cooperation-completions')['randomFileName'];
|
||||
|
||||
$validatedData['electronic_tax_invoice'] = store_file($validatedData['electronic_tax_invoice'], 'uploads/cooperation-completions')['randomFileName'];
|
||||
|
||||
if(isset($validatedData['other_document'])){
|
||||
$validatedData['other_document'] = store_file($validatedData['other_document'], 'uploads/cooperation-completions')['randomFileName'];
|
||||
}else{
|
||||
$validatedData['other_document'] = null;
|
||||
}
|
||||
|
||||
|
||||
$validatedData['order_id'] = decrypt_id($id);
|
||||
$validatedData['media_id'] = Auth::user()->company->media->id;
|
||||
@ -45,6 +64,24 @@ public function show($mediaOrderId, $id){
|
||||
]);
|
||||
}
|
||||
|
||||
public function showIndex($id){
|
||||
$cooperationCompletion = CooperationCompletion::findOrFail(decrypt_id($id));
|
||||
|
||||
return view('dashboard.cooperation-completions.index.show', [
|
||||
'title' => 'Detail Penyelesaian Kerjasama',
|
||||
'cooperationCompletion' => $cooperationCompletion
|
||||
]);
|
||||
}
|
||||
|
||||
public function processIndex($id){
|
||||
$cooperationCompletion = CooperationCompletion::findOrFail(decrypt_id($id));
|
||||
|
||||
return view('dashboard.cooperation-completions.index.process', [
|
||||
'title' => 'Detail Penyelesaian Kerjasama',
|
||||
'cooperationCompletion' => $cooperationCompletion
|
||||
]);
|
||||
}
|
||||
|
||||
public function accept($id){
|
||||
|
||||
try{
|
||||
@ -118,4 +155,39 @@ public function rejectAction(Request $request, $mediaOrderId, $id){
|
||||
return redirect()->back()->with('success-status', 'Berhasil menolak penyelesaian kerjasama.');
|
||||
|
||||
}
|
||||
|
||||
public function rejectActionIndex(Request $request, $id){
|
||||
|
||||
try{
|
||||
$validatedData = $request->validate([
|
||||
'rejection_reason' => ['required'],
|
||||
], [
|
||||
'rejection_reason.required' => 'Alasan penolakan wajib diisi.',
|
||||
]);
|
||||
|
||||
$completion = CooperationCompletion::with(['order', 'media'])->findOrFail(decrypt_id($id));
|
||||
|
||||
$completion->update([
|
||||
'status' => '2',
|
||||
'rejection_reason' => $validatedData['rejection_reason']
|
||||
]);
|
||||
|
||||
// Announcements
|
||||
$announcementData = [
|
||||
'headline' => 'Formulir penyelesaian kerjasama <u>'. $completion->order->cooperation->name .'</u> telah <span class="text-danger">ditolak</span>',
|
||||
'content' => '<p>Admin telah menolak laporan formulir penyelesaian kerjasama Anda.</p>',
|
||||
'enhancer_id' => Auth::id()
|
||||
];
|
||||
$createdAnnouncement = Announcement::create($announcementData);
|
||||
$createdAnnouncement->users()->attach($completion->media->company->user->id, ['category' => 'system']);
|
||||
// End Announcements
|
||||
|
||||
}catch(\Exception $e){
|
||||
Log::error("CooperationCompletions (rejectAction): ". $e);
|
||||
return redirect()->back()->with('failed-status', 'Gagal menolak penyelesaian kerjasama');
|
||||
}
|
||||
|
||||
return redirect()->back()->with('success-status', 'Berhasil menolak penyelesaian kerjasama.');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
use App\Models\ContentRecap;
|
||||
use App\Models\ContentRecapClassification;
|
||||
use App\Models\Cooperation;
|
||||
use App\Models\CooperationCompletion;
|
||||
use App\Models\CooperationProposal;
|
||||
use App\Models\GovernmentAgency;
|
||||
use App\Models\IssueManagement;
|
||||
@ -468,8 +469,6 @@ public function governmentAgency(Request $request){
|
||||
public function airingProofTheme(Request $request){
|
||||
if ($request->ajax()) {
|
||||
|
||||
|
||||
|
||||
$data = AiringProofTheme::all();
|
||||
|
||||
return DataTables::of($data)
|
||||
@ -573,7 +572,6 @@ public function contentRecapClassification(Request $request){
|
||||
public function news(Request $request){
|
||||
if ($request->ajax()) {
|
||||
|
||||
|
||||
$category = $request->input('category', 'all');
|
||||
$year = $request->input('year', null);
|
||||
$month = $request->input('month', null);
|
||||
@ -747,7 +745,6 @@ public function mediaAnnouncement(Request $request, $category){
|
||||
->findOrFail(Auth::user()->id)
|
||||
->announcements;
|
||||
|
||||
|
||||
return DataTables::of($data)
|
||||
->addIndexColumn()
|
||||
->addColumn('sent_at', function ($data) {
|
||||
@ -2124,6 +2121,84 @@ class="text-dark"
|
||||
|
||||
}
|
||||
|
||||
// Penyelesaian Kerjasama
|
||||
public function cooperationCompletionIndex(Request $request){
|
||||
if ($request->ajax()) {
|
||||
|
||||
if(is_role(['1', '5'])){
|
||||
$data = CooperationCompletion::with(['media.company'])->get();
|
||||
}else if(is_role(['3'])){
|
||||
$mediaId = Auth::user()->company->media->id;
|
||||
$data = CooperationCompletion::with(['media.company', 'order.cooperation'])->where('media_id', '=', $mediaId)->get();
|
||||
}
|
||||
|
||||
return DataTables::of($data)
|
||||
->addIndexColumn()
|
||||
->addColumn('cooperation', function ($data) {
|
||||
return $data->order->cooperation->name;
|
||||
})
|
||||
->addColumn('media_name', function ($data) {
|
||||
return $data->media->name;
|
||||
})
|
||||
->addColumn('company_name', function ($data) {
|
||||
return $data->media->company->name;
|
||||
})
|
||||
->addColumn('email', function ($data) {
|
||||
return $data->media->company->email;
|
||||
})
|
||||
->addColumn('status', function ($data) {
|
||||
switch($data->status){
|
||||
case 0:
|
||||
return '<span class="badge bg-warning" style="display:inline-block;font-size:0.8rem;">Menunggu</span>';
|
||||
case 1:
|
||||
return '<span class="badge bg-success" style="display:inline-block;font-size:0.8rem;">Diterima</span>';
|
||||
case 2:
|
||||
return '<span class="badge bg-danger" style="display:inline-block;font-size:0.8rem;">Ditolak</span> <span class="badge bg-transparent"><a href="javascript:void(0);"
|
||||
class="text-dark"
|
||||
onclick="showDetail('.htmlspecialchars(json_encode(strip_tags($data->rejection_reason))).')"
|
||||
style="margin-top:0.2rem;">
|
||||
<em class="icon ni ni-eye"></em>
|
||||
</a></span>';
|
||||
default:
|
||||
return '<span class="badge bg-secondary" style="display:inline-block;font-size:0.8rem;">Tidak Diketahui</span>';
|
||||
}
|
||||
})
|
||||
->addColumn('action', function ($data){
|
||||
$showUrl = route('dashboard.cooperation.completions.show.index', ['id' => encrypt_id($data->id)]);
|
||||
|
||||
$processUrl = route('dashboard.cooperation.completions.process.index', ['id' => encrypt_id($data->id)]);
|
||||
|
||||
// $rejectUrl = route('dashboard.cooperation.completions.reject', ['id' => encrypt_id($data->id)]);
|
||||
|
||||
$dropdown = '<div class="dropdown" style="display:flex; justify-content:center;">
|
||||
<a class="dropdown-toggle btn btn-icon btn-light" data-bs-toggle="dropdown"><em class="icon ni ni-more-v"></em></a>
|
||||
<div class="dropdown-menu dropdown-menu-datatable-custom dropdown-menu-end">
|
||||
<ul class="link-list-opt">
|
||||
<li><a href="'.$showUrl.'"><em class="icon ni ni-eye"></em><span>Detail</span></a></li>';
|
||||
|
||||
// if (is_role(['1']) && $data->status === '0') {
|
||||
// $dropdown .= '<li><a href="javascript: void(0);" onclick="itemConfirm(\''.$acceptUrl.'\', \'Apakah Anda yakin ingin menerima penyelesaian kerjasama ini?\', \'Ya, terima!\')"><em class="icon ni ni-check"></em><span>Terima</span></a></li>';
|
||||
// }
|
||||
|
||||
if (is_role(['1']) && $data->status === '0') {
|
||||
$dropdown .= '<li><a href="'.$processUrl.'"><em class="icon ni ni-loader"></em><span>Proses</span></a></li>';
|
||||
}
|
||||
|
||||
$dropdown .= '</ul>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
return $dropdown;
|
||||
})
|
||||
|
||||
->rawColumns(['status', 'action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
|
||||
}
|
||||
|
||||
public function cooperationArchive(Request $request){
|
||||
if ($request->ajax()) {
|
||||
|
||||
|
||||
@ -300,7 +300,12 @@ public function mediaProposalRejectAction(Request $request, $id, $proposalId){
|
||||
}
|
||||
|
||||
public function process($id, $process, $paramMediaId = null){
|
||||
$mediaCooperation = Cooperation::with(['media', 'mediaOrder.media'])->findOrFail(decrypt_id($id));
|
||||
$mediaCooperation = Cooperation::with([
|
||||
'media',
|
||||
'mediaOrder.media',
|
||||
'mediaOrder.reports',
|
||||
'mediaOrder.completions'
|
||||
])->findOrFail(decrypt_id($id));
|
||||
|
||||
$data = [
|
||||
'process' => $process,
|
||||
@ -309,23 +314,25 @@ public function process($id, $process, $paramMediaId = null){
|
||||
'mediaId' => is_role(['3']) ? Auth::user()->company->media->id : null
|
||||
];
|
||||
|
||||
if(is_role(['3'])){
|
||||
if (is_role(['3']) && $data['mediaOrder'] && $data['mediaOrder']->reports) {
|
||||
$reports = $data['mediaOrder']->reports->filter(function ($reports) use ($data) {
|
||||
return $reports->media_id == Auth::user()->company->media->id;
|
||||
});
|
||||
|
||||
if(filled($reports)){
|
||||
|
||||
if (filled($reports)) {
|
||||
$isAllReportsAccepted = $reports->every(function ($item) {
|
||||
return $item->status === '1';
|
||||
});
|
||||
|
||||
$data['isAllReportsAccepted'] = $isAllReportsAccepted && ($reports->count() === $data['mediaOrder']->required_reports);
|
||||
$data['isHaveReports'] = true;
|
||||
}else{
|
||||
} else {
|
||||
$data['isAllReportsAccepted'] = false;
|
||||
$data['isHaveReports'] = false;
|
||||
}
|
||||
} else {
|
||||
$data['isAllReportsAccepted'] = false;
|
||||
$data['isHaveReports'] = false;
|
||||
}
|
||||
|
||||
// Tab Kerjasama
|
||||
@ -439,6 +446,68 @@ public function process($id, $process, $paramMediaId = null){
|
||||
}
|
||||
}
|
||||
|
||||
// if (is_role(['3'])) {
|
||||
// // Pastikan mediaOrder dan relasi media tidak null
|
||||
// if ($data['mediaOrder'] && $data['mediaOrder']->media && $data['mediaOrder']->media->where('id', $data['mediaId'])->first()) {
|
||||
// $mediaOrderItem = $data['mediaOrder']->media->where('id', $data['mediaId'])->first();
|
||||
// $data['mediaOrderPivot'] = $mediaOrderItem->pivot;
|
||||
// } else {
|
||||
// $data['mediaOrderPivot'] = null; // atau abort(404) jika dianggap error penting
|
||||
// }
|
||||
|
||||
// $data['reporterMediaId'] = Auth::user()->company->media->id;
|
||||
|
||||
// // Can Commented
|
||||
// $reports = null;
|
||||
|
||||
// if ($data['mediaOrder'] && $data['mediaOrder']->reports) {
|
||||
// $reports = $data['mediaOrder']->reports->filter(function ($report) use ($data) {
|
||||
// return $report->media_id == Auth::user()->company->media->id;
|
||||
// });
|
||||
// }
|
||||
|
||||
// if (filled($reports)) {
|
||||
// $data['isAllReportsAccepted'] = $reports->every(function ($item) {
|
||||
// return $item->status === '1';
|
||||
// });
|
||||
// $data['isHaveReports'] = true;
|
||||
// } else {
|
||||
// $data['isAllReportsAccepted'] = false;
|
||||
// $data['isHaveReports'] = false;
|
||||
// }
|
||||
// // Can Commented
|
||||
|
||||
// $reportCount = filled($reports) ? $reports->count() : 0;
|
||||
// $data['reportCount'] = $reportCount;
|
||||
|
||||
// $data['cooperationCompletion'] = $data['mediaOrder'] && $data['mediaOrder']->completions()
|
||||
// ? $data['mediaOrder']->completions()->where('media_id', $data['mediaId'])->first()
|
||||
// : null;
|
||||
|
||||
// if ($data['mediaOrder'] && $reportCount === $data['mediaOrder']->required_reports) {
|
||||
// $data['isReportsCompleted'] = true;
|
||||
// } else {
|
||||
// $data['isReportsCompleted'] = false;
|
||||
// }
|
||||
|
||||
// // $data['meuda']
|
||||
|
||||
// // dd($mediaCooperation);
|
||||
|
||||
// return view('dashboard.media-cooperations.processes.reports.index-media', $data);
|
||||
// } else {
|
||||
// $data['mediaOrder'] = $mediaCooperation->mediaOrder;
|
||||
// $data['reporterMedia'] = $paramMediaId ? Media::findOrFail(decrypt_id($paramMediaId)) : null;
|
||||
// $data['reporterMediaId'] = $paramMediaId ? decrypt_id($paramMediaId) : null;
|
||||
|
||||
// if (!$paramMediaId) {
|
||||
// return view('dashboard.media-cooperations.processes.reports.index-admin', $data);
|
||||
// } else {
|
||||
// return view('dashboard.media-cooperations.processes.reports.index-media', $data);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// Tab Selesai
|
||||
}else if($process === 'completion'){
|
||||
$data['title'] = 'Penyelesaian';
|
||||
|
||||
@ -25,6 +25,8 @@ public function rules(): array
|
||||
return [
|
||||
'payment_request_letter' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'invoice' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'bank_reference' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'electronic_tax_invoice' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'other_document' => ['nullable', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'description' => ['nullable'],
|
||||
];
|
||||
@ -43,6 +45,16 @@ public function messages(): array
|
||||
'invoice.mimes' => 'Invoice/Tagihan harus berformat PDF.',
|
||||
'invoice.max' => 'Ukuran Invoice/Tagihan tidak boleh lebih dari 2MB.',
|
||||
|
||||
'bank_reference.required' => 'Referensi Bank wajib diunggah.',
|
||||
'bank_reference.file' => 'Referensi Bank harus berupa file yang valid.',
|
||||
'bank_reference.mimes' => 'Referensi Bank harus berformat PDF.',
|
||||
'bank_reference.max' => 'Ukuran Referensi Bank tidak boleh lebih dari 2MB.',
|
||||
|
||||
'electronic_tax_invoice.required' => 'E-Faktur wajib diunggah.',
|
||||
'electronic_tax_invoice.file' => 'E-Faktur harus berupa file yang valid.',
|
||||
'electronic_tax_invoice.mimes' => 'E-Faktur harus berformat PDF.',
|
||||
'electronic_tax_invoice.max' => 'Ukuran E-Faktur tidak boleh lebih dari 2MB.',
|
||||
|
||||
'other_document.required' => 'Dokumen lainnya wajib diunggah.',
|
||||
'other_document.file' => 'Dokumen lainnya harus berupa file yang valid.',
|
||||
'other_document.mimes' => 'Dokumen lainnya harus berformat PDF.',
|
||||
|
||||
@ -31,13 +31,13 @@ public function rules(): array
|
||||
];
|
||||
|
||||
if($this->isMethod('post')){
|
||||
$roles['email'] = ['required', 'email', 'max:100', 'unique:users,email'];
|
||||
$rules['email'] = ['required', 'email', 'max:100', 'unique:users,email'];
|
||||
$rules['password'] = ['required', 'confirmed', Password::min(8)
|
||||
->mixedCase()
|
||||
->numbers()
|
||||
->symbols()];
|
||||
}else if($this->isMethod('put')){
|
||||
$roles['email'] = ['required', 'email', 'max:100'];
|
||||
$rules['email'] = ['required', 'email', 'max:100'];
|
||||
$rules['password'] = ['nullable', 'confirmed', Password::min(8)
|
||||
->mixedCase()
|
||||
->numbers()
|
||||
|
||||
@ -11,6 +11,8 @@ class CooperationCompletion extends Model
|
||||
protected $fillable = [
|
||||
'payment_request_letter',
|
||||
'invoice',
|
||||
'bank_reference',
|
||||
'electronic_tax_invoice',
|
||||
'other_document',
|
||||
'description',
|
||||
'status',
|
||||
|
||||
@ -15,6 +15,8 @@ public function up(): void
|
||||
$table->id();
|
||||
$table->string('payment_request_letter');
|
||||
$table->string('invoice');
|
||||
$table->string('bank_reference')->nullable();
|
||||
$table->string('electronic_tax_invoice')->nullable();
|
||||
$table->string('other_document')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->enum('status', ['0', '1', '2', '3'])->default('0');
|
||||
|
||||
@ -0,0 +1,163 @@
|
||||
@include('partials.dashboard.head')
|
||||
@include('partials.dashboard.sidebar', ['page' => 'cooperation-completions'])
|
||||
@include('partials.dashboard.header')
|
||||
<!-- content @s -->
|
||||
<div class="nk-content ">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block-head nk-block-head-sm">
|
||||
<div class="nk-block-between">
|
||||
<div class="nk-block-head-content">
|
||||
<h3 class="nk-block-title page-title">{{$title}}</h3>
|
||||
</div><!-- .nk-block-head-content -->
|
||||
@if (is_role(['1']))
|
||||
<div class="nk-block-head-content">
|
||||
<div class="toggle-wrap nk-block-tools-toggle">
|
||||
<a href="#" class="btn btn-icon btn-trigger toggle-expand me-n1" data-target="pageMenu"><em class="icon ni ni-more-v"></em></a>
|
||||
<div class="toggle-expand-content" data-content="pageMenu">
|
||||
<ul class="nk-block-tools g-3">
|
||||
{{-- <li>
|
||||
<div class="drodown">
|
||||
<a href="#" class="dropdown-toggle btn btn-white btn-dim btn-outline-light" data-bs-toggle="dropdown"><em class="d-none d-sm-inline icon ni ni-calender-date"></em><span><span class="d-none d-md-inline">Last</span> 30 Days</span><em class="dd-indc icon ni ni-chevron-right"></em></a>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<ul class="link-list-opt no-bdr">
|
||||
<li><a href="#"><span>Last 30 Days</span></a></li>
|
||||
<li><a href="#"><span>Last 6 Months</span></a></li>
|
||||
<li><a href="#"><span>Last 1 Years</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li> --}}
|
||||
<li>
|
||||
@if (filled(value: $date) || filled(value: $month) ||filled(value: $year))
|
||||
<span class="mx-1">
|
||||
<a href="{{route('dashboard.cooperations.index')}}" class="text-secondary">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-xbox-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 2c5.523 0 10 4.477 10 10s-4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10m3.6 5.2a1 1 0 0 0 -1.4 .2l-2.2 2.933l-2.2 -2.933a1 1 0 1 0 -1.6 1.2l2.55 3.4l-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2 -2.933l2.2 2.933a1 1 0 0 0 1.6 -1.2l-2.55 -3.4l2.55 -3.4a1 1 0 0 0 -.2 -1.4" /></svg>
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
<div>
|
||||
<a href="javascript: void(0);" class="btn btn-white btn-dim btn-outline-light" data-bs-toggle="modal" data-bs-target="#modalFilter"><em class="d-none d-sm-inline icon ni ni-filter"></em><span><span class="d-none d-md-inline">Filter</a>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<a href="javascript: void(0);" class="btn btn-info" data-bs-toggle="modal" data-bs-target="#modalExport"><em class="d-none d-sm-inline icon ni ni-upload"></em><span><span class="d-none d-md-inline">Export</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .nk-block-head-content -->
|
||||
@endif
|
||||
</div><!-- .nk-block-between -->
|
||||
</div><!-- .nk-block-head -->
|
||||
<div class="nk-block nk-block-lg">
|
||||
<div class="card card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered nowrap" id="cooperationCompletionsTable" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10% !important;">No</th>
|
||||
<th>Kerjasama</th>
|
||||
<th>Perusahan</th>
|
||||
<th>Media</th>
|
||||
{{-- <th>Tanggal Mulai Pengajuan</th>
|
||||
<th>Tanggal Akhir Pengajuan</th> --}}
|
||||
<th>Status</th>
|
||||
<th style="width: 10% !important;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modalFilter">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Filter</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<form action="{{route('dashboard.cooperations.filter')}}" class="form-validate is-alter" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Data kerjasama pada tahun" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="month">Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="month" placeholder="Data berita pada bulan dan tahun" name="month" value="{{ old('month', $month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="date">Tanggal</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="date" class="form-control" id="date" placeholder="Data berita pada bulan dan tahun" name="date" value="{{ old('date', $date ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Filter</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modalExport">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Export</h5>
|
||||
<a href="javascript:void(0);" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<form action="{{route('dashboard.cooperations.export')}}" class="form-validate is-alter" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="year">Tahun</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="number" class="form-control" id="year" placeholder="Data kerjasama pada tahun" name="year" value="{{ old('year', $year ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="month">Bulan</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="month" class="form-control" id="month" placeholder="Data berita pada bulan dan tahun" name="month" value="{{ old('month', $month ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="date">Tanggal</label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="date" class="form-control" id="date" placeholder="Data berita pada bulan dan tahun" name="date" value="{{ old('date', $date ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="submit" class="btn btn-sm btn-primary">Export</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer' ,['datatable' => 'cooperation_completion'])
|
||||
@ -0,0 +1,278 @@
|
||||
@include('partials.dashboard.head')
|
||||
@include('partials.dashboard.sidebar', ['page' => 'cooperations'])
|
||||
@include('partials.dashboard.header')
|
||||
<!-- content @s -->
|
||||
<div class="nk-content ">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block nk-block-lg">
|
||||
<div class="card">
|
||||
<div class="card-aside-wrap">
|
||||
<div class="card-content">
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-primary" href="#"><em class="icon ni ni-info"></em><span>Detail Penyelesaian Kerjasama</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
<div class="nk-block">
|
||||
{{-- <div class="nk-block-head">
|
||||
<h5 class="title">Personal Information</h5>
|
||||
<p>Basic info, like your name and address, that you use on Nio Platform.</p>
|
||||
</div> --}}
|
||||
<div class="profile-ud-list">
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Nama Kegiatan</span>
|
||||
<span class="profile-ud-value">{{$cooperationCompletion->order->cooperation->name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Media</span>
|
||||
<span class="profile-ud-value">{{$cooperationCompletion->media->name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Diunggah Pada</span>
|
||||
<span class="profile-ud-value">{{idn_date($cooperationCompletion->created_at, 'l, d F Y')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Status</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->status === '0')
|
||||
<span class="profile-ud-value"><span class="badge bg-warning">Menunggu</span></span>
|
||||
@elseif($cooperationCompletion->status === '1')
|
||||
<span class="profile-ud-value"><span class="badge bg-success">Diterima</span></span>
|
||||
@elseif($cooperationCompletion->status === '2')
|
||||
<span class="profile-ud-value"><span class="badge bg-danger">Ditolak</span></span>
|
||||
@else
|
||||
<span class="profile-ud-value"><span class="badge bg-secondary">Tidak Diketahui</span></span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .profile-ud-list -->
|
||||
</div><!-- .nk-block -->
|
||||
{{-- <div class="nk-divider divider md"></div> --}}
|
||||
<div class="nk-block">
|
||||
<div class="nk-block-head nk-block-head-sm nk-block-between">
|
||||
<span class="profile-ud-label">Deskripsi</span>
|
||||
</div><!-- .nk-block-head -->
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
{!!$cooperationCompletion->description!!}
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div><!-- .nk-block -->
|
||||
<div id="accordion" class="accordion my-3">
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-1">
|
||||
<h6 class="title">Surat Permohonan Pembayaran</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-1" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->payment_request_letter))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-2">
|
||||
<h6 class="title">Invoice/Tagihan</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-2" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Referensi Bank</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-3" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->bank_reference))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-4">
|
||||
<h6 class="title">E-Faktur</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-4" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->electronic_tax_invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Dokumen Lainnya</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-3" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->other_document))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
Tidak ada
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($cooperationCompletion->status !== '2')
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperation.completions.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
<a href="javascript:void(0);" class="btn btn-danger mx-1" data-bs-toggle="modal" data-bs-target="#modalForm">
|
||||
<em class="icon ni ni-cross"></em><span>Tolak</span>
|
||||
</a>
|
||||
<a href="javascript:void(0);"
|
||||
onclick="itemConfirm('{{ route('dashboard.cooperation.completions.accept', ['id' => encrypt_id($cooperationCompletion->id)]) }}', 'Apakah Anda yakin ingin menerima penyelesaian kerjasama ini?', 'Ya, terima!')"
|
||||
class="btn btn-primary">
|
||||
<em class="icon ni ni-check"></em><span>Terima</span>
|
||||
</a>
|
||||
</div><!-- .nk-block -->
|
||||
@endif
|
||||
</div><!-- .card-inner -->
|
||||
</div><!-- .card-content -->
|
||||
</div><!-- .card-aside-wrap -->
|
||||
</div>
|
||||
@if ($cooperationCompletion->status === '2')
|
||||
<div class="card card-bordered card-preview">
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-warning" href="#"><em class="icon ni ni-na"></em><span>Data Penolakan</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
{{-- {{dd($mediaCooperationPivot->status != '0')}} --}}
|
||||
<form action="#" method="post">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="rejection_reason">Alasan Menolak</label>
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
{!!$cooperationCompletion->rejection_reason!!}
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperation.completions.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
</div><!-- .nk-block -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="modal fade" id="modalForm">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Tolak Bukti Penyelesaian</h5>
|
||||
<a href="#" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{route('dashboard.cooperation.completions.reject.action.index', ['id' => encrypt_id($cooperationCompletion->id)])}}" class="form-validate is-alter" method="post" id="myForm">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="full-name">Alasan Menolak</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="tinymce-basic form-control" name="rejection_reason" id="rejection_reason" >{!!old('rejection_reason')!!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="button" class="btn btn-md btn-primary" id="submitButton">Kirim</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => false])
|
||||
@ -0,0 +1,270 @@
|
||||
@include('partials.dashboard.head')
|
||||
@include('partials.dashboard.sidebar', ['page' => 'cooperations'])
|
||||
@include('partials.dashboard.header')
|
||||
<!-- content @s -->
|
||||
<div class="nk-content ">
|
||||
<div class="container-fluid">
|
||||
<div class="nk-content-inner">
|
||||
<div class="nk-content-body">
|
||||
<div class="nk-block nk-block-lg">
|
||||
<div class="card">
|
||||
<div class="card-aside-wrap">
|
||||
<div class="card-content">
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-primary" href="#"><em class="icon ni ni-info"></em><span>Detail Penyelesaian Kerjasama</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
<div class="nk-block">
|
||||
{{-- <div class="nk-block-head">
|
||||
<h5 class="title">Personal Information</h5>
|
||||
<p>Basic info, like your name and address, that you use on Nio Platform.</p>
|
||||
</div> --}}
|
||||
<div class="profile-ud-list">
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Nama Kegiatan</span>
|
||||
<span class="profile-ud-value">{{$cooperationCompletion->order->cooperation->name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Media</span>
|
||||
<span class="profile-ud-value">{{$cooperationCompletion->media->name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Diunggah Pada</span>
|
||||
<span class="profile-ud-value">{{idn_date($cooperationCompletion->created_at, 'l, d F Y')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Status</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->status === '0')
|
||||
<span class="profile-ud-value"><span class="badge bg-warning">Menunggu</span></span>
|
||||
@elseif($cooperationCompletion->status === '1')
|
||||
<span class="profile-ud-value"><span class="badge bg-success">Diterima</span></span>
|
||||
@elseif($cooperationCompletion->status === '2')
|
||||
<span class="profile-ud-value"><span class="badge bg-danger">Ditolak</span></span>
|
||||
@else
|
||||
<span class="profile-ud-value"><span class="badge bg-secondary">Tidak Diketahui</span></span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .profile-ud-list -->
|
||||
</div><!-- .nk-block -->
|
||||
{{-- <div class="nk-divider divider md"></div> --}}
|
||||
<div class="nk-block">
|
||||
<div class="nk-block-head nk-block-head-sm nk-block-between">
|
||||
<span class="profile-ud-label">Deskripsi</span>
|
||||
</div><!-- .nk-block-head -->
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
{!!$cooperationCompletion->description!!}
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div><!-- .nk-block -->
|
||||
<div id="accordion" class="accordion my-3">
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-1">
|
||||
<h6 class="title">Surat Permohonan Pembayaran</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-1" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->payment_request_letter))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->payment_request_letter) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-2">
|
||||
<h6 class="title">Invoice/Tagihan</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-2" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Referensi Bank</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-3" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->bank_reference))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-4">
|
||||
<h6 class="title">E-Faktur</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-4" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->electronic_tax_invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Dokumen Lainnya</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-3" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->other_document))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
Tidak ada
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($cooperationCompletion->status !== '2')
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperation.completions.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
</div><!-- .nk-block -->
|
||||
@endif
|
||||
</div><!-- .card-inner -->
|
||||
</div><!-- .card-content -->
|
||||
</div><!-- .card-aside-wrap -->
|
||||
</div>
|
||||
@if ($cooperationCompletion->status === '2')
|
||||
<div class="card card-bordered card-preview">
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-warning" href="#"><em class="icon ni ni-na"></em><span>Data Penolakan</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
{{-- {{dd($mediaCooperationPivot->status != '0')}} --}}
|
||||
<form action="#" method="post">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="rejection_reason">Alasan Menolak</label>
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
{!!$cooperationCompletion->rejection_reason!!}
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperation.completions.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
</div><!-- .nk-block -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="modal fade" id="modalForm">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Tolak Bukti Penyelesaian</h5>
|
||||
<a href="#" class="close" data-bs-dismiss="modal" aria-label="Close">
|
||||
<em class="icon ni ni-cross"></em>
|
||||
</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{route('dashboard.cooperation.completions.reject.action.index', ['id' => encrypt_id($cooperationCompletion->id)])}}" class="form-validate is-alter" method="post" id="myForm">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="full-name">Alasan Menolak</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="tinymce-basic form-control" name="rejection_reason" id="rejection_reason" >{!!old('rejection_reason')!!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<span class="sub-text">
|
||||
<button type="button" class="btn btn-md btn-primary" id="submitButton">Kirim</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => false])
|
||||
@ -120,6 +120,54 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Referensi Bank</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-3" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->bank_reference))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->bank_reference) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-4">
|
||||
<h6 class="title">E-Faktur</h6>
|
||||
<span class="accordion-icon"></span>
|
||||
</a>
|
||||
<div class="accordion-body collapse" id="accordion-item-4" data-bs-parent="#accordion">
|
||||
<div class="accordion-inner">
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->electronic_tax_invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->electronic_tax_invoice) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="accordion-item">
|
||||
<a href="#" class="accordion-head" data-bs-toggle="collapse" data-bs-target="#accordion-item-3">
|
||||
<h6 class="title">Dokumen Lainnya</h6>
|
||||
@ -130,10 +178,10 @@
|
||||
<div class="bq-note">
|
||||
<div class="bq-note-item">
|
||||
<div class="bq-note-text">
|
||||
@if (filled($cooperationCompletion->invoice))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}"
|
||||
@if (filled($cooperationCompletion->other_document))
|
||||
<iframe src="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}"
|
||||
width="100%" height="400">
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->invoice) }}">di sini</a>.</p>
|
||||
<p>Browser Anda tidak mendukung PDF viewer. Anda bisa mengunduh PDF ini <a href="{{ asset('storage/uploads/cooperation-completions/' . $cooperationCompletion->other_document) }}">di sini</a>.</p>
|
||||
</iframe>
|
||||
@else
|
||||
Tidak ada
|
||||
|
||||
@ -46,6 +46,28 @@
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="bank_reference">Referensi Bank<span class="required-input">*</span> <span class="pdf-label">(PDF)</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('bank_reference') border-danger @enderror" id="bank_reference" name="bank_reference" accept="application/pdf">
|
||||
</div>
|
||||
@error('bank_reference')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="electronic_tax_invoice">E-Faktur<span class="required-input">*</span> <span class="pdf-label">(PDF)</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('electronic_tax_invoice') border-danger @enderror" id="electronic_tax_invoice" name="electronic_tax_invoice" accept="application/pdf">
|
||||
</div>
|
||||
@error('electronic_tax_invoice')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="other_document">Dokumen Lainnya<span class="pdf-label">(PDF)</span></label>
|
||||
@ -106,6 +128,32 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Referensi Bank</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->bank_reference)
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->bank_reference)}}" target="__blank" class="btn btn-sm btn-info"><em class="icon ni ni-eye"></em> Lihat</a>
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->bank_reference)}}" class="btn btn-sm btn-primary" download="Referensi Bank - Kerjasama {{$mediaOrder->cooperation->name}}"><em class="icon ni ni-download"></em> Unduh</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">E-Faktur</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->electronic_tax_invoice)
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->electronic_tax_invoice)}}" target="__blank" class="btn btn-sm btn-info"><em class="icon ni ni-eye"></em> Lihat</a>
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->electronic_tax_invoice)}}" class="btn btn-sm btn-primary" download="E-Faktur - Kerjasama {{$mediaOrder->cooperation->name}}"><em class="icon ni ni-download"></em> Unduh</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-ud-item">
|
||||
<div class="profile-ud wider">
|
||||
<span class="profile-ud-label">Dokumen Lainnya</span>
|
||||
|
||||
@ -981,6 +981,35 @@
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if ($datatable === 'cooperation_completion')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#cooperationCompletionsTable').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: '{{ route('dashboard.cooperation.completions.data.index') }}',
|
||||
columns: [
|
||||
{ data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false },
|
||||
{ data: 'cooperation', name: 'cooperation' },
|
||||
{ data: 'company_name', name: 'company_name' },
|
||||
{ data: 'media_name', name: 'media_name' },
|
||||
{ data: 'status', name: 'status' },
|
||||
{ data: 'action', name: 'action' },
|
||||
{ data: 'created_at', name: 'created_at', visible: false },
|
||||
{ data: 'id', name: 'id', orderable: true, searchable: false, visible: false },
|
||||
],
|
||||
language: datatableLanguage,
|
||||
responsive: true,
|
||||
autoWidth: false,
|
||||
order: [[6, 'desc']],
|
||||
pagingType: "simple",
|
||||
lengthMenu: [[10, 25, 50, 100, -1], ['Tampilkan 10 data', 'Tampilkan 25 data', 'Tampilkan 50 data', 'Tampilkan 100 data', 'Tampilkan semua']],
|
||||
scrollX: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@if ($datatable === 'cooperation_archive')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -143,6 +143,12 @@
|
||||
<span class="nk-menu-text">Kerjasama Media</span>
|
||||
</a>
|
||||
</li><!-- .nk-menu-item -->
|
||||
<li class="nk-menu-item">
|
||||
<a href="{{route('dashboard.cooperation.completions.index')}}" class="nk-menu-link {{$page === 'cooperation-completions' ? 'active-page' : ''}}">
|
||||
<span class="nk-menu-icon"><em class="icon ni ni-clipboad-check"></em></span>
|
||||
<span class="nk-menu-text">Penyelesaian Kerjasama</span>
|
||||
</a>
|
||||
</li><!-- .nk-menu-item -->
|
||||
{{-- @if (is_role(['1']))
|
||||
<li class="nk-menu-item">
|
||||
<a href="javascript:void(0);" class="nk-menu-link">
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-button ms-30px xxl-ms-10px xs-ms-0">
|
||||
<a href="{{route('login')}}" class="btn btn-dark-gray btn-small btn-rounded btn-box-shadow btn-switch-text fw-600">
|
||||
<a href="{{Auth::check() ? route('dashboard.overview') : route('login')}}" class="btn btn-dark-gray btn-small btn-rounded btn-box-shadow btn-switch-text fw-600">
|
||||
<span>
|
||||
<span class="btn-double-text" data-text="Masuk">Masuk</span>
|
||||
</span>
|
||||
|
||||
@ -477,6 +477,9 @@
|
||||
Route::middleware('role:1,3')->group(function(){
|
||||
Route::prefix('cooperation-completions')->name('cooperation.completions.')->group(function(){
|
||||
Route::controller(CooperationCompletionController::class)->group(function(){
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::get('/show/{id}', 'showIndex')->name('show.index');
|
||||
Route::get('/process/{id}', 'processIndex')->name('process.index');
|
||||
Route::get('/{mediaOrderId}/show/{id}', 'show')->name('show');
|
||||
Route::post('/{id}', 'store')->name('store');
|
||||
Route::get('/{id}/edit', 'edit')->name('edit');
|
||||
@ -487,10 +490,12 @@
|
||||
Route::post('/{id}/accept', 'accept')->name('accept');
|
||||
Route::get('/{mediaOrderId}/reject/{id}', 'reject')->name('reject');
|
||||
Route::post('/{mediaOrderId}/reject/{id}', 'rejectAction')->name('reject.action');
|
||||
Route::post('/reject/{id}', 'rejectActionIndex')->name('reject.action.index');
|
||||
});
|
||||
});
|
||||
|
||||
Route::get('/data/{id}', [DatatableController::class, 'adminCooperationCompletion'])->name('data');
|
||||
Route::get('/data/index', [DatatableController::class, 'cooperationCompletionIndex'])->name('data.index');
|
||||
Route::get('/data/cooperation/{id}', [DatatableController::class, 'adminCooperationCompletion'])->name('data');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user