ldc-crm/resources/views/services/manage.blade.php
Jérémy Munsch 6987501a98 CRM API V2
2021-03-27 08:29:31 +01:00

42 lines
1.8 KiB
PHP

@extends('layout.app')
@section('content')
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h2>{{ __('Gestion des services') }} <small class="text-muted">{{ __('Gestion') }}</small></h2>
@if ($errors->any())
<ul class="text-danger text-center">
@foreach(session('errors')->all(':message') as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
@if (session('success'))
<span class="text-success text-center">{!! session('success') !!}</span>
@endif
<a href="{{ route('services') }}" class="btn btn-sm btn-primary float-right">{{ __('Retour') }}</a>
</div>
<div class="form-group">
<form action="{{ route('manage-service', $service ? $service->id : null) }}" method="POST">
@csrf
<div class="form-group form-row">
<label class="col-form-label col" for="name">{{ __('Nom du service') }}</label>
<input type="text" id="name" name="name" class="form-control col" value="{{ $service ? $service->name : null }}">
</div>
@if (!$edit)
<div class="form-group form-row">
<label class="col-form-label col" for="brand_id">{{ __('Marque associée') }}</label>
<select class="custom-select col" id="brand_id" name="brand_id">
@foreach($brands as $brand)
<option value="{{ $brand->id }}">{{ $brand->name }}</option>
@endforeach
</select>
</div>
@else
<input type="hidden" value="{{ $service->brand->id }}" name="brand_id">
@endif
<div class="text-center">
<input type="submit" class="btn btn-success" value="{{ __('Enregistrer') }}">
</div>
</form>
</div>
@endsection