AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
67%
Quality Avg
?
72%
Security Avg
?
54%
Reviews
?
37
Review Result ?
jattin01/army · e644c1c3
The commit adds Excel attendance import functionality, shift ID handling for staff, and CRC serial number generation. The attendance import includes detailed business logic for late arrivals, absences, leave overrides, and automated leave entry, improving business process automation. However, some code quality issues such as lack of comments on complex logic, no validation/error handling of file import, magic strings/numbers for times and status, and insufficient logging on import may cause maintainability and debugging difficulties. Risk of invalid data processing or subtle bugs is present without more validation or unit tests. Security aspects like input sanitization and permission checks are unclear from diff. The commit message is uninformative.
Quality
?
70%
Security
?
70%
Business Value
?
75%
Maintainability
?
55%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Issue
Where
commit message
Issue / Evidence
issue
Suggested Fix
write a clear descriptive commit message to summarize the changes and intent
Missing Validation
Where
app/Http/Controllers/AttendanceController.php:94
Issue / Evidence
lack of validation for uploaded file and error handling
Suggested Fix
add validation for file type and handle import errors gracefully
Hardcoded Shift Timings
Where
app/Http/Controllers/AttendanceController.php:123
Issue / Evidence
hardcoded shift timings
Suggested Fix
consider configuration or database driven shift times instead of constants
Skipping Empty Rows Without Logging
Where
app/Http/Controllers/AttendanceController.php:140
Issue / Evidence
skipping empty rows without logging
Suggested Fix
add logs to detect bad data rows during import
Database Queries Inside Loop
Where
app/Http/Controllers/AttendanceController.php:178
Issue / Evidence
database queries inside loop
Suggested Fix
optimize queries or cache results to reduce DB load
Security Issue
Where
app/Http/Controllers/AttendanceController.php:209
Issue / Evidence
no permission/auth checks visible for bulk attendance insertion
Suggested Fix
add authorization checks
Use Of Uninitialized Variable Lateminutes
Where
app/Http/Controllers/AttendanceController.php:150
Issue / Evidence
use of uninitialized variable lateMinutes
Suggested Fix
initialize it to 0 before usage to avoid bugs
Missing Validation
Where
app/Http/Controllers/Admin/StaffController.php:137
Issue / Evidence
converting array of shift IDs to string without validation
Suggested Fix
consider storing and validating shift IDs as array properly
Lacks Comments Explaining Parsing Logic
Where
app/Http/Controllers/CrcEntryController.php:59
Issue / Evidence
lacks comments explaining parsing logic
Suggested Fix
add comments for clarity
No Error Handling If Active Financial Year...
Where
app/Http/Controllers/CrcEntryController.php:49
Issue / Evidence
no error handling if active financial year missing
Suggested Fix
add handling for missing active year scenario
Code Change Preview · app/Http/Controllers/Admin/StaffController.php
?
Removed / Before Commit
- $file = $request->file('profile_image'); - $data['profile_image'] = $file->store('staff', 'public'); - } - - Staff::create($data); - - return redirect()->route('admin.staff.index')->with('success', 'Staff created successfully.'); - $file = $request->file('profile_image'); - $data['profile_image'] = $file->store('staff', 'public'); - } - - $staff->update($data); - - return redirect()->route('admin.staff.index')->with('success', 'Staff updated successfully.'); - } - - 'joining_date' => 'nullable|date', - 'status' => 'required|in:active,inactive',
Added / After Commit
+ $file = $request->file('profile_image'); + $data['profile_image'] = $file->store('staff', 'public'); + } + Staff::create($data); + + return redirect()->route('admin.staff.index')->with('success', 'Staff created successfully.'); + $file = $request->file('profile_image'); + $data['profile_image'] = $file->store('staff', 'public'); + } + $shiftIds = $request->input('shift_id'); // array + + if (is_array($shiftIds)) { + $shiftIds = implode(',', $shiftIds); // "8,9" + } + + $staff->shift_id = $shiftIds; + $staff->update($data); +
Removed / Before Commit
- - use App\Models\Attendance; - use Illuminate\Http\Request; - use Maatwebsite\Excel\Facades\Excel; - use Carbon\Carbon; - use App\Models\Staff; - use App\Models\Department; - use App\Models\Group; - use App\Models\LeaveType; - use App\Models\Leave; - use PhpOffice\PhpSpreadsheet\Shared\Date; - - - class AttendanceController extends Controller - 'attendance_file' => 'required|mimes:xlsx,xls' - ]); - - $file = $request->file('attendance_file');
Added / After Commit
+ + use App\Models\Attendance; + use Illuminate\Http\Request; + use Carbon\Carbon; + use App\Models\Staff; + use App\Models\Department; + use App\Models\Group; + use App\Models\LeaveType; + use App\Models\Leave; + use Maatwebsite\Excel\Facades\Excel; + use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate; + + + + class AttendanceController extends Controller + 'attendance_file' => 'required|mimes:xlsx,xls' + ]); +
Removed / Before Commit
- use App\Models\MasterCommand; - use App\Models\CrcJob; - use App\Models\CrcRepair; - use Illuminate\Support\Str; - use DB; - - class CrcEntryController extends Controller - { - public function create() - { - // 🔍 Check if any CRC entry exists without jobs - $pendingEntry = CrcEntry::whereDoesntHave('jobs')->latest()->first(); - - if ($pendingEntry) { - $units = Unit::select('id', 'name')->get(); - $commands = MasterCommand::select('id', 'name')->get(); - - return view('crc.entries.create', compact('units', 'commands'));
Added / After 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; + + class CrcEntryController extends Controller + { + public function create() + { + $pendingEntry = CrcEntry::whereDoesntHave('jobs')->latest()->first(); + + if ($pendingEntry) { + $units = Unit::select('id', 'name')->get();
Removed / Before Commit
- - public function getByGroup($id) - { - $equipments = Equipment::whereHas('subgroup', function ($query) use ($id) { - $query->where('group_id', $id); - })->get(['id', 'name']); - - return response()->json($equipments); - }
Added / After Commit
+ + public function getByGroup($id) + { + $equipments = Equipment::where('group_id', $id)->get(['id', 'name']); + + return response()->json($equipments); + }
Removed / Before Commit
- return view('roles.edit', compact('role', 'roles','groups')); - } - - // Update the existing role - public function update(Request $request) - {
Added / After Commit
+ return view('roles.edit', compact('role', 'roles','groups')); + } + + public function delete($id) + { + $role = Role::where('id',$id)->delete(); + return redirect()->route('roles.index')->with('success', 'Role delete successfully.'); + } + + // Update the existing role + public function update(Request $request) + {
Removed / Before Commit
- - return view('users.edit', compact('roles','user','verticals','groups')); - } - - public function setPassword(Request $request) - {
Added / After Commit
+ + return view('users.edit', compact('roles','user','verticals','groups')); + } + public function delete($id) + { + $User = User::where('id',$id)->delete(); + return back()->with('success', 'User delete successfully.'); + } + + public function setPassword(Request $request) + {
Removed / Before Commit
- { - public function index(Request $request) - { - // Base query for WorkEquipment - $query = WorkEquipment::with([ - 'workOrder.workUnit.units', - $q->whereNotNull('control_no'); - }); - - - // Apply filters - if ($request->filled('control_number')) { - } - - // Use paginate with query persistence - $equipments = $query->paginate(10)->appends($request->query()); - - // $equipments = $query->get();
Added / After Commit
+ { + public function index(Request $request) + { + $user = auth()->user(); + // Base query for WorkEquipment + $query = WorkEquipment::with([ + 'workOrder.workUnit.units', + $q->whereNotNull('control_no'); + }); + + if (!is_null($user->role)) { + // Role exists → group based restriction + + if ($user->group_id) { + // Sirf apne group ka data + $query->where('group_id', $user->group_id); + } else { + // Role hai but group nahi → kuch bhi na dikhe
Removed / Before Commit
- <?php - namespace App\Imports; - - use App\Models\Attendance; - use App\Models\Staff; - use Carbon\Carbon; - use Maatwebsite\Excel\Concerns\ToModel; - use Maatwebsite\Excel\Concerns\WithHeadingRow; - { - public function model(array $row) - { - $employee = Staff::where('employee_code', $row['employee_code'])->first(); - if (!$employee) return null; - - $shiftStart = Carbon::parse('09:00:00'); // later get from shift table - $checkIn = $row['in_time'] ? Carbon::parse($row['in_time']) : null; - $lateMinutes = $checkIn ? max(0, $shiftStart->diffInMinutes($checkIn, false)) : null; -
Added / After Commit
+ <?php + + namespace App\Imports; + + use App\Models\Attendance; + use App\Models\Staff; + use App\Models\Leave; + use Carbon\Carbon; + use Maatwebsite\Excel\Concerns\ToModel; + use Maatwebsite\Excel\Concerns\WithHeadingRow; + { + public function model(array $row) + { + // 1️⃣ Employee find + $employee = Staff::where('biometric', trim($row['biometric_id'] ?? ''))->first(); + if (!$employee) return null; + + $date = Carbon::parse($row['date'])->format('Y-m-d');
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Imports; + + use App\Models\CrcPartMaster; + use Maatwebsite\Excel\Concerns\ToModel; + use Maatwebsite\Excel\Concerns\WithHeadingRow; + + class CrcPartMasterImport implements ToModel, WithHeadingRow + { + public function model(array $row) + { + return new CrcPartMaster([ + 'part_no' => $row['part_no'], + 'equipment_name' => $row['equipment_name'], + 'nomenclature' => $row['nomenclature'], + 'hours' => $row['hours'], + ]);
Removed / Before Commit
- - protected $fillable = [ - 'employee_id', - 'date', - 'check_in', - 'check_out',
Added / After Commit
+ + protected $fillable = [ + 'employee_id', + 'biometric_id', + 'date', + 'check_in', + 'check_out',
Removed / Before Commit
- { - return $this->belongsTo(Unit::class); - }
Added / After Commit
+ { + return $this->belongsTo(Unit::class); + } + public function command() + { + return $this->belongsTo(MasterCommand::class); + }
Removed / Before Commit
- - namespace App\Models; - use Illuminate\Database\Eloquent\Model; - - class Role extends Model - { - protected $fillable = ['name','group_id']; - public function menus() - {
Added / After Commit
+ + namespace App\Models; + use Illuminate\Database\Eloquent\Model; + use Illuminate\Database\Eloquent\SoftDeletes; // ✅ add + + class Role extends Model + { + use SoftDeletes; + + protected $fillable = ['name','group_id']; + public function menus() + {
Removed / Before Commit
- - protected $fillable = [ - // Profile & Personal Details - 'profile_image', 'name', 'employee_number', 'email', 'phone', 'allow_login', 'joining_date', 'status', 'address', - 'gender', 'dob', 'personal_email', 'personal_phone', 'is_married','employee_category_id', - - // Job Details
Added / After Commit
+ + protected $fillable = [ + // Profile & Personal Details + 'profile_image', 'name', 'employee_number','biometric','email', 'phone', 'allow_login', 'joining_date', 'status', 'address', + 'gender', 'dob', 'personal_email', 'personal_phone', 'is_married','employee_category_id', + + // Job Details
Removed / Before Commit
- use Illuminate\Foundation\Auth\User as Authenticatable; - use Illuminate\Notifications\Notifiable; - use Laravel\Sanctum\HasApiTokens; - use App\Models\Vertical; - use App\Models\Group; - - - class User extends Authenticatable - { - use HasApiTokens, HasFactory, Notifiable; - - /** - * The attributes that are mass assignable.
Added / After Commit
+ use Illuminate\Foundation\Auth\User as Authenticatable; + use Illuminate\Notifications\Notifiable; + use Laravel\Sanctum\HasApiTokens; + use Illuminate\Database\Eloquent\SoftDeletes; // ✅ add + use App\Models\Vertical; + use App\Models\Group; + + + class User extends Authenticatable + { + use HasApiTokens, HasFactory, Notifiable, SoftDeletes; + + /** + * The attributes that are mass assignable.
Removed / Before Commit
- <div class="row g-3 mt-2"> - - {{-- Profile Image --}} - <div class="col-md-3"> - <label for="profile_image" class="form-label">Profile Image</label> - - {{-- Show existing image in edit mode --}} - </div> - - {{-- Employee Number --}} - <div class="col-md-6"> - <label for="employee_number" class="form-label">Employee ID</label> - <input type="text" id="employee_number" name="employee_number" class="form-control" - placeholder="Enter Employee ID" - value="{{ old('employee_number', $staff->employee_number ?? 'emp-0001') }}"> - @error('employee_number') <div class="text-danger">{{ $message }}</div> @enderror - </div> -
Added / After Commit
+ <div class="row g-3 mt-2"> + + {{-- Profile Image --}} + <div class="col-md-6"> + <label for="profile_image" class="form-label">Profile Image</label> + + {{-- Show existing image in edit mode --}} + </div> + + {{-- Employee Number --}} + <div class="col-md-3"> + <label for="employee_number" class="form-label">Employee ID</label> + <input type="text" id="employee_number" name="employee_number" class="form-control" + placeholder="Enter Employee ID" + value="{{ old('employee_number', $staff->employee_number ?? 'emp-0001') }}"> + @error('employee_number') <div class="text-danger">{{ $message }}</div> @enderror + </div> + <div class="col-md-3">
Removed / Before Commit
- <table class="table table-bordered table-striped" id="staffTable"> - <thead class="table-primary"> - <tr> - <th>Name</th> - <th>Email</th> - <th>Phone</th> - <tbody> - @foreach($staffs as $member) - <tr> - <td>{{ $member->name }}</td> - <td>{{ $member->email }}</td> - <td>{{ $member->phone }}</td>
Added / After Commit
+ <table class="table table-bordered table-striped" id="staffTable"> + <thead class="table-primary"> + <tr> + <th>Employee ID </th> + <th>Name</th> + <th>Email</th> + <th>Phone</th> + <tbody> + @foreach($staffs as $member) + <tr> + <td>{{ $member->employee_number }}</td> + <td>{{ $member->name }}</td> + <td>{{ $member->email }}</td> + <td>{{ $member->phone }}</td>
Removed / Before Commit
- <th>Check Out</th> - <th>Status</th> - <th>Late (Min)</th> - <th>Action</th> - </tr> - </thead> - </span> - </td> - <td>{{ $attendance->late_by_minutes }}</td> - <td class="d-flex gap-1"> - - <!-- Edit Button -->
Added / After Commit
+ <th>Check Out</th> + <th>Status</th> + <th>Late (Min)</th> + <th>Remark</th> + <th>Action</th> + </tr> + </thead> + </span> + </td> + <td>{{ $attendance->late_by_minutes }}</td> + <td>{{ $attendance->remarks }}</td> + <td class="d-flex gap-1"> + + <!-- Edit Button -->
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>#</th> - <th>BDE Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($bdes as $index => $bde) - <tr> - <td>{{ $bde->id }}</td> - <td>{{ $bde->name }}</td> - <td class="d-flex gap-2"> - <a class="btn-edit" data-id="{{ $bde->id }}" href="javascript:void(0);"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial no</th> + <th>Name of Bde</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($bdes as $index => $bde) + <tr> + <td>{{ $bdes->firstItem() + $index }}</td> + <td>{{ $bde->name }}</td> + <td class="d-flex gap-2"> + <a class="btn-edit" data-id="{{ $bde->id }}" href="javascript:void(0);"
Removed / Before Commit
- <thead> - <tr> - <th>Serial No</th> - <th>Corps Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($corps as $index => $corp) - <tr> - <td>{{ $corp->id }}</td> - <td>{{ $corp->name }}</td> - <td> - <a href="javascript:void(0);" class="btn-edit pe-auto" data-id="{{ $corp->id }}"
Added / After Commit
+ <thead> + <tr> + <th>Serial No</th> + <th>Name of Corps</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($corps as $index => $corp) + <tr> + <td>{{ $corps->firstItem() + $index }}</td> + <td>{{ $corp->name }}</td> + <td> + <a href="javascript:void(0);" class="btn-edit pe-auto" data-id="{{ $corp->id }}"
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Serail No</th> - <th>CO Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($cos as $index => $co) - <tr> - <td>{{ $index + 1 }}</td> - <td>{{ $co->name }}</td> - <td> - <a href="javascript:void(0);" class="btn-edit" data-id="{{ $co->id }}"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial No</th> + <th>C/o</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($cos as $index => $co) + <tr> + <td>{{ $cos->firstItem() + $index}}</td> + <td>{{ $co->name }}</td> + <td> + <a href="javascript:void(0);" class="btn-edit" data-id="{{ $co->id }}"
Removed / Before Commit
- </div> - @endif - - <form id="crcForm" method="POST" action="{{ route('crc.entries.store') }}" - data-crc-serial="0001" data-crc-date="{{ date('Y-m-d') }}"> - @csrf - - <div class="card"> - - <div class="card-header"> - <h4 class="mb-0"><b>Create CRC Entry</b></h4> - </div> - - <hr> - - <div class="card-body"> - - <div class="row align-items-end">
Added / After Commit
+ </div> + @endif + + + + <div class="card"> + + <!-- Right Side : Import + Sample --> + <div class="card-header d-flex justify-content-between align-items-center"> + + <!-- Left --> + <h4 class="mb-0"><b>Create CRC Entry</b></h4> + + <!-- Right --> + <div class="d-flex gap-2"> + <form id="importForm" enctype="multipart/form-data"> + + <!-- Hidden Input -->
Removed / Before Commit
- @endforeach - </td> - <td> - <a href="{{ route('crc.entries.show', $entry->id) }}" class="btn"><i class="fa fa-eye" aria-hidden="true"></i></a> - @if($entry->jobs->isEmpty()) - <a href="{{ route('crc.entries.issue', $entry->id) }}" class="btn btn-sm btn-warning">Issue</a> - @endif - </td> - </tr>
Added / After Commit
+ @endforeach + </td> + <td> + <a href="{{ route('crc.entries.show', $entry->id) }}" target="_blank" class="btn" style="color:blue"><i class="fa fa-eye" aria-hidden="true"></i></a> + @if($entry->jobs->isEmpty()) + <a href="{{ route('crc.entries.issue', $entry->id) }}" target="_blank" class="btn btn-sm btn-warning">Issue</a> + @endif + </td> + </tr>
Removed / Before Commit
- @extends('layouts.app') - - @section('content') - <div class="container"> - <h2 class="mb-4">Issue IV Parts</h2> - - </form> - </div> - @endsection
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <!-- CRC INFO MODAL --> + <div class="modal fade" id="crcInfoModal" tabindex="-1" aria-hidden="true"> + <div class="modal-dialog modal-lg modal-dialog-centered"> + <div class="modal-content"> + + <div class="modal-header"> + <h5 class="modal-title">CRC Entry Created Successfully</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal"></button> + </div> + + <div class="modal-body"> + <div class="mb-6"> + <strong>Parent CRC No:</strong> + <span class="badge bg-primary"> + {{ $crcEntry->crc_no }}
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Serail No</th> - <th>Division Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($divs as $index => $div) - <tr> - <td>{{ $div->id }}</td> - <td>{{ $div->name }}</td> - <td> - <a class="btn-edit" data-id="{{ $div->id }}" href="javascript:void(0);"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>Serial No</th> + <th>Name of Division</th> + <th>Actions</th> + </tr> + </thead> + <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);"
Removed / Before Commit
- <div class="col"> - <div class="card"> - <div class="card-header py-3"> - <div class="row align-items-end"> - <div class="col-md-1"> - <h4><b>Equipments</b></h4> - </div> - - <!-- <div class="mb-3"> --> - <div class="col-md-2"> - <label class="form-label">Group</label> - <select id="filterGroup" class="form-select select2"> - <option value="">-- All Groups --</option> - @foreach($groups as $group) - <option value="{{ $group->id }}" {{ request('group_id') == $group->id ? 'selected' : '' }}> - {{ $group->name }} - </option> - @endforeach
Added / After Commit
+ <div class="col"> + <div class="card"> + <div class="card-header py-3"> + <!-- ================= ROW 1 : TITLE + ACTIONS ================= --> + <div class="row align-items-center mb-3"> + <div class="col-md-6"> + <h4 class="mb-0"><b>Equipments</b></h4> + </div> + + <div class="col-md-6 text-end d-flex justify-content-end gap-2"> + <button type="button" + class="btn btn-primary" + data-bs-toggle="modal" + data-bs-target="#equipmentModal"> + ➕ Add Equipment + </button> + + <form id="importForm" enctype="multipart/form-data" class="d-inline-flex align-items-center gap-2">
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Serail No</th> - <th>Group Name</th> - <th>Vertical</th> - <th>Status</th>
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial No</th> + <th>Group Name</th> + <th>Vertical</th> + <th>Status</th>
Removed / Before Commit
- } - .pagination li { - margin-left: 5px; - } - </style>
Added / After Commit
+ } + .pagination li { + margin-left: 5px; + } + .mt-7{ + margin-top: 12px; + } + </style>
Removed / Before Commit
- <thead class="table-primary"> - <tr> - <th>Serial No</th> - <th>Command</th> - <th>Status</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($commands as $index => $cmd) - <tr> - <td>{{ $cmd->id }}</td> - <td>{{ $cmd->name }}</td> - <td> - <div class="form-check form-switch">
Added / After Commit
+ <thead class="table-primary"> + <tr> + <th>Serial No</th> + <th>Name of Command</th> + <th>Status</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($commands as $index => $cmd) + <tr> + <td>{{ $commands->firstItem() + $index }}</td> + <td>{{ $cmd->name }}</td> + <td> + <div class="form-check form-switch">
Removed / Before Commit
- <td>{{ $latestDate }}</td> - <td> - <button class="btn" onclick="openAddQtyModal({{ $eq->id }}, {{ $remaining }})"><i class="fas fa-plus" aria-hidden="true"></i></button> - <a href="{{ route('mr_process.history', $eq->id) }}" class="btn"><i class="fa fa-eye" aria-hidden="true"></i></a> - </td> - </tr> - @endforeach
Added / After Commit
+ <td>{{ $latestDate }}</td> + <td> + <button class="btn" onclick="openAddQtyModal({{ $eq->id }}, {{ $remaining }})"><i class="fas fa-plus" aria-hidden="true"></i></button> + <a href="{{ route('mr_process.history', $eq->id) }}"><i class="fa fa-eye" aria-hidden="true"></i></a> + </td> + </tr> + @endforeach
Removed / Before Commit
- $qa = $equipment->qaDecision; - @endphp - <tr> - <td>{{ $workOrder->workUnit?->units?->name ?? '-' }}</td> - <td>{{ $workOrder->workUnit?->wksps?->name ?? '-' }}</td> - <!-- <td>{{ $workOrder->workUnit?->commands?->name ?? '-' }}</td> --> - <td>{{ $equipment->unit_wo_no ?? '-' }}</td> - <td>{{ $equipment->unit_wo_date ?? '-' }}</td> - <!-- <td>{{ $equipment->quantity ?? '-' }}</td> --> - <td>{{ $equipment->regd_no ?? '-' }}</td> - <td>{{ $workOrder->control_no ?? '-' }}</td> - <td>{{ date('Y-m-d',strtotime($workOrder->created_at))}}</td> - <td>{{ date('Y-m-d',strtotime($vir?->vir_date)) }}</td> - <!-- <td>{{ $vir?->status ?? '-' }}</td> --> - <!-- <td>{{ $qa?->qa_status ?? '-' }}</td> --> - class="text-primary qa-decision-btn" - data-bs-toggle="modal" - data-bs-target="#qaModal"
Added / After Commit
+ $qa = $equipment->qaDecision; + @endphp + <tr> + <td>{{ $workOrder?->workUnit?->units?->name ?? '-' }}</td> + <td>{{ $workOrder?->workUnit?->wksps?->name ?? '-' }}</td> + <!-- <td>{{ $workOrder->workUnit?->commands?->name ?? '-' }}</td> --> + <td>{{ $equipment->unit_wo_no ?? '-' }}</td> + <td>{{ $equipment->unit_wo_date ?? '-' }}</td> + <!-- <td>{{ $equipment->quantity ?? '-' }}</td> --> + <td>{{ $equipment->regd_no ?? '-' }}</td> + <td>{{ $workOrder->control_no ?? '-' }}</td> + <td>{{ date('Y-m-d',strtotime($workOrder?->created_at))}}</td> + <td>{{ date('Y-m-d',strtotime($vir?->vir_date)) }}</td> + <!-- <td>{{ $vir?->status ?? '-' }}</td> --> + <!-- <td>{{ $qa?->qa_status ?? '-' }}</td> --> + class="text-primary qa-decision-btn" + data-bs-toggle="modal" + data-bs-target="#qaModal"
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Searil no</th> - <th>Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($repairClasses as $index => $repairClass) - <tr> - <td>{{ $index + 1 }}</td> - <td>{{ $repairClass->name }}</td> - <td> - <a href="javascript:void(0);" class="btn-edit"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial no</th> + <th>Name</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($repairClasses as $index => $repairClass) + <tr> + <td>{{ $repairClasses->firstItem() + $index }}</td> + <td>{{ $repairClass->name }}</td> + <td> + <a href="javascript:void(0);" class="btn-edit"
Removed / Before Commit
- <a href="{{ route('roles.edit', $role->id) }}"> - <i class="fas fa-pencil"></i> - </a> - </td> - </tr> - @endforeach
Added / After Commit
+ <a href="{{ route('roles.edit', $role->id) }}"> + <i class="fas fa-pencil"></i> + </a> + <a href="{{ route('roles.delete', $role->id) }}"> + <i class="fas fa-trash"></i> + </a> + </td> + </tr> + @endforeach
Removed / Before Commit
- <div class="col"> - <div class="card"> - <div class="card-header py-3"> - <div class="row align-items-center"> - <div class="col-md-3"> - <h4><b>Sub-Assy Equipments</b></h4> - </div> - - <div class="col-md-9 d-flex justify-content-end align-items-end"> - - - - <div style="margin:0px 10px"> - <label class="form-label">Group</label> - <select id="filterGroup" class="form-select select2"> - <option value="">-- All Groups --</option> - @foreach($groups as $group) - <option value="{{ $group->id }}" {{ request('group_id') == $group->id ? 'selected' : '' }}>
Added / After Commit
+ <div class="col"> + <div class="card"> + <div class="card-header py-3"> + <div class="row align-items-center mb-3"> + <div class="col-md-6"> + <h4 class="mb-0"><b>Sub-Assy Equipments</b></h4> + </div> + + <div class="col-md-6 d-flex justify-content-end gap-2"> + + <button type="button" + class="btn btn-primary" + data-bs-toggle="modal" + data-bs-target="#subAssyModal"> + ➕ Add Sub-Assy + </button> + + <form id="importForm" enctype="multipart/form-data" class="d-inline-flex align-items-center gap-2">
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Serail No</th> - <th>SubGroup Name</th> - <th>Group</th> - <th>Status</th>
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial No</th> + <th>SubGroup Name</th> + <th>Group</th> + <th>Status</th>
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Serail No</th> - <th>Unit Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($units as $index => $unit) - <tr> - <td>{{ $index + 1 }}</td> - <td>{{ $unit->name }}</td> - <td class="d-flex gap-2"> - <a href="javascript:void(0);" class="btn-edit" data-id="{{ $unit->id }}"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial No</th> + <th>Name of Unit</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($units as $index => $unit) + <tr> + <td>{{ $units->firstItem() + $index }}</td> + <td>{{ $unit->name }}</td> + <td class="d-flex gap-2"> + <a href="javascript:void(0);" class="btn-edit" data-id="{{ $unit->id }}"
Removed / Before Commit
- <td> - - <a href="{{ url('/user-edit/'.$user->id) }}"><i class="fas fa-pencil"></i></a> - </td> - </tr> - @endforeach
Added / After Commit
+ <td> + + <a href="{{ url('/user-edit/'.$user->id) }}"><i class="fas fa-pencil"></i></a> + <a href="{{ url('/user-delete/'.$user->id) }}"> + <i class="fas fa-trash"></i> + </a> + </td> + </tr> + @endforeach
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped align-middle"> - <thead> - <tr> - <th>Serail No</th> - <th>Vertical Name</th> - <th>Status</th> - <th>Actions</th>
Added / After Commit
+ <table id="example" class="table table-bordered table-striped align-middle"> + <thead> + <tr> + <th>serial No</th> + <th>Vertical Name</th> + <th>Status</th> + <th>Actions</th>
Removed / Before Commit
- <table id="example" class="table table-bordered table-striped"> - <thead> - <tr> - <th>Searil no</th> - <th>Workspace Name</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - @foreach($wksps as $index => $wksp) - <tr> - <td>{{ $wksp->id }}</td> - <td>{{ $wksp->name }}</td> - <td> - <a href="javascript:void(0);"
Added / After Commit
+ <table id="example" class="table table-bordered table-striped"> + <thead> + <tr> + <th>serial no</th> + <th>Name of Workshop</th> + <th>Actions</th> + </tr> + </thead> + <tbody> + @foreach($wksps as $index => $wksp) + <tr> + <td>{{ $wksps->firstItem() + $index }}</td> + <td>{{ $wksp->name }}</td> + <td> + <a href="javascript:void(0);"
Removed / Before Commit
- Route::get('/dashboardold', [UserController::class, 'dashboard'])->name('dashboard')->middleware('check.permission:Dashboard,view');; - Route::get('/users', [UserController::class, 'index'])->name('user.index')->middleware('check.permission:User,view');; - Route::get('/user-edit/{id}', [UserController::class, 'edit'])->name('user.edit')->middleware('check.permission:User,modify');; - Route::post('/user-password', [UserController::class, 'setPassword'])->name('user.password')->middleware('check.permission:User,modify');; - Route::get('/roles', [RoleController::class, 'index'])->name('roles.index')->middleware('check.permission:Role,view');; - Route::get('/roles/create', [RoleController::class, 'create'])->name('roles.create')->middleware('check.permission:Role,create');; - Route::post('/roles', [RoleController::class, 'store'])->name('roles.store')->middleware('check.permission:Role,create');; - Route::get('/roles/edit/{id}', [RoleController::class, 'edit'])->name('roles.edit')->middleware('check.permission:Role,modify');; - Route::post('roles/update', [RoleController::class, 'update'])->name('roles.update')->middleware('check.permission:Role,modify');; - Route::get('/permission-create/{id}', [PermissionController::class, 'chooserole'])->name('permission.create')->middleware('check.permission:Role,modify'); - Route::get('/permission-view/{id}', [PermissionController::class, 'view'])->name('permission.view')->middleware('check.permission:Role,modify'); - Route::prefix('crc/entries')->name('crc.entries.')->group(function () { - Route::get('index', [CrcEntryController::class, 'index'])->name('index'); - Route::get('create', [CrcEntryController::class, 'create'])->name('create'); - Route::post('/', [CrcEntryController::class, 'store'])->name('store'); - Route::get('/{id}', [CrcEntryController::class, 'show'])->name('show'); - Route::get('/part-details/{part_no}', [CrcEntryController::class, 'fetch']); - Route::get('/{id}/issue', [CrcEntryController::class, 'showIssueForm'])->name('issue');
Added / After Commit
+ Route::get('/dashboardold', [UserController::class, 'dashboard'])->name('dashboard')->middleware('check.permission:Dashboard,view');; + Route::get('/users', [UserController::class, 'index'])->name('user.index')->middleware('check.permission:User,view');; + Route::get('/user-edit/{id}', [UserController::class, 'edit'])->name('user.edit')->middleware('check.permission:User,modify');; + Route::get('/user-delete/{id}', [UserController::class, 'delete'])->name('user.delete')->middleware('check.permission:User,delete');; + Route::post('/user-password', [UserController::class, 'setPassword'])->name('user.password')->middleware('check.permission:User,modify');; + Route::get('/roles', [RoleController::class, 'index'])->name('roles.index')->middleware('check.permission:Role,view');; + Route::get('/roles/create', [RoleController::class, 'create'])->name('roles.create')->middleware('check.permission:Role,create');; + Route::post('/roles', [RoleController::class, 'store'])->name('roles.store')->middleware('check.permission:Role,create');; + Route::get('/roles/edit/{id}', [RoleController::class, 'edit'])->name('roles.edit')->middleware('check.permission:Role,modify');; + Route::get('/roles/delete/{id}', [RoleController::class, 'delete'])->name('roles.delete')->middleware('check.permission:Role,delete');; + Route::post('roles/update', [RoleController::class, 'update'])->name('roles.update')->middleware('check.permission:Role,modify');; + Route::get('/permission-create/{id}', [PermissionController::class, 'chooserole'])->name('permission.create')->middleware('check.permission:Role,modify'); + Route::get('/permission-view/{id}', [PermissionController::class, 'view'])->name('permission.view')->middleware('check.permission:Role,modify'); + Route::prefix('crc/entries')->name('crc.entries.')->group(function () { + Route::get('index', [CrcEntryController::class, 'index'])->name('index'); + Route::get('create', [CrcEntryController::class, 'create'])->name('create'); + Route::post('/crc-part-import', [CrcEntryController::class, 'import'])->name('import'); + Route::post('/', [CrcEntryController::class, 'store'])->name('store');