migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
@extends('layouts.master')
@section('title')
{{__('Roles')}}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16">
<h4>{{__('Add New Role')}}</h4>
<small class="text-warning">{{ __('Set role permissions') }}</small>
</div>
<div class="row justify-content-center mt-2 roles-permissions p-16">
<div class="col-md-12">
<form action="{{ route('admin.roles.store') }}" method="post" class="row ajaxform_instant_reload">
@csrf
<div class="col-12 form-group role-input-label">
<label for="name" class="required">{{ __("Role Name") }}</label>
<input type="text" name="name" id="name" class="form-control" placeholder="{{ __("Enter role name") }}" required>
</div>
<div class="col-12">
<h4 class="mt-3 mb-3">{{ __("Role Permissions") }}</h4>
<div class="table-responsive">
<table class="table table-hover">
<tbody>
<tr>
<td class="text-nowrap fw-bolder">
{{ __("Setup role permissions") }}
</td>
<td>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="selectAll">
<label class="custom-control-label fw-bold" for="selectAll">{{ __('Select All') }}</label>
</div>
</td>
</tr>
@foreach($groups as $key => $group)
<tr>
<td class="text-nowrap fw-bolder">{{ $key }}</td>
<td>
<div class="d-flex">
@foreach($group as $permission)
<div class="custom-control custom-checkbox mr-3 me-lg-5">
<input type="checkbox" name="permissions[]" value="{{ $permission->id }}" class="custom-control-input" id="id_{{ $permission->id }}">
<label class="custom-control-label fw-bold" for="id_{{ $permission->id }}">
{{ ucfirst(str($permission->name)->explode('-')->last()) }}
</label>
</div>
@endforeach
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="col-12 text-center mt-2">
<button type="reset" class="btn btn-sm role-reset-btn">
<i class="fas fa-undo-alt"></i> {{ __("Reset") }}
</button>
<button type="submit" class="btn btn-sm btn-warning btn-custom-warning fw-bold me-2 submit-btn"><i class="fas fa-save"></i> {{ __("Save") }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,83 @@
@extends('layouts.master')
@section('title')
{{__('Roles')}}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16">
<h4>{{__('Edit Role')}}</h4>
<small class="text-warning">{{ __('Set role permissions') }}</small>
</div>
<div class="row justify-content-center mt-2 roles-permissions p-16">
<div class="col-md-12">
<form action="{{ route('admin.roles.update', $role->id) }}" method="post" class="row ajaxform_instant_reload">
@csrf
@method('PUT')
<div class="col-12 form-group role-input-label">
<label for="name" class="required">{{ __("Role Name") }}</label>
<input type="text" name="name" id="name" class="form-control" value="{{ $role->name }}" placeholder="{{ __("Enter role name") }}" required>
</div>
<div class="col-12">
<h4 class="mt-3 mb-3">{{ __("Role Permissions") }}</h4>
<div class="table-responsive">
<table class="table table-hover table-bordered">
<tbody>
<tr>
<td class="text-nowrap fw-bolder">
{{ __("Setup role permissions") }}
</td>
<td>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="selectAll">
<label class="custom-control-label fw-bold" for="selectAll">{{ __('Select All') }}</label>
</div>
</td>
</tr>
@foreach($groups as $key => $group)
<tr>
<td class="text-nowrap fw-bolder">{{ $key }}</td>
<td>
<div class="d-flex">
@foreach($group as $permission)
<div class="custom-control custom-checkbox mr-3 me-lg-5">
<input type="checkbox" name="permissions[]" value="{{ $permission->id }}" class="custom-control-input" id="id_{{ $permission->id }}" @checked($role->hasPermissionTo($permission->name))>
<label class="custom-control-label" for="id_{{ $permission->id }}">
{{ ucfirst(str($permission->name)->explode('-')->last() == 'list' ? 'All '.str($permission->name)->explode('-')->last() : str($permission->name)->explode('-')->last()) }}
</label>
</div>
@endforeach
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="col-12 text-center mt-2">
<button type="reset" class="btn role-reset-btn">
<i class="fas fa-undo-alt"></i> {{ __("Reset") }}
</button>
<button type="submit" class="btn btn-warning btn-custom-warning fw-bold me-2 submit-btn"><i class="fas fa-save"></i> {{ __("Save") }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,71 @@
@extends('layouts.master')
@section('title')
{{__('Roles')}}
@endsection
@section('main_content')
<div class="erp-table-section">
<div class="container-fluid">
<div class="card">
<div class="card-bodys">
<div class="table-header p-16">
<h4>{{__('Roles List')}}</h4>
</div>
<div class="row mb-4 p-16">
@can('roles-create')
<div class="col-xl-4 col-lg-6 col-md-6 mt-3">
<div class="cards shadow border-0 h-100">
<div class="row">
<div class="col-sm-5">
<div class="d-flex align-items-end justify-content-center h-100">
<img src="{{ asset('assets/images/icons/user-roles.svg') }}" class="img-fluid mt-2" alt="Image" width="85">
</div>
</div>
<div class="col-sm-7">
<div class="card-body text-sm-end text-center ps-sm-0 ms-2">
<a href="{{ route('admin.roles.create') }}">
<span class="btn btn-warning btn-custom-warning fw-bold text-uppercase btn-sm mb-1">{{ __("Add New Role") }}</span>
</a>
<small class="mb-0 d-block">{{ __("Add role, if it does not exist") }}</small>
</div>
</div>
</div>
</div>
</div>
@endcan
@foreach($roles as $role)
<div class="col-xl-4 col-lg-6 col-md-6 mt-3">
<div class="cards shadow border-0">
<div class="card-body">
<div class="d-flex justify-content-between">
<span>{{ __("Total :count users", ['count' => $role->users_count]) }}</span>
<ul class="list-unstyled d-flex align-items-center avatar-group mb-0">
@foreach($role->users->take(5) as $user)
<li class="avatar avatar-sm pull-up">
<img class="rounded-circle" src="{{ asset($user->image) }}" alt="{{ ucfirst($user->name) }}">
</li>
@endforeach
</ul>
</div>
<div class="d-flex justify-content-between align-items-end mt-1 pt-25">
<div class="role-heading">
<h4 class="fw-bolder">{{ ucfirst($role->name) }} <i class="{{ request('id') == $role->id ? 'fas fa-bell text-red' : '' }}"></i></h4>
@can('roles-update')
<a class="primary" href="{{ route('admin.roles.edit', $role->id) }}">
<small class="fw-bolder">{{ __("Edit Role") }}</small>
</a>
@endcan
</div>
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</div>
@endsection