#132 - cs fix
This commit is contained in:
parent
35247cbabe
commit
4162dd3d67
@ -62,11 +62,10 @@ class VacationRequestsSummaryNotification extends Notification
|
|||||||
$url = route("vacation.requests.show", ["vacationRequest" => $request->id]);
|
$url = route("vacation.requests.show", ["vacationRequest" => $request->id]);
|
||||||
|
|
||||||
$message->line(
|
$message->line(
|
||||||
__("- [request no. :request](:url) of user :user (:startDate - :endDate)",["request" => $request->name, "url" => $url, "user" => $request->user->profile->full_name, "startDate" => $request->from->toDisplayString(), "endDate"=>$request->to->toDisplayString()]),
|
__("- [request no. :request](:url) of user :user (:startDate - :endDate)", ["request" => $request->name, "url" => $url, "user" => $request->user->profile->full_name, "startDate" => $request->from->toDisplayString(), "endDate" => $request->to->toDisplayString()]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $message
|
return $message
|
||||||
->action(__("Go to requests"), $url);
|
->action(__("Go to requests"), $url);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ class SendDailySummaryToSlack extends Command
|
|||||||
Http::withToken($this->getSlackClientToken())
|
Http::withToken($this->getSlackClientToken())
|
||||||
->post($this->getUrl(), [
|
->post($this->getUrl(), [
|
||||||
"channel" => $this->getSlackChannel(),
|
"channel" => $this->getSlackChannel(),
|
||||||
"text" => __("Daily summary for day :day",["day"=>$now->toDisplayString()]),
|
"text" => __("Daily summary for day :day", ["day" => $now->toDisplayString()]),
|
||||||
"attachments" => $attachments,
|
"attachments" => $attachments,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class VacationRequestsAttachment extends ListAttachment
|
|||||||
"url" => $url,
|
"url" => $url,
|
||||||
"request" => $request->name,
|
"request" => $request->name,
|
||||||
"user" => $request->user->profile->full_name,
|
"user" => $request->user->profile->full_name,
|
||||||
"date" => $date
|
"date" => $date,
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ class GiveKeysTo extends SignatureHandler
|
|||||||
$key->notify(new KeyHasBeenGivenNotification($authUser, $user));
|
$key->notify(new KeyHasBeenGivenNotification($authUser, $user));
|
||||||
|
|
||||||
return $this->respondToSlack(
|
return $this->respondToSlack(
|
||||||
__(":white_check_mark: Key no. :key has been given to <@:user>", ["key"=>$key->id, "user" => $user->profile->slack_id])
|
__(":white_check_mark: Key no. :key has been given to <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class TakeKeysFrom extends SignatureHandler
|
|||||||
|
|
||||||
if (!$key) {
|
if (!$key) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
"key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id])
|
"key" => __("User <@:user> does not have any keys", ["user" => $user->profile->slack_id]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class TakeKeysFrom extends SignatureHandler
|
|||||||
|
|
||||||
$key->notify(new KeyHasBeenTakenNotification($authUser, $user));
|
$key->notify(new KeyHasBeenTakenNotification($authUser, $user));
|
||||||
|
|
||||||
return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key"=>$key->id, "user"=> $user->profile->slack_id]));
|
return $this->respondToSlack(__(":white_check_mark: Key no. :key has been taken from user <@:user>", ["key" => $key->id, "user" => $user->profile->slack_id]));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRules(): array
|
protected function getRules(): array
|
||||||
@ -64,7 +64,7 @@ class TakeKeysFrom extends SignatureHandler
|
|||||||
protected function getMessages(): array
|
protected function getMessages(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"user.required" => __("You must specified the user you want to take the keys from")
|
"user.required" => __("You must specified the user you want to take the keys from"),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ trait FindsUserBySlackId
|
|||||||
$user = $this->findUserBySlackId($slackId);
|
$user = $this->findUserBySlackId($slackId);
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
throw new UserNotFoundException(__("User :input does not exist in toby", ["input"=> $slackId]));
|
throw new UserNotFoundException(__("User :input does not exist in toby", ["input" => $slackId]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
|
@ -37,7 +37,7 @@ trait ListsHandlers
|
|||||||
)
|
)
|
||||||
->map(
|
->map(
|
||||||
fn(SignatureHandler $handler): AttachmentField => AttachmentField::create(
|
fn(SignatureHandler $handler): AttachmentField => AttachmentField::create(
|
||||||
__($handler->getDescription()) ,
|
__($handler->getDescription()),
|
||||||
"`/{$handler->getSignature()}`",
|
"`/{$handler->getSignature()}`",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user