Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add pdf support #314

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,45 @@ public function transactions(int $profileId, LogerProfileService $profileService

return $profileService->getTransactionsByProfileId($profileId, $startDate, $endDate);
}

public function relationships(LogerProfileService $profileService, string $profileName = 'relationship')
{
$profile = $profileService->getByName(request()->user()->current_team_id, $profileName);
return inertia('LogerProfile/ProfileView', [
'profile' => $profile,
'entities' => fn () => $profileService->getEntitiesByProfileId($profile->id),
]);
}
}

/***
* Name: Partner
* Type: Relationship
* kind: me and her
* created_at: by default
*
* Entities:
* - Movies
* - Remark
*
* layout/display 'cards' | natural | remark | grid | events | notes
*
* Entity Types:
* Category
* Category Group
* Meal Menu
* Chores assigned to users
* Plans assigned to users
* new Board
* create a new board to link
* - visibility | show to all, show to selected, private
* - selected_users
* show in menus
*/
/***
* Name: Diana
* Type: Relationship
* kind: Hija
*
*
*/
8 changes: 8 additions & 0 deletions app/Domains/LogerProfile/Services/LogerProfileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ public function getById(int $id)
return LogerProfileData::from(LogerProfile::find($id));
}

public function getByName(int $teamId, string $name)
{
return LogerProfileData::from(LogerProfile::where([
"team_id" => $teamId,
"name" => $name,
])->first());
}

public function addProfileEntity(ProfileEntityData $profileEntityData)
{
LogerProfileEntity::create($profileEntityData->toArray());
Expand Down
1 change: 1 addition & 0 deletions app/Domains/LogerProfile/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
Route::resource('/loger-profiles', LogerProfileController::class);
Route::resource('/loger-profiles/{profileId}/entities', LogerProfileEntityController::class);
Route::get('/loger-profiles/{profileId}/transactions', [LogerProfileController::class, 'transactions']);
Route::get('/relationships/{profileName}', [LogerProfileController::class, 'relationships']);
});
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,26 @@
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"repositories": [
{
"url": "../packages/journal",
"type": "path",
"options": {
"symlink": true
}
}
],
"require": {
"php": "^8.1.0",
"brick/money": "^0.6.0",
"doctrine/dbal": "^3.3",
"dompdf/dompdf": "^2.0.3",
"ernysans/laraworld": "^1.0",
"freesgen/atmosphere": "dev-main",
"google/apiclient": "^2.12",
"guzzlehttp/guzzle": "^7.0.2",
"inertiajs/inertia-laravel": "^0.6.3",
"insane/journal": "dev-master",
"insane/journal": "dev-feat/credit-cards-support",
"insane/plan-module": "dev-master",
"insane/watchlist-module": "dev-main",
"joshbrw/laravel-module-installer": "^2.0",
Expand Down
Loading
Loading