fix: Update search functionality to use service_name for Rate Cards and improve invoice form script

This commit is contained in:
I-Fun
2026-04-01 22:08:45 +07:00
parent 22f03ccca7
commit 86176c99c7
3 changed files with 22 additions and 21 deletions

View File

@@ -121,7 +121,7 @@ class SearchController extends Controller
}
// ── Rate Cards ───────────────────────────────────────────
$rateCards = RateCard::where('name', 'LIKE', $like)
$rateCards = RateCard::where('service_name', 'LIKE', $like)
->orWhere('description', 'LIKE', $like)
->limit($limit)->get();
@@ -131,7 +131,7 @@ class SearchController extends Controller
'label' => '💰 Rate Cards',
'items' => $rateCards->map(fn ($r) => [
'icon' => '💰',
'title' => $r->name,
'title' => $r->service_name,
'subtitle' => $r->description ?? '',
'url' => route('rate-cards.edit', $r),
])->values()->all(),