60 lines
2.7 KiB
PHP
60 lines
2.7 KiB
PHP
@include('modules.error-messages')
|
|
<div class="form-row">
|
|
@can('changeStatus')
|
|
<div class="form-group col">
|
|
<label for="project" class="col-form-label">{{ __('Projet') }}</label>
|
|
<select class="custom-select" name="project_id" id="project" @if (Auth::user()->role !== 1) disabled @endif>
|
|
@foreach($projects as $project)
|
|
@if (Auth::user()->role === 1)
|
|
<option value="{{ $project->id }}" @if ($project->id == old('project_id') or (isset($ticket) and $ticket->project->id == $project->id))selected @endif>{{ $project->name }}</option>
|
|
@elseif ($project->id === Auth::user()->project_id)
|
|
<option value="{{ $project->id }}" selected>{{ $project->name }}</option>
|
|
@endif
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@endcan
|
|
<div class="form-group col">
|
|
<label for="type" class="col-form-label">{{ __('Type') }}</label>
|
|
<select class="custom-select" name="type" id="type">
|
|
@foreach(TicketType::toArray() as $ticketType)
|
|
<option value="{{ $ticketType->value }}" @if($ticketType->value == old('type') or (isset($ticket) and $ticketType->equals($ticket->type)))selected @endif>{{ $ticketType->label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@can('changeStatus')
|
|
<div class="form-group col">
|
|
<label for="status" class="col-form-label">Status</label>
|
|
<select class="custom-select" name="status" id="status">
|
|
@foreach(TicketStatus::toArray() as $ticketStatus)
|
|
<option value="{{ $ticketStatus->value }}" @if($ticketType->value == old('status') or (isset($ticket) and $ticketStatus->equals($ticket->status)))selected @endif>{{ $ticketStatus->label }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@endcan
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="text" class="col-form-label text-md-right">{{ __('Description') }}</label>
|
|
<textarea class="form-control" name="text" id="text" placeholder="{{ __('Description du ticket') }} *">{{ old('text') ?? $ticket->text ?? ''}}</textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<input type="file" name="file_ticket" accept="image/png, image/jpeg, image/jpg, .pdf">
|
|
@if (isset($ticket) and $ticket->file !== null)
|
|
<hr>
|
|
<div class="text-center">
|
|
<img src="{{ asset($ticket->file) }}" style="max-width: 100%;">
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<input type="file" name="file_ticket2" accept="image/png, image/jpeg, image/jpg, .pdf">
|
|
@if (isset($ticket) and $ticket->file2 !== null)
|
|
<hr>
|
|
<div class="text-center">
|
|
<img src="{{ asset($ticket->file2) }}" style="max-width: 100%;">
|
|
</div>
|
|
@endif
|
|
</div>
|