Skip to content

Commit

Permalink
Improved Add persons/children/partners
Browse files Browse the repository at this point in the history
  • Loading branch information
kreaweb.be committed May 6, 2024
1 parent cc21b5c commit ad64239
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Livewire/People/Add/Child.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function saveChild()

if ($this->photos) {
// if needed, create team photo folder
$path = storage_path('app/public/photos/' . $this->new_person->team_id);
$path = storage_path('app/public/photos/' . $new_person->team_id);

if (! File::isDirectory($path)) {
File::makeDirectory($path, 0777, true, true);
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/People/Add/Partner.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function savePartner()

if ($this->photos) {
// if needed, create team photo folder
$path = storage_path('app/public/photos/' . $this->new_person->team_id);
$path = storage_path('app/public/photos/' . $new_person->team_id);

if (! File::isDirectory($path)) {
File::makeDirectory($path, 0777, true, true);
Expand Down
5 changes: 2 additions & 3 deletions app/Livewire/People/Add/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ public function savePerson()
'yob' => $validated['yob'],
'dob' => $validated['dob'],
'pob' => $validated['pob'],
'father_id' => $this->person->id,
'team_id' => $this->person->team_id,
'team_id' => auth()->user()->currentTeam->id,
]);

if ($this->photos) {
// if needed, create team photo folder
$path = storage_path('app/public/photos/' . $this->new_person->team_id);
$path = storage_path('app/public/photos/' . $new_person->team_id);

if (! File::isDirectory($path)) {
File::makeDirectory($path, 0777, true, true);
Expand Down

0 comments on commit ad64239

Please sign in to comment.