feat: cooperation completion
This commit is contained in:
parent
14c6530855
commit
aca0df9828
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Dashboard;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\CooperationCompletionRequest;
|
||||
use App\Models\Cooperation;
|
||||
use App\Models\CooperationCompletion;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class CooperationCompletionController extends Controller
|
||||
{
|
||||
public function store(CooperationCompletionRequest $request, $id){
|
||||
$validatedData = $request->validated();
|
||||
|
||||
$validatedData['payment_request_letter'] = store_file($validatedData['payment_request_letter'], 'uploads/cooperation-completions', 'public')['randomFileName'];
|
||||
|
||||
$validatedData['invoice'] = store_file($validatedData['invoice'], 'uploads/cooperation-completions', 'public')['randomFileName'];
|
||||
|
||||
$validatedData['other_document'] = store_file($validatedData['other_document'], 'uploads/cooperation-completions', 'public')['randomFileName'];
|
||||
|
||||
$validatedData['order_id'] = decrypt_id($id);
|
||||
$validatedData['media_id'] = Auth::user()->company->media->id;
|
||||
|
||||
$createdCompletion = CooperationCompletion::create($validatedData);
|
||||
if($createdCompletion){
|
||||
return redirect()->back()->with('success-status', 'Berhasil mengirim formulir.');
|
||||
}else{
|
||||
return redirect()->back()->with('failed-status', 'Gagal mengirim formulir.');
|
||||
}
|
||||
}
|
||||
|
||||
public function show($mediaOrderId, $id){
|
||||
$cooperationCompletion = CooperationCompletion::findOrFail(decrypt_id($id));
|
||||
|
||||
return view('dashboard.cooperation-completions.show', [
|
||||
'title' => 'Detail Penyelesaian Kerjasama',
|
||||
'cooperationCompletion' => $cooperationCompletion,
|
||||
'mediaOrderId' => $mediaOrderId
|
||||
]);
|
||||
}
|
||||
|
||||
public function accept($id){
|
||||
$completion = CooperationCompletion::with(['order', 'media'])->findOrFail(decrypt_id($id));
|
||||
|
||||
$acceptedCompletion = $completion->update([
|
||||
'status' => '1'
|
||||
]);
|
||||
|
||||
if ($acceptedCompletion) {
|
||||
return redirect()->back()->with('success-status', 'Berhasil menyetujui penyelesaian kerjasama.');
|
||||
} else {
|
||||
return redirect()->back()->with('failed-status', 'Gagal menyetujui penyelesaian kerjasama');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function reject($mediaOrderId, $id){
|
||||
$cooperationCompletion = CooperationCompletion::findOrFail(decrypt_id($id));
|
||||
|
||||
return view('dashboard.cooperation-completions.reject', [
|
||||
'title' => 'Tolak Penyelesaian Kerjasama',
|
||||
'cooperationCompletion' => $cooperationCompletion,
|
||||
'mediaOrderId' => $mediaOrderId
|
||||
]);
|
||||
}
|
||||
|
||||
public function rejectAction(Request $request, $mediaOrderId, $id){
|
||||
|
||||
$validatedData = $request->validate([
|
||||
'rejection_reason' => ['required'],
|
||||
], [
|
||||
'rejection_reason.required' => 'Alasan penolakan wajib diisi.',
|
||||
]);
|
||||
|
||||
$completion = CooperationCompletion::with(['order', 'media'])->findOrFail(decrypt_id($id));
|
||||
|
||||
$rejectedCompletion = $completion->update([
|
||||
'status' => '2',
|
||||
'rejection_reason' => $validatedData['rejection_reason']
|
||||
]);
|
||||
|
||||
if ($rejectedCompletion) {
|
||||
return redirect()->back()->with('success-status', 'Berhasil menolak penyelesaian kerjasama.');
|
||||
} else {
|
||||
return redirect()->back()->with('failed-status', 'Gagal menolak penyelesaian kerjasama');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1430,6 +1430,77 @@ class="text-dark"
|
||||
|
||||
}
|
||||
|
||||
public function adminCooperationCompletion(Request $request, $id){
|
||||
if ($request->ajax()) {
|
||||
$mediaOrder = Order::with(['reports', 'media', 'completions.media'])->findOrFail(decrypt_id($id));
|
||||
|
||||
$data = $mediaOrder->completions;
|
||||
|
||||
return DataTables::of($data)
|
||||
->addIndexColumn()
|
||||
->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> <br>';
|
||||
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) use ($mediaOrder){
|
||||
$showUrl = route('dashboard.cooperation.completions.show', ['mediaOrderId' => encrypt_id($mediaOrder->id), 'id' => encrypt_id($data->id)]);
|
||||
|
||||
$acceptUrl = route('dashboard.cooperation.completions.accept', ['id' => encrypt_id($data->id)]);
|
||||
|
||||
$rejectUrl = route('dashboard.cooperation.completions.reject', ['mediaOrderId' => encrypt_id($mediaOrder->id), '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="'.$rejectUrl.'"><em class="icon ni ni-cross"></em><span>Tolak</span></a></li>';
|
||||
}
|
||||
|
||||
$dropdown .= '</ul>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
return $dropdown;
|
||||
})
|
||||
|
||||
->rawColumns(['status', 'action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
return response()->json(['error' => 'Unauthorized'], 401);
|
||||
|
||||
}
|
||||
|
||||
public function contentRecap(Request $request){
|
||||
if ($request->ajax()) {
|
||||
|
||||
|
||||
@ -163,70 +163,69 @@ public function mediaProposalRejectAction(Request $request, $id, $proposalId){
|
||||
|
||||
public function process($id, $process, $paramMediaId = null){
|
||||
$mediaCooperation = Cooperation::with(['media', 'mediaOrder.media'])->findOrFail(decrypt_id($id));
|
||||
|
||||
$data = [
|
||||
'title' => 'Detail Kerjasama',
|
||||
'process' => $process,
|
||||
'mediaCooperation' => $mediaCooperation,
|
||||
'mediaOrder' => $mediaCooperation->mediaOrder,
|
||||
'mediaId' => is_role(['3']) ? Auth::user()->company->media->id : null
|
||||
];
|
||||
|
||||
if(is_role(['3'])){
|
||||
$reports = $data['mediaOrder']->reports->filter(function ($reports) use ($data) {
|
||||
return $reports->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;
|
||||
}
|
||||
}
|
||||
|
||||
// Tab Kerjasama
|
||||
if($process === 'cooperation'){
|
||||
$data['title'] = 'Detail Kerjasama';
|
||||
$data['mediaOrder'] = $mediaCooperation->mediaOrder;
|
||||
|
||||
if(is_role(['3'])){
|
||||
$mediaId = Auth::user()->company->media->id;
|
||||
$mediaOrder = $mediaCooperation->mediaOrder;
|
||||
$mediaOrderSafe = $mediaOrder ? $mediaOrder->media->where('id', $mediaId)->first() : null;
|
||||
$mediaOrderSafe = $data['mediaOrder'] ? $data['mediaOrder']->media->where('id', $data['mediaId'])->first() : null;
|
||||
|
||||
if($mediaOrderSafe){
|
||||
$data['mediaOrderPivot'] = $mediaOrderSafe->pivot;
|
||||
}
|
||||
$data['isHaveReports'] = false;
|
||||
$data['isAllReportsWaiting'] = true;
|
||||
}
|
||||
|
||||
return view('dashboard.media-cooperations.processes.cooperations.index', $data);
|
||||
|
||||
// Tab Media order
|
||||
}else if($process === 'media-order'){
|
||||
$data['title'] = 'Media Order';
|
||||
|
||||
if(is_role(['3'])){
|
||||
$data['mediaOrder'] = $mediaCooperation->mediaOrder;
|
||||
$mediaId = Auth::user()->company->media->id;
|
||||
$data['mediaOrderPivot'] = $mediaCooperation->mediaOrder->media->where('id', $mediaId)->first()->pivot;
|
||||
$data['isHaveReports'] = false;
|
||||
$data['isAllReportsWaiting'] = true;
|
||||
}else{
|
||||
$data['mediaOrder'] = $mediaCooperation->mediaOrder;
|
||||
$data['mediaOrderPivot'] = $data['mediaOrder']->media->where('id', $data['mediaId'])->first()->pivot;
|
||||
}
|
||||
|
||||
return view('dashboard.media-cooperations.processes.media-orders.index', $data);
|
||||
|
||||
// Tab laporan
|
||||
}else if($process === 'reports'){
|
||||
$data['title'] = 'Media Order';
|
||||
$data['title'] = 'Laporan';
|
||||
|
||||
if(is_role(['3'])){
|
||||
$mediaOrderModel = $mediaCooperation->mediaOrder;
|
||||
$data['mediaOrder'] = $mediaOrderModel;
|
||||
$mediaId = Auth::user()->company->media->id;
|
||||
$data['mediaOrderPivot'] = $mediaOrderModel->media->where('id', $mediaId)->first()->pivot;
|
||||
$data['mediaOrderPivot'] = $data['mediaOrder']->media->where('id', $data['mediaId'])->first()->pivot;
|
||||
|
||||
$data['reporterMediaId'] = Auth::user()->company->media->id;
|
||||
$report = $mediaOrderModel->reports->filter(function ($report) use ($data) {
|
||||
return $report->media_id == Auth::user()->company->media->id;
|
||||
});
|
||||
|
||||
if(filled($report)){
|
||||
$isAllReportsAccepted = $report->every(function ($item) {
|
||||
return $item->status === '1';
|
||||
});
|
||||
}else{
|
||||
$isAllReportsAccepted = false;
|
||||
}
|
||||
|
||||
$reportCount = $report->count();
|
||||
$data['isHaveReports'] = $reportCount != 0;
|
||||
$data['isAllReportsAccepted'] = $isAllReportsAccepted;
|
||||
$reportCount = $reports->count();
|
||||
$data['reportCount'] = $reportCount;
|
||||
|
||||
if($reportCount === $mediaOrderModel->required_reports){
|
||||
$data['cooperationCompletion'] = $data['mediaOrder']->completions()->where('media_id', $data['mediaId'])->first();
|
||||
|
||||
if($reportCount === $data['mediaOrder']->required_reports){
|
||||
$data['isReportsCompleted'] = true;
|
||||
}else{
|
||||
$data['isReportsCompleted'] = false;
|
||||
@ -244,6 +243,40 @@ public function process($id, $process, $paramMediaId = null){
|
||||
return view('dashboard.media-cooperations.processes.reports.index-media', $data);
|
||||
}
|
||||
}
|
||||
|
||||
// Tab Selesai
|
||||
}else if($process === 'completion'){
|
||||
$data['title'] = 'Penyelesaian';
|
||||
|
||||
$data['isHaveReports'] = true;
|
||||
$data['isAllReportsAccepted'] = true;
|
||||
|
||||
$data['cooperationCompletion'] = $data['mediaOrder']->completions()->where('media_id', $data['mediaId'])->first();
|
||||
|
||||
if(is_role(['3'])){
|
||||
$data['mediaOrderPivot'] = $data['mediaOrder']->media->where('id', $data['mediaId'])->first()->pivot;
|
||||
return view('dashboard.media-cooperations.processes.completions.index-media', $data);
|
||||
}else{
|
||||
abort(404);
|
||||
}
|
||||
|
||||
}
|
||||
else if($process === 'completions'){
|
||||
$data['title'] = 'Penyelesaian';
|
||||
|
||||
$data['isHaveReports'] = true;
|
||||
$data['isAllReportsAccepted'] = true;
|
||||
|
||||
$data['cooperationCompletion'] = $data['mediaOrder']->completions()->where('media_id', $data['mediaId'])->first();
|
||||
|
||||
if(is_role(['1'])){
|
||||
return view('dashboard.media-cooperations.processes.completions.index-admin', $data);
|
||||
}else{
|
||||
abort(404);
|
||||
}
|
||||
|
||||
}else{
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
53
app/Http/Requests/CooperationCompletionRequest.php
Normal file
53
app/Http/Requests/CooperationCompletionRequest.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class CooperationCompletionRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Auth::check() && is_role(['3']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'payment_request_letter' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'invoice' => ['required', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'other_document' => ['nullable', 'file', 'mimes:pdf', 'max:2048'],
|
||||
'description' => ['nullable'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'payment_request_letter.required' => 'Surat permohonan pembayaran wajib diunggah.',
|
||||
'payment_request_letter.file' => 'Surat permohonan pembayaran harus berupa file yang valid.',
|
||||
'payment_request_letter.mimes' => 'Surat permohonan pembayaran harus berformat PDF.',
|
||||
'payment_request_letter.max' => 'Ukuran surat permohonan pembayaran tidak boleh lebih dari 2MB.',
|
||||
|
||||
'invoice.required' => 'Invoice/Tagihan wajib diunggah.',
|
||||
'invoice.file' => 'Invoice/Tagihan harus berupa file yang valid.',
|
||||
'invoice.mimes' => 'Invoice/Tagihan harus berformat PDF.',
|
||||
'invoice.max' => 'Ukuran Invoice/Tagihan 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.',
|
||||
'other_document.max' => 'Ukuran dokumen lainnya tidak boleh lebih dari 2MB.',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
29
app/Models/CooperationCompletion.php
Normal file
29
app/Models/CooperationCompletion.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CooperationCompletion extends Model
|
||||
{
|
||||
protected $table = 'cooperation_completions';
|
||||
|
||||
protected $fillable = [
|
||||
'payment_request_letter',
|
||||
'invoice',
|
||||
'other_document',
|
||||
'description',
|
||||
'status',
|
||||
'rejection_reason',
|
||||
'media_id',
|
||||
'order_id',
|
||||
];
|
||||
|
||||
public function order(){
|
||||
return $this->belongsTo(Order::class, 'order_id', 'id');
|
||||
}
|
||||
|
||||
public function media(){
|
||||
return $this->belongsTo(Media::class, 'media_id', 'id');
|
||||
}
|
||||
}
|
||||
@ -61,4 +61,8 @@ public function orders()
|
||||
public function reports(){
|
||||
return $this->hasMany(Report::class, 'media_id', 'id');
|
||||
}
|
||||
|
||||
public function completions(){
|
||||
return $this->hasMany(CooperationCompletion::class, 'order_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,4 +36,8 @@ public function cooperation(){
|
||||
public function reports(){
|
||||
return $this->hasMany(Report::class, 'order_id', 'id');
|
||||
}
|
||||
|
||||
public function completions(){
|
||||
return $this->hasMany(CooperationCompletion::class, 'order_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cooperation_completions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('payment_request_letter');
|
||||
$table->string('invoice');
|
||||
$table->string('other_document')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->enum('status', ['0', '1', '2', '3'])->default('0');
|
||||
$table->text('rejection_reason')->nullable();
|
||||
$table->unsignedBigInteger('media_id');
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table->foreign('media_id')->references('id')->on('media');
|
||||
$table->foreign('order_id')->references('id')->on('orders');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cooperation_completions');
|
||||
}
|
||||
};
|
||||
17
database/seeders/CooperationCompletionSeeder.php
Normal file
17
database/seeders/CooperationCompletionSeeder.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CooperationCompletionSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@ -141,3 +141,18 @@ .nk-wizard .actions a[href="#previous"] {
|
||||
.soft-grey-backgorund{
|
||||
background-color: #ebecee !important;
|
||||
}
|
||||
|
||||
.btn-disabled{
|
||||
background-color: #d6d6d6;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
.btn-disabled:hover{
|
||||
background-color: #d6d6d6;
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
.pdf-label{
|
||||
font-size: 0.6rem !important;
|
||||
color: grey !important;
|
||||
}
|
||||
|
||||
@ -0,0 +1,196 @@
|
||||
@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">Menerima</span></span>
|
||||
@elseif($cooperationCompletion->status === '2')
|
||||
<span class="profile-ud-value"><span class="badge bg-danger">Menolak</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">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->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
|
||||
Tidak ada
|
||||
@endif
|
||||
</div>
|
||||
</div><!-- .bq-note-item -->
|
||||
</div><!-- .bq-note -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .card-inner -->
|
||||
</div><!-- .card-content -->
|
||||
</div><!-- .card-aside-wrap -->
|
||||
</div>
|
||||
<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="{{route('dashboard.cooperation.completions.reject.action', ['mediaOrderId' => $mediaOrderId,'id' => encrypt_id($cooperationCompletion->id)])}}" method="post" id="myForm">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="rejection_reason">Alasan Menolak @if ($cooperationCompletion->status === '0')
|
||||
<span class="required-input">*</span>
|
||||
@endif </label>
|
||||
@if ($cooperationCompletion->status === '0')
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="tinymce-basic form-control" name="rejection_reason" id="rejection_reason" >{!!old('rejection_reason')!!}</textarea>
|
||||
</div>
|
||||
@elseif ($cooperationCompletion->status === '2')
|
||||
<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 -->
|
||||
@endif
|
||||
</div>
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperations.process', ['id' => $mediaOrderId, 'process' => 'completions'])}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
@if ($cooperationCompletion->status !== '2')
|
||||
<button type="submit" class="btn btn-primary" id="submitButton">Kirim</button>
|
||||
@endif
|
||||
</div><!-- .nk-block -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => false])
|
||||
193
resources/views/dashboard/cooperation-completions/show.blade.php
Normal file
193
resources/views/dashboard/cooperation-completions/show.blade.php
Normal file
@ -0,0 +1,193 @@
|
||||
@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">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->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
|
||||
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.cooperations.process', ['id' => $mediaOrderId, 'process' => 'completions'])}}" 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.cooperations.process', ['id' => $mediaOrderId, 'process' => 'completions'])}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
</div><!-- .nk-block -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => false])
|
||||
@ -0,0 +1,52 @@
|
||||
@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 card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
@include('dashboard.media-cooperations.processes.tab')
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="cooperation">
|
||||
<div class="card-content">
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card soft-grey-backgorund">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-primary" href="#"><em class="icon ni ni-info"></em><span>Data Laporan Bukti Tayang Media</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered nowrap" id="adminCompletionsTable" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10% !important;">No</th>
|
||||
<th>Nama Media</th>
|
||||
<th>Nama Perusahaan</th>
|
||||
<th>Email</th>
|
||||
<th>Status</th>
|
||||
<th style="width: 10% !important;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .card-content -->
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperations.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
</div><!-- .nk-block -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .card-preview -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => false, 'datatable' => 'admin_completion'])
|
||||
@ -0,0 +1,196 @@
|
||||
@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 card-bordered card-preview">
|
||||
<div class="card-inner">
|
||||
@include('dashboard.media-cooperations.processes.tab')
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="cooperation">
|
||||
<div class="card-content">
|
||||
@if (is_role(['3']))
|
||||
<ul class="nav nav-tabs nav-tabs-mb-icon nav-tabs-card soft-grey-backgorund">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-primary" href="#"><em class="icon ni ni-info"></em><span>Form Penyelesaian Kerjasama</span></a>
|
||||
</li>
|
||||
</ul><!-- .nav-tabs -->
|
||||
<div class="card-inner">
|
||||
@if (!$cooperationCompletion)
|
||||
<form action="{{route('dashboard.cooperation.completions.store', ['id' => encrypt_id($mediaOrder->id)])}}" method="post" enctype="multipart/form-data" id="myForm">
|
||||
@csrf
|
||||
<div class="row g-4">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="payment_request_letter">Surat Permohonan Pembayaran<span class="required-input">*</span> <span class="pdf-label">(PDF)</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('payment_request_letter') border-danger @enderror pdf-preview" name="payment_request_letter" accept="application/pdf">
|
||||
</div>
|
||||
@error('payment_request_letter')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="invoice">Invoice/Tagihan<span class="required-input">*</span> <span class="pdf-label">(PDF)</span></label>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('invoice') border-danger @enderror" id="invoice" name="invoice" accept="application/pdf">
|
||||
</div>
|
||||
@error('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>
|
||||
<div class="form-control-wrap">
|
||||
<input type="file" class="form-control @error('other_document') border-danger @enderror" id="other_document" name="other_document" accept="application/pdf">
|
||||
</div>
|
||||
@error('other_document')
|
||||
<span class="validation-error">{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="description">Deskripsi</label>
|
||||
<div class="form-control-wrap">
|
||||
<textarea class="tinymce-basic form-control" name="description" id="description">{!!old('description')!!}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.media.monitorings.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
<button type="button" class="btn btn-md btn-primary" id="submitButton">Kirim</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@else
|
||||
<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">Surat Permohonan Pembayaran</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->payment_request_letter)
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->payment_request_letter)}}" 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->payment_request_letter)}}" class="btn btn-sm btn-primary" download="Surat Permohonan Pembayaran - 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">Invoice/Tagihan</span>
|
||||
<span class="profile-ud-value">
|
||||
@if ($cooperationCompletion->invoice)
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->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->invoice)}}" class="btn btn-sm btn-primary" download="Invoice - 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>
|
||||
<span class="profile-ud-value">
|
||||
@if (filled($cooperationCompletion->other_document))
|
||||
<a href="{{asset('storage/uploads/cooperation-completions/'. $cooperationCompletion->other_document)}}" 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->other_document)}}" class="btn btn-sm btn-primary" download="Dokumen Lainnya - 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">Tanggal</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-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 -->
|
||||
@if ($cooperationCompletion->status === '2')
|
||||
<div class="nk-block">
|
||||
<div class="nk-block-head nk-block-head-sm nk-block-between">
|
||||
<span class="profile-ud-label">Alasam Penolakan</span>
|
||||
</div><!-- .nk-block-head -->
|
||||
<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><!-- .nk-block -->
|
||||
@endif
|
||||
<hr>
|
||||
<div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperations.index')}}" class="btn btn-white btn-dim btn-outline-light"><span>Kembali</span></a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div><!-- .card-content -->
|
||||
{{-- <div class="nk-block d-flex justify-content-end">
|
||||
<a href="{{route('dashboard.cooperations.index')}}" class="btn btn-white btn-dim btn-outline-light mx-2"><span>Kembali</span></a>
|
||||
@if (!$mediaOrder && is_role(['1']))
|
||||
<a href="{{route('dashboard.media.orders.create', ['id' => encrypt_id($mediaCooperation->id)])}}" class="btn btn-primary"><span>Buat Media Order</span></a>
|
||||
@endif
|
||||
</div><!-- .nk-block --> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .card-preview -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- content @e -->
|
||||
@include('partials.dashboard.footer', ['rich_editor' => true])
|
||||
@ -50,8 +50,12 @@
|
||||
<a href="{{route('dashboard.reports.create', ['id' => encrypt_id($mediaOrder->id)])}}" class="btn btn-primary"><span>Buat Laporan</span></a>
|
||||
@endif
|
||||
|
||||
@if ($isAllReportsAccepted)
|
||||
<a href="{{route('dashboard.reports.create', ['id' => encrypt_id($mediaOrder->id)])}}" class="btn btn-primary"><span>Selesaikan</span></a>
|
||||
@if ($isAllReportsAccepted && !$cooperationCompletion)
|
||||
<a href="{{route('dashboard.cooperations.process', ['id' => encrypt_id($mediaOrder->id), 'process' => 'completion'])}}" class="btn btn-primary"><span>Selesaikan</span></a>
|
||||
@elseif($isReportsCompleted && !$cooperationCompletion)
|
||||
<span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" title="Menunggu semua laporan di setujui.">
|
||||
<button class="btn btn-primary" style="pointer-events: none;" type="button" disabled>Selesaikan</button>
|
||||
</span>
|
||||
@endif
|
||||
</div><!-- .nk-block -->
|
||||
@else
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
Laporan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{$process === 'finish' ? 'active' : ''}}" href="{{ $mediaOrder ? route('dashboard.cooperations.process', ['id' => encrypt_id($mediaCooperation->id), 'process' => 'finish']) : 'javascript:void(0)'}}">
|
||||
<a class="nav-link {{$process === 'completions' ? 'active' : ''}}" href="{{ $mediaOrder ? route('dashboard.cooperations.process', ['id' => encrypt_id($mediaCooperation->id), 'process' => 'completions']) : 'javascript:void(0)'}}">
|
||||
@if (!$mediaOrder)
|
||||
<em class="icon ni ni-lock" style="margin-right: 0.3rem;"></em>
|
||||
@endif
|
||||
@ -36,7 +36,7 @@
|
||||
Laporan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{$process === 'finish' ? 'active' : ''}}" href="{{ $mediaOrder && isset($mediaOrderPivot) && $mediaOrderPivot->status === '1' && $isHaveReports && $isAllReportsAccepted ? route('dashboard.cooperations.process', ['id' => encrypt_id($mediaCooperation->id), 'process' => 'finish']) : 'javascript:void(0)'}}">
|
||||
<a class="nav-link {{$process === 'completion' ? 'active' : ''}}" href="{{ $mediaOrder && isset($mediaOrderPivot) && $mediaOrderPivot->status === '1' && $isHaveReports && $isAllReportsAccepted ? route('dashboard.cooperations.process', ['id' => encrypt_id($mediaCooperation->id), 'process' => 'completion']) : 'javascript:void(0)'}}">
|
||||
@if (!isset($mediaOrder))
|
||||
<em class="icon ni ni-lock" style="margin-right: 0.3rem;"></em>
|
||||
@elseif (!$isHaveReports || !$isAllReportsAccepted)
|
||||
|
||||
@ -582,7 +582,35 @@
|
||||
],
|
||||
language: datatableLanguage,
|
||||
autoWidth: false,
|
||||
order: [[4, 'desc']],
|
||||
order: [[5, '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 === 'admin_completion')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#adminCompletionsTable').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: '{{ route('dashboard.cooperation.completions.data', ["id" => encrypt_id($mediaOrder->id)]) }}',
|
||||
columns: [
|
||||
{ data: 'DT_RowIndex', name: 'DT_RowIndex', orderable: false, searchable: false },
|
||||
{ data: 'media_name', name: 'media_name' },
|
||||
{ data: 'company_name', name: 'company_name' },
|
||||
{ data: 'email', name: 'email' },
|
||||
{ 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,
|
||||
autoWidth: false,
|
||||
order: [[7, '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
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
use App\Http\Controllers\Dashboard\ClassificationController;
|
||||
use App\Http\Controllers\Dashboard\CompanyController;
|
||||
use App\Http\Controllers\Dashboard\ContentRecapController;
|
||||
use App\Http\Controllers\Dashboard\CooperationCompletionController;
|
||||
use App\Http\Controllers\Dashboard\CooperationRequestController;
|
||||
use App\Http\Controllers\Dashboard\DatatableController;
|
||||
use App\Http\Controllers\Dashboard\GovernmentAgencyController;
|
||||
@ -355,6 +356,26 @@
|
||||
Route::get('/media-data/{mediaOrderId}/{mediaId}', [DatatableController::class, 'mediaReport'])->name('media.data');
|
||||
});
|
||||
|
||||
Route::middleware('role:1,3')->group(function(){
|
||||
Route::prefix('cooperation-completions')->name('cooperation.completions.')->group(function(){
|
||||
Route::controller(CooperationCompletionController::class)->group(function(){
|
||||
Route::get('/{mediaOrderId}/show/{id}', 'show')->name('show');
|
||||
Route::post('/{id}', 'store')->name('store');
|
||||
Route::get('/{id}/edit', 'edit')->name('edit');
|
||||
Route::put('/{id}', 'update')->name('update');
|
||||
Route::delete('/{id}', 'destroy')->name('destroy');
|
||||
|
||||
Route::middleware('role:1')->group(function(){
|
||||
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::get('/data/{id}', [DatatableController::class, 'adminCooperationCompletion'])->name('data');
|
||||
});
|
||||
});
|
||||
|
||||
Route::middleware('role:1,4')->group(function(){
|
||||
Route::prefix('content-recaps')->name('content.recaps.')->group(function(){
|
||||
Route::controller(ContentRecapController::class)->group(function(){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user