diff --git a/app/Http/Controllers/Dashboard/ContentRecapClassificationController.php b/app/Http/Controllers/Dashboard/ContentRecapClassificationController.php new file mode 100644 index 0000000..333f996 --- /dev/null +++ b/app/Http/Controllers/Dashboard/ContentRecapClassificationController.php @@ -0,0 +1,111 @@ + "Klasifikasi Rekap Konten" + ]); + } + + public function create(){ + return view('dashboard.content-recaps.classifications.create', [ + 'title' => "Tambah Klasifikasi Rekap Konten" + ]); + } + + public function store(ContentRecapClassificationRequest $request){ + $validatedData = $request->validated(); + $validatedData['slug'] = Str::slug($validatedData['name']); + $validatedData['enhancer_id'] = Auth::id(); + + $existedData = ContentRecapClassification::withTrashed()->where('slug', $validatedData['slug'])->first(); + + if($existedData && filled($existedData->deleted_at)){ + return redirect()->back()->with('data-exists', $validatedData['slug']); + }elseif($existedData){ + return redirect()->back()->with('failed-status', 'Tema dengan nama tersebut sudah ada.'); + } + + $createdClassification = ContentRecapClassification::create($validatedData); + + if($createdClassification){ + return redirect()->route('dashboard.content.recap.classifications.index')->with('success-status', 'Berhasil menambahkan klasifikasi rekap konten.'); + }else{ + return redirect()->back()->with('failed-status', 'Gagal menambahkan klasifikasi rekap konten.'); + } + } + + public function edit($id){ + $contentRecapClassification = ContentRecapClassification::findOrFail(decrypt_id($id)); + + return view('dashboard.content-recaps.classifications.edit', [ + 'title' => "Ubah Klasifikasi Rekap Konten", + 'contentRecapClassification' => $contentRecapClassification + ]); + } + + public function update(ContentRecapClassificationRequest $request, $id){ + $validatedData = $request->validated(); + $validatedData['slug'] = Str::slug($validatedData['name']); + $validatedData['enhancer_id'] = Auth::id(); + + $contentRecapClassification = ContentRecapClassification::findOrFail(decrypt_id($id)); + $updatedContentRecapClassification = $contentRecapClassification->update($validatedData); + + if($updatedContentRecapClassification){ + return redirect()->back()->with('success-status', 'Berhasil mengubah klasifikasi rekap konten.'); + }else{ + return redirect()->back()->with('failed-status', 'Gagal mengubah klasifikasi rekap konten.'); + } + } + + public function show($id){ + $contentRecapClassification = ContentRecapClassification::findOrFail(decrypt_id($id)); + + return view('dashboard.content-recaps.classifications.show', [ + 'title' => "Detail Klasifikasi Rekap Konten", + 'contentRecapClassification' => $contentRecapClassification + ]); + } + + public function destroy($id){ + try { + $contentRecapClassification = ContentRecapClassification::findOrFail(decrypt_id($id)); + + $contentRecapClassification->delete(); + + return response()->json(['message' => 'Berhasil menghapus klasifikasi rekap konten.']); + } catch (\Exception $e) { + return response()->json(['message' => 'Gagal menghapus klasifikasi rekap konten.'], 500); + } + } + + public function restore($slug) + { + $recapContentClassification = ContentRecapClassification::withTrashed() + ->where('slug', $slug) + ->first(); + + if (!$recapContentClassification) { + return redirect()->back()->with('failed-status', 'Klasifikasi tidak ditemukan.'); + } + + if (filled($recapContentClassification->deleted_at)) { + $recapContentClassification->restore(); + return redirect()->back()->with('success-status', 'Klasifikasi berhasil dipulihkan.'); + } + + return redirect()->back()->with('info-status', 'Klasifikasi sudah aktif.'); + } +} diff --git a/app/Http/Controllers/Dashboard/ContentRecapController.php b/app/Http/Controllers/Dashboard/ContentRecapController.php index c5c9aa9..f5fff70 100644 --- a/app/Http/Controllers/Dashboard/ContentRecapController.php +++ b/app/Http/Controllers/Dashboard/ContentRecapController.php @@ -5,6 +5,7 @@ use App\Http\Controllers\Controller; use App\Http\Requests\ContentRecapRequest; use App\Models\ContentRecap; +use App\Models\ContentRecapClassification; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -18,7 +19,8 @@ public function index(){ public function create(){ return view('dashboard.content-recaps.create', [ - 'title' => 'Tambah Rekap Konten' + 'title' => 'Tambah Rekap Konten', + 'classifications' => ContentRecapClassification::all() ]); } @@ -26,6 +28,10 @@ public function store(ContentRecapRequest $request){ $validatedData = $request->validated(); $validatedData['enhancer_id'] = Auth::id(); + if($request->has('image')){ + $validatedData['image'] = store_file($validatedData['image'], '/uploads/content-recaps', 'public')['randomFileName']; + } + $createdContentRecap = ContentRecap::create($validatedData); if($createdContentRecap){ @@ -40,7 +46,8 @@ public function edit($id){ return view('dashboard.content-recaps.edit', [ 'title' => 'Ubah Rekap Konten', - 'contentRecap' => $contentRecap + 'contentRecap' => $contentRecap, + 'classifications' => ContentRecapClassification::all() ]); } @@ -49,6 +56,13 @@ public function update(ContentRecapRequest $request, $id){ $validatedData['enhancer_id'] = Auth::id(); $contentRecap = ContentRecap::findOrFail(decrypt_id($id)); + if($request->has('image')){ + delete_file('app/public/uploads/content-recaps/'.$contentRecap->image); + $validatedData['image'] = store_file($validatedData['image'], '/uploads/content-recaps', 'public')['randomFileName']; + }else{ + $validatedData['image'] = $contentRecap->image; + } + $updatedContentRecap = $contentRecap->update($validatedData); if($updatedContentRecap){ @@ -79,4 +93,13 @@ public function destroy($id){ return response()->json(['message' => 'Gagal menghapus rekap konten.'], 500); } } + + public function checkLink(Request $request) + { + $linkExists = ContentRecap::where('link', $request->link)->exists(); + + return response()->json([ + 'exists' => $linkExists + ]); + } } diff --git a/app/Http/Controllers/Dashboard/DatatableController.php b/app/Http/Controllers/Dashboard/DatatableController.php index 84f2a0a..caacbe8 100644 --- a/app/Http/Controllers/Dashboard/DatatableController.php +++ b/app/Http/Controllers/Dashboard/DatatableController.php @@ -8,6 +8,7 @@ use App\Models\Classification; use App\Models\Company; use App\Models\ContentRecap; +use App\Models\ContentRecapClassification; use App\Models\Cooperation; use App\Models\CooperationProposal; use App\Models\GovernmentAgency; @@ -412,6 +413,113 @@ public function governmentAgency(Request $request){ } + public function airingProofTheme(Request $request){ + if ($request->ajax()) { + + + + $data = AiringProofTheme::all(); + + return DataTables::of($data) + ->addIndexColumn() + ->addColumn('date_created', function ($data) { + return idn_date($data->created_at, 'l, d F Y'); + }) + ->addColumn('action', function ($data) { + $showUrl = route('dashboard.airing.proof.themes.show', ['id' => encrypt_id($data->id)]); + + $editUrl = route('dashboard.airing.proof.themes.edit', ['id' => encrypt_id($data->id)]); + + $deleteUrl = route('dashboard.airing.proof.themes.destroy', ['id' => encrypt_id($data->id)]); + + $dropdown = ''; + + return $dropdown; + }) + + ->rawColumns(['action']) + ->make(true); + } + + return response()->json(['error' => 'Unauthorized'], 401); + + } + + public function contentRecapClassification(Request $request){ + if ($request->ajax()) { + + + + $data = ContentRecapClassification::all(); + + return DataTables::of($data) + ->addIndexColumn() + ->addColumn('content_recaps', function ($data) { + $contentRecapsCount = $data->contentRecaps->count(); + + if($contentRecapsCount > 0){ + return $contentRecapsCount. ' [Lihat]'; + }else{ + return $contentRecapsCount; + } + }) + ->addColumn('date_created', function ($data) { + return idn_date($data->created_at, 'l, d F Y'); + }) + ->addColumn('action', function ($data) { + $showUrl = route('dashboard.content.recap.classifications.show', ['id' => encrypt_id($data->id)]); + + $editUrl = route('dashboard.content.recap.classifications.edit', ['id' => encrypt_id($data->id)]); + + $deleteUrl = route('dashboard.content.recap.classifications.destroy', ['id' => encrypt_id($data->id)]); + + $dropdown = ''; + + return $dropdown; + }) + + ->rawColumns(['action']) + ->make(true); + } + + return response()->json(['error' => 'Unauthorized'], 401); + + } + public function news(Request $request){ if ($request->ajax()) { @@ -643,55 +751,6 @@ public function mediaAnnouncement(Request $request, $category){ } - public function airingProofTheme(Request $request){ - if ($request->ajax()) { - - - - $data = AiringProofTheme::all(); - - return DataTables::of($data) - ->addIndexColumn() - ->addColumn('date_created', function ($data) { - return idn_date($data->created_at, 'l, d F Y'); - }) - ->addColumn('action', function ($data) { - $showUrl = route('dashboard.airing.proof.themes.show', ['id' => encrypt_id($data->id)]); - - $editUrl = route('dashboard.airing.proof.themes.edit', ['id' => encrypt_id($data->id)]); - - $deleteUrl = route('dashboard.airing.proof.themes.destroy', ['id' => encrypt_id($data->id)]); - - $dropdown = ''; - - return $dropdown; - }) - - ->rawColumns(['action']) - ->make(true); - } - - return response()->json(['error' => 'Unauthorized'], 401); - - } - public function company(Request $request){ if ($request->ajax()) { @@ -1991,6 +2050,9 @@ public function contentRecap(Request $request){ ->addColumn('channel', function ($data){ return Str::ucfirst($data->channel); }) + ->addColumn('classification', function ($data){ + return Str::ucfirst($data->classification->name); + }) ->addColumn('posted_date', function ($data){ return idn_date($data->posted_date, 'd F Y'); }) diff --git a/app/Http/Requests/ContentRecapClassificationRequest.php b/app/Http/Requests/ContentRecapClassificationRequest.php new file mode 100644 index 0000000..43707e0 --- /dev/null +++ b/app/Http/Requests/ContentRecapClassificationRequest.php @@ -0,0 +1,39 @@ +|string> + */ + public function rules(): array + { + return [ + 'name' => ['required', 'max:100'], + 'description' => ['nullable'], + ]; + } + + public function messages(): array + { + return [ + 'name.required' => 'Nama harus diisi.', + 'name.max' => 'Nama tidak boleh lebih dari 100 karakter.', + 'description.nullable' => 'Deskripsi bersifat opsional.', + ]; + } +} diff --git a/app/Http/Requests/ContentRecapRequest.php b/app/Http/Requests/ContentRecapRequest.php index 9422c41..1b47057 100644 --- a/app/Http/Requests/ContentRecapRequest.php +++ b/app/Http/Requests/ContentRecapRequest.php @@ -22,13 +22,22 @@ public function authorize(): bool */ public function rules(): array { - return [ + $rules = [ 'title' => ['required'], 'posted_date' => ['required', 'date'], 'channel'=> ['required', 'in:website,tiktok,youtube,instagram,facebook,twitter,cetak'], 'link' => ['required', 'url'], - 'classification' => ['required'], + 'classification_id' => ['required', 'exists:content_recap_classifications,id'], + 'social_media' => ['required'], ]; + + if($this->isMethod('post')){ + $rules['image'] = ['required', 'image', 'mimes:png,jpg,jpeg', 'max:2048']; + }else if($this->isMethod('put')){ + $rules['image'] = ['nullable', 'image', 'mimes:png,jpg,jpeg', 'max:2048']; + } + + return $rules; } public function messages() @@ -41,8 +50,15 @@ public function messages() 'channel.in' => 'Channel harus salah satu dari: website, tiktok, youtube, instagram, facebook, twitter, atau cetak.', 'link.required' => 'Link wajib diisi.', 'link.url' => 'Link harus berupa URL yang valid.', - 'classification.required' => 'Klasifikasi wajib diisi.', + 'classification_id.required' => 'Klasifikasi wajib dipilih.', + 'classification_id.exists' => 'Klasifikasi tidak ditemukan dalam data yang tersedia.', + 'social_media.required' => 'Media sosial wajib diisi.', + 'image.required' => 'Gambar wajib diunggah.', + 'image.image' => 'File yang diunggah harus berupa gambar.', + 'image.mimes' => 'Format gambar harus PNG, JPG, atau JPEG.', + 'image.max' => 'Ukuran gambar maksimal 2MB.', ]; } + } diff --git a/app/Http/Requests/NewsRequest.php b/app/Http/Requests/NewsRequest.php index 713edfa..2ba169a 100644 --- a/app/Http/Requests/NewsRequest.php +++ b/app/Http/Requests/NewsRequest.php @@ -28,7 +28,7 @@ public function rules(): array 'link' => ['nullable', 'url'], 'tag' => ['nullable'], 'category' => ['required', 'in:0,1'], - 'image' => 'nullable', 'image', 'mimes:png,jpg,jpeg', 'max:4096' + 'image' => ['nullable', 'image', 'mimes:png,jpg,jpeg', 'max:2048'] ]; return $rules; diff --git a/app/Models/ContentRecap.php b/app/Models/ContentRecap.php index 217f8f8..8a55ba0 100644 --- a/app/Models/ContentRecap.php +++ b/app/Models/ContentRecap.php @@ -3,9 +3,11 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class ContentRecap extends Model { + use SoftDeletes; protected $table = 'content_recaps'; protected $fillable = [ @@ -13,7 +15,9 @@ class ContentRecap extends Model 'posted_date', 'channel', 'link', - 'classification', + 'classification_id', + 'social_media', + 'image', 'enhancer_id', ]; @@ -21,4 +25,8 @@ public function enhancer() { return $this->belongsTo(User::class, 'enhancer_id', 'id'); } + + public function classification(){ + return $this->belongsTo(ContentRecapClassification::class, 'classification_id', 'id'); + } } diff --git a/app/Models/ContentRecapClassification.php b/app/Models/ContentRecapClassification.php new file mode 100644 index 0000000..2e375ae --- /dev/null +++ b/app/Models/ContentRecapClassification.php @@ -0,0 +1,24 @@ +hasMany(ContentRecap::class, 'classification_id', 'id'); + } +} diff --git a/app/Models/Legacy/OldContentRecap.php b/app/Models/Legacy/OldContentRecap.php new file mode 100644 index 0000000..411133a --- /dev/null +++ b/app/Models/Legacy/OldContentRecap.php @@ -0,0 +1,12 @@ +id(); + $table->string('name'); + $table->string('slug'); + $table->string('year'); + $table->text('description')->nullable(); + $table->unsignedBigInteger('enhancer_id'); + $table->foreign('enhancer_id')->references('id')->on('users'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('content_recap_classifications'); + } +}; diff --git a/database/migrations/2025_02_28_010029_create_content_recaps_table.php b/database/migrations/2025_04_15_102641_create_content_recaps_table.php similarity index 68% rename from database/migrations/2025_02_28_010029_create_content_recaps_table.php rename to database/migrations/2025_04_15_102641_create_content_recaps_table.php index 9bf3fd4..82e49a9 100644 --- a/database/migrations/2025_02_28_010029_create_content_recaps_table.php +++ b/database/migrations/2025_04_15_102641_create_content_recaps_table.php @@ -13,14 +13,19 @@ public function up(): void { Schema::create('content_recaps', function (Blueprint $table) { $table->id(); - $table->string('title'); + $table->text('title'); $table->date('posted_date'); $table->enum('channel', ['website', 'tiktok', 'youtube', 'instagram', 'facebook', 'twitter', 'cetak']); $table->string('link'); - $table->string('classification'); + $table->string('image')->nullable(); + $table->string('social_media')->nullable(); + $table->text('description')->nullable(); + $table->unsignedBigInteger('classification_id')->nullable(); $table->unsignedBigInteger('enhancer_id'); $table->foreign('enhancer_id')->references('id')->on('users'); + $table->foreign('classification_id')->references('id')->on('content_recap_classifications'); $table->timestamps(); + $table->softDeletes(); }); } diff --git a/database/seeders/ContentRecapClassificationSeeder.php b/database/seeders/ContentRecapClassificationSeeder.php new file mode 100644 index 0000000..cd49c80 --- /dev/null +++ b/database/seeders/ContentRecapClassificationSeeder.php @@ -0,0 +1,32 @@ + $legacyContentRecapClassification->id, + 'name' => $legacyContentRecapClassification->name, + 'slug' => slugify($legacyContentRecapClassification->name.' '.$legacyContentRecapClassification->year), + 'year' => $legacyContentRecapClassification->year, + 'created_at' => $legacyContentRecapClassification->created_at, + 'updated_at' => $legacyContentRecapClassification->updated_at, + 'deleted_at' => $legacyContentRecapClassification->deleted_at, + 'enhancer_id' => 1, + ]); + } + } +} diff --git a/database/seeders/ContentRecapSeeder.php b/database/seeders/ContentRecapSeeder.php index 67cddbc..4408f42 100644 --- a/database/seeders/ContentRecapSeeder.php +++ b/database/seeders/ContentRecapSeeder.php @@ -2,6 +2,8 @@ namespace Database\Seeders; +use App\Models\ContentRecap; +use App\Models\Legacy\OldContentRecap; use Illuminate\Database\Console\Seeds\WithoutModelEvents; use Illuminate\Database\Seeder; @@ -12,6 +14,23 @@ class ContentRecapSeeder extends Seeder */ public function run(): void { - // + $legacyContentRecaps = OldContentRecap::all(); + + foreach($legacyContentRecaps as $legacyContentRecap){ + ContentRecap::create([ + 'id' => $legacyContentRecap->id, + 'title' => $legacyContentRecap->title, + 'posted_date' => $legacyContentRecap->posting_date == '0000-00-00' ? now() : $legacyContentRecap->posting_date, + 'channel' => $legacyContentRecap->channel, + 'link' => $legacyContentRecap->link, + 'image' => $legacyContentRecap->image, + 'classification_id' => $legacyContentRecap->classification_id, + 'created_at' => $legacyContentRecap->created_at, + 'updated_at' => $legacyContentRecap->updated_at, + 'deleted_at' => $legacyContentRecap->deleted_at, + 'enhancer_id' => $legacyContentRecap->enhancer, + 'social_media' => $legacyContentRecap->social_media, + ]); + } } } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 182fcb0..8dd16e7 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -20,6 +20,8 @@ public function run(): void $this->call(SubClassificationSeeder::class); $this->call(LocationSeeder::class); $this->call(SubLocationSeeder::class); + $this->call(ContentRecapClassificationSeeder::class); + $this->call(ContentRecapSeeder::class); $this->call(NewsSeeder::class); $this->call(CompanySeeder::class); $this->call(MediaSeeder::class); diff --git a/public/assets/dashboard/js/custom.js b/public/assets/dashboard/js/custom.js index 47a774c..4fada11 100644 --- a/public/assets/dashboard/js/custom.js +++ b/public/assets/dashboard/js/custom.js @@ -28,105 +28,63 @@ // strengthStatus.className = colorClass; // }); -$(document).ready(function() { - // Setup CSRF token untuk semua AJAX request +$(document).ready(function () { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); - let typingTimer; - let delay = 500; + function setupLinkChecker(inputSelector, feedbackSelector, checkUrl) { + let typingTimer; + let delay = 500; - $('#link').on('keyup', function() { - clearTimeout(typingTimer); - let inputField = $(this); - let linkValue = inputField.val(); + $(inputSelector).on('keyup', function () { + clearTimeout(typingTimer); + const inputField = $(this); + const linkValue = inputField.val(); - if (linkValue.length > 0) { - typingTimer = setTimeout(function() { - $.ajax({ - url: '/dashboard/media-monitorings/check-link', // Sesuaikan dengan route yang benar - method: 'POST', - data: { link: linkValue }, // CSRF sudah otomatis ditambahkan - success: function(response) { - console.log('Response:', response); - if (response.exists) { - $('#linkFeedback') - .removeClass('d-none text-success') - .addClass('text-danger') - .text('Link tersebut sudah ada di database!'); - inputField.addClass('is-invalid').removeClass('is-valid'); - } else { - $('#linkFeedback') - .removeClass('d-none text-danger') - .addClass('text-success') - .text('Link tidak ada di database.'); - inputField.addClass('is-valid').removeClass('is-invalid'); + if (linkValue.length > 0) { + typingTimer = setTimeout(function () { + $.ajax({ + url: checkUrl, + method: 'POST', + data: { link: linkValue }, + success: function (response) { + console.log('Response:', response); + const feedbackEl = $(feedbackSelector); + if (response.exists) { + feedbackEl + .removeClass('d-none text-success') + .addClass('text-danger') + .text('Link tersebut sudah ada di database!'); + inputField.addClass('is-invalid').removeClass('is-valid'); + } else { + feedbackEl + .removeClass('d-none text-danger') + .addClass('text-success') + .text('Link tidak ada di database.'); + inputField.addClass('is-valid').removeClass('is-invalid'); + } + }, + error: function (xhr, status, error) { + console.error('AJAX Error:', error); } - }, - error: function(xhr, status, error) { - console.error('AJAX Error:', error); // Debugging - } - }); - }, delay); - } else { - $('#linkFeedback').addClass('d-none'); - inputField.removeClass('is-invalid is-valid'); - } - }); + }); + }, delay); + } else { + $(feedbackSelector).addClass('d-none').text(''); + inputField.removeClass('is-invalid is-valid'); + } + }); + } + + // Panggil fungsi untuk masing-masing input + setupLinkChecker('#mediaMonitoringLink', '#mediaMonitoringLinkFeedback', '/dashboard/media-monitorings/check-link'); + setupLinkChecker('#reportLink', '#reportLinkFeedback', '/dashboard/reports/check-link'); + setupLinkChecker('#contentRecapLink', '#contentRecapLinkFeedback', '/dashboard/content-recaps/check-link'); }); -$(document).ready(function() { - // Setup CSRF token untuk semua AJAX request - $.ajaxSetup({ - headers: { - 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') - } - }); - - let typingTimer; - let delay = 500; - - $('#reportLink').on('keyup', function() { - clearTimeout(typingTimer); - let inputField = $(this); - let linkValue = inputField.val(); - - if (linkValue.length > 0) { - typingTimer = setTimeout(function() { - $.ajax({ - url: '/dashboard/reports/check-link', // Sesuaikan dengan route yang benar - method: 'POST', - data: { link: linkValue }, // CSRF sudah otomatis ditambahkan - success: function(response) { - console.log('Response:', response); - if (response.exists) { - $('#linkFeedback') - .removeClass('d-none text-success') - .addClass('text-danger') - .text('Link tersebut sudah ada di database!'); - inputField.addClass('is-invalid').removeClass('is-valid'); - } else { - $('#linkFeedback') - .removeClass('d-none text-danger') - .addClass('text-success') - .text('Link tidak ada di database.'); - inputField.addClass('is-valid').removeClass('is-invalid'); - } - }, - error: function(xhr, status, error) { - console.error('AJAX Error:', error); // Debugging - } - }); - }, delay); - } else { - $('#linkFeedback').addClass('d-none'); - inputField.removeClass('is-invalid is-valid'); - } - }); -}); document.querySelector('.image-preview').addEventListener('change', function(event) { var reader = new FileReader(); diff --git a/resources/views/dashboard/content-recaps/classifications/create.blade.php b/resources/views/dashboard/content-recaps/classifications/create.blade.php new file mode 100644 index 0000000..455df00 --- /dev/null +++ b/resources/views/dashboard/content-recaps/classifications/create.blade.php @@ -0,0 +1,76 @@ +@include('partials.dashboard.head') +@include('partials.dashboard.sidebar', ['page' => 'content_recap_classifications']) +@include('partials.dashboard.header') + +
+
+
+
+
+ @if (session()->has('data-exists')) +
+
+ Tema Sudah Ada.
Tema dengan nama dan tahun tersebut sudah ada di database, namun dalam kondisi terhapus. Anda ingin mengembalikannya? +
+ Ya + Tidak +
+
+
+ @endif +
+
+
+
{{$title}}
+
+
+ @csrf +
+
+
+ +
+ +
+ @error('name') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('year') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+
+
+
+
+
+ Kembali + +
+
+
+
+
+
+
+
+
+
+
+ +@include('partials.dashboard.footer', ['rich_editor' => true]) diff --git a/resources/views/dashboard/content-recaps/classifications/edit.blade.php b/resources/views/dashboard/content-recaps/classifications/edit.blade.php new file mode 100644 index 0000000..287a0c5 --- /dev/null +++ b/resources/views/dashboard/content-recaps/classifications/edit.blade.php @@ -0,0 +1,70 @@ +@include('partials.dashboard.head') +@include('partials.dashboard.sidebar', ['page' => 'content_recap_classifications']) +@include('partials.dashboard.header') + +
+
+
+
+
+
+
+
+
{{$title}}
+
+
+ @csrf + @method('put') +
+
+
+ +
+ +
+ @error('name') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+ @error('year') + {{$message}} + @enderror +
+
+
+
+ +
+ +
+
+
+
+
+
+ @if (request()->query('show')) + Kembali + @else + Kembali + @endif + +
+
+
+
+
+
+
+
+
+
+
+ +@include('partials.dashboard.footer', ['rich_editor' => true]) diff --git a/resources/views/dashboard/content-recaps/classifications/index.blade.php b/resources/views/dashboard/content-recaps/classifications/index.blade.php new file mode 100644 index 0000000..a2b5723 --- /dev/null +++ b/resources/views/dashboard/content-recaps/classifications/index.blade.php @@ -0,0 +1,62 @@ +@include('partials.dashboard.head') +@include('partials.dashboard.sidebar', ['page' => 'content_recap_classifications']) +@include('partials.dashboard.header') + +
+
+
+
+
+
+
+

{{$title}}

+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+ + + + + + + + + + +
NoNamaRekap KontenTanggal Dibuat
+
+
+
+
+
+
+
+
+ +@include('partials.dashboard.footer' ,['datatable' => 'content_recap_classification']) diff --git a/resources/views/dashboard/content-recaps/classifications/show.blade.php b/resources/views/dashboard/content-recaps/classifications/show.blade.php new file mode 100644 index 0000000..f396490 --- /dev/null +++ b/resources/views/dashboard/content-recaps/classifications/show.blade.php @@ -0,0 +1,79 @@ +@include('partials.dashboard.head') +@include('partials.dashboard.sidebar', ['page' => 'content_recap_classifications']) +@include('partials.dashboard.header') + +
+
+
+
+
+
+
+
+ +
+
+ {{--
+
Personal Information
+

Basic info, like your name and address, that you use on Nio Platform.

+
--}} +
+
+
+ Nama Klasifikasi + {{$contentRecapClassification->name}} +
+
+
+
+ Rekap Konten + + @if ($contentRecapClassification->contentRecaps->count() > 0) + {{$contentRecapClassification->contentRecaps->count()}} + @else + {{$contentRecapClassification->contentRecaps->count()}} + @endif + +
+
+
+
+ Dibuat Pada + {{idn_date($contentRecapClassification->created_at, 'l, d F Y')}} +
+
+
+
+ {{--
--}} +
+
+ Deskripsi +
+
+
+
+ {!! filled($contentRecapClassification->description) ? $contentRecapClassification->description : '-' !!} +
+
+
+
+
+
+ Kembali + Ubah +
+
+
+
+
+
+
+
+
+
+ +@include('partials.dashboard.footer', ['rich_editor' => false]) diff --git a/resources/views/dashboard/content-recaps/create.blade.php b/resources/views/dashboard/content-recaps/create.blade.php index f23c53c..13952b1 100644 --- a/resources/views/dashboard/content-recaps/create.blade.php +++ b/resources/views/dashboard/content-recaps/create.blade.php @@ -12,10 +12,7 @@
{{$title}}
- @foreach ($errors->all() as $item) - {{$item}} - @endforeach -
+ @csrf
@@ -33,7 +30,8 @@
- + +
@error('link') {{$message}} @@ -42,13 +40,26 @@
- +
- + +
+
+
+
+
+ +
+
- @error('classification') - {{$message}} - @enderror
@@ -78,11 +89,25 @@
+
+
+ +
+
+ + +
+
+ @error('posted_date') + {{$message}} + @enderror +
+

Kembali - +
diff --git a/resources/views/dashboard/content-recaps/edit.blade.php b/resources/views/dashboard/content-recaps/edit.blade.php index dc1ebf7..170cf8d 100644 --- a/resources/views/dashboard/content-recaps/edit.blade.php +++ b/resources/views/dashboard/content-recaps/edit.blade.php @@ -15,7 +15,7 @@ @foreach ($errors->all() as $item) {{$item}} @endforeach - + @csrf @method('put')
@@ -43,13 +43,26 @@
- +
- + +
+
+
+
+
+ +
+
- @error('classification') - {{$message}} - @enderror
@@ -79,11 +92,25 @@
+
+
+ +
+
+ + +
+
+ @error('posted_date') + {{$message}} + @enderror +
+

Kembali - +
diff --git a/resources/views/dashboard/content-recaps/index.blade.php b/resources/views/dashboard/content-recaps/index.blade.php index 2627ac3..8f33453 100644 --- a/resources/views/dashboard/content-recaps/index.blade.php +++ b/resources/views/dashboard/content-recaps/index.blade.php @@ -45,6 +45,7 @@ No Judul Kanal + Social Media Tanggal Posting Klasifikasi Link diff --git a/resources/views/dashboard/issue-managements/create.blade.php b/resources/views/dashboard/issue-managements/create.blade.php index e76c551..2448c1b 100644 --- a/resources/views/dashboard/issue-managements/create.blade.php +++ b/resources/views/dashboard/issue-managements/create.blade.php @@ -173,7 +173,7 @@
diff --git a/resources/views/dashboard/journalists/show.blade.php b/resources/views/dashboard/journalists/show.blade.php index 30cc543..9e20e79 100644 --- a/resources/views/dashboard/journalists/show.blade.php +++ b/resources/views/dashboard/journalists/show.blade.php @@ -111,7 +111,7 @@ @case(3) - Ditolak + Ditolak @break diff --git a/resources/views/dashboard/media-monitorings/create.blade.php b/resources/views/dashboard/media-monitorings/create.blade.php index 5069ff4..5e5b979 100644 --- a/resources/views/dashboard/media-monitorings/create.blade.php +++ b/resources/views/dashboard/media-monitorings/create.blade.php @@ -52,8 +52,8 @@
- - + +
@error('link') {{$message}} diff --git a/resources/views/partials/app/datatable.blade.php b/resources/views/partials/app/datatable.blade.php index 82398b5..aeb4fc9 100644 --- a/resources/views/partials/app/datatable.blade.php +++ b/resources/views/partials/app/datatable.blade.php @@ -254,6 +254,62 @@ @endif +@if ($datatable === 'airing_proof_theme') + +@endif + +@if ($datatable === 'content_recap_classification') + +@endif + @if ($datatable === 'news') @endif -@if ($datatable === 'airing_proof_theme') - -@endif - @if ($datatable === 'company')