Showing AI reviews for army
Project AI Score ?
67%
Quality Avg ?
72%
Security Avg ?
54%
Reviews ?
37

Review Result ?

jattin01/army · 6c0c1395
The commit adds a new TaxManagementController with full CRUD operations for tax regimes and slabs, including validation and integration with existing staff controller dropdowns. The code mostly follows good practices including validation rules and clear method structures. Inclusion of AJAX support for deletion and status toggling adds user experience improvements. However, there is some duplication (like fetching active tax regimes in staff controller repeated twice), lack of more granular validation (e.g., cross-field slab validation), and no explicit authorization checks visible which could raise security concerns.
Quality ?
85%
Security ?
75%
Business Value ?
90%
Maintainability ?
80%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Duplicate Logic
Where app/Http/Controllers/Admin/StaffController.php:68
Issue / Evidence code duplication
Suggested Fix refactor tax regime fetching code into a reusable method to improve quality and reduce bug risks
Missing Validation
Where app/Http/Controllers/Admin/TaxManagementController.php:64
Issue / Evidence slab_to validation
Suggested Fix improve validation so slab_to must be greater than slab_from for each slab entry to reduce bug risk
Security Issue
Where app/Http/Controllers/Admin/TaxManagementController.php:42
Issue / Evidence lack of authorization checks
Suggested Fix add authorization to restrict access to tax management functions to improve security
Slab Deletion Before Update
Where app/Http/Controllers/Admin/TaxManagementController.php:115
Issue / Evidence slab deletion before update
Suggested Fix ensure atomic transaction to avoid data inconsistency on failure during slab updates
Very Generic
Where commit message
Issue / Evidence very generic
Suggested Fix improve commit message to describe added functionality (TaxManagementController CRUD for tax regimes/slabs) for better business value tracking
Code Change Preview · app/Http/Controllers/Admin/StaffController.php ?
Removed / Before Commit
- $designations = Designation::all();
- $reportTos = Staff::all();
- $employeeCategories = EmployeeCategory::where('is_active', 1)->get();
- 
- $employeeStatuses = [
- (object)['id' => 1, 'name' => 'Probation'],
- $salaryGroups = SalaryGroup::all();
- 
- 
-         return view('admin.staff.add', compact('shifts','departments','designations','reportTos','salaryGroups','employeeStatuses','employeeCategories'
- ));
- }
- 
- $designations = Designation::all();
- $reportTos = Staff::where('id', '!=', $id)->get(); // cannot report to self
- $employeeCategories = EmployeeCategory::where('is_active', 1)->get();
- $employeeStatuses = [
- (object)['id' => 1, 'name' => 'Probation'],
Added / After Commit
+ $designations = Designation::all();
+ $reportTos = Staff::all();
+ $employeeCategories = EmployeeCategory::where('is_active', 1)->get();
+         
+         // Get active tax regimes for dropdown
+         $taxRegimes = \App\Models\TaxRegimeMaster::where('is_active', 1)
+             ->with('taxSlabs')
+             ->orderBy('financial_year', 'desc')
+             ->get();
+ 
+ $employeeStatuses = [
+ (object)['id' => 1, 'name' => 'Probation'],
+ $salaryGroups = SalaryGroup::all();
+ 
+ 
+         return view('admin.staff.add', compact('shifts','departments','designations','reportTos','salaryGroups','employeeStatuses','employeeCategories','taxRegimes'
+ ));
+ }
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Admin;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use App\Models\TaxRegimeMaster;
+ use App\Models\TaxSlabMaster;
+ 
+ class TaxManagementController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $query = TaxRegimeMaster::with('taxSlabs');
+ 
+         // Filter by financial year
+         if ($request->filled('financial_year')) {
+             $query->where('financial_year', $request->financial_year);
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ 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);
Removed / Before Commit
- use App\Models\MasterCommand;
- use App\Models\CrcJob;
- use App\Models\CrcRepair;
- use App\Models\ProductionYear;
- use Illuminate\Support\Str;
- use DB;
- use Maatwebsite\Excel\Facades\Excel;
- use App\Imports\CrcPartMasterImport;
- use Throwable;
- {
- public function create()
- {
-     $pendingEntry = CrcEntry::whereDoesntHave('jobs')->latest()->first();
- 
- if ($pendingEntry) {
-         return redirect()->route('crc.entries.issue', $pendingEntry->id)
-             ->with('error', 'Please complete issuing for the previous CRC entry before creating a new one.');
- }
Added / After Commit
+ use App\Models\MasterCommand;
+ use App\Models\CrcJob;
+ use App\Models\CrcRepair;
+ use App\Models\Group;
+ use App\Models\WorkOrder;
+ use App\Models\WorkUnit;
+ 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;
+ {
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ namespace App\Http\Controllers;
+ 
+ use Illuminate\Http\Request;
+ use App\Models\CrcPartMaster;
+ 
+ class CrcPartMasterController extends Controller
+ {
+     public function index()
+     {
+         $records = CrcPartMaster::latest()->get();
+         return view('crc_part_master.index', compact('records'));
+     }
+ 
+     public function store(Request $request)
+     {
+         $request->validate([
+             'part_no' => 'required',
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ 
+ use App\Models\WorkOrder;
+ use App\Models\WorkEquipment;
+ use App\Models\RepairClass;
+ use App\Models\QAInspection;
+ use App\Models\QaInspectionInitate;
+ use App\Models\WorkUnit;
+ use App\Models\GatePassDetail;
+ use App\Models\MasterCommand;
+ use App\Models\Group;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\Validator;
+ use Carbon\Carbon;
+ 
+ class DashboardController extends Controller
Removed / Before Commit
- use App\Models\ProductionYear;
- use App\Imports\EqptTargetImport;
- use Maatwebsite\Excel\Facades\Excel;
- 
- class EqptTargetController extends Controller
- {
- 
- $years = ProductionYear::all();
- 
-         return view('eqpt_targets.index', compact('targets', 'groups','years'));
- }
- 
- public function import(Request $request)
- {
- $request->validate([
- 'group' => 'required',
- 'main_eqpt' => 'required',
- 'production_year' => 'required',
Added / After Commit
+ use App\Models\ProductionYear;
+ use App\Imports\EqptTargetImport;
+ use Maatwebsite\Excel\Facades\Excel;
+ use App\Models\RepairClass;
+ 
+ class EqptTargetController extends Controller
+ {
+ 
+ $years = ProductionYear::all();
+ 
+         $repairclass = RepairClass::all();
+ 
+         return view('eqpt_targets.index', compact('targets', 'groups','years','repairclass'));
+ }
+ 
+ public function import(Request $request)
+ {
+ $request->validate([
Removed / Before Commit
- use Illuminate\Http\Request;
- use App\Models\QCCheck;
- use App\Models\QaInspectionInitate;
- use DB;
- 
- class EquipmentRepairController extends Controller
- {
-    public function index(Request $request)
- {
-     // ⛏ Main repair records: only those not yet initiated to QA
-     $repairs = QCCheck::with(['workOrder', 'workEquipment', 'vir'])
-         ->whereNotExists(function ($query) {
- $query->select(DB::raw(1))
- ->from('equipment_repairs')
- ->whereColumn('equipment_repairs.work_order_id', 'qc_checks.work_order_id')
- ->whereColumn('equipment_repairs.work_equipment_id', 'qc_checks.work_equipment_id')
- ->whereColumn('equipment_repairs.vir_id', 'qc_checks.vir_id')
-                 ->where(function($q) {
Added / After Commit
+ use Illuminate\Http\Request;
+ use App\Models\QCCheck;
+ use App\Models\QaInspectionInitate;
+ use App\Models\QCInspection;
+ use DB;
+ 
+ class EquipmentRepairController extends Controller
+ {
+ //    public function index(Request $request)
+ // {
+ //     // ⛏ Main repair records: only those not yet initiated to QA
+ //     $repairs = QCCheck::with(['workOrder', 'workEquipment', 'vir'])
+ //         ->whereNotExists(function ($query) {
+ //             $query->select(DB::raw(1))
+ //                 ->from('equipment_repairs')
+ //                 ->whereColumn('equipment_repairs.work_order_id', 'qc_checks.work_order_id')
+ //                 ->whereColumn('equipment_repairs.work_equipment_id', 'qc_checks.work_equipment_id')
+ //                 ->whereColumn('equipment_repairs.vir_id', 'qc_checks.vir_id')
Removed / Before Commit
- use Maatwebsite\Excel\Facades\Excel;
- use Barryvdh\DomPDF\Facade\Pdf;
- use Carbon\Carbon;
- 
- class EquipmentReportController extends Controller
- {
- public function tableindex(Request $request)
- {
- $filtersApplied = $request->except(['page', 'export']);
- $filtersApplied = array_filter($filtersApplied);
- 
- 
-         $query = WorkEquipment::with([
-             'workOrder.workUnit.units',
-             'workOrder.workUnit.wksps',
-             'workOrder.workUnit.commands',
-             'workOrder.workUnit.divisions',
-             'workOrder.workUnit.corps',
Added / After Commit
+ use Maatwebsite\Excel\Facades\Excel;
+ use Barryvdh\DomPDF\Facade\Pdf;
+ use Carbon\Carbon;
+ use Illuminate\Support\Facades\Cache;
+ 
+ class EquipmentReportController extends Controller
+ {
+ public function tableindex(Request $request)
+ {
+          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',
Removed / Before Commit
- 
- // 🔽 All units with WCN and no gate pass
- $units = WorkUnit::with('units')
- ->whereHas('workOrders.equipments', function ($query) {
- $query->whereNotNull('wcn_number')
- ->whereDoesntHave('gatePassDetails');
- 
- // 🔽 All job numbers from work orders with WCN and no gate pass
- $jobNumbers = WorkOrder::whereNotNull('job_no')
- ->whereHas('equipments', function ($query) {
- $query->whereNotNull('wcn_number')
- ->whereDoesntHave('gatePassDetails');
- 
- // 🔽 All WCN numbers from equipments with no gate pass
- $wcnNumbers = WorkEquipment::whereNotNull('wcn_number')
- ->whereDoesntHave('gatePassDetails')
- ->pluck('wcn_number')
- ->unique()
Added / After Commit
+ 
+ // 🔽 All units with WCN and no gate pass
+ $units = WorkUnit::with('units')
+         ->whereDate('created_at', '>', '2026-01-10')
+ ->whereHas('workOrders.equipments', function ($query) {
+ $query->whereNotNull('wcn_number')
+ ->whereDoesntHave('gatePassDetails');
+ 
+ // 🔽 All job numbers from work orders with WCN and no gate pass
+ $jobNumbers = WorkOrder::whereNotNull('job_no')
+         ->whereDate('created_at', '>', '2026-01-10')
+ ->whereHas('equipments', function ($query) {
+ $query->whereNotNull('wcn_number')
+ ->whereDoesntHave('gatePassDetails');
+ 
+ // 🔽 All WCN numbers from equipments with no gate pass
+ $wcnNumbers = WorkEquipment::whereNotNull('wcn_number')
+         ->whereDate('created_at', '>', '2026-01-10')
Removed / Before Commit
- $query = McoDemand::select('mco_demands.mco_demand_no')
- ->whereNotNull('mco_demand_no')
- ->join('mco_admin_demand_approvals as approvals', 'mco_demands.req_no', '=', 'approvals.req_no')
-         ->groupBy('mco_demands.mco_demand_no');
- 
- // Filter by date range if provided
- if ($request->filled('date')) {
Added / After Commit
+ $query = McoDemand::select('mco_demands.mco_demand_no')
+ ->whereNotNull('mco_demand_no')
+ ->join('mco_admin_demand_approvals as approvals', 'mco_demands.req_no', '=', 'approvals.req_no')
+         ->groupBy('mco_demands.mco_demand_no')
+         ->orderby('mco_demands.mco_demand_no');
+ 
+ // Filter by date range if provided
+ if ($request->filled('date')) {
Removed / Before Commit
- $query->where('voucher_no', $request->voucher_no);
- }
- 
-     $receives = $query->get();
- 
- $jobNos = Receive::pluck('job_no')->unique();
- $voucherNos = Receive::pluck('voucher_no')->unique();
Added / After Commit
+ $query->where('voucher_no', $request->voucher_no);
+ }
+ 
+     $receives = $query->latest()->paginate(10);
+ 
+ $jobNos = Receive::pluck('job_no')->unique();
+ $voucherNos = Receive::pluck('voucher_no')->unique();
Removed / Before Commit
- $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
- 
- if (empty($demand->mco_demand_no)) 
- {
-         $lastDemandNo = McoDemand::where('prod_year', $year)
-             ->max('mco_demand_no');
- 
- // New demand no (start from 1 if null)
- $newDemandNo = $lastDemandNo ? $lastDemandNo + 1 : 1;
Added / After Commit
+ $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
+ 
+ if (empty($demand->mco_demand_no)) 
+ {
+         $lastDemandNo = McoDemand::max('mco_demand_no');
+ 
+ // New demand no (start from 1 if null)
+ $newDemandNo = $lastDemandNo ? $lastDemandNo + 1 : 1;
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ use Illuminate\Support\Facades\DB;
+ use Illuminate\Http\Request;
+ 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;
+ 
+ class OldDataController extends Controller
+ {
+    public function movedata(Request $request)
+ {
+     set_time_limit(0);
Removed / Before Commit
- 'classes' => $classes,
- ]);
- }
-     public function classaindex(Request $request)
-     {
-         /**
-          * 📌 1. Job No dropdown — distinct list from WorkOrder
-          */
-         $job_nos = WorkOrder::whereNotNull('job_no')
-             ->where('job_no', '!=', '')
-             ->whereNotNull('control_no')
-             ->where('control_no', '!=', '')
-             ->whereHas('equipment', function ($query) {
-                     $query->whereNull('wcn_number')
-                         ->whereHas('repairClass', function ($q) {
-                             $q->where('name', 'CL A'); // ✅ Sirf Class A ka equipment
-                         });
-                 })
Added / After Commit
+ 'classes' => $classes,
+ ]);
+ }
+     // public function classaindex(Request $request)
+     // {
+     //     /**
+     //      * 📌 1. Job No dropdown — distinct list from WorkOrder
+     //      */
+     //     $job_nos = WorkOrder::whereNotNull('job_no')
+     //         ->where('job_no', '!=', '')
+     //         ->whereNotNull('control_no')
+     //         ->where('control_no', '!=', '')
+     //         ->whereHas('equipment', function ($query) {
+     //                 $query->whereNull('wcn_number')
+     //                     ->whereHas('repairClass', function ($q) {
+     //                         $q->where('name', 'CL A'); // ✅ Sirf Class A ka equipment
+     //                     });
+     //             })
Removed / Before Commit
- 
- class QADecisionController extends Controller
- {
- public function index(Request $request)
- {
- $query = WorkEquipment::with(['workOrder', 'vir', 'qaDecision'])
-         ->whereHas('vir', function ($q) {
-             $q->whereNotNull('status');
- })
-         ->whereDoesntHave('qaDecision'); // QA not done
- 
-     // ✅ Filter by control number (from workOrder)
- if ($request->filled('control_number')) {
- $query->whereHas('workOrder', function ($q) use ($request) {
- $q->where('control_no', 'like', '%' . $request->control_number . '%');
- });
- }
- 
Added / After Commit
+ 
+ class QADecisionController extends Controller
+ {
+ // public function index(Request $request)
+ // {
+ //     $query = WorkEquipment::with(['workOrder', 'vir', 'qaDecision'])
+ //         ->whereHas('vir', function ($q) {
+ //             $q->whereNotNull('status');
+ //         })
+ //         ->whereDoesntHave('qaDecision') // QA not done
+ //         ->whereDoesntHave('RepairClass', function ($q) {
+ //             $q->whereRaw('LOWER(name) = ?', ['ainu']);
+ //         });
+ //     // ✅ Filter by control number (from workOrder)
+ //     if ($request->filled('control_number')) {
+ //         $query->whereHas('workOrder', function ($q) use ($request) {
+ //             $q->where('control_no', 'like', '%' . $request->control_number . '%');
+ //         });
Removed / Before Commit
- use App\Models\WorkEquipment;
- use App\Models\EquipmentRepair;
- use App\Models\QaInspectionInitate;
- use DB;
- use Illuminate\Support\Facades\Auth;
- 
- class QAInspectionController extends Controller
- {
- // 1. Show all inspections with basic filters
- public function index(Request $request)
- {
-     $initiations = QaInspectionInitate::with(['workOrder', 'workEquipment', 'vir', 'mr','latestRepair'])
- ->whereNotExists(function ($query) {
- $query->select(DB::raw(1))
- ->from('qa_inspections')
- });
- });
- })
Added / After Commit
+ use App\Models\WorkEquipment;
+ use App\Models\EquipmentRepair;
+ use App\Models\QaInspectionInitate;
+ 
+ use DB;
+ use Illuminate\Support\Facades\Auth;
+ 
+ class QAInspectionController extends Controller
+ {
+ // 1. Show all inspections with basic filters
+ // public function index(Request $request)
+ // {
+ //     $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')
+ //                 ->whereColumn('qa_inspections.work_equipment_id', 'qa_inspection_initate.work_equipment_id')
Removed / Before Commit
- // }
- 
- 
- public function index(Request $request)
- {
-     // 🎯 Main equipment fetch (paginate raw records, no groupBy in SQL)
-     $equipmentsQuery = WorkEquipment::with([
-             'workOrder.workUnit.units',
-             'workOrder.workUnit.wksps',
-             'workOrder.workUnit.commands',
-             'vir',
-             'workOrder.qcCheck'
-         ])
-         ->whereHas('vir', fn ($q) => $q->whereNotNull('status'))
-         ->whereHas('workOrder', fn ($q) => $q->whereNotNull('job_no'))
-         ->whereDoesntHave('workOrder.qcCheck')
-         ->when($request->filled('job_no'), fn ($q) =>
-             $q->whereHas('workOrder', fn ($query) =>
Added / After Commit
+ // }
+ 
+ 
+ // public function index(Request $request)
+ // {
+ //     // 🎯 Main equipment fetch (paginate raw records, no groupBy in SQL)
+ //     $equipmentsQuery = WorkEquipment::with([
+ //             'workOrder.workUnit.units',
+ //             'workOrder.workUnit.wksps',
+ //             'workOrder.workUnit.commands',
+ //             'vir',
+ //             'workOrder.qcCheck'
+ //         ])
+ //         ->whereHas('vir', fn ($q) => $q->whereNotNull('status'))
+ //         ->whereHas('workOrder', fn ($q) => $q->whereNotNull('job_no'))
+ //         ->whereDoesntHave('workOrder.qcCheck')
+ //         ->when($request->filled('job_no'), fn ($q) =>
+ //             $q->whereHas('workOrder', fn ($query) =>
Removed / Before Commit
- 
- use Illuminate\Http\Request;
- use App\Models\QAInspection;
- use App\Models\QCInspection;
- use DB;
- use App\Models\WorkOrder;
- use App\Models\WorkEquipment;
- use Illuminate\Support\Facades\Auth;
- 
- class QCInspectionController extends Controller
- {
- public function index(Request $request)
- {
-     // Step 1: Only those QA inspections (passed) which are not yet in QC
-     $query = QAInspection::with(['workOrder', 'workEquipment'])
-         ->where('status', 'passed')
-         ->whereNotExists(function ($subQuery) {
-             $subQuery->select(DB::raw(1))
Added / After Commit
+ 
+ use Illuminate\Http\Request;
+ use App\Models\QAInspection;
+ use App\Models\QaInspectionInitate;
+ use App\Models\QCInspection;
+ use DB;
+ use App\Models\WorkOrder;
+ use App\Models\WorkEquipment;
+ use Illuminate\Support\Facades\Auth;
+ use App\Models\EquipmentRepair;
+ 
+ class QCInspectionController extends Controller
+ {
+ // public function index(Request $request)
+ // {
+ //     // Step 1: Only those QA inspections (passed) which are not yet in QC
+ //     $query = QAInspection::with(['workOrder', 'workEquipment'])
+ //         ->where('status', 'passed')
Removed / Before Commit
- use App\Models\Group;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\DB;
- 
- class VIRController extends Controller
- {
- })
- ->whereHas('workOrder', function ($q) {
- $q->whereNotNull('control_no');
- });
- 
- if (!is_null($user->role)) {
- 
- // Use paginate with query persistence
- $equipments = $query
- ->orderByDesc('created_at')   // 🔥 latest on top
- ->paginate(10)
- ->appends($request->query());
Added / After Commit
+ use App\Models\Group;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Models\QCCheck;
+ use Illuminate\Support\Facades\Auth;
+ use App\Models\CrcEntry;
+ use App\Models\CrcJob;
+ use Carbon\Carbon;
+ use App\Models\ProductionYear;
+ 
+ class VIRController extends Controller
+ {
+ })
+ ->whereHas('workOrder', function ($q) {
+ $q->whereNotNull('control_no');
+     })
+     ->whereDoesntHave('RepairClass', function ($q) {
+         $q->where('name', 'Ainu');   // 👈 RepairClass table ka column
Removed / Before Commit
- use App\Models\WorkEquipment;
- use Illuminate\Http\Request;
- use Illuminate\Support\Facades\Validator;
- 
- class WcnController extends Controller
- {
- // 🔹 Always available
- $committedData = WorkEquipment::whereNotNull('wcn_number')
- ->where('wcn_committed', false)
- ->with(['workOrder', 'qcInspection']) // optional eager loading
- ->get();
- 
- 'errors' => $validator->errors()
- ], 422);
- }
- 
- $workOrder = WorkOrder::where('job_no', $request->work_order_id)->first();
- $jobNo = $workOrder->job_no;
Added / After Commit
+ use App\Models\WorkEquipment;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\Validator;
+ use App\Models\ProductionYear;
+ 
+ class WcnController extends Controller
+ {
+ // 🔹 Always available
+ $committedData = WorkEquipment::whereNotNull('wcn_number')
+ ->where('wcn_committed', false)
+         ->whereDate('wcn_date', '>', '2026-01-10')
+ ->with(['workOrder', 'qcInspection']) // optional eager loading
+ ->get();
+ 
+ 'errors' => $validator->errors()
+ ], 422);
+ }
+          $data =ProductionYear::where('is_active',1)->first();
Removed / Before Commit
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Str;
- use Carbon\Carbon;
- 
- 
- class WorkOrderController extends Controller
- {
- $workOrders = WorkOrder::with(['workUnit', 'workUser', 'equipments'])
- ->whereNull('job_no')  // 👈 show only work orders without a job number
- ->paginate(6); // 👈 paginate 6 per page (adjust as needed)
- 
- return view('work-order.index', compact('workOrders'));
- 
- DB::beginTransaction();
- 
-     try {
- $workOrder = WorkOrder::firstOrCreate(
- ['work_unit_id' => $request->work_unit_id],
Added / After Commit
+ use Illuminate\Support\Facades\DB;
+ use Illuminate\Support\Str;
+ use Carbon\Carbon;
+ use App\Models\VIR;
+ use App\Models\ProductionYear;
+ 
+ 
+ class WorkOrderController extends Controller
+ {
+ $workOrders = WorkOrder::with(['workUnit', 'workUser', 'equipments'])
+ ->whereNull('job_no')  // 👈 show only work orders without a job number
+         ->latest()
+ ->paginate(6); // 👈 paginate 6 per page (adjust as needed)
+ 
+ return view('work-order.index', compact('workOrders'));
+ 
+ DB::beginTransaction();
+ 
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;
+ use Illuminate\Database\Eloquent\Relations\HasMany;
+ 
+ class Complaint extends Model
+ {
+     use HasFactory;
+ 
+     protected $fillable = [
+         'complaint_date',
+         'complaint_time',
+         'user_name',
+         'nature_of_complaint',
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class ComplaintAssignmentHistory extends Model
+ {
+     use HasFactory;
+ 
+     protected $table = 'complaint_assignment_history';
+ 
+     protected $fillable = [
+         'complaint_id',
+         'assigned_to',
+         'assigned_by',
+         'assigned_by_name',
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class ComplaintFeedbackHistory extends Model
+ {
+     use HasFactory;
+ 
+     protected $table = 'complaint_feedback_history';
+ 
+     protected $fillable = [
+         'complaint_id',
+         'user_id',
+         'user_name',
+         'user_status',
Removed / Before Commit
- class EqptTarget extends Model
- {
- protected $fillable = [
-         'group', 'main_eqpt', 'production_year', 'target'
- ];
- }
Added / After Commit
+ class EqptTarget extends Model
+ {
+ protected $fillable = [
+         'group', 'main_eqpt', 'production_year', 'target','repair_class'
+ ];
+ }
Removed / Before Commit
- {
- return $this->hasMany(Equipment::class, 'group_id', 'id');
- }
- }
Added / After Commit
+ {
+ return $this->hasMany(Equipment::class, 'group_id', 'id');
+ }
+ 
+ public function users()
+ {
+     return $this->hasMany(User::class);
+ }
+ }
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\SoftDeletes;
+ 
+ class TaxRegimeMaster extends Model
+ {
+     use HasFactory, SoftDeletes;
+ 
+     protected $fillable = [
+         'regime_name',
+         'financial_year',
+         'description',
+         'minimum_income',
+         'standard_deduction',
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\SoftDeletes;
+ 
+ class TaxSlabMaster extends Model
+ {
+     use HasFactory, SoftDeletes;
+ 
+     protected $fillable = [
+         'tax_regime_master_id',
+         'slab_from',
+         'slab_to',
+         'tax_rate',
+     ];
Removed / Before Commit
- 'wcn_searil_no',
- 'wcn_number',
- 'wcn_date',
-         'wcn_committed'
- ];
- 
- public function workOrder()
- {
- return $this->belongsTo(Equipment::class, 'main_eqpt');
- }
- public function subassy()
- {
- return $this->belongsTo(SubAssyEquipment::class,'eqpt');
Added / After Commit
+ 'wcn_searil_no',
+ 'wcn_number',
+ 'wcn_date',
+         'wcn_committed',
+         'sus',
+         'repair_remarks',
+         'type',
+         'created_at',
+         'updated_at',
+ ];
+ 
+ public function workOrder()
+ {
+ return $this->belongsTo(Equipment::class, 'main_eqpt');
+ }
+     public function CrcEquipments()
+     {
+         return $this->belongsTo(CrcPartMaster::class, 'main_eqpt');
Removed / Before Commit
- {
- use HasFactory, SoftDeletes;
- 
-     protected $fillable = ['work_unit_id', 'work_user_id', 'control_no','control_date','job_no','job_date','job_head','job_printed_at']; // Removed work_equipt_id
- 
- public function workUnit()
- {
- return $this->belongsTo(WorkUser::class, 'work_user_id');
- }
- 
-     // ✅ Updated: WorkOrder has many equipments
- public function equipments()
- {
- return $this->hasMany(WorkEquipment::class);
- {
- return $this->hasMany(VIR::class);
- }
- 
Added / After Commit
+ {
+ use HasFactory, SoftDeletes;
+ 
+     protected $fillable = ['work_unit_id', 'work_user_id', 'control_no','c_n','control_date','job_no','job_date','job_head','job_printed_at','created_at',
+         'updated_at']; // Removed work_equipt_id
+ 
+ public function workUnit()
+ {
+ return $this->belongsTo(WorkUser::class, 'work_user_id');
+ }
+ 
+     // Updated: WorkOrder has many equipments
+ public function equipments()
+ {
+ return $this->hasMany(WorkEquipment::class);
+ {
+ return $this->hasMany(VIR::class);
+ }
Removed / Before Commit
- {
- return $this->hasMany(WorkOrder::class);
- }
- 
- public function units()
- {
Added / After Commit
+ {
+ return $this->hasMany(WorkOrder::class);
+ }
+     public function crcworkorder()
+     {
+         return $this->hasMany(WorkOrder::class, 'work_unit_id','id');
+     }
+ 
+ public function units()
+ {
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('tax_regime_masters', function (Blueprint $table) {
+             $table->id();
+             $table->string('regime_name');
+             $table->string('financial_year');
+             $table->text('description')->nullable();
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('tax_slab_masters', function (Blueprint $table) {
+             $table->id();
+             $table->foreignId('tax_regime_master_id')->constrained()->onDelete('cascade');
+             $table->decimal('slab_from', 15, 2);
+             $table->decimal('slab_to', 15, 2)->nullable();
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('complaints', function (Blueprint $table) {
+             $table->id();
+             $table->date('complaint_date');
+             $table->time('complaint_time');
+             $table->string('user_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(): void
+     {
+         Schema::create('complaint_feedback_history', function (Blueprint $table) {
+             $table->id();
+             $table->foreignId('complaint_id')->constrained()->onDelete('cascade');
+             $table->foreignId('user_id')->nullable()->constrained()->onDelete('set null');
+             $table->string('user_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(): void
+     {
+         Schema::create('complaint_assignment_history', function (Blueprint $table) {
+             $table->id();
+             $table->foreignId('complaint_id')->constrained()->onDelete('cascade');
+             $table->foreignId('assigned_to')->constrained('users')->onDelete('cascade');
+             $table->foreignId('assigned_by')->constrained('users')->onDelete('cascade');
Removed / Before Commit
- 
- <select class="form-select" name="shift_id[]" id="shift_id" multiple>
- @php
-                                     $staffShiftIds = explode(',',$staff->shift_id);
- @endphp
- 
- @foreach ($shifts as $shift)
- <option value="{{ $shift->id }}"
-                                             {{ in_array($shift->id, old('shift_id', $staffShiftIds ?? [])) ? 'selected' : '' }}>
- {{ $shift->name }}
- </option>
- @endforeach
- </div>
- </div>
- 
- {{-- Annual CTC / Total Salary --}}
- <!-- <div class="row mb-3">
- <label for="annual_salary" class="col-md-2 col-form-label text-start">Total Annual Salary</label>
Added / After Commit
+ 
+ <select class="form-select" name="shift_id[]" id="shift_id" multiple>
+ @php
+                                     $staffShiftIds = isset($staff) ? explode(',',$staff->shift_id) : [];
+ @endphp
+ 
+ @foreach ($shifts as $shift)
+ <option value="{{ $shift->id }}"
+                                             {{ in_array($shift->id, old('shift_id', $staffShiftIds)) ? 'selected' : '' }}>
+ {{ $shift->name }}
+ </option>
+ @endforeach
+ </div>
+ </div>
+ 
+                             {{-- Tax Regime --}}
+                             <div class="row mb-3">
+                                 <div class="col-md-12">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+     .form-control,
+     .form-select {
+         border-radius: 0.5rem;
+         box-shadow: none;
+         transition: all 0.2s ease-in-out;
+     }
+ 
+     .form-control:focus,
+     .form-select:focus {
+         box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
+         border-color: #198754;
+     }
+ 
+     .slab-row {
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+     .form-control,
+     .form-select {
+         border-radius: 0.5rem;
+         box-shadow: none;
+         transition: all 0.2s ease-in-out;
+     }
+ 
+     .form-control:focus,
+     .form-select:focus {
+         box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
+         border-color: #198754;
+     }
+ </style>
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+     .form-control,
+     .form-select {
+         border-radius: 0.5rem;
+         box-shadow: none;
+         transition: all 0.2s ease-in-out;
+     }
+ 
+     .form-control:focus,
+     .form-select:focus {
+         box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
+         border-color: #198754;
+     }
+ </style>
+ 
Removed / Before Commit
- <link href="{{url('assets/plugins/simplebar/css/simplebar.css')}}" rel="stylesheet">
- 	<link href="{{url('assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css')}}" rel="stylesheet">
- 	<link href="{{url('assets/plugins/metismenu/css/metisMenu.min.css')}}" rel="stylesheet">
- 	<!-- loader-->
- 	<!-- <link href="{{url('assets/css/pace.min.css')}}" rel="stylesheet">
- 	<script src="assets/js/pace.min.js"></script> -->
- 	<!-- Bootstrap CSS -->
- 	<link href="{{url('assets/css/bootstrap.min.css')}}" rel="stylesheet">
- 	<link href="{{url('assets/css/bootstrap-extended.css')}}" rel="stylesheet">
- 	<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
- 	<link href="{{url('assets/sass/app.css')}}" rel="stylesheet">
- 	<link rel="stylesheet" href="{{url('assets/sass/dark-theme.css')}}">
- 	<link href="{{url('assets/css/icons.css')}}" rel="stylesheet">
- \ No newline at end of file
Added / After Commit
+ <link href="{{url('assets/plugins/simplebar/css/simplebar.css')}}" rel="stylesheet">
+ 	<link href="{{url('assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css')}}" rel="stylesheet">
+ 	<link href="{{url('assets/plugins/metismenu/css/metisMenu.min.css')}}" rel="stylesheet">
+ 	<link href="{{url('assets/css/bootstrap.min.css')}}" rel="stylesheet">
+ 	<link href="{{url('assets/css/bootstrap-extended.css')}}" rel="stylesheet">
+ 	
+ 	<link href="{{url('assets/sass/app.css')}}" rel="stylesheet">
+ 	<link rel="stylesheet" href="{{url('assets/sass/dark-theme.css')}}">
+ 	<link href="{{url('assets/css/icons.css')}}" rel="stylesheet">
+ \ No newline at end of file
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>Complaint Assignment</b></h4>
+                 <!-- <small class="text-muted">Assign pending complaints to SWG group users</small> -->
+             </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
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>My Assigned Complaints</b></h4>
+                 <small class="text-muted">Complaints assigned to you for resolution</small>
+             </div>
+             <div class="col-md-6">
+                 {{-- <div class="d-flex justify-content-end">
+                     <a href="{{ route('assignment') }}" class="btn btn-primary">
+                         <i class="fas fa-user-plus"></i> Assign Complaints
+                     </a>
+                     <a href="{{ route('complaints.index') }}" class="btn btn-secondary ms-2">
+                         <i class="fas fa-list"></i> All Complaints
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header">
+         <h4>Raise New Complaint</h4>
+     </div>
+     <div class="card-body">
+         <form action="{{ route('complaints.store') }}" method="POST">
+             @csrf
+ 
+             <div class="row">
+                 <div class="col-md-4 mb-3">
+                     <label for="complaint_date" class="form-label">Complaint Date <span class="text-danger">*</span></label>
+                     <input type="date" id="complaint_date" name="complaint_date" class="form-control" value="{{ date('Y-m-d') }}" readonly>
+                 </div>
+ 
+                 <div class="col-md-4 mb-3">
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>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>
+         </div>
+     </div>
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ @if(session('success'))
+     <div class="alert alert-success">{{ session('success') }}</div>
+ @endif
+ 
+ @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">
Removed / Before Commit
- @extends('layouts.app')
- 
- @section('content')
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- 
- <style>
- .addpart { color: #008cff !important; }
- </div>
- @endif
- 
- 
- 
- <div class="card">
- 
-             <!-- Right Side : Import + Sample -->
-            <div class="card-header d-flex justify-content-between align-items-center">
- 
-                 <!-- Left -->
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ 
+ 
+ <style>
+ .addpart { color: #008cff !important; }
+ </div>
+ @endif
+ 
+ <div class="card">
+ 
+             <div class="card-header py-3 d-flex justify-content-between align-items-center flex-wrap">
+ <h4 class="mb-0"><b>Create CRC Entry</b></h4>
+ </div>
+ 
+ <hr>
+         <div class="card-body">
Removed / Before Commit
- </div>
- </div>
- 
-     <!-- <div class="card-header py-3 d-flex justify-content-between align-items-center">
-     <h4><b>CRC Entries</b></h4>
-     <form method="GET" action="{{ route('crc.entries.index') }}" class="row g-3 mb-4 align-items-end">
-             <div class="col-md-2">
-                 <label><b>CRC No</b></label>
-                 <select name="crc_no" class="form-select select2" data-placeholder="Select CRC No">
-                     <option value="">-- All CRC No --</option>
-                     @foreach ($crcNos as $crc)
-                         <option value="{{ $crc }}" {{ request('crc_no') == $crc ? 'selected' : '' }}>{{ $crc }}</option>
-                     @endforeach
-                 </select>
-             </div>
- 
-             <div class="col-md-2">
-                 <label><b>Job No</b></label>
Added / After Commit
+ </div>
+ </div>
+ 
+ <hr>
+ 
+ 
+ <tr>
+ <th>CRC No</th>
+ <th>Unit</th>
+                         <th>Work Order No</th>
+ <th>Job Nos</th>
+ <th>Part Nos</th>
+ <th>Action</th>
+ <tbody>
+ @forelse ($entries as $entry)
+ <tr>
+                         <td>{{ preg_replace('#/\d+$#', '', $entry->c_n) }}</td>
+                         <td>{{ $entry?->workUnit?->units?->name ?? '-' }}</td>
Removed / Before Commit
- <div class="modal-body">
- <div class="mb-6">
- <strong>Parent CRC No:</strong>
-                     <span class="badge bg-primary">
-                         {{ $crcEntry->crc_no }}
- </span>
- </div>
- 
- <h6 class="mt-7">IV CRC Numbers</h6>
- 
- <ul class="list-group">
-                     @foreach($crcEntry->ivUnits as $iv)
- <li class="list-group-item d-flex justify-content-between">
- <span>
-                                 <strong>IV No:</strong> {{ $iv->iv_no }}
- </span>
-                             <span class="badge bg-success">
-                                 {{ $iv->crc_no }}
Added / After Commit
+ <div class="modal-body">
+ <div class="mb-6">
+ <strong>Parent CRC No:</strong>
+                     <span>
+                         {{ $crcEntry?->workOrder?->control_no }}
+ </span>
+ </div>
+ 
+ <h6 class="mt-7">IV CRC Numbers</h6>
+ 
+ <ul class="list-group">
+                     @if(!empty($crcEntry?->workOrder))
+                     @foreach($crcEntry?->workOrder?->equipments as $iv)
+ <li class="list-group-item d-flex justify-content-between">
+ <span>
+                                 <strong>IV No:</strong> {{ $iv->unit_wo_no }}
+ </span>
+                             <span>
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">{{ $entry->crc_no }}</div>
- </div>
- <div class="col-md-3">
- <label><b>CRC Date</b></label>
-                 <div class="form-control bg-light">{{ \Carbon\Carbon::parse($entry->crc_date)->format('d-m-Y') }}</div>
- </div>
- <div class="col-md-3">
- <label><b>Unit</b></label>
-                 <div class="form-control bg-light">{{ $entry->unit?->name ?? '-' }}</div>
- </div>
- <div class="col-md-3">
- <label><b>Command</b></label>
-                 <div class="form-control bg-light">{{ $entry->command?->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">{{ 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>
Removed / Before Commit
- @endsection
- 
- @section('scripts')
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- 
- <script>
- $(document).ready(function() {
Added / After Commit
+ @endsection
+ 
+ @section('scripts')
+ 
+ <script>
+ $(document).ready(function() {
Removed / Before Commit
- 
- @section('content')
- 
-   <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
- <style>
- .info-box {
- background: white;
- border-radius: 8px;
- height: 100%;
- }
- </style>
- 
-   <div class="content w-100">
-     <div class="row g-3 mb-4">
- <div class="col-md-2"><div class="info-box">QA Pending: <strong>2</strong></div></div>
- <div class="col-md-2"><div class="info-box">Under Repair: <strong>0</strong></div></div>
- <div class="col-md-2"><div class="info-box">Pending Job No.: <strong>1</strong></div></div>
- <div class="col-md-3"><div class="info-box">Total Equipments: <strong>90</strong></div></div>
Added / After Commit
+ 
+ @section('content')
+ 
+   <script src="{{url('assets/js/chart.js')}}"></script>
+ <style>
+ .info-box {
+ background: white;
+ border-radius: 8px;
+ height: 100%;
+ }
+     .year-display {
+       font-weight: bold;
+       color: #000000;
+       font-size: 14px;
+     }
+ </style>
+ 
+   {{-- <div class="content w-100">
Removed / Before Commit
- <th>Cat/Part No</th>
- <th>Nomenclature</th>
- <th>A/U</th>
- <th>No Off</th>
- <th>Qty</th>
- <!-- <th>Job No & Date</th> -->
- <td>{{ $scale->cat_part_no }}</td>
- <td>{{ $scale->nomenclature }}</td>
- <td>{{ $scale->account_unit }}</td>
- <td>{{ $scale->no_off }}</td>
- <td>{{ $item->qty_demanded ?? '' }}</td>
- <!-- @if($loop->first)
Added / After Commit
+ <th>Cat/Part No</th>
+ <th>Nomenclature</th>
+ <th>A/U</th>
+         <th>Regd No </th>
+ <th>No Off</th>
+ <th>Qty</th>
+ <!-- <th>Job No & Date</th> -->
+ <td>{{ $scale->cat_part_no }}</td>
+ <td>{{ $scale->nomenclature }}</td>
+ <td>{{ $scale->account_unit }}</td>
+           <td>{{ $item->registation_no }}</td>
+ <td>{{ $scale->no_off }}</td>
+ <td>{{ $item->qty_demanded ?? '' }}</td>
+ <!-- @if($loop->first)
Removed / Before Commit
- <tbody>
- @foreach($divs as $index => $div)
- <tr>
-                             <td>{{ $div->firstItem() + $index }}</td>
- <td>{{ $div->name }}</td>
- <td>
- <a class="btn-edit" data-id="{{ $div->id }}" href="javascript:void(0);"
Added / After Commit
+ <tbody>
+ @foreach($divs as $index => $div)
+ <tr>
+                             <td>{{ $divs->firstItem() + $index }}</td>
+ <td>{{ $div->name }}</td>
+ <td>
+ <a class="btn-edit" data-id="{{ $div->id }}" href="javascript:void(0);"
Removed / Before Commit
- position: relative;
- margin-bottom: 100px; /* ya jitna space chahiye footer se */
- }
- #btnChart {
- color: #008cff;
- }
- 
- #btnChart:hover {
- color: white;
- background-color: #008cff;
- }
- .btnt{
- color:#6c757d!important;
- }
- .btnt:hover{
- color:white!important;
- }
- </style>
Added / After Commit
+ position: relative;
+ margin-bottom: 100px; /* ya jitna space chahiye footer se */
+ }
+ /* #btnChart {
+ color: #008cff;
+ }
+ 
+ #btnChart:hover {
+ color: white;
+ background-color: #008cff;
+ } */
+ .btnt{
+ color:#6c757d!important;
+ }
+ .btnt:hover{
+ color:white!important;
+ }
+ button.btn{
Removed / Before Commit
- @extends('layouts.app')
- @section('content')
- <style>
- .select2-container { width: 100% !important; }
- .select2-selection { min-height: 32px; }
- form { margin-bottom: 40px; }
- .select2-results__option { padding-left: 10px; display: flex; align-items: center; }
- .stat-box { padding: 15px; background: #f1f5f9; border-left: 5px solid #0d6efd; border-radius: 4px; margin-bottom: 15px; }
- #btnChart {
- color: #008cff;
- }
- 
- #btnChart:hover {
- color: white;
- background-color: #008cff;
- }
- .btnt{
- color:#6c757d!important;
Added / After Commit
+ @extends('layouts.app')
+ @section('content')
+ @php
+     $query = request()->except('view'); // view hata diya
+ @endphp
+ <style>
+ .select2-container { width: 100% !important; }
+ .select2-selection { min-height: 32px; }
+ form { margin-bottom: 40px; }
+ .select2-results__option { padding-left: 10px; display: flex; align-items: center; }
+ .stat-box { padding: 15px; background: #f1f5f9; border-left: 5px solid #0d6efd; border-radius: 4px; margin-bottom: 15px; }
+ /* #btnChart {
+ color: #008cff;
+ }
+ 
+ #btnChart:hover {
+ color: white;
+ background-color: #008cff;
Removed / Before Commit
- 
- 
- <div class="card-header py-3">
-                 <div class="row align-items-end">
-                     {{-- Left side: Heading --}}
-                     <div class="col-md-3">
-                         <h4 class="mb-0"><b>Eqpt Targets</b></h4>
-                     </div>
- 
-                     {{-- Right side: Filters + Add Button --}}
-                     <div class="col-md-9 " >
-                         <div class="row align-items-end justify-content-end">
-                             {{-- Group --}}
-                             <div class="col-md-2">
-                                 <label class="form-label">Groups</label>
-                                 <select id="filterGroup" class="form-select select2">
-                                     <option value="">-- All Groups --</option>
-                                     @foreach($groups as $group)
Added / After Commit
+ 
+ 
+ <div class="card-header py-3">
+                 <div class="row align-items-start">
+ 
+     {{-- 🔹 LEFT : HEADING --}}
+     <div class="col-md-3 d-flex align-items-center">
+         <h4 class="mb-0"><b>Eqpt Targets</b></h4>
+     </div>
+ 
+     {{-- 🔹 RIGHT : ACTIONS + FILTERS --}}
+     <div class="col-md-9">
+ 
+         {{-- 🔸 TOP ROW : ACTION BUTTONS --}}
+         <div class="row mb-3">
+             <div class="col-12 d-flex justify-content-end align-items-center gap-2 flex-wrap">
+ 
+                 {{-- Add Target --}}
Removed / Before Commit
- @endsection
- 
- @section('scripts')
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- 
- <script>
- $(document).ready(function() {
Added / After Commit
+ @endsection
+ 
+ @section('scripts')
+ 
+ <script>
+ $(document).ready(function() {
Removed / Before Commit
- <meta charset="UTF-8">
- <title>Gate Out Pass</title>
- <style>
-         @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
- 
- @media print {
- body {
- </tr>
- </table>
- 
-             <div class="section" style="font-size: 16px; text-align: center; font-weight: 400;"><strong>TOTAL NO OF EQPTS COLLECTED:{{ $pass->details->count() }}</strong> </div>
-             <div class="section" style="font-size: 16px; text-align: center; font-weight: 400;"><strong>EQPT Name:@foreach($pass->details as $detail)
-         {{ $detail->workEquipment?->main_eqpt ?? '-' }}@if (!$loop->last), @endif
-     @endforeach</strong>  </div>
- 
- <div class="section">
- <p style="text-decoration: underline; margin-bottom:10px;"><strong>COLLECTED BY :-</strong></p>
Added / After Commit
+ <meta charset="UTF-8">
+ <title>Gate Out Pass</title>
+ <style>
+         /* Poppins – FULL FAMILY */
+ 
+ @font-face {
+   font-family: 'Poppins';
+   src: url('/assets/fonts/poppins/Poppins-Thin.woff2') format('woff2');
+   font-weight: 100;
+   font-style: normal;
+ }
+ 
+ @font-face {
+   font-family: 'Poppins';
+   src: url('/assets/fonts/poppins/Poppins-ThinItalic.woff2') format('woff2');
+   font-weight: 100;
+   font-style: italic;
+ }
Removed / Before Commit
- <tbody>
- @foreach($groups as $index => $group)
- <tr>
-                                 <td>{{ $index + 1 }}</td>
- <td>{{ $group->name }}</td>
- <td>{{ $group->vertical?->name ?? '-' }}</td>
- <td>
Added / After Commit
+ <tbody>
+ @foreach($groups as $index => $group)
+ <tr>
+                                 <td>{{ $groups->firstItem() + $index }}</td>
+ <td>{{ $group->name }}</td>
+ <td>{{ $group->vertical?->name ?? '-' }}</td>
+ <td>
Removed / Before Commit
- @endsection
- 
- @section('scripts')
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
- <script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/moment.min.js"></script>
- <script src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
- 
- <script>
- $(document).ready(function () {
Added / After Commit
+ @endsection
+ 
+ @section('scripts')
+ 
+ <script>
+ $(document).ready(function () {
Removed / Before Commit
- </tbody>
- </table>
- </div>
-         </div>
- </div>
- </div>
- @endsection
Added / After Commit
+ </tbody>
+ </table>
+ </div>
+         </div>{{$receives->links()}}
+ </div>
+ </div>
+ @endsection
Removed / Before Commit
- 	<!--app JS-->
- 	<script src="{{url('assets/js/pace.min.js')}}"></script>
- 	<script src="{{url('assets/js/app.js')}}"></script>
- 	<script src="{{url('assets/plugins/datatable/js/jquery.dataTables.min.js')}}"></script>
- 	<script src="{{url('assets/plugins/datatable/js/dataTables.bootstrap5.min.js')}}"></script>
- 	<link href="{{ url('assets/plugins/select2/css/select2.min.css') }}" rel="stylesheet">
Added / After Commit
+ 	<!--app JS-->
+ 	<script src="{{url('assets/js/pace.min.js')}}"></script>
+ 	<script src="{{url('assets/js/app.js')}}"></script>
+ 	<script src="{{url('assets/js/moment.min.js')}}"></script>
+ 	<script src="{{url('assets/js/daterangepicker.min.js')}}"></script>
+ 	<link href="{{url('assets/css/daterangepicker.css')}}" rel="stylesheet">
+ 	<script src="{{url('assets/plugins/datatable/js/jquery.dataTables.min.js')}}"></script>
+ 	<script src="{{url('assets/plugins/datatable/js/dataTables.bootstrap5.min.js')}}"></script>
+ 	<link href="{{ url('assets/plugins/select2/css/select2.min.css') }}" rel="stylesheet">
Removed / Before Commit
- <td><strong>DEMAND NO.:</strong> {{ $demand->demand_no }}</td>
- </tr>
- <tr>
-             <td><strong>TO:</strong> OSS, 999 ABW</td>
- <td><strong>NO OF EQPT:</strong> {{ $items->count() }} (POPULATION)</td>
- <td><strong>DATE:</strong> {{ now()->format('d-m-y') }}</td>
- </tr>
- <tr>
- <td><strong>Eqpt-</strong> {{ $demand->workEquipment->Equipments->name ?? '' }}</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>
- </tr>
- </table>
- 
-     <strong>Main EQPT - {{ $demand->workEquipment->main_eqpt ?? '' }}</strong><br><br>
-     <strong>SALE REF - RA/Q 155 OS NO 1, ISSUE 6 Mar 2024</strong><br><br>
- <p class="t-c"><strong>Dy GM (M)</strong></p><br><br>
Added / After Commit
+ <td><strong>DEMAND NO.:</strong> {{ $demand->demand_no }}</td>
+ </tr>
+ <tr>
+             <td><strong>TO:</strong> OSS, 509 ABW</td>
+ <td><strong>NO OF EQPT:</strong> {{ $items->count() }} (POPULATION)</td>
+ <td><strong>DATE:</strong> {{ now()->format('d-m-y') }}</td>
+ </tr>
+ <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>
+ </tr>
+ </table>
+ 
+     <!-- <strong>Main EQPT - {{ $demand->workEquipment->main_eqpt ?? '' }}</strong><br><br>
+     <strong>SALE REF - RA/Q 155 OS NO 1, ISSUE 6 Mar 2024</strong><br><br> -->
Removed / Before Commit
- $isSubmitted = \App\Models\McoSubmission::where('req_no', $demands[0]->req_no)
- ->exists();
- @endphp
- 
- <div class="d-flex flex-wrap align-items-center mb-3">
-     <div class="me-3"><strong>Eqpt:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
-     <div class="me-3"><strong>Registration No:</strong> {{ $demands[0]->registation_no ?? 'N/A' }}</div>
-     <div class="me-3"><strong>Job No:</strong> {{ $demands[0]->job_no }}</div>
-     <div class="me-3"><strong>Class:</strong> {{ $equipment->RepairClass?->name ?? 'N/A' }}</div>
-     <div class="me-3"><strong>Group:</strong> {{ $equipment->group->name ?? 'N/A' }}</div>
- 
-     <div class="ms-auto">
-         @if(!$isSubmitted)
-             @if(!$demands->isEmpty())
-                 <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#submitModal">
-                     Submit Demand
-                 </button>
-             @else
Added / After Commit
+ $isSubmitted = \App\Models\McoSubmission::where('req_no', $demands[0]->req_no)
+ ->exists();
+ @endphp
+ @if(empty( $targets))
+ <div class="d-flex flex-wrap align-items-center mb-3">
+      {{ $equipment->Equipments?->name ?? 'N/A' }} tagert on exist on equipment target table
+ </div>
+ @else
+     <div class="d-flex flex-wrap align-items-center mb-3">
+         <div class="me-3"><strong>Eqpt:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
+         <div class="me-3"><strong>Registration No:</strong> {{ $demands[0]->registation_no ?? 'N/A' }}</div>
+         <div class="me-3"><strong>Job No:</strong> {{ $demands[0]->job_no }}</div>
+         <div class="me-3"><strong>Class:</strong> {{ $equipment->RepairClass?->name ?? 'N/A' }}</div>
+         <div class="me-3"><strong>Group:</strong> {{ $equipment->group->name ?? 'N/A' }}</div>
+ 
+         <div class="ms-auto">
+             @if(!$isSubmitted)
+                 @if(!$demands->isEmpty())
Removed / Before Commit
- 					<tbody>
- 						@forelse($menusdata as $key => $menu)
- 						<tr>
- 							<td>{{ $key + 1 }}</td>
- 							<td>{{ $menu->name }}</td>
- 							<td><i class="{{ $menu->icon }}"></i> {{ $menu->icon }}</td>
- 							<td>{{ $menu->route }}</td>
Added / After Commit
+ 					<tbody>
+ 						@forelse($menusdata as $key => $menu)
+ 						<tr>
+ 							<td>{{ $menusdata->firstItem() + $key }}</td>
+ 							<td>{{ $menu->name }}</td>
+ 							<td><i class="{{ $menu->icon }}"></i> {{ $menu->icon }}</td>
+ 							<td>{{ $menu->route }}</td>
Removed / Before Commit
- data-mr-id="{{ $repair->mr_id }}">
- <i class="fas fa-balance-scale"></i>
- </a>
- </td>
- </tr>
- @empty
- </div>
- </div>
- 
- 
- 
- 
- $('#qa_mr_id').val($(this).data('mr-id'));
- });
- });
- </script>
- @endsection
- \ No newline at end of file
Added / After Commit
+ data-mr-id="{{ $repair->mr_id }}">
+ <i class="fas fa-balance-scale"></i>
+ </a>
+                                  <!-- ❌ REJECT -->
+     <a href="javascript:void(0)"
+        class="qa-reject-btn text-danger"
+        data-bs-toggle="modal"
+        data-bs-target="#qaRejectModal"
+        data-workorder-id="{{ $equipment->work_order_id }}"
+        data-workequipment-id="{{ $equipment->id }}"
+        data-vir-id="{{ $repair->vir_id }}"
+        data-mr-id="{{ $repair->mr_id }}">
+         <i class="fas fa-times-circle"></i>
+     </a>
+ </td>
+ </tr>
+ @empty
+ </div>
Removed / Before Commit
- data-mandr-id="{{ $qa->mandr_id }}">
- <i class="fas fa-balance-scale"></i>
- </a>
- </td>
- </tr>
- @empty
- </div>
- </div>
- 
- 
- 
- <!-- QC Modal -->
- $('#qc_vir_id').val($(this).data('vir-id'));
- $('#qc_mandr_id').val($(this).data('mandr-id'));
- });
- });
- </script>
- @endsection
Added / After Commit
+ data-mandr-id="{{ $qa->mandr_id }}">
+ <i class="fas fa-balance-scale"></i>
+ </a>
+                                 <a href="javascript:void(0)"
+        class="qc-reject-btn text-danger"
+        data-bs-toggle="modal"
+        data-bs-target="#qcRejectModal"
+        data-workorder-id="{{ $qa->work_order_id }}"
+        data-equipment-id="{{ $qa->work_equipment_id }}"
+        data-vir-id="{{ $qa->vir_id }}"
+        data-mandr-id="{{ $qa->mandr_id }}">
+         <i class="fas fa-times-circle"></i>
+     </a>
+ </td>
+ </tr>
+ @empty
+ </div>
+ </div>
Removed / Before Commit
- </table>
- <div class="mt-3 d-flex justify-content-end">
- <nav>
-                          {{ $equipments->links() }}
- </nav>
- </div>
- </div>
- @endsection
- 
- @section('scripts')
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- <script>
- $(document).ready(function () {
- $('.select2').select2({
Added / After Commit
+ </table>
+ <div class="mt-3 d-flex justify-content-end">
+ <nav>
+                          {{ $workOrderIds->links() }}
+ </nav>
+ </div>
+ </div>
+ @endsection
+ 
+ @section('scripts')
+ <script>
+ $(document).ready(function () {
+ $('.select2').select2({
Removed / Before Commit
- <label for="repair_progress_remark">Repair Progress Remark</label>
- <textarea name="repair_progress_remark" class="form-control" rows="3"></textarea>
- </div>
- </div>
- 
- <div class="modal-footer">
- <div class="d-flex justify-content-between w-100">
-             <div class="form-check align-self-center">
-                 <input class="form-check-input" type="checkbox" name="initiate_to_qa" id="initiate_to_qa">
-                 <label class="form-check-label" for="initiate_to_qa">Initiate to QA</label>
-             </div>
- <div>
- <button type="submit" class="btn btn-success">Save</button>
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
- });
- 
- $('.repair-add-btn').on('click', function () {
-         $('#modal_work_order_id').val($(this).data('workorder-id'));
Added / After Commit
+ <label for="repair_progress_remark">Repair Progress Remark</label>
+ <textarea name="repair_progress_remark" class="form-control" rows="3"></textarea>
+ </div>
+         <div class="col-md-12">
+                 <input class="form-check-input" type="checkbox" name="initiate_to_qa" id="initiate_to_qa">
+                 <label class="form-check-label" for="initiate_to_qa">Initiate to QA</label>
+             </div>
+             <div class="col-md-12" id="qa_section" style="display:none;">
+                 <div class="mb-1">
+                     <label class="form-label">Insepection Type</label>
+                     <select class="form-select" name="inspection_type">
+                         <option value="ser">SER</option>
+                         <option value="ber">BER</option>
+                         <option value="rto">RTU</option>
+                     </select>
+                 </div>
+ 
+                 <div class="mb-1" id="displayremakr" style="display:none">
Removed / Before Commit
- 	<div class="col">
- 		<div class="card">
- 			<div class="card-header py-3">
-     <div class="row align-items-center">
-         <!-- Left Heading -->
-         <div class="col-md-3">
-             <h4><b>List of Created Role</b></h4>
- </div>
- 
-         <!-- Filters + Add button on the right -->
-         <div class="col-md-9 d-flex justify-content-end align-items-end">
- 
-             <!-- Filter Form -->
-             <form id="filterForm" method="GET" action="{{ route('roles.index') }}" class="d-flex align-items-end me-2">
- <div class="row align-items-end">
- <div class="col-md-4">
- <label class="form-label">Role</label>
-                         <input type="text" name="role" class="form-control" placeholder="Search Role"
Added / After Commit
+ 	<div class="col">
+ 		<div class="card">
+ 			<div class="card-header py-3">
+ 
+     <!-- Row 1 : Heading (Left) + Add Button (Right) -->
+     <div class="row align-items-center mb-3">
+         <div class="col-md-6">
+             <h4 class="mb-0"><b>List of Created Role</b></h4>
+ </div>
+ 
+         <div class="col-md-6 text-end">
+             <a href="{{ url('/roles/create') }}">
+                 <button type="button" class="btn btn-primary">
+                     Add Role
+                 </button>
+             </a>
+         </div>
+     </div>
Removed / Before Commit
- <tbody>
- @foreach($subGroups as $index => $subGroup)
- <tr>
-                                 <td>{{ $index + 1 }}</td>
- <td>{{ $subGroup->name }}</td>
- <td>{{ $subGroup->group?->name ?? '-' }}</td>
- <td>
Added / After Commit
+ <tbody>
+ @foreach($subGroups as $index => $subGroup)
+ <tr>
+                                 <td>{{ $subGroups->firstItem() + $index }}</td>
+ <td>{{ $subGroup->name }}</td>
+ <td>{{ $subGroup->group?->name ?? '-' }}</td>
+ <td>
Removed / Before Commit
- font-size: 14px;
- }
- .page {
-       padding: 15mm 15mm;
- /*      width: 210mm;*/
- /*      height: 260mm;*/
- box-sizing: border-box;
- overflow: hidden;
- }
- .page.one{
-       height: 230mm;
- }
- .center-title {
- text-align: center;
- margin-bottom: 10px;
- }
- .full-width {
-       margin-top: 20px;
Added / After Commit
+ font-size: 14px;
+ }
+ .page {
+       padding: 10mm 10mm;
+ /*      width: 210mm;*/
+ /*      height: 260mm;*/
+ box-sizing: border-box;
+ overflow: hidden;
+ }
+ .page.one{
+       height: 190mm;
+ }
+ .center-title {
+ text-align: center;
+ margin-bottom: 10px;
+ }
+ .full-width {
+       margin-top: 12px;
Removed / Before Commit
- 
- @if($items[0]?->gemsMaster?->draft_bid_no && $items[0]?->gemsMaster?->draft_bid_date)
- <div class="card mb-3 p-3">
-             <h3>Gems Details</h3>
- <form action="{{ route('cases.saveGemsDetails', $items[0]?->gemsMaster?->id) }}" method="POST">
- @csrf
- <input type="hidden" name="case" value="{{ $items[0]?->gemsMaster?->id }}">
- <div class="row g-3">
- <div class="col-md-3">
-                                 <label for="aone_no" class="form-label">Aone No</label>
- <input type="date" class="form-control" name="aone_no" id="aone_no" value="{{ $items[0]?->gemsMaster?->aone_no }}" >
- </div>
- <div class="col-md-3">
Added / After Commit
+ 
+ @if($items[0]?->gemsMaster?->draft_bid_no && $items[0]?->gemsMaster?->draft_bid_date)
+ <div class="card mb-3 p-3">
+             <h3>GeM Details</h3>
+ <form action="{{ route('cases.saveGemsDetails', $items[0]?->gemsMaster?->id) }}" method="POST">
+ @csrf
+ <input type="hidden" name="case" value="{{ $items[0]?->gemsMaster?->id }}">
+ <div class="row g-3">
+ <div class="col-md-3">
+                                 <label for="aone_no" class="form-label">AON no</label>
+ <input type="date" class="form-control" name="aone_no" id="aone_no" value="{{ $items[0]?->gemsMaster?->aone_no }}" >
+ </div>
+ <div class="col-md-3">
Removed / Before Commit
- 				<tbody>
- 					@foreach($users as $key => $user)
- 					<tr>
- 						<td>{{ $key + 1 }}</td>
- 						<td>{{ $user->name }}</td>
- 						<td>{{ $user->username }}</td>
- 						<td>{{ $user->tno }}</td>
Added / After Commit
+ 				<tbody>
+ 					@foreach($users as $key => $user)
+ 					<tr>
+ 						<td>{{ $users->firstItem() + $key}}</td>
+ 						<td>{{ $user->name }}</td>
+ 						<td>{{ $user->username }}</td>
+ 						<td>{{ $user->tno }}</td>
Removed / Before Commit
- </a>
- <a href="javascript:void(0);" class="text-danger ms-3 btn-delete" data-id="{{ $vertical->id }}" data-url="{{ url('/verticals/delete/' . $vertical->id) }}">
- <i class="fas fa-trash text-dark"></i>
-                                 </a>
- </td>
- </tr>
- @endforeach
Added / After Commit
+ </a>
+ <a href="javascript:void(0);" class="text-danger ms-3 btn-delete" data-id="{{ $vertical->id }}" data-url="{{ url('/verticals/delete/' . $vertical->id) }}">
+ <i class="fas fa-trash text-dark"></i>
+                                 </a> 
+ </td>
+ </tr>
+ @endforeach
Removed / Before Commit
- </div>
- @endif
- 
- @if(($alreadycreatedjobno == 2))
- <div class="row">
- <div class="col-lg-12 mx-auto">
- <div class="card">
- </div>
- </div>
- </div>
- @endif
- 
- @if(count($workOrders) > 0)
- <div class="card mt-3">
- </div>
- </div>
- </div>
- @endif
Added / After Commit
+ </div>
+ @endif
+ 
+ 
+ <div class="row">
+ <div class="col-lg-12 mx-auto">
+ <div class="card">
+ </div>
+ </div>
+ </div>
+ 
+ @if(count($workOrders) > 0)
+ <div class="card mt-3">
+ </div>
+ </div>
+ </div>
+ {{$workOrders->links()}}
+ @endif
Removed / Before Commit
- <meta charset="UTF-8">
- <title>Work Completion Note Voucher</title>
- <style>
-     @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
- body {
- font-family: Poppins, sans-serif;
- margin: 20px;
- 
- 
- 
-   <p style="text-align: right;">OE/0275/2024-2025/1</p>
- <div class="section-title">WORK COMPLETION NOTE VOUCHER</div>
- 
- 
- <div style="display: flex; gap:50px; margin-bottom: 30px;">
- <table class="table-bordered">
- <tr>
- <th>WCN Voucher No & Dt</th>
Added / After Commit
+ <meta charset="UTF-8">
+ <title>Work Completion Note Voucher</title>
+ <style>
+     /* Poppins – FULL FAMILY */
+ 
+ @font-face {
+   font-family: 'Poppins';
+   src: url('/assets/fonts/poppins/Poppins-Thin.woff2') format('woff2');
+   font-weight: 100;
+   font-style: normal;
+ }
+ 
+ @font-face {
+   font-family: 'Poppins';
+   src: url('/assets/fonts/poppins/Poppins-ThinItalic.woff2') format('woff2');
+   font-weight: 100;
+   font-style: italic;
+ }
Removed / Before Commit
- <div class="card-body">
- {{-- Header Row: Serial No. + Action Icons --}}
- <div class="d-flex justify-content-between align-items-start mb-2">
-                     <h5 class="card-title mb-0">
-                         <span class="badge bg-primary me-2">#{{ $workOrders->firstItem() + $index }}</span>
-                         Work Order
-                     </h5>
- <div class="d-flex gap-2">
- <a href="{{ url('work-orders-unit/' . $order->work_unit_id . '?user_id=' . $order->work_user_id) }}"
- class="text-primary" title="Edit">
Added / After Commit
+ <div class="card-body">
+ {{-- Header Row: Serial No. + Action Icons --}}
+ <div class="d-flex justify-content-between align-items-start mb-2">
+                     <div class="d-flex justify-content-between align-items-start mb-2">
+                         <h5 class="card-title mb-0">
+                             <span class="badge bg-primary me-2">#{{ $workOrders->firstItem() + $index }}</span>
+                             Work Order
+                         </h5>
+ 
+                         <div class="text-end small text-muted" style="margin-left: 10px;">
+                             <div>
+                                 <b>Created:</b>
+                                 {{ \Carbon\Carbon::parse($order->created_at)
+                                     ->timezone('Asia/Kolkata')
+                                     ->format('d-m-Y h:i A') }}
+                             </div>
+                             <div>
+                                 <b>Updated:</b>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+         .select2-container {
+             width: 100% !important;
+         }
+ 
+         .select2-selection {
+             min-height: 32px;
+         }
+ 
+         form {
+             margin-bottom: 40px;
+         }
+ 
+         .select2-results__option {
+             padding-left: 10px;
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ @if ($errors->any())
+     <div class="alert alert-danger">
+         <ul>
+             @foreach ($errors->all() as $error)
+                 <li>{{ $error }}</li>
+             @endforeach
+         </ul>
+     </div>
+ @endif
+ 
+ <div class="row">
+     <div class="col-lg-12">
+         <!-- <h4 class="mb-3"><b>{{ isset($isEdit) ? 'Edit' : 'Create' }} Work Order</b></h4> -->
+         <div class="card">
+             <div class="card-header py-3">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ @if ($errors->any())
+     <div class="alert alert-danger">
+         <ul>
+             @foreach ($errors->all() as $error)
+                 <li>{{ $error }}</li>
+             @endforeach
+         </ul>
+     </div>
+ @endif
+ 
+ <div class="row">
+ 	<div class="col-lg-12">
+ 		<div class="card">
+ 			<div class="card-header py-3">
+                 <div class="row align-items-center">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ @if ($errors->any())
+     <div class="alert alert-danger">
+         <ul>
+             @foreach ($errors->all() as $error)
+                 <li>{{ $error }}</li>
+             @endforeach
+         </ul>
+     </div>
+ @endif
+ <div class="row">
+ 	<div class="col-lg-12">
+ 		<div class="card">
+ 			<div class="card-header py-3">
+                 <div class="row align-items-center">
+                     <div class="col-md-12">
Removed / Before Commit
- use App\Http\Controllers\McoScaleController;
- use App\Http\Controllers\CrcEntryController;
- use App\Http\Controllers\CrcRepairController;
- use App\Http\Controllers\EqptTargetController;
- use App\Http\Controllers\DemandController;
- use App\Http\Controllers\ProductionDemandController;
- use App\Http\Controllers\LpoFundController;
- use App\Http\Controllers\FinancialPowerController;
- use App\Http\Controllers\UrgencyController;
- 
- 
- /*
- return view('welcome');
- });
- 
- Route::get('/dashboard', function () {
- 
-         return view('dashboard-new'); // or your dashboard route name
Added / After Commit
+ use App\Http\Controllers\McoScaleController;
+ use App\Http\Controllers\CrcEntryController;
+ use App\Http\Controllers\CrcRepairController;
+ use App\Http\Controllers\CrcPartMasterController;
+ use App\Http\Controllers\EqptTargetController;
+ use App\Http\Controllers\DemandController;
+ use App\Http\Controllers\ProductionDemandController;
+ use App\Http\Controllers\LpoFundController;
+ use App\Http\Controllers\FinancialPowerController;
+ use App\Http\Controllers\UrgencyController;
+ use App\Http\Controllers\DashboardController;
+ use App\Http\Controllers\OldDataController;
+ use App\Http\Controllers\ComplaintController;
+ 
+ 
+ 
+ /*
+ return view('welcome');