-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1445 from bakaphp/development
v1.0-BETA35
- Loading branch information
Showing
74 changed files
with
1,539 additions
and
364 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Deploy to EC2 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-to-ec2: | ||
runs-on: ubuntu-latest | ||
environment: ${{ github.ref_name }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Copy folder content recursively to remote VM | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.AWS_EC2_HOST }} | ||
username: ${{ secrets.AWS_EC2_USERNAME }} | ||
key: ${{ secrets.AWS_EC2_PRIVATE_SSH_KEY }} | ||
source: . | ||
target: ${{secrets.AWS_EC2_TARGET_DIR}} |
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
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
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
39 changes: 39 additions & 0 deletions
39
app/GraphQL/Guild/Mutations/Peoples/PeopleImportMutation.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\GraphQL\Guild\Mutations\Peoples; | ||
|
||
use Baka\Support\Str; | ||
use Kanvas\Apps\Models\Apps; | ||
use Kanvas\Companies\Models\Companies; | ||
use Kanvas\Companies\Repositories\CompaniesRepository; | ||
use Kanvas\Guild\Customers\Jobs\CustomerImporterJob; | ||
|
||
class PeopleImportMutation | ||
{ | ||
/** | ||
* Create new customer | ||
*/ | ||
public function import(mixed $root, array $req): string | ||
{ | ||
$user = auth()->user(); | ||
$company = isset($req['companyId']) ? Companies::getById($req['companyId']) : $user->getCurrentCompany(); | ||
|
||
CompaniesRepository::userAssociatedToCompany( | ||
$company, | ||
$user | ||
); | ||
|
||
$jobUuid = Str::uuid()->toString(); | ||
|
||
CustomerImporterJob::dispatch( | ||
$jobUuid, | ||
$req['input'], | ||
$company->branch, | ||
$user, | ||
app(Apps::class) | ||
); | ||
return $jobUuid; | ||
} | ||
} |
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
Oops, something went wrong.