AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
67%
Quality Avg
?
72%
Security Avg
?
54%
Reviews
?
37
Review Result ?
jattin01/army · b3febced
The commit adds a fully implemented CategoryMasterController with standard CRUD functionality and basic validation, enhancing business value by enabling category management. ComplaintController changes hint at integrations and improved filtering but are incomplete or used for debugging. Validation and status toggling are handled properly. However, validation unique rule references wrong table name causing bug risk, commented out deletion check undercuts data integrity, and missing authorization/security checks could cause potential risks. The commit message itself is generic and does not describe changes, reducing clarity. Logging resolver details could be removed or secured in production.
Quality
?
80%
Security
?
60%
Business Value
?
75%
Maintainability
?
70%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Missing Validation
Where
app/Http/Controllers/CategoryMasterController.php:24
Issue / Evidence
validation unique rule references wrong table 'category', should be 'category_masters' or correct table name
Suggested Fix
fix unique validation table name to prevent bugs
Missing Validation
Where
app/Http/Controllers/CategoryMasterController.php:82
Issue / Evidence
same issue with unique validation rule with table
Suggested Fix
fix unique validation table name
Commented Out Code Disables Deletion Integ...
Where
app/Http/Controllers/CategoryMasterController.php:105-116
Issue / Evidence
commented out code disables deletion integrity check
Suggested Fix
re-enable checks or implement foreign key constraints to avoid data integrity bugs
Create Method Returns Json Message About U...
Where
app/Http/Controllers/CategoryMasterController.php:18
Issue / Evidence
create method returns json message about using modal
Suggested Fix
consider redirect or proper create view for consistency and better UX
Security Issue
Where
app/Http/Controllers/CategoryMasterController.php:131-148
Issue / Evidence
toggleStatus method lacks authorization checks
Suggested Fix
add authorization to improve security
Consider Consistent Response Structure And...
Where
app/Http/Controllers/CategoryMasterController.php lines with ajax returns
Issue / Evidence
consider consistent response structure and error handling for robustness
Suggested Fix
Review and simplify this section.
Debug Logging Of Resolver Details Includin...
Where
app/Http/Controllers/ComplaintController.php:136-142
Issue / Evidence
debug logging of resolver details including sensitive data
Suggested Fix
remove or secure logging to improve security
Generic And Uninformative
Where
commit message
Issue / Evidence
generic and uninformative
Suggested Fix
write meaningful commit messages that summarize changes and purpose
Code Change Preview · app/Http/Controllers/CategoryMasterController.php
?
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\CategoryMaster; + use Illuminate\Http\Request; + + class CategoryMasterController extends Controller + { + public function index() + { + $categoryMasters = CategoryMaster::orderBy('name', 'asc')->paginate(10); + return view('category-master.index', compact('categoryMasters')); + } + + public function create() + { + return response()->json(['message' => 'Use modal for creating category masters']);
Removed / Before Commit
- namespace App\Http\Controllers; - - use App\Models\Complaint; - use Illuminate\Http\Request; - use Illuminate\Support\Facades\Auth; - use Carbon\Carbon; - use App\Models\User; - - class ComplaintController extends Controller - { - public function index() - { - // Show all complaints regardless of status (resolved, not resolved, null user status) - $complaints = Complaint::with(['resolver', 'assignedBy', 'assignedTo']) - ->orderBy('created_at', 'desc') - ->paginate(10); - - // Debug: Log the total complaints and their statuses
Added / After Commit
+ namespace App\Http\Controllers; + + use App\Models\Complaint; + use App\Models\NatureOfComplaint; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Auth; + use Carbon\Carbon; + use App\Models\User; + use App\Models\Group; + + class ComplaintController extends Controller + { + public function index() + { + // Show all complaints regardless of status (resolved, not resolved, null user status) + $complaints = Complaint::with(['resolver', 'assignedBy', 'assignedTo', 'natureOfComplaint']) + ->orderBy('created_at', 'desc') + ->paginate(10);
Removed / Before Commit
- use App\Models\VIR; - use App\Models\QADecision; - use App\Models\WorkEquipment; - use App\Models\RepairClass; - use App\Models\ProductionYear; - use Illuminate\Support\Str; - use DB; - use Carbon\Carbon; - use Maatwebsite\Excel\Facades\Excel; - use App\Imports\CrcPartMasterImport; - use Throwable; - - class CrcEntryController extends Controller - { - ->first(); - - if ($pendingEntry) { - return redirect()->route('crc.entries.issue', $pendingEntry->workUnit->id)
Added / After Commit
+ use App\Models\VIR; + use App\Models\QADecision; + use App\Models\WorkEquipment; + use App\Models\Equipment; + use App\Models\RepairClass; + use App\Models\ProductionYear; + use App\Models\MasterLogo; + use Illuminate\Support\Str; + use DB; + use Carbon\Carbon; + use Maatwebsite\Excel\Facades\Excel; + use App\Imports\CrcPartMasterImport; + use Throwable; + use App\Models\BerDetail; + + class CrcEntryController extends Controller + { + ->first();
Removed / Before Commit
- use App\Models\Unit; - use Illuminate\Support\Str; - use Illuminate\Support\Facades\DB; - - class CrcRepairController extends Controller - { - // List CRC Repairs with filters - // public function index(Request $request) - // { - // $repairs = CrcRepair::with(['job', 'crcEntry.unit']) - // ->when($request->job_no, fn($q) => $q->whereHas('job', fn($j) => $j->where('job_no', $request->job_no))) - // ->when($request->unit_id, fn($q) => $q->whereHas('crcEntry.unit', fn($u) => $u->where('id', $request->unit_id))) - // ->when($request->part_no, fn($q) => $q->where('part_no', $request->part_no)) - // ->where('initiated_to_wcn', false) - // ->orderByDesc('id') - // ->get(); - - // $jobNos = CrcJob::pluck('job_no');
Added / After Commit
+ use App\Models\Unit; + use Illuminate\Support\Str; + use Illuminate\Support\Facades\DB; + use App\Models\WorkEquipment; + use App\Models\WorkOrder; + + class CrcRepairController extends Controller + { + // public function index(Request $request) + // { + // $repairs = CrcRepair::with(['job', 'crcEntry.unit']) + // ->when($request->job_no, function ($q) use ($request) { + // $q->whereHas('job', function ($j) use ($request) { + // $j->where('job_no', 'like', '%' . $request->job_no . '%'); // ✅ partial match + // }); + // }) + // ->when($request->unit_id, function ($q) use ($request) { + // $q->whereHas('crcEntry.unit', function ($u) use ($request) {
Removed / Before Commit
- } - - private function getMonthlyWorkEquipmentData($startDate, $endDate) - { - $months = ['April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March']; - $totalQuantities = []; - $outQuantities = []; - $debugInfo = []; - - foreach ($months as $month) { - // month name se number nikalo (April = 4, etc.) - $monthNumber = Carbon::parse($month)->month; - - // year decide karo (Jan–Mar next FY) - $year = ($monthNumber >= 4) - ? $startDate->year - : $endDate->year; -
Added / After Commit
+ } + + private function getMonthlyWorkEquipmentData($startDate, $endDate) + { + $months = [ + 'April', 'May', 'June', 'July', 'August', 'September', + 'October', 'November', 'December', 'January', 'February', 'March' + ]; + + $totalQuantities = []; + $outQuantities = []; + $debugInfo = []; + + foreach ($months as $month) { + + $monthNumber = Carbon::parse($month)->month; + + // FY year decide
Removed / Before Commit
- } - - public function store(Request $request) - { - $request->validate([ - 'group' => 'required', - 'repair_class' => 'required', - 'main_eqpt' => 'required', - 'production_year' => 'required', - 'target' => 'required|integer|min:1', - ]); - - EqptTarget::create($request->all()); - - return response()->json(['message' => 'Target Added Successfully']); - } - - public function update(Request $request, $id)
Added / After Commit
+ } + + public function store(Request $request) + { + $rules = [ + 'group' => 'required', + 'repair_class' => 'required', + 'main_eqpt' => 'required', + 'production_year' => 'required', + ]; + + // Target required ONLY if repair_class is NOT DR + if ($request->repair_class !== 'DR') { + $rules['target'] = 'required|integer|min:1'; + } + + $validated = $request->validate($rules); +
Removed / Before Commit
- use Illuminate\Http\Request; - use App\Models\QCCheck; - use App\Models\QaInspectionInitate; - use App\Models\QCInspection; - use DB; - - class EquipmentRepairController extends Controller - // return view('repairs.index', compact('repairs', 'jobNumbers', 'regdNos')); - // } - - public function index(Request $request) - { - ini_set('memory_limit','1024M'); - $user = auth()->user(); - - // ================= BASE CONDITION ================= - $baseCondition = function ($q) { - $q->whereNotExists(function ($query) {
Added / After Commit
+ use Illuminate\Http\Request; + use App\Models\QCCheck; + use App\Models\QaInspectionInitate; + use App\Models\QAInspection; + use App\Models\QCInspection; + use App\Models\VIR; + use App\Models\SubAssyEquipment; + use DB; + + class EquipmentRepairController extends Controller + // return view('repairs.index', compact('repairs', 'jobNumbers', 'regdNos')); + // } + + // public function index(Request $request) + // { + // ini_set('memory_limit','1024M'); + // $user = auth()->user(); +
Removed / Before Commit
- use Illuminate\Http\Request; - use App\Models\WorkEquipment; - use App\Models\Group; - use App\Models\Unit; - use App\Models\Div; - use App\Models\MasterCommand; - ini_set('memory_limit','1024M'); - $filtersApplied = $request->except(['page', 'export']); - $filtersApplied = array_filter($filtersApplied); - - if (count($filtersApplied) > 0) - { - $query = WorkEquipment::with([ - 'workOrder.workUnit.units', - 'workOrder.workUnit.wksps', - 'workOrder.workUnit.commands', - 'workOrder.workUnit.divisions', - 'workOrder.workUnit.corps',
Added / After Commit
+ use Illuminate\Http\Request; + use App\Models\WorkEquipment; + use App\Models\Group; + use App\Models\Vertical; + use App\Models\Unit; + use App\Models\Div; + use App\Models\MasterCommand; + ini_set('memory_limit','1024M'); + $filtersApplied = $request->except(['page', 'export']); + $filtersApplied = array_filter($filtersApplied); + $equipments = []; + + $perPage = request()->get('per_page', 10); // default 10 + + if (count($filtersApplied) > 0) + { + + $query = WorkEquipment::with([
Removed / Before Commit
- - $equipments = []; - - if ($wcnNumber || $unitId || $jobNo) { - $query = WorkEquipment::with('workOrder.workUnit.units'); - - if ($wcnNumber) { - - if ($unitId) { - // Filter by related unit's ID (from `units` table) - $query->whereHas('workOrder.workUnit.units', function ($q) use ($unitId) { - $q->where('id', $unitId); - }); - } - - - // 🔽 All units with WCN and no gate pass - $units = WorkUnit::with('units')
Added / After Commit
+ + $equipments = []; + + if ($wcnNumber || $unitId || $jobNo) + { + $query = WorkEquipment::with('workOrder.workUnit.units'); + + if ($wcnNumber) { + + if ($unitId) { + // Filter by related unit's ID (from `units` table) + $query->whereHas('workOrder.workUnit', function ($q) use ($unitId) { + $q->where('unit', $unitId); + }); + } + + + // 🔽 All units with WCN and no gate pass
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\Grant; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Validator; + use Yajra\DataTables\Facades\DataTables; + + class GrantController extends Controller + { + /** + * Display a listing of resource. + */ + public function index() + { + return view('grant.index'); + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\LedgerMaster; + use Illuminate\Http\Request; + + class LedgerMasterController extends Controller + { + public function index() + { + $ledgerMasters = LedgerMaster::orderBy('name', 'asc')->paginate(10); + return view('ledger-master.index', compact('ledgerMasters')); + } + + public function create() + { + return response()->json(['message' => 'Use modal for creating ledger masters']);
Removed / Before Commit
- use App\Models\McoDemand; - use Illuminate\Http\Request; - use Illuminate\Support\Facades\Crypt; - use DB; - - class McoAdminDemandApprovalController extends Controller - { - $req_no = Crypt::decrypt($req_no); - - // Current year - $year = now()->year; // 2025 - $range = $year . '-' . ($year+1); // 2025-2026 - - - // Check if demand exists in current year - - // New demand no (start from 1 if null) - $newDemandNo = $lastDemandNo ? $lastDemandNo + 1 : 1;
Added / After Commit
+ use App\Models\McoDemand; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Crypt; + use App\Models\ProductionYear; + use DB; + + class McoAdminDemandApprovalController extends Controller + { + $req_no = Crypt::decrypt($req_no); + + $data =ProductionYear::where('is_active',1)->first(); + + + // Check if demand exists in current year + + // New demand no (start from 1 if null) + $newDemandNo = $lastDemandNo ? $lastDemandNo + 1 : 1; +
Removed / Before Commit
- return view('mco.scales.index', compact('scales', 'groups', 'repairClasses', 'equipments')); - } - - - // public function index(Request $request) - // {
Added / After Commit
+ return view('mco.scales.index', compact('scales', 'groups', 'repairClasses', 'equipments')); + } + + public function delete($id) + { + $scale = McoScale::findOrFail($id); + + DB::beginTransaction(); + try { + + // 🔥 Drop dynamic table if exists + if (!empty($scale->table_name) && Schema::hasTable($scale->table_name)) { + Schema::drop($scale->table_name); + } + + // ❌ Delete scale record + $scale->delete(); +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\NatureOfComplaint; + use App\Models\Group; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Validator; + use Yajra\DataTables\Facades\DataTables; + + class NatureOfComplaintController extends Controller + { + /** + * Display a listing of the resource. + */ + public function index() + { + $groups = Group::where('status', '1')->orderBy('name', 'asc')->get();
Removed / Before Commit
- use App\Models\{ - Unit, Wksp, Bde, Div, Co, Corp, MasterCommand, - RepairClass, Group, Equipment, SubAssyEquipment, - WorkUser, WorkUnit, WorkOrder, WorkEquipment,VIR,QCCheck,EquipmentRepair,GatePass,GatePassDetail - }; - use Carbon\Carbon; - use Illuminate\Support\Facades\Auth; - $equipmentCache = Equipment::pluck('id', 'name')->toArray(); - $subAssyCache = SubAssyEquipment::pluck('id', 'sub_equipment_name')->toArray(); - - DB::table('repair_records') - ->orderBy('p_id') - ->chunk(1000, function ($rows) use ( - &$unitCache, &$wkspCache, &$bdeCache, &$divCache, &$coCache, - &$corpCache, &$commandCache, &$repairCache, - &$groupCache, &$equipmentCache, &$subAssyCache - ) { -
Added / After Commit
+ use App\Models\{ + Unit, Wksp, Bde, Div, Co, Corp, MasterCommand, + RepairClass, Group, Equipment, SubAssyEquipment, + WorkUser, WorkUnit, WorkOrder, WorkEquipment,VIR, + QADecision,QCCheck,EquipmentRepair,QaInspectionInitate, + QAInspection,QCInspection,GatePass,GatePassDetail + }; + use Carbon\Carbon; + use Illuminate\Support\Facades\Auth; + $equipmentCache = Equipment::pluck('id', 'name')->toArray(); + $subAssyCache = SubAssyEquipment::pluck('id', 'sub_equipment_name')->toArray(); + + DB::table('repairc_records1401') + ->chunkById(1000, function ($rows) use ( + &$unitCache, &$wkspCache, &$bdeCache, &$divCache, &$coCache, + &$corpCache, &$commandCache, &$repairCache, + &$groupCache, &$equipmentCache, &$subAssyCache + ) {
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\OriginMaster; + use Illuminate\Http\Request; + + class OriginMasterController extends Controller + { + public function index() + { + $originMasters = OriginMaster::orderBy('name', 'asc')->paginate(10); + return view('origin-master.index', compact('originMasters')); + } + + public function create() + { + return response()->json(['message' => 'Use modal for creating origin masters']);
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\PeopleGatePass; + use App\Models\User; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Storage; + use Illuminate\Validation\Rule; + use App\Models\Group; + + class PeopleGatePassController extends Controller + { + /** + * Display a listing of the resource. + */ + public function index(Request $request) + {
Removed / Before Commit
- { - $jobIds = $request->job_ids; - - // Agar job_ids comma-separated string hai - if(is_string($jobIds)) { - $jobIds = explode(',', $jobIds); - } - $equipment = WorkEquipment::with(['group', 'Equipments', 'repairClass'])->where('work_order_id',$jobIds[0])->first(); - $allequipment = WorkEquipment::with(['group', 'Equipments', 'repairClass'])->whereIn('work_order_id',$jobIds)->get(); - $allequipmentids = WorkEquipment::whereIn('work_order_id',$jobIds)->pluck('id')->toArray(); - - $targets = EqptTarget::where('main_eqpt',$equipment->Equipments->name)->first(); - - $tableName = Str::slug($equipment->group->name . '_' . $equipment->Equipments->name . '_other', '_'); - - if (!Schema::hasTable($tableName)) { - return back()->withErrors('Spare table not found.'); - }
Added / After Commit
+ { + $jobIds = $request->job_ids; + + // Agar job_ids comma-separated string hai + if(is_string($jobIds)) { + $jobIds = explode(',', $jobIds); + } + $equipment = WorkEquipment::with(['group', 'Equipments', 'repairClass'])->where('work_order_id',$jobIds[0])->first(); + + $allequipment = WorkEquipment::with(['group', 'Equipments', 'repairClass'])->whereIn('work_order_id',$jobIds)->get(); + $allequipmentids = WorkEquipment::whereIn('work_order_id',$jobIds)->pluck('id')->toArray(); + + $targets = EqptTarget::where('main_eqpt',$equipment->Equipments->name)->first(); + + $tableName = Str::slug($equipment->group->name . '_' . $equipment->Equipments->name . '_other', '_'); + if (!Schema::hasTable($tableName)) { + return back()->withErrors('Spare table not found.'); + }
Removed / Before Commit
- $user = auth()->user(); - - $query = WorkEquipment::with(['workOrder', 'vir', 'qaDecision']) - ->whereHas('vir', fn ($q) => $q->whereNotNull('status')) - ->whereDoesntHave('qaDecision') // QA not done - ->whereDoesntHave('RepairClass', function ($q) { - $q->whereRaw('LOWER(name) = ?', ['ainu']); - }) - - // 🕒 LATEST ON TOP + PAGINATION - $equipments = $query - ->whereDate('created_at', '>', '2026-01-10') - ->latest('work_equipment.created_at') - ->paginate(10) - ->appends($request->query()); - // ========================= - - $filterBase = WorkEquipment::with(['workOrder', 'vir', 'qaDecision'])
Added / After Commit
+ $user = auth()->user(); + + $query = WorkEquipment::with(['workOrder', 'vir', 'qaDecision']) + // ->whereHas('vir', fn ($q) => $q->whereNotNull('status')) + // ->whereDoesntHave('qaDecision') // QA not done + ->where('status', 'AWAITING QA DECISION') + ->whereDoesntHave('RepairClass', function ($q) { + $q->whereRaw('LOWER(name) = ?', ['ainu']); + }) + + // 🕒 LATEST ON TOP + PAGINATION + $equipments = $query + ->latest('work_equipment.created_at') + ->paginate(10) + ->appends($request->query()); + // ========================= + + $filterBase = WorkEquipment::with(['workOrder', 'vir', 'qaDecision'])
Removed / Before Commit
- // ]); - // } - - public function index(Request $request) - { - $user = auth()->user(); - - $initiations = QaInspectionInitate::with([ - 'workOrder', - 'workEquipment', - 'vir', - 'mr', - 'latestRepair' - ]) - ->whereNotExists(function ($query) { - $query->select(DB::raw(1)) - ->from('qa_inspections') - ->whereColumn('qa_inspections.work_order_id', 'qa_inspection_initate.work_order_id')
Added / After Commit
+ // ]); + // } + + // public function index(Request $request) + // { + // $user = auth()->user(); + + // $initiations = QaInspectionInitate::with([ + // 'workOrder', + // 'workEquipment', + // 'vir', + // 'mr', + // 'latestRepair' + // ]) + // ->whereNotExists(function ($query) { + // $query->select(DB::raw(1)) + // ->from('qa_inspections') + // ->whereColumn('qa_inspections.work_order_id', 'qa_inspection_initate.work_order_id')
Removed / Before Commit
- - // return view('qc.index', compact('equipments', 'jobNumbers', 'regdNos')); - // } - public function index (Request $request) - { - $user = auth()->user(); - - $workOrderIds = WorkEquipment::query() - ->whereHas('vir', fn ($q) => $q->whereNotNull('status')) - ->whereHas('workOrder', fn ($q) => $q->whereNotNull('job_no')) - ->whereDoesntHave('workOrder.qcCheck') - - ->when(!is_null($user->role), function ($q) use ($user) { - if ($user->group_id) { - $q->where('group_id', $user->group_id); - } else { - $q->whereRaw('1 = 0'); - }
Added / After Commit
+ + // return view('qc.index', compact('equipments', 'jobNumbers', 'regdNos')); + // } + // public function index (Request $request) + // { + // $user = auth()->user(); + + // $workOrderIds = WorkEquipment::query() + // ->whereHas('vir', fn ($q) => $q->whereNotNull('status')) + // ->whereHas('workOrder', fn ($q) => $q->whereNotNull('job_no')) + // ->whereDoesntHave('workOrder.qcCheck') + + // ->when(!is_null($user->role), function ($q) use ($user) { + // if ($user->group_id) { + // $q->where('group_id', $user->group_id); + // } else { + // $q->whereRaw('1 = 0'); + // }
Removed / Before Commit
- // return view('qc_inspections.index', compact('records', 'jobNumbers', 'regdNos')); - // } - - public function index(Request $request) - { - $user = auth()->user(); - - $query = QAInspection::with(['workOrder', 'workEquipment']) - ->where('status', 'passed') - ->whereNotExists(function ($subQuery) { - $subQuery->select(DB::raw(1)) - ->from('qc_inspections') - ->whereColumn('qc_inspections.work_order_id', 'qa_inspections.work_order_id') - ->whereColumn('qc_inspections.work_equipment_id', 'qa_inspections.work_equipment_id') - ->where(function ($q) { - $q->where(function ($cond) { - $cond->whereNotNull('qa_inspections.vir_id') - ->whereColumn('qc_inspections.vir_id', 'qa_inspections.vir_id');
Added / After Commit
+ // return view('qc_inspections.index', compact('records', 'jobNumbers', 'regdNos')); + // } + + // public function index(Request $request) + // { + // $user = auth()->user(); + + // $query = QAInspection::with(['workOrder', 'workEquipment']) + // ->where('status', 'passed') + // ->whereNotExists(function ($subQuery) { + // $subQuery->select(DB::raw(1)) + // ->from('qc_inspections') + // ->whereColumn('qc_inspections.work_order_id', 'qa_inspections.work_order_id') + // ->whereColumn('qc_inspections.work_equipment_id', 'qa_inspections.work_equipment_id') + // ->where(function ($q) { + // $q->where(function ($cond) { + // $cond->whereNotNull('qa_inspections.vir_id') + // ->whereColumn('qc_inspections.vir_id', 'qa_inspections.vir_id');
Removed / Before Commit
- - namespace App\Http\Controllers; - - use App\Models\RepairClass; - use Illuminate\Http\Request; - use App\Imports\RepairClassImport; - - return response()->json(['message' => 'Repair Class deleted successfully.']); - } - }
Added / After Commit
+ + namespace App\Http\Controllers; + + use App\Models\RepairClassCode; + use App\Models\Group; + use App\Models\RepairClass; + use Illuminate\Http\Request; + use App\Imports\RepairClassImport; + + return response()->json(['message' => 'Repair Class deleted successfully.']); + } + + public function codeindex(Request $request) + { + $query = RepairClassCode::with(['group','repairClass']); + + $filters = $request->only(['group_id','repair_class_id']); +
Removed / Before Commit
- - if ($request->components) { - foreach ($request->components as $compId => $value) { - // Skip invalid or zero component IDs - if (!$compId || !SalaryComponent::find($compId)) { - continue; - } - - SalaryGroupComponent::updateOrCreate( - [ - 'salary_group_id' => $group->id, - 'salary_component_id' => $compId, - ], - [ - 'value' => $value, - ] - ); - }
Added / After Commit
+ + if ($request->components) { + foreach ($request->components as $compId => $value) { + + + SalaryGroupComponent::updateOrCreate( + [ + 'salary_group_id' => $group->id, + 'salary_component_id' => $value, + ], + [ + 'value' => $request->component_values[$value], + ] + ); + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\StoreInventory; + use App\Models\Group; + use App\Models\Grant; + use App\Models\StoreType; + use App\Models\LedgerMaster; + use App\Models\OriginMaster; + use App\Models\CategoryMaster; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Validator; + use Illuminate\Support\Facades\Log; + use Illuminate\Support\Str; + use Carbon\Carbon; + + class StoreInventoryController extends Controller
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\CategoryMaster; + use App\Models\OriginMaster; + use App\Models\Grant; + use App\Models\LedgerMaster; + use App\Models\StoreType; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Validator; + use Illuminate\Support\Facades\Log; + + class StoreInventoryMasterController extends Controller + { + /** + * Display the Store Inventory Master page + */
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\StoreType; + use Illuminate\Http\Request; + use Illuminate\Support\Facades\Log; + + class StoreTypeController extends Controller + { + public function index() + { + $storeTypes = StoreType::orderBy('name', 'asc')->paginate(10); + return view('store-type.index', compact('storeTypes')); + } + + public function create() + {
Removed / Before Commit
- use App\Models\CrcJob; - use Carbon\Carbon; - use App\Models\ProductionYear; - - class VIRController extends Controller - { - 'workOrder.workUser', - 'vir' - ]) - ->where(function ($q) { - $q->whereDoesntHave('vir') - ->orWhereHas('vir', function ($sub) { - $sub->whereNull('status'); - }); - }) - ->whereHas('workOrder', function ($q) { - $q->whereNotNull('control_no'); - })
Added / After Commit
+ use App\Models\CrcJob; + use Carbon\Carbon; + use App\Models\ProductionYear; + use App\Models\RepairClassCode; + + class VIRController extends Controller + { + 'workOrder.workUser', + 'vir' + ]) + // ->where(function ($q) { + // $q->whereDoesntHave('vir') + // ->orWhereHas('vir', function ($sub) { + // $sub->whereNull('status'); + // }); + // }) + ->where('status', 'UNDER VIR') + ->whereHas('workOrder', function ($q) {
Removed / Before Commit
- use Illuminate\Http\Request; - use Illuminate\Support\Facades\Validator; - use App\Models\ProductionYear; - - class WcnController extends Controller - { - public function index(Request $request) - { - // 🔹 Always available - $jobNumbers = WorkOrder::whereHas('equipments', function ($q) { - $q->whereHas('qcInspection') - ->whereNull('wcn_number'); - })->pluck('job_no')->unique()->values(); - - // 🔹 Always available - $committedData = WorkEquipment::whereNotNull('wcn_number') - ->where('wcn_committed', false) - ->whereDate('wcn_date', '>', '2026-01-10')
Added / After Commit
+ use Illuminate\Http\Request; + use Illuminate\Support\Facades\Validator; + use App\Models\ProductionYear; + use App\Models\GatePass; + use App\Models\GatePassDetail; + + class WcnController extends Controller + { + public function index(Request $request) + { + // 🔹 Always available + $jobNumbers = WorkOrder::whereHas('equipments', function ($q) { + $q->where('status', 'UNDER WCN PROCESS'); + }) + ->whereNotNull('job_no') + ->pluck('job_no') + ->unique() + ->values();
Removed / Before Commit
- - $workOrder = $unit?->workOrder; - $equipments = WorkEquipment::where('work_order_id', $workOrder?->id)->get(); - $equipment = $equipments->first(); - - $equipments = $equipments->map(function ($eqpt) { - - $modalData = []; - - foreach ($equipments as $item) { - $eqptId = $item->eqpt; - $regdNo = $item->regd_no; - - if (!isset($modalData[$eqptId])) { - $modalData[$eqptId] = ['regd_nos' => []]; - } - - $modalData[$eqptId]['regd_nos'][] = $regdNo;
Added / After Commit
+ + $workOrder = $unit?->workOrder; + $equipments = WorkEquipment::where('work_order_id', $workOrder?->id)->get(); + $workEquipments = WorkEquipment::where('work_order_id', $workOrder?->id)->get(); + + $equipment = $equipments->first(); + + $equipments = $equipments->map(function ($eqpt) { + + $modalData = []; + + $editData = []; + $I = 0; + + foreach ($workEquipments->groupBy('main_eqpt') as $mainEqptId => $items) { + + $editData[] = [ + 'mainEqptId' => $mainEqptId, // 🔥 THIS WAS MISSING
Removed / Before Commit
- \Illuminate\View\Middleware\ShareErrorsFromSession::class, - \App\Http\Middleware\VerifyCsrfToken::class, - \Illuminate\Routing\Middleware\SubstituteBindings::class, - ], - - 'api' => [
Added / After Commit
+ \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \App\Http\Middleware\DailyLoginLogMiddleware::class, + ], + + 'api' => [
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Middleware; + + use App\Models\DailyLoginLog; + use Carbon\Carbon; + use Illuminate\Support\Facades\Auth; + use Closure; + + class DailyLoginLogMiddleware + { + public function handle($request, Closure $next) + { + if (Auth::check()) { + + $user = Auth::user(); + $today = Carbon::today()->toDateString(); +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class BerDetail extends Model + { + use HasFactory; + + protected $table = 'ber_details'; + + protected $fillable = [ + 'equipment_id', + + 'demand_509_no', + 'demand_509_date',
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class CategoryMaster extends Model + { + use HasFactory; + + protected $table = 'category'; + + protected $fillable = [ + 'name', + 'status', + ]; +
Removed / Before Commit
- 'complaint_date', - 'complaint_time', - 'user_name', - 'nature_of_complaint', - 'complaint_description', - 'complaint_status', - 'user_remark', - 'user_status', - 'resolver_remark', - 'assigned_by', - 'assigned_to', - 'resolved_by', - 'complaint_time' => 'datetime', - 'assigned_at' => 'datetime', - 'resolved_at' => 'datetime', - 'created_at' => 'datetime', - 'updated_at' => 'datetime', - 'equipment_details' => 'array',
Added / After Commit
+ 'complaint_date', + 'complaint_time', + 'user_name', + 'group_id', + 'location', + 'nature_of_complaint', + 'complaint_description', + 'complaint_status', + 'admin_status', + 'admin_approval_remark', + 'approved_by', + 'approved_at', + 'user_remark', + 'user_status', + 'resolver_remark', + 'resolver_status', + 'assigned_by', + 'assigned_to',
Removed / Before Commit
- - // Convert to IST (UTC+5:30) - $istDate = $this->assignment_date->copy()->addHours(5)->addMinutes(30); - return $istDate->format('d-m-Y h:i:s A'); - } - }
Added / After Commit
+ + // Convert to IST (UTC+5:30) + $istDate = $this->assignment_date->copy()->addHours(5)->addMinutes(30); + return $istDate->format('d-m-Y h:i A'); + } + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Model; + + class DailyLoginLog extends Model + { + protected $table = 'daily_login_logs'; + + protected $fillable = [ + 'user_id', + 'username', + 'login_date', + 'login_time', + ]; + + public $timestamps = true;
Removed / Before Commit
- 'repair_progress_remark', - 'repair_progress_date', - 'status', - 'initiate_to_qa' - ]; - - public function workOrder()
Added / After Commit
+ 'repair_progress_remark', + 'repair_progress_date', + 'status', + 'initiate_to_qa', + 'created_at', + 'updated_at', + ]; + + public function workOrder()
Removed / Before Commit
- 'self_phone_no', - 'gate_pass_date', - 'is_committed', - ]; - - public function workOrder()
Added / After Commit
+ 'self_phone_no', + 'gate_pass_date', + 'is_committed', + 'created_at', + 'updated_at', + ]; + + public function workOrder()
Removed / Before Commit
- protected $fillable = [ - 'gate_pass_id', - 'work_equipment_id', - 'mr_id' - ]; - - public function gatePass()
Added / After Commit
+ protected $fillable = [ + 'gate_pass_id', + 'work_equipment_id', + 'mr_id', + 'created_at', + 'updated_at', + ]; + + public function gatePass()
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + use Illuminate\Database\Eloquent\Relations\HasMany; + + class Grant extends Model + { + use HasFactory; + + protected $fillable = [ + 'name', + 'status', + ]; + + protected $casts = [
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class LedgerMaster extends Model + { + use HasFactory; + + protected $table = 'ledger'; + + protected $fillable = [ + 'name', + 'status', + ]; +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + use Illuminate\Database\Eloquent\Relations\HasMany; + use Illuminate\Database\Eloquent\Relations\BelongsTo; + + class NatureOfComplaint extends Model + { + use HasFactory; + + protected $fillable = [ + 'name', + 'status', + 'group_id', + ];
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class OriginMaster extends Model + { + use HasFactory; + + protected $table = 'origin'; + + protected $fillable = [ + 'name', + 'status', + ]; +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + use Illuminate\Database\Eloquent\Relations\BelongsTo; + + class PeopleGatePass extends Model + { + use HasFactory; + + protected $fillable = [ + 'pass_type', + 'gate_pass_number', + 'name', + 'gender', + 'phone',
Removed / Before Commit
- 'qa_status', - 'qa_remark', - 'qa_date', - 'user_id' - ]; - - public function workOrder() {
Added / After Commit
+ 'qa_status', + 'qa_remark', + 'qa_date', + 'user_id', + 'created_at', + 'updated_at', + ]; + + public function workOrder() {
Removed / Before Commit
- 'qa_inspection_remark', - 'qa_inspection_date', - 'user_id', - 'mandr_id' - ]; - - public function workOrder() {
Added / After Commit
+ 'qa_inspection_remark', + 'qa_inspection_date', + 'user_id', + 'mandr_id', + 'created_at', + 'updated_at', + ]; + + public function workOrder() {
Removed / Before Commit
- 'mr_id', - 'user_id', - 'initate_date', - ]; - - // Relationships (optional but recommended)
Added / After Commit
+ 'mr_id', + 'user_id', + 'initate_date', + 'created_at', + 'updated_at', + ]; + + // Relationships (optional but recommended)
Removed / Before Commit
- 'qc_control_date', - 'status', - 'remark', - ]; - - public function workOrder()
Added / After Commit
+ 'qc_control_date', + 'status', + 'remark', + 'created_at', + 'updated_at', + ]; + + public function workOrder()
Removed / Before Commit
- 'qc_remark', - 'user_id', - 'mandr_id', - ]; - - public function workOrder()
Added / After Commit
+ 'qc_remark', + 'user_id', + 'mandr_id', + 'created_at', + 'updated_at', + ]; + + public function workOrder()
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Model; + + class RepairClassCode extends Model + { + protected $fillable = [ + 'name', + 'group_id', + 'repair_class_id' + ]; + + public function group() + { + return $this->belongsTo(Group::class, 'group_id'); + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Model; + use App\Models\StoreType; + use App\Models\LedgerMaster; + use App\Models\OriginMaster; + use App\Models\CategoryMaster; + use App\Models\Group; + use App\Models\Grant; + + class StoreInventory extends Model + { + protected $table = 'store_inventory'; + + protected $fillable = [ + 'item_name',
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class StoreType extends Model + { + use HasFactory; + + protected $fillable = [ + 'name', + 'status', + ]; + + protected $casts = [ + 'status' => 'boolean',
Removed / Before Commit
- use Illuminate\Foundation\Auth\User as Authenticatable; - use Illuminate\Notifications\Notifiable; - use Laravel\Sanctum\HasApiTokens; - use Illuminate\Database\Eloquent\SoftDeletes; // ✅ add - use App\Models\Vertical; - use App\Models\Group;
Added / After Commit
+ use Illuminate\Foundation\Auth\User as Authenticatable; + use Illuminate\Notifications\Notifiable; + use Laravel\Sanctum\HasApiTokens; + use Illuminate\Database\Eloquent\SoftDeletes; // add + use App\Models\Vertical; + use App\Models\Group;
Removed / Before Commit
- 'work_equipment_id', - 'user_selected', - 'repair_type', - ]; - - protected $casts = [
Added / After Commit
+ 'work_equipment_id', + 'user_selected', + 'repair_type', + 'created_at', + 'updated_at', + ]; + + protected $casts = [
Removed / Before Commit
- 'wcn_number', - 'wcn_date', - 'wcn_committed', - 'sus', - 'repair_remarks', - 'type', - { - return $this->belongsTo(Equipment::class, 'main_eqpt'); - } - public function CrcEquipments() - { - return $this->belongsTo(CrcPartMaster::class, 'main_eqpt'); - { - return $this->hasOne(VIR::class, 'work_equipment_id'); - } - public function qaDecision() - { - return $this->hasOne(\App\Models\QADecision::class, 'work_equipment_id');
Added / After Commit
+ 'wcn_number', + 'wcn_date', + 'wcn_committed', + 'iv_entry', + 'issued_iv_no', + 'status', + 'sus', + 'repair_remarks', + 'type', + { + return $this->belongsTo(Equipment::class, 'main_eqpt'); + } + public function berDetail() + { + return $this->hasOne(BerDetail::class, 'equipment_id'); + } + + public function CrcEquipments()
Removed / Before Commit
- // Updated: WorkOrder has many equipments - public function equipments() - { - return $this->hasMany(WorkEquipment::class); - } - - public function virs() - } - public function WorkOrders() - { - return $this->hasMany(WorkOrder::class,'control_no','control_no'); - } - - public function equipment()
Added / After Commit
+ // Updated: WorkOrder has many equipments + public function equipments() + { + return $this->hasMany( + WorkEquipment::class, + 'work_order_id', // FK in work_equipment table + 'id' // PK in work_orders table + ); + } + + public function virs() + } + public function WorkOrders() + { + return $this->hasMany(WorkOrder::class,'c_n','c_n'); + } + + public function equipment()
Removed / Before Commit
- { - use HasFactory, SoftDeletes; - - protected $fillable = ['unit', 'workspace', 'bde', 'division', 'corp', 'command', 'pincode', 'co']; - - public function workOrder() - {
Added / After Commit
+ { + use HasFactory, SoftDeletes; + + protected $fillable = ['unit', 'workspace', 'bde', 'division', 'corp', 'command', 'pincode', 'co','created_at', + 'updated_at']; + + public function workOrder() + {
Removed / Before Commit
- 'co_oc_phone_no', - 'oc_wksp_phone_no', - 'self_phone_no', - ];
Added / After Commit
+ 'co_oc_phone_no', + 'oc_wksp_phone_no', + 'self_phone_no', + 'created_at', + 'updated_at', + ];
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + public function up() + { + Schema::create('nature_of_complaints', function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->boolean('status')->default(true); + $table->timestamps(); + }); + + // Insert default nature of complaints
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + public function up() + { + Schema::table('complaints', function (Blueprint $table) { + $table->unsignedBigInteger('nature_of_complaint')->nullable()->after('location'); + + $table->foreign('nature_of_complaint') + ->references('id') + ->on('nature_of_complaints') + ->onDelete('set null'); + });
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('store_types', function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->boolean('status')->default(true); + $table->timestamps();
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('ledger', function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->boolean('status')->default(true); + $table->timestamps();
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('origin', function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->boolean('status')->default(true); + $table->timestamps();
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('category', function (Blueprint $table) { + $table->id(); + $table->string('name')->unique(); + $table->boolean('status')->default(true); + $table->timestamps();
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + class CreateStoreInventoryTable extends Migration + { + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('store_inventory', function (Blueprint $table) { + $table->id(); + $table->string('item_name');
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up() + { + Schema::create('grants', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->boolean('status')->default(true); + $table->timestamps();
Removed / Before Commit
Added / After Commit
+ <?php + + use Illuminate\Database\Migrations\Migration; + use Illuminate\Database\Schema\Blueprint; + use Illuminate\Support\Facades\Schema; + + return new class extends Migration + { + /** + * Run the migrations. + */ + public function up(): void + { + Schema::create('people_gate_passes', function (Blueprint $table) { + $table->id(); + $table->enum('pass_type', ['civilian', 'service_officer']); + $table->string('gate_pass_number')->unique(); +
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Category Masters</b></h4> + <small class="text-muted">Manage category masters</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#categoryMasterModal" onclick="clearForm()"> + <i class="fas fa-plus"></i> Add New Category Master + </button> + </div> + </div>
Removed / Before Commit
- </div> - <div class="col-md-6"> - <div class="d-flex justify-content-end"> - <a href="{{ route('my-assigned') }}" class="btn btn-info"> - <i class="fas fa-tasks"></i> My Assigned Complaints - </a> - <a href="{{ route('complaints.index') }}" class="btn btn-secondary ms-2"> - <i class="fas fa-list"></i> All Complaints - </a> - <thead class="table-light"> - <tr> - <th>#</th> - <th>Date</th> - <th>Time</th> - <th>Complaint No</th> - <th>User Name</th> - <th>Nature of Complaint</th> - <th>Description</th>
Added / After Commit
+ </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + {{-- <a href="{{ route('my-assigned') }}" class="btn btn-info"> + <i class="fas fa-tasks"></i> My Assigned Complaints + </a> --}} + <a href="{{ route('complaints.index') }}" class="btn btn-secondary ms-2"> + <i class="fas fa-list"></i> All Complaints + </a> + <thead class="table-light"> + <tr> + <th>#</th> + <th>Complaint Date & Time</th> + <!-- <th>Complaint Time</th> --> + <th>Approval Date & Time</th> + <th>Complaint No</th> + <th>User Name</th> + <th>Nature of Complaint</th>
Removed / Before Commit
- <td>{{ $complaint->formatted_complaint_date }}</td> - <td>{{ $complaint->formatted_complaint_time }}</td> - <td>{{ $complaint->user_name }}</td> - <td>{{ ucfirst(str_replace('_', ' ', $complaint->nature_of_complaint)) }}</td> - <td>{{ Str::limit($complaint->complaint_description, 50) }}</td> - <td>{{ $complaint->assignedBy ? $complaint->assignedBy->name : '-' }}</td> - <td> - <button type="button" class="btn btn-sm" onclick="showComplaintDetails({{ $complaint->id }})"> - <i class="fas fa-eye text-primary"></i> - </button> - <button type="button" class="btn btn-sm btn-info" onclick="openEquipmentModal({{ $complaint->id }}, 'view')"> - <i class="fas fa-tools" style="font-size: 15px"></i> View Equipment - </button> - <button type="button" class="btn btn-sm btn-primary" onclick="openEquipmentModal({{ $complaint->id }}, 'edit')"> - <i class="fas fa-plus" style="font-size: 15px"></i> Add Equipment - </button> - {{-- <button type="button" class=" btn-secondary" onclick="openResponseModal({{ $complaint->id }})"> - <i class="fas fa-reply text-warning "></i> Respond
Added / After Commit
+ <td>{{ $complaint->formatted_complaint_date }}</td> + <td>{{ $complaint->formatted_complaint_time }}</td> + <td>{{ $complaint->user_name }}</td> + <td> + {{-- Debug: Show what's actually loaded --}} + @if($complaint->nature_of_complaint) + @if($complaint->natureOfComplaint) + {{ $complaint->natureOfComplaint->name }} + @else + ID: {{ $complaint->nature_of_complaint }} (No Relationship) + @endif + @else + N/A (NULL) + @endif + </td> + <td>{{ Str::limit($complaint->complaint_description, 50) }}</td> + <td>{{ $complaint->assignedBy ? $complaint->assignedBy->name : '-' }}</td> + <td>
Removed / Before Commit
Added / After Commit
+ <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>WSG Job Card - Complaint Cell</title> + <style> + body { + font-family: Arial, sans-serif; + background-color: #f0f0f0; + padding: 20px; + margin: 0; + } + + .container { + max-width: 800px; + margin: 0 auto; + background-color: #d3d3d3;
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + @section('content') + <div class="card"> + <div class="card-header"> + <div class="row"> + <div class="col-md-9"> + <h4><i class="fas fa-chart-line pt-2 me-3"></i><strong>Complaint Report</strong></h4> + </div> + <div class="col-md-3" style="text-align:end"> + <a href="{{ url()->previous() }}" class="btn btn-secondary btn-sm"> + <i class="fas fa-arrow-left"></i> Back + </a> + </div> + </div> + + <!-- Filter Section --> + <div class="col-md-12 row mt-3"> + <div class="col-md-2">
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Pending Complaints - Admin Approval</b></h4> + + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + {{-- Show additional options for superadmin --}} + {{-- <button class="btn btn-danger me-2" onclick="bulkApprove()"> + <i class="fas fa-check-double"></i> Bulk Approve All + </button> --}} +
Removed / Before Commit
- <div class="card-body"> - <form action="{{ route('complaints.store') }}" method="POST"> - @csrf - - <div class="row"> - <div class="col-md-4 mb-3"> - <input type="text" id="user_name" name="user_name" class="form-control" value="{{ Auth::user()->name ?? 'Anonymous User' }}" readonly> - </div> - - <div class="col-md-12 mb-3"> - <label for="nature_of_complaint" class="form-label">Nature of Complaint <span class="text-danger">*</span></label> - <select id="nature_of_complaint" name="nature_of_complaint" class="form-select" required> - <option value="">-- Select Nature of Complaint --</option> - @foreach($natureOptions as $key => $value) - <option value="{{ $key }}">{{ $value }}</option> - @endforeach - </select> - </div>
Added / After Commit
+ <div class="card-body"> + <form action="{{ route('complaints.store') }}" method="POST"> + @csrf + @if ($errors->any()) + <div class="alert alert-danger"> + <h6><i class="fas fa-exclamation-triangle"></i> Please fix the following errors:</h6> + <ul class="mb-0"> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + + <div class="row"> + <div class="col-md-4 mb-3"> + <input type="text" id="user_name" name="user_name" class="form-control" value="{{ Auth::user()->name ?? 'Anonymous User' }}" readonly> + </div>
Removed / Before Commit
- @extends('layouts.app') - - @section('content') - <meta name="csrf-token" content="{{ csrf_token() }}"> - <div class="card"> - <div class="card-header py-3"> - <div class="row align-items-center"> - <div class="col-md-6"> - <h4><b>Complaint Management</b></h4> - </div> - <div class="col-md-6"> - <div class="d-flex justify-content-end"> - <a href="{{ route('complaints.create') }}" class="btn btn-primary">Raise New Complaint</a> - </div> - </div> - <hr> - <div class="card-body"> - <div class="table-responsive">
Added / After Commit
+ @extends('layouts.app') + + {{-- @include('debug') --}} + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>All Complaints</b></h4> + <small class="text-muted">All complaints in the system</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + {{-- Show admin approval link only for admin users --}} + @if(auth()->check() && (auth()->user()->role === 'admin' || auth()->user()->role === 'superadmin')) + <a href="{{ route('complaints.adminApproval') }}" class="btn btn-warning me-2">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="card"> + + <div class="card-header py-3 d-flex justify-content-between align-items-center flex-wrap"> + {{-- Left side heading --}} + <h4 class="mb-0"><b>CRC BER Entries</b></h4> + + {{-- Right side filter form + add button --}} + <div class="d-flex align-items-end gap-1 flex-wrap"> + <form method="GET" class="row g-3 mb-3"> + <div class="col-md-4"> + <label>Unit</label> + <select name="unit_id" class="form-select select2"> + <option value="">-- Select Unit --</option> + @foreach($units as $unit) + <option value="{{ $unit->id }}"
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + + + @if($errors->any()) + <div class="alert alert-danger"> + <strong>Validation failed:</strong> + <ul class="mb-0 mt-1"> + @foreach($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + + <div class="card"> + <div class="card-header py-3 d-flex justify-content-between align-items-center">
Removed / Before Commit
- - <div class="d-flex flex-column"> - <label class="form-label mb-1"><b>Job No</b></label> - <input type="text" name="job_no" class="form-control form-control-sm filter-input" - value="{{ request('job_no') }}" placeholder="Job No" style="min-width: 120px"> - </div> - - <div class="d-flex flex-column"> - <label class="form-label mb-1"><b>Part No</b></label> - <input type="text" name="part_no" class="form-control form-control-sm filter-input" - value="{{ request('part_no') }}" placeholder="Part No" style="min-width: 120px"> - </div> - - <div class="d-flex flex-column"> - <label class="form-label mb-1"><b>Unit</b></label> - <tbody> - @forelse ($entries as $entry) - <tr>
Added / After Commit
+ + <div class="d-flex flex-column"> + <label class="form-label mb-1"><b>Job No</b></label> + <select name="job_no" class="form-select form-select-sm select2" style="min-width: 140px"> + <option value="">-- All CRC --</option> + @foreach ($jobNos as $job) + <option value="{{ $job }}" {{ request('job_no') == $job ? 'selected' : '' }}> + {{ $job }} + </option> + @endforeach + </select> + </div> + + <!-- <div class="d-flex flex-column"> + <label class="form-label mb-1"><b>Part No</b></label> + <input type="text" name="part_no" class="form-control form-control-sm filter-input" + value="{{ request('part_no') }}" placeholder="Part No" style="min-width: 120px"> + </div> -->
Removed / Before Commit
- @extends('layouts.app') - - @section('content') - <!-- CRC INFO MODAL --> - <div class="modal fade" id="crcInfoModal" tabindex="-1" aria-hidden="true"> - <div class="modal-dialog modal-lg modal-dialog-centered"> - <div class="modal-content"> - - <div class="modal-header"> - <h5 class="modal-title">CRC Entry Created Successfully</h5> - <button type="button" class="btn-close" data-bs-dismiss="modal"></button> - </div> - - <div class="modal-body"> - <div class="mb-6"> - <strong>Parent CRC No:</strong> - <span> - {{ $crcEntry?->workOrder?->control_no }}
Added / After Commit
+ @extends('layouts.app') + + @section('content') + + + <div class="container"> + <div class="d-flex justify-content-between align-items-center mb-4"> + </button> + </div> + + <form id="issueForm" + action="{{ route('crc.entries.issue.store', $id) }}" + method="POST"> + @csrf + + @if(!empty($equipments)) + @php $i = 0; @endphp + <input type="hidden" name="alreadyexist" value="{{$issueFlag}}">
Removed / Before Commit
- <div class="row mb-4"> - <div class="col-md-3"> - <label><b>CRC No</b></label> - <div class="form-control bg-light">{{ preg_replace('#/\d+$#', '', $entry->c_n) }}</div> - </div> - <div class="col-md-3"> - <label><b>CRC Date</b></label> - <div class="form-control bg-light">{{ \Carbon\Carbon::parse($entry->control_date)->format('d-m-Y') }}</div> - </div> - <div class="col-md-3"> - <label><b>Unit</b></label> - <div class="form-control bg-light">{{ $entry->workUnit?->units?->name ?? '-' }}</div> - </div> - <div class="col-md-3"> - <label><b>Command</b></label> - <div class="form-control bg-light">{{ $entry->workUnit?->commands?->name ?? '-' }}</div> - </div> - </div>
Added / After Commit
+ <div class="row mb-4"> + <div class="col-md-3"> + <label><b>CRC No</b></label> + <div class="form-control bg-light">{{$workorder->c_n}}</div> + </div> + <div class="col-md-3"> + <label><b>CRC Date</b></label> + <div class="form-control bg-light">{{ \Carbon\Carbon::parse($workorder->control_date)->format('d-m-Y') }}</div> + </div> + <div class="col-md-3"> + <label><b>Unit</b></label> + <div class="form-control bg-light">{{ $workorder->workUnit?->units?->name ?? '-' }}</div> + </div> + <div class="col-md-3"> + <label><b>Command</b></label> + <div class="form-control bg-light">{{ $workorder->workUnit?->commands?->name ?? '-' }}</div> + </div> + </div>
Removed / Before Commit
- <div class="card-header py-3"> - <div class="row align-items-end justify-content-between "> - <div class="col-md-4 "> - <h4><b>Pending IV Entries</b></h4> - </div> - - <div class="col-md-7 d-flex align-items-end justify-content-end "> - - <form method="GET" class="row g-3"> - <div class="col-md-3"> - <label>Unit</label> - <select name="unit_id" class="form-select select2"> - <option value="">-- Select Unit --</option> - @foreach($units as $unit) - <option value="{{ $unit->id }}" {{ request('unit_id') == $unit->id ? 'selected' : '' }}> - {{ $unit->name }} - </option> - @endforeach
Added / After Commit
+ <div class="card-header py-3"> + <div class="row align-items-end justify-content-between "> + <div class="col-md-4 "> + <h4><b>CRC Entry</b></h4> + </div> + + <div class="col-md-7 d-flex align-items-end justify-content-end "> + + <form method="GET" class="row g-3"> + <div class="col-md-4"> + <label>Unit</label> + <select name="unit_id" class="form-select select2"> + <option value="">-- Select Unit --</option> + @foreach($units as $unit) + <option value="{{ $unit->id }}" + {{ request('unit_id') == $unit->id ? 'selected' : '' }}> + {{ $unit->name }} + </option>
Removed / Before Commit
- data-demand-id="{{ $demand->id }}" - value="{{ $demand->qty_demanded }}" - min="0" - max="{{$scale->authorization - $totaldemand}}" - style="width:80px; display:inline-block;"> - <span class="update-status" style="margin-left:5px;"></span></td> - </tr>
Added / After Commit
+ data-demand-id="{{ $demand->id }}" + value="{{ $demand->qty_demanded }}" + min="0" + max="{{ (int)($scale->authorization ?? 0) - (int)($totaldemand ?? 0) }}" + style="width:80px; display:inline-block;"> + <span class="update-status" style="margin-left:5px;"></span></td> + </tr>
Removed / Before Commit
- 'sub_eqpt' => $subEquipments, - 'control_number' => $controlNumbers, - ]; - $statuses = ['AWAITING JOB NO', 'AWAITING QC CONTROLL NO', 'UNDER REPAIR', 'UNDER VIR', 'UNDER WCN PROCESS', 'VIR REJECTED'] - - @endphp - @foreach ($filters as $field => $options) - </div> - <div class="col-md-3"><strong>CORPS:</strong> {{ $wo->workUnit?->corps?->name ?? '-' }}</div> - <div class="col-md-3"><strong>COS:</strong> {{ $wo->workUnit?->cos?->name ?? '-' }}</div> - <div class="col-md-3"><strong>Sub Eqpt:</strong> {{ $equipment->assy ?? '-' }}</div> - <div class="col-md-3"><strong>Regd No:</strong> {{ $equipment->regd_no ?? '-' }}</div> - <div class="col-md-3"><strong>Job Date:</strong> {{ $wo->job_date ?? '-' }}</div>
Added / After Commit
+ 'sub_eqpt' => $subEquipments, + 'control_number' => $controlNumbers, + ]; + $statuses = ['AWAITING JOB NO','UNDER VIR','AWAITING QC CONTROL NO', 'UNDER REPAIR', 'UNDER WCN PROCESS', 'AWAITING COLLECTION', 'VIR REJECTED'] + + @endphp + @foreach ($filters as $field => $options) + </div> + <div class="col-md-3"><strong>CORPS:</strong> {{ $wo->workUnit?->corps?->name ?? '-' }}</div> + <div class="col-md-3"><strong>COS:</strong> {{ $wo->workUnit?->cos?->name ?? '-' }}</div> + <div class="col-md-3"><strong>Sus:</strong> {{ $equipment->sus ?? '-' }}</div> + <div class="col-md-3"><strong>Sub Eqpt:</strong> {{ $equipment->assy ?? '-' }}</div> + <div class="col-md-3"><strong>Regd No:</strong> {{ $equipment->regd_no ?? '-' }}</div> + <div class="col-md-3"><strong>Job Date:</strong> {{ $wo->job_date ?? '-' }}</div>
Removed / Before Commit
- <hr> - <div class="card-body"> - <div class="container-fluid"> - <form method="GET" action="{{ route('eq_report.index') }}"> - <div class="row"> - @php - $filters = [ - 'sub_eqpt' => $subEquipments, - 'control_number' => $controlNumbers, - ]; - $statuses = ['AWAITING JOB NO', 'AWAITING QC CONTROLL NO', 'UNDER REPAIR', 'UNDER VIR', 'UNDER WCN PROCESS', 'VIR REJECTED'] - - @endphp - @foreach ($filters as $field => $options) - <div class="col-md-2 mt-3"> - <button type="button" id="btnTable" class="btn btn-outline-secondary btn-sm">Table View</button> - </div> - @if($equipments && $equipments->count())
Added / After Commit
+ <hr> + <div class="card-body"> + <div class="container-fluid"> + <form method="GET" action="{{ route('table-report') }}"> + <div class="row"> + @php + $filters = [ + 'sub_eqpt' => $subEquipments, + 'control_number' => $controlNumbers, + ]; + $statuses = ['AWAITING JOB NO','UNDER VIR','AWAITING QC CONTROL NO', 'UNDER REPAIR', 'UNDER WCN PROCESS', 'AWAITING COLLECTION', 'VIR REJECTED']; + @endphp + @foreach ($filters as $field => $options) + <div class="col-md-2 mt-3"> + <button type="button" id="btnTable" class="btn btn-outline-secondary btn-sm">Table View</button> + </div> + @if($equipments && $equipments->count()) + <div class="row mb-2 align-items-center">
Removed / Before Commit
- const year = $('#prodYear').val(); - const target = $('#targetValue').val(); - - if (!repairClass || !group || !eqpt || !year || !target) { - $('#TargetNameError').removeClass('d-none') ; // show error - return; - } - else{ - $('#TargetNameError').addClass('d-none') ; // hide error - - } - - const url = id ? `/eqpt-targets/${id}` : '/eqpt-targets'; - const method = id ? 'PUT' : 'POST'; - - $.ajax({ - url: url, - type: method,
Added / After Commit
+ const year = $('#prodYear').val(); + const target = $('#targetValue').val(); + + if (!repairClass || !group || !eqpt || !year) { + $('#TargetNameError').removeClass('d-none'); + return; + } + + // Target required ONLY if repair class is NOT DR + if (repairClass !== 'DR' && !target) { + $('#TargetNameError').removeClass('d-none'); + return; + } + $('#TargetNameError').addClass('d-none'); + + const url = id ? `/eqpt-targets/${id}` : '/eqpt-targets'; + const method = id ? 'PUT' : 'POST'; +
Removed / Before Commit
- <h4><b>Generate Gate Pass</b></h4> - </div> - <div class="col-md-7"> - @if(!isset($recentGatePass)) - <form method="GET" action="{{ route('gatepass.index') }}" class="row g-3 justify-content-end "> - <div class="col-md-4"> - <label>WCN Number</label> - <select name="wcn_number" class="form-select select2" data-placeholder="Select WCN Number"> - <option value="">-- Select WCN Number --</option> - @foreach($wcnNumbers as $wcn) - <option value="{{ $wcn }}" {{ request('wcn_number') == $wcn ? 'selected' : '' }}> - {{ $wcn }} - </option> - @endforeach - </select> - </div> - <div class="col-md-3"> - <label>Unit Name</label>
Added / After Commit
+ <h4><b>Generate Gate Pass</b></h4> + </div> + <div class="col-md-7"> + <form method="GET" action="{{ route('gatepass.index') }}" class="row g-3 justify-content-end "> + <div class="col-md-4"> + <label>WCN Number</label> + <!-- <select name="wcn_number" class="form-select select2" data-placeholder="Select WCN Number"> + <option value="">-- Select WCN Number --</option> + @foreach($wcnNumbers as $wcn) + <option value="{{ $wcn }}" {{ request('wcn_number') == $wcn ? 'selected' : '' }}> + {{ $wcn }} + </option> + @endforeach + </select> --> + <select name="wcn_number" id="wcn_number" + class="form-select select2" + data-placeholder="Search WCN Number"> + @if(request('wcn_number'))
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="container-fluid"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Grant Management</b></h4> + <small class="text-muted">Manage grant types</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#grantModal"> + <i class="fas fa-plus"></i> Add Grant + </button> + </div>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Ledger Masters</b></h4> + <small class="text-muted">Manage ledger masters</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#ledgerMasterModal" onclick="clearForm()"> + <i class="fas fa-plus"></i> Add New Ledger Master + </button> + </div> + </div>
Removed / Before Commit
- <tr> - <td><strong>FROM:</strong> {{ $demand->workEquipment->unit_wo_no ?? '' }}</td> - <td><strong>JOB NO.:</strong> {{ $demand->job_no }} <strong>DT:</strong> {{ \Carbon\Carbon::parse($demand->workEquipment->unit_wo_date)->format('d-m-y') }}</td> - <td><strong>DEMAND NO.:</strong> {{ $demand->demand_no }}</td> - </tr> - <tr> - <td><strong>TO:</strong> OSS, 509 ABW</td> - <tr> - <td><strong>Eqpt-</strong> {{ $demand->workEquipment->Equipments->name ?? '' }}</td> - <td><strong>Regd-</strong> {{ $demand->workEquipment->regd_no ?? '' }}</td> - <td><strong>APPLICABILITY:</strong> <u>ONE OF THIRTY (REC)</u></td> - <td><strong>RADAR SERIAL NO:</strong> {{ $demand->workEquipment->wcn_searil_no ?? '' }}</td> - </tr> - </table> - - @php - $scale = $item->scale; // This is from getScaleAttribute() - @endphp
Added / After Commit
+ <tr> + <td><strong>FROM:</strong> {{ $demand->workEquipment->unit_wo_no ?? '' }}</td> + <td><strong>JOB NO.:</strong> {{ $demand->job_no }} <strong>DT:</strong> {{ \Carbon\Carbon::parse($demand->workEquipment->unit_wo_date)->format('d-m-y') }}</td> + <td><strong>DEMAND NO.:</strong> {{ $demand->mco_demand_no }}</td> + </tr> + <tr> + <td><strong>TO:</strong> OSS, 509 ABW</td> + <tr> + <td><strong>Eqpt-</strong> {{ $demand->workEquipment->Equipments->name ?? '' }}</td> + <td><strong>Regd-</strong> {{ $demand->workEquipment->regd_no ?? '' }}</td> + <!-- <td><strong>APPLICABILITY:</strong> <u>ONE OF THIRTY (REC)</u></td> + <td><strong>RADAR SERIAL NO:</strong> {{ $demand->workEquipment->wcn_searil_no ?? '' }}</td> --> + </tr> + </table> + + @php + $scale = $item->scale; // This is from getScaleAttribute() + @endphp
Removed / Before Commit
- @php - $equipment = \App\Models\WorkEquipment::with(['Equipments', 'group', 'RepairClass']) - ->find($demands[0]->work_equipment_id); - if($equipment->repair_class != 4) - { - - $scalenos = \App\Models\McoScale::where('group_id',$equipment->group_id)->where('equipment_id',$equipment->main_eqpt)->where('repair_class_id','other')->first();
Added / After Commit
+ @php + $equipment = \App\Models\WorkEquipment::with(['Equipments', 'group', 'RepairClass']) + ->find($demands[0]->work_equipment_id); + if($equipment->repair_class != 5) + { + + $scalenos = \App\Models\McoScale::where('group_id',$equipment->group_id)->where('equipment_id',$equipment->main_eqpt)->where('repair_class_id','other')->first();
Removed / Before Commit
- <tr> - <td>{{ $equipmentName }}</td> - <td>{{ $demand->job_no }}</td> - <td>{{$equipment->group->name}}</td> - <td>{{$equipment->RepairClass->name == 'CL A' ? 'Class A' : 'other'}}</td> - <td>{{ date('d/m/y', strtotime($demand->created_at)) }}</td> - - <!-- <td>{{$demand->req_no}}</td> -->
Added / After Commit
+ <tr> + <td>{{ $equipmentName }}</td> + <td>{{ $demand->job_no }}</td> + <td>{{$equipment?->group?->name}}</td> + <td>{{$equipment?->RepairClass?->name == 'CL A' ? 'Class A' : 'other'}}</td> + <td>{{ date('d/m/y', strtotime($demand->created_at)) }}</td> + + <!-- <td>{{$demand->req_no}}</td> -->
Removed / Before Commit
- <i class="fa fa-pencil text-success ms-2"></i> - <!-- <i class="fa fa-pen-to-square"></i> --> - </a> - - @endif - <a href="{{ route('mco.scales.edit', $scale->id) }}" title="Edit"> - </div> - </div> - </div> - @endsection - @section('scripts') - <script> - function triggerImport(id) { - document.querySelector(`#importForm-${id} input[type=file]`).click(); - } - </script> - -
Added / After Commit
+ <i class="fa fa-pencil text-success ms-2"></i> + <!-- <i class="fa fa-pen-to-square"></i> --> + </a> + <a href="javascript:void(0)" + onclick="confirmDelete({{ $scale->id }}, '{{ $scale->table_name }}')" + title="Delete Scale"> + <i class="fa fa-trash text-danger ms-2"></i> + </a> + + @endif + <a href="{{ route('mco.scales.edit', $scale->id) }}" title="Edit"> + </div> + </div> + </div> + <div class="modal fade" id="deleteScaleModal" tabindex="-1"> + <div class="modal-dialog modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="container-fluid"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Nature of Complaint Management</b></h4> + <small class="text-muted">Manage nature of complaint types</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#natureModal"> + <i class="fas fa-plus"></i> Add Nature + </button> + </div>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Origin Masters</b></h4> + <small class="text-muted">Manage origin masters</small> + </div> + <div class="col-md-6"> + <div class="d-flex justify-content-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#originMasterModal" onclick="clearForm()"> + <i class="fas fa-plus"></i> Add New Origin Master + </button> + </div> + </div>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="card"> + <div class="card-header"> + <h4><i class="fas fa-id-card pt-2 me-3"></i><strong>Create People Gate Pass</strong></h4> + </div> + + <div class="card-body"> + @if ($errors->any()) + <div class="alert alert-danger"> + <ul class="mb-0"> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="card"> + <div class="card-header"> + <div class="row"> + <div class="col-md-6"> + <h4><i class="fas fa-id-card pt-2 me-3"></i><strong>People Gate Pass Management</strong></h4> + </div> + <div class="col-md-4"> + + <form method="GET" action="{{ route('people-gate-pass.index') }}" class="mb-4" id="filterForm"> + <div class="row"> + <div class="col-md-6"> + <label for="pass_type" class="form-label">Pass Type</label> + <select name="pass_type" id="pass_type" class="form-select" onchange="autoFilter()"> + <option value="">All Types</option> + <option value="civilian" {{ request('pass_type') == 'civilian' ? 'selected' : '' }}>Civilian</option>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="card"> + <div class="card-header"> + <div class="row"> + <div class="col-md-6"> + <h4><i class="fas fa-id-card pt-2 me-3"></i><strong>People Gate Pass Details</strong></h4> + </div> + <div class="col-md-6 text-end"> + <!-- <a href="{{ route('people-gate-pass.print', $peopleGatePass) }}" class="btn btn-info" target="_blank"> + <i class="fas fa-print"></i> Print + </a> --> + <a href="{{ route('people-gate-pass.index') }}" class="btn btn-secondary"> + <i class="fas fa-arrow-left"></i> Back + </a> + </div> + </div>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="card"> + <div class="card-header"> + <div class="row"> + <div class="col-md-6"> + <h4><i class="fas fa-id-card pt-2 me-3"></i><strong>People Gate Pass Details</strong></h4> + </div> + <div class="col-md-6 text-end"> + <a href="{{ route('people-gate-pass.print', $peopleGatePass) }}" class="btn btn-info" target="_blank"> + <i class="fas fa-print"></i> Print + </a> + <a href="{{ route('people-gate-pass.index') }}" class="btn btn-secondary"> + <i class="fas fa-arrow-left"></i> Back + </a> + </div> + </div>
Removed / Before Commit
- <tbody> - @forelse($repairs as $repair) - @php - $equipment = $repair->workEquipment; - $order = $repair->workEquipment->workOrder ?? null ; - @endphp - <tr> - <td>{{ $order->workUnit?->units?->name ?? '-' }}</td> - <td>{{ $equipment->Equipments?->name ? $equipment->Equipments?->name : $equipment->main_eqpt}}</td> - <td>{{ $equipment->quantity}}</td> - <td>{{ $equipment->regd_no ?? '-' }}</td> - <!-- <td>{{ $repair->latestRepair?->pdc_date ?? '-' }}</td> - <td>{{ $repair->latestRepair?->fault ?? '-' }}</td> - <td>{{ $repair->latestRepair?->repair_progress_remark ?? '-' }}</td> - <td>{{ $repair->latestRepair?->repair_progress_date ?? '-' }}</td> --> - <td> - <a href="javascript:void(0)" type="button" - class="qa-inspect-btn"
Added / After Commit
+ <tbody> + @forelse($repairs as $repair) + @php + $equipment = $repair; + $order = $repair->workOrder ?? null ; + $vir = $repair->vir ?? null ; + $repairdata = $repair->repair ?? null ; + @endphp + <tr> + <td>{{ $order->workUnit?->units?->name ?? '-' }}</td> + <td>{{ $equipment->Equipments?->name ? $equipment->Equipments?->name : $equipment->main_eqpt}}</td> + <td>{{ $equipment->quantity}}</td> + <td>{{ $equipment->regd_no ?? '-' }}</td> + <td> + <a href="javascript:void(0)" type="button" + class="qa-inspect-btn" + data-bs-toggle="modal" + data-bs-target="#qaInspectionModal"
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + + + @if ($errors->any()) + <div class="alert alert-danger"> + <strong>Whoops!</strong> Please fix the following: + <ul> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + + + <div class="card">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + + + @if ($errors->any()) + <div class="alert alert-danger"> + <strong>Whoops!</strong> Please fix the following: + <ul> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-end">
Removed / Before Commit
- </tr> - </thead> - <tbody> - @forelse ($records as $qa) - @php - - $order = $qa->workOrder; - $equipment = $qa->workEquipment; - $repair = $qa->repair_data; - - @endphp - <tr> - <a href="javascript:void(0)" class="qc-btn" - data-bs-toggle="modal" - data-bs-target="#qcModal" - data-workorder-id="{{ $qa->work_order_id }}" - data-equipment-id="{{ $qa->work_equipment_id }}" - data-vir-id="{{ $qa->vir_id }}"
Added / After Commit
+ </tr> + </thead> + <tbody> + @forelse ($repairs as $qa) + @php + + $equipment = $qa; + $order = $qa->workOrder ?? null ; + $vir = $qa->vir ?? null ; + $repairdata = $qa->repair ?? null ; + + @endphp + <tr> + <a href="javascript:void(0)" class="qc-btn" + data-bs-toggle="modal" + data-bs-target="#qcModal" + data-workorder-id="{{ $equipment->work_order_id }}" + data-workequipment-id="{{ $equipment->id }}"
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <!-- <h4 class="mb-3"><b>Repair Classes</b></h4> + <hr/> --> + + <div class="row"> + <div class="col"> + <div class="card"> + <!-- <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-3"> + <h4><b>Repair Class</b></h4> + </div> + <div class="col-md-9 text-end"> + <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#repairClassModal">Add Repair Class</button> + </div> + </div>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + + @if ($errors->any()) + <div class="alert alert-danger"> + <strong>Whoops!</strong> Please fix the following: + <ul> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + + + <div class="card"> + <div class="card-header py-3">
Removed / Before Commit
- <tbody> - @forelse($repairs as $repair) - @php - $equipment = $repair->workEquipment; - $vir = $equipment->vir; - $order = $repair->workOrder; - $qc = $equipment->qcCheck; - <td>{{ $qc?->qc_control_date ?? '-' }}</td> - <td>{{ $qc?->remark ?? '-' }}</td> --> - <td class="text-center"> - <a href="{{ route('repairs.history', ['work_order_id' => $order->id, 'work_equipment_id' => $equipment->id, 'vir_id' => $repair->vir_id]) }}"> - <i class="fa fa-eye"></i> - </a> - </td> - data-bs-target="#repairModal" - data-workorder-id="{{ $order->id }}" - data-workequipment-id="{{ $equipment->id }}" - data-vir-id="{{ $repair->vir_id }}">
Added / After Commit
+ <tbody> + @forelse($repairs as $repair) + @php + $equipment = $repair; + $vir = $equipment->vir; + $order = $repair->workOrder; + $qc = $equipment->qcCheck; + <td>{{ $qc?->qc_control_date ?? '-' }}</td> + <td>{{ $qc?->remark ?? '-' }}</td> --> + <td class="text-center"> + <a href="{{ route('repairs.history', ['work_order_id' => $order->id, 'work_equipment_id' => $equipment->id, 'vir_id' => $vir?->id]) }}"> + <i class="fa fa-eye"></i> + </a> + </td> + data-bs-target="#repairModal" + data-workorder-id="{{ $order->id }}" + data-workequipment-id="{{ $equipment->id }}" + data-vir-id="{{ $vir?->id }}">
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('title', 'Store Inventory Master') + + @section('content') + <meta name="csrf-token" content="{{ csrf_token() }}"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center"> + <div class="col-md-6"> + <h4><b>Store Inventory Master</b></h4> + <small class="text-muted">Manage all store inventory masters in one place</small> + </div> + <div class="col-md-6"> + + </div> + </div> + </div>