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