ldc-supportweb/resources/views/schedule/index.blade.php

77 lines
2.3 KiB
PHP

@extends('layout.app')
@section('content')
<div id="planning" class="container container-xxl vueComponent">
<div class="row mb-3 sticky-top bg-white">
<div class="col">
<h4 class="d-inline me-3">{{__('Légende')}}</h4>
<div class="d-inline">
@foreach(CellType::toArray() as $type)
<span class="{{ Str::slug("celltype-$type->label") }}">{{ $type->label }}</span>
@endforeach
</div>
</div>
@if (\auth()->user()->role->equals(Role::developper()))
<div class="col-2 pt-2">
@if (request()->cookie('userAuthSchedule'))
<a href="{{ route('schedule.showAllSchedules') }}" class="btn btn-primary btn-sm">{{__('Afficher les plannings')}}</a>
@else
<a href="{{ route('schedule.showMySchedule') }}" class="btn btn-primary btn-sm">{{__('Afficher mon planning')}}</a>
@endif
</div>
@endif
</div>
@php
$dataVue = [
'browseDate' => $date,
'schedules' => $arSchedules,
'activities' => ActivityType::toArray(),
'models' => CellModel::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: {{CellType::support()->value}} !important;
}
.rnd {
background-color: {{CellType::rnd()->value}} !important;
}
.dev {
background-color: {{CellType::dev()->value}} !important;
}
.projects {
background-color: {{CellType::projects()->value}} !important;
}
.management {
background-color: {{CellType::management()->value}} !important;
}
.absence, .Sat, .Sun {
background-color: {{CellType::absence()->value}} !important;
}
.leaddev {
background-color: {{CellType::leaddev()->value}} !important;
}
.empty {
background-color: #FFF !important;
}
@foreach(CellType::toArray() as $type)
.{{ Str::slug("celltype-$type->label") }} {
background-color: {{ $type->value }};
border: 1px solid black;
}
@endforeach
</style>
@endpush