@extends('layouts.app')
@section('title','Brands')
@section('content')
<div class="page-head"><div><h1>Brands</h1><p>Bilingual brand dictionary used for products and translation suggestions.</p></div></div><div class="row g-2"><div class="col-lg-4"><form method="POST" action="{{ route('brands.store') }}" class="card-erp">@csrf<div class="card-erp-header">New brand</div><div class="card-erp-body"><label class="form-label">Code</label><input name="code" class="form-control mb-2"><label class="form-label">English name</label><input name="name_en" class="form-control mb-2" required><label class="form-label">Arabic name</label><input name="name_ar" class="form-control mb-2" dir="rtl" required><label class="form-label">Description</label><textarea name="description" class="form-control mb-2"></textarea><label class="form-label">Status</label><select name="status" class="form-select mb-3"><option>active</option><option>inactive</option></select><button class="btn btn-primary w-100">Create brand</button></div></form></div><div class="col-lg-8"><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Code</th><th>Brand</th><th>Arabic</th><th>Status</th><th>Quick edit</th></tr></thead><tbody>@foreach($brands as $b)<tr><form method="POST" action="{{ route('brands.update',$b) }}">@csrf @method('PUT')<td><input name="code" class="form-control" value="{{ $b->code }}"></td><td><input name="name_en" class="form-control" value="{{ $b->name_en }}" required></td><td><input name="name_ar" class="form-control" dir="rtl" value="{{ $b->name_ar }}" required></td><td><select name="status" class="form-select"><option @selected($b->status==='active')>active</option><option @selected($b->status==='inactive')>inactive</option></select><input type="hidden" name="description" value="{{ $b->description }}"></td><td><button class="btn btn-light border btn-dense">Save</button></td></form></tr>@endforeach</tbody></table></div></div></div></div>
@endsection
