diff --git a/BACKEND/Modules/Admin/app/Http/Controllers/JiraController.php b/BACKEND/Modules/Admin/app/Http/Controllers/JiraController.php new file mode 100644 index 0000000..f6e0b43 --- /dev/null +++ b/BACKEND/Modules/Admin/app/Http/Controllers/JiraController.php @@ -0,0 +1,172 @@ +jiraService = $jiraService; + } + + public function fetchAllIssues($startAt = 0, $maxResults = 50) + { + try { + $allIssues = []; + $projects = $this->jiraService->getAllProjects(); + $promises = []; + + foreach ($projects as $project) { + if ($project['key'] !== 'GCT') { + $promises[] = $this->jiraService->getIssuesAsync($project['key'], $startAt, $maxResults) + ->then(function ($response) use ($project) { + $issues = []; + $data = json_decode($response->getBody()->getContents(), true); + foreach ($data['issues'] as $issue) { + $issues[] = [ + 'summary' => $issue['fields']['summary'] ?? null, + 'desc' => $issue['fields']['description']['content'][0] ?? null, + 'assignee' => $issue['fields']['assignee']['displayName'] ?? null, + 'status' => $issue['fields']['status']['name'] ?? null, + 'worklogs' => json_encode(array_map(function ($log) { + return [ + 'author' => $log['author']['displayName'] ?? null, + 'timeSpent' => $log['timeSpent'] ?? null, + 'started' => $log['started'] ?? null, + 'updated' => $log['updated'] ?? null, + ]; + }, $issue['fields']['worklog']['worklogs'] ?? []), JSON_PRETTY_PRINT), + 'originalEstimate' => isset($issue['fields']['timeoriginalestimate']) ? $issue['fields']['timeoriginalestimate'] / 60 / 60 : null, + 'timeSpent' => isset($issue['fields']['timespent']) ? $issue['fields']['timespent'] / 60 / 60 : null + ]; + } + return ['project' => $project['name'], 'issues' => $issues]; + }); + } + } + + $results = Utils::settle($promises)->wait(); + + foreach ($results as $result) { + if ($result['state'] === 'fulfilled') { + $allIssues[] = $result['value']; + } else { + // Handle the errors if necessary + \Log::error("Error fetching issues: " . $result['reason']->getMessage()); + } + } + + return response()->json($allIssues); + } catch (\Exception $e) { + return response()->json(['error' => $e->getMessage()], 500); + } + } + + public function getAllProject() + { + $projects = $this->jiraService->getAllProjects(); + + return response()->json([ + 'data' => $projects, + 'status' => true + ], 200); + } + + public function fetchIssuesByProject(Request $request) + { + $project = ['key'=>$request->key, 'name'=> $request->name]; + $allIssues = []; + + if ($project['key'] !== 'GCT') { + $startAt = 0; + $issues = []; + $total = 0; + $issueLength = 0; + $checked = true; + + // while ($checked) { + $response = $this->jiraService->getIssues($project['key'], $startAt); + $total = $response['total']; + $issueLength = count($response['issues']); + + foreach ($response['issues'] as $issue) { + $issues[] = [ + 'summary' => $issue['fields']['summary'] ?? null, + 'desc' => $issue['fields']['description']['content'][0] ?? null, + 'assignee' => $issue['fields']['assignee']['displayName'] ?? null, + 'status' => $issue['fields']['status']['name'] ?? null, + 'worklogs' => json_encode(array_map(function ($log) { + return [ + 'author' => $log['author']['displayName'] ?? null, + 'timeSpent' => $log['timeSpent'] ?? null, + 'started' => $log['started'] ?? null, + 'updated' => $log['updated'] ?? null, + ]; + }, $issue['fields']['worklog']['worklogs'] ?? []), JSON_PRETTY_PRINT), + 'originalEstimate' => isset($issue['fields']['timeoriginalestimate']) ? $issue['fields']['timeoriginalestimate'] / 60 / 60 : null, + 'timeSpent' => isset($issue['fields']['timespent']) ? $issue['fields']['timespent'] / 60 / 60 : null + ]; + // } + + // if (($startAt + $issueLength >= $total && $total !== 0) || $total === 0) { + // $checked = false; + // } + + // $startAt += $issueLength; + } + + $allIssues[] = [ + 'project' => $project['name'], + 'issues' => $issues + ]; + + return response()->json([ + 'data' => $allIssues, + 'status' => true + ], 200); + } + return response()->json([ + 'data' => $allIssues, + 'status' => false + ], 500); + } + public function exportToExcel() + { + $allIssues = $this->fetchAllIssues()->original; + $fileName = 'allIssues.xlsx'; + + Excel::store(new \App\Exports\IssuesExport($allIssues), $fileName); + + return response()->download(storage_path("app/{$fileName}")); + } + + public function getAllUserWorkLogs(Request $request) + { + try { + $workLogs = $this->jiraService->getAllUserWorkLogs($request->startDate, $request->endDate); + return response()->json([ + 'data' => $workLogs, + 'status' => true + ], 200); + } catch (\Exception $e) { + return response()->json(['error' => $e->getMessage()], 500); + } + } +} diff --git a/BACKEND/Modules/Admin/app/Http/Controllers/TrackingController.php b/BACKEND/Modules/Admin/app/Http/Controllers/TrackingController.php index 885b89c..2a93879 100644 --- a/BACKEND/Modules/Admin/app/Http/Controllers/TrackingController.php +++ b/BACKEND/Modules/Admin/app/Http/Controllers/TrackingController.php @@ -7,10 +7,7 @@ use App\Traits\HasFilterRequest; use App\Traits\HasOrderByRequest; use App\Traits\HasSearchRequest; use Illuminate\Http\Request; -use Illuminate\Http\Response; -use Modules\Admin\app\Http\Requests\DiscountRequest; use Modules\Admin\app\Models\Admin; -use Modules\Admin\app\Models\Discount; use Modules\Admin\app\Models\Tracking; class TrackingController extends Controller @@ -148,39 +145,4 @@ class TrackingController extends Controller ]); } - // Delete multiple discounts - public function deletes(DiscountRequest $request) - { - $discounts = $request->get('discounts'); - $ids = collect($discounts)->pluck('id'); - Discount::whereIn('id', $ids)->delete(); - return response()->json([ - 'data' => $ids, - 'status' => true - ]); - } - - // Update multiple discounts - public function updates(DiscountRequest $request) - { - $discounts = $request->get('discounts'); - $ids = collect($discounts)->pluck('id'); - - foreach ($discounts as $discountRequest) { - // convert to object|array to array - $discountRequest = collect($discountRequest)->toArray(); - // handle array - $discount = Discount::find($discountRequest['id']); - if ($discount) { - // exclude id field - unset($discount['id']); - - $discount->update($discountRequest); - } - } - return response()->json([ - 'data' => Discount::whereIn('id', $ids)->get(), - 'status' => true - ]); - } } diff --git a/BACKEND/Modules/Admin/routes/api.php b/BACKEND/Modules/Admin/routes/api.php index b747261..bb926c7 100644 --- a/BACKEND/Modules/Admin/routes/api.php +++ b/BACKEND/Modules/Admin/routes/api.php @@ -10,6 +10,7 @@ use Modules\Admin\app\Http\Controllers\CustomThemeController; use Modules\Admin\app\Http\Controllers\DashboardController; use Modules\Admin\app\Http\Controllers\DiscountController; use Modules\Admin\app\Http\Controllers\DiscountTypeController; +use Modules\Admin\app\Http\Controllers\JiraController; use Modules\Admin\app\Http\Controllers\OrderController; use Modules\Admin\app\Http\Controllers\PackageController; use Modules\Admin\app\Http\Controllers\SNCheckController; @@ -142,6 +143,16 @@ Route::middleware('api') Route::get('/statistics-search-sn-by-month', [DashboardController::class, 'statisticSearchSNByMonth']); Route::get('/statistics-revenues-by-month', [DashboardController::class, 'statisticRevenuesByMonth']); }); + Route::group([ + 'prefix' => 'jira', + ], function () { + + Route::get('/fetch-issues', [JiraController::class, 'fetchAllIssues']); + Route::get('/export-issues', [JiraController::class, 'exportToExcel']); + Route::get('/all-project', [JiraController::class, 'getAllProject']); + Route::get('/all-issue-by-project', [JiraController::class, 'fetchIssuesByProject']); + Route::get('/worklogs', [JiraController::class, 'getAllUserWorkLogs']); + }); }); }); @@ -152,4 +163,5 @@ Route::middleware('api') Route::post('/scan-create', [TrackingController::class, 'create']); Route::get('/delete', [TrackingController::class, 'delete']); // Route::get('/clear-cache', [SettingController::class, 'clearCache']); - }); \ No newline at end of file + }); + diff --git a/BACKEND/app/Exports/IssuesExport.php b/BACKEND/app/Exports/IssuesExport.php new file mode 100644 index 0000000..f049fe3 --- /dev/null +++ b/BACKEND/app/Exports/IssuesExport.php @@ -0,0 +1,27 @@ +data = $data; + } + + public function sheets(): array + { + $sheets = []; + + foreach ($this->data as $projectData) { + $sheets[] = new ProjectSheet($projectData); + } + + return $sheets; + } +} diff --git a/BACKEND/app/Exports/ProjectSheet.php b/BACKEND/app/Exports/ProjectSheet.php new file mode 100644 index 0000000..a3df57f --- /dev/null +++ b/BACKEND/app/Exports/ProjectSheet.php @@ -0,0 +1,33 @@ +projectData = $projectData; + } + + public function array(): array + { + return $this->projectData['issues']; + } + + public function headings(): array + { + return ['summary', 'desc', 'assignee', 'status', 'worklogs', 'originalEstimate', 'timeSpent']; + } + + public function title(): string + { + // Return the project name or any other string based on $projectData + return $this->projectData['project']; + } +} diff --git a/BACKEND/app/Services/JiraService.php b/BACKEND/app/Services/JiraService.php new file mode 100644 index 0000000..817f766 --- /dev/null +++ b/BACKEND/app/Services/JiraService.php @@ -0,0 +1,203 @@ +baseUrl = env('JIRA_BASE_URL'); + $this->authHeader = 'Basic ' . base64_encode(env('JIRA_USERNAME') . ':' . env('JIRA_API_TOKEN')); + $this->client = new Client([ + 'base_uri' => $this->baseUrl, + 'headers' => [ + 'Authorization' => $this->authHeader, + 'Accept' => 'application/json', + 'Content-Type' => 'application/json' + ] + ]); + } + + public function getAllProjects() + { + $response = $this->client->get('/rest/api/3/project'); + return json_decode($response->getBody()->getContents(), true); + } + + public function getIssuesAsync($projectKey, $startAt = 0, $maxResults = 50) + { + $body = [ + 'expand' => ['names', 'schema', 'operations'], + 'fields' => ['summary', 'status', 'description', 'timeoriginalestimate', 'timespent', 'worklog', 'assignee'], + 'jql' => "project = '{$projectKey}' ORDER BY created DESC", + 'maxResults' => $maxResults, + 'startAt' => $startAt + ]; + + return $this->client->postAsync($this->baseUrl . '/rest/api/3/search', [ + 'body' => json_encode($body), + 'headers' => [ + 'Authorization' => $this->authHeader, + 'Accept' => 'application/json', + 'Content-Type' => 'application/json' + ] + ]); + + } + public function getIssues($projectKey, $startAt = 0) + { + $body = [ + 'expand' => ['names', 'schema', 'operations'], + 'fields' => ['summary', 'status', 'description', 'timeoriginalestimate', 'timespent', 'worklog', 'assignee'], + 'jql' => "project = '{$projectKey}' ORDER BY created DESC", + 'maxResults' => 100, + 'startAt' => $startAt + ]; + + $response = $this->client->post('/rest/api/3/search', [ + 'body' => json_encode($body) + ]); + + return json_decode($response->getBody()->getContents(), true); + } + + public function getAllUsers() + { + $response = $this->client->get('/rest/api/3/users/search', [ + 'headers' => [ + 'Authorization' => $this->authHeader, + 'Accept' => 'application/json' + ] + ]); + + return json_decode($response->getBody()->getContents(), true); + } + + public function getUserWorkLogs($accountId, $startDate, $endDate) + { + $body = [ + 'jql' => "worklogAuthor = '{$accountId}'AND worklogDate >= '{$startDate}' AND worklogDate <= '{$endDate}'", + 'fields' => ['summary', 'status', 'timeoriginalestimate', 'timespent', 'project'], + 'maxResults' => 50 + ]; + + $response = $this->client->post('/rest/api/3/search', [ + 'body' => json_encode($body), + 'headers' => [ + 'Authorization' => $this->authHeader, + 'Accept' => 'application/json', + 'Content-Type' => 'application/json' + ] + ]); + + $data_response = json_decode($response->getBody()->getContents(), true); + + if ($data_response['total'] == 0) { + return $data_response; + } + + $promises = []; + foreach ($data_response['issues'] as $index => $issue) { + $issueId = $issue['id']; + + // Get the initial worklog data to determine total number of worklogs + $promises[$index] = $this->client->getAsync("/rest/api/3/issue/{$issueId}/worklog", [ + 'query' => [ + 'startAt' => 0, + 'maxResults' => 1 + ] + ])->then(function ($checkApiResponse) use ($issueId, $index) { + $checkApi = json_decode($checkApiResponse->getBody()->getContents(), true); + $maxResults = 50; + $totalWorklogs = $checkApi['total']; + return $this->client->getAsync("/rest/api/3/issue/{$issueId}/worklog", [ + 'query' => [ + 'startAt' => $totalWorklogs - $maxResults, + 'maxResults' => $totalWorklogs + ] + ])->then(function ($worklogResponse) use ($index) { + return [ + 'index' => $index, + 'worklogs' => json_decode($worklogResponse->getBody()->getContents(), true) + ]; + }); + }); + } + + // Wait for all promises to complete + $results = Utils::settle($promises)->wait(); + + // Attach worklogs to issues + foreach ($results as $result) { + if ($result['state'] === 'fulfilled') { + $data_response['issues'][$result['value']['index']]["fields"]['worklog'] = $result['value']['worklogs']; + } + } + + return $data_response; + } + + // public function getUserWorkLogs($accountId, $startDate, $endDate) + // { + // $body = [ + // 'jql' => "worklogAuthor = '{$accountId}'AND worklogDate >= '{$startDate}' AND worklogDate <= '{$endDate}'", + // 'fields' => ['summary', 'status', 'timeoriginalestimate', 'timespent', 'project'], + // 'maxResults' => 50 + // ]; + + // $response = $this->client->post('/rest/api/3/search', [ + // 'body' => json_encode($body), + // 'headers' => [ + // 'Authorization' => $this->authHeader, + // 'Accept' => 'application/json', + // 'Content-Type' => 'application/json' + // ] + // ]); + + // $data_response = json_decode($response->getBody()->getContents(), true); + // // $allRespones = []; + // if ($data_response['total'] != 0) { + // foreach ($data_response['issues'] as $index => $issue) { + // $maxResults = 10; + // $check_api = $this->client->get("/rest/api/3/issue/{$issue['id']}/worklog", [ + // 'query' => [ + // 'startAt' => 0, + // 'maxResults' => 1 + // ] + // ]); + + // $check_api = json_decode($check_api->getBody()->getContents(), true); + + // $response = $this->client->get("/rest/api/3/issue/{$issue['id']}/worklog", [ + // 'query' => [ + // 'startAt' => $check_api['total'] - $maxResults, + // 'maxResults' => $check_api['total'] + // ] + // ]); + // $data_response['issues'][$index]["fields"]['worklogs'] = json_decode($response->getBody()->getContents(), true); + // } + // } + // return $data_response; + // } + + public function getAllUserWorkLogs($startDate, $endDate) + { + $users = $this->getAllUsers(); + $workLogs = []; + + foreach ($users as $user) { + $userWorkLogs = $this->getUserWorkLogs($user['accountId'], $startDate, $endDate); + $workLogs[] = ['username' => $user['displayName'], 'information' => $userWorkLogs]; + } + + return $workLogs; + } + +} diff --git a/BACKEND/composer.json b/BACKEND/composer.json index 52f3568..4f26747 100644 --- a/BACKEND/composer.json +++ b/BACKEND/composer.json @@ -13,6 +13,7 @@ "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "laravel/ui": "^4.3", + "maatwebsite/excel": "^3.1", "nwidart/laravel-modules": "^10.0", "pion/laravel-chunk-upload": "^1.5", "predis/predis": "^2.2", diff --git a/BACKEND/composer.lock b/BACKEND/composer.lock index bdc54a9..f2c3778 100644 --- a/BACKEND/composer.lock +++ b/BACKEND/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": "879d4b76d94550aedcc3fa47d3db8f96", + "content-hash": "4d9f50111be5d1e2be1581ccf00970b6", "packages": [ { "name": "barryvdh/laravel-debugbar", @@ -219,6 +219,87 @@ ], "time": "2023-12-11T17:09:12+00:00" }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.2", @@ -642,6 +723,67 @@ ], "time": "2023-10-06T06:47:41+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.17.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + }, + "time": "2023-11-17T15:01:25+00:00" + }, { "name": "fruitcake/php-cors", "version": "v1.3.0", @@ -2237,6 +2379,275 @@ ], "time": "2024-01-28T23:22:08+00:00" }, + { + "name": "maatwebsite/excel", + "version": "3.1.55", + "source": { + "type": "git", + "url": "https://github.com/SpartnerNL/Laravel-Excel.git", + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", + "reference": "6d9d791dcdb01a9b6fd6f48d46f0d5fff86e6260", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "ext-json": "*", + "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0", + "php": "^7.0||^8.0", + "phpoffice/phpspreadsheet": "^1.18", + "psr/simple-cache": "^1.0||^2.0||^3.0" + }, + "require-dev": { + "laravel/scout": "^7.0||^8.0||^9.0||^10.0", + "orchestra/testbench": "^6.0||^7.0||^8.0||^9.0", + "predis/predis": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "psr-4": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@spartner.nl" + } + ], + "description": "Supercharged Excel exports and imports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel", + "php", + "phpspreadsheet" + ], + "support": { + "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.55" + }, + "funding": [ + { + "url": "https://laravel-excel.com/commercial-support", + "type": "custom" + }, + { + "url": "https://github.com/patrickbrouwers", + "type": "github" + } + ], + "time": "2024-02-20T08:27:10+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "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.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2023-06-21T14:59:35+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": "maximebf/debugbar", "version": "v1.22.3", @@ -2890,6 +3301,111 @@ ], "time": "2024-01-28T10:04:15+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.29.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "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": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "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": "^1.0 || ^2.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": "^8.5 || ^9.0 || ^10.0", + "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/1.29.0" + }, + "time": "2023-06-14T22:48:31+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.2", diff --git a/BACKEND/resources/views/errors/404.blade.php b/BACKEND/resources/views/errors/404.blade.php index 0b37811..0e49879 100644 --- a/BACKEND/resources/views/errors/404.blade.php +++ b/BACKEND/resources/views/errors/404.blade.php @@ -183,8 +183,8 @@ 4