@extends('layouts.app')
@section('page_title', 'Station Management')
@section('content')
@if (session('error'))
{{ session('error') }}
@endif
Debug: Raw Stations Data
{{ json_encode($stations, JSON_PRETTY_PRINT) }}
@include('components.station-component', [
'pageTitle' => 'Station Management',
'data' => $stations ?? [],
'columns' => [
['name' => 'Station Code', 'key' => 'station_code', 'sortable' => true],
['name' => 'Station Name', 'key' => 'station_name', 'sortable' => true],
['name' => 'Branch Name', 'key' => 'branch_name', 'sortable' => true],
['name' => 'Date Created', 'key' => 'date_created', 'sortable' => true],
['name' => 'Created By', 'key' => 'created_by', 'sortable' => true],
['name' => 'Modified By', 'key' => 'modified_by', 'sortable' => true],
['name' => 'Date Modified', 'key' => 'date_modified', 'sortable' => true]
],
'actions' => ['view', 'edit', 'delete'],
'showAddButton' => true,
'addButtonUrl' => route('stations.create'),
'showCheckboxes' => false,
'showBatchDelete' => false,
'showEditModal' => true,
'showViewModal' => true,
'currentPage' => $currentPage ?? 1,
'lastPage' => $lastPage ?? 1,
'total' => $total ?? 0,
'search' => $search ?? null,
])
@endsection