cleaning day
This commit is contained in:
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Datatables\Admin\Shop;
|
|
||||||
|
|
||||||
use App\Datatables\ParentDataTable as DataTable;
|
|
||||||
use App\Models\Shop\PriceGenericCategory;
|
|
||||||
use Yajra\DataTables\Html\Column;
|
|
||||||
|
|
||||||
class PriceGenericCategoriesDataTable extends DataTable
|
|
||||||
{
|
|
||||||
public $model_name = 'price_generic_categories';
|
|
||||||
|
|
||||||
public function query(PriceGenericCategory $model)
|
|
||||||
{
|
|
||||||
$model = $model->withCount('price_generics');
|
|
||||||
|
|
||||||
return $this->buildQuery($model);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getColumns()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
Column::make('name')->title('Nom'),
|
|
||||||
Column::make('price_generics_count')->title('Nb Tarifs')->class('text-right'),
|
|
||||||
$this->makeColumnButtons(),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -174,6 +174,13 @@ class ParentDataTable extends DataTable
|
|||||||
return "<'row pt-3 dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>";
|
return "<'row pt-3 dt-toolbar-footer'<'col-md-6'i><'col-md-6'p>>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getColumns()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$this->makeColumnButtons(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
protected function filename(): string
|
protected function filename(): string
|
||||||
{
|
{
|
||||||
return self::buildFilename($this->model_name);
|
return self::buildFilename($this->model_name);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class FamilyController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return view('Admin.Botanic.Families.create', $data ?? []);
|
return view('Admin.Botanic.Families.create');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
@@ -26,13 +26,6 @@ class FamilyController extends Controller
|
|||||||
return redirect()->route('Admin.Botanic.Families.index');
|
return redirect()->route('Admin.Botanic.Families.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data = Families::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Families.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$data['family'] = Families::get($id)->toArray();
|
$data['family'] = Families::get($id)->toArray();
|
||||||
@@ -44,9 +37,4 @@ class FamilyController extends Controller
|
|||||||
{
|
{
|
||||||
return Families::destroy($id);
|
return Families::destroy($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportExcel()
|
|
||||||
{
|
|
||||||
return Families::exportExcel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,9 @@ class GenreController extends Controller
|
|||||||
return $dataTable->render('Admin.Botanic.Genres.list');
|
return $dataTable->render('Admin.Botanic.Genres.list');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDatatable(Request $request)
|
|
||||||
{
|
|
||||||
return Genres::getDataTable($request->all());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['families'] = Families::getOptions();
|
$data = Genres::init();
|
||||||
|
|
||||||
return view('Admin.Botanic.Genres.create', $data);
|
return view('Admin.Botanic.Genres.create', $data);
|
||||||
}
|
}
|
||||||
@@ -34,17 +29,10 @@ class GenreController extends Controller
|
|||||||
return redirect()->route('Admin.Botanic.Genres.index');
|
return redirect()->route('Admin.Botanic.Genres.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data['genre'] = Genres::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Genres.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
$data = Genres::init();
|
||||||
$data['genre'] = Genres::get($id);
|
$data['genre'] = Genres::get($id);
|
||||||
$data['families'] = Families::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Genres.edit', $data);
|
return view('Admin.Botanic.Genres.edit', $data);
|
||||||
}
|
}
|
||||||
@@ -53,9 +41,4 @@ class GenreController extends Controller
|
|||||||
{
|
{
|
||||||
return Genres::destroy($id);
|
return Genres::destroy($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportExcel()
|
|
||||||
{
|
|
||||||
return Genres::exportExcel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ namespace App\Http\Controllers\Admin\Botanic;
|
|||||||
use App\Datatables\Botanic\SpeciesDataTable;
|
use App\Datatables\Botanic\SpeciesDataTable;
|
||||||
use App\Repositories\Botanic\Genres;
|
use App\Repositories\Botanic\Genres;
|
||||||
use App\Repositories\Botanic\Species;
|
use App\Repositories\Botanic\Species;
|
||||||
use App\Repositories\Shop\TagGroups;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class SpecieController extends Controller
|
class SpecieController extends Controller
|
||||||
@@ -22,8 +21,7 @@ class SpecieController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['genres'] = Genres::getOptions();
|
$data = Genres::init();
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Species.create', $data);
|
return view('Admin.Botanic.Species.create', $data);
|
||||||
}
|
}
|
||||||
@@ -36,18 +34,10 @@ class SpecieController extends Controller
|
|||||||
return redirect()->route('Admin.Botanic.Species.index');
|
return redirect()->route('Admin.Botanic.Species.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data = Species::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Species.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
$data = Genres::init();
|
||||||
$data['specie'] = Species::getFull($id);
|
$data['specie'] = Species::getFull($id);
|
||||||
$data['genres'] = Genres::getOptions();
|
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Species.edit', $data);
|
return view('Admin.Botanic.Species.edit', $data);
|
||||||
}
|
}
|
||||||
@@ -60,8 +50,10 @@ class SpecieController extends Controller
|
|||||||
public function getImages(Request $request, $id = false, $can_edit = true)
|
public function getImages(Request $request, $id = false, $can_edit = true)
|
||||||
{
|
{
|
||||||
$id = $id ? $id : $request->input('id');
|
$id = $id ? $id : $request->input('id');
|
||||||
$data['images'] = Species::getImages($id);
|
$data = [
|
||||||
$data['can_edit'] = $can_edit;
|
'images' => Species::getImages($id),
|
||||||
|
'can_edit' => $can_edit,
|
||||||
|
];
|
||||||
|
|
||||||
return view('components.uploader.mini-gallery-items', $data);
|
return view('components.uploader.mini-gallery-items', $data);
|
||||||
}
|
}
|
||||||
@@ -73,9 +65,4 @@ class SpecieController extends Controller
|
|||||||
|
|
||||||
return Species::deleteImage($id, $index);
|
return Species::deleteImage($id, $index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportExcel()
|
|
||||||
{
|
|
||||||
return Species::exportExcel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ class VarietyController extends Controller
|
|||||||
|
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data['species'] = Species::getOptions();
|
$data = Varieties::init();
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Varieties.create', $data);
|
return view('Admin.Botanic.Varieties.create', $data);
|
||||||
}
|
}
|
||||||
@@ -36,16 +35,10 @@ class VarietyController extends Controller
|
|||||||
return redirect()->route('Admin.Botanic.Varieties.index');
|
return redirect()->route('Admin.Botanic.Varieties.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
return view('Admin.Botanic.Varieties.view', Varieties::get($id));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
|
$data = Varieties::init();
|
||||||
$data['variety'] = Varieties::getFull($id);
|
$data['variety'] = Varieties::getFull($id);
|
||||||
$data['species'] = Species::getOptions();
|
|
||||||
$data['tags_list'] = TagGroups::getTreeTags();
|
|
||||||
|
|
||||||
return view('Admin.Botanic.Varieties.edit', $data);
|
return view('Admin.Botanic.Varieties.edit', $data);
|
||||||
}
|
}
|
||||||
@@ -58,8 +51,10 @@ class VarietyController extends Controller
|
|||||||
public function getImages(Request $request, $id = false, $can_edit = true)
|
public function getImages(Request $request, $id = false, $can_edit = true)
|
||||||
{
|
{
|
||||||
$id = $id ? $id : $request->input('id');
|
$id = $id ? $id : $request->input('id');
|
||||||
$data['images'] = Varieties::getImages($id);
|
$data = [
|
||||||
$data['can_edit'] = $can_edit;
|
'images' => Varieties::getImages($id),
|
||||||
|
'can_edit' => $can_edit,
|
||||||
|
];
|
||||||
|
|
||||||
return view('components.uploader.mini-gallery-items', $data);
|
return view('components.uploader.mini-gallery-items', $data);
|
||||||
}
|
}
|
||||||
@@ -71,9 +66,4 @@ class VarietyController extends Controller
|
|||||||
|
|
||||||
return Varieties::deleteImage($id, $index);
|
return Varieties::deleteImage($id, $index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportExcel()
|
|
||||||
{
|
|
||||||
return Varieties::exportExcel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Core\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller as ParentController;
|
|
||||||
|
|
||||||
class Controller extends ParentController
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Core\Auth;
|
|
||||||
|
|
||||||
use App\Datatables\Admin\Core\Auth\PermissionsDataTable;
|
|
||||||
use App\Repositories\Core\App\ApplicationModules;
|
|
||||||
use App\Repositories\Core\App\Applications;
|
|
||||||
use App\Repositories\Core\Auth\Permissions;
|
|
||||||
use App\Repositories\Core\Auth\Users;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class PermissionController extends Controller
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('ability:admin,permissions_crud');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function index(PermissionsDataTable $dataTable)
|
|
||||||
{
|
|
||||||
$data = \App\Repositories\Config::init();
|
|
||||||
|
|
||||||
return $dataTable->render('admin.Core.Auth.Permission.index', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$data = \App\Repositories\Config::init();
|
|
||||||
$data['roles'] = Users::getRolesToEdit();
|
|
||||||
$data['applications'] = Applications::getOptions();
|
|
||||||
$data['application_modules'] = ApplicationModules::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Permission.create', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit(Request $request, $id = false)
|
|
||||||
{
|
|
||||||
$id = (int) $id ? $id : $request->input('id');
|
|
||||||
$data = \App\Repositories\Config::init();
|
|
||||||
$data['permission'] = Permissions::get($id);
|
|
||||||
$data['roles'] = Users::getRolesToEdit();
|
|
||||||
$data['applications'] = Applications::getOptions();
|
|
||||||
$data['application_modules'] = ApplicationModules::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Permission.edit', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$data = $request->all();
|
|
||||||
unset($data['roles']);
|
|
||||||
unset($data['_token']);
|
|
||||||
|
|
||||||
/*
|
|
||||||
$this->validate($request, [
|
|
||||||
'name' => 'required|unique:permissions,name',
|
|
||||||
'display_name' => 'required',
|
|
||||||
'description' => 'required',
|
|
||||||
]);
|
|
||||||
$data['name'] = Str::slug($data['display_name']);
|
|
||||||
*/
|
|
||||||
|
|
||||||
Permissions::store($data);
|
|
||||||
|
|
||||||
return redirect()->route('Admin.Core.Auth.Permission.index')->with('growl', [__('permissions.successadd'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
Permissions::delete($id);
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Core\Auth;
|
|
||||||
|
|
||||||
use App\Datatables\Admin\Core\Auth\RolesDataTable;
|
|
||||||
use App\Models\Core\App\ApplicationModule;
|
|
||||||
use App\Models\Core\Auth\Permission;
|
|
||||||
use App\Models\Core\Auth\Role;
|
|
||||||
use App\Repositories\Config;
|
|
||||||
use App\Repositories\Core\Auth\Roles;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Yajra\DataTables\DataTables;
|
|
||||||
|
|
||||||
class RoleController extends Controller
|
|
||||||
{
|
|
||||||
public function index(RolesDataTable $dataTable)
|
|
||||||
{
|
|
||||||
$data = Config::init();
|
|
||||||
$data['modules'] = ApplicationModule::with('permissions')->get()->toArray();
|
|
||||||
|
|
||||||
return $dataTable->render('admin.Core.Auth.Role.index', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTable(Request $request)
|
|
||||||
{
|
|
||||||
$model = Role::orderBy('name')->get();
|
|
||||||
|
|
||||||
return Datatables::of($model)->make(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$data = Config::init();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Role.create', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit(Request $request, $id = false)
|
|
||||||
{
|
|
||||||
$id = $id ? $id : $request->input('id');
|
|
||||||
$data = Config::init();
|
|
||||||
$data['role'] = Roles::getWithPermissions($id);
|
|
||||||
$data['modules'] = ApplicationModule::with('permissions')->get()->toArray();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Role.edit', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
Roles::store($request->all());
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy(Request $request, $id = false)
|
|
||||||
{
|
|
||||||
$id = $id ? $id : $request->input('id');
|
|
||||||
Roles::delete($id);
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function manage(Request $request, $id = false)
|
|
||||||
{
|
|
||||||
$data = [];
|
|
||||||
$id = (int) $id ? $id : $request->input('id');
|
|
||||||
$data['role'] = Role::with('permissions')->find($id)->toArray();
|
|
||||||
$permissions = Permission::orderBy('app')->orderBy('module')->orderBy('action')->get();
|
|
||||||
foreach ($permissions as $permission) {
|
|
||||||
$data[$permission->app][$permission->module][] = [
|
|
||||||
'action' => $permission->action,
|
|
||||||
'description' => $permission->description,
|
|
||||||
'id' => $permission->id,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
$data['permissions'] = $data;
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Role.manage', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function manage_store(Request $request)
|
|
||||||
{
|
|
||||||
$data = $request->all();
|
|
||||||
$role = Role::find($data['role_id']);
|
|
||||||
foreach ($data['permissions'] as $key) {
|
|
||||||
$permission = Permission::find($key);
|
|
||||||
$role->attachPermission($permission);
|
|
||||||
}
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function toggleActive(Request $request)
|
|
||||||
{
|
|
||||||
$data = Roles::toggleActive($request->input('id'), $request->input('active') === 'true' ? 1 : 0);
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Core\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Models\Core\Auth\Team;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
|
|
||||||
class TeamController extends Controller
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('ability:admin,teams_crud');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return view('Admin.Core.Auth.Team.list', ['teams' => Team::all()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
return view('Admin.Core.Auth.Team.create');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$input = $request->all();
|
|
||||||
$input['name'] = Str::slug($input['display_name']);
|
|
||||||
$request->replace($input);
|
|
||||||
|
|
||||||
$this->validate(
|
|
||||||
$request,
|
|
||||||
[
|
|
||||||
'name' => 'required|unique:teams,name',
|
|
||||||
'display_name' => 'required',
|
|
||||||
'description' => 'required',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$team = Team::create($input);
|
|
||||||
$team->teams()->sync(array_keys($request->input('team', [])));
|
|
||||||
|
|
||||||
return redirect()->route('admin.Teams.edit', $team)
|
|
||||||
->with('growl', [__('teams.successadd'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
$team = Team::find($id);
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.Team.edit', compact('team'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function update(Request $request, $id)
|
|
||||||
{
|
|
||||||
$this->validate(
|
|
||||||
$request,
|
|
||||||
[
|
|
||||||
'display_name' => 'required',
|
|
||||||
'description' => 'required',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$team = Team::find($id);
|
|
||||||
|
|
||||||
return redirect()->route('admin.Teams.edit', $team)
|
|
||||||
->with('growl', [__('teams.successmod'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
Team::destroy($id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Core\Auth;
|
|
||||||
|
|
||||||
use App\Datatables\Admin\Core\Auth\UsersDataTable;
|
|
||||||
use App\Models\Core\Auth\User;
|
|
||||||
use App\Repositories\Config;
|
|
||||||
use App\Repositories\Core\Auth\Users;
|
|
||||||
use Carbon\Carbon;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Intervention\Image\Facades\Image;
|
|
||||||
|
|
||||||
class UserController extends Controller
|
|
||||||
{
|
|
||||||
public function index(UsersDataTable $dataTable)
|
|
||||||
{
|
|
||||||
$data = Config::init();
|
|
||||||
|
|
||||||
return $dataTable->render('admin.Core.Auth.User.index', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function modalCreate()
|
|
||||||
{
|
|
||||||
$data = [
|
|
||||||
'roles' => Users::getRolesToEdit(),
|
|
||||||
];
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.User.modal', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function modalEdit($id = false)
|
|
||||||
{
|
|
||||||
$user = $id ? Users::get($id) : false;
|
|
||||||
$data['roles'] = Users::getRolesToEdit();
|
|
||||||
$data['user'] = $user ? $user->toArray() : [];
|
|
||||||
$data['user']['roles'] = $user->roles->pluck('id')->toArray();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.User.modal', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function storeAjax(Request $request)
|
|
||||||
{
|
|
||||||
$data = $request->all();
|
|
||||||
$ret = Users::store($data);
|
|
||||||
|
|
||||||
return response()->json(['code' => '200']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$data = \App\Repositories\Config::init();
|
|
||||||
$data['roles'] = Users::getRolesToEdit();
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.User.create', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$input = $request->all();
|
|
||||||
if ($input['password'] ?? false) {
|
|
||||||
unset($input['password']);
|
|
||||||
}
|
|
||||||
$user = Users::store($input);
|
|
||||||
|
|
||||||
return redirect()->route('admin.Core.Auth.User.index')
|
|
||||||
->with('growl', [__('boilerplate::users.successadd'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
$data = Config::init();
|
|
||||||
$data['roles'] = Users::getRolesToEdit();
|
|
||||||
$data['user'] = Users::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.User.edit', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
Users::delete($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function firstLogin($token, Request $request)
|
|
||||||
{
|
|
||||||
$user = User::where(['remember_token' => $token])->firstOrFail();
|
|
||||||
|
|
||||||
return view('boilerplate::auth.firstlogin', compact('user', 'token'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function firstLoginPost(Request $request)
|
|
||||||
{
|
|
||||||
$this->validate($request, [
|
|
||||||
'token' => 'required',
|
|
||||||
'password' => 'required|min:8',
|
|
||||||
'password_confirmation' => 'required|same:password',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$user = User::where(['remember_token' => $request->input('token')])->first();
|
|
||||||
|
|
||||||
$user->password = bcrypt($request->input('password'));
|
|
||||||
$user->remember_token = Str::random(32);
|
|
||||||
$user->last_login = Carbon::now()->toDateTimeString();
|
|
||||||
$user->save();
|
|
||||||
|
|
||||||
Auth::attempt(['email' => $user->email, 'password' => $request->input('password'), 'active' => 1]);
|
|
||||||
|
|
||||||
return redirect()->route('boilerplate.dashboard')
|
|
||||||
->with('growl', [__('boilerplate::users.newpassword'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function profile()
|
|
||||||
{
|
|
||||||
$user = Users::get();
|
|
||||||
$data['user'] = $user ? $user->toArray() : [];
|
|
||||||
$data['user']['name'] = $user->name;
|
|
||||||
$data['user']['avatar'] = Users::getAvatar($user->id);
|
|
||||||
|
|
||||||
return view('Admin.Core.Auth.User.modalProfile', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function profilePost(Request $request)
|
|
||||||
{
|
|
||||||
$this->validate($request, [
|
|
||||||
'avatar' => 'mimes:jpeg,png|max:10000',
|
|
||||||
'last_name' => 'required',
|
|
||||||
'first_name' => 'required',
|
|
||||||
'password_confirmation' => 'same:password',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$avatar = $request->file('avatar');
|
|
||||||
$user = Auth::user();
|
|
||||||
$file = $avatar->isValid();
|
|
||||||
|
|
||||||
if ($avatar && $file) {
|
|
||||||
$destinationPath = dirname($user->avatar_path);
|
|
||||||
if (! is_dir($destinationPath)) {
|
|
||||||
mkdir($destinationPath, 0766, true);
|
|
||||||
}
|
|
||||||
$extension = $avatar->getClientOriginalExtension();
|
|
||||||
$fileName = md5($user->id.$user->email).'_tmp.'.$extension;
|
|
||||||
$avatar->move($destinationPath, $fileName);
|
|
||||||
|
|
||||||
Image::make($destinationPath.DIRECTORY_SEPARATOR.$fileName)
|
|
||||||
->fit(100, 100)
|
|
||||||
->save($user->avatar_path);
|
|
||||||
|
|
||||||
unlink($destinationPath.DIRECTORY_SEPARATOR.$fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
$input = $request->all();
|
|
||||||
|
|
||||||
if ($input['password'] !== null) {
|
|
||||||
$input['password'] = bcrypt($input['password']);
|
|
||||||
$input['remember_token'] = Str::random(32);
|
|
||||||
} else {
|
|
||||||
unset($input['password']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$user->update($input);
|
|
||||||
|
|
||||||
return redirect()->route('boilerplate.user.profile')
|
|
||||||
->with('growl', [__('boilerplate::users.profile.successupdate'), 'success']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function avatarDelete()
|
|
||||||
{
|
|
||||||
$user = Auth::user();
|
|
||||||
if (is_file($user->avatar_path)) {
|
|
||||||
unlink($user->avatar_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function toggleActive(Request $request)
|
|
||||||
{
|
|
||||||
$data = Users::toggleActive($request->input('id'), $request->input('active') === 'true' ? 1 : 0);
|
|
||||||
|
|
||||||
return response()->json(['error' => 0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -29,13 +29,6 @@ class MerchandiseController extends Controller
|
|||||||
return redirect()->route('Admin.Shop.Merchandises.index');
|
return redirect()->route('Admin.Shop.Merchandises.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data = Merchandises::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Shop.Merchandises.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$data = Merchandises::init();
|
$data = Merchandises::init();
|
||||||
@@ -72,9 +65,4 @@ class MerchandiseController extends Controller
|
|||||||
{
|
{
|
||||||
return response()->json(['0' => ''] + Merchandises::getOptions());
|
return response()->json(['0' => ''] + Merchandises::getOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exportExcel()
|
|
||||||
{
|
|
||||||
return Merchandises::exportExcel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin\Shop;
|
|
||||||
|
|
||||||
use App\Datatables\Shop\PriceListValuesDataTable;
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Repositories\Shop\Packages;
|
|
||||||
use App\Repositories\Shop\PriceListValueCategories;
|
|
||||||
use App\Repositories\Shop\PriceListValues;
|
|
||||||
use App\Repositories\Shop\Taxes;
|
|
||||||
use App\Repositories\Shop\Unities;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class PriceListValueController extends Controller
|
|
||||||
{
|
|
||||||
public function index(PriceListValuesDataTable $dataTable)
|
|
||||||
{
|
|
||||||
$data['categories'] = PriceListValueCategories::getOptions();
|
|
||||||
|
|
||||||
return $dataTable->render('Admin.Shop.PriceListValues.list', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
$data['unities'] = Unities::getOptions();
|
|
||||||
$data['taxes_options'] = Taxes::getOptions();
|
|
||||||
$data['categories'] = PriceListValueCategories::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Shop.PriceListValues.create', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
$data['generic'] = PriceListValues::getFull($id)->toArray();
|
|
||||||
$data['packages'] = Packages::getSelectByFamily($data['generic']['category']['article_family_id']);
|
|
||||||
$data['unities'] = ($data['packages']['id'] ?? false) ? Unities::getSelectByPackage($data['packages']['id']) : [];
|
|
||||||
$data['taxes_options'] = Taxes::getOptions();
|
|
||||||
$data['categories'] = PriceListValueCategories::getOptions();
|
|
||||||
|
|
||||||
return view('Admin.Shop.PriceListValues.edit', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
$ret = PriceListValues::store($request->all());
|
|
||||||
|
|
||||||
return redirect()->route('Admin.Shop.PriceListValues.index');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
$data = PriceListValues::get($id);
|
|
||||||
|
|
||||||
return view('Admin.Shop.PriceListValues.view', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
return PriceListValues::destroy($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPrice($id)
|
|
||||||
{
|
|
||||||
$data['generic'] = PriceListValues::getFull($id);
|
|
||||||
|
|
||||||
return view('Admin.Shop.PriceListValues.partials.table-prices', $data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addPrice($index)
|
|
||||||
{
|
|
||||||
$data['index'] = $index;
|
|
||||||
|
|
||||||
return view('Admin.Shop.PriceListValues.partials.row_price', $data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Models\Botanic;
|
namespace App\Models\Botanic;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||||
use Wildside\Userstamps\Userstamps;
|
use Wildside\Userstamps\Userstamps;
|
||||||
@@ -15,19 +17,19 @@ class Family extends Model
|
|||||||
|
|
||||||
protected $table = 'botanic_families';
|
protected $table = 'botanic_families';
|
||||||
|
|
||||||
public function genres()
|
public function genres(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\Botanic\Genre');
|
return $this->hasMany(Genre::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function species()
|
public function species(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough('App\Models\Botanic\Specie', 'App\Models\Botanic\Genre');
|
return $this->hasManyThrough(Specie::class, Genre::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function varieties()
|
public function varieties()
|
||||||
{
|
{
|
||||||
return $this->hasManyDeep('App\Models\Botanic\Variety', ['App\Models\Botanic\Genre', 'App\Models\Botanic\Specie']);
|
return $this->hasManyDeep(Variety::class, [Genre::class, Specie::class]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeByName($query, $name)
|
public function scopeByName($query, $name)
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace App\Models\Botanic;
|
namespace App\Models\Botanic;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Wildside\Userstamps\Userstamps;
|
use Wildside\Userstamps\Userstamps;
|
||||||
|
|
||||||
@@ -14,19 +17,19 @@ class Genre extends Model
|
|||||||
|
|
||||||
protected $table = 'botanic_genres';
|
protected $table = 'botanic_genres';
|
||||||
|
|
||||||
public function family()
|
public function family(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Botanic\Family');
|
return $this->belongsTo(Family::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function species()
|
public function species(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\Botanic\Specie');
|
return $this->hasMany(Specie::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function varieties()
|
public function varieties(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough('App\Models\Botanic\Variety', 'App\Models\Botanic\Specie');
|
return $this->hasManyThrough(Variety::class, Specie::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeByName($query, $name)
|
public function scopeByName($query, $name)
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ use App\Models\Shop\Article;
|
|||||||
use App\Models\Shop\Tag;
|
use App\Models\Shop\Tag;
|
||||||
use App\Traits\Model\Imageable;
|
use App\Traits\Model\Imageable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Rinvex\Tags\Traits\Taggable;
|
use Rinvex\Tags\Traits\Taggable;
|
||||||
use Spatie\MediaLibrary\HasMedia;
|
use Spatie\MediaLibrary\HasMedia;
|
||||||
@@ -19,22 +23,22 @@ class Specie extends Model implements HasMedia
|
|||||||
|
|
||||||
protected $table = 'botanic_species';
|
protected $table = 'botanic_species';
|
||||||
|
|
||||||
public function tags()
|
public function tags(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphToMany(Tag::class, 'taggable');
|
return $this->morphToMany(Tag::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Genre()
|
public function Genre(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Genre::class);
|
return $this->belongsTo(Genre::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Varieties()
|
public function Varieties(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Variety::class);
|
return $this->hasMany(Variety::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Articles()
|
public function Articles(): MorphMany
|
||||||
{
|
{
|
||||||
return $this->morphMany(Article::class, 'product');
|
return $this->morphMany(Article::class, 'product');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ use App\Models\Shop\Article;
|
|||||||
use App\Models\Shop\Tag;
|
use App\Models\Shop\Tag;
|
||||||
use App\Traits\Model\Imageable;
|
use App\Traits\Model\Imageable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Kirschbaum\PowerJoins\PowerJoins;
|
use Kirschbaum\PowerJoins\PowerJoins;
|
||||||
use Rinvex\Tags\Traits\Taggable;
|
use Rinvex\Tags\Traits\Taggable;
|
||||||
@@ -20,17 +23,17 @@ class Variety extends Model implements HasMedia
|
|||||||
|
|
||||||
protected $table = 'botanic_varieties';
|
protected $table = 'botanic_varieties';
|
||||||
|
|
||||||
public function Specie()
|
public function Specie(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Specie::class);
|
return $this->belongsTo(Specie::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Articles()
|
public function Articles(): MorphMany
|
||||||
{
|
{
|
||||||
return $this->morphMany(Article::class, 'product');
|
return $this->morphMany(Article::class, 'product');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tags()
|
public function tags(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphToMany(Tag::class, 'taggable');
|
return $this->morphToMany(Tag::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,4 @@ class Permission extends parentPermission
|
|||||||
protected $connection = 'mysql';
|
protected $connection = 'mysql';
|
||||||
|
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
|
|
||||||
public function application()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(\App\Models\Core\App\Application::class)->withDefault(['name' => '']);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function application_module()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(\App\Models\Core\App\ApplicationModule::class)->withDefault(['name' => '']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Models\Core\Auth;
|
namespace App\Models\Core\Auth;
|
||||||
|
|
||||||
use Sebastienheyd\Boilerplate\Models\permissionCategory as parentPermissionCategory;
|
use Sebastienheyd\Boilerplate\Models\PermissionCategory as parentPermissionCategory;
|
||||||
|
|
||||||
class PermissionCategory extends parentPermissionCategory
|
class PermissionCategory extends parentPermissionCategory
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ namespace App\Models\Core;
|
|||||||
use App\Traits\Model\HasComments;
|
use App\Traits\Model\HasComments;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||||
|
|
||||||
class Comment extends Model
|
class Comment extends Model
|
||||||
{
|
{
|
||||||
@@ -21,12 +23,12 @@ class Comment extends Model
|
|||||||
return $query->where('is_approved', true);
|
return $query->where('is_approved', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function commentable()
|
public function commentable(): MorphTo
|
||||||
{
|
{
|
||||||
return $this->morphTo();
|
return $this->morphTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function commentator()
|
public function commentator(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo($this->getAuthModelName(), 'user_id');
|
return $this->belongsTo($this->getAuthModelName(), 'user_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use App\Repositories\Shop\SaleChannels;
|
|||||||
use Cesargb\Database\Support\CascadeDelete;
|
use Cesargb\Database\Support\CascadeDelete;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Kalnoy\Nestedset\NestedSet;
|
use Kalnoy\Nestedset\NestedSet;
|
||||||
use Rinvex\Categories\Models\Category as parentCategory;
|
use Rinvex\Categories\Models\Category as parentCategory;
|
||||||
@@ -35,7 +36,7 @@ class Category extends parentCategory
|
|||||||
NestedSet::PARENT_ID,
|
NestedSet::PARENT_ID,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function Articles()
|
public function Articles(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Article::class, 'categorizable');
|
return $this->morphedByMany(Article::class, 'categorizable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Notifications\ResetPassword;
|
use App\Notifications\ResetPassword;
|
||||||
use App\Notifications\VerifyEmail;
|
use App\Notifications\VerifyEmail;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
@@ -23,27 +25,27 @@ class Customer extends Authenticatable
|
|||||||
|
|
||||||
protected $casts = ['email_verified_at' => 'datetime'];
|
protected $casts = ['email_verified_at' => 'datetime'];
|
||||||
|
|
||||||
public function delivery_addresses()
|
public function delivery_addresses(): HasMany
|
||||||
{
|
{
|
||||||
return $this->addresses()->byDelivery();
|
return $this->addresses()->byDelivery();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoice_addresses()
|
public function invoice_addresses(): HasMany
|
||||||
{
|
{
|
||||||
return $this->addresses()->byInvoicing();
|
return $this->addresses()->byInvoicing();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addresses()
|
public function addresses(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerAddress::class);
|
return $this->hasMany(CustomerAddress::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customer_deliveries()
|
public function customer_deliveries(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerDelivery::class);
|
return $this->hasMany(CustomerDelivery::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customer_sale_channels()
|
public function customer_sale_channels(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerSaleChannel::class);
|
return $this->hasMany(CustomerSaleChannel::class);
|
||||||
}
|
}
|
||||||
@@ -54,17 +56,17 @@ class Customer extends Authenticatable
|
|||||||
->whereNull('shop_customer_sale_channels.deleted_at');
|
->whereNull('shop_customer_sale_channels.deleted_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channels()
|
public function sale_channels(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(SaleChannel::class, CustomerSaleChannel::class)->wherePivotNull('deleted_at');
|
return $this->belongsToMany(SaleChannel::class, CustomerSaleChannel::class)->wherePivotNull('deleted_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoices()
|
public function invoices(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Invoice::class);
|
return $this->hasMany(Invoice::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orders()
|
public function orders(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Order::class);
|
return $this->hasMany(Order::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||||
use Venturecraft\Revisionable\RevisionableTrait;
|
use Venturecraft\Revisionable\RevisionableTrait;
|
||||||
@@ -33,12 +35,12 @@ class Delivery extends Model
|
|||||||
'event_date_end',
|
'event_date_end',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function customers()
|
public function customers(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(Customer::class, CustomerSaleChannel::class);
|
return $this->hasManyThrough(Customer::class, CustomerSaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channel()
|
public function sale_channel(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(SaleChannel::class);
|
return $this->belongsTo(SaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Venturecraft\Revisionable\RevisionableTrait;
|
use Venturecraft\Revisionable\RevisionableTrait;
|
||||||
use Wildside\Userstamps\Userstamps;
|
use Wildside\Userstamps\Userstamps;
|
||||||
@@ -19,7 +20,7 @@ class DeliveryTypeCalculation extends Model
|
|||||||
|
|
||||||
protected $keepRevisionOf = ['type_id', 'weight', 'price'];
|
protected $keepRevisionOf = ['type_id', 'weight', 'price'];
|
||||||
|
|
||||||
public function delivery_type()
|
public function delivery_type(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(DeliveryType::class, 'type_id');
|
return $this->belongsTo(DeliveryType::class, 'type_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Models\Shop;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
|
||||||
|
|
||||||
class DistributionChannel extends Model
|
|
||||||
{
|
|
||||||
use HasRelationships;
|
|
||||||
|
|
||||||
protected $guarded = ['id'];
|
|
||||||
|
|
||||||
protected $table = 'shop_distribution_channel';
|
|
||||||
|
|
||||||
public function tariff_generics()
|
|
||||||
{
|
|
||||||
return $this->hasMany(TariffGeneric::class);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use LaracraftTech\LaravelDateScopes\DateScopes;
|
use LaracraftTech\LaravelDateScopes\DateScopes;
|
||||||
use Venturecraft\Revisionable\RevisionableTrait;
|
use Venturecraft\Revisionable\RevisionableTrait;
|
||||||
@@ -20,22 +22,22 @@ class Invoice extends Model
|
|||||||
|
|
||||||
protected $dontKeepRevisionOf = ['updated_by', 'updated_at'];
|
protected $dontKeepRevisionOf = ['updated_by', 'updated_at'];
|
||||||
|
|
||||||
public function payments()
|
public function payments(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(InvoicePayment::class);
|
return $this->hasMany(InvoicePayment::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function order()
|
public function order(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Order::class);
|
return $this->belongsTo(Order::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customer()
|
public function customer(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Customer::class, 'customer_id');
|
return $this->belongsTo(Customer::class, 'customer_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function address()
|
public function address(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(CustomerAddress::class, 'invoice_address_id');
|
return $this->belongsTo(CustomerAddress::class, 'invoice_address_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Venturecraft\Revisionable\RevisionableTrait;
|
use Venturecraft\Revisionable\RevisionableTrait;
|
||||||
use Wildside\Userstamps\Userstamps;
|
use Wildside\Userstamps\Userstamps;
|
||||||
|
use Znck\Eloquent\Relations\BelongsToThrough;
|
||||||
|
|
||||||
class InvoicePayment extends Model
|
class InvoicePayment extends Model
|
||||||
{
|
{
|
||||||
@@ -14,12 +16,12 @@ class InvoicePayment extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_invoice_payments';
|
protected $table = 'shop_invoice_payments';
|
||||||
|
|
||||||
public function invoice()
|
public function invoice(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Invoice::class);
|
return $this->belongsTo(Invoice::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function order()
|
public function order(): BelongsToThrough
|
||||||
{
|
{
|
||||||
return $this->belongsToThrough(Order::class, Invoice::class);
|
return $this->belongsToThrough(Order::class, Invoice::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\Imageable;
|
use App\Traits\Model\Imageable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Kirschbaum\PowerJoins\PowerJoins;
|
use Kirschbaum\PowerJoins\PowerJoins;
|
||||||
use Rinvex\Tags\Traits\Taggable;
|
use Rinvex\Tags\Traits\Taggable;
|
||||||
@@ -28,17 +31,17 @@ class Merchandise extends Model implements HasMedia
|
|||||||
'plus',
|
'plus',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function Articles()
|
public function Articles(): MorphMany
|
||||||
{
|
{
|
||||||
return $this->morphMany(Article::class, 'product');
|
return $this->morphMany(Article::class, 'product');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Producer()
|
public function Producer(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Producer::class);
|
return $this->belongsTo(Producer::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tags()
|
public function tags(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphToMany(Tag::class, 'taggable');
|
return $this->morphToMany(Tag::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\HasComments;
|
use App\Traits\Model\HasComments;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||||
|
use Znck\Eloquent\Relations\BelongsToThrough as RelationsBelongsToThrough;
|
||||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||||
|
|
||||||
class Offer extends Model
|
class Offer extends Model
|
||||||
@@ -15,12 +18,12 @@ class Offer extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_offers';
|
protected $table = 'shop_offers';
|
||||||
|
|
||||||
public function article()
|
public function article(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Article::class);
|
return $this->belongsTo(Article::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function article_nature()
|
public function article_nature(): RelationsBelongsToThrough
|
||||||
{
|
{
|
||||||
return $this->belongsToThrough(ArticleNature::class, Article::class, null, '', [
|
return $this->belongsToThrough(ArticleNature::class, Article::class, null, '', [
|
||||||
'App\Models\Shop\Article' => 'article_id',
|
'App\Models\Shop\Article' => 'article_id',
|
||||||
@@ -33,7 +36,7 @@ class Offer extends Model
|
|||||||
return $this->article->categories();
|
return $this->article->categories();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function price_lists()
|
public function price_lists(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(PriceList::class, Tariff::class, 'id', 'tariff_id', 'tariff_id', 'id');
|
return $this->hasManyThrough(PriceList::class, Tariff::class, 'id', 'tariff_id', 'tariff_id', 'id');
|
||||||
}
|
}
|
||||||
@@ -48,12 +51,12 @@ class Offer extends Model
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tariff()
|
public function tariff(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Tariff::class);
|
return $this->belongsTo(Tariff::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function variation()
|
public function variation(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Variation::class);
|
return $this->belongsTo(Variation::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use LaracraftTech\LaravelDateScopes\DateScopes;
|
use LaracraftTech\LaravelDateScopes\DateScopes;
|
||||||
use Venturecraft\Revisionable\RevisionableTrait;
|
use Venturecraft\Revisionable\RevisionableTrait;
|
||||||
@@ -19,32 +22,32 @@ class Order extends Model
|
|||||||
|
|
||||||
protected $keepRevisionOf = ['customer_address_id', 'delivery_id', 'payment_type', 'status'];
|
protected $keepRevisionOf = ['customer_address_id', 'delivery_id', 'payment_type', 'status'];
|
||||||
|
|
||||||
public function customer()
|
public function customer(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Customer::class);
|
return $this->belongsTo(Customer::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delivery_address()
|
public function delivery_address(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(CustomerAddress::class, 'delivery_address_id');
|
return $this->belongsTo(CustomerAddress::class, 'delivery_address_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delivery()
|
public function delivery(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Delivery::class);
|
return $this->belongsTo(Delivery::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function detail()
|
public function detail(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(OrderDetail::class);
|
return $this->hasMany(OrderDetail::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoice()
|
public function invoice(): HasOne
|
||||||
{
|
{
|
||||||
return $this->hasOne(Invoice::class);
|
return $this->hasOne(Invoice::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channel()
|
public function sale_channel(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(SaleChannel::class);
|
return $this->belongsTo(SaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
class OrderDetail extends Model
|
class OrderDetail extends Model
|
||||||
{
|
{
|
||||||
@@ -10,12 +11,12 @@ class OrderDetail extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_order_details';
|
protected $table = 'shop_order_details';
|
||||||
|
|
||||||
public function order()
|
public function order(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Order::class);
|
return $this->belongsTo(Order::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function offer()
|
public function offer(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Offer::class);
|
return $this->belongsTo(Offer::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
|
|
||||||
class Package extends Model
|
class Package extends Model
|
||||||
{
|
{
|
||||||
@@ -10,22 +13,22 @@ class Package extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_packages';
|
protected $table = 'shop_packages';
|
||||||
|
|
||||||
public function article_family()
|
public function article_family(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ArticleNature::class);
|
return $this->belongsTo(ArticleNature::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unities()
|
public function unities(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Unity::class);
|
return $this->hasMany(Unity::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function variations()
|
public function variations(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Variation::class);
|
return $this->hasMany(Variation::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function offers()
|
public function offers(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(Offer::class, Variation::class);
|
return $this->hasManyThrough(Offer::class, Variation::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\HasComments;
|
use App\Traits\Model\HasComments;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||||
|
|
||||||
class PriceList extends Model
|
class PriceList extends Model
|
||||||
@@ -14,22 +17,22 @@ class PriceList extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_price_lists';
|
protected $table = 'shop_price_lists';
|
||||||
|
|
||||||
public function tariff()
|
public function tariff(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Tariff::class);
|
return $this->belongsTo(Tariff::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function offers()
|
public function offers(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(Offer::class, Tariff::class, 'id', 'tariff_id', 'id', 'id');
|
return $this->hasManyThrough(Offer::class, Tariff::class, 'id', 'tariff_id', 'id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channel()
|
public function sale_channel(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(SaleChannel::class);
|
return $this->belongsTo(SaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function price_list_values()
|
public function price_list_values(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(PriceListValue::class);
|
return $this->hasMany(PriceListValue::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Wildside\Userstamps\Userstamps;
|
use Wildside\Userstamps\Userstamps;
|
||||||
|
use Znck\Eloquent\Relations\BelongsToThrough as RelationsBelongsToThrough;
|
||||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||||
|
|
||||||
class PriceListValue extends Model
|
class PriceListValue extends Model
|
||||||
@@ -15,12 +17,12 @@ class PriceListValue extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_price_list_values';
|
protected $table = 'shop_price_list_values';
|
||||||
|
|
||||||
public function price_list()
|
public function price_list(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(PriceList::class);
|
return $this->belongsTo(PriceList::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tariff()
|
public function tariff(): RelationsBelongsToThrough
|
||||||
{
|
{
|
||||||
return $this->belongsToThrough(
|
return $this->belongsToThrough(
|
||||||
Tariff::class,
|
Tariff::class,
|
||||||
@@ -34,7 +36,7 @@ class PriceListValue extends Model
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function vat()
|
public function vat(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Tax::class, 'tax_id');
|
return $this->belongsTo(Tax::class, 'tax_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\Imageable;
|
use App\Traits\Model\Imageable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Kirschbaum\PowerJoins\PowerJoins;
|
use Kirschbaum\PowerJoins\PowerJoins;
|
||||||
use Rinvex\Tags\Traits\Taggable;
|
use Rinvex\Tags\Traits\Taggable;
|
||||||
@@ -23,12 +25,12 @@ class Producer extends Model implements HasMedia
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function Merchandises()
|
public function Merchandises(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Merchandise::class);
|
return $this->hasMany(Merchandise::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tags()
|
public function tags(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphToMany(Tag::class, 'taggable');
|
return $this->morphToMany(Tag::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
|
|
||||||
class SaleChannel extends Model
|
class SaleChannel extends Model
|
||||||
{
|
{
|
||||||
@@ -10,27 +13,27 @@ class SaleChannel extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_sale_channels';
|
protected $table = 'shop_sale_channels';
|
||||||
|
|
||||||
public function customer_sale_channels()
|
public function customer_sale_channels(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(CustomerSaleChannel::class);
|
return $this->hasMany(CustomerSaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customers()
|
public function customers(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(Customer::class, CustomerSaleChannel::class)->wherePivotNull('deleted_at');
|
return $this->belongsToMany(Customer::class, CustomerSaleChannel::class)->wherePivotNull('deleted_at');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deliveries()
|
public function deliveries(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Delivery::class);
|
return $this->hasMany(Delivery::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function price_lists()
|
public function price_lists(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(PriceList::class);
|
return $this->hasMany(PriceList::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tariffs()
|
public function tariffs(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(Tariff::class, PriceList::class, 'sale_channel_id', 'id', 'id', 'tariff_id');
|
return $this->hasManyThrough(Tariff::class, PriceList::class, 'sale_channel_id', 'id', 'id', 'tariff_id');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Models\Shop;
|
namespace App\Models\Shop;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||||
|
|
||||||
class Shelve extends Model
|
class Shelve extends Model
|
||||||
@@ -13,18 +14,8 @@ class Shelve extends Model
|
|||||||
|
|
||||||
protected $table = 'categories';
|
protected $table = 'categories';
|
||||||
|
|
||||||
public function articles()
|
public function articles(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Article::class);
|
return $this->hasMany(Article::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prices()
|
|
||||||
{
|
|
||||||
return $this->hasMany(Price::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function packages()
|
|
||||||
{
|
|
||||||
return $this->hasMany(Package::class);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Models\Botanic\Specie;
|
use App\Models\Botanic\Specie;
|
||||||
use App\Models\Botanic\Variety;
|
use App\Models\Botanic\Variety;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||||
use Rinvex\Tags\Models\Tag as parentTag;
|
use Rinvex\Tags\Models\Tag as parentTag;
|
||||||
|
|
||||||
class Tag extends parentTag
|
class Tag extends parentTag
|
||||||
@@ -22,42 +24,42 @@ class Tag extends parentTag
|
|||||||
];
|
];
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
public function offers()
|
public function offers(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->articles();
|
return $this->articles();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function articles()
|
public function articles(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Article::class, 'taggable');
|
return $this->morphedByMany(Article::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function categories()
|
public function categories(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Category::class, 'taggable');
|
return $this->morphedByMany(Category::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tag_group()
|
public function tag_group(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(TagGroup::class);
|
return $this->belongsTo(TagGroup::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function shelves()
|
public function shelves(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Shelve::class, 'taggable');
|
return $this->morphedByMany(Shelve::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function species()
|
public function species(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Specie::class, 'taggable');
|
return $this->morphedByMany(Specie::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function varieties()
|
public function varieties(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Variety::class, 'taggable');
|
return $this->morphedByMany(Variety::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function merchandises()
|
public function merchandises(): MorphToMany
|
||||||
{
|
{
|
||||||
return $this->morphedByMany(Merchandise::class, 'taggable');
|
return $this->morphedByMany(Merchandise::class, 'taggable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
use Dyrynda\Database\Support\CascadeSoftDeletes;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
class TagGroup extends Model
|
class TagGroup extends Model
|
||||||
@@ -16,12 +18,12 @@ class TagGroup extends Model
|
|||||||
|
|
||||||
protected $cascadeDeletes = ['tags'];
|
protected $cascadeDeletes = ['tags'];
|
||||||
|
|
||||||
public function tags()
|
public function tags(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Tag::class);
|
return $this->hasMany(Tag::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function article_family()
|
public function article_family(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(ArticleNature::class);
|
return $this->belongsTo(ArticleNature::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\HasComments;
|
use App\Traits\Model\HasComments;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||||
use Kirschbaum\PowerJoins\PowerJoins;
|
use Kirschbaum\PowerJoins\PowerJoins;
|
||||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||||
|
|
||||||
@@ -15,32 +18,32 @@ class Tariff extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_tariffs';
|
protected $table = 'shop_tariffs';
|
||||||
|
|
||||||
public function offers()
|
public function offers(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Offer::class);
|
return $this->hasMany(Offer::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channel()
|
public function sale_channel(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(SaleChannel::class);
|
return $this->belongsTo(SaleChannel::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sale_channels()
|
public function sale_channels(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->HasManyThrough(SaleChannel::class, PriceList::class, 'id', 'id', 'id', 'sale_channel_id');
|
return $this->HasManyThrough(SaleChannel::class, PriceList::class, 'id', 'id', 'id', 'sale_channel_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tariff_unity()
|
public function tariff_unity(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(TariffUnity::class);
|
return $this->belongsTo(TariffUnity::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function price_lists()
|
public function price_lists(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(PriceList::class);
|
return $this->hasMany(PriceList::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function price_list_values()
|
public function price_list_values(): HasManyThrough
|
||||||
{
|
{
|
||||||
return $this->hasManyThrough(PriceListValue::class, PriceList::class);
|
return $this->hasManyThrough(PriceListValue::class, PriceList::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ namespace App\Models\Shop;
|
|||||||
|
|
||||||
use App\Traits\Model\HasComments;
|
use App\Traits\Model\HasComments;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
|
||||||
class Variation extends Model
|
class Variation extends Model
|
||||||
{
|
{
|
||||||
@@ -13,17 +15,17 @@ class Variation extends Model
|
|||||||
|
|
||||||
protected $table = 'shop_variations';
|
protected $table = 'shop_variations';
|
||||||
|
|
||||||
public function package()
|
public function package(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Package::class);
|
return $this->belongsTo(Package::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function unity()
|
public function unity(): BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Unity::class);
|
return $this->belongsTo(Unity::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function offers()
|
public function offers(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Offer::class);
|
return $this->hasMany(Offer::class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Botanic;
|
namespace App\Repositories\Botanic;
|
||||||
|
|
||||||
use App\Exports\Botanic\FamiliesExport;
|
|
||||||
use App\Models\Botanic\Family;
|
use App\Models\Botanic\Family;
|
||||||
use App\Traits\Model\Basic;
|
use App\Traits\Model\Basic;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
|
|
||||||
class Families
|
class Families
|
||||||
{
|
{
|
||||||
use Basic;
|
use Basic;
|
||||||
|
|
||||||
public static function exportExcel()
|
|
||||||
{
|
|
||||||
return Excel::download(new FamiliesExport(), 'families.xlsx');
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getModel()
|
public static function getModel()
|
||||||
{
|
{
|
||||||
return Family::query();
|
return Family::query();
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Botanic;
|
namespace App\Repositories\Botanic;
|
||||||
|
|
||||||
use App\Exports\Botanic\GenresExport;
|
|
||||||
use App\Models\Botanic\Genre;
|
use App\Models\Botanic\Genre;
|
||||||
use App\Traits\Model\Basic;
|
use App\Traits\Model\Basic;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
|
|
||||||
class Genres
|
class Genres
|
||||||
{
|
{
|
||||||
use Basic;
|
use Basic;
|
||||||
|
|
||||||
public static function exportExcel()
|
public static function init()
|
||||||
{
|
{
|
||||||
return Excel::download(new GenresExport(), 'genres.xlsx');
|
return [
|
||||||
|
'families' => Families::getOptions(),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getModel()
|
public static function getModel()
|
||||||
|
|||||||
@@ -2,17 +2,24 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Botanic;
|
namespace App\Repositories\Botanic;
|
||||||
|
|
||||||
use App\Exports\Botanic\SpeciesExport;
|
|
||||||
use App\Models\Botanic\Specie;
|
use App\Models\Botanic\Specie;
|
||||||
use App\Repositories\Core\Tag;
|
use App\Repositories\Core\Tag;
|
||||||
|
use App\Repositories\Shop\TagGroups;
|
||||||
use App\Traits\Model\Basic;
|
use App\Traits\Model\Basic;
|
||||||
use App\Traits\Repository\Imageable;
|
use App\Traits\Repository\Imageable;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
|
|
||||||
class Species
|
class Species
|
||||||
{
|
{
|
||||||
use Basic, Imageable;
|
use Basic, Imageable;
|
||||||
|
|
||||||
|
public static function init()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'genres' => Genres::getOptions(),
|
||||||
|
'tags_list' => TagGroups::getTreeTags(),
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
public static function getDescription($id)
|
public static function getDescription($id)
|
||||||
{
|
{
|
||||||
return self::get($id)->description ?? '';
|
return self::get($id)->description ?? '';
|
||||||
@@ -62,11 +69,6 @@ class Species
|
|||||||
return Tag::storeTags($specie, $tags);
|
return Tag::storeTags($specie, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function exportExcel()
|
|
||||||
{
|
|
||||||
return Excel::download(new SpeciesExport(), 'species.xlsx');
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getModel()
|
public static function getModel()
|
||||||
{
|
{
|
||||||
return Specie::query();
|
return Specie::query();
|
||||||
|
|||||||
@@ -2,17 +2,23 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Botanic;
|
namespace App\Repositories\Botanic;
|
||||||
|
|
||||||
use App\Exports\Botanic\VarietiesExport;
|
|
||||||
use App\Models\Botanic\Variety;
|
use App\Models\Botanic\Variety;
|
||||||
use App\Repositories\Core\Tag;
|
use App\Repositories\Core\Tag;
|
||||||
use App\Traits\Model\Basic;
|
use App\Traits\Model\Basic;
|
||||||
use App\Traits\Repository\Imageable;
|
use App\Traits\Repository\Imageable;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
|
||||||
|
|
||||||
class Varieties
|
class Varieties
|
||||||
{
|
{
|
||||||
use Basic, Imageable;
|
use Basic, Imageable;
|
||||||
|
|
||||||
|
public static function init()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'species' => Species::getOptions(),
|
||||||
|
'tags_list' => TagGroups::getTreeTags(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
public static function getOptionsWithSpecie()
|
public static function getOptionsWithSpecie()
|
||||||
{
|
{
|
||||||
$varieties = Variety::with('specie')->get();
|
$varieties = Variety::with('specie')->get();
|
||||||
@@ -72,11 +78,6 @@ class Varieties
|
|||||||
return Tag::storeTags($variety, $tags);
|
return Tag::storeTags($variety, $tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function exportExcel()
|
|
||||||
{
|
|
||||||
return Excel::download(new VarietiesExport(), 'varieties.xlsx');
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getModel()
|
public static function getModel()
|
||||||
{
|
{
|
||||||
return Variety::query();
|
return Variety::query();
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Traits\Model;
|
namespace App\Traits\Model;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
use Spatie\Image\Manipulations;
|
use Spatie\Image\Manipulations;
|
||||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||||
@@ -10,12 +12,12 @@ trait Imageable
|
|||||||
{
|
{
|
||||||
use InteractsWithMedia;
|
use InteractsWithMedia;
|
||||||
|
|
||||||
public function images()
|
public function images(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Media::class, 'model_id')->where('model_type', get_class($this));
|
return $this->hasMany(Media::class, 'model_id')->where('model_type', get_class($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function image()
|
public function image(): HasOne
|
||||||
{
|
{
|
||||||
return $this->hasOne(Media::class, 'model_id')->where('model_type', get_class($this))->latest();
|
return $this->hasOne(Media::class, 'model_id')->where('model_type', get_class($this))->latest();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('countries.title'),
|
|
||||||
'subtitle' => __('countries.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Country.title') => 'Admin.Country.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Country.store', 'id' => 'country-form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Country.form')
|
|
||||||
@endcomponent
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('DueDiligence.distributors.title'),
|
|
||||||
'subtitle' => __('DueDiligence.distributors.list'),
|
|
||||||
'breadcrumb' => [__('DueDiligence.distributors.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.dashboard')
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('countries.title'),
|
|
||||||
'subtitle' => __('countries.edit'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('countries.title') => 'Admin.Country.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Country.store', 'id' => 'country-form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $country['id'] }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Country.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<html>
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.table', ['logo2' => public_path('/storage/partner/fundglobam/images/logo.png') ])
|
|
||||||
</html>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ App::getLocale() }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.table', ['logo' => '/storage/partner/fundglobam/images/logo.png'])
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// window.print();
|
|
||||||
// window.history.back();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
@include('load.form.select2')
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('name', __('name')) }}
|
|
||||||
@include('components.form.input-translate', ['name' => 'name', 'value' => $country['name'] ?? null, 'translations' => $country->translations['name'] ?? null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('zone', __('zone')) }}
|
|
||||||
@include('components.form.select', ['name' => 'zone', 'value' => $country['zone_id'] ?? null, 'list' => $zones ?? null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('name', __('region')) }}
|
|
||||||
@include('components.form.select', ['name' => 'region', 'value' => $country['region'] ?? null, 'list' => $regions ?? null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('nale', __('subregion')) }}
|
|
||||||
@include('components.form.select', ['name' => 'zone', 'value' => $country['subregion'] ?? null, 'list' => $subregions ?? null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
initSelect2();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('application.title'),
|
|
||||||
'subtitle' => __('application.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
@include('load.form.toggle')
|
|
||||||
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<div class="nav nav-tabs">
|
|
||||||
<a href="#dashboard" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="dashboard" aria-selected="true">
|
|
||||||
{{ __('dashboard') }}
|
|
||||||
</a>
|
|
||||||
<a href="#list" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="list" aria-selected="false">
|
|
||||||
{{ __('list') }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="tab-content mb-0">
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="dashboard">
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.App.Application.partials.dashboard')
|
|
||||||
@endcomponent
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="list">
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.App.Application.index'), 'model' => 'applications', 'with_filters' => true, 'with_exports' => true, 'callback' => 'handleApplication();'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-applications-filters'])
|
|
||||||
@include('admin.Core.App.Application.partials.filters', ['model' => 'applications'])
|
|
||||||
@endcomponent
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
function handleApplication() {
|
|
||||||
initToggle("{{ route('Admin.Core.App.Application.toggleActive') }}");
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
initSelect2();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<h3 class="text-white">{{ __('documentation_types') }}</h3>
|
|
||||||
|
|
||||||
@include('components.datatable', ['route' => route('Admin.DocumentationType.index'), 'model' => 'documentation_types', 'with_filters' => true, 'with_exports' => true, 'create_callback' => 'DocumentationTypeCreate();', 'edit_callback' => 'DocumentationTypeEdit(id);'])
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-documentation_types-filters'])
|
|
||||||
@include('apps.admin.DocumentationType.partials.filters', ['model' => 'documentation_types'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function DocumentationTypeCreate(id) {
|
|
||||||
var distributor_id = $('#distributor_id').val();
|
|
||||||
var url_open = "{{ route('Admin.DocumentationType.modalCreate') }}" + '/' + distributor_id;
|
|
||||||
var url_save = "{{ route('Admin.DocumentationType.storeAjax') }}";
|
|
||||||
openModal("{{ __('country') }}", '#country-form', url_open, url_save, "DocumentationTypeRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function DocumentationTypeEdit(id) {
|
|
||||||
var url_open = "{{ route('Admin.DocumentationType.modalEdit') }}" + '/' + id;
|
|
||||||
var url_save = "{{ route('Admin.DocumentationType.storeAjax') }}";
|
|
||||||
openModal("{{ __('country') }}", '#country-form', url_open, url_save, "DocumentationTypeRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function DocumentationTypeRefresh()
|
|
||||||
{
|
|
||||||
reloadDatatable("documentation_types");
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
{{ Form::open(['route' => 'DueDiligence.Admin.CountryParam.store', 'id' => 'country_param-form', 'autocomplete' => 'off', 'files' => true]) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $country_param['id'] ?? null }}">
|
|
||||||
<input type="hidden" name="distributor_id" value="{{ $country_param['distributor_id'] ?? null }}">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-8">
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{{ Form::label('name', __('date')) }}<br/>
|
|
||||||
@include('components.form.datepicker', ['name' => 'date', 'value' => $country_param['date'] ?? null])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
{{ Form::label('name', __('ope_rrai')) }}<br/>
|
|
||||||
@include('components.form.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
{{ Form::label('name', __('color')) }}<br/>
|
|
||||||
@include('components.form.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => ''])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
{{ Form::label('name', __('broken_arrows')) }}<br/>
|
|
||||||
@include('components.form.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12">
|
|
||||||
{{ Form::label('name', __('comments')) }}<br/>
|
|
||||||
@include('components.form.editor', ['name' => 'comments', 'value' => $country_param['comments'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
@include('components.widgets.pdfPreview',['container' => 'country_param-file'])
|
|
||||||
|
|
||||||
{{ Form::label('name', __('file')) }}<br/>
|
|
||||||
@include('components.file', ['name' => 'file', 'value' => $country_param['file'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
initSelect2();
|
|
||||||
var id = {{ $country_param['id'] ?? 'false' }};
|
|
||||||
var distributor_id = {{ $country_param['distributor_id'] ?? 'false' }};
|
|
||||||
|
|
||||||
var path = '/DueDiligence/Admin/CountryParam';
|
|
||||||
@if (isset($country_param['file']))
|
|
||||||
var file = path + '/getDocument/' + distributor_id + '/' + encodeURIComponent("{{ $country_param['file'] }}");
|
|
||||||
PDFObject.embed(file, "#country_param-file-preview");
|
|
||||||
$('#country_param-file').removeClass('d-none');
|
|
||||||
@endif
|
|
||||||
|
|
||||||
$('.file').fileinput({
|
|
||||||
showCaption: false,
|
|
||||||
dropZoneEnabled: false,
|
|
||||||
showUpload: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.datepicker').datetimepicker({
|
|
||||||
format: 'L',
|
|
||||||
@if (!isset($country_param['date']))
|
|
||||||
date: new Date()
|
|
||||||
@endif
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.editor').tinymce({});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<form id="{{ $model }}-filters">
|
|
||||||
</form>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('DueDiligence.distributors.title'),
|
|
||||||
'subtitle' => __('DueDiligence.distributors.show'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('DueDiligence.title') => 'DueDiligence.Admin.index',
|
|
||||||
__('DueDiligence.distributors.title') => 'DueDiligence.Admin.Distributor.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('application_modules.title'),
|
|
||||||
'subtitle' => __('application_modules.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Country.title') => 'Admin.Core.App.ApplicationModule.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.App.ApplicationModule.store', 'id' => 'application_module-form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.App.ApplicationModule.form')
|
|
||||||
@endcomponent
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('DueDiligence.distributors.title'),
|
|
||||||
'subtitle' => __('DueDiligence.distributors.list'),
|
|
||||||
'breadcrumb' => [__('DueDiligence.distributors.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.dashboard')
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('application_modules.title'),
|
|
||||||
'subtitle' => __('application_modules.edit'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Application_Module.title') => 'Admin.Core.App.ApplicationModule.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.App.ApplicationModule.store', 'id' => 'application_module-form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $application_module['id'] ?? null }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.App.ApplicationModule.form')
|
|
||||||
@endcomponent
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<html>
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.table', ['logo2' => public_path('/storage/partner/fundglobam/images/logo.png') ])
|
|
||||||
</html>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="{{ App::getLocale() }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="robots" content="noindex, nofollow">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.partials.table', ['logo' => '/storage/partner/fundglobam/images/logo.png'])
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// window.print();
|
|
||||||
// window.history.back();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('name', __('application')) }}
|
|
||||||
@include('components.form.select', ['name' => 'application_id', 'value' => $application_module['application_id'] ?? null, 'list' => $applications, 'required' => true, 'with_empty' => ''])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
{{ Form::label('name', __('name')) }}
|
|
||||||
@include('components.form.input-translate', ['name' => 'name', 'value' => $application_module['name'] ?? null, 'translations' => $application_module->translations['name'] ?? null, 'required' => true])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
@include('load.form.save')
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
initSelect2();
|
|
||||||
initSaveForm('.save', '#application_module-form');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('application_module.title'),
|
|
||||||
'subtitle' => __('application_module.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
@include('load.form.toggle')
|
|
||||||
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<div class="nav nav-tabs">
|
|
||||||
<a href="#dashboard" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="dashboard" aria-selected="true">
|
|
||||||
{{ __('dashboard') }}
|
|
||||||
</a>
|
|
||||||
<a href="#list" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="list" aria-selected="false">
|
|
||||||
{{ __('list') }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="tab-content mb-0">
|
|
||||||
|
|
||||||
<div class="tab-pane fade" id="dashboard">
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.App.ApplicationModule.partials.dashboard')
|
|
||||||
@endcomponent
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="list">
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.App.ApplicationModule.index'), 'model' => 'application_modules', 'with_filters' => true, 'with_exports' => true, 'callback' => 'handleApplicationModule();'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-application_modules-filters'])
|
|
||||||
@include('admin.Core.App.ApplicationModule.partials.filters', ['model' => 'applications'])
|
|
||||||
@endcomponent
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
function handleApplicationModule() {
|
|
||||||
initToggle("{{ route('Admin.Core.App.ApplicationModule.toggleActive') }}");
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
initSelect2();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<h3 class="text-white">{{ __('documentation_types') }}</h3>
|
|
||||||
|
|
||||||
@include('components.datatable', ['route' => route('Admin.DocumentationType.index'), 'model' => 'documentation_types', 'with_filters' => true, 'with_exports' => true, 'create_callback' => 'DocumentationTypeCreate();', 'edit_callback' => 'DocumentationTypeEdit(id);'])
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-documentation_types-filters'])
|
|
||||||
@include('apps.admin.DocumentationType.partials.filters', ['model' => 'documentation_types'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function DocumentationTypeCreate(id) {
|
|
||||||
var distributor_id = $('#distributor_id').val();
|
|
||||||
var url_open = "{{ route('Admin.DocumentationType.modalCreate') }}" + '/' + distributor_id;
|
|
||||||
var url_save = "{{ route('Admin.DocumentationType.storeAjax') }}";
|
|
||||||
openModal("{{ __('country') }}", '#country-form', url_open, url_save, "DocumentationTypeRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function DocumentationTypeEdit(id) {
|
|
||||||
var url_open = "{{ route('Admin.DocumentationType.modalEdit') }}" + '/' + id;
|
|
||||||
var url_save = "{{ route('Admin.DocumentationType.storeAjax') }}";
|
|
||||||
openModal("{{ __('country') }}", '#country-form', url_open, url_save, "DocumentationTypeRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function DocumentationTypeRefresh()
|
|
||||||
{
|
|
||||||
reloadDatatable("documentation_types");
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
{{ Form::open(['route' => 'DueDiligence.Admin.CountryParam.store', 'id' => 'country_param-form', 'autocomplete' => 'off', 'files' => true]) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $country_param['id'] ?? null }}">
|
|
||||||
<input type="hidden" name="distributor_id" value="{{ $country_param['distributor_id'] ?? null }}">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-8">
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{{ Form::label('name', __('date')) }}<br/>
|
|
||||||
@include('components.form.datepicker', ['name' => 'date', 'value' => $country_param['date'] ?? null])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
{{ Form::label('name', __('ope_rrai')) }}<br/>
|
|
||||||
@include('components.form.input', ['name' => 'rrai', 'value' => $country_param['rrai'] ?? null])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
{{ Form::label('name', __('color')) }}<br/>
|
|
||||||
@include('components.form.select', ['name' => 'index', 'list' => App\Repositories\DueDiligence\CountryParams::getRiskColors(), 'value' => $country_param['index'] ?? null, 'with_empty' => ''])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
{{ Form::label('name', __('broken_arrows')) }}<br/>
|
|
||||||
@include('components.form.input', ['name' => 'broken', 'value' => $country_param['broken'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12">
|
|
||||||
{{ Form::label('name', __('comments')) }}<br/>
|
|
||||||
@include('components.form.editor', ['name' => 'comments', 'value' => $country_param['comments'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
@include('components.widgets.pdfPreview',['container' => 'country_param-file'])
|
|
||||||
|
|
||||||
{{ Form::label('name', __('file')) }}<br/>
|
|
||||||
@include('components.file', ['name' => 'file', 'value' => $country_param['file'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
initSelect2();
|
|
||||||
var id = {{ $country_param['id'] ?? 'false' }};
|
|
||||||
var distributor_id = {{ $country_param['distributor_id'] ?? 'false' }};
|
|
||||||
|
|
||||||
var path = '/DueDiligence/Admin/CountryParam';
|
|
||||||
@if (isset($country_param['file']))
|
|
||||||
var file = path + '/getDocument/' + distributor_id + '/' + encodeURIComponent("{{ $country_param['file'] }}");
|
|
||||||
PDFObject.embed(file, "#country_param-file-preview");
|
|
||||||
$('#country_param-file').removeClass('d-none');
|
|
||||||
@endif
|
|
||||||
|
|
||||||
$('.file').fileinput({
|
|
||||||
showCaption: false,
|
|
||||||
dropZoneEnabled: false,
|
|
||||||
showUpload: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.datepicker').datetimepicker({
|
|
||||||
format: 'L',
|
|
||||||
@if (!isset($country_param['date']))
|
|
||||||
date: new Date()
|
|
||||||
@endif
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.editor').tinymce({});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<form id="{{ $model }}-filters">
|
|
||||||
</form>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('DueDiligence.distributors.title'),
|
|
||||||
'subtitle' => __('DueDiligence.distributors.show'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('DueDiligence.title') => 'DueDiligence.Admin.index',
|
|
||||||
__('DueDiligence.distributors.title') => 'DueDiligence.Admin.Distributor.index'
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('apps.DueDiligence.admin.Distributor.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.permission.title'),
|
|
||||||
'subtitle' => __('Admin.permission.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.permission.title') => 'Admin.Core.Auth.Permission.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.Permission.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.Permission.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.permission.title'),
|
|
||||||
'subtitle' => __('Admin.permission.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.permission.title') => 'Admin.Core.Auth.Permission.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.Permission.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $permission['id'] }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.Permission.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
<label for="name">{{ __('module') }}</label>
|
|
||||||
@include('components.form.select', ['name' => 'application_module_id', 'value' => $permission['application_module_id'] ?? null, 'list' => $application_modules ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-6">
|
|
||||||
<label for="name">{{ __('name') }}</label>
|
|
||||||
@include('components.form.input', ['name' => 'name', 'value' => $permission['name'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (isset($roles) && count($roles))
|
|
||||||
@include('admin.Core.Auth.User.roles')
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@include('load.form.save')
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
initSaveForm();
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Permission.title'),
|
|
||||||
'subtitle' => __('Permission.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Permission.title') => 'Admin.Core.Auth.Permission.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.Auth.Permission.index'), 'model' => 'permissions'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-filters'])
|
|
||||||
@include('admin.Core.Auth.Permission.partials.filters')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<div class="modobox-sub-header-modify-element-name">{{ $name }}</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-0">
|
|
||||||
<div class="col-sm-12 information_messages_manage p-2">
|
|
||||||
<div class="alert alert-info noradius mb-0">
|
|
||||||
<div class="bg-blue alert-icon">
|
|
||||||
<i class="glyph-icon icon-info"></i>
|
|
||||||
</div>
|
|
||||||
<div class="alert-content">
|
|
||||||
<h4 class="alert-title">{{ __('informations') }}</h4>
|
|
||||||
<p>{{ __('manage_clients_for_user') }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="content-box noborder noradius mb-0" id="user_client_content_box">
|
|
||||||
<h3 class="content-box-header noradius bg-default" id="toggle_button_user_clients">
|
|
||||||
<span class="header-wrapper">
|
|
||||||
<i class="glyph-icon icon-caret-right mr-1"></i>
|
|
||||||
{{ __('clients') }}
|
|
||||||
<span class="bs-badge badge-info {{ $label_opacity }}">
|
|
||||||
{{ count($clients_selected) }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<div class="header-buttons-separator">
|
|
||||||
<a href="#" id="user_clients_assoc_submit" class="assoc-submit-btn hidden icon-separator">
|
|
||||||
<i class="glyph-icon icon-save"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</h3>
|
|
||||||
<div class="content-box-wrapper noradius" style="display:none;">
|
|
||||||
<div id="user_clients_assoc_list">
|
|
||||||
<form class="form-horizontal form_inline" name="user_clients_assoc_form" onsubmit="return false;" method="POST">
|
|
||||||
<div class="form-group margin-bottom-0">
|
|
||||||
<div class="col-sm-12 padding-left-15 padding-right-15">
|
|
||||||
<input type="hidden" name="user_id_client_assoc" id="user_id_client_assoc" value="{{ $id }}" class="form-control" />
|
|
||||||
<select multiple class="multi-select form-no-control" name="user_clients_list" id="user_clients_list">
|
|
||||||
@foreach ($clients as $client)
|
|
||||||
<option value="{{ $client->id }}" {{ !($client->active) ? 'disabled' : '' }} {{ in_array($client->id, $clients_selected) ? 'selected' : '' }}>
|
|
||||||
{{ $client->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<form id="filters">
|
|
||||||
|
|
||||||
</form>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('families.title'),
|
|
||||||
'subtitle' => __('families.title'),
|
|
||||||
'breadcrumb' => [__('families.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-offset-2 col-md-8">
|
|
||||||
|
|
||||||
<div class="box box-info">
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h3>{{ name }}</h3>
|
|
||||||
<h4>
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.role.title'),
|
|
||||||
'subtitle' => __('Admin.role.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.role.title') => 'Admin.Core.Auth.Role.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.Role.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.Role.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.role.title'),
|
|
||||||
'subtitle' => __('Admin.role.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.role.title') => 'Admin.Core.Auth.Role.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.Role.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $role['id'] }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.Role.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<div class="row form-group">
|
|
||||||
<label class="col-sm-3" for="name">{{ __('name') }} <sup>*</sup></label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="text" name="name" id="name" maxlength="100" required value="{{ $role['name'] }}" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label class="control-label light" for="translated">{{ __('permissions') }}</label>
|
|
||||||
<div class="col-12">
|
|
||||||
@include('admin.Core.Auth.Role.table-permission')
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('load.form.save')
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
initSaveForm();
|
|
||||||
initIcheck();
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Role.title'),
|
|
||||||
'subtitle' => __('Role.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Role.title') => 'Admin.Core.Auth.Role.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.Auth.Role.index'), 'model' => 'roles', 'callback' => 'handleRoleActive();'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-roles-filters'])
|
|
||||||
@include('admin.Core.Auth.Role.partials.filters')
|
|
||||||
@endcomponent
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@include('load.form.toggle')
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
function handleRoleActive() {
|
|
||||||
initToggle("{{ route('Admin.Core.Auth.Role.toggleActive') }}");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<div class="modobox-sub-header-modify-element-name">{{ $role->name }}</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-0">
|
|
||||||
<div class="col-sm-12 information_messages_manage padding-left-10 padding-right-10">
|
|
||||||
<div class="alert alert-info noradius margin-bottom-0">
|
|
||||||
<div class="bg-blue alert-icon">
|
|
||||||
<i class="glyph-icon icon-info"></i>
|
|
||||||
</div>
|
|
||||||
<div class="alert-content">
|
|
||||||
<h4 class="alert-title">{{ __('Gestion des droits') }}</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div id="rights" class="col-sm-12" style="padding: 30px;">
|
|
||||||
|
|
||||||
<form class="form-horizontal light" name="{{ $model->name }}_manage_form" onsubmit="return false;" method="POST">
|
|
||||||
<input type="hidden" name="role_id" value="{{ $role->id }}" class="form-control" />
|
|
||||||
|
|
||||||
@foreach ($permissions as $app => $modules)
|
|
||||||
<div>
|
|
||||||
<h3 class="brand">
|
|
||||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#rights" href="#collapse_{{ $app }}" aria-expanded="true" aria-controls="collapse_{{ $app }}">
|
|
||||||
{{ $app }}
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div id="collapse_{{ $app }}" class="collapse content-box light p-2" role="tabpanel">
|
|
||||||
|
|
||||||
@foreach ($modules as $module => $actions)
|
|
||||||
<h4 class="brand">{{ $module }}</h4>
|
|
||||||
<div class="inline-group">
|
|
||||||
@foreach ($actions as $permission)
|
|
||||||
<label class="brand ml-3">{{ $permission->action }}</label>
|
|
||||||
<input type="checkbox" name="permissions[{{ $permission->id }}]" value="1">
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<form id="filters">
|
|
||||||
|
|
||||||
</form>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
@if (count($module['permissions']))
|
|
||||||
<tr>
|
|
||||||
<td>{{ $module['name'] }}</td>
|
|
||||||
<td class="form-group light">
|
|
||||||
<div class="row">
|
|
||||||
@foreach ($module['permissions'] as $permission)
|
|
||||||
<div class="col-4 overflow-hidden">
|
|
||||||
<input type="checkbox" name="permissions[{{ $permission['id'] }}]" class="iCheck" data-skin="square" data-color="blue" value="1" @if (in_array($permission['id'],$role['permissions'])) checked @endif>
|
|
||||||
<label class="control-label light">{{ $permission['name'] }}</label>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endif
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('families.title'),
|
|
||||||
'subtitle' => __('families.title'),
|
|
||||||
'breadcrumb' => [__('families.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-offset-2 col-md-8">
|
|
||||||
|
|
||||||
<div class="box box-info">
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h3>{{ name }}</h3>
|
|
||||||
<h4>
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<table id="permissions_datatable" class="table table-striped table-bordered responsive nowrap noradius light" cellspacing="0" width="100%">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{{ __('module') }}</th>
|
|
||||||
<th>{{ __('actions') }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach ($modules as $module)
|
|
||||||
@include('admin.Core.Auth.Role.row-permission')
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.user.title'),
|
|
||||||
'subtitle' => __('Admin.user.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.user.title') => 'Admin.Core.Auth.User.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.User.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.User.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.user.title'),
|
|
||||||
'subtitle' => __('Admin.user.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.user.title') => 'Admin.Core.Auth.User.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.User.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $user['id'] }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.User.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-9">
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="last_name">{{ __('name') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="username">{{ __('login') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="password">{{ __('password') }} <sup>*</sup></label>
|
|
||||||
@include('components.password', ['name' => 'password'])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="email">{{ __('email') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="phone">{{ __('phone') }}</label>
|
|
||||||
@include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="third_party_id">{{ __('entity') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="team">{{ __('team') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="status">{{ __('status') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label class="control-label light" for="avatar">{{ __('avatar') }}</label>
|
|
||||||
<input type="file" name="avatar" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('admin.Core.Auth.User.roles')
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<div class="modobox-sub-header-modify-element-name">{{ name }}</div>
|
|
||||||
|
|
||||||
<form class="form-horizontal light" name="update_form" onsubmit="return false;" method="POST">
|
|
||||||
|
|
||||||
<input type="hidden" name="id" id="id" value="{{ id }}" class="form-control" />
|
|
||||||
|
|
||||||
{{ include('Admin.elements.datatable.form-indication') }}
|
|
||||||
|
|
||||||
<div class="row form-group">
|
|
||||||
<label class="col-sm-3 control-label dark" for="name">{{ translate('name') }} <sup>*</sup></label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="text" name="name" id="name" maxlength="100" required value="{{ name }}" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row form-group">
|
|
||||||
<label class="col-sm-3 control-label dark" for="translated">{{ translate('english_translation') }} <sup>*</sup></label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<input type="text" name="translated" id="translated" maxlength="30" required value="{{ translated }}" class="form-control">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Team.title'),
|
|
||||||
'subtitle' => __('Team.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Team.title') => 'Admin.Core.Auth.Team.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.Auth.Team.index'), 'model' => 'users'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-filters'])
|
|
||||||
@include('admin.Core.Auth.Team.partials.filters')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<div class="modobox-sub-header-modify-element-name">{{ $name }}</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-0">
|
|
||||||
<div class="col-sm-12 information_messages_manage p-2">
|
|
||||||
<div class="alert alert-info noradius mb-0">
|
|
||||||
<div class="bg-blue alert-icon">
|
|
||||||
<i class="glyph-icon icon-info"></i>
|
|
||||||
</div>
|
|
||||||
<div class="alert-content">
|
|
||||||
<h4 class="alert-title">{{ __('informations') }}</h4>
|
|
||||||
<p>{{ __('manage_clients_for_user') }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="content-box noborder noradius mb-0" id="user_client_content_box">
|
|
||||||
<h3 class="content-box-header noradius bg-default" id="toggle_button_user_clients">
|
|
||||||
<span class="header-wrapper">
|
|
||||||
<i class="glyph-icon icon-caret-right mr-1"></i>
|
|
||||||
{{ __('clients') }}
|
|
||||||
<span class="bs-badge badge-info {{ $label_opacity }}">
|
|
||||||
{{ count($clients_selected) }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<div class="header-buttons-separator">
|
|
||||||
<a href="#" id="user_clients_assoc_submit" class="assoc-submit-btn hidden icon-separator">
|
|
||||||
<i class="glyph-icon icon-save"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</h3>
|
|
||||||
<div class="content-box-wrapper noradius" style="display:none;">
|
|
||||||
<div id="user_clients_assoc_list">
|
|
||||||
<form class="form-horizontal form_inline" name="user_clients_assoc_form" onsubmit="return false;" method="POST">
|
|
||||||
<div class="form-group margin-bottom-0">
|
|
||||||
<div class="col-sm-12 padding-left-15 padding-right-15">
|
|
||||||
<input type="hidden" name="user_id_client_assoc" id="user_id_client_assoc" value="{{ $id }}" class="form-control" />
|
|
||||||
<select multiple class="multi-select form-no-control" name="user_clients_list" id="user_clients_list">
|
|
||||||
@foreach ($clients as $client)
|
|
||||||
<option value="{{ $client->id }}" {{ !($client->active) ? 'disabled' : '' }} {{ in_array($client->id, $clients_selected ?? []) ? 'selected' : '' }}>
|
|
||||||
{{ $client->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
{% import "macros.forms" as forms %}
|
|
||||||
|
|
||||||
<div class="modobox-sub-header-modify-element-name">{{ team.name }}</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-0">
|
|
||||||
<div class="col-sm-12 information_messages_manage padding-left-10 padding-right-10">
|
|
||||||
<div class="alert alert-info noradius margin-bottom-0">
|
|
||||||
<div class="bg-blue alert-icon">
|
|
||||||
<i class="glyph-icon icon-info"></i>
|
|
||||||
</div>
|
|
||||||
<div class="alert-content">
|
|
||||||
<h4 class="alert-title">{{ translate('informations') }}</h4>
|
|
||||||
<p>{{ translate('select_elements_of_your_choice_to_associate_with_the_selected_team') }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="content-box noborder noradius margin-bottom-0" id="team_third_party_content_box">
|
|
||||||
<h3 class="content-box-header noradius bg-default" id="toggle_button_team_third_parties_assoc">
|
|
||||||
<span class="header-wrapper">
|
|
||||||
<i class="glyph-icon icon-caret-right margin-right-5"></i>
|
|
||||||
{{ translate('entity') }} <span class="bs-badge badge-info {{ label_opacity }}">{{ team.third_parties|length }}</span>
|
|
||||||
</span>
|
|
||||||
<div class="header-buttons-separator">
|
|
||||||
<a href="#" id="teams_third_party_assoc_submit" class="assoc-submit-btn hidden icon-separator">
|
|
||||||
<i class="glyph-icon icon-save"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</h3>
|
|
||||||
<div class="content-box-wrapper noradius collapse">
|
|
||||||
<div id="teams_third_parties_assoc_list">
|
|
||||||
<form class="form-horizontal form_inline" name="teams_third_party_assoc_form" onsubmit="return false;" method="POST">
|
|
||||||
<div class="form-group margin-bottom-0">
|
|
||||||
<div class="col-sm-12 padding-left-15 padding-right-15">
|
|
||||||
<input type="hidden" name="team_id_third_party_assoc" id="team_id_third_party_assoc" value="{{ team.id }}" class="form-control" />
|
|
||||||
<select multiple class="multi-select form-no-control" name="team_third_parties_list" id="team_third_parties_list">
|
|
||||||
{{ forms.options(third_parties, team.third_parties) }}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="content-box noborder noradius margin-bottom-0" id="team_user_status_content_box">
|
|
||||||
<h3 class="content-box-header noradius bg-default" id="toggle_button_team_user_statuses_assoc">
|
|
||||||
<span class="header-wrapper">
|
|
||||||
<i class="glyph-icon icon-caret-right margin-right-5"></i>
|
|
||||||
{{ translate('user_statuses') }} <span class="bs-badge badge-info {{ user_label_opacity }}"> {{ team.roles|length }} </span>
|
|
||||||
</span>
|
|
||||||
<div class="header-buttons-separator">
|
|
||||||
<a href="#" id="teams_user_status_assoc_submit" class="assoc-submit-btn hidden icon-separator">
|
|
||||||
<i class="glyph-icon icon-save"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</h3>
|
|
||||||
<div class="content-box-wrapper noradius" style="display:none;">
|
|
||||||
<div id="teams_user_statuses_assoc_list">
|
|
||||||
<form class="form-horizontal form_inline" name="teams_user_status_assoc_form" onsubmit="return false;" method="POST">
|
|
||||||
<div class="form-group margin-bottom-0">
|
|
||||||
<div class="col-sm-12 padding-left-15 padding-right-15">
|
|
||||||
<input type="hidden" name="team_id_user_status_assoc" id="team_id_user_status_assoc" value="{{ team.id }}" class="form-control" />
|
|
||||||
<select multiple class="multi-select form-no-control" name="team_user_statuses_list" id="team_user_statuses_list">
|
|
||||||
{{ forms.html_multioptions(roles, team.roles) }}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<form id="filters">
|
|
||||||
|
|
||||||
</form>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('families.title'),
|
|
||||||
'subtitle' => __('families.title'),
|
|
||||||
'breadcrumb' => [__('families.title')]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-offset-2 col-md-8">
|
|
||||||
|
|
||||||
<div class="box box-info">
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<h3>{{ name }}</h3>
|
|
||||||
<h4>
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.user.title'),
|
|
||||||
'subtitle' => __('Admin.user.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.user.title') => 'Admin.Core.Auth.User.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.User.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.User.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('Admin.user.title'),
|
|
||||||
'subtitle' => __('Admin.user.add'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('Admin.user.title') => 'Admin.Core.Auth.User.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
{{ Form::open(['route' => 'Admin.Core.Auth.User.store', 'id' => 'form', 'autocomplete' => 'off']) }}
|
|
||||||
|
|
||||||
<input type="hidden" name="id" value="{{ $user['id'] }}">
|
|
||||||
|
|
||||||
@include('components.save')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('admin.Core.Auth.User.form')
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<div class="row">
|
|
||||||
<div class="col-9">
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="last_name">{{ __('name') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'last_name', 'value' => $user['last_name'] ?? ''])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="first_name">{{ __('firstname') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'first_name', 'value' => $user['first_name'] ?? ''])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="username">{{ __('login') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'username', 'value' => $user['username'] ?? ''])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6">
|
|
||||||
<label for="password">{{ __('password') }} <sup>*</sup></label>
|
|
||||||
@include('components.password', ['name' => 'password'])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="email">{{ __('email') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.input', ['name' => 'email', 'value' => $user['email'] ?? null])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="phone">{{ __('phone') }}</label>
|
|
||||||
@include('components.form.input', ['name' => 'phone', 'value' => $user['phone'] ?? null])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="third_party_id">{{ __('entity') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'third_party_id', 'list' => $third_parties ?? null, 'value' => $third_party_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="team">{{ __('team') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'team_id', 'list' => $teams ?? null, 'value' => $team_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label for="status">{{ __('status') }} <sup>*</sup></label>
|
|
||||||
@include('components.form.select', ['name' => 'status_id', 'list' => $statuses ?? null, 'value' => $status_id ?? null, 'with_empty' => true ])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3">
|
|
||||||
<div class="col-12 col-md-6 col-lg-4">
|
|
||||||
<label class="control-label light" for="avatar">{{ __('avatar') }}</label>
|
|
||||||
<input type="file" name="avatar" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('admin.Core.Auth.User.roles')
|
|
||||||
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
@extends('layout.index', [
|
|
||||||
'title' => __('User.title'),
|
|
||||||
'subtitle' => __('User.list'),
|
|
||||||
'breadcrumb' => [
|
|
||||||
__('User.title') => 'Admin.Core.Auth.User.index',
|
|
||||||
]
|
|
||||||
])
|
|
||||||
|
|
||||||
@include('load.form.select2')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@component('components.card')
|
|
||||||
@include('components.datatable', ['route' => route('Admin.Core.Auth.User.index'), 'model' => 'users', 'callback' => 'handleUser();', 'create_callback' => 'UserCreate();', 'edit_callback' => 'UserEdit(id);', 'with_filters' => true])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-users-filters'])
|
|
||||||
@include('admin.Core.Auth.User.partials.filters', ['model' => 'users'])
|
|
||||||
@endcomponent
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@include('load.layout.chevron')
|
|
||||||
@include('load.layout.modal')
|
|
||||||
@include('load.form.toggle')
|
|
||||||
@include('load.form.upload.upload')
|
|
||||||
|
|
||||||
@push('js')
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function handleUser() {
|
|
||||||
initToggle("{{ route('Admin.Core.Auth.User.toggleActive') }}");
|
|
||||||
}
|
|
||||||
|
|
||||||
function UserCreate() {
|
|
||||||
var url_open = "{{ route('Admin.Core.Auth.User.modalCreate') }}";
|
|
||||||
var url_save = "{{ route('Admin.Core.Auth.User.storeAjax') }}";
|
|
||||||
openModal("{{ __('user') }}", '#user-form', url_open, url_save, "UserRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function UserEdit(id) {
|
|
||||||
var url_open = "{{ route('Admin.Core.Auth.User.modalEdit') }}/" + id;
|
|
||||||
var url_save = "{{ route('Admin.Core.Auth.User.storeAjax') }}";
|
|
||||||
openModal("{{ __('user') }}", '#user-form', url_open, url_save, "UserRefresh();");
|
|
||||||
}
|
|
||||||
|
|
||||||
function UserRefresh() {
|
|
||||||
reloadDatatable('users');
|
|
||||||
handleUser();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
initSelect2();
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<div class="modobox-sub-header-modify-element-name">{{ $name }}</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-0">
|
|
||||||
<div class="col-sm-12 information_messages_manage p-2">
|
|
||||||
<div class="alert alert-info noradius mb-0">
|
|
||||||
<div class="bg-blue alert-icon">
|
|
||||||
<i class="glyph-icon icon-info"></i>
|
|
||||||
</div>
|
|
||||||
<div class="alert-content">
|
|
||||||
<h4 class="alert-title">{{ __('informations') }}</h4>
|
|
||||||
<p>{{ __('manage_clients_for_user') }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="content-box noborder noradius mb-0" id="user_client_content_box">
|
|
||||||
<h3 class="content-box-header noradius bg-default" id="toggle_button_user_clients">
|
|
||||||
<span class="header-wrapper">
|
|
||||||
<i class="glyph-icon icon-caret-right mr-1"></i>
|
|
||||||
{{ __('clients') }}
|
|
||||||
<span class="bs-badge badge-info {{ $label_opacity }}">
|
|
||||||
{{ count($clients_selected) }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<div class="header-buttons-separator">
|
|
||||||
<a href="#" id="user_clients_assoc_submit" class="assoc-submit-btn hidden icon-separator">
|
|
||||||
<i class="glyph-icon icon-save"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</h3>
|
|
||||||
<div class="content-box-wrapper noradius" style="display:none;">
|
|
||||||
<div id="user_clients_assoc_list">
|
|
||||||
<form class="form-horizontal form_inline" name="user_clients_assoc_form" onsubmit="return false;" method="POST">
|
|
||||||
<div class="form-group margin-bottom-0">
|
|
||||||
<div class="col-sm-12 padding-left-15 padding-right-15">
|
|
||||||
<input type="hidden" name="user_id_client_assoc" id="user_id_client_assoc" value="{{ $id }}" class="form-control" />
|
|
||||||
<select multiple class="multi-select form-no-control" name="user_clients_list" id="user_clients_list">
|
|
||||||
@foreach ($clients as $client)
|
|
||||||
<option value="{{ $client->id }}" {{ !($client->active) ? 'disabled' : '' }} {{ in_array($client->id, $clients_selected) ? 'selected' : '' }}>
|
|
||||||
{{ $client->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user