Current File : //home/tradevaly/public_html/resources/views/backend/pages/userManagement/role/show.blade.php |
@extends('backend.ayaan.master')
@push('title') Edit Role @endpush
@section('css')
<!-- select2 css -->
<link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
<!-- dropzone css -->
<link href="{{ asset('/assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet" type="text/css" />
<style>
.image_preview_container {
display: grid;
gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(150px, 280px));
justify-content: center;
padding: 25px;
}
.image_preview_container img {
width: 100%;
border: 1px solid #0001;
box-shadow: 0 2px 15px #0001, 0 2px 8px #0001;
border-radius: 4px;
aspect-ratio: 1/1;
object-fit: cover;
}
</style>
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') Edit Role @endslot
@endcomponent
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<h4 class="card-title d-flex justify-content-between"><span>Edit Role</span> <a class="btn btn-info" href="{{ route('admin.user_namagement.role.index') }}">Go Back</a></h4>
<p class="card-title-desc">Fill all information below</p>
<form action="{{route('admin.user_namagement.role.update',$role->id) }}" method="POST">
@csrf
@method('put')
<div class="row">
<div class="col-sm-12">
<div class="mb-3">
<label for="metadescription">Role Name</label>
<input id="metatitle" name="name" type="text" class="form-control" value="{{ $role->name }}" required>
</div>
</div>
@foreach($permissions as $permission)
<div class="col-lg-3">
<div class="form-check form-check-end">
<input class="form-check-input" name="permissions[]" type="checkbox" {{ check_permision($role->id,$permission->id) ? 'checked': '' }} id="defaultCheck{{ $permission->id }}" value="{{ $permission->id }}">
<label class="form-check-label" for="defaultCheck{{ $permission->id }}">{{ $permission->name }}</label>
</div>
</div>
@endforeach
</div>
<div class="d-flex flex-wrap gap-2">
<button type="submit" class="btn btn-primary waves-effect waves-light">Save Changes</button>
<a href="{{ route('admin.user_namagement.role.index') }}" class="btn btn-secondary waves-effect waves-light">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
@stop
@section('script')
@endsection