@extends('layout.layout') @section('content')
Edit Script
@csrf @method('PUT')
{{-- Title & Category --}}
@error('title')
{{ $message }}
@enderror
@error('category_name')
{{ $message }}
@enderror
{{-- Description --}}
@error('description')
{{ $message }}
@enderror
{{-- Visibility / Department --}}
@error('visibility')
{{ $message }}
@enderror
@error('department_id')
{{ $message }}
@enderror
{{-- Status (Marketing Manager only) --}} @if($staff && $staff->jobTitle && $staff->jobTitle->slug === 'marketing_manager')
@error('status')
{{ $message }}
@enderror
@endif {{-- Keywords --}}
@error('keywords')
{{ $message }}
@enderror

{{-- Existing Attachments --}}
Existing Attachments
@if($scr->attachments && $scr->attachments->count())
@foreach($scr->attachments as $file) @php $ext = strtolower(pathinfo($file->file_path, PATHINFO_EXTENSION)); $isImage = in_array($ext, ['jpg','jpeg','png','gif','webp']); @endphp
@if($isImage) @else @endif
{{ basename($file->file_path) }}
View
@endforeach
@else

No attachments uploaded.

@endif
{{-- Add New Attachments --}}
@error('attachments')
{{ $message }}
@enderror
@endsection