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 · bab64871
This commit introduces a large controller file for handling attendance functions and some inventory-related queries. The attendance controller supports listing, filtering, uploading Excel files with attendance data, updating, and deleting records. Several validations and mass-assignment patterns are used. The inventory controller changes reflect database queries and data transformations but are fragmentary in the diff. The code uses Laravel conventions with Eloquent models and validation rules.
Quality
?
70%
Security
?
40%
Business Value
?
80%
Maintainability
?
60%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Insufficient Detail
Where
commit message
Issue / Evidence
insufficient detail
Suggested Fix
provide a descriptive commit message explaining purpose and scope of changes
Missing Validation
Where
app/Http/Controllers/AttendanceController.php:72
Issue / Evidence
file upload validation lacks max file size or security checks
Suggested Fix
add max file size limits and sanitize Excel input to improve security
Excel::tocollection With Null Import Class
Where
app/Http/Controllers/AttendanceController.php:81
Issue / Evidence
Excel::toCollection with null import class
Suggested Fix
specify import class for better error handling and type clarity
Skipping Rows With Missing Or Unknown Empl...
Where
app/Http/Controllers/AttendanceController.php:93-95
Issue / Evidence
skipping rows with missing or unknown employees without logging
Suggested Fix
add error logging or reporting to identify problematic Excel data rows
Missing Validation
Where
app/Http/Controllers/AttendanceController.php:104-107
Issue / Evidence
no validation or normalization on check_in and check_out times
Suggested Fix
validate and normalize time formats before saving to reduce bugs
Search Filter Susceptible To Sql Injection...
Where
app/Http/Controllers/AttendanceController.php:50-54
Issue / Evidence
search filter susceptible to SQL injection if not properly handled
Suggested Fix
use parameter binding and avoid direct string interpolation
Missing Validation
Where
app/Http/Controllers/AttendanceController.php:128-147
Issue / Evidence
update method uses nullable check_in and check_out but no validation if check_out precedes check_in
Suggested Fix
add validation to enforce logical check-in/out times
Decrypt Call Without Try Catch
Where
app/Http/Controllers/InventoryController.php:103
Issue / Evidence
decrypt call without try-catch
Suggested Fix
wrap decryption in try-catch to prevent runtime exceptions on invalid inputs
Raw Db Queries With Pluck And Wherein On C...
Where
app/Http/Controllers/InventoryController.php:42-128
Issue / Evidence
raw DB queries with pluck and whereIn on collection keys may produce partial or inefficient queries
Suggested Fix
optimize query construction and check input sanitization for security
Potential Date Parsing Errors With Carbon:...
Where
app/Http/Controllers/AttendanceController.php:92-112
Issue / Evidence
potential date parsing errors with Carbon::parse on unknown formats from Excel
Suggested Fix
add try-catch or date validation before parsing
Code Change Preview · app/Http/Controllers/AttendanceController.php
?
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + 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\Designation; + use App\Models\Shift; + + + class AttendanceController extends Controller + { + /** + * Show attendance list
Removed / Before Commit
- { - public function index() - { - $demands = McoDemand::select('demand_no')->groupBy('demand_no')->pluck('demand_no')->toArray(); - return view('inventory.index', compact('demands')); - } - - { - $demand_no_decrypted = decrypt($demand_no); - - $demands = McoDemand::where('demand_no', $demand_no_decrypted)->paginate(10); - - // Collect keys to match in issue table - $keys = $demands->map(function($item) { - return [ - 'demand_no' => $item->demand_no, - 'job_no' => $item->job_no, - 'work_equipment_id' => $item->work_equipment_id,
Added / After Commit
+ { + public function index() + { + $demands = 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') + ->pluck('mco_demands.mco_demand_no') + ->toArray(); + + return view('inventory.index', compact('demands')); + } + + { + $demand_no_decrypted = decrypt($demand_no); + + $demands = McoDemand::where('mco_demand_no', $demand_no_decrypted)->paginate(10); + + // Collect keys to match in issue table
Removed / Before Commit
- - use Illuminate\Http\Request; - use Illuminate\Support\Facades\DB; - use App\Models\IssueGroup; - use App\Models\Issue; - - class IssueController extends Controller - { - // Show unique regn_no groups - public function index() - { - // Get all regn_no values already in issue_group - $existingRegnNos = IssueGroup::pluck('regn_no')->toArray(); - - // Select regn_no from issue table excluding those already in issue_group - $regnNos = Issue::select('regn_no') - ->whereNotIn('regn_no', $existingRegnNos) - ->groupBy('regn_no')
Added / After Commit
+ + use Illuminate\Http\Request; + use Illuminate\Support\Facades\DB; + use App\Models\Receive; + use App\Models\Issue; + use App\Models\WorkEquipment; + + class IssueController extends Controller + { + // Show unique regn_no groups + public function index(Request $request) + { + $query = Receive::query(); + + if ($request->filled('job_no')) { + $query->where('job_no', $request->job_no); + } + if ($request->filled('equipment_id')) {
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use Illuminate\Http\Request; + use App\Models\Leave; + + class LeaveApprovalController extends Controller + { + public function index() + { + $leaves = Leave::with(['employee.department', 'employee.designation', 'leaveType']) + ->orderBy('created_at','desc') + ->get(); + + return view('leave.approval', compact('leaves')); + } +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Models\Leave; + use App\Models\LeaveType; + use App\Models\Staff; + use Illuminate\Http\Request; + use Carbon\Carbon; + + class LeaveController extends Controller + { + public function index() { + $userdata = auth()->user(); + + $employee = Staff::where('employee_number',$userdata->employee_number)->first(); + + $assignedLeaveTypes = $employee->designation->leaveTypes ?? [];
Removed / Before Commit
- { - // Base query for demands - $query = McoDemand::with(['workEquipment.Equipments']) - ->select('work_equipment_id', 'job_no', 'demand_no') - ->where('status', 'approved') - ->whereNotIn(DB::raw("(work_equipment_id, job_no, demand_no)"), function($q) { - $q->selectRaw("equipment_id, job_no, demand_no") - ->from('mco_admin_demand_approvals'); - }) - ->groupBy('work_equipment_id', 'job_no', 'demand_no'); - - // Clone for filters - $filterQuery = clone $query; - ->with(['workEquipment.Equipments:id,name']) - ->get(); - - // Apply filters - if ($request->filled('job_no')) {
Added / After Commit
+ { + // Base query for demands + $query = McoDemand::with(['workEquipment.Equipments']) + ->select('work_equipment_id', 'job_no', 'req_no') + ->where('status', 'approved') + ->whereNotIn(DB::raw("(work_equipment_id, job_no, req_no)"), function($q) { + $q->selectRaw("equipment_id, job_no, req_no") + ->from('mco_admin_demand_approvals'); + }) + ->groupBy('work_equipment_id', 'job_no', 'req_no'); + + // Clone for filters + $filterQuery = clone $query; + ->with(['workEquipment.Equipments:id,name']) + ->get(); + + $groups = $filterQuery->clone() + ->select('work_equipment_id')
Removed / Before Commit
- { - public function index(Request $request) - { - $query = McoDemand::select('work_equipment_id', 'job_no', 'demand_no') - ->where('status', 'approved'); - - if ($request->filled('job_no')) { - $query->where('job_no', $request->job_no); - } - - $query->groupBy('work_equipment_id', 'job_no', 'demand_no'); - - $demands = $query->paginate(10); - - $allEquipments = WorkEquipment::whereHas('mcodemands', function ($q) { - $q->where('status', 'approved'); - }) - ->with('Equipments')
Added / After Commit
+ { + public function index(Request $request) + { + $query = McoDemand::select('work_equipment_id', 'job_no', 'req_no') + ->where('status', 'approved'); + + // Apply filters + if ($request->filled('job_no')) { + $query->where('job_no', $request->job_no); + } + + if ($request->filled('equipment_id')) { + $query->where('work_equipment_id', $request->equipment_id); + } + + if ($request->filled('group_id')) { + $query->whereHas('workEquipment', function($q) use ($request) { + $q->where('group_id', $request->group_id);
Removed / Before Commit
- 'group_id' => 'required|exists:groups,id', - 'equipment_id' => 'required|exists:equipments,id', - 'scale_name' => 'required|unique:mco_scales,scale_name', - 'repair_class_id' => 'required|exists:repair_classes,id', - 'scale_ref_auth' => 'required|string', - 'no_of_items' => 'nullable|integer', - ]); - - $groupName = Group::findOrFail($request->group_id)->name; - $equipmentName = Equipment::findOrFail($request->equipment_id)->name; - $repairClassName = RepairClass::findOrFail($request->repair_class_id)->name; - $generatedTableName = Str::slug($groupName . '_' . $equipmentName . '_' . $repairClassName, '_'); - - McoScale::create([
Added / After Commit
+ 'group_id' => 'required|exists:groups,id', + 'equipment_id' => 'required|exists:equipments,id', + 'scale_name' => 'required|unique:mco_scales,scale_name', + 'scale_ref_auth' => 'required|string', + 'no_of_items' => 'nullable|integer', + ]); + + $groupName = Group::findOrFail($request->group_id)->name; + $equipmentName = Equipment::findOrFail($request->equipment_id)->name; + if($request->repair_class_id == 'other') + { + $repairClassName = 'other'; + } + else + { + $repairClassName = RepairClass::findOrFail($request->repair_class_id)->name; + } + $generatedTableName = Str::slug($groupName . '_' . $equipmentName . '_' . $repairClassName, '_');
Removed / Before Commit
- use App\Models\RepairClass; - use App\Models\McoScale; - use App\Models\DemandApproval; - use App\Models\IssueGroup; - use App\Models\Issue; - use App\Models\Demand; - use Illuminate\Support\Facades\DB; - use Illuminate\Support\Str; - use Illuminate\Support\Facades\Schema; - - class ProductionDemandController extends Controller - { - public function index(Request $request) - { - /** - * 📌 1. Job No dropdown — distinct list from WorkOrder - ->whereNotNull('control_no') - ->where('control_no', '!=', '')
Added / After Commit
+ use App\Models\RepairClass; + use App\Models\McoScale; + use App\Models\DemandApproval; + use App\Models\Issue; + use App\Models\Receive; + use App\Models\Demand; + use App\Models\EqptTarget; + use Illuminate\Support\Facades\DB; + use Illuminate\Support\Str; + use Illuminate\Support\Facades\Schema; + + class ProductionDemandController extends Controller + { + public function index (Request $request) + { + if ($request->has('class') && !empty($request->class)) + { + $repairClass = RepairClass::find($request->class);
Removed / Before Commit
Added / After 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; + + class AttendanceImport implements ToModel, 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;
Removed / Before Commit
Added / After Commit
+ <?php + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class Attendance extends Model + { + use HasFactory; + + protected $table = 'attendance'; + + protected $fillable = [ + 'employee_id', + 'date', + 'check_in', + 'check_out', + 'status',
Removed / Before Commit
- protected $fillable = [ - 'work_equipment_id', - 'job_no', - 'item_id', - 'scale_id', - 'demand_no', - 'qty_required', - 'status', - ]; - - { - return $this->belongsTo(McoScale::class, 'scale_id'); - } - - // Custom accessor to get row from the table in mco_scale->table_name - public function getScaleAttribute()
Added / After Commit
+ protected $fillable = [ + 'work_equipment_id', + 'job_no', + 'scale_id', + 'item_id', + 'prod_year', + 'qty_demanded', + 'req_no', + 'registation_no', + 'status', + ]; + + { + return $this->belongsTo(McoScale::class, 'scale_id'); + } + public function equipment() + { + // assuming work_equipment_id points to WorkEquipment model
Removed / Before Commit
- protected $fillable = [ - 'equipment_id', - 'job_no', - 'demand_no', - 'remark', - 'approved_at', - 'approved_by',
Added / After Commit
+ protected $fillable = [ + 'equipment_id', + 'job_no', + 'req_no', + 'remark', + 'approved_at', + 'approved_by',
Removed / Before Commit
- { - protected $fillable = [ - 'work_equipment_id', - 'demand_no', - 'job_no', - 'spares', - 'user_id',
Added / After Commit
+ { + protected $fillable = [ + 'work_equipment_id', + 'mco_demand_no', + 'job_no', + 'spares', + 'user_id',
Removed / Before Commit
- - class Issue extends Model - { - // If your table name is not the plural 'issues', specify it - protected $table = 'issue'; - - // Fillable fields for mass assignment - protected $fillable = [ - 'scale_id', - 'item_id', - 'qty_required', - 'qty_issue', - 'voucher_no', - 'remark', - 'regn_no', - 'job_no', - 'work_equipment_id', - 'demand_no',
Added / After Commit
+ + class Issue extends Model + { + protected $table = 'issue'; + protected $fillable = ['item_id','scale_id','work_equipment_id','job_no','voucher_no', 'req_no','mco_demand_no', 'qty_issued','remark']; + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Factories\HasFactory; + use Illuminate\Database\Eloquent\Model; + + class Leave extends Model + { + use HasFactory; + + protected $fillable = [ + 'employee_id', + 'leave_type_id', + 'subject', + 'from_date', + 'to_date', + 'total_days',
Removed / Before Commit
- ->withTimestamps(); - } - - }
Added / After Commit
+ ->withTimestamps(); + } + + public function designationdetails() { + return $this->belongsToMany(Designation::class, 'designation_leave_type', 'leave_type_id', 'designation_id'); + } + + + }
Removed / Before Commit
- protected $fillable = [ - 'equipment_id', - 'job_no', - 'demand_no', - 'remark', - 'submitted_at', - 'submitted_by',
Added / After Commit
+ protected $fillable = [ + 'equipment_id', + 'job_no', + 'req_no', + 'remark', + 'submitted_at', + 'submitted_by',
Removed / Before Commit
- protected $fillable = [ - 'work_equipment_id', - 'job_no', - 'os_ser_no', - 'table_id', - 'cat_part_no', - 'nomenclature', - 'account_unit', - 'no_off', - 'demand_no', - 'qty_required', - 'status', - ]; - - public function workEquipment() - return $this->belongsTo(McoScale::class, 'scale_id'); - } -
Added / After Commit
+ protected $fillable = [ + 'work_equipment_id', + 'job_no', + 'item_id', + 'scale_id', + 'prod_year', + 'qty_demanded', + 'req_no', + 'mco_demand_no', + 'status', + 'registation_no', + ]; + + public function workEquipment() + return $this->belongsTo(McoScale::class, 'scale_id'); + } + + public function demandApproval()
Removed / Before Commit
- protected $fillable = [ - 'work_equipment_id', - 'job_no', - 'demand_no', - 'remark', - 'submitted_by', - ];
Added / After Commit
+ protected $fillable = [ + 'work_equipment_id', + 'job_no', + 'req_no', + 'remark', + 'submitted_by', + ];
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Models; + + use Illuminate\Database\Eloquent\Model; + + class Receive extends Model + { + // If your table name is not the plural 'issues', specify it + protected $table = 'receiving'; + + // Fillable fields for mass assignment + protected $fillable = [ + 'scale_id', + 'item_id', + 'qty_demanded', + 'qty_received', + 'unique_iv_no',
Removed / Before Commit
- { - return $this->belongsTo(Staff::class, 'report_to'); - } - }
Added / After Commit
+ { + return $this->belongsTo(Staff::class, 'report_to'); + } + + public function leaves() { + return $this->hasMany(Leave::class, 'employee_id'); + } + + + }
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('attendance', function (Blueprint $table) { + $table->id(); + $table->foreignId('employee_id')->constrained('staff')->onDelete('cascade'); + $table->date('date'); + $table->time('check_in')->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('leaves', function (Blueprint $table) { + $table->id(); + $table->foreignId('employee_id')->constrained('staff')->onDelete('cascade'); + $table->foreignId('leave_type_id')->constrained('leave_types')->onDelete('cascade'); + $table->string('subject');
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="container-fluid"> + + <!-- Page Header --> + <div class="d-flex justify-content-between align-items-center mb-3"> + <h4 class="mb-0">Employee Attendance</h4> + <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadModal"> + <i class="fa fa-upload"></i> Upload Attendance + </button> + </div> + + <!-- Filter Section --> + <div class="card mb-3 p-3 shadow-sm"> + <form method="GET" action="{{ route('attendance.index') }}" class="row g-2 align-items-end"> + + <div class="col-md-2">
Removed / Before Commit
- <canvas id="barChart"></canvas> - </div> - </div> - <div class="col-md-6"> - <div class="chart-container"> - <h6 class="mb-3">Payroll Summary (15)</h6> - <canvas id="payrollChart"></canvas> - </div> - </div> - <div class="col-md-4"> - <div class="chart-container"> - <h6 class="mb-3">Leave Type Breakdown (5)</h6>
Added / After Commit
+ <canvas id="barChart"></canvas> + </div> + </div> + <!-- <div class="col-md-6"> + <div class="chart-container"> + <h6 class="mb-3">Payroll Summary (15)</h6> + <canvas id="payrollChart"></canvas> + </div> + </div> --> + <div class="col-md-4"> + <div class="chart-container"> + <h6 class="mb-3">Leave Type Breakdown (5)</h6>
Removed / Before Commit
- <tr> - <td>{{ $equipmentName }}</td> - <td>{{ $demand->job_no }}</td> - <td>{{$demand->demand_no}}</td> - <!-- <a class="open-approval-modal" - data-equipment="{{ $demand->work_equipment_id }}" - data-job="{{ $demand->job_no }}"> - <i class="fa fa-clipboard-check"></i> - </a> --> - <td> - <a href="{{ route('demand.approve.details', ['demand_no' => $demand->demand_no]) }}" - title="Approve Demand"> - <i class="fa fa-clipboard-check"></i> - </a>
Added / After Commit
+ <tr> + <td>{{ $equipmentName }}</td> + <td>{{ $demand->job_no }}</td> + <td>{{$demand->req_no}}</td> + <!-- <a class="open-approval-modal" + data-equipment="{{ $demand->work_equipment_id }}" + data-job="{{ $demand->job_no }}"> + <i class="fa fa-clipboard-check"></i> + </a> --> + <td> + <a href="{{ route('demand.approve.details', ['req_no' => $demand->req_no]) }}" + title="Approve Demand"> + <i class="fa fa-clipboard-check"></i> + </a>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + + @section('content') + <style> + .select2-container { + width: 100% !important; + } + .select2-selection { + min-height: 32px; + } + form{ + margin-bottom: 40px; + } + </style> + <style> + .select2-results__option { + padding-left: 10px;
Removed / Before Commit
- @csrf - <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> - <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> - <input type="hidden" name="demand_no" value="{{ $demands[0]->demand_no }}"> - <button type="submit" class="btn btn-success"> - Approve Demand - </button> - @csrf - <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> - <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> - <input type="hidden" name="demand_no" value="{{ $demands[0]->demand_no }}"> - - <div class="modal-content"> - <div class="modal-header"> - <td>{{ $scale->nomenclature }}</td> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - <td>{{ $demand->qty_required }}</td>
Added / After Commit
+ @csrf + <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> + <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> + <input type="hidden" name="req_no" value="{{ $demands[0]->req_no }}"> + <button type="submit" class="btn btn-success"> + Approve Demand + </button> + @csrf + <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> + <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> + <input type="hidden" name="req_no" value="{{ $demands[0]->req_no }}"> + + <div class="modal-content"> + <div class="modal-header"> + <td>{{ $scale->nomenclature }}</td> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td> + <td>{{ $demand->qty_demanded }}</td>
Removed / Before Commit
- <td>{{ $scale->nomenclature }}</td> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - <td>{{ $spare->qty_required }}</td> - <td>{{ $spare->qty_issue }}</td> - <td>{{ $spare->voucher_no }}</td> - <td>{{ $spare->remark }}</td>
Added / After Commit
+ <td>{{ $scale->nomenclature }}</td> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td> + <td>{{ $spare->qty_demanded }}</td> + <td>{{ $spare->qty_issue }}</td> + <td>{{ $spare->voucher_no }}</td> + <td>{{ $spare->remark }}</td>
Removed / Before Commit
- <h4><b>Group Requisition</b></h4> - </div> - <div class="col-md-7"> - <form method="GET" action="{{ route('demand.index') }}" class="mb-1"> - <div class="row align-items-end"> - {{-- Control Number --}} - <div class="col-md-4"></div> - <div class="col-md-4"> - <label for="control_number" class="form-label">Job Number</label> - <select name="job_no" class="form-select select2" onchange="this.form.submit()"> - <option value="">-- Show All --</option> - @foreach($job_nos as $id => $job) - <option value="{{ $id }}" {{ request('job_no') == $id ? 'selected' : '' }}> - {{ $job }} - </option> - @endforeach - </select> - </div>
Added / After Commit
+ <h4><b>Group Requisition</b></h4> + </div> + <div class="col-md-7"> + </div> + </div> + </div> + <hr> + <div class="card-body"> + <div class="container-fluid"> + <!-- 📊 Table --> + <div class="table-responsive"> + <form method="GET" action="{{ route('demand.index') }}" class="mb-1"> + <div class="col-md-4"> + <label for="control_number" class="form-label">Choose Class</label> + <select name="class" class="form-select select2" onchange="this.form.submit()"> + <option value="">-- Show All --</option> + @foreach($classes as $id => $class) + @if($class->name == 'CL A')
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <style> + .select2-container { width: 100% !important; } + .select2-selection { min-height: 32px; } + .no-jobs { text-align: center; padding: 20px; font-style: italic; color: #888; } + </style> + @if ($errors->any()) + <div class="alert alert-danger"> + <ul class="mb-0"> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul> + </div> + @endif + <div class="card">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="container"> + <h4>Preview Requisition</h4> + + @if($drafts->count()) + <form method="POST" action="{{ route('demand.submit', encrypt(json_encode($equipmentIds))) }}"> + @csrf + @foreach($drafts as $equipmentId => $equipmentDrafts) + @php + $equipment = $equipmentDrafts->first()->equipment; + @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 ?? '-' }} |
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + @section('content') + <style> + .select2-container { + width: 100% !important; + } + .select2-selection { + min-height: 32px; + } + form{ + margin-bottom: 40px; + } + </style> + <style> + .select2-results__option { + padding-left: 10px; + display: flex; + align-items: center;
Removed / Before Commit
- <td>{{ $scale->nomenclature }}</td> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - <td>{{ $demand->qty_required }}</td> - </tr> - @endif - @endforeach
Added / After Commit
+ <td>{{ $scale->nomenclature }}</td> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td> + <td>{{ $demand->qty_demanded }}</td> + </tr> + @endif + @endforeach
Removed / Before Commit
- @endif - @endforeach - <th>Auth % </th> - <th>Item Dmd For Job</th> - <th>Item Iss Prev P.Y</th> - <th>Current Qty Dmd </th> - <!-- <th>Qty Bal as per Tgt</th> --> - </tr> - $spareArray = (array) $spare; - $itemid = $spareArray['id'] ?? ''; - $isChecked = isset($draftPartNos[$itemid]); - $qtyRequired = $draftPartNos[$itemid] ?? ($spareArray['no_off'] ?? 1); - @endphp - - <tr> - {{$percentage}} - </td> - @php
Added / After Commit
+ @endif + @endforeach + <th>Auth % </th> + <th>Auth For Target </th> + <th>Item Dmd For Current Job</th> + <th>Item DMD For Current Production Year</th> + <th>Current Qty Dmd </th> + <!-- <th>Qty Bal as per Tgt</th> --> + </tr> + $spareArray = (array) $spare; + $itemid = $spareArray['id'] ?? ''; + $isChecked = isset($draftPartNos[$itemid]); + $qtydemand= $draftPartNos[$itemid] ?? ($spareArray['no_off'] ?? 1); + @endphp + + <tr> + {{$percentage}} + </td>
Removed / Before Commit
- - <div class="top-meta"> - <div> - <!-- Radar: <strong>{{ $demand->workEquipment->radar_no ?? '-' }}</strong><br> --> - Equipment: <strong>{{ $demand->workEquipment->Equipments->name ?? '-' }}</strong><br> - </div> - <div> - Date: <strong>{{ \Carbon\Carbon::parse($demand->created_at)->format('d M Y') }}</strong><br> - Target: <strong>{{ $demand->workEquipment->target ?? '-' }}</strong> - </div> - </div> - - <th>A/U</th> - <th>No Off</th> - <th>Qty</th> - <th>Job No & Date</th> - <th>Remark</th> - </tr>
Added / After Commit
+ + <div class="top-meta"> + <div> + Job No: <strong>{{ $demandItems[0]->job_no ?? '' }} dt {{ \Carbon\Carbon::parse($demandItems[0]->job_date)->format('d/m/Y') }}</strong><br> + Equipment: <strong>{{ $demand->workEquipment->Equipments->name ?? '-' }}</strong><br> + </div> + @php + $targets = \App\Models\EqptTarget::where('main_eqpt',$demand->workEquipment->Equipments->name)->first(); + @endphp + <div> + Date: <strong>{{ \Carbon\Carbon::parse($demand->created_at)->format('d M Y') }}</strong><br> + Target: <strong>{{ $targets->target ?? '-' }}</strong> + </div> + </div> + + <th>A/U</th> + <th>No Off</th> + <th>Qty</th>
Removed / Before Commit
- - {{-- Common Regn No --}} - <div class="mb-3"> - <label for="regn_no" class="form-label">Regn No</label> - <input type="text" class="form-control" name="regn_no" id="regn_no" required> - </div> - - <table class="table table-bordered"> - <th>COS SEC</th> - <th>Part No / Nomenclature</th> - <th>Account Unit</th> - <th>Qty Required</th> - <th>Already Qty Issue</th> - <th>Qty Issue</th> - <th>Voucher No</th> - <th>Remarks</th> - </tr> - </thead>
Added / After Commit
+ + {{-- Common Regn No --}} + <div class="mb-3"> + <label for="voucher_no" class="form-label">Voucher No</label> + <input type="text" class="form-control" name="voucher_no" id="voucher_no" required> + </div> + + <table class="table table-bordered"> + <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> + <th>Unique IV No</th> + <th>Remarks</th> + </tr> + </thead>
Removed / Before Commit
- <div class="card-header py-3"> - <div class="row align-items-center"> - <div class="col-md-5"> - <h4><b>Inventory</b></h4> - - </div> - <div class="col-md-7"> - @section('scripts') - <script> - $('#demandSelect').change(function () { - let demand_no = $(this).val(); - if (demand_no) { - $('#viewCartBtn').attr('href', "{{ route('inventory.cart') }}" + "?demand_no=" + demand_no); - $.get("{{ url('inventory/get-demand-details') }}/" + demand_no, function (data) { - $('#demandDetails').html(data); - }); - } else { - if (this.checked) {
Added / After 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"> + @section('scripts') + <script> + $('#demandSelect').change(function () { + let req_no = $(this).val(); + if (req_no) { + $('#viewCartBtn').attr('href', "{{ route('inventory.cart') }}" + "?req_no=" + req_no); + $.get("{{ url('inventory/get-demand-details') }}/" + req_no, function (data) { + $('#demandDetails').html(data); + }); + } else { + if (this.checked) {
Removed / Before Commit
- <table class="table"> - <thead> - <tr> - <th>Ser No</th> - <th>Cos Sec</th> - <th>Cat Part No</th> - <th>Nomenclature</th> - <th>A/U</th> - <th>No Off</th> - <th>Qty Demanded</th> - <th>Qty Issued</th> - <th>Select</th> - </tr> - </thead> - <tbody> - @foreach($demands as $index => $item) - @php - $key = $item->demand_no.'_'.$item->job_no.'_'.$item->work_equipment_id;
Added / After Commit
+ <table class="table"> + <thead> + <tr> + <th>Select</th> + <th>Ser No</th> + <th>Cos Sec</th> + <th>Cat Part No</th> + <th>Nomenclature</th> + <th>A/U</th> + <th>No Off</th> + <th>Qty Demanded</th> + <th>Qty Received</th> + + </tr> + </thead> + <tbody> + @foreach($demands as $index => $item) + @php
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</h3> - </div> - </div> - </div> - <hr> - <table class="table table-bordered table-striped" id="example"> - <thead> - <tr> - <th>Regn No</th> - <th>Action</th> - </tr> - </thead> - <tbody> - @foreach($regnNos as $regn) - <tr>
Added / After 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-control" onchange="$('#filterForm').submit()"> + <option value="">All Job Nos</option> + @foreach($jobNos as $jobNo) + <option value="{{ $jobNo }}" {{ request('job_no') == $jobNo ? 'selected' : '' }}> + {{ $jobNo }} + </option> + @endforeach
Removed / Before Commit
- <div class="col-md-5"> - <h4><b>Issue Requisition</b></h4> - </div> - <div class="col-md-7"> - {{-- Filter Form --}} - - <div class="row align-items-end"> - <div class="col-md-4 text-end"></div> - <div class="col-md-4 text-end"></div> - <div class="col-md-4 text-end"> - <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#issueModal"> - Issue - </button> - </div> - </div> - </div> - </div> - </div>
Added / After Commit
+ <div class="col-md-5"> + <h4><b>Issue Requisition</b></h4> + </div> + </div> + </div> + + <hr> + <div class="card-header"> + @php + $equipment = \App\Models\WorkEquipment::with(['Equipments', 'group', 'RepairClass']) + ->find($spares[0]->work_equipment_id); + + @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>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + @section('content') + <div class="container-fluid"> + <h4 class="mb-3">Leave Approval</h4> + + <div class="card"> + <div class="card-body"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th>Employee Code</th> + <th>Name</th> + <th>Department</th> + <th>Designation</th> + <th>Leave Type</th> + <th>From</th> + <th>To</th> + <th>Total Days</th>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="container-fluid"> + <div class="d-flex justify-content-between align-items-center mb-3"> + <h4 class="mb-0"><i class="fa fa-plus"></i> Apply Leave</h4> + <a href="{{ route('leave.index') }}" class="btn btn-secondary"><i class="fa fa-arrow-left"></i> Back</a> + </div> + + <div class="card"> + <div class="card-body"> + @if ($errors->any()) + <div class="alert alert-danger"> + <ul class="mb-0"> + @foreach ($errors->all() as $error) + <li>{{ $error }}</li> + @endforeach + </ul>
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + + @section('content') + <div class="container-fluid"> + <h4 class="mb-3"><i class="fa fa-edit"></i> Edit Leave Request</h4> + + <div class="card"> + <div class="card-body"> + <form action="{{ route('leave.update', $leave->id) }}" method="POST"> + @csrf + @method('PUT') + + <div class="mb-3"> + <label for="subject" class="form-label">Subject</label> + <input type="text" name="subject" id="subject" class="form-control" value="{{ old('subject', $leave->subject) }}" required> + </div> + + <div class="mb-3">
Removed / Before Commit
Added / After Commit
+ @extends('layouts.app') + @section('content') + <div class="container-fluid"> + <div class="d-flex justify-content-between align-items-center mb-3"> + <h4 class="mb-0">My Leave</h4> + <a href="{{ route('leave.create') }}" class="btn btn-success"><i class="fa fa-plus"></i> Apply Leave</a> + </div> + + <!-- Leave Balance --> + <div class="row mb-3"> + @foreach($leaveBalance as $balance) + <div class="col-md-3"> + <div class="card p-3 text-center shadow-sm"> + <h6>{{ $balance['name'] }}</h6> + <h4>{{ $balance['balance'] }}</h4> + <small>Taken: {{ $balance['taken'] }} / Total: {{ $balance['total'] }}</small> + </div> + </div>
Removed / Before Commit
- - <div class="ms-auto"> - @if($alreadySubmitted) - <a href="{{ route('mco-admin.approvals.print', ['demand_no' => Crypt::encrypt($demands[0]->demand_no)]) }}" - target="_blank" - class="btn btn-success mt-3"> - Print - </a> - - @else - <button class="btn btn-success" data-bs-toggle="modal" data-bs-target="#submitModal"> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - @php - $total_qty_required = \App\Models\McoDemand::where('item_id', $demand->item_id)->where('job_no', $demand->job_no) - ->whereYear('created_at', now()->year) - ->sum('qty_required'); - @endphp
Added / After Commit
+ + <div class="ms-auto"> + @if($alreadySubmitted) + <!-- <a href="{{ route('mco-admin.approvals.print', ['req_no' => Crypt::encrypt($demands[0]->req_no)]) }}" + target="_blank" + class="btn btn-success mt-3"> + Print + </a> --> + + @else + <button class="btn btn-success" data-bs-toggle="modal" data-bs-target="#submitModal"> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td> + @php + $total_qty_demanded = \App\Models\McoDemand::where('item_id', $demand->item_id)->where('job_no', $demand->job_no) + ->whereYear('created_at', now()->year) + ->sum('qty_demanded'); + @endphp
Removed / Before Commit
- <form method="GET" action="{{ route('mco-admin.approvals.index') }}" class="mb-1"> - <div class="row align-items-end"> - {{-- Control Number --}} - <div class="col-md-4"></div> - <div class="col-md-4"> - <label for="control_number" class="form-label">Job Number</label> - <select name="job_no" class="form-select select2" onchange="this.form.submit()"> - @endforeach - </select> - </div> - - </div> - </form> - <tr> - <th>Equipment</th> - <th>Job No</th> - <th>Demand No</th> - <th>Action</th>
Added / After Commit
+ <form method="GET" action="{{ route('mco-admin.approvals.index') }}" class="mb-1"> + <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="this.form.submit()"> + @endforeach + </select> + </div> + <div class="col-md-4"> + <label for="equips" class="form-label">Group</label> + <select name="group_id" class="form-select select2" onchange="this.form.submit()"> + <option value="">-- Show All --</option> + @foreach($groups as $group) + <option value="{{ $group->id }}" {{ request('group_id') == $group->id ? 'selected' : '' }}> + {{ $group->name }} + </option> + @endforeach
Removed / Before Commit
- </thead> - <tbody> - @endif - <tr> - <td>{{ $item->os_ser_no }}</td> - <td>{{ $item->cos_sec }}</td> - <td>{{ $item->cat_part_no }}</td> - <td>{{ $item->nomenclature }}</td> - <td>{{ $item->no_off }}</td> - <td>{{ $item->account_unit }}</td> - <td>{{ $item->qty_required }}</td> - <td></td> - <td>{{ $item->remarks ?? '' }}</td> - </tr> - @php $rowCount++; @endphp - @endforeach - </tbody> - </table>
Added / After Commit
+ </thead> + <tbody> + @endif + @php + $scale = $item->scale; // This is from getScaleAttribute() + @endphp + @if($scale) + <tr> + <td>{{ $scale->os_ser_no }}</td> + <td>{{ $scale->cos_sec }}</td> + <td>{{ $scale->cat_part_no }}</td> + <td>{{ $scale->nomenclature }}</td> + <td>{{ $scale->no_off }}</td> + <td>{{ $scale->account_unit }}</td> + <td>{{ $item->qty_required }}</td> + <td></td> + <td>{{ $item->remarks ?? '' }}</td> + </tr>
Removed / Before Commit
- $equipment = \App\Models\WorkEquipment::with(['Equipments', 'group', 'RepairClass']) - ->find($demands[0]->work_equipment_id); - - $isSubmitted = \App\Models\McoSubmission::where('demand_no', $demands[0]->demand_no) - ->exists(); - @endphp - - @csrf - <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> - <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> - <input type="hidden" name="demand_no" value="{{ $demands[0]->demand_no }}"> - - <div class="modal-content"> - <div class="modal-header"> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - @php - $total_qty_required = \App\Models\McoDemand::where('item_id', $demand->item_id)->where('job_no', $demand->job_no)
Added / After Commit
+ $equipment = \App\Models\WorkEquipment::with(['Equipments', 'group', 'RepairClass']) + ->find($demands[0]->work_equipment_id); + + $isSubmitted = \App\Models\McoSubmission::where('req_no', $demands[0]->req_no) + ->exists(); + @endphp + + @csrf + <input type="hidden" name="equipment_id" value="{{ $demands[0]->work_equipment_id }}"> + <input type="hidden" name="job_no" value="{{ $demands[0]->job_no }}"> + <input type="hidden" name="req_no" value="{{ $demands[0]->req_no }}"> + + <div class="modal-content"> + <div class="modal-header"> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td> + @php + $total_qty_demanded = \App\Models\McoDemand::where('item_id', $demand->item_id)->where('job_no', $demand->job_no)
Removed / Before Commit
- <form method="GET" class="mb-1" id="filterForm"> - <div class="row align-items-end"> - {{-- Control Number --}} - <div class="col-md-4"></div> - <div class="col-md-4"> - <label for="control_number" class="form-label">Job Number</label> - <select name="job_no" class="form-control auto-submit"> - @endforeach - </select> - </div> - </div> - </form> - </div> - <tr> - <th>Equipment Name</th> - <th>Job No</th> - <th>Req No</th> - <th>Action</th>
Added / After Commit
+ <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-control auto-submit"> + @endforeach + </select> + </div> + <div class="col-md-4"> + <label for="equips" class="form-label">Group</label> + <select name="group_id" class="form-select auto-submit"> + <option value="">-- Show All --</option> + @foreach($allGroups as $id => $name) + <option value="{{ $id }}" {{ request('group_id') == $id ? 'selected' : '' }}> + {{ $name }} + </option> + @endforeach
Removed / Before Commit
- <select name="repair_class_id" class="form-control" required> - <option value="">-- Select Class --</option> - @foreach($repairClasses as $rc) - <option value="{{ $rc->id }}">{{ $rc->name }}</option> - @endforeach - </select> - </div>
Added / After Commit
+ <select name="repair_class_id" class="form-control" required> + <option value="">-- Select Class --</option> + @foreach($repairClasses as $rc) + @if($rc->name == 'CL A') + <option value="{{ $rc->id }}">{{ $rc->name }}</option> + @endif + @endforeach + <option value="other">Other</option> + + </select> + </div>
Removed / Before Commit
- <td>{{ $loop->iteration }}</td> - <td>{{ $scale->group?->name }}</td> - <td>{{ $scale->scale_name }}</td> - <td>{{ $scale->repairClass?->name }}</td> - <td>{{ $scale->equipment?->name }}</td> - <!-- <td>{{ $scale->table_name }}</td> --> - <td>{{ $scale->no_of_items }}</td>
Added / After Commit
+ <td>{{ $loop->iteration }}</td> + <td>{{ $scale->group?->name }}</td> + <td>{{ $scale->scale_name }}</td> + <td>{{ $scale->repairClass?->name ?? 'other' }}</td> + <td>{{ $scale->equipment?->name }}</td> + <!-- <td>{{ $scale->table_name }}</td> --> + <td>{{ $scale->no_of_items }}</td>
Removed / Before Commit
- <div class="card"> - <div class="card-header py-3 d-flex justify-content-between align-items-center"> - <h4 class="mb-0"><b>Requisition Data Detail</b></h4> - <a href="{{ route('demand.previous.details', encrypt($demand_no)) }}" class="btn btn-secondary btn-sm"> - <i class="fa fa-arrow-left"></i> Back - </a> - </div> - <th>A/U</th> - <th>No Off</th> - <th>Qty Demaned</th> - </tr> - </thead> - <tbody> - <td>{{ $scale->nomenclature }}</td> - <td>{{ $scale->account_unit }}</td> - <td>{{ $scale->no_off }}</td> - <td>{{ $spare->qty_required }}</td> - </tr>
Added / After Commit
+ <div class="card"> + <div class="card-header py-3 d-flex justify-content-between align-items-center"> + <h4 class="mb-0"><b>Requisition Data Detail</b></h4> + <a href="{{ route('demand.previous.details', encrypt($req_no)) }}" class="btn btn-secondary btn-sm"> + <i class="fa fa-arrow-left"></i> Back + </a> + </div> + <th>A/U</th> + <th>No Off</th> + <th>Qty Demaned</th> + <th>Qty Approved</th> + <th>Qty Received</th> + </tr> + </thead> + <tbody> + <td>{{ $scale->nomenclature }}</td> + <td>{{ $scale->account_unit }}</td> + <td>{{ $scale->no_off }}</td>
Removed / Before Commit
- <tr> - <td>{{ $row->row_number }}</td> - <td> - {{ $row->demand_no }} - </td> - <td>{{ $row->spare_demanded_range ?? 0 }}</td> - <td>{{ $row->spare_demanded_depth ?? 0 }}</td> - <td>{{ $row->spare_received_range ?? 0 }}</td> - <td>{{ $row->spare_received_depth ?? 0 }}</td> - <td> - <a href="{{ route('previous.demands.details', encrypt($row->demand_no)) }}" title="View Details"> - <i class="fa fa-eye" style="color: #008cff;background:white"></i> - </a> - </td> - </tr> - @endforeach
Added / After Commit
+ <tr> + <td>{{ $row->row_number }}</td> + <td> + {{ $row->req_no }} + </td> + <td>{{ $row->spare_demanded_range ?? 0 }}</td> + <td>{{ $row->spare_demanded_depth ?? 0 }}</td> + <td>{{ $row->spare_received_range ?? 0 }}</td> + <td>{{ $row->spare_received_depth ?? 0 }}</td> + <td> + <a href="{{ route('previous.demands.details', encrypt($row->req_no)) }}" title="View Details"> + <i class="fa fa-eye" style="color: #008cff;background:white"></i> + </a> + @if($row->status == 'approved') + <a href="{{ route('demand.approve.print', ['id' => $row->id]) }}" target="_blank" title="print"> + <i class="fa fa-print" style="color: #008cff;background:white"></i> + </a> + @endif
Removed / Before Commit
- use App\Http\Controllers\DesignationController; - use App\Http\Controllers\ShiftController; - use App\Http\Controllers\HolidayController; - - - /* - Route::get('/{scale}/export', [McoScaleController::class, 'export'])->name('export'); - Route::post('/{scale}/import', [McoScaleController::class, 'import'])->name('import'); - Route::get('/{scale}/export-data', [McoScaleController::class, 'exportData'])->name('exportdata'); - - - }); - Route::resource('staff', \App\Http\Controllers\Admin\StaffController::class); - }); - - - Route::get('/eqpt-targets', [EqptTargetController::class, 'index'])->name('eqpt-targets.index'); - Route::post('/eqpt-targets', [EqptTargetController::class, 'store'])->name('eqpt-targets.store');
Added / After Commit
+ use App\Http\Controllers\DesignationController; + use App\Http\Controllers\ShiftController; + use App\Http\Controllers\HolidayController; + use App\Http\Controllers\AttendanceController; + use App\Http\Controllers\LeaveController; + use App\Http\Controllers\LeaveApprovalController; + + + /* + Route::get('/{scale}/export', [McoScaleController::class, 'export'])->name('export'); + Route::post('/{scale}/import', [McoScaleController::class, 'import'])->name('import'); + Route::get('/{scale}/export-data', [McoScaleController::class, 'exportData'])->name('exportdata'); + Route::get('/{scale}/data', [McoScaleController::class, 'showData'])->name('data'); + Route::post('/{scale}/data/{id}/update', [McoScaleController::class, 'updateData'])->name('data.update'); + + + }); + Route::resource('staff', \App\Http\Controllers\Admin\StaffController::class);