-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/inikoo/aiku into main
- Loading branch information
Showing
11 changed files
with
318 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
/* | ||
* Author: Raul Perusquia <raul@inikoo.com> | ||
* Created: Thu, 25 Jul 2024 14:54:12 Malaysia Time, Kuala Lumpur, Malaysia | ||
* Copyright (c) 2024, Raul A Perusquia Flores | ||
*/ | ||
|
||
namespace App\Actions\HumanResources\Timesheet\Pdf; | ||
|
||
use App\Actions\Traits\WithExportData; | ||
use App\Models\SysAdmin\Organisation; | ||
use Lorisleiva\Actions\ActionRequest; | ||
use Lorisleiva\Actions\Concerns\AsAction; | ||
use Lorisleiva\Actions\Concerns\WithAttributes; | ||
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf as PDF; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class PdfTimesheet | ||
{ | ||
use AsAction; | ||
use WithAttributes; | ||
use WithExportData; | ||
|
||
/** | ||
* @throws \Mpdf\MpdfException | ||
*/ | ||
public function handle(Organisation $organisation) | ||
{ | ||
$filename = __('Timesheets - ') . $organisation->name . '.pdf'; | ||
$config = [ | ||
'title' => $filename, | ||
'margin_left' => 8, | ||
'margin_right' => 8, | ||
'margin_top' => 2, | ||
'margin_bottom' => 2, | ||
'auto_page_break' => true, | ||
'auto_page_break_margin' => 10 | ||
]; | ||
|
||
return PDF::chunkLoadView('<html-separator/>', 'hr.timesheets', [ | ||
'filename' => $filename, | ||
'organisation' => $organisation, | ||
'employees' => $organisation->employees()->limit(10)->get(), | ||
], [], $config)->stream($filename); | ||
} | ||
|
||
/** | ||
* @throws \Mpdf\MpdfException | ||
*/ | ||
public function asController(Organisation $organisation, ActionRequest $request): Response | ||
{ | ||
return $this->handle($organisation); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/Http/Resources/Fulfilment/NewStoredItemDeltasInProcessForPalletResource.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/* | ||
* author Arya Permana - Kirin | ||
* created on 21-02-2025-15h-04m | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.