76 lines
2.7 KiB
PHP
76 lines
2.7 KiB
PHP
@extends('layout.app')
|
|
|
|
@section('title', __('Planning'))
|
|
@section('description', __('Planning de l\'équipe Uwil'))
|
|
|
|
@section('content')
|
|
<div id="planning" class="container container-xxl vueComponent">
|
|
<div class="row sticky-top bg-white z-2 py-2 mb-3">
|
|
<div class="col">
|
|
<h4 class="d-inline me-3">{{__('Légende')}}</h4>
|
|
<div class="d-inline">
|
|
@foreach(\App\Enums\Planning\CellTypeEnum::cases() as $type)
|
|
<span class="badge text-dark celltype-{{ Str::slug($type->label()) }} my-1">{{ $type->label() }}</span>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@if (\auth()->user()->role->equals(\App\Enums\Users\RoleEnum::developper))
|
|
<div class="col-2 text-end p-0">
|
|
@if (request()->cookie('userAuthSchedule'))
|
|
<a href="{{ route('bo.schedule.showAllSchedules') }}" class="btn btn-primary btn-sm">{{__('Afficher les plannings')}}</a>
|
|
@else
|
|
<a href="{{ route('bo.schedule.showMySchedule') }}" class="btn btn-primary btn-sm">{{__('Afficher mon planning')}}</a>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
</div>
|
|
@php
|
|
$dataVue = [
|
|
'browseDate' => $date,
|
|
'schedules' => $arSchedules,
|
|
'activities' => \App\Enums\Planning\ActivityTypeEnum::toArray(),
|
|
'models' => \App\Enums\Planning\CellModelEnum::toArray(),
|
|
'users' => $users,
|
|
'weeks' => $weekCells,
|
|
'daySlots' => Config::get('schedules.daySlots'),
|
|
'showWeekends' => 'false',
|
|
];
|
|
@endphp
|
|
<div id="schedule" data-json='@json($dataVue)'></div>
|
|
</div>
|
|
@endsection
|
|
|
|
@push('styles')
|
|
<style nonce="{{ $nonce }}">
|
|
.support {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::support->color() }} !important;
|
|
}
|
|
.rnd {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::rnd->color() }} !important;
|
|
}
|
|
.dev {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::dev->color() }} !important;
|
|
}
|
|
.projects {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::projects->color() }} !important;
|
|
}
|
|
.management {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::management->color() }} !important;
|
|
}
|
|
.absence, .Sat, .Sun {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::absence->color() }} !important;
|
|
}
|
|
.leaddev {
|
|
background-color: {{ \App\Enums\Planning\CellTypeEnum::leaddev->color() }} !important;
|
|
}
|
|
.empty {
|
|
background-color: #FFF !important;
|
|
}
|
|
@foreach(\App\Enums\Planning\CellTypeEnum::cases() as $type)
|
|
.celltype-{{ Str::slug($type->label()) }} {
|
|
background-color: {{ $type->color() }};
|
|
font-size: 1rem;
|
|
}
|
|
@endforeach
|
|
</style>
|
|
@endpush
|