Merge branch 'main' into new-big-calendar-feature

This commit is contained in:
Adrian Hopek 2022-04-06 15:14:29 +02:00
commit 3b4591e3c0
27 changed files with 1386 additions and 1222 deletions

View File

@ -4,6 +4,8 @@ declare(strict_types=1);
namespace Toby\Domain\Enums; namespace Toby\Domain\Enums;
use Illuminate\Support\Collection;
enum VacationType: string enum VacationType: string
{ {
case Vacation = "vacation"; case Vacation = "vacation";
@ -15,6 +17,7 @@ enum VacationType: string
case Volunteering = "volunteering_vacation"; case Volunteering = "volunteering_vacation";
case TimeInLieu = "time_in_lieu"; case TimeInLieu = "time_in_lieu";
case Sick = "sick_vacation"; case Sick = "sick_vacation";
case Absence = "absence";
public function label(): string public function label(): string
{ {
@ -23,7 +26,7 @@ enum VacationType: string
public static function casesToSelect(): array public static function casesToSelect(): array
{ {
$cases = collect(VacationType::cases()); $cases = VacationType::all();
return $cases->map( return $cases->map(
fn(VacationType $enum) => [ fn(VacationType $enum) => [
@ -32,4 +35,9 @@ enum VacationType: string
], ],
)->toArray(); )->toArray();
} }
public static function all(): Collection
{
return new Collection(VacationType::cases());
}
} }

View File

@ -4,20 +4,21 @@ declare(strict_types=1);
namespace Toby\Domain; namespace Toby\Domain;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\WithMultipleSheets; use Maatwebsite\Excel\Concerns\WithMultipleSheets;
use Toby\Eloquent\Models\User; use Toby\Eloquent\Models\User;
class TimesheetExport implements WithMultipleSheets class TimesheetExport implements WithMultipleSheets
{ {
protected Collection $users; protected Collection $users;
protected Collection $types;
protected Carbon $month; protected Carbon $month;
public function sheets(): array public function sheets(): array
{ {
return $this->users return $this->users
->map(fn(User $user) => new TimesheetPerUserSheet($user, $this->month)) ->map(fn(User $user) => new TimesheetPerUserSheet($user, $this->month, $this->types))
->toArray(); ->toArray();
} }
@ -34,4 +35,11 @@ class TimesheetExport implements WithMultipleSheets
return $this; return $this;
} }
public function forVacationTypes(Collection $types): static
{
$this->types = $types;
return $this;
}
} }

View File

@ -7,6 +7,7 @@ namespace Toby\Domain;
use Carbon\CarbonInterface; use Carbon\CarbonInterface;
use Carbon\CarbonPeriod; use Carbon\CarbonPeriod;
use Generator; use Generator;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromGenerator; use Maatwebsite\Excel\Concerns\FromGenerator;
@ -40,6 +41,7 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
public function __construct( public function __construct(
protected User $user, protected User $user,
protected Carbon $month, protected Carbon $month,
protected Collection $types,
) {} ) {}
public function title(): string public function title(): string
@ -49,8 +51,6 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
public function headings(): array public function headings(): array
{ {
$types = VacationType::cases();
$headings = [ $headings = [
__("Date"), __("Date"),
__("Day of week"), __("Day of week"),
@ -59,7 +59,7 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
__("Worked hours"), __("Worked hours"),
]; ];
foreach ($types as $type) { foreach ($this->types as $type) {
$headings[] = $type->label(); $headings[] = $type->label();
} }
@ -187,6 +187,7 @@ class TimesheetPerUserSheet implements WithTitle, WithHeadings, WithEvents, With
{ {
return $user->vacations() return $user->vacations()
->with("vacationRequest") ->with("vacationRequest")
->whereRelation("vacationRequest", fn(Builder $query) => $query->whereIn("type", $this->types))
->whereBetween("date", [$period->start, $period->end]) ->whereBetween("date", [$period->start, $period->end])
->approved() ->approved()
->get() ->get()

View File

@ -95,14 +95,14 @@ class UserVacationStatsRetriever
protected function getLimitableVacationTypes(): Collection protected function getLimitableVacationTypes(): Collection
{ {
$types = new Collection(VacationType::cases()); $types = VacationType::all();
return $types->filter(fn(VacationType $type) => $this->configRetriever->hasLimit($type)); return $types->filter(fn(VacationType $type) => $this->configRetriever->hasLimit($type));
} }
protected function getNotLimitableVacationTypes(): Collection protected function getNotLimitableVacationTypes(): Collection
{ {
$types = new Collection(VacationType::cases()); $types = VacationType::all();
return $types->filter(fn(VacationType $type) => !$this->configRetriever->hasLimit($type)); return $types->filter(fn(VacationType $type) => !$this->configRetriever->hasLimit($type));
} }

View File

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Toby\Domain; namespace Toby\Domain;
use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Config\Repository;
use Toby\Domain\Enums\EmploymentForm;
use Toby\Domain\Enums\VacationType; use Toby\Domain\Enums\VacationType;
class VacationTypeConfigRetriever class VacationTypeConfigRetriever
@ -13,6 +14,7 @@ class VacationTypeConfigRetriever
public const KEY_ADMINISTRATIVE_APPROVAL = "administrative_approval"; public const KEY_ADMINISTRATIVE_APPROVAL = "administrative_approval";
public const KEY_BILLABLE = "billable"; public const KEY_BILLABLE = "billable";
public const KEY_HAS_LIMIT = "has_limit"; public const KEY_HAS_LIMIT = "has_limit";
public const KEY_AVAILABLE_FOR = "available_for";
public function __construct( public function __construct(
protected Repository $config, protected Repository $config,
@ -38,6 +40,11 @@ class VacationTypeConfigRetriever
return $this->getConfigFor($type)[static::KEY_HAS_LIMIT]; return $this->getConfigFor($type)[static::KEY_HAS_LIMIT];
} }
public function isAvailableFor(VacationType $type, EmploymentForm $employmentForm): bool
{
return in_array($employmentForm, $this->getConfigFor($type)[static::KEY_AVAILABLE_FOR], true);
}
protected function getConfigFor(VacationType $type): array protected function getConfigFor(VacationType $type): array
{ {
return $this->config->get("vacation_types.{$type->value}"); return $this->config->get("vacation_types.{$type->value}");

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Toby\Domain\Validation\Rules; namespace Toby\Domain\Validation\Rules;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Collection;
use Toby\Domain\Enums\VacationType; use Toby\Domain\Enums\VacationType;
use Toby\Domain\VacationDaysCalculator; use Toby\Domain\VacationDaysCalculator;
use Toby\Domain\VacationRequestStatesRetriever; use Toby\Domain\VacationRequestStatesRetriever;
@ -59,7 +59,7 @@ class DoesNotExceedLimitRule implements VacationRequestRule
protected function getLimitableVacationTypes(): Collection protected function getLimitableVacationTypes(): Collection
{ {
$types = new Collection(VacationType::cases()); $types = VacationType::all();
return $types->filter(fn(VacationType $type) => $this->configRetriever->hasLimit($type)); return $types->filter(fn(VacationType $type) => $this->configRetriever->hasLimit($type));
} }

View File

@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Controllers\Api;
use Illuminate\Http\JsonResponse;
use Toby\Domain\Enums\VacationType;
use Toby\Domain\VacationTypeConfigRetriever;
use Toby\Eloquent\Models\User;
use Toby\Infrastructure\Http\Controllers\Controller;
use Toby\Infrastructure\Http\Requests\Api\GetAvailableVacationTypesRequest;
class GetAvailableVacationTypesController extends Controller
{
public function __invoke(
GetAvailableVacationTypesRequest $request,
VacationTypeConfigRetriever $configRetriever,
): JsonResponse {
/** @var User $user */
$user = User::query()->find($request->get("user"));
$types = VacationType::all()
->filter(fn(VacationType $type) => $configRetriever->isAvailableFor($type, $user->employment_form))
->map(fn(VacationType $type) => [
"label" => $type->label(),
"value" => $type->value,
])
->values();
return new JsonResponse($types);
}
}

View File

@ -7,30 +7,43 @@ namespace Toby\Infrastructure\Http\Controllers;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Facades\Excel;
use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Toby\Domain\Enums\EmploymentForm;
use Toby\Domain\Enums\Month; use Toby\Domain\Enums\Month;
use Toby\Domain\Enums\VacationType;
use Toby\Domain\TimesheetExport; use Toby\Domain\TimesheetExport;
use Toby\Domain\VacationTypeConfigRetriever;
use Toby\Eloquent\Helpers\YearPeriodRetriever; use Toby\Eloquent\Helpers\YearPeriodRetriever;
use Toby\Eloquent\Models\User; use Toby\Eloquent\Models\User;
class TimesheetController extends Controller class TimesheetController extends Controller
{ {
public function __invoke(Month $month, YearPeriodRetriever $yearPeriodRetriever): BinaryFileResponse public function __invoke(
{ Month $month,
YearPeriodRetriever $yearPeriodRetriever,
VacationTypeConfigRetriever $configRetriever,
): BinaryFileResponse {
$this->authorize("generateTimesheet"); $this->authorize("generateTimesheet");
$yearPeriod = $yearPeriodRetriever->selected(); $yearPeriod = $yearPeriodRetriever->selected();
$carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber()); $carbonMonth = Carbon::create($yearPeriod->year, $month->toCarbonNumber());
$users = User::query() $users = User::query()
->where("employment_form", EmploymentForm::EmploymentContract)
->orderBy("last_name") ->orderBy("last_name")
->orderBy("first_name") ->orderBy("first_name")
->get(); ->get();
$types = VacationType::all()
->filter(
fn(VacationType $type) => $configRetriever->isAvailableFor($type, EmploymentForm::EmploymentContract),
);
$filename = "{$carbonMonth->translatedFormat("F Y")}.xlsx"; $filename = "{$carbonMonth->translatedFormat("F Y")}.xlsx";
$timesheet = (new TimesheetExport()) $timesheet = (new TimesheetExport())
->forMonth($carbonMonth) ->forMonth($carbonMonth)
->forUsers($users); ->forUsers($users)
->forVacationTypes($types);
return Excel::download($timesheet, $filename); return Excel::download($timesheet, $filename);
} }

View File

@ -158,10 +158,7 @@ class VacationRequestController extends Controller
public function create(Request $request, YearPeriodRetriever $yearPeriodRetriever): Response public function create(Request $request, YearPeriodRetriever $yearPeriodRetriever): Response
{ {
$yearPeriod = $yearPeriodRetriever->selected();
$users = User::query() $users = User::query()
->withVacationLimitIn($yearPeriod)
->orderBy("last_name") ->orderBy("last_name")
->orderBy("first_name") ->orderBy("first_name")
->get(); ->get();

View File

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Toby\Infrastructure\Http\Requests\Api;
use Illuminate\Foundation\Http\FormRequest;
class GetAvailableVacationTypesRequest extends FormRequest
{
public function rules(): array
{
return [
"user" => ["required", "exists:users,id"],
];
}
}

View File

@ -2,6 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
use Toby\Domain\Enums\EmploymentForm;
use Toby\Domain\Enums\VacationType; use Toby\Domain\Enums\VacationType;
use Toby\Domain\VacationTypeConfigRetriever; use Toby\Domain\VacationTypeConfigRetriever;
@ -11,53 +12,100 @@ return [
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => true, VacationTypeConfigRetriever::KEY_HAS_LIMIT => true,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::OnRequest->value => [ VacationType::OnRequest->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => true, VacationTypeConfigRetriever::KEY_HAS_LIMIT => true,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::TimeInLieu->value => [ VacationType::TimeInLieu->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => false, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => false,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => false, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => false,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Sick->value => [ VacationType::Sick->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => false, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => false,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Unpaid->value => [ VacationType::Unpaid->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => false, VacationTypeConfigRetriever::KEY_BILLABLE => false,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Special->value => [ VacationType::Special->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => false, VacationTypeConfigRetriever::KEY_BILLABLE => false,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Childcare->value => [ VacationType::Childcare->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => false, VacationTypeConfigRetriever::KEY_BILLABLE => false,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Training->value => [ VacationType::Training->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
], ],
VacationType::Volunteering->value => [ VacationType::Volunteering->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true, VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true, VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true, VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false, VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
],
VacationType::Volunteering->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => true,
VacationTypeConfigRetriever::KEY_BILLABLE => true,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::EmploymentContract,
],
],
VacationType::Absence->value => [
VacationTypeConfigRetriever::KEY_TECHNICAL_APPROVAL => true,
VacationTypeConfigRetriever::KEY_ADMINISTRATIVE_APPROVAL => false,
VacationTypeConfigRetriever::KEY_BILLABLE => false,
VacationTypeConfigRetriever::KEY_HAS_LIMIT => false,
VacationTypeConfigRetriever::KEY_AVAILABLE_FOR => [
EmploymentForm::CommissionContract,
EmploymentForm::B2bContract,
EmploymentForm::BoardMemberContract,
],
], ],
]; ];

1809
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,263 @@
<svg version="1.1" width="120mm" height="40mm" viewBox="0 0 247.56 84.867" xmlns="http://www.w3.org/2000/svg"> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<g transform="translate(-24.251 -29.695)"> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<rect x="49.391" y="55.396" width="36.399" height="31.455" fill="none" stroke-width=".26458"/>
<rect x="78.629" y="48.576" width="11.849" height="22.76" fill="none" stroke-width=".26458"/> <svg
<rect x="34.217" y="41.501" width="52.169" height="17.731" fill="none" stroke-width=".28432"/> width="244.73129mm"
<rect x="29.563" y="50.338" width="21.5" height="59.423" fill="none" stroke-width=".43534"/> height="69.601463mm"
<rect x="51.948" y="83.526" width="37.677" height="24.976" fill="none" stroke-width=".25616"/> viewBox="0 0 244.7313 69.601463"
<path d="m30.841 107.97h18.175v-53.797l-8.9598-9.4978-9.2153 9.5215zm21.47 6.5913h-24.765c-1.8203 0-3.2956-1.476-3.2956-3.2956v-58.402c0-0.85478 0.33302-1.6771 0.92745-2.2909l12.542-12.959c0.62618-0.64734 1.4817-0.99236 2.389-1.004 0.89994 6e-3 1.7582 0.37959 2.3756 1.034l12.224 12.959c0.57644 0.61101 0.89747 1.4199 0.89747 2.2613v58.402c0 1.8196-1.475 3.2956-3.2953 3.2956" fill="#fff"/> version="1.1"
<path d="m91.783 114.55h-39.526c-1.8196 0-3.2953-1.4746-3.2953-3.2942v-56.774c0-1.8196 1.4757-3.2956 3.2953-3.2956 1.8203 0 3.2957 1.476 3.2957 3.2956v53.479h32.935v-19.798l-8.3273-8.4141c-0.62195-0.629-0.96555-1.4803-0.95215-2.365 0.012-0.88335 0.37924-1.7254 1.0192-2.3357l8.2603-7.8835v-14.892c0-1.8203 1.4757-3.2956 3.2957-3.2956 1.8203 0 3.2949 1.4753 3.2949 3.2956v16.302c0 0.90064-0.36759 1.7625-1.0195 2.3837l-6.8534 6.5405 6.9201 6.9914c0.61066 0.61736 0.95285 1.4503 0.95285 2.3181v24.447c0 1.8196-1.4746 3.2942-3.2949 3.2942" fill="#fff"/> id="svg80224"
<path d="m91.785 55.564c-0.95638 0-1.9053-0.41381-2.5573-1.2146l-9.615-11.809-38.795 0.049h-0.0042c-1.8186 0-3.2921-1.4714-3.2953-3.2907-0.0025-1.8189 1.4714-3.2956 3.2911-3.2985l40.363-0.0529h0.0056c0.98883 0 1.9283 0.44661 2.5538 1.2153l10.606 13.025c1.1497 1.4125 0.93768 3.4876-0.47308 4.6369-0.61207 0.49777-1.349 0.73978-2.0793 0.73978" fill="#fff"/> inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
<path d="m81.455 42.589h-40.642c-1.8203 0-3.2953-1.475-3.2953-3.2949v-6.3034c0-1.82 1.475-3.2956 3.2953-3.2956h40.642c1.8196 0 3.2942 1.4757 3.2942 3.2956v6.3034c0 1.82-1.4746 3.2949-3.2942 3.2949" fill="#fff"/> sodipodi:docname="logo-white.svg"
<path d="m55.657 80.088c0-27.744-3.53e-4 -27.811-0.24152-28.455-0.24946-0.66676-0.39359-0.82818-6.5083-7.2892l-1.6452-1.7384h32.308l8.8511 10.869v13.63l-3.9188 3.7465c-2.1553 2.0606-4.1251 3.9568-4.3772 4.2139-0.66375 0.67676-0.94174 1.3731-0.94517 2.3675-0.0049 1.4251 0.0387 1.4818 4.8994 6.3692l4.3418 4.3656v19.731h-32.764z" fill="none" stroke-width=".11786"/> xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
<path d="m30.911 81.056 0.0038-26.842 4.5152-4.6554c2.4834-2.5604 4.565-4.6554 4.626-4.6554 0.06091 0 2.0846 2.0913 4.4971 4.6472l4.3863 4.6472v53.7h-18.032z" fill="none" stroke-width=".11786"/> xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
<text transform="matrix(.28744 0 0 .28614 -24.649 -29.82)" fill="#ffffff" font-family="sans-serif" font-size="133.33px"><tspan x="485.27344" y="426.98435"><tspan font-family="'Noto Sans'" font-weight="bold">blumilk_</tspan></tspan></text> xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview80226"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="1.28"
inkscape:cx="154.29688"
inkscape:cy="23.828125"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs80221">
<rect
x="991.17279"
y="263.08698"
width="283.1123"
height="247.67056"
id="rect8865" />
<rect
x="246.87256"
y="513.23352"
width="804.60596"
height="227.1886"
id="rect32545" />
<rect
x="680.15295"
y="386.98709"
width="163.83398"
height="175.02707"
id="rect89958" />
<rect
x="810.47534"
y="183.82571"
width="61.877686"
height="115.71045"
id="rect63811" />
<rect
x="390.16162"
y="373.04883"
width="587.10767"
height="148.67529"
id="rect1326" />
<rect
x="277.46655"
y="20.94696"
width="1053.7234"
height="420.91852"
id="rect1787" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect1079" />
<rect
x="921.66388"
y="183.43486"
width="403.66849"
height="262.4295"
id="rect64704" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect1079-6" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect84376" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-24.161845,-37.464546)"
style="display:inline">
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.211846"
id="rect965"
width="28.452639"
height="25.796806"
x="43.81361"
y="58.542248" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.211846"
id="rect967"
width="9.2621002"
height="18.665979"
x="66.669006"
y="52.949459" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.227645"
id="rect961"
width="40.779999"
height="14.541289"
x="31.952787"
y="47.146923" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.348565"
id="rect953"
width="16.806044"
height="48.734505"
x="28.314148"
y="54.393925" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.205104"
id="rect957"
width="29.452147"
height="20.483652"
x="45.812618"
y="81.612579" />
<path
d="M 29.313654,101.66031 H 43.520981 V 57.539869 l -7.003837,-7.78941 -7.20349,7.808801 z m 16.782678,5.4057 H 26.738025 c -1.422938,0 -2.57618,-1.21053 -2.57618,-2.70285 V 56.465909 c 0,-0.701027 0.26032,-1.375434 0.724982,-1.878851 l 9.803661,-10.627963 c 0.489481,-0.5309 1.158206,-0.813859 1.867469,-0.823407 0.703472,0.0049 1.374405,0.311314 1.85699,0.848003 l 9.555751,10.627667 c 0.450597,0.501106 0.701542,1.164521 0.701542,1.854551 v 47.897251 c 0,1.49232 -1.15297,2.70285 -2.575908,2.70285"
style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path915"
inkscape:connector-curvature="0" />
<path
d="M 76.95122,107.0529 H 46.053864 c -1.422384,0 -2.575905,-1.20936 -2.575905,-2.70168 V 57.789467 c 0,-1.492316 1.153521,-2.702837 2.575905,-2.702837 1.422942,0 2.576184,1.210521 2.576184,2.702837 V 101.64895 H 74.375036 V 85.412487 L 67.865642,78.51187 c -0.48617,-0.51586 -0.754763,-1.214 -0.744284,-1.939614 0.0094,-0.724456 0.296445,-1.415076 0.79668,-1.915598 l 6.456999,-6.465484 V 55.977736 c 0,-1.492898 1.15352,-2.702845 2.576183,-2.702845 1.422936,0 2.575624,1.209947 2.575624,2.702845 v 13.369569 c 0,0.738639 -0.28734,1.445455 -0.79695,1.954949 l -5.357258,5.364028 5.409374,5.733787 c 0.477349,0.50631 0.744834,1.189402 0.744834,1.90114 v 20.050011 c 0,1.49232 -1.152688,2.70168 -2.575624,2.70168"
style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path919"
inkscape:connector-curvature="0" />
<path
d="m 76.952844,58.67992 c -0.747594,0 -1.489395,-0.339378 -1.999002,-0.996142 l -7.515935,-9.684761 -30.325693,0.04019 h -0.0033 c -1.42156,0 -2.573423,-1.206767 -2.575905,-2.698795 -0.002,-1.49175 1.150209,-2.702846 2.572596,-2.705166 l 31.551185,-0.04338 h 0.0044 c 0.772962,0 1.50732,0.366276 1.996251,0.996714 l 8.290548,10.681765 c 0.89871,1.158442 0.732977,2.860237 -0.369801,3.802848 -0.478449,0.408234 -1.054519,0.606711 -1.625349,0.606711"
style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path923"
inkscape:connector-curvature="0" />
<path
d="M 68.878135,48.039259 H 37.108822 c -1.422939,0 -2.575905,-1.209652 -2.575905,-2.702261 v -5.169606 c 0,-1.492609 1.152966,-2.702846 2.575905,-2.702846 h 31.769313 c 1.42239,0 2.57508,1.210237 2.57508,2.702846 v 5.169606 c 0,1.492609 -1.15269,2.702261 -2.57508,2.702261"
style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path927"
inkscape:connector-curvature="0" />
<path
style="display:inline;fill:none;stroke-width:0.0943655"
d="m 48.712098,78.793297 c 0,-22.753539 -2.76e-4,-22.808831 -0.188793,-23.336974 -0.195002,-0.546824 -0.307666,-0.67921 -5.087475,-5.978078 L 42.149786,48.052544 H 54.777317 67.40485 l 3.459402,4.456979 3.459403,4.45698 v 5.58911 5.589113 l -3.063253,3.072573 c -1.68479,1.689916 -3.22452,3.245088 -3.421621,3.455935 -0.518846,0.555029 -0.736148,1.126098 -0.738834,1.941639 -0.0038,1.168754 0.03025,1.21526 3.829799,5.223517 l 3.39391,3.580339 v 8.091069 8.091062 H 61.517877 48.712098 Z"
id="path518" />
<path
style="display:inline;fill:none;stroke-width:0.0943655"
d="m 29.368187,79.587096 0.003,-22.013775 3.529503,-3.817977 c 1.941225,-2.099888 3.568454,-3.817976 3.616068,-3.817976 0.04761,0 1.629513,1.715094 3.515334,3.811319 l 3.428769,3.811319 V 79.580438 101.60086 H 36.41308 29.365295 Z"
id="path557" />
<text
xml:space="preserve"
transform="matrix(0.26458333,0,0,0.26458333,24.250619,29.695139)"
id="text1785"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1787);fill:#000000;fill-opacity:1;stroke:none" />
<text
xml:space="preserve"
transform="matrix(0.26458333,0,0,0.26458333,24.250619,29.695139)"
id="text1324"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1326);fill:#000000;fill-opacity:1;stroke:none" />
<g
aria-label="blumilk"
transform="matrix(0.28364421,0,0,0.2878478,-31.410033,-30.656952)"
id="text32837"
style="font-size:134.411px;line-height:1.25;white-space:pre;shape-inside:url(#rect1079-6);display:inline;stroke-width:0.916436;fill:#ffffff">
<path
d="m 515.78473,349.60359 q 0,4.16674 -0.26882,8.19907 -0.26882,4.03233 -0.53764,6.31732 h 0.80646 q 2.95705,-4.56998 7.93025,-7.66143 4.97321,-3.22587 12.90346,-3.22587 12.36581,0 20.02724,9.6776 7.66142,9.54318 7.66142,28.22631 0,18.81753 -7.79583,28.49513 -7.79584,9.67759 -20.43048,9.67759 -8.06466,0 -12.76904,-2.82263 -4.56997,-2.95704 -7.52702,-6.58614 h -1.34411 l -3.36027,8.06466 H 495.7575 V 325.81284 h 20.02723 z m 14.38198,19.624 q -7.79584,0 -11.0217,4.8388 -3.09145,4.83879 -3.36028,14.78521 v 2.15057 q 0,10.61847 3.09146,16.39815 3.22586,5.64526 11.55934,5.64526 6.18291,0 9.812,-5.64526 3.6291,-5.77968 3.6291,-16.53256 0,-10.75288 -3.76351,-16.12932 -3.62909,-5.51085 -9.94641,-5.51085 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path855" />
<path
d="M 600.86682,427.9652 H 580.83958 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path857" />
<path
d="m 689.17463,354.57679 v 73.38841 h -15.32285 l -2.68822,-9.40877 h -1.07529 q -3.49469,5.64526 -9.67759,8.19907 -6.0485,2.55381 -12.90346,2.55381 -11.82817,0 -18.95195,-6.31732 -7.12378,-6.45173 -7.12378,-20.56488 v -47.85032 h 20.02724 v 42.87711 q 0,7.79584 2.82263,11.82817 2.82263,4.03233 9.00553,4.03233 9.13995,0 12.50023,-6.18291 3.36027,-6.31731 3.36027,-18.01107 v -34.54363 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path859" />
<path
d="m 796.30014,353.23268 q 12.50022,0 18.81754,6.45173 6.45172,6.31732 6.45172,20.43047 v 47.85032 h -20.02724 v -42.87711 q 0,-15.8605 -11.0217,-15.8605 -7.93025,0 -11.29052,5.64526 -3.36028,5.64527 -3.36028,16.26374 v 36.82861 h -20.02723 v -42.87711 q 0,-15.8605 -11.02171,-15.8605 -8.33348,0 -11.55934,6.31732 -3.09145,6.18291 -3.09145,17.87666 v 34.54363 h -20.02724 v -73.38841 h 15.32285 l 2.68822,9.40877 h 1.07529 q 3.36027,-5.64526 9.13995,-8.19907 5.91408,-2.55381 12.2314,-2.55381 8.06466,0 13.70992,2.68822 5.64526,2.55381 8.6023,8.06466 h 1.74735 q 3.36027,-5.64526 9.27435,-8.19907 6.0485,-2.55381 12.36582,-2.55381 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path861" />
<path
d="m 852.21491,325.81284 q 4.43556,0 7.66142,2.15058 3.22587,2.01616 3.22587,7.66142 0,5.51085 -3.22587,7.66143 -3.22586,2.15058 -7.66142,2.15058 -4.56998,0 -7.79584,-2.15058 -3.09145,-2.15058 -3.09145,-7.66143 0,-5.64526 3.09145,-7.66142 3.22586,-2.15058 7.79584,-2.15058 z m 9.94641,28.76395 v 73.38841 h -20.02724 v -73.38841 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path863" />
<path
d="M 903.15647,427.9652 H 883.12923 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path865" />
<path
d="m 944.15162,371.51258 q 0,4.16674 -0.40324,8.33348 -0.26882,4.03233 -0.67205,8.19907 h 0.26882 q 2.01616,-2.82263 4.16674,-5.64526 2.15058,-2.95704 4.56997,-5.51085 l 20.56489,-22.31223 h 22.58104 l -29.16718,31.85541 30.91453,41.533 h -23.11869 l -21.10253,-29.70483 -8.6023,6.85496 V 427.9652 H 924.12438 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';fill:#ffffff"
id="path867" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="264.2663"
y="114.04919"
id="text80406"><tspan
sodipodi:role="line"
id="tspan80404"
style="stroke-width:0.264583"
x="264.2663"
y="114.04919" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:134.411px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect84376);display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.916436"
x="488.44507"
y="81.08667"
id="text84374"
transform="matrix(0.28364421,0,0,0.2878478,-23.191075,-30.656952)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="284.96225"
y="115.1661"
id="text85634"><tspan
sodipodi:role="line"
id="tspan85632"
style="stroke-width:0.264583"
x="284.96225"
y="115.1661" /></text>
<g
aria-label="_"
transform="matrix(0.26458333,0,0,0.37861841,-10.66174,-62.784446)"
id="text8863"
style="font-size:146.667px;line-height:1.25;white-space:pre;shape-inside:url(#rect8865);fill:#ffffff">
<path
d="m 1056.5854,419.12328 h -65.70686 v -9.38669 h 65.70686 z"
style="font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';fill:#ffffff"
id="path870" />
</g>
<path
style="fill:none;stroke-width:0.234058"
d="m 48.710473,78.640575 c -0.0088,-12.625517 -0.08595,-23.139231 -0.171381,-23.363809 -0.08543,-0.224578 -1.46639,-1.86127 -3.068808,-3.637093 -1.602417,-1.775824 -2.913486,-3.291264 -2.913486,-3.367645 0,-0.07638 5.584392,-0.138875 12.40976,-0.138875 h 12.409761 l 3.471596,4.472882 3.471596,4.472881 v 5.45835 5.458351 l -2.680556,2.715262 c -1.474307,1.493396 -3.061488,3.100142 -3.527066,3.570552 -0.465578,0.470407 -0.91928,1.159487 -1.008224,1.531296 -0.328008,1.371145 0.132736,2.113152 3.731088,6.008726 l 3.484758,3.772594 v 8.001008 8.001005 H 61.523023 48.726533 l -0.01605,-22.955485 z"
id="path933" />
<path
style="fill:none;stroke-width:0.234058"
d="M 29.5318,79.56025 V 57.52444 l 3.482349,-3.769394 3.482349,-3.769393 3.480539,3.808694 3.480539,3.808694 0.0066,21.99651 0.0066,21.996509 H 36.501316 29.5318 Z"
id="path972" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 14 KiB

263
public/img/logo.svg Normal file
View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="236.98224mm"
height="69.601463mm"
viewBox="0 0 236.98225 69.601463"
version="1.1"
id="svg80224"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview80226"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.90509668"
inkscape:cx="495.52717"
inkscape:cy="209.3699"
inkscape:window-width="1920"
inkscape:window-height="1007"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs80221">
<rect
x="991.17279"
y="263.08698"
width="283.1123"
height="247.67056"
id="rect8865" />
<rect
x="246.87256"
y="513.23352"
width="804.60596"
height="227.1886"
id="rect32545" />
<rect
x="680.15295"
y="386.98709"
width="163.83398"
height="175.02707"
id="rect89958" />
<rect
x="810.47534"
y="183.82571"
width="61.877686"
height="115.71045"
id="rect63811" />
<rect
x="390.16162"
y="373.04883"
width="587.10767"
height="148.67529"
id="rect1326" />
<rect
x="277.46655"
y="20.94696"
width="1053.7234"
height="420.91852"
id="rect1787" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect1079" />
<rect
x="921.66388"
y="183.43486"
width="403.66849"
height="262.4295"
id="rect64704" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect1079-6" />
<rect
x="485.27386"
y="305.66843"
width="594.31201"
height="170.87466"
id="rect84376" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-24.161845,-37.464546)"
style="display:inline">
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.211846"
id="rect965"
width="28.452639"
height="25.796806"
x="43.81361"
y="58.542248" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.211846"
id="rect967"
width="9.2621002"
height="18.665979"
x="66.669006"
y="52.949459" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.227645"
id="rect961"
width="40.779892"
height="14.541289"
x="31.952787"
y="47.146923" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.348565"
id="rect953"
width="16.806044"
height="48.734505"
x="28.314148"
y="54.393925" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke-width:0.205104"
id="rect957"
width="29.452147"
height="20.483652"
x="45.812618"
y="81.612579" />
<path
d="M 29.313654,101.66031 H 43.520981 V 57.539869 l -7.003837,-7.78941 -7.20349,7.808801 z m 16.782678,5.4057 H 26.738025 c -1.422938,0 -2.57618,-1.21053 -2.57618,-2.70285 V 56.465909 c 0,-0.701027 0.26032,-1.375434 0.724982,-1.878851 l 9.803661,-10.627963 c 0.489481,-0.5309 1.158206,-0.813859 1.867469,-0.823407 0.703472,0.0049 1.374405,0.311314 1.85699,0.848003 l 9.555751,10.627667 c 0.450597,0.501106 0.701542,1.164521 0.701542,1.854551 v 47.897251 c 0,1.49232 -1.15297,2.70285 -2.575908,2.70285"
style="display:inline;fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path915"
inkscape:connector-curvature="0" />
<path
d="M 76.95122,107.0529 H 46.053864 c -1.422384,0 -2.575905,-1.20936 -2.575905,-2.70168 V 57.789467 c 0,-1.492316 1.153521,-2.702837 2.575905,-2.702837 1.422942,0 2.576184,1.210521 2.576184,2.702837 V 101.64895 H 74.375036 V 85.412487 L 67.865642,78.51187 c -0.48617,-0.51586 -0.754763,-1.214 -0.744284,-1.939614 0.0094,-0.724456 0.296445,-1.415076 0.79668,-1.915598 l 6.456999,-6.465484 V 55.977736 c 0,-1.492898 1.15352,-2.702845 2.576183,-2.702845 1.422936,0 2.575624,1.209947 2.575624,2.702845 v 13.369569 c 0,0.738639 -0.28734,1.445455 -0.79695,1.954949 l -5.357258,5.364028 5.409374,5.733787 c 0.477349,0.50631 0.744834,1.189402 0.744834,1.90114 v 20.050011 c 0,1.49232 -1.152688,2.70168 -2.575624,2.70168"
style="display:inline;fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path919"
inkscape:connector-curvature="0" />
<path
d="m 76.952844,58.67992 c -0.747594,0 -1.489395,-0.339378 -1.999002,-0.996142 l -7.515935,-9.684761 -30.325693,0.04019 h -0.0033 c -1.42156,0 -2.573423,-1.206767 -2.575905,-2.698795 -0.002,-1.49175 1.150209,-2.702846 2.572596,-2.705166 l 31.551185,-0.04338 h 0.0044 c 0.772962,0 1.50732,0.366276 1.996251,0.996714 l 8.290548,10.681765 c 0.89871,1.158442 0.732977,2.860237 -0.369801,3.802848 -0.478449,0.408234 -1.054519,0.606711 -1.625349,0.606711"
style="display:inline;fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path923"
inkscape:connector-curvature="0" />
<path
d="M 68.878135,48.039259 H 37.108822 c -1.422939,0 -2.575905,-1.209652 -2.575905,-2.702261 v -5.169606 c 0,-1.492609 1.152966,-2.702846 2.575905,-2.702846 h 31.769313 c 1.42239,0 2.57508,1.210237 2.57508,2.702846 v 5.169606 c 0,1.492609 -1.15269,2.702261 -2.57508,2.702261"
style="display:inline;fill:#527aba;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.282461"
id="path927"
inkscape:connector-curvature="0" />
<path
style="display:inline;fill:none;stroke-width:0.0943655"
d="m 48.712098,78.793297 c 0,-22.753539 -2.76e-4,-22.808831 -0.188793,-23.336974 -0.195002,-0.546824 -0.307666,-0.67921 -5.087475,-5.978078 L 42.149786,48.052544 H 54.777317 67.40485 l 3.459402,4.456979 3.459403,4.45698 v 5.58911 5.589113 l -3.063253,3.072573 c -1.68479,1.689916 -3.22452,3.245088 -3.421621,3.455935 -0.518846,0.555029 -0.736148,1.126098 -0.738834,1.941639 -0.0038,1.168754 0.03025,1.21526 3.829799,5.223517 l 3.39391,3.580339 v 8.091069 8.091062 H 61.517877 48.712098 Z"
id="path518" />
<path
style="display:inline;fill:none;stroke-width:0.0943655"
d="m 29.368187,79.587096 0.003,-22.013775 3.529503,-3.817977 c 1.941225,-2.099888 3.568454,-3.817976 3.616068,-3.817976 0.04761,0 1.629513,1.715094 3.515334,3.811319 l 3.428769,3.811319 V 79.580438 101.60086 H 36.41308 29.365295 Z"
id="path557" />
<text
xml:space="preserve"
transform="matrix(0.26458333,0,0,0.26458333,24.250619,29.695139)"
id="text1785"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1787);fill:#000000;fill-opacity:1;stroke:none" />
<text
xml:space="preserve"
transform="matrix(0.26458333,0,0,0.26458333,24.250619,29.695139)"
id="text1324"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1326);fill:#000000;fill-opacity:1;stroke:none" />
<g
aria-label="blumilk"
transform="matrix(0.28364421,0,0,0.2878478,-39.1591,-30.83747)"
id="text32837"
style="font-size:134.411px;line-height:1.25;white-space:pre;shape-inside:url(#rect1079-6);display:inline;stroke-width:0.916436">
<path
d="m 515.78473,349.60359 q 0,4.16674 -0.26882,8.19907 -0.26882,4.03233 -0.53764,6.31732 h 0.80646 q 2.95705,-4.56998 7.93025,-7.66143 4.97321,-3.22587 12.90346,-3.22587 12.36581,0 20.02724,9.6776 7.66142,9.54318 7.66142,28.22631 0,18.81753 -7.79583,28.49513 -7.79584,9.67759 -20.43048,9.67759 -8.06466,0 -12.76904,-2.82263 -4.56997,-2.95704 -7.52702,-6.58614 h -1.34411 l -3.36027,8.06466 H 495.7575 V 325.81284 h 20.02723 z m 14.38198,19.624 q -7.79584,0 -11.0217,4.8388 -3.09145,4.83879 -3.36028,14.78521 v 2.15057 q 0,10.61847 3.09146,16.39815 3.22586,5.64526 11.55934,5.64526 6.18291,0 9.812,-5.64526 3.6291,-5.77968 3.6291,-16.53256 0,-10.75288 -3.76351,-16.12932 -3.62909,-5.51085 -9.94641,-5.51085 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path855" />
<path
d="M 600.86682,427.9652 H 580.83958 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path857" />
<path
d="m 689.17463,354.57679 v 73.38841 h -15.32285 l -2.68822,-9.40877 h -1.07529 q -3.49469,5.64526 -9.67759,8.19907 -6.0485,2.55381 -12.90346,2.55381 -11.82817,0 -18.95195,-6.31732 -7.12378,-6.45173 -7.12378,-20.56488 v -47.85032 h 20.02724 v 42.87711 q 0,7.79584 2.82263,11.82817 2.82263,4.03233 9.00553,4.03233 9.13995,0 12.50023,-6.18291 3.36027,-6.31731 3.36027,-18.01107 v -34.54363 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path859" />
<path
d="m 796.30014,353.23268 q 12.50022,0 18.81754,6.45173 6.45172,6.31732 6.45172,20.43047 v 47.85032 h -20.02724 v -42.87711 q 0,-15.8605 -11.0217,-15.8605 -7.93025,0 -11.29052,5.64526 -3.36028,5.64527 -3.36028,16.26374 v 36.82861 h -20.02723 v -42.87711 q 0,-15.8605 -11.02171,-15.8605 -8.33348,0 -11.55934,6.31732 -3.09145,6.18291 -3.09145,17.87666 v 34.54363 h -20.02724 v -73.38841 h 15.32285 l 2.68822,9.40877 h 1.07529 q 3.36027,-5.64526 9.13995,-8.19907 5.91408,-2.55381 12.2314,-2.55381 8.06466,0 13.70992,2.68822 5.64526,2.55381 8.6023,8.06466 h 1.74735 q 3.36027,-5.64526 9.27435,-8.19907 6.0485,-2.55381 12.36582,-2.55381 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path861" />
<path
d="m 852.21491,325.81284 q 4.43556,0 7.66142,2.15058 3.22587,2.01616 3.22587,7.66142 0,5.51085 -3.22587,7.66143 -3.22586,2.15058 -7.66142,2.15058 -4.56998,0 -7.79584,-2.15058 -3.09145,-2.15058 -3.09145,-7.66143 0,-5.64526 3.09145,-7.66142 3.22586,-2.15058 7.79584,-2.15058 z m 9.94641,28.76395 v 73.38841 h -20.02724 v -73.38841 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path863" />
<path
d="M 903.15647,427.9652 H 883.12923 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path865" />
<path
d="m 944.15162,371.51258 q 0,4.16674 -0.40324,8.33348 -0.26882,4.03233 -0.67205,8.19907 h 0.26882 q 2.01616,-2.82263 4.16674,-5.64526 2.15058,-2.95704 4.56997,-5.51085 l 20.56489,-22.31223 h 22.58104 l -29.16718,31.85541 30.91453,41.533 h -23.11869 l -21.10253,-29.70483 -8.6023,6.85496 V 427.9652 H 924.12438 V 325.81284 h 20.02724 z"
style="font-weight:bold;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold'"
id="path867" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="264.2663"
y="114.04919"
id="text80406"><tspan
sodipodi:role="line"
id="tspan80404"
style="stroke-width:0.264583"
x="264.2663"
y="114.04919" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:134.411px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect84376);display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.916436"
x="488.44507"
y="81.08667"
id="text84374"
transform="matrix(0.28364421,0,0,0.2878478,-23.191075,-30.656952)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="284.96225"
y="115.1661"
id="text85634"><tspan
sodipodi:role="line"
id="tspan85632"
style="stroke-width:0.264583"
x="284.96225"
y="115.1661" /></text>
<g
aria-label="_"
transform="matrix(0.26458333,0,0,0.37861841,-18.410807,-62.964964)"
id="text8863"
style="font-size:146.667px;line-height:1.25;white-space:pre;shape-inside:url(#rect8865);fill:#527aba;fill-opacity:1">
<path
d="m 1056.5854,419.12328 h -65.70686 v -9.38669 h 65.70686 z"
style="font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans';fill:#527aba;fill-opacity:1"
id="path870" />
</g>
<path
style="fill:#ffffff;stroke-width:0.234058"
d="m 48.710473,78.640575 c -0.0088,-12.625517 -0.08595,-23.139231 -0.171381,-23.363809 -0.08543,-0.224578 -1.46639,-1.86127 -3.068808,-3.637093 -1.602417,-1.775824 -2.913486,-3.291264 -2.913486,-3.367645 0,-0.07638 5.584392,-0.138875 12.40976,-0.138875 h 12.409761 l 3.471596,4.472882 3.471596,4.472881 v 5.45835 5.458351 l -2.680556,2.715262 c -1.474307,1.493396 -3.061488,3.100142 -3.527066,3.570552 -0.465578,0.470407 -0.91928,1.159487 -1.008224,1.531296 -0.328008,1.371145 0.132736,2.113152 3.731088,6.008726 l 3.484758,3.772594 v 8.001008 8.001005 H 61.523023 48.726533 l -0.01605,-22.955485 z"
id="path933" />
<path
style="fill:#ffffff;stroke-width:0.234058"
d="M 29.5318,79.56025 V 57.52444 l 3.482349,-3.769394 3.482349,-3.769393 3.480539,3.808694 3.480539,3.808694 0.0066,21.99651 0.0066,21.996509 H 36.501316 29.5318 Z"
id="path972" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -7,6 +7,7 @@ import CurrencyUsdOffIcon from 'vue-material-design-icons/CurrencyUsdOff.vue'
import HandHeartOutlineIcon from 'vue-material-design-icons/HandHeartOutline.vue' import HandHeartOutlineIcon from 'vue-material-design-icons/HandHeartOutline.vue'
import CalendarCheckIcon from 'vue-material-design-icons/CalendarCheck.vue' import CalendarCheckIcon from 'vue-material-design-icons/CalendarCheck.vue'
import MedicalBagIcon from 'vue-material-design-icons/MedicalBag.vue' import MedicalBagIcon from 'vue-material-design-icons/MedicalBag.vue'
import CalendarRemoveIcon from 'vue-material-design-icons/CalendarRemove.vue'
const types = [ const types = [
{ {
@ -99,6 +100,12 @@ const types = [
pending: 'border-rose-300', pending: 'border-rose-300',
}, },
}, },
{
text: 'Nieobecność',
value: 'absence',
icon: CalendarRemoveIcon,
color: 'text-cyan-500',
},
] ]
export default function useVacationTypeInfo() { export default function useVacationTypeInfo() {

View File

@ -34,12 +34,12 @@
</div> </div>
</transition> </transition>
<div <div
class="flex flex-col items-center py-8 px-4 space-y-4 text-white rounded-lg sm:mx-auto sm:w-full sm:max-w-md" class="flex flex-col items-center py-8 px-4 space-y-8 text-white rounded-lg sm:mx-auto sm:w-full sm:max-w-md"
dusk="login-link" dusk="login-link"
> >
<img <img
class="mx-auto w-auto h-50" class="mx-auto w-auto h-50"
src="img/logo.png" src="img/logo.svg"
> >
<a <a
href="/login/google/start" href="/login/google/start"

View File

@ -4,7 +4,7 @@
<div class="flex justify-between items-center p-4 sm:px-6"> <div class="flex justify-between items-center p-4 sm:px-6">
<div class="flex items-center"> <div class="flex items-center">
<h2 class="text-lg font-medium leading-6 text-gray-900"> <h2 class="text-lg font-medium leading-6 text-gray-900">
Wykorzystanie miesięczne urlopu wypoczynkowego Wykorzystanie miesięczne urlopu
</h2> </h2>
</div> </div>
</div> </div>

View File

@ -30,7 +30,7 @@
scope="col" scope="col"
class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap" class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap"
> >
Posiada urlop? Posiada limit?
</th> </th>
<th <th
scope="col" scope="col"

View File

@ -1,10 +1,10 @@
<template> <template>
<InertiaHead title="Złóż wniosek urlopowy" /> <InertiaHead title="Złóż wniosek" />
<div class="grid grid-cols-1 gap-4 items-start xl:grid-cols-3 xl:gap-8"> <div class="grid grid-cols-1 gap-4 items-start xl:grid-cols-3 xl:gap-8">
<div class="flex flex-col h-full bg-white shadow-md xl:col-span-2"> <div class="flex flex-col h-full bg-white shadow-md xl:col-span-2">
<div class="p-4 sm:px-6"> <div class="p-4 sm:px-6">
<h2 class="text-lg font-medium leading-6 text-gray-900"> <h2 class="text-lg font-medium leading-6 text-gray-900">
Złóż wniosek urlopowy Złóż wniosek
</h2> </h2>
</div> </div>
<form <form
@ -42,8 +42,8 @@
</ListboxLabel> </ListboxLabel>
<div class="relative mt-1 sm:col-span-2 sm:mt-0"> <div class="relative mt-1 sm:col-span-2 sm:mt-0">
<ListboxButton <ListboxButton
class="relative py-2 pr-10 pl-3 w-full max-w-lg text-left bg-white rounded-md border focus:ring-1 shadow-sm cursor-default sm:text-sm" class="relative py-2 pr-10 pl-3 w-full max-w-lg text-left bg-white rounded-md border focus:outline-none focus:ring-1 shadow-sm cursor-default sm:text-sm"
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.user, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.user }" :class="{ 'border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500': form.errors.user, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.user }"
> >
<span class="flex items-center"> <span class="flex items-center">
<img <img
@ -63,7 +63,7 @@
leave-to-class="opacity-0" leave-to-class="opacity-0"
> >
<ListboxOptions <ListboxOptions
class="overflow-auto absolute z-10 py-1 mt-1 w-full max-w-lg max-h-60 text-base bg-white rounded-md focus:outline-none ring-1 ring-black ring-opacity-5 shadow-lg sm:text-sm" class="overflow-auto absolute z-10 py-1 mt-1 w-full max-w-lg max-h-60 text-base bg-white rounded-md focus:outline-none ring-1 focus:ring-blumilk-500 ring-opacity-5 shadow-lg sm:text-sm"
> >
<ListboxOption <ListboxOption
v-for="user in users.data" v-for="user in users.data"
@ -134,24 +134,29 @@
class="items-center py-4 sm:grid sm:grid-cols-3" class="items-center py-4 sm:grid sm:grid-cols-3"
> >
<ListboxLabel class="block text-sm font-medium text-gray-700"> <ListboxLabel class="block text-sm font-medium text-gray-700">
Rodzaj urlopu Typ wniosku
</ListboxLabel> </ListboxLabel>
<div class="relative mt-1 sm:col-span-2 sm:mt-0"> <div class="relative mt-1 sm:col-span-2 sm:mt-0">
<ListboxButton <ListboxButton
class="relative py-2 pr-10 pl-3 w-full max-w-lg text-left bg-white rounded-md border focus:ring-1 shadow-sm cursor-default sm:text-sm" class="relative py-2 pr-10 pl-3 w-full max-w-lg text-left bg-white rounded-md border focus:outline-none focus:ring-1 shadow-sm cursor-default sm:text-sm"
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.type, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.type }" :class="{ 'border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500': form.errors.type, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.type }"
> >
<span class="block truncate">{{ form.vacationType.label }}</span> <template v-if="form.vacationType">
<span class="flex absolute inset-y-0 right-0 items-center pr-2 pointer-events-none"> <span class="block truncate">{{ form.vacationType.label }}</span>
<SelectorIcon class="w-5 h-5 text-gray-400" /> <span class="flex absolute inset-y-0 right-0 items-center pr-2 pointer-events-none">
</span> <SelectorIcon class="w-5 h-5 text-gray-400" />
</span>
</template>
<template v-else>
Ładowanie...
</template>
</ListboxButton> </ListboxButton>
<transition <transition
leave-active-class="transition ease-in duration-100" leave-active-class="transition ease-in duration-100"
leave-from-class="opacity-100" leave-from-class="opacity-100"
leave-to-class="opacity-0" leave-to-class="opacity-0"
> >
<ListboxOptions class="overflow-auto absolute z-10 py-1 mt-1 w-full max-w-lg max-h-60 text-base bg-white rounded-md focus:outline-none ring-1 ring-black ring-opacity-5 shadow-lg sm:text-sm"> <ListboxOptions class="overflow-auto absolute z-10 py-1 mt-1 w-full max-w-lg max-h-60 text-base bg-white rounded-md focus:outline-none ring-1 focus:ring-blumilk-500 ring-opacity-5 shadow-lg sm:text-sm">
<ListboxOption <ListboxOption
v-for="vacationType in vacationTypes" v-for="vacationType in vacationTypes"
:key="vacationType.value" :key="vacationType.value"
@ -187,7 +192,7 @@
for="date_from" for="date_from"
class="block text-sm font-medium text-gray-700 sm:mt-px" class="block text-sm font-medium text-gray-700 sm:mt-px"
> >
Planowany urlop od Data od
</label> </label>
<div class="mt-1 sm:col-span-2 sm:mt-0"> <div class="mt-1 sm:col-span-2 sm:mt-0">
<FlatPickr <FlatPickr
@ -212,7 +217,7 @@
for="date_from" for="date_from"
class="block text-sm font-medium text-gray-700 sm:mt-px" class="block text-sm font-medium text-gray-700 sm:mt-px"
> >
Planowany urlop do Data do
</label> </label>
<div class="mt-1 sm:col-span-2 sm:mt-0"> <div class="mt-1 sm:col-span-2 sm:mt-0">
<FlatPickr <FlatPickr
@ -233,7 +238,7 @@
</div> </div>
</div> </div>
<div class="items-center py-4 sm:grid sm:grid-cols-3"> <div class="items-center py-4 sm:grid sm:grid-cols-3">
<span class="block text-sm font-medium text-gray-700 sm:mt-px">Liczba dni urlopu</span> <span class="block text-sm font-medium text-gray-700 sm:mt-px">Liczba dni</span>
<div <div
class="inline-flex items-center py-2 px-4 mt-1 w-full max-w-lg text-gray-500 bg-gray-50 rounded-md border border-gray-300 sm:col-span-2 sm:mt-0 sm:text-sm" class="inline-flex items-center py-2 px-4 mt-1 w-full max-w-lg text-gray-500 bg-gray-50 rounded-md border border-gray-300 sm:col-span-2 sm:mt-0 sm:text-sm"
> >
@ -303,10 +308,10 @@
<div class="p-4 sm:px-6"> <div class="p-4 sm:px-6">
<h2 class="text-lg font-medium leading-6 text-gray-900"> <h2 class="text-lg font-medium leading-6 text-gray-900">
<span v-if="auth.user.id !== form.user.id"> <span v-if="auth.user.id !== form.user.id">
Urlop wypoczynkowy, dane dla: {{ form.user.name }} Dane urlopowe dla: {{ form.user.name }}
</span> </span>
<span v-else> <span v-else>
Twoje dane o urlopie wypoczynkowym Twoje dane o urlopie
</span> </span>
</h2> </h2>
</div> </div>
@ -330,7 +335,6 @@ import VacationChart from '@/Shared/VacationChart'
const props = defineProps({ const props = defineProps({
auth: Object, auth: Object,
users: Object, users: Object,
vacationTypes: Object,
holidays: Object, holidays: Object,
can: Object, can: Object,
}) })
@ -341,12 +345,13 @@ const form = useForm({
: props.auth.user, : props.auth.user,
from: null, from: null,
to: null, to: null,
vacationType: props.vacationTypes[0], vacationType: null,
comment: null, comment: null,
flowSkipped: false, flowSkipped: false,
}) })
const estimatedDays = ref([]) const estimatedDays = ref([])
const vacationTypes = ref([])
const stats = ref({ const stats = ref({
used: 0, used: 0,
@ -372,8 +377,9 @@ const toInputConfig = reactive({
watch(() => form.user, user => { watch(() => form.user, user => {
resetForm() resetForm()
refreshVacationStats(user) refreshAvailableTypes(user)
refreshUnavailableDays(user) refreshUnavailableDays(user)
refreshVacationStats(user)
}, { immediate: true }) }, { immediate: true })
function createForm() { function createForm() {
@ -406,7 +412,7 @@ function onToChange(selectedDates, dateStr) {
} }
function resetForm() { function resetForm() {
form.reset('type', 'to', 'from', 'comment', 'flowSkipped') form.reset('to', 'from', 'comment', 'flowSkipped')
form.clearErrors() form.clearErrors()
estimatedDays.value = [] estimatedDays.value = []
} }
@ -440,4 +446,11 @@ async function refreshUnavailableDays(user) {
] ]
} }
async function refreshAvailableTypes(user) {
const res = await axios.post('/api/vacation/get-available-vacation-types', { user: user.id })
vacationTypes.value = res.data
form.vacationType = vacationTypes.value[0]
}
</script> </script>

View File

@ -1,9 +1,9 @@
<template> <template>
<InertiaHead title="Moje wnioski urlopowe" /> <InertiaHead title="Moje wnioski" />
<div class="bg-white shadow-md"> <div class="bg-white shadow-md">
<div class="flex justify-between items-center p-4 sm:px-6"> <div class="flex justify-between items-center p-4 sm:px-6">
<h2 class="text-lg font-medium leading-6 text-gray-900"> <h2 class="text-lg font-medium leading-6 text-gray-900">
Moje wnioski urlopowe Moje wnioski
</h2> </h2>
<div> <div>
<InertiaLink <InertiaLink
@ -102,7 +102,7 @@
scope="col" scope="col"
class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap" class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap"
> >
Rodzaj urlopu Rodzaj wniosku
</th> </th>
<th <th
scope="col" scope="col"

View File

@ -1,10 +1,10 @@
<template> <template>
<InertiaHead title="Wnioski urlopowe" /> <InertiaHead title="Lista wniosków" />
<div class="bg-white shadow-md"> <div class="bg-white shadow-md">
<div class="flex justify-between items-center p-4 sm:px-6"> <div class="flex justify-between items-center p-4 sm:px-6">
<div> <div>
<h2 class="text-lg font-medium leading-6 text-gray-900"> <h2 class="text-lg font-medium leading-6 text-gray-900">
Wnioski urlopowe Lista wniosków
</h2> </h2>
</div> </div>
<div> <div>
@ -181,7 +181,7 @@
scope="col" scope="col"
class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap" class="py-3 px-4 text-xs font-semibold tracking-wider text-left text-gray-500 uppercase whitespace-nowrap"
> >
Rodzaj urlopu Rodzaj wniosku
</th> </th>
<th <th
scope="col" scope="col"

View File

@ -41,7 +41,7 @@
</div> </div>
<div class="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6"> <div class="py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6">
<dt class="text-sm font-medium text-gray-500"> <dt class="text-sm font-medium text-gray-500">
Rodzaj urlopu Rodzaj wniosku
</dt> </dt>
<dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0"> <dd class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0">
<VacationType :type="request.type" /> <VacationType :type="request.type" />

View File

@ -301,7 +301,7 @@ const navigation = computed(() =>
can: true, can: true,
}, },
{ {
name: 'Wnioski urlopowe', name: 'Lista wniosków',
href: '/vacation/requests', href: '/vacation/requests',
component: 'VacationRequest/IndexForApprovers', component: 'VacationRequest/IndexForApprovers',
icon: CollectionIcon, icon: CollectionIcon,

View File

@ -14,6 +14,7 @@
"look_for_work_vacation": "Urlop na poszukiwanie pracy", "look_for_work_vacation": "Urlop na poszukiwanie pracy",
"time_in_lieu": "Odbiór za święto", "time_in_lieu": "Odbiór za święto",
"sick_vacation": "Zwolnienie lekarskie", "sick_vacation": "Zwolnienie lekarskie",
"absence": "Nieobecność",
"employee": "Pracownik", "employee": "Pracownik",
"administrator": "Administrator", "administrator": "Administrator",
"technical_approver": "Techniczny akceptujący", "technical_approver": "Techniczny akceptujący",

View File

@ -6,9 +6,11 @@ use Illuminate\Support\Facades\Route;
use Toby\Infrastructure\Http\Controllers\Api\CalculateUserUnavailableDaysController; use Toby\Infrastructure\Http\Controllers\Api\CalculateUserUnavailableDaysController;
use Toby\Infrastructure\Http\Controllers\Api\CalculateUserVacationStatsController; use Toby\Infrastructure\Http\Controllers\Api\CalculateUserVacationStatsController;
use Toby\Infrastructure\Http\Controllers\Api\CalculateVacationDaysController; use Toby\Infrastructure\Http\Controllers\Api\CalculateVacationDaysController;
use Toby\Infrastructure\Http\Controllers\Api\GetAvailableVacationTypesController;
Route::middleware("auth:sanctum")->group(function (): void { Route::middleware("auth:sanctum")->group(function (): void {
Route::post("vacation/calculate-days", CalculateVacationDaysController::class); Route::post("vacation/calculate-days", CalculateVacationDaysController::class);
Route::post("vacation/calculate-stats", CalculateUserVacationStatsController::class); Route::post("vacation/calculate-stats", CalculateUserVacationStatsController::class);
Route::post("vacation/calculate-unavailable-days", CalculateUserUnavailableDaysController::class); Route::post("vacation/calculate-unavailable-days", CalculateUserUnavailableDaysController::class);
Route::post("vacation/get-available-vacation-types", GetAvailableVacationTypesController::class);
}); });

View File

@ -66,7 +66,6 @@ Route::middleware("auth")->group(function (): void {
->name("monthly-usage"); ->name("monthly-usage");
Route::get("/annual-summary", AnnualSummaryController::class) Route::get("/annual-summary", AnnualSummaryController::class)
->name("annual-summmary"); ->name("annual-summmary");
}); });
}); });

View File

@ -6,6 +6,7 @@ namespace Tests\Feature;
use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\FeatureTestCase; use Tests\FeatureTestCase;
use Toby\Domain\Enums\EmploymentForm;
use Toby\Eloquent\Models\User; use Toby\Eloquent\Models\User;
class VacationCalendarTest extends FeatureTestCase class VacationCalendarTest extends FeatureTestCase
@ -16,6 +17,10 @@ class VacationCalendarTest extends FeatureTestCase
{ {
$administrativeApprover = User::factory()->administrativeApprover()->create(); $administrativeApprover = User::factory()->administrativeApprover()->create();
User::factory(["employment_form" => EmploymentForm::EmploymentContract])
->count(10)
->create();
$this->actingAs($administrativeApprover) $this->actingAs($administrativeApprover)
->get("/vacation/timesheet/january") ->get("/vacation/timesheet/january")
->assertOk(); ->assertOk();