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

Review Result ?

jattin01/army · e1d3c7cb
The commit adds multiple functions related to filtering and displaying urgency data, including applying various filters, pagination, and NAC/LPR related logic. There are improvements in business functionality and data handling. However, lacking detailed comments for complex logic, potential SQL injection risk with raw SQL in whereRaw without explicit validation, commented-out filter conditions, no explicit error handling, and no security measures for mass assignment or input sanitization reduce quality and security confidence.
Quality ?
70%
Security ?
60%
Business Value ?
75%
Maintainability ?
65%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Non Descriptive
Where commit message
Issue / Evidence non-descriptive
Suggested Fix provide a detailed descriptive commit message to improve business value and code review clarity
Usage Of Whereraw Without Input Sanitizati...
Where app/Http/Controllers/UrgencyController.php:72
Issue / Evidence usage of whereRaw without input sanitization
Suggested Fix change to parameterized queries or Eloquent where clauses to improve security and reduce bug risk
Commented Out Lpr Status Filter Code
Where app/Http/Controllers/UrgencyController.php:166-170
Issue / Evidence commented out LPR status filter code
Suggested Fix remove or activate properly to avoid confusion and improve quality
Decryption Without Error Handling
Where app/Http/Controllers/UrgencyController.php:276
Issue / Evidence decryption without error handling
Suggested Fix add try-catch to handle decryption failures and improve robustness
Missing Validation
Where app/Http/Controllers/UrgencyController.php:136
Issue / Evidence explode used for comma-separated IDs without validation
Suggested Fix add input validation to prevent injection or invalid IDs to improve security
Sparse Inline Comments
Where app/Http/Controllers/UrgencyController.php:66-107
Issue / Evidence sparse inline comments
Suggested Fix add detailed comments explaining filters and pagination logic to improve maintainability and quality
Code Change Preview · app/Http/Controllers/Admin/StaffController.php ?
Removed / Before Commit
- 'dob' => 'nullable|date',
- 'personal_email' => 'nullable|email',
- 'personal_phone' => 'nullable|string',
- 'is_married' => 'boolean',
- 'location_name' =>'nullable|string',
Added / After Commit
+ 'dob' => 'nullable|date',
+ 'personal_email' => 'nullable|email',
+ 'personal_phone' => 'nullable|string',
+         'pan_card' => 'nullable|string',
+         'aadhar_card' => 'nullable|string',
+ 'is_married' => 'boolean',
+ 'location_name' =>'nullable|string',
Removed / Before Commit
- 's.id','s.cos_sec', 's.os_ser_no', 's.cat_part_no','s.nomenclature',
- 's.account_unit','s.no_off','s.authorization','s.percentage',
- 'd.ap_demand_no','d.ap_demand_date','d.oss_stock',
-             'd.cod_control_no','d.cod_control_date','d.iil_no','d.cvil_no'
- )
- ->leftJoin('ap_demands as d', function($join) use($master) {
- $join->on('d.item_id', '=', 's.id')
Added / After Commit
+ 's.id','s.cos_sec', 's.os_ser_no', 's.cat_part_no','s.nomenclature',
+ 's.account_unit','s.no_off','s.authorization','s.percentage',
+ 'd.ap_demand_no','d.ap_demand_date','d.oss_stock',
+             'd.cod_control_no','d.cod_control_date','d.iil_no','d.cvil_no','d.iil_date','d.cvil_date'
+ )
+ ->leftJoin('ap_demands as d', function($join) use($master) {
+ $join->on('d.item_id', '=', 's.id')
Removed / Before Commit
- public function update(Request $request, McoScale $scale)
- {
- $request->validate([
-             'group_id'         => 'required|exists:groups,id',
-             'equipment_id'     => 'required|exists:equipments,id',
-             'scale_name'       => 'required|unique:mco_scales,scale_name,' . $scale->id,
-             'repair_class_id'  => 'required|exists:repair_classes,id',
-             'scale_ref_auth'   => 'required|string',
- 'no_of_items'      => 'nullable|integer',
- ]);
- 
- $scale->update($request->only([
-             'group_id',
-             'equipment_id',
-             'scale_name',
-             'repair_class_id',
-             'scale_ref_auth',
- 'no_of_items'
Added / After Commit
+ public function update(Request $request, McoScale $scale)
+ {
+ $request->validate([
+ 'no_of_items'      => 'nullable|integer',
+ ]);
+ 
+ $scale->update($request->only([
+ 'no_of_items'
+ ]));
Removed / Before Commit
- 
- use App\Models\McoDemand;
- use App\Models\UrgencyMaster;
- use App\Models\Urgency;
- use App\Models\FinancialPower;
- 
- class UrgencyController extends Controller
- {
- // Create master record
- $urgencyMaster = UrgencyMaster::create([
- 'req_no' => $request->req_no, // Generate some reg_no logic
-             'status' => 'Pending', // Generate some reg_no logic
- ]);
- 
- $selectedDemands = $request->input('selected_demands', []);
- return redirect()->back()->with('success', 'Urgency created successfully.');
- }
- 
Added / After Commit
+ 
+ use App\Models\McoDemand;
+ use App\Models\UrgencyMaster;
+ use App\Models\NacMaster;
+ use App\Models\Lpr;
+ use App\Models\Urgency;
+ use App\Models\FinancialPower;
+ use Illuminate\Support\Collection;
+ 
+ class UrgencyController extends Controller
+ {
+ // Create master record
+ $urgencyMaster = UrgencyMaster::create([
+ 'req_no' => $request->req_no, // Generate some reg_no logic
+             'status' => 'Group generate urgency', // Generate some reg_no logic
+ ]);
+ 
+ $selectedDemands = $request->input('selected_demands', []);
Removed / Before Commit
- 'cod_control_no',
- 'cod_control_date',
- 'iil_no',
- 'cvil_no',
- ];
- 
- // Relation: ek demand ka master
Added / After Commit
+ 'cod_control_no',
+ 'cod_control_date',
+ 'iil_no',
+         'iil_date',
+ 'cvil_no',
+         'cvil_date',
+ ];
+ 
+ // Relation: ek demand ka master
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ use App\Models\FinancialPower;
+ 
+ class Lpr extends Model
+ {
+     use HasFactory;
+ 
+     protected $table = 'lprs'; // table name, अगर different हो तो change करें
+ 
+     protected $fillable = [
+         'lpr_no',
+         'nac_id',
+         'total_amount',
Removed / Before Commit
- 
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- 
- class Menu extends Model
- {
-     use HasFactory;
- protected $fillable = ['name', 'icon', 'route','parent_id'];
- 
- public function roles()
- {
Added / After Commit
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ use Illuminate\Database\Eloquent\SoftDeletes;
+ 
+ class Menu extends Model
+ {
+     use HasFactory, SoftDeletes;
+ protected $fillable = ['name', 'icon', 'route','parent_id'];
+     protected $dates = ['deleted_at'];
+ 
+ public function roles()
+ {
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class NacMaster extends Model
+ {
+     use HasFactory;
+ 
+     protected $fillable = [
+         'nac_no',
+         'nac_date',
+         'validity_date'
+     ];
+ 
+     public function urgencies()
Removed / Before Commit
- 'gender', 'dob', 'personal_email', 'personal_phone', 'is_married','employee_category_id',
- 
- // Job Details
-         'location_name', 'shift_id', 'department_id', 'designation_id', 'report_to', 'is_manager',
- 'probation_start_date', 'probation_end_date', 'notice_start_date', 'notice_end_date', 'end_date', 'employee_status_id',
- 
- // Salary Group Info
- {
- return $this->belongsTo(Department::class);
- }
- 
- public function designation()
- {
- public function leaves() {
- return $this->hasMany(Leave::class, 'employee_id');
- }
- public function salaryGroup() {
- return $this->belongsTo(SalaryGroup::class);
Added / After Commit
+ 'gender', 'dob', 'personal_email', 'personal_phone', 'is_married','employee_category_id',
+ 
+ // Job Details
+         'location_name', 'shift_id', 'department_id', 'designation_id','pan_card','aadhar_card', 'report_to', 'is_manager',
+ 'probation_start_date', 'probation_end_date', 'notice_start_date', 'notice_end_date', 'end_date', 'employee_status_id',
+ 
+ // Salary Group Info
+ {
+ return $this->belongsTo(Department::class);
+ }
+     public function vertical()
+     {
+         return $this->belongsTo(Vertical::class,'department_id');
+     }
+ 
+ public function designation()
+ {
+ public function leaves() {
Removed / Before Commit
- 'scale_id',
- 'item_id',
- 'qty_urgency',
-         'reason',
- 'req_no',
- ];
- 
- // Custom accessor to get row from the dynamic table
- }
- 
- 
-     public function urgencyMaster()
-     {
-         return $this->belongsTo(UrgencyMaster::class);
-     }
- 
-      public function mco()
-     {
Added / After Commit
+ 'scale_id',
+ 'item_id',
+ 'qty_urgency',
+ 'req_no',
+         'reason',
+         'estimate_amount',
+         'nac_id',
+         // new fields
+         'rate_negotiation',
+         'bid_rate',
+         'final_rate',
+         'vendor_details',
+         'supplier_order_date',
+         'supplier_delivery_date',
+         'delivery_extend',
+         'delivery_extend_date',
+         'final_delivery_date',
+         'inspection_note',
Removed / Before Commit
- {
- return (float) $this->urgencies()->sum('estimate_amount');
- }
- public function requiredPower(): ?string
- {
- $total = $this->totalEstimateAmount();
- 
- return $selected ? $selected->cfa : null;
- }
- }
Added / After Commit
+ {
+ return (float) $this->urgencies()->sum('estimate_amount');
+ }
+     public function mcodemand()
+     {
+          return $this->belongsTo(McoDemand::class,'req_no','req_no');
+     }
+      public function demand()
+     {
+          return $this->belongsTo(Demand::class,'req_no','req_no');
+     }
+ public function requiredPower(): ?string
+ {
+ $total = $this->totalEstimateAmount();
+ 
+ return $selected ? $selected->cfa : null;
+ }
+ 
Removed / Before Commit
- value="{{ old('personal_phone', $staff->personal_phone ?? '') }}" required>
- @error('personal_phone') <div class="text-danger">{{ $message }}</div> @enderror
- </div>
- 
- {{-- Is Married --}}
- <div class="col-md-6 d-flex align-items-center">
- </div>
- 
- {{-- Department --}}
-                             <div class="col-md-6">
- <label for="department_id" class="form-label">Department</label>
- <select class="form-select" name="department_id" id="department_id">
- <option value="">Select Department...</option>
- @endforeach
- </select>
- @error('department_id') <div class="text-danger">{{ $message }}</div> @enderror
-                             </div>
- 
Added / After Commit
+ value="{{ old('personal_phone', $staff->personal_phone ?? '') }}" required>
+ @error('personal_phone') <div class="text-danger">{{ $message }}</div> @enderror
+ </div>
+                             <div class="col-md-6">
+                                 <label for="pan_card" class="form-label">Pan Card</label>
+                                 <input type="text" name="pan_card" id="pan_card" class="form-control"
+                                     placeholder="Enter Pan Card"
+                                     value="{{ old('pan_card', $staff->pan_card ?? '') }}" required>
+                                 @error('pan_card') <div class="text-danger">{{ $message }}</div> @enderror
+                             </div>
+                             <div class="col-md-6">
+                                 <label for="aadhar_card" class="form-label">Aadhar Card</label>
+                                 <input type="text" name="aadhar_card" id="aadhar_card" class="form-control"
+                                     placeholder="Enter Aadhar Card"
+                                     value="{{ old('aadhar_card', $staff->aadhar_card ?? '') }}" required>
+                                 @error('aadhar_card') <div class="text-danger">{{ $message }}</div> @enderror
+                             </div>
+ 
Removed / Before Commit
- <th>Email</th>
- <th>Phone</th>
- <th>Designation</th>
-                             <th>Department</th>
- 
- <th>Employee Category</th>
- <th>Status</th>
- <th>Action</th>
- <td>{{ $member->email }}</td>
- <td>{{ $member->phone }}</td>
- <td>{{ $member->designation?->name ?? '-' }}</td>
-                             <td>{{ $member->department?->name ?? '-' }}</td>
- <td>{{ $member->EmployeeCategory?->name ?? '-' }}</td>
- <td>
- <div class="form-check form-switch">
Added / After Commit
+ <th>Email</th>
+ <th>Phone</th>
+ <th>Designation</th>
+                             <th>Vertical</th>
+                             <th>Group</th>
+ <th>Employee Category</th>
+ <th>Status</th>
+ <th>Action</th>
+ <td>{{ $member->email }}</td>
+ <td>{{ $member->phone }}</td>
+ <td>{{ $member->designation?->name ?? '-' }}</td>
+                             <td>{{ $member->vertical?->name ?? '-' }}</td>
+                             <td>{{ $member?->user?->group?->name ?? '-' }}</td>
+ <td>{{ $member->EmployeeCategory?->name ?? '-' }}</td>
+ <td>
+ <div class="form-check form-switch">
Removed / Before Commit
- 								</div>
- 							</div>
- <div class="row mb-3">
- 								<label class="col-sm-4 col-form-label">Equipment</label>
- 								<div class="col-sm-8">
- 									<select name="equipment_id" class="form-select" required>
- 										<option value="">-- Select Equipment --</option>
- 										@foreach ($equipments as $eqpt)
- 											<option value="{{ $eqpt->id }}" {{ old('equipment_id') == $eqpt->id ? 'selected' : '' }}>
- 												{{ $eqpt->name }}
Added / After Commit
+ 								</div>
+ 							</div>
+ <div class="row mb-3">
+ 								<label class="col-sm-4 col-form-label">Eqpt</label>
+ 								<div class="col-sm-8">
+ 									<select name="equipment_id" class="form-select" required>
+ 										<option value="">-- Select Eqpt --</option>
+ 										@foreach ($equipments as $eqpt)
+ 											<option value="{{ $eqpt->id }}" {{ old('equipment_id') == $eqpt->id ? 'selected' : '' }}>
+ 												{{ $eqpt->name }}
Removed / Before Commit
- <th>ID</th>
- <th>Production Year</th>
- <th>Target</th>
-                         <th>Equipment</th>
- <th>Created At</th>
- <th>Preview</th>
- </tr>
Added / After Commit
+ <th>ID</th>
+ <th>Production Year</th>
+ <th>Target</th>
+                         <th>Eqpt</th>
+ <th>Created At</th>
+ <th>Preview</th>
+ </tr>
Removed / Before Commit
- 
- .table-fixed th,
- .table-fixed td {
-     width: 50px;          /* 👈 आप यहाँ px बदल सकते हो अपनी ज़रूरत के हिसाब से */
-     word-wrap: break-word; /* text overflow होने पर wrap हो जाएगा */
-     text-align: center;    /* values center aligned रहेंगी */
- vertical-align: middle;
- }
- </style>
- <hr>
- 
- <div class="card-body">
-         <div class="table-responsive">
-             <table class="table table-bordered table-striped table-fixed">
- <thead>
- <tr>
- @php
- @if(in_array($col, [
Added / After Commit
+ 
+ .table-fixed th,
+ .table-fixed td {
+     width: 50px;          
+     word-wrap: break-word; 
+     text-align: center;    
+ vertical-align: middle;
+ }
+ </style>
+ <hr>
+ 
+ <div class="card-body">
+         <div class="table-responsive" style="overflow-x:auto;">
+             <table id="example24" class="table table-bordered table-striped" style="width: max-content;">
+ <thead>
+ <tr>
+ @php
+ @if(in_array($col, [
Removed / Before Commit
- </select>
- </div>
- <div class="col-md-4">
-                             <label for="equips" class="form-label">Equipment</label>
- <select name="equipment_id" class="form-select select2 auto-submit">
- <option value="">-- Select Equipment --</option>
- @foreach($allEquipments as $id => $name)
- <table class="table table-bordered table-striped" id="example">
- <thead>
- <tr>
-                             <th>Equipment Name</th>
- <th>Job No</th>
- <th>Req No</th>
- <th>Action</th>
Added / After Commit
+ </select>
+ </div>
+ <div class="col-md-4">
+                             <label for="equips" class="form-label">Eqpt</label>
+ <select name="equipment_id" class="form-select select2 auto-submit">
+ <option value="">-- Select Equipment --</option>
+ @foreach($allEquipments as $id => $name)
+ <table class="table table-bordered table-striped" id="example">
+ <thead>
+ <tr>
+                             <th>Eqpt</th>
+ <th>Job No</th>
+ <th>Req No</th>
+ <th>Action</th>
Removed / Before Commit
- </select>
- </div>
- <div class="col-md-4">
-                             <label for="equips" class="form-label">Equipment</label>
- <select name="equipment" class="form-select select2" onchange="this.form.submit()">
- <option value="">-- Show All --</option>
- @foreach($allEquipments as $id => $equip)
- <thead class="table-primary">
- <tr>
- <th>#</th>
-                             <th>Equipment Name</th>
- <th>Job No</th>
- <!--<th>Control No</th> -->
- <th>Action</th>
Added / After Commit
+ </select>
+ </div>
+ <div class="col-md-4">
+                             <label for="equips" class="form-label">Eqpt</label>
+ <select name="equipment" class="form-select select2" onchange="this.form.submit()">
+ <option value="">-- Show All --</option>
+ @foreach($allEquipments as $id => $equip)
+ <thead class="table-primary">
+ <tr>
+ <th>#</th>
+                             <th>Eqpt</th>
+ <th>Job No</th>
+ <!--<th>Control No</th> -->
+ <th>Action</th>
Removed / Before Commit
- <div class="row align-items-end">
- <div class="col-md-4"></div>
- <div class="col-md-4">
-                             <label for="control_number" class="form-label">Equipment Name</label>
- 
- <select name="equipment_id" class="form-select select2" onchange="this.form.job_id.value=''; this.form.submit()">
- @foreach($allEquipments as $id => $equip)
- <form method="GET" action="{{ route('demand.otherindex') }}">
- <div class="row mb-3">
- <div class="col-md-4">
-                     <label class="form-label" class="form-label">Select Equipment</label>
- <select name="equipment_id" class="form-select select2" onchange="this.form.submit()">
-                         <option value="">-- Select Equipment --</option>
- @foreach($allEquipments as $id => $equip)
- <option value="{{ $id }}">{{ $equip }}</option>
- @endforeach
Added / After Commit
+ <div class="row align-items-end">
+ <div class="col-md-4"></div>
+ <div class="col-md-4">
+                             <label for="control_number" class="form-label">Eqpt</label>
+ 
+ <select name="equipment_id" class="form-select select2" onchange="this.form.job_id.value=''; this.form.submit()">
+ @foreach($allEquipments as $id => $equip)
+ <form method="GET" action="{{ route('demand.otherindex') }}">
+ <div class="row mb-3">
+ <div class="col-md-4">
+                     <label class="form-label" class="form-label">Select Eqpt</label>
+ <select name="equipment_id" class="form-select select2" onchange="this.form.submit()">
+                         <option value="">-- Select Eqpt --</option>
+ @foreach($allEquipments as $id => $equip)
+ <option value="{{ $id }}">{{ $equip }}</option>
+ @endforeach
Removed / Before Commit
- @endphp
- 
- <div class="mb-2">
-                     <strong>Equipment:</strong> {{ $equipment->Equipments->name ?? '-' }} |
- <strong>Repair Class:</strong> {{ $equipment->RepairClass->name ?? '-' }} |
-                     <strong>Group Name:</strong> {{ $equipment->group->name ?? '-' }} |
- <strong>Job No:</strong> {{ $equipment->workorder->job_no ?? '-' }} |
- <strong>Registation No:</strong> {{ $equipment->regd_no ?? '-' }}
- </div>
Added / After Commit
+ @endphp
+ 
+ <div class="mb-2">
+                     <strong>Eqpt:</strong> {{ $equipment->Equipments->name ?? '-' }} |
+ <strong>Repair Class:</strong> {{ $equipment->RepairClass->name ?? '-' }} |
+                     <strong>Group:</strong> {{ $equipment->group->name ?? '-' }} |
+ <strong>Job No:</strong> {{ $equipment->workorder->job_no ?? '-' }} |
+ <strong>Registation No:</strong> {{ $equipment->regd_no ?? '-' }}
+ </div>
Removed / Before Commit
- display: flex;
- align-items: center;
- }
- </style>
- @if ($errors->any())
- <div class="alert alert-danger">
- <div class="">
- <!-- 📊 Table -->
- <div class="table-responsive">
-                     <table class="table table-bordered table-striped" id="example">
- <thead>
- <tr>
- <th style="display:none"></th>
- 
- <td>
- <select name="regno[]" class="form-select select2 regno-select" multiple="multiple" data-item-id="{{ $itemid }}">
-                                         <option value="">-- Select Reg no --</option>
- @php
Added / After Commit
+ display: flex;
+ align-items: center;
+ }
+ #example23 {
+     table-layout: fixed; /* enforce fixed column widths */
+     width: 100%;
+ }
+ #example23 th,
+ #example23 td {
+     width: 60px !important;  /* sets width for all headers and cells */
+     max-width: 60px !important;
+     min-width: 60px !important;
+     white-space: normal !important;  /* allow wrapping */
+     word-break: break-word;    /* prevents text wrapping */
+ }
+ </style>
+ @if ($errors->any())
+ <div class="alert alert-danger">
Removed / Before Commit
- 
- <td>
- @foreach($des->leaveTypes as $lt)
-                                 <span class="badge bg-info">{{ $lt->name }}</span>
- @endforeach
- </td>
- <td>
Added / After Commit
+ 
+ <td>
+ @foreach($des->leaveTypes as $lt)
+                                 <span class="badge bg-info">{{ $lt->leave_name }}</span>
+ @endforeach
+ </td>
+ <td>
Removed / Before Commit
- </div>
- 
- <div class="col-12">
-                                         <label class="form-label">Power in consultation with ISA</label>
- <textarea id="power_in_consultation_with_isa" class="form-control" rows="3"></textarea>
- </div>
- </div>
- <th>CFA</th>
- <th>Next higher CFA</th>
- <th>Inherit power</th>
-                             <th>Power (Consultation with ISA)</th>
- <th>Actions</th>
- </tr>
- </thead>
Added / After Commit
+ </div>
+ 
+ <div class="col-12">
+                                         <label class="form-label">Power in consultation with IFA</label>
+ <textarea id="power_in_consultation_with_isa" class="form-control" rows="3"></textarea>
+ </div>
+ </div>
+ <th>CFA</th>
+ <th>Next higher CFA</th>
+ <th>Inherit power</th>
+                             <th>Power In Consultation with IFA</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
Removed / Before Commit
- <tr>
- <th>COS SEC</th>
- <th>Part No / Nomenclature</th>
-                         <th>Account Unit</th>
- <th>Qty Demanded</th>
- <th>Already Qty Received</th>
- <th>Qty Received</th>
Added / After Commit
+ <tr>
+ <th>COS SEC</th>
+ <th>Part No / Nomenclature</th>
+                         <th>A/U</th>
+ <th>Qty Demanded</th>
+ <th>Already Qty Received</th>
+ <th>Qty Received</th>
Removed / Before Commit
- <div class="card-header py-3">
- <div class="row align-items-center">
- <div class="col-md-5">
-                 <h4><b>Receving By Mco</b></h4>
- 
- </div>
- <div class="col-md-7">
Added / After Commit
+ <div class="card-header py-3">
+ <div class="row align-items-center">
+ <div class="col-md-5">
+                 <h4><b>Receipt of Spare (MCO)</b></h4>
+ 
+ </div>
+ <div class="col-md-7">
Removed / Before Commit
- <div class="card-header py-3">
- <div class="row align-items-center">
- <div class="col-md-5">
-                 <h4><b>Issue by MCO</b></h3>
- </div>
- <div class="col-md-7">
- <form method="GET" class="mb-1" id="filterForm">
- <div class="row align-items-end">
- {{-- Control Number --}}
- <div class="col-md-4">
-                              <label for="control_number" class="form-label">Job Number</label>
- <select name="job_no" class="form-select select2" onchange="$('#filterForm').submit()">
- <option value="">All Job Nos</option>
- @foreach($jobNos as $jobNo)
- </select>
- </div>
- <div class="col-md-4">
-                              <label for="equips" class="form-label">Equipment</label>
Added / After Commit
+ <div class="card-header py-3">
+ <div class="row align-items-center">
+ <div class="col-md-5">
+                 <h4><b>Issue to Group (MCO)</b></h3>
+ </div>
+ <div class="col-md-7">
+ <form method="GET" class="mb-1" id="filterForm">
+ <div class="row align-items-end">
+ {{-- Control Number --}}
+ <div class="col-md-4">
+                              <label for="control_number" class="form-label">Job No.</label>
+ <select name="job_no" class="form-select select2" onchange="$('#filterForm').submit()">
+ <option value="">All Job Nos</option>
+ @foreach($jobNos as $jobNo)
+ </select>
+ </div>
+ <div class="col-md-4">
+                              <label for="equips" class="form-label">Eqpt</label>
Removed / Before Commit
- @endphp
- 
- <div class="d-flex flex-wrap align-items-center">
-         <div class="me-3"><strong>Equipment Name:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
- <div class="me-3"><strong>Job No:</strong> {{ $spares[0]->job_no }}</div>
-         <div class="me-3"><strong>Class Name:</strong> {{ $equipment->RepairClass?->name ?? 'N/A' }}</div>
-         <div class="me-3"><strong>Group Name:</strong> {{ $equipment->group->name ?? 'N/A' }}</div>
- <div class="me-3"><strong>Voucher No:</strong> {{ $spares[0]->voucher_no ?? 'N/A' }}</div>
- </div>
- </div>
Added / After Commit
+ @endphp
+ 
+ <div class="d-flex flex-wrap align-items-center">
+         <div class="me-3"><strong>Eqpt:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
+ <div class="me-3"><strong>Job No:</strong> {{ $spares[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="me-3"><strong>Voucher No:</strong> {{ $spares[0]->voucher_no ?? 'N/A' }}</div>
+ </div>
+ </div>
Removed / Before Commit
- <script>
- 		$(document).ready(function() {
- 			 $('#example').DataTable({
-     scrollX: false,
-     scrollCollapse: true,
-     autoWidth: true,
-     responsive: false, // set false if you're using scrollX
-     dom: 'rt'
- });
- 
- 		  } );
- 	</script>
- 	<script>
- 		$(document).ready(function() {
Added / After Commit
+ <script>
+ 		$(document).ready(function() {
+ 			 $('#example').DataTable({
+ 				scrollX: false,
+ 				scrollCollapse: true,
+ 				autoWidth: true,
+ 				responsive: false, // set false if you're using scrollX
+ 				dom: 'rt'
+ 			});
+ 		});
+ 	$(document).ready(function() {
+ 		$('#example24').DataTable({
+         scrollX: true,
+ 		scrollCollapse: true,
+ 		responsive: false,
+ 		autoWidth: false,
+ 		dom: 'rt',
+         columnDefs: [
Removed / Before Commit
- <td>{{ $leave->employee->name ?? '-' }}</td>
- <td>{{ $leave->employee->department->name ?? '-' }}</td>
- <td>{{ $leave->employee->designation->name ?? '-' }}</td>
-                             <td>{{ $leave->leaveType->name ?? '-' }}</td>
- <td>{{ \Carbon\Carbon::parse($leave->from_date)->format('d-m-Y') }}</td>
- <td>{{ \Carbon\Carbon::parse($leave->to_date)->format('d-m-Y') }}</td>
- <td>{{ $leave->total_days }}</td>
Added / After Commit
+ <td>{{ $leave->employee->name ?? '-' }}</td>
+ <td>{{ $leave->employee->department->name ?? '-' }}</td>
+ <td>{{ $leave->employee->designation->name ?? '-' }}</td>
+                             <td>{{ $leave->leaveType->leave_name ?? '-' }}</td>
+ <td>{{ \Carbon\Carbon::parse($leave->from_date)->format('d-m-Y') }}</td>
+ <td>{{ \Carbon\Carbon::parse($leave->to_date)->format('d-m-Y') }}</td>
+ <td>{{ $leave->total_days }}</td>
Removed / Before Commit
- @endphp
- 
- <div class="d-flex flex-wrap align-items-center mb-3">
-         <div class="me-3"><strong>Equipment Name:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
- <div class="me-3"><strong>Job No:</strong> {{ $demands[0]->job_no }}</div>
-         <div class="me-3"><strong>Class Name:</strong> {{ $equipment->RepairClass?->name ?? 'N/A' }}</div>
-         <div class="me-3"><strong>Group Name:</strong> {{ $equipment->group->name ?? 'N/A' }}</div>
- 
- <div class="ms-auto">
- @if($alreadySubmitted)
Added / After Commit
+ @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>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($alreadySubmitted)
Removed / Before Commit
- </select>
- </div>
- <div class="col-md-4">
-                             <label for="equips" class="form-label">Equipment</label>
- <select name="equipment_id" class="form-select select2" onchange="this.form.submit()">
- <option value="">-- Show All --</option>
- @foreach($equipments as $equip)
- <table class="table table-bordered table-striped" id="example">
- <thead>
- <tr>
-                             <th>Equipment</th>
- <th>Job No</th>
-                             <th>Group Name</th>
- <th>Req No</th>
- <th>Action</th>
- </tr>
Added / After Commit
+ </select>
+ </div>
+ <div class="col-md-4">
+                             <label for="equips" class="form-label">Eqpt</label>
+ <select name="equipment_id" class="form-select select2" onchange="this.form.submit()">
+ <option value="">-- Show All --</option>
+ @foreach($equipments as $equip)
+ <table class="table table-bordered table-striped" id="example">
+ <thead>
+ <tr>
+                             <th>Eqpt</th>
+ <th>Job No</th>
+                             <th>Group</th>
+ <th>Req No</th>
+ <th>Action</th>
+ </tr>
Removed / Before Commit
- @endphp
- 
- <div class="d-flex flex-wrap align-items-center mb-3">
-     <div class="me-3"><strong>Equipment Name:</strong> {{ $equipment->Equipments?->name ?? 'N/A' }}</div>
- <div class="me-3"><strong>Job No:</strong> {{ $demands[0]->job_no }}</div>
-     <div class="me-3"><strong>Class Name:</strong> {{ $equipment->RepairClass?->name ?? 'N/A' }}</div>
-     <div class="me-3"><strong>Group Name:</strong> {{ $equipment->group->name ?? 'N/A' }}</div>
- 
- <div class="ms-auto">
- @if(!$isSubmitted)
Added / After Commit
+ @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>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)
Removed / Before Commit
- </select>
- </div>
- <div class="col-md-4">
-                              <label for="equips" class="form-label">Equipment</label>
- <select name="equipment_id" class="form-select select2 auto-submit">
-                                 <option value="">-- Select Equipment --</option>
- @foreach($allEquipments as $id => $name)
- <option value="{{ $id }}" {{ request('equipment_id') == $id ? 'selected' : '' }}>
- {{ $name }}
- <table class="table table-bordered table-striped" id="example">
- <thead>
- <tr>
-                             <th>Equipment Name</th>
- <th>Job No</th>
- <th>Group Name</th>
- <th>Req No</th>
Added / After Commit
+ </select>
+ </div>
+ <div class="col-md-4">
+                              <label for="equips" class="form-label">Eqpt</label>
+ <select name="equipment_id" class="form-select select2 auto-submit">
+                                 <option value="">-- Select Eqpt --</option>
+ @foreach($allEquipments as $id => $name)
+ <option value="{{ $id }}" {{ request('equipment_id') == $id ? 'selected' : '' }}>
+ {{ $name }}
+ <table class="table table-bordered table-striped" id="example">
+ <thead>
+ <tr>
+                             <th>Eqpt</th>
+ <th>Job No</th>
+ <th>Group Name</th>
+ <th>Req No</th>
Removed / Before Commit
- 
- <div class="row">
- <div class="col-md-6 mb-3">
-                             <label class="form-label">Group Name</label>
- <select name="group_id" class="form-control" required>
- <option value="">-- Select Group --</option>
- @foreach($groups as $group)
- </div>
- 
- <div class="col-md-6 mb-3">
-                             <label class="form-label">Equipment Name</label>
- <select name="equipment_id" class="form-control" required>
-                                 <option value="">-- Select Equipment Name --</option>
- @foreach($equipments as $equip)
- <option value="{{ $equip->id }}">{{ $equip->name }}</option>
- @endforeach
- 
- <div class="col-md-6 mb-3">
Added / After Commit
+ 
+ <div class="row">
+ <div class="col-md-6 mb-3">
+                             <label class="form-label">Group</label>
+ <select name="group_id" class="form-control" required>
+ <option value="">-- Select Group --</option>
+ @foreach($groups as $group)
+ </div>
+ 
+ <div class="col-md-6 mb-3">
+                             <label class="form-label">Eqpt</label>
+ <select name="equipment_id" class="form-control" required>
+                                 <option value="">-- Select Eqpt --</option>
+ @foreach($equipments as $equip)
+ <option value="{{ $equip->id }}">{{ $equip->name }}</option>
+ @endforeach
+ 
+ <div class="col-md-6 mb-3">
Removed / Before Commit
- @extends('layouts.app')
- 
- @section('content')
- <div class="container">
-     <h4><b>Edit Data: {{ $scale->equipment->name }}</b></h4>
- 
-     @if($errors->any())
- <div class="alert alert-danger">
- <ul class="mb-0">
- @foreach($errors->all() as $error)
- </ul>
- </div>
- @endif
- 
-     <div class="table-responsive">
-         <table class="table table-bordered table-striped">
-             <thead class="table-secondary">
-                 <tr>
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+  @if($errors->any())
+ <div class="alert alert-danger">
+ <ul class="mb-0">
+ @foreach($errors->all() as $error)
+ </ul>
+ </div>
+ @endif
+ <div class="row">
+     <div class="col">
+         <div class="card">
+             <div class="card-header py-3">
+                 <div class="row align-items-center">
+                    <div class="card-header py-3 d-flex justify-content-between align-items-center">
+                         <!-- Left side: Heading -->
+                         <h4 class="mb-0"><b>Edit Data: {{ $scale->equipment->name }}</b></h4>
Removed / Before Commit
- @foreach($defaultColumns as $i => $col)
- <div class="row mb-2 column-row" @if($col['name'] == 'percentage' || $col['name'] == 'target') style="display:none" @endif>
- <div class="col-md-4">
-                                 <input type="text" name="columns[{{ $i }}][name]" class="form-control" value="{{ $col['name'] }}" readonly>
- </div>
- <div class="col-md-4">
- <select name="columns[{{ $i }}][type]" class="form-control column-type" required readonly>
Added / After Commit
+ @foreach($defaultColumns as $i => $col)
+ <div class="row mb-2 column-row" @if($col['name'] == 'percentage' || $col['name'] == 'target') style="display:none" @endif>
+ <div class="col-md-4">
+                                 @if($col['name'] == 'account_unit')
+                                     <!-- Display only -->
+                                     <input type="text" class="form-control" value="a/u" readonly>
+                                     <!-- Hidden field for DB -->
+                                     <input type="hidden" name="columns[{{ $i }}][name]" value="account_unit">
+                                 @else
+                                     <input type="text" name="columns[{{ $i }}][name]" class="form-control" value="{{ $col['name'] }}" readonly>
+                                 @endif
+ 
+ </div>
+ <div class="col-md-4">
+ <select name="columns[{{ $i }}][type]" class="form-control column-type" required readonly>
Removed / Before Commit
- <div class="row">
- <div class="col-md-6 mb-3">
- <label><b>Group</b></label>
-                             <select name="group_id" class="form-control" required>
- <option value="">-- Select Group --</option>
- @foreach($groups as $group)
- <option value="{{ $group->id }}" {{ $scale->group_id == $group->id ? 'selected' : '' }}>
- </select>
- </div>
- <div class="col-md-6 mb-3">
-                             <label><b>Equipment</b></label>
-                             <select name="equipment_id" class="form-control" required>
-                                 <option value="">-- Select Equipment --</option>
- @foreach($equipments as $equip)
- <option value="{{ $equip->id }}" {{ $scale->equipment_id == $equip->id ? 'selected' : '' }}>
- {{ $equip->name }}
- 
- <div class="col-md-6 mb-3">
Added / After Commit
+ <div class="row">
+ <div class="col-md-6 mb-3">
+ <label><b>Group</b></label>
+                             <select name="group_id" class="form-control" disabled>
+ <option value="">-- Select Group --</option>
+ @foreach($groups as $group)
+ <option value="{{ $group->id }}" {{ $scale->group_id == $group->id ? 'selected' : '' }}>
+ </select>
+ </div>
+ <div class="col-md-6 mb-3">
+                             <label><b>Eqpt</b></label>
+                             <select name="equipment_id" class="form-control" disabled>
+                                 <option value="">-- Select Eqpt --</option>
+ @foreach($equipments as $equip)
+ <option value="{{ $equip->id }}" {{ $scale->equipment_id == $equip->id ? 'selected' : '' }}>
+ {{ $equip->name }}
+ 
+ <div class="col-md-6 mb-3">
Removed / Before Commit
- @endphp
- <div class="row mb-2 column-row" @if($name  == 'percentage' || $name  == 'target') style="display:none" @endif>
- <div class="col-md-4">
-                                 <input type="text" name="columns[{{ $i }}][name]" class="form-control column-name @error("columns.$i.name") is-invalid @enderror"
-                                     value="{{ $col['column_name'] ?? $col['name'] }}" placeholder="Column Name" required  @if($isFixed) readonly @endif>
- @error("columns.$i.name")
- <div class="invalid-feedback">{{ $message }}</div>
- @enderror
- 
- nameInputs.forEach(input => {
- input.classList.remove('is-invalid');
-                 const name = input.value.trim();
- 
- if (!name.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) {
- input.classList.add('is-invalid');
Added / After Commit
+ @endphp
+ <div class="row mb-2 column-row" @if($name  == 'percentage' || $name  == 'target') style="display:none" @endif>
+ <div class="col-md-4">
+                                 @if(($col['column_name'] ?? $col['name']) === 'account_unit')
+                                     <!-- Display only -->
+                                     <input type="text" class="form-control column-name @error("columns.$i.name") is-invalid @enderror"
+                                         value="a/u" placeholder="Column Name" readonly>
+                                     <!-- Hidden input for actual DB value -->
+                                     <input type="hidden" name="columns[{{ $i }}][name]" value="account_unit">
+                                 @else
+                                     <input type="text" name="columns[{{ $i }}][name]" 
+                                         class="form-control column-name @error("columns.$i.name") is-invalid @enderror"
+                                         value="{{ $col['column_name'] ?? $col['name'] }}" placeholder="Column Name" 
+                                         required @if($isFixed) readonly @endif>
+                                 @endif
+                                 <!-- <input type="text" name="columns[{{ $i }}][name]" class="form-control column-name @error("columns.$i.name") is-invalid @enderror"
+                                     value="{{ $col['column_name'] ?? $col['name'] }}" placeholder="Column Name" required  @if($isFixed) readonly @endif> -->
+ @error("columns.$i.name")
Removed / Before Commit
- 
- <div class="row mb-3">
- <div class="col-md-4">
-                                 <label class="form-label">Groups</label>
- <select class="form-control select2" onchange="applyFilter('group_id', this.value)">
- <option value="">All Groups</option>
- @foreach($groups as $group)
- </div>
- 
- <div class="col-md-4">
-                                 <label class="form-label">Repair Classes</label>
- <select class="form-control select2" onchange="applyFilter('repair_class_id', this.value)">
-                                     <option value="">All Repair Classes</option>
- @foreach($repairClasses as $repairClass)
- <option value="{{ $repairClass->id }}" {{ request('repair_class_id') == $repairClass->id ? 'selected' : '' }}>
- {{ $repairClass->name }}
- </div>
- 
Added / After Commit
+ 
+ <div class="row mb-3">
+ <div class="col-md-4">
+                                 <label class="form-label">Group</label>
+ <select class="form-control select2" onchange="applyFilter('group_id', this.value)">
+ <option value="">All Groups</option>
+ @foreach($groups as $group)
+ </div>
+ 
+ <div class="col-md-4">
+                                 <label class="form-label">Repair Class</label>
+ <select class="form-control select2" onchange="applyFilter('repair_class_id', this.value)">
+                                     <option value="">All Repair Class</option>
+ @foreach($repairClasses as $repairClass)
+ <option value="{{ $repairClass->id }}" {{ request('repair_class_id') == $repairClass->id ? 'selected' : '' }}>
+ {{ $repairClass->name }}
+ </div>
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+ .select2-container { width: 200px !important; }
+ .table-fixed { table-layout: fixed; width: 100%; }
+ .table-fixed th, .table-fixed td { word-wrap: break-word; text-align: center; vertical-align: middle; }
+ </style>
+ 
+ <div class="card">
+     <div class="card-header d-flex justify-content-between align-items-center">
+         <h4 class="mb-0">LPR</h4>
+         <form method="GET" action="{{ route('urgency.lpowithlpr') }}" id="filterForm" class="d-flex gap-2 mb-3">
+         <select name="job_no" class="form-control select2" style="width:200px">
+             <option value="">All Job No</option>
+             @foreach($jobNos as $jobNo)
+                 <option value="{{ $jobNo }}" {{ request('job_no') == $jobNo ? 'selected' : '' }}>
+                     {{ $jobNo }}
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+ .select2-container { width: 200px !important; }
+ .table-fixed { table-layout: fixed; width: 100%; }
+ .table-fixed th, .table-fixed td { word-wrap: break-word; text-align: center; vertical-align: middle; }
+ </style>
+ 
+ <div class="card">
+     <div class="card-header d-flex justify-content-between align-items-center">
+         <h4 class="mb-0">LPR Pending</h4>
+         <form method="GET" action="{{ route('urgency.lpowithoutlpr') }}" id="filterForm" class="d-flex gap-2 mb-3">
+         <select name="job_no" class="form-control select2" style="width:200px">
+             <option value="">All Job No</option>
+             @foreach($jobNos as $jobNo)
+                 <option value="{{ $jobNo }}" {{ request('job_no') == $jobNo ? 'selected' : '' }}>
+                     {{ $jobNo }}
Removed / Before Commit
- </style>
- 
- <div class="card">
-     <div class="card-header d-flex justify-content-between align-items-center">
-     <h4 class="mb-0">
-         Urgency Preview (No: {{ $decryptedid }})
-         <span id="lpr-no-display" class="ms-2 fw-bold">
-             {{ $urgency->lpr_no ? '|| LPR NO : ' . $urgency->lpr_no : '' }}
-         </span>
-     </h4>
- 
-     <div class="d-flex align-items-center">
-         <a href="{{ url()->previous() }}" class="btn btn-secondary btn-sm me-2">Back</a>
-         @if(!$urgency->lpr_no)
-         <button id="generate-lpr" class="btn btn-primary btn-sm">Generate LPR No</button>
- @endif
- </div>
- </div>
Added / After Commit
+ </style>
+ 
+ <div class="card">
+     <div class="card mb-3">
+         <div class="card-header d-flex justify-content-between align-items-center">
+             <div>
+                 <span class="fw-bold">
+                     Job No: {{$nac?->urgencies[0]?->demand?->job_no}} ||
+                     NAC No: {{ $nac->nac_no }} ||
+                     NAC Date: {{ $nac->nac_date }} ||
+                     NAC Validity Date: {{ $nac->validity_date }}
+                 </span>
+             </div>
+             <div>
+                 @if($lpr)
+                     <span class="fw-bold">Generated LPR No: {{ $lpr->lpr_no }}</span>
+                 @else
+                     <button class="btn btn-primary" id="generate-lpr">Generate LPR</button>
Removed / Before Commit
- 
- <div class="card">
- <div class="card-header d-flex justify-content-between align-items-center">
-         <h4 class="mb-0">Urgency</h4>
- </div>
- 
- <div class="card-body">
- <thead class="table-danger text-center">
- <tr>
- <th>Ser No</th>
-                             <th>Urgency No</th>
- <th>Req No</th>
- <th>Status</th>
- <th>Action</th>
- </tr>
- @foreach($data as $index => $d)
- <tr>
- <td>{{ $index + 1 }}</td>
Added / After Commit
+ 
+ <div class="card">
+ <div class="card-header d-flex justify-content-between align-items-center">
+         <h4 class="mb-0">Urgency Preview(MCO)</h4>
+         <form method="GET" action="{{ route('urgency.mco') }}" id="filterForm" class="d-flex gap-2">
+             
+             {{-- Job No --}}
+             <select name="job_no" class="form-select select2">
+                 <option value="">All Job No</option>
+                 @foreach($jobNos as $jobNo)
+                     <option value="{{ $jobNo }}" {{ request('job_no') == $jobNo ? 'selected' : '' }}>
+                         {{ $jobNo }}
+                     </option>
+                 @endforeach
+             </select>
+ 
+             {{-- Req No --}}
+             <select name="req_no" class="form-select select2">
Removed / Before Commit
- 
- <div class="card">
- <div class="card-header d-flex justify-content-between align-items-center">
-         <h4 class="mb-0">Urgency Preview (No: {{ $decryptedid }})</h4>
- 
- <div class="d-flex align-items-center">
-             <a href="{{ url()->previous() }}" class="btn btn-secondary btn-sm">Back</a>
- </div>
- </div>
- 
- <div class="card-body">
- 
- <!-- NAC Detail Form -->
-         <form action="{{ route('urgency.update.nac', $decryptedid) }}" method="POST" class="mb-4">
- @csrf
- <div class="row g-3">
- <div class="col-md-3">
- <label for="nac_date" class="form-label">Date</label>
Added / After Commit
+ 
+ <div class="card">
+ <div class="card-header d-flex justify-content-between align-items-center">
+         <h4 class="mb-0"><strong>MCO Nac Form on</strong>  Urgency No: {{ $decryptedid }}</h4>
+ 
+ <div class="d-flex align-items-center">
+             <a href="{{ url('/urgency-mco') }}" class="btn btn-secondary btn-sm">Back</a>
+ </div>
+ </div>
+ 
+ <div class="card-body">
+ 
+ <!-- NAC Detail Form -->
+         <form action="{{ route('urgency.update.nac', $decryptedid) }}" method="POST" id="nacForm" style="display:none;" class="mb-4">
+ @csrf
+ <div class="row g-3">
+ <div class="col-md-3">
+ <label for="nac_date" class="form-label">Date</label>
Removed / Before Commit
- 
- <div class="card">
- <div class="card-header d-flex justify-content-between align-items-center">
-         <h4 class="mb-0">Urgency Preview (Reg No: {{ decrypt($req_no) }})</h4>
- 
- <div class="d-flex align-items-center">
-             <a href="{{ url()->previous() }}" class="btn btn-secondary btn-sm">Back</a>
- </div>
- </div>
- 
- <th>No Off</th>
- <th>Qty Demanded</th>
- <th>Qty Approved</th>
-                             <th>Qty Received</th>
- <th>Already Qty Urgency</th>
- <th>Balance</th>
- <th>Urgency Qty</th>
- <td>{{ $scale->account_unit ?? '-' }}</td>
Added / After Commit
+ 
+ <div class="card">
+ <div class="card-header d-flex justify-content-between align-items-center">
+         <h4 class="mb-0"><strong style="margin-bottom:10px">Group Urgency Create</strong> <br> (Reg No: {{ decrypt($req_no) }})</h4>
+ 
+ <div class="d-flex align-items-center">
+             <a href="{{ url('/previous-demands/'.Request::segment(3)) }}" class="btn btn-secondary btn-sm">Back</a>
+ </div>
+ </div>
+ 
+ <th>No Off</th>
+ <th>Qty Demanded</th>
+ <th>Qty Approved</th>
+                             <th>Qty Received  From Oss</th>
+ <th>Already Qty Urgency</th>
+ <th>Balance</th>
+ <th>Urgency Qty</th>
+ <td>{{ $scale->account_unit ?? '-' }}</td>
Removed / Before Commit
- 
- });
- Route::get('/urgency-mco', [UrgencyController::class,'mcodata'])->name('urgency.mco');
-     Route::get('/urgency-lpo', [UrgencyController::class,'lpodata'])->name('urgency.lpo');
- Route::get('/urgency-lpo/details/{id}', [UrgencyController::class,'lpodetails'])->name('urgency.lpo.details');
- Route::get('/urgency-mco/details/{id}', [UrgencyController::class,'urgencydetail'])->name('urgency.mco.details');
- Route::post('/urgency/{id}/update-nac', [UrgencyController::class, 'updateNacDetails'])->name('urgency.update.nac');
- ->name('urgency.saveEstimate');
- Route::post('/urgency/check-power', [UrgencyController::class, 'checkPower'])
- ->name('urgency.checkPower');
- 
- 
- Route::post('/user-approved-toggle', [UserController::class, 'toggleApproved']);
Added / After Commit
+ 
+ });
+ Route::get('/urgency-mco', [UrgencyController::class,'mcodata'])->name('urgency.mco');
+     Route::get('/urgency-lpo-without-lpr', [UrgencyController::class,'lpodatawithoutlpr'])->name('urgency.lpowithoutlpr');
+     Route::get('/urgency-lpo-with-lpr', [UrgencyController::class,'lpodatawithlpr'])->name('urgency.lpowithlpr');
+ Route::get('/urgency-lpo/details/{id}', [UrgencyController::class,'lpodetails'])->name('urgency.lpo.details');
+ Route::get('/urgency-mco/details/{id}', [UrgencyController::class,'urgencydetail'])->name('urgency.mco.details');
+ Route::post('/urgency/{id}/update-nac', [UrgencyController::class, 'updateNacDetails'])->name('urgency.update.nac');
+ ->name('urgency.saveEstimate');
+ Route::post('/urgency/check-power', [UrgencyController::class, 'checkPower'])
+ ->name('urgency.checkPower');
+     Route::post('/lpr/{lpr}/store-gems-details', [UrgencyController::class, 'storeGemsDetails'])->name('lpr.store.gems');
+     Route::post('/urgency/update-field', [UrgencyController::class, 'updateField'])->name('urgency.updateField');
+ 
+ 
+ 
+ 
+ Route::post('/user-approved-toggle', [UserController::class, 'toggleApproved']);