#62 - fix
This commit is contained in:
parent
f0355f56d3
commit
b11e60ab74
@ -11,7 +11,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot(): void
|
||||
{
|
||||
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("j F Y"));
|
||||
Carbon::macro("toDisplayDate", fn() => $this->translatedFormat("d.m.Y"));
|
||||
Carbon::macro("toDisplayString", fn() => $this->translatedFormat("d.m.Y"));
|
||||
}
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ class VacationRequestApprovedNotification extends Notification
|
||||
$user = $this->user->first_name;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
$requester = $this->vacationRequest->user->fullName;
|
||||
|
||||
|
@ -45,8 +45,8 @@ class VacationRequestCancelledNotification extends Notification
|
||||
$user = $this->user->first_name;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
$requester = $this->vacationRequest->user->fullName;
|
||||
|
||||
|
@ -42,8 +42,8 @@ class VacationRequestCreatedNotification extends Notification
|
||||
$user = $this->vacationRequest->user->first_name;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
$appName = config("app.name");
|
||||
|
||||
|
@ -43,8 +43,8 @@ class VacationRequestCreatedOnEmployeeBehalf extends Notification
|
||||
$user = $this->vacationRequest->user->first_name;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
$appName = config("app.name");
|
||||
|
||||
|
@ -45,8 +45,8 @@ class VacationRequestRejectedNotification extends Notification
|
||||
$user = $this->user->first_name;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
$requester = $this->vacationRequest->user->fullName;
|
||||
|
||||
|
@ -46,8 +46,8 @@ class VacationRequestWaitsForAdminApprovalNotification extends Notification
|
||||
$requester = $this->vacationRequest->user->fullName;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
|
||||
return (new MailMessage())
|
||||
|
@ -46,8 +46,8 @@ class VacationRequestWaitsForTechApprovalNotification extends Notification
|
||||
$requester = $this->vacationRequest->user->fullName;
|
||||
$title = $this->vacationRequest->name;
|
||||
$type = $this->vacationRequest->type->label();
|
||||
$from = $this->vacationRequest->from->toDisplayDate();
|
||||
$to = $this->vacationRequest->to->toDisplayDate();
|
||||
$from = $this->vacationRequest->from->toDisplayString();
|
||||
$to = $this->vacationRequest->to->toDisplayString();
|
||||
$days = $this->vacationRequest->vacations()->count();
|
||||
|
||||
return (new MailMessage())
|
||||
|
@ -13,7 +13,7 @@ class VacationRequestActivityResource extends JsonResource
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
"date" => $this->created_at->toDisplayDate(),
|
||||
"date" => $this->created_at->toDisplayString(),
|
||||
"time" => $this->created_at->format("H:i"),
|
||||
"user" => $this->user ? $this->user->fullName : __("System"),
|
||||
"state" => $this->to,
|
||||
|
@ -18,8 +18,8 @@ class VacationRequestResource extends JsonResource
|
||||
"user" => new UserResource($this->user),
|
||||
"type" => $this->type->label(),
|
||||
"state" => $this->state,
|
||||
"from" => $this->from->toDisplayDate(),
|
||||
"to" => $this->to->toDisplayDate(),
|
||||
"from" => $this->from->toDisplayString(),
|
||||
"to" => $this->to->toDisplayString(),
|
||||
"comment" => $this->comment,
|
||||
"days" => VacationResource::collection($this->vacations),
|
||||
];
|
||||
|
@ -38,7 +38,7 @@ Flatpickr.localize(Polish)
|
||||
Flatpickr.setDefaults({
|
||||
dateFormat: 'Y-m-d',
|
||||
enableTime: false,
|
||||
altFormat: 'j F Y',
|
||||
altFormat: 'd.m.Y',
|
||||
altInput: true,
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user