#90 - cr fixes

This commit is contained in:
Adrian Hopek
2022-04-14 11:37:07 +02:00
parent 4059b101f5
commit 1129f1ebc6
12 changed files with 24 additions and 15 deletions

View File

@@ -16,7 +16,6 @@ class MoveUserDataToProfile extends Command
{
$users = User::all();
/** @var User $user */
foreach ($users as $user) {
$user->profile()->updateOrCreate(["user_id" => $user->id], [
"first_name" => $user->first_name,

View File

@@ -14,7 +14,7 @@ class SimpleUserResource extends JsonResource
{
return [
"id" => $this->id,
"name" => $this->profile->fullName,
"name" => $this->profile->full_name,
"email" => $this->email,
"avatar" => $this->profile->getAvatar(),
];

View File

@@ -14,7 +14,7 @@ class UserResource extends JsonResource
{
return [
"id" => $this->id,
"name" => $this->profile->fullName,
"name" => $this->profile->full_name,
"email" => $this->email,
"role" => $this->role->label(),
"position" => $this->profile->position,

View File

@@ -15,7 +15,7 @@ class VacationRequestActivityResource extends JsonResource
return [
"date" => $this->created_at->toDisplayString(),
"time" => $this->created_at->format("H:i"),
"user" => $this->user ? $this->user->profile->fullName : __("System"),
"user" => $this->user ? $this->user->profile->full_name : __("System"),
"state" => $this->to,
];
}

View File

@@ -32,7 +32,7 @@ class SendVacationRequestDaysToGoogleCalendar implements ShouldQueue
$ranges = $this->prepareRanges($days);
foreach ($ranges as $range) {
$text = "{$this->vacationRequest->type->label()} - {$this->vacationRequest->user->profile->fullName} [{$this->vacationRequest->name}]";
$text = "{$this->vacationRequest->type->label()} - {$this->vacationRequest->user->profile->full_name} [{$this->vacationRequest->name}]";
$event = Event::create([
"name" => $text,