From dac2090e5c4b477a83bf8bf377e92c2d2bc4fb2c Mon Sep 17 00:00:00 2001 From: Sallu9007 Date: Sun, 26 Jan 2025 20:56:11 +0530 Subject: [PATCH] Feat: Yajra tables for response view --- app/Http/Controllers/AdminController.php | 25 +- composer.json | 3 +- composer.lock | 1066 ++++++++++++++++++++- resources/views/admin/responses.blade.php | 67 ++ resources/views/layouts/app.blade.php | 1 + routes/web.php | 1 + 6 files changed, 1156 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 2b5916d..e1b7cde 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -2,7 +2,11 @@ namespace App\Http\Controllers; +namespace App\Http\Controllers; + use Illuminate\Http\Request; +use Yajra\DataTables\Facades\DataTables; +use App\Models\Response; class AdminController extends Controller { @@ -15,11 +19,22 @@ class AdminController extends Controller // View responses submitted by users public function viewResponses() { - // Logic to fetch responses from the database - // For example, you could fetch all responses from a 'responses' table - // $responses = Response::all(); // Replace with your actual model - - // return view('admin.responses', compact('responses')); return view('admin.responses'); } + + public function getResponses() + { + $responses = Response::with('user'); + + return DataTables::of($responses) + ->addColumn('user_name', function ($response) { + return $response->user->name ?? 'Unknown'; + }) + ->addColumn('action', function ($response) { + $viewButton = $response->proof ? 'View' : 'No Proof'; + return $viewButton; + }) + ->rawColumns(['action']) + ->make(true); + } } diff --git a/composer.json b/composer.json index 959aaa5..57d337d 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "php": "^8.2", "laravel/breeze": "^2.3", "laravel/framework": "^11.31", - "laravel/tinker": "^2.9" + "laravel/tinker": "^2.9", + "yajra/laravel-datatables": "11.0" }, "require-dev": { "fakerphp/faker": "^1.23", diff --git a/composer.lock b/composer.lock index d19fd9d..9277d99 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ead120435624fb415f231e77a9059d41", + "content-hash": "5c2aeb8cde0a9270ef37bc3504b73ad3", "packages": [ { "name": "brick/math", @@ -1837,6 +1837,76 @@ }, "time": "2024-08-09T21:24:39+00:00" }, + { + "name": "league/fractal", + "version": "0.20.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/fractal.git", + "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/fractal/zipball/8b9d39b67624db9195c06f9c1ffd0355151eaf62", + "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "doctrine/orm": "^2.5", + "illuminate/contracts": "~5.0", + "mockery/mockery": "^1.3", + "pagerfanta/pagerfanta": "~1.0.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "~3.4", + "vimeo/psalm": "^4.22", + "zendframework/zend-paginator": "~2.3" + }, + "suggest": { + "illuminate/pagination": "The Illuminate Pagination component.", + "pagerfanta/pagerfanta": "Pagerfanta Paginator", + "zendframework/zend-paginator": "Zend Framework Paginator" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.20.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Fractal\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Phil Sturgeon", + "email": "me@philsturgeon.uk", + "homepage": "http://philsturgeon.uk/", + "role": "Developer" + } + ], + "description": "Handle the output of complex data structures ready for API output.", + "homepage": "http://fractal.thephpleague.com/", + "keywords": [ + "api", + "json", + "league", + "rest" + ], + "support": { + "issues": "https://github.com/thephpleague/fractal/issues", + "source": "https://github.com/thephpleague/fractal/tree/0.20.1" + }, + "time": "2022-04-11T12:47:17+00:00" + }, { "name": "league/mime-type-detection", "version": "1.16.0", @@ -2067,6 +2137,266 @@ ], "time": "2024-12-08T08:18:47+00:00" }, + { + "name": "livewire/livewire", + "version": "v3.5.18", + "source": { + "type": "git", + "url": "https://github.com/livewire/livewire.git", + "reference": "62f0fa6b340a467c25baa590a567d9a134b357da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/livewire/livewire/zipball/62f0fa6b340a467c25baa590a567d9a134b357da", + "reference": "62f0fa6b340a467c25baa590a567d9a134b357da", + "shasum": "" + }, + "require": { + "illuminate/database": "^10.0|^11.0", + "illuminate/routing": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/validation": "^10.0|^11.0", + "laravel/prompts": "^0.1.24|^0.2|^0.3", + "league/mime-type-detection": "^1.9", + "php": "^8.1", + "symfony/console": "^6.0|^7.0", + "symfony/http-kernel": "^6.2|^7.0" + }, + "require-dev": { + "calebporzio/sushi": "^2.1", + "laravel/framework": "^10.15.0|^11.0", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^8.21.0|^9.0", + "orchestra/testbench-dusk": "^8.24|^9.1", + "phpunit/phpunit": "^10.4", + "psy/psysh": "^0.11.22|^0.12" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Livewire": "Livewire\\Livewire" + }, + "providers": [ + "Livewire\\LivewireServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A front-end framework for Laravel.", + "support": { + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v3.5.18" + }, + "funding": [ + { + "url": "https://github.com/livewire", + "type": "github" + } + ], + "time": "2024-12-23T15:05:02+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/6187e9cc4493da94b9b63eb2315821552015fca9", + "reference": "6187e9cc4493da94b9b63eb2315821552015fca9", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + } + ], + "time": "2024-10-10T12:33:01+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, { "name": "monolog/monolog", "version": "3.8.1", @@ -2569,6 +2899,203 @@ ], "time": "2024-11-21T10:39:51+00:00" }, + { + "name": "openspout/openspout", + "version": "v4.28.4", + "source": { + "type": "git", + "url": "https://github.com/openspout/openspout.git", + "reference": "68d58235c7c1164b3d231b798975b9b0b2b79b15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openspout/openspout/zipball/68d58235c7c1164b3d231b798975b9b0b2b79b15", + "reference": "68d58235c7c1164b3d231b798975b9b0b2b79b15", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-filter": "*", + "ext-libxml": "*", + "ext-xmlreader": "*", + "ext-zip": "*", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ext-zlib": "*", + "friendsofphp/php-cs-fixer": "^3.66.1", + "infection/infection": "^0.29.10", + "phpbench/phpbench": "^1.3.1", + "phpstan/phpstan": "^2.1.1", + "phpstan/phpstan-phpunit": "^2.0.3", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^11.5.2" + }, + "suggest": { + "ext-iconv": "To handle non UTF-8 CSV files (if \"php-mbstring\" is not already installed or is too limited)", + "ext-mbstring": "To handle non UTF-8 CSV files (if \"iconv\" is not already installed)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "OpenSpout\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrien Loison", + "email": "adrien@box.com" + } + ], + "description": "PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way", + "homepage": "https://github.com/openspout/openspout", + "keywords": [ + "OOXML", + "csv", + "excel", + "memory", + "odf", + "ods", + "office", + "open", + "php", + "read", + "scale", + "spreadsheet", + "stream", + "write", + "xlsx" + ], + "support": { + "issues": "https://github.com/openspout/openspout/issues", + "source": "https://github.com/openspout/openspout/tree/v4.28.4" + }, + "funding": [ + { + "url": "https://paypal.me/filippotessarotto", + "type": "custom" + }, + { + "url": "https://github.com/Slamdunk", + "type": "github" + } + ], + "time": "2025-01-07T11:48:34+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "2.3.6", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "098b848ee6688cb9a252d9ce97889defc517ee88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/098b848ee6688cb9a252d9ce97889defc517ee88", + "reference": "098b848ee6688cb9a252d9ce97889defc517ee88", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^8.1", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^2.0 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.6 || ^10.5", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/2.3.6" + }, + "time": "2025-01-12T03:22:26+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.3", @@ -5858,6 +6385,543 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" + }, + { + "name": "yajra/laravel-datatables", + "version": "v11.0.0", + "source": { + "type": "git", + "url": "https://github.com/yajra/datatables.git", + "reference": "5ab0fccf229161df95e435582ed123efa8aa3f50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/datatables/zipball/5ab0fccf229161df95e435582ed123efa8aa3f50", + "reference": "5ab0fccf229161df95e435582ed123efa8aa3f50", + "shasum": "" + }, + "require": { + "php": "^8.2", + "yajra/laravel-datatables-buttons": "^11", + "yajra/laravel-datatables-editor": "^11", + "yajra/laravel-datatables-export": "^11", + "yajra/laravel-datatables-fractal": "^11", + "yajra/laravel-datatables-html": "^11", + "yajra/laravel-datatables-oracle": "^11" + }, + "require-dev": { + "larastan/larastan": "^2.9.1", + "laravel/pint": "^1.14", + "orchestra/testbench": "^9", + "rector/rector": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables Complete Package.", + "keywords": [ + "datatables", + "jquery", + "laravel" + ], + "support": { + "issues": "https://github.com/yajra/datatables/issues", + "source": "https://github.com/yajra/datatables/tree/v11.0.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/yajra", + "type": "github" + } + ], + "time": "2024-03-16T04:34:31+00:00" + }, + { + "name": "yajra/laravel-datatables-buttons", + "version": "v11.2.2", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables-buttons.git", + "reference": "78c84636f4bb56efb149f694b67784ed651cf0ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables-buttons/zipball/78c84636f4bb56efb149f694b67784ed651cf0ad", + "reference": "78c84636f4bb56efb149f694b67784ed651cf0ad", + "shasum": "" + }, + "require": { + "illuminate/console": "^11", + "php": "^8.2", + "yajra/laravel-datatables-html": "^11", + "yajra/laravel-datatables-oracle": "^11" + }, + "require-dev": { + "larastan/larastan": "^2.9.2", + "laravel/pint": "^1.14", + "maatwebsite/excel": "^3.1.55", + "orchestra/testbench": "^9", + "rap2hpoutre/fast-excel": "^5.4", + "rector/rector": "^1.0.2" + }, + "suggest": { + "barryvdh/laravel-snappy": "Allows exporting of dataTable to PDF using the print view.", + "dompdf/dompdf": "Allows exporting of dataTable to PDF using the DomPDF.", + "maatwebsite/excel": "Exporting of dataTables (excel, csv and PDF) using maatwebsite package.", + "rap2hpoutre/fast-excel": "Faster exporting of dataTables using fast-excel package.", + "yajra/laravel-datatables-export": "Exporting of dataTables (excel, csv and PDF) via livewire and queue worker." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yajra\\DataTables\\ButtonsServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.0-dev" + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables Buttons Plugin.", + "keywords": [ + "buttons", + "datatables", + "jquery", + "laravel" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables-buttons/issues", + "source": "https://github.com/yajra/laravel-datatables-buttons/tree/v11.2.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/yajra", + "type": "github" + } + ], + "time": "2025-01-18T11:12:52+00:00" + }, + { + "name": "yajra/laravel-datatables-editor", + "version": "v11.0.2", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables-editor.git", + "reference": "f49f2bcfab26d4233d04280aab7787418d9d6334" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables-editor/zipball/f49f2bcfab26d4233d04280aab7787418d9d6334", + "reference": "f49f2bcfab26d4233d04280aab7787418d9d6334", + "shasum": "" + }, + "require": { + "illuminate/console": "^11", + "illuminate/database": "^11", + "illuminate/http": "^11", + "illuminate/validation": "^11", + "php": "^8.2" + }, + "require-dev": { + "larastan/larastan": "^2.9.1", + "laravel/pint": "^1.14", + "orchestra/testbench": "^9.0", + "rector/rector": "^1.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yajra\\DataTables\\EditorServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables Editor plugin for Laravel 5.5+.", + "keywords": [ + "JS", + "datatables", + "editor", + "html", + "jquery", + "laravel" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables-editor/issues", + "source": "https://github.com/yajra/laravel-datatables-editor/tree/v11.0.2" + }, + "funding": [ + { + "url": "https://www.paypal.me/yajra", + "type": "custom" + }, + { + "url": "https://github.com/yajra", + "type": "github" + }, + { + "url": "https://www.patreon.com/yajra", + "type": "patreon" + } + ], + "time": "2024-09-20T02:44:39+00:00" + }, + { + "name": "yajra/laravel-datatables-export", + "version": "v11.3.3", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables-export.git", + "reference": "399bff1ae8ad6e872a14a36d86d9bddeb026dc49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables-export/zipball/399bff1ae8ad6e872a14a36d86d9bddeb026dc49", + "reference": "399bff1ae8ad6e872a14a36d86d9bddeb026dc49", + "shasum": "" + }, + "require": { + "ext-json": "*", + "livewire/livewire": "^2.11.2|^3.5.6", + "openspout/openspout": "^4.24.5", + "php": "^8.2", + "phpoffice/phpspreadsheet": "^2.3.5", + "yajra/laravel-datatables-buttons": "^11.0" + }, + "require-dev": { + "larastan/larastan": "^2.9.8", + "laravel/pint": "^1.17.2", + "orchestra/testbench": "^9.4.0", + "pestphp/pest": "^2.35.1", + "pestphp/pest-plugin-laravel": "^2.4", + "rector/rector": "^1.2.4" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yajra\\DataTables\\ExportServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables Queued Export Plugin.", + "keywords": [ + "datatables", + "excel", + "export", + "laravel", + "livewire", + "queue" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables-export/issues", + "source": "https://github.com/yajra/laravel-datatables-export/tree/v11.3.3" + }, + "funding": [ + { + "url": "https://github.com/sponsors/yajra", + "type": "github" + } + ], + "time": "2025-01-04T04:19:10+00:00" + }, + { + "name": "yajra/laravel-datatables-fractal", + "version": "v11.0.0", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables-fractal.git", + "reference": "94141d03aff187aeb3f98a0a735e1c89ae50ad06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables-fractal/zipball/94141d03aff187aeb3f98a0a735e1c89ae50ad06", + "reference": "94141d03aff187aeb3f98a0a735e1c89ae50ad06", + "shasum": "" + }, + "require": { + "league/fractal": "^0.20.1", + "php": "^8.2", + "yajra/laravel-datatables-oracle": "^11.0" + }, + "require-dev": { + "nunomaduro/larastan": "^2.9.2", + "orchestra/testbench": "^9" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yajra\\DataTables\\FractalServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables Fractal Plugin.", + "keywords": [ + "api", + "datatables", + "fractal", + "laravel" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables-fractal/issues", + "source": "https://github.com/yajra/laravel-datatables-fractal/tree/v11.0.0" + }, + "time": "2024-03-14T06:16:28+00:00" + }, + { + "name": "yajra/laravel-datatables-html", + "version": "v11.8.0", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables-html.git", + "reference": "f9936fe040ee74661569e3717a538bd405228919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables-html/zipball/f9936fe040ee74661569e3717a538bd405228919", + "reference": "f9936fe040ee74661569e3717a538bd405228919", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^8.2", + "yajra/laravel-datatables-oracle": "^11.0" + }, + "require-dev": { + "larastan/larastan": "^2.9.1", + "laravel/pint": "^1.14", + "livewire/livewire": "^3.4", + "orchestra/testbench": "^9", + "rector/rector": "^1.0" + }, + "suggest": { + "laravel/livewire": "Required for Livewire layout support." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Yajra\\DataTables\\HtmlServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.0-dev" + } + }, + "autoload": { + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "Laravel DataTables HTML builder plugin", + "keywords": [ + "JS", + "datatables", + "html", + "jquery", + "laravel", + "yajra" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables-html/issues", + "source": "https://github.com/yajra/laravel-datatables-html/tree/v11.8.0" + }, + "funding": [ + { + "url": "https://www.paypal.me/yajra", + "type": "custom" + }, + { + "url": "https://github.com/yajra", + "type": "github" + }, + { + "url": "https://www.patreon.com/yajra", + "type": "patreon" + } + ], + "time": "2025-01-09T15:06:29+00:00" + }, + { + "name": "yajra/laravel-datatables-oracle", + "version": "v11.1.6", + "source": { + "type": "git", + "url": "https://github.com/yajra/laravel-datatables.git", + "reference": "b48eb614d0474c23a9c8041563beef9dda39656d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/b48eb614d0474c23a9c8041563beef9dda39656d", + "reference": "b48eb614d0474c23a9c8041563beef9dda39656d", + "shasum": "" + }, + "require": { + "illuminate/database": "^11", + "illuminate/filesystem": "^11", + "illuminate/http": "^11", + "illuminate/support": "^11", + "illuminate/view": "^11", + "php": "^8.2" + }, + "require-dev": { + "algolia/algoliasearch-client-php": "^3.4.1", + "larastan/larastan": "^2.9.1", + "laravel/pint": "^1.14", + "laravel/scout": "^10.8.3", + "meilisearch/meilisearch-php": "^1.6.1", + "orchestra/testbench": "^9", + "rector/rector": "^1.0" + }, + "suggest": { + "yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.", + "yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).", + "yajra/laravel-datatables-export": "Plugin for server-side exporting using livewire and queue worker.", + "yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.", + "yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables." + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "DataTables": "Yajra\\DataTables\\Facades\\DataTables" + }, + "providers": [ + "Yajra\\DataTables\\DataTablesServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "11.x-dev" + } + }, + "autoload": { + "files": [ + "src/helper.php" + ], + "psr-4": { + "Yajra\\DataTables\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Arjay Angeles", + "email": "aqangeles@gmail.com" + } + ], + "description": "jQuery DataTables API for Laravel", + "keywords": [ + "datatables", + "jquery", + "laravel", + "yajra" + ], + "support": { + "issues": "https://github.com/yajra/laravel-datatables/issues", + "source": "https://github.com/yajra/laravel-datatables/tree/v11.1.6" + }, + "funding": [ + { + "url": "https://github.com/sponsors/yajra", + "type": "github" + } + ], + "time": "2025-01-21T03:15:46+00:00" } ], "packages-dev": [ diff --git a/resources/views/admin/responses.blade.php b/resources/views/admin/responses.blade.php index e69de29..0a17c67 100644 --- a/resources/views/admin/responses.blade.php +++ b/resources/views/admin/responses.blade.php @@ -0,0 +1,67 @@ +@extends('layouts.app') + +@section('content') +
+
+
+

+ All Responses +

+
+
+
+ + + + + + + + + + + + + +
TitleActivity TypeStart DateEnd DateFacultyProof
+ +
+
+
+
+@endsection + +@section('scripts') + + + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 9b13da3..79bd902 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -33,4 +33,5 @@ + @yield('scripts') diff --git a/routes/web.php b/routes/web.php index b38956b..5204abb 100644 --- a/routes/web.php +++ b/routes/web.php @@ -40,6 +40,7 @@ Route::middleware('auth')->group(function () { Route::middleware(['auth', CheckRole::class . ':Admin'])->group(function () { Route::get('/admin', [AdminController::class, 'index'])->name('admin.dashboard'); Route::get('/admin/responses', [AdminController::class, 'viewResponses'])->name('admin.responses'); + Route::get('/admin/responses/data', [AdminController::class, 'getResponses'])->name('admin.responses.data'); }); // Coordinator routes