<?php
require_once __DIR__ . '/../../../Models/QuotationRequest.php';

class QuotationRequestController {
    public function index() {
        $qrModel = new QuotationRequest();
        
        $page = isset($_GET['p']) ? (int)$_GET['p'] : 1;
        $perPage = 10;
        
        $result = $qrModel->paginateWithDetails($page, $perPage);
        $requests = $result['data'];
        
        $total = $result['total'];
        $totalPages = ceil($total / $perPage);

        require __DIR__ . '/../../../../views/admin/quotation_requests/index.php';
    }
}
