--- /dev/null
+<?php
+
+
+namespace App\Http\Controllers\Admin;
+
+
+use App\Http\Controllers\Admin\Operations\Tools\Excel2JSON;
+use App\Http\Controllers\Controller;
+use App\Http\Controllers\Admin\Operations\Tools\SASSCompiler;
+use Cubist\Util\Files\Files;
+
+class TeamPayController extends Controller
+{
+
+ protected function index()
+ {
+ return view('team.pay', ['slips' => $this->getSlips()]);
+ }
+
+ protected function getSlips()
+ {
+ $res = [];
+ $id = backpack_user()->oxygene;
+ if (!$id) {
+ return $res;
+ }
+ $path = resource_path('cubedesigners-oxygene');
+ `cd $path;git pull`;
+ $slipsRoot = $path . '/PAIE/CUBE.$SO/BulletinsPDF';
+ $iterator = Files::getRecursiveDirectoryIterator($slipsRoot);
+ foreach ($iterator as $item) {
+ /** @var $item \SplFileInfo */
+ $n = $item->getFilename();
+ if ($item->getExtension() === 'pdf' && str_starts_with($n, $id)) {
+ $year = substr($n, 4, 4);
+ $month = substr($n, 8, 2);
+ $res[$year . $month] = ['path' => $item->getPathname(), 'year' => $year, 'month' => $month];
+ }
+ }
+ ksort($res);
+ return $res;
+
+ }
+
+
+}
--- /dev/null
+window.$ = window.jQuery = require('jquery');
+window.key = require('keymaster-reloaded');
--- /dev/null
+.select2-hidden-accessible
+ position: fixed !important
+
+#linkeditor-form-templates
+ display: block
+ position: absolute
+ pointer-events: none
+ opacity: 0
+ top: -600px
+ left: -600px
+
+
+.linkeditor-linktype
+ &::before
+ display: inline-block
+ width: 12px
+ height: 12px
+ border-radius: 2px
+ margin: 2px 10px 0 0
+ content: ""
+ vertical-align: top
+ position: relative
+
+
+#linkeditor-panel-form
+ height: 100%
+ width: 100%
+ overflow: hidden
+ iframe
+ border: 0
+ width: 100%
+ height: 100%
--- /dev/null
+@extends(backpack_view('blank'))
+
+@section('content')
+ <style>
+ .table td, .table th {
+ vertical-align: middle;
+ }
+ </style>
+ <h2 style="margin-top: 50px">{{__('Bulletins de salaire')}}</h2>
+ <table id="crudTable" style="max-width: 400px"
+ class="bg-white table table-striped table-hover nowrap rounded shadow-xs border-xs mt-2 dataTable dtr-inline">
+ <thead>
+ <tr role="row">
+ <th></th>
+ <th>{{__('Année')}}</th>
+ <th>{{__('Mois')}}</th>
+ <th>{{__('Télécharger')}}</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ @foreach($slips as $id=>$slip)
+ <tr role="row">
+ <td></td>
+ <td><span>{{$slip['year']}}</span></td>
+ <td><span>{{$slip['month']}}</span></td>
+ <td><a class="btn btn-link" href="{{url('team-pay/'.$slip['year'].'/'.$slip['month'])}}"
+ download="{{$slip['year'].'-'.$slip['month'].'.pdf'}}"><i
+ class="la la-arrow-circle-down"></i> {{__('Télécharger')}}</a>
+ </td>
+ <td></td>
+ </tr>
+ @endforeach
+
+ </tbody>
+ </table>
+@endsection
+
+
'namespace' => '\App\Http\Controllers\Admin',
], function () { // custom admin routes
Route::any('tools/{tool}/{args?}', 'ToolsController@index')->where(['args' => '.*']);
+ Route::any('team-pay', 'TeamPayController@index');
+ Route::any('team-pay/{year}/{$month}', 'TeamPayController@download');
+ Route::any('team-pay/{year}/fiscal', 'TeamPayController@downloadFiscal');
Route::any('opentools/{tool}/{args?}', 'OpenToolsController@index')->where(['args' => '.*'])->withoutMiddleware([CheckIfAdmin::class, VerifyCsrfToken::class]);
Route::any('maintenance/{function}/{args?}', 'MaintenanceController@index')->where(['args' => '.*']);
Route::any('openmaintenance/{function}/{args?}', 'OpenMaintenanceController@index')->where(['args' => '.*'])->withoutMiddleware([CheckIfAdmin::class]);