leads, sales lists, m_data, orders

This commit is contained in:
Kevin Adametz 2020-01-03 17:44:26 +01:00
parent 1a43060996
commit 7ef7a507c7
26 changed files with 860 additions and 178 deletions

78
.idea/workspace.xml generated
View file

@ -2,45 +2,31 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment=""> <list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/CountryController.php" afterDir="false" /> <change afterPath="$PROJECT_DIR$/app/Http/Controllers/SalesController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/UserLevelController.php" afterDir="false" /> <change afterPath="$PROJECT_DIR$/resources/views/admin/lead/m_data_form_edit.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/country/edit.blade.php" afterDir="false" /> <change afterPath="$PROJECT_DIR$/resources/views/admin/sales/customers.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/country/form.blade.php" afterDir="false" /> <change afterPath="$PROJECT_DIR$/resources/views/admin/sales/users.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/lead/index.blade.php" afterDir="false" /> <change afterPath="$PROJECT_DIR$/resources/views/sys/admin/shopping-orders.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/lead/m_data_form.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/level/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.phpstorm.meta.php" beforeDir="false" afterPath="$PROJECT_DIR$/.phpstorm.meta.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/CountryController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/CountryController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper_models.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper_models.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/ProductController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/ProductController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/Sys/AdminToolsController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Sys/AdminToolsController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Category.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Category.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Country.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Country.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/IqImage.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/IqImage.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/IqSite.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/IqSite.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Product.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Product.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ProductImage.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ProductImage.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/UserAccount.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/UserAccount.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShoppingUser.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingUser.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Repositories/ProductRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/ProductRepository.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Repositories/UserRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/UserRepository.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Repositories/UserRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/UserRepository.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/HTMLHelper.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/HTMLHelper.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Services/HTMLHelper.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/HTMLHelper.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/User.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2018_09_29_145909_create_countries_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_09_29_145909_create_countries_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_02_29_170559_create_user_accounts_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_29_170559_create_user_accounts_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/database/migrations/2019_02_23_161530_create_shopping_users_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_23_161530_create_shopping_users_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/lang/de.json" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/lead/edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/lead/edit.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/lead_edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/lead/edit.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/lead/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/lead/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/leads.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/country/index.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/lead/m_data_form.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/lead/m_data_form.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/product/form.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/product/form.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/user/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/user/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/product/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/product/index.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/user_edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/user/edit.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/users.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/user/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/user/user_form.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/user/user_form.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/sys/admin/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/sys/admin/domain-ssl.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/user/user_new_form.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/user/user_new_form.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -215,20 +201,13 @@
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" /> <property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views/admin/level" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views/admin/lead" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="reference.webide.settings.project.settings.php.composer" /> <property name="settings.editor.selected.configurable" value="reference.webide.settings.project.settings.php.composer" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/admin/level" />
<recent name="$PROJECT_DIR$/app/Http/Controllers" />
<recent name="$PROJECT_DIR$/resources/views/admin/lead" />
<recent name="$PROJECT_DIR$/resources/views/admin/country" />
<recent name="$PROJECT_DIR$/app/Models" />
</key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/admin/user" /> <recent name="$PROJECT_DIR$/resources/views/admin/user" />
<recent name="$PROJECT_DIR$/resources/views/admin/lead" /> <recent name="$PROJECT_DIR$/resources/views/admin/lead" />
@ -236,6 +215,13 @@
<recent name="$PROJECT_DIR$/resources/views/web/user" /> <recent name="$PROJECT_DIR$/resources/views/web/user" />
<recent name="$PROJECT_DIR$/app/Services/Facade" /> <recent name="$PROJECT_DIR$/app/Services/Facade" />
</key> </key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/admin/lead" />
<recent name="$PROJECT_DIR$/resources/views/admin/sales" />
<recent name="$PROJECT_DIR$/resources/views/sys/admin" />
<recent name="$PROJECT_DIR$/app/Http/Controllers" />
<recent name="$PROJECT_DIR$/resources/views/admin/level" />
</key>
</component> </component>
<component name="ServiceViewManager"> <component name="ServiceViewManager">
<option name="viewStates"> <option name="viewStates">
@ -347,6 +333,8 @@
<workItem from="1574870171463" duration="442000" /> <workItem from="1574870171463" duration="442000" />
<workItem from="1575135233364" duration="233000" /> <workItem from="1575135233364" duration="233000" />
<workItem from="1577966622446" duration="15215000" /> <workItem from="1577966622446" duration="15215000" />
<workItem from="1578042899454" duration="15408000" />
<workItem from="1578069761418" duration="55000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -376,18 +364,18 @@
</option> </option>
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1577977233216"> <state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1578063343693">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577977233216" /> <state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1578063343693" />
<state x="939" y="488" width="683" height="486" key="find.popup" timestamp="1577981782327"> <state x="926" y="497" width="683" height="486" key="find.popup" timestamp="1578069059502">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="939" y="488" width="683" height="486" key="find.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577981782327" /> <state x="926" y="497" width="683" height="486" key="find.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1578069059502" />
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup" timestamp="1577970102194"> <state x="945" y="377" width="670" height="676" key="search.everywhere.popup" timestamp="1578068796425">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577970102194" /> <state x="945" y="377" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1578068796425" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View file

@ -10,7 +10,6 @@ use Input;
class CountryController extends Controller class CountryController extends Controller
{ {
protected $userRepo;
public function __construct() public function __construct()
{ {

View file

@ -13,41 +13,9 @@ class DataTableController extends Controller
return view('datatable'); return view('datatable');
} }
public function getLeads()
{
$query = User::where('deleted_at', '=', null);
return \DataTables::eloquent($query)
->addColumn('first_name', function (User $user) {
return $user->account ? $user->account->first_name : '';
})
->addColumn('last_name', function (User $user) {
return $user->account ? $user->account->last_name : '';
})
->addColumn('action', function (User $user) {
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
->addColumn('confirmed', function (User $user) {
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('active', function (User $user) {
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('agreement', function (User $user) {
return $user->agreement ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1')
->orderColumn('agreement', 'agreement $1')
->rawColumns(['action', 'confirmed', 'active', 'agreement'])
->make(true);
}
public function getUsers() public function getUsers()
{ {
//confirmation_code_remider is delete 2 $query = User::with('account')->where('users.deleted_at', '=', null);
$query = User::where('deleted_at', '=', null);
return \DataTables::eloquent($query) return \DataTables::eloquent($query)
->addColumn('first_name', function (User $user) { ->addColumn('first_name', function (User $user) {
@ -56,7 +24,7 @@ class DataTableController extends Controller
->addColumn('last_name', function (User $user) { ->addColumn('last_name', function (User $user) {
return $user->account ? $user->account->last_name : ''; return $user->account ? $user->account->last_name : '';
}) })
->addColumn('action_edit', function (User $user) { ->addColumn('id', function (User $user) {
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>'; return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
}) })
->addColumn('admin', function (User $user) { ->addColumn('admin', function (User $user) {
@ -71,28 +39,31 @@ class DataTableController extends Controller
->addColumn('shop', function (User $user) { ->addColumn('shop', function (User $user) {
if($user->shop){ if($user->shop){
if($user->shop->active){ if($user->shop->active){
return '<span class="badge badge-pill badge-success"><i class="far fa-check"></i> active</span>'.$user->shop->getActiveDateFormatSmall(); return '<span class="badge badge-pill badge-success"><i class="far fa-check"></i> active</span>';
}else{
return'<span class="badge badge-pill badge-success"><i class="far fa-check"></i> deactive</span>'.$user->shop->getActiveDateFormatSmall();
} }
return'<span class="badge badge-pill badge-success"><i class="far fa-check"></i> deactive</span>';
} }
return '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>'; return '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
}) })
->addColumn('since', function (User $user) {
if($user->shop){
if($user->shop->active){
return $user->shop->getActiveDateFormatSmall();
}
return $user->shop->getActiveDateFormatSmall();
}
return "-";
})
->addColumn('action_delete', function (User $user) { ->addColumn('action_delete', function (User $user) {
return '<a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a> return '<a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>
<a href="' . route('admin_user_login_as', [$user->id]) . '" class="btn icon-btn btn-sm btn-warning" onclick="return confirm(\''.__('Login as User?').'\');"><span class="far fa-sign-in-alt"></span></a>'; <a href="' . route('admin_user_login_as', [$user->id]) . '" class="btn icon-btn btn-sm btn-warning" onclick="return confirm(\''.__('Login as User?').'\');"><span class="far fa-sign-in-alt"></span></a>';
}) })
->orderColumn('id', 'id $1')
->orderColumn('confirmed', 'confirmed $1') ->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1') ->orderColumn('active', 'active $1')
->orderColumn('shop', 'shop $1') ->orderColumn('shop', 'shop $1')
->orderColumn('admin', 'active $1') ->orderColumn('admin', 'active $1')
->rawColumns(['action_edit', 'admin', 'confirmed', 'active', 'shop', 'action_delete']) ->rawColumns(['id', 'admin', 'confirmed', 'active', 'shop', 'action_delete'])
->make(true); ->make(true);
} }
} }
/**/

View file

@ -60,6 +60,46 @@ class LeadController extends Controller
$data = [ $data = [
'user' => $user, 'user' => $user,
'can_change_mail' => true, 'can_change_mail' => true,
'm_data_load' => false,
'm_data_error' => false,
];
return view('admin.lead.edit', $data);
}
/**
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function editPost($id)
{
$m_data_load = false;
$m_data_error = false;
$data = Input::all();
if(!isset($data['edit_m_data_key']) && $data['edit_m_data_key'] !== "mivita"){
$m_data_error = "Der Key ist falsch.";
}else{
$m_data_load = true;
}
if($id === "new"){
$user = new User();
$user->account = new UserAccount();
$user->account->same_as_billing = 1;
$user->account->country_id = 1;
$user->account->shipping_country_id = 1;
$user->id = "new";
}else{
$user = User::findOrFail($id);
if(!$user->account){
$user->account = new UserAccount();
}
}
$data = [
'user' => $user,
'm_data_load' => $m_data_load,
'm_data_error' => $m_data_error,
'can_change_mail' => true,
]; ];
return view('admin.lead.edit', $data); return view('admin.lead.edit', $data);
} }
@ -129,12 +169,16 @@ class LeadController extends Controller
} }
} }
$user->m_level = isset($data['m_level']) ? $data['m_level'] : NULL;
$user->save();
$this->userRepo->update($data); $this->userRepo->update($data);
if(isset($data['m_data_edit']) && $data['m_data_edit'] === "TSOK"){
$user = $this->userRepo->getModel();
$user->m_level = isset($data['m_level']) ? $data['m_level'] : NULL;
$user->m_sponsor = isset($data['m_sponsor']) ? $data['m_sponsor'] : NULL;
$user->save();
}
if(isset($data['contact_verify'])){ if(isset($data['contact_verify'])){
$user = $this->userRepo->getModel(); $user = $this->userRepo->getModel();
@ -165,7 +209,75 @@ class LeadController extends Controller
} }
}
/* @if($user->payment_account )
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Account inaktiv')}}</strong></p>
@endif
@if($user->payment_shop)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Shop aktiv')}}</strong> {{__('bis zum')}}: {{ $user->getPaymentShopDateFormat() }}</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Shop inaktiv')}}</strong></p>
@endif*/
public function getLeads()
{
$query = User::with('account')->where('users.deleted_at', '=', null);
return \DataTables::eloquent($query)
->addColumn('first_name', function (User $user) {
return $user->account ? $user->account->first_name : '';
})
->addColumn('last_name', function (User $user) {
return $user->account ? $user->account->last_name : '';
})
->addColumn('id', function (User $user) {
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
->addColumn('confirmed', function (User $user) {
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('active', function (User $user) {
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('agreement', function (User $user) {
return $user->agreement ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('payment_account', function (User $user) {
return $user->payment_account ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('payment_account_date', function (User $user) {
return $user->payment_account ? $user->getPaymentAccountDateFormat(false) : "-";
})
->addColumn('payment_shop', function (User $user) {
return $user->payment_shop ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('payment_shop_date', function (User $user) {
return $user->payment_shop ? $user->getPaymentShopDateFormat(false) : "-";
})
->addColumn('turnover', function (User $user) {
return "-";
})
->addColumn('sales_total', function (User $user) {
return "-";
})
->orderColumn('id', 'id $1')
->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1')
->orderColumn('agreement', 'agreement $1')
->orderColumn('payment_account', 'payment_account $1')
->orderColumn('payment_shop', 'payment_shop $1')
->rawColumns(['id', 'confirmed', 'active', 'agreement', 'payment_account', 'payment_shop'])
->make(true);
} }
} }

View file

@ -0,0 +1,174 @@
<?php
namespace App\Http\Controllers;
use App\Models\Country;
use App\Models\ShoppingOrder;
use Input;
class SalesController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function users()
{
$data = [
//'values' => ShoppingOrder::all(),
];
return view('admin.sales.users', $data);
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function usersDetail()
{
$data = [
// 'values' => Country::all(),
];
return view('admin.sales.index', $data);
}
public function usersDatatable(){
$query = ShoppingOrder::with('shopping_user')->where('shopping_orders.auth_user_id', '!=', NULL);
return \DataTables::eloquent($query)
->addColumn('billing_firstname', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_firstname : '';
})
->addColumn('billing_lastname', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_lastname : '';
})
->addColumn('billing_email', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_email : '';
})
->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->created_at->format("d.m.Y");
})
->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) {
return '<span class="badge badge-pill badge-'.$ShoppingOrder->getFormattedTxactionColor().'">'.$ShoppingOrder->getFormattedTxaction().'</span>';
})
->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->getFormattedTotalShipping();
})
->addColumn('orders', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->orders : '';
})
->addColumn('user_shop_id', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->user_shop ? '<a href="'.$ShoppingOrder->user_shop->getSubdomain().'" target="_blank">'.$ShoppingOrder->user_shop->getSubdomain().'</span>' : '';
})
->addColumn('id', function (ShoppingOrder $ShoppingOrder) {
return '<a href="' . route('admin_sales_users_detail', [$ShoppingOrder->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
/* ->addColumn('confirmed', function (User $user) {
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('active', function (User $user) {
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('agreement', function (User $user) {
return $user->agreement ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1')
->orderColumn('agreement', 'agreement $1')
*/
->orderColumn('id', 'id $1')
->orderColumn('txaction', 'txaction $1')
->orderColumn('user_shop_id', 'user_shop_id $1')
->rawColumns(['id', 'txaction', 'user_shop_id'])
->make(true);
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function customers()
{
$data = [
// 'values' => ShoppingOrder::all(),
];
return view('admin.sales.customers', $data);
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function customersDetail()
{
$data = [
// 'values' => Country::all(),
];
return view('admin.sales.index', $data);
}
public function customersDatatable(){
$query = ShoppingOrder::with('shopping_user')->where('shopping_orders.auth_user_id', NULL);
return \DataTables::eloquent($query)
->addColumn('billing_firstname', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_firstname : '';
})
->addColumn('billing_lastname', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_lastname : '';
})
->addColumn('billing_email', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->billing_email : '';
})
->addColumn('created_at', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->created_at->format("d.m.Y");
})
->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) {
return '<span class="badge badge-pill badge-'.$ShoppingOrder->getFormattedTxactionColor().'">'.$ShoppingOrder->getFormattedTxaction().'</span>';
})
->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->getFormattedTotalShipping();
})
->addColumn('orders', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->shopping_user ? $ShoppingOrder->shopping_user->orders : '';
})
->addColumn('user_shop_id', function (ShoppingOrder $ShoppingOrder) {
return $ShoppingOrder->user_shop ? '<a href="'.$ShoppingOrder->user_shop->getSubdomain().'" target="_blank">'.$ShoppingOrder->user_shop->getSubdomain().'</span>' : '';
})
->addColumn('id', function (ShoppingOrder $ShoppingOrder) {
return '<a href="' . route('admin_sales_users_detail', [$ShoppingOrder->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
/* ->addColumn('confirmed', function (User $user) {
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('active', function (User $user) {
return $user->active ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('agreement', function (User $user) {
return $user->agreement ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1')
->orderColumn('agreement', 'agreement $1')
*/
->orderColumn('id', 'id $1')
->orderColumn('txaction', 'txaction $1')
->orderColumn('user_shop_id', 'user_shop_id $1')
->rawColumns(['id', 'txaction', 'user_shop_id'])
->make(true);
}
}

View file

@ -7,6 +7,7 @@ namespace App\Http\Controllers\Sys;
use App\Http\Controllers\Api\KasController; use App\Http\Controllers\Api\KasController;
use App\Http\Controllers\Api\KasSLLController; use App\Http\Controllers\Api\KasSLLController;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\ShoppingUser;
use App\Models\UserShop; use App\Models\UserShop;
use Auth; use Auth;
use Input; use Input;
@ -31,9 +32,11 @@ class AdminToolsController extends Controller
dd('index'); dd('index');
} }
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function domainSSL() public function domainSSL()
{ {
$user_shops = UserShop::all(); $user_shops = UserShop::all();
$text = ""; $text = "";
@ -46,7 +49,7 @@ class AdminToolsController extends Controller
foreach ($subdomains as $subdomain){ foreach ($subdomains as $subdomain){
$text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']."\n"; $text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']."\n";
if($subdomain['ssl_certificate_sni'] != "Y"){ if($subdomain['ssl_certificate_sni'] !== "Y"){
$pra = array( $pra = array(
'hostname' => $subdomain['subdomain_name'], 'hostname' => $subdomain['subdomain_name'],
); );
@ -54,22 +57,17 @@ class AdminToolsController extends Controller
$value = $kas->action('update_ssl', $pra); $value = $kas->action('update_ssl', $pra);
$text .= $value."\n"; $text .= $value."\n";
} }
} }
$data = [ $data = [
'values' => $user_shops, 'values' => $user_shops,
'text' => $text, 'text' => $text,
]; ];
return view('sys.admin.index', $data); return view('sys.admin.domain-ssl', $data);
} }
/** /**
* @param Request $request * @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
@ -84,4 +82,51 @@ class AdminToolsController extends Controller
} }
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function shoppingOrders()
{
$shopping_users = ShoppingUser::all();
$data = [
'values' => $shopping_users,
'text' => '',
];
return view('sys.admin.shopping-orders', $data);
}
/**
* @return \Illuminate\Http\RedirectResponse
*/
public function shoppingOrdersStore()
{
$data = Input::all();
$orders = [];
$shopping_users = ShoppingUser::all();
foreach ($shopping_users as $shopping_user){
if(!isset($shopping_user->shopping_order)){
$shopping_user->orders = NULL;
}else{
if($shopping_user->shopping_order->txaction === "paid" || $shopping_user->shopping_order->txaction === "appointed") {
$orders[$shopping_user->billing_email] = isset($orders[$shopping_user->billing_email]) ? $orders[$shopping_user->billing_email] + 1 : 1;
$shopping_user->orders = $orders[$shopping_user->billing_email];
}else{
$shopping_user->orders = NULL;
}
}
$shopping_user->save();
}
\Session()->flash('alert-save', true);
return back();
}
} }

View file

@ -70,6 +70,18 @@ class ShoppingOrder extends Model
'weight', 'weight',
]; ];
protected $txaction_text = [
'paid' => "bezahlt",
'appointed' => "offen",
'failed' => "abbruch",
];
protected $txaction_color = [
'paid' => "success",
'appointed' => "warning",
'failed' => "danger",
];
public function shopping_user() public function shopping_user()
{ {
@ -134,5 +146,20 @@ class ShoppingOrder extends Model
} }
public function getFormattedTxaction(){
if($this->txaction && isset($this->txaction_text[$this->txaction])){
return $this->txaction_text[$this->txaction];
}
return "not";
}
public function getFormattedTxactionColor(){
if($this->txaction && isset($this->txaction_color[$this->txaction])){
return $this->txaction_color[$this->txaction];
}
return "danger";
}
} }

View file

@ -112,9 +112,14 @@ class ShoppingUser extends Model
return $this->belongsTo('App\Models\Country','shipping_country_id'); return $this->belongsTo('App\Models\Country','shipping_country_id');
} }
public function Shopping_orders() public function shopping_orders()
{ {
return $this->hasMany('App\Models\ShoppingOrder','shopping_user_id'); return $this->hasMany('App\Models\ShoppingOrder','shopping_user_id');
} }
public function shopping_order()
{
return $this->hasOne('App\Models\ShoppingOrder','shopping_user_id');
}
} }

View file

@ -53,7 +53,7 @@ class UserRepository extends BaseRepository {
$user->account->delete(); $user->account->delete();
} }
$user->email = "delete".time(); $user->email = "delete".time();
$user->password = ""; $user->password = "delete".time();
$user->confirmed = 0; $user->confirmed = 0;
$user->confirmation_code = "delete".time(); $user->confirmation_code = "delete".time();
$user->confirmation_date = null; $user->confirmation_date = null;
@ -61,9 +61,10 @@ class UserRepository extends BaseRepository {
$user->confirmation_code_remider = 2; $user->confirmation_code_remider = 2;
$user->agreement = null; $user->agreement = null;
$user->active = 0; $user->active = 0;
$user->token = ''; $user->remember_token = '';
$user->active_date = null; $user->active_date = null;
$user->admin = 0; $user->admin = 0;
$user->deleted_at = now();
$user->save(); $user->save();
return true; return true;

View file

@ -7,6 +7,7 @@ use App\Models\Country;
use App\Models\Product; use App\Models\Product;
use App\Models\ShippingCountry; use App\Models\ShippingCountry;
use App\Models\UserLevel; use App\Models\UserLevel;
use App\User;
class HTMLHelper class HTMLHelper
{ {
@ -254,8 +255,6 @@ class HTMLHelper
return $ret; return $ret;
} }
public static function getSalutation($id){ public static function getSalutation($id){
$values = array('mr' => __('MR'), 'ms' => __('MS')); $values = array('mr' => __('MR'), 'ms' => __('MS'));
$ret = ""; $ret = "";
@ -283,6 +282,27 @@ class HTMLHelper
return $ret; return $ret;
} }
public static function getSponsorOptions($id, $all=false){
$values = User::all();
$ret = "";
if($all){
$ret .= '<option value="">'.__('please select').'</option>\n';
}
foreach ($values as $value){
$attr = ($value->id == $id) ? 'selected="selected"' : '';
$to="";
if($value->account){
$to = $value->account->first_name." ".$value->account->last_name." | ";
}
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.$value->email.'</option>\n';
}
return $ret;
}
/*public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){ /*public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){
$values = IndustrySector::where('parent_id', null)->get(); $values = IndustrySector::where('parent_id', null)->get();

View file

@ -115,20 +115,37 @@ class User extends Authenticatable
return $this->belongsTo('App\Models\UserAccount', 'account_id'); return $this->belongsTo('App\Models\UserAccount', 'account_id');
} }
public function user_level()
{
return $this->belongsTo('App\Models\UserLevel', 'm_level');
}
public function user_sponsor(){
return $this->belongsTo('App\User', 'm_sponsor');
}
public function shop() public function shop()
{ {
return $this->hasOne('App\Models\UserShop', 'user_id', 'id'); return $this->hasOne('App\Models\UserShop', 'user_id', 'id');
} }
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function user_update_email() public function user_update_email()
{ {
return $this->hasMany('App\Models\UserUpdateEmail', 'user_id', 'id'); return $this->hasMany('App\Models\UserUpdateEmail', 'user_id', 'id');
} }
public function getMUserSponsor(){
if($this->user_sponsor && $this->user_sponsor->account){
return $this->user_sponsor->account->first_name." ".$this->user_sponsor->account->last_name." | ".$this->user_sponsor->email;
}
}
/** /**
* @return bool * @return bool
*/ */
@ -210,13 +227,20 @@ class User extends Authenticatable
return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB()); return Carbon::parse($this->attributes['agreement'])->format(\Util::formatDateTimeDB());
} }
public function getPaymentAccountDateFormat(){ public function getPaymentAccountDateFormat($time = true){
if(!$this->attributes['payment_account']){ return ""; } if(!$this->attributes['payment_account']){ return ""; }
if(!$time){
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateDB());
}
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB()); return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB());
} }
public function getPaymentShopDateFormat(){ public function getPaymentShopDateFormat($time = true){
if(!$this->attributes['payment_shop']){ return ""; } if(!$this->attributes['payment_shop']){ return ""; }
if(!$time){
return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateDB());
}
return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB()); return Carbon::parse($this->attributes['payment_shop'])->format(\Util::formatDateTimeDB());
} }

View file

@ -20,6 +20,8 @@ class CreateUsersTable extends Migration
$table->unsignedInteger('account_id')->nullable(); $table->unsignedInteger('account_id')->nullable();
$table->unsignedInteger('m_level')->nullable(); $table->unsignedInteger('m_level')->nullable();
$table->unsignedInteger('m_sponsor')->nullable();
$table->boolean('confirmed')->default(false); $table->boolean('confirmed')->default(false);
$table->string('confirmation_code', 30)->index()->nullable(); $table->string('confirmation_code', 30)->index()->nullable();
@ -48,6 +50,10 @@ class CreateUsersTable extends Migration
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->foreign('m_sponsor')
->references('id')
->on('users');
}); });
} }

View file

@ -61,6 +61,8 @@ class CreateProductsTable extends Migration
$table->softDeletes(); $table->softDeletes();
}); });
} }

View file

@ -30,6 +30,7 @@ class CreateShoppingUsersTable extends Migration
$table->string('billing_phone')->nullable(); $table->string('billing_phone')->nullable();
$table->string('billing_email')->nullable(); $table->string('billing_email')->nullable();
$table->unsignedSmallInteger('orders')->nullable()->default(1);
$table->boolean('accepted_data_checkbox')->default(false); $table->boolean('accepted_data_checkbox')->default(false);

View file

@ -31,7 +31,12 @@
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('back') }}</a> <a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('back') }}</a>
</div> </div>
@include('admin.lead.m_data_form') @if($m_data_load)
@include('admin.lead.m_data_form_edit')
@else
@include('admin.lead.m_data_form')
@endif
@if(!$user->id || $user->id === 'new') @if(!$user->id || $user->id === 'new')
@include('user.user_new_form') @include('user.user_new_form')
@ -48,4 +53,29 @@
{!! Form::close() !!} {!! Form::close() !!}
<!-- Modal template -->
<div class="modal fade" id="modals-edit-m-data">
<div class="modal-dialog">
<form class="modal-content" action="{{route('admin_lead_edit', [$user->id])}}" method="post">
@csrf
<div class="modal-header">
<h5 class="modal-title"> {{__('Attribute')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Key')}}</label>
<input type="text" class="form-control" name="edit_m_data_key" placeholder="{{__('Key')}}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
@endsection @endsection

View file

@ -20,9 +20,15 @@
<th>{{__('E-Mail')}}</th> <th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th> <th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th> <th>{{__('Nachname')}}</th>
<th>{{__('Mitglied')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Onlineshop')}}</th>
<th>{{__('bis')}}</th>
<th>{{__('Umsatz')}}</th>
<th>{{__('Sales')}}</th>
<th>{{__('verifiziert')}}</th> <th>{{__('verifiziert')}}</th>
<th>{{__('freigegeben')}}</th> <th>{{__('freigegeben')}}</th>
<th>{{__('Einv.-Erkl.')}}</th> <th>{{__('Einv.')}}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -42,15 +48,22 @@
$('.datatables-leads').dataTable({ $('.datatables-leads').dataTable({
"processing": true, "processing": true,
"serverSide": true, "serverSide": true,
"ajax": '{!! route('datatables-leads') !!}', "ajax": '{!! route('admin_leads_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [ "columns": [
{data: 'action', orderable: false, searchable: false}, {data: 'id', searchable: false},
{ data: 'email', name: 'email' }, { data: 'email', name: 'email' },
{ data: 'first_name', name: 'first_name' }, { data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'last_name' }, { data: 'last_name', name: 'account.last_name' },
{ data: 'payment_account', name: 'payment_account' },
{ data: 'payment_account_date', name: 'payment_account_date' },
{ data: 'payment_shop', name: 'payment_shop' },
{ data: 'payment_shop_date', name: 'payment_shop_date' },
{ data: 'turnover', name: 'turnover' },
{ data: 'sales_total', name: 'sales_total' },
{ data: 'confirmed', name: 'confirmed' }, { data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' }, { data: 'active', name: 'active' },
{ data: 'agreement', name: 'agreement' } { data: 'agreement', name: 'agreement' },
], ],
"bLengthChange": false, "bLengthChange": false,
"iDisplayLength": 50, "iDisplayLength": 50,

View file

@ -1,40 +1,52 @@
@if($m_data_error)
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
<li>{{ $m_data_error }}</li>
</ul>
</div>
</div>
</div>
@endif
<div class="card mb-4"> <div class="card mb-4">
<h5 class="card-header"> <h5 class="card-header">
{{ __('mivita interne Daten') }} {{ __('mivita interne Daten') }}
<div class="float-right">
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-edit-m-data">
<span class="far fa-edit"></span>
</button>
</div>
</h5> </h5>
<div class="card-body"> <div class="card-body mb-4 pb-1">
<div class="form-row"> <div class="table-responsive">
<div class="form-group col-md-6"> <table class="table card-table m-0">
<label for="m_account" class="form-label">{{ __(' Account ID') }}*</label> <tbody>
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__(' Account ID'), 'class'=>'form-control', 'id'=>'m_account', 'required'=>true)) }} <tr>
</div> <th>{{ __('Name') }}</th>
<div class="form-group col-md-6"> <th>{{ __('Account ID') }}</th>
<label class="form-label">{{ __('Karriere-Level') }}*</label> <th>{{ __('Karriere-Level') }}</th>
<select class="selectpicker" data-style="btn-light" name="m_level" id="m_level"> <th>{{ __('Sponsor') }}</th>
{!! HTMLHelper::getUserLevelOptions($user->m_level) !!} </tr>
</select> <tr>
</div> <td>{{ \App\Services\HTMLHelper::getSalutationLang($user->account->m_salutation) }} {{ $user->account->m_first_name }} {{ $user->account->m_last_name }}</td>
</div> <td>{{ $user->account->m_account }}</td>
<div class="form-row"> <td>@if($user->user_level){{ $user->user_level->name }}@endif</td>
<div class="form-group col-md-2"> <td>@if($user->m_sponsor){{ $user->getMUserSponsor() }}@endif</td>
<label class="form-label">{{ __('Salutation') }}*</label> </tr>
<select class="selectpicker" data-style="btn-light" name="m_salutation" id="m_salutation" required> </tbody>
{!! HTMLHelper::getSalutation($user->account->m_salutation) !!} </table>
</select> <table class="table card-table m-0">
</div> <tbody>
<tr>
<div class="form-group col-md-5"> <th>{{ __('weitere Daten') }}</th>
<label class="form-label" for="first_name">{{ __('First name') }}*</label> </tr>
{{ Form::text('m_first_name', $user->account->m_first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'m_first_name', 'required'=>true)) }} <tr>
</div> <td>{{$user->account->m_notes}}</td>
<div class="form-group col-md-5"> </tr>
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label> </tbody>
{{ Form::text('m_last_name', $user->account->m_last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'m_last_name', 'required'=>true)) }} </table>
</div>
</div>
<div class="form-group">
<label class="form-label" for="m_notes">{{ __('weitere Daten') }}</label>
{{ Form::textarea('m_notes', $user->account->m_notes , array('placeholder'=>__('weitere Daten'), 'class'=>'form-control', 'id'=>'m_notes', 'rows'=>4)) }}
</div> </div>
</div> </div>
</div> </div>

View file

@ -0,0 +1,50 @@
<div class="card mb-4">
<h5 class="card-header">
{{ __('mivita interne Daten') }}
</h5>
<input type="hidden" name="m_data_edit" value="TSOK">
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-4">
<label for="m_account" class="form-label">{{ __('Account ID') }}</label>
{{ Form::text('m_account', $user->account->m_account, array('placeholder'=>__(' Account ID'), 'class'=>'form-control', 'id'=>'m_account')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Karriere-Level') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_level" id="m_level">
{!! HTMLHelper::getUserLevelOptions($user->m_level) !!}
</select>
</div>
<div class="form-group col-md-4">
<label class="form-label">{{ __('Sponsor') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_sponsor" id="m_sponsor" data-live-search="true">
{!! HTMLHelper::getSponsorOptions($user->m_sponsor, true) !!}
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-2">
<label class="form-label">{{ __('Salutation') }}</label>
<select class="selectpicker" data-style="btn-light" name="m_salutation" id="m_salutation">
{!! HTMLHelper::getSalutation($user->account->m_salutation) !!}
</select>
</div>
<div class="form-group col-md-5">
<label class="form-label" for="first_name">{{ __('First name') }}</label>
{{ Form::text('m_first_name', $user->account->m_first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'m_first_name')) }}
</div>
<div class="form-group col-md-5">
<label class="form-label" for="last_name">{{ __('Last Name') }}</label>
{{ Form::text('m_last_name', $user->account->m_last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'id'=>'m_last_name')) }}
</div>
</div>
<div class="form-group">
<label class="form-label" for="m_notes">{{ __('weitere Daten') }}</label>
{{ Form::textarea('m_notes', $user->account->m_notes , array('placeholder'=>__('weitere Daten'), 'class'=>'form-control', 'id'=>'m_notes', 'rows'=>4)) }}
</div>
</div>
</div>

View file

@ -0,0 +1,58 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Bestellungen Berater') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatable-customers table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Shop')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatable-customers').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('admin_sales_customers_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'billing_email', name: 'shopping_user.billing_email' },
{ data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'txaction', name: 'txaction' },
{ data: 'total_shipping', name: 'shopping_orders.total_shipping' },
{ data: 'orders', name: 'shopping_user.orders' },
{ data: 'user_shop_id', name: 'user_shop_id' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,58 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Bestellungen Berater') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatable-users table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Datum')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('Betrag')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Shop')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatable-users').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('admin_sales_users_datatable') !!}',
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false },
{ data: 'billing_firstname', name: 'shopping_user.billing_firstname' },
{ data: 'billing_lastname', name: 'shopping_user.billing_lastname' },
{ data: 'billing_email', name: 'shopping_user.billing_email' },
{ data: 'created_at', name: 'shopping_orders.created_at' },
{ data: 'txaction', name: 'txaction' },
{ data: 'total_shipping', name: 'shopping_orders.total_shipping' },
{ data: 'orders', name: 'shopping_user.orders' },
{ data: 'user_shop_id', name: 'user_shop_id' },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -14,7 +14,7 @@
<thead> <thead>
<tr> <tr>
<th>{{__('edit')}}</th> <th>#</th>
<th>{{__('First name')}}</th> <th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th> <th>{{__('Last name')}}</th>
<th>{{__('E-Mail')}}</th> <th>{{__('E-Mail')}}</th>
@ -22,6 +22,7 @@
<th>{{__('verified')}}</th> <th>{{__('verified')}}</th>
<th>{{__('active')}}</th> <th>{{__('active')}}</th>
<th>{{__('shop')}}</th> <th>{{__('shop')}}</th>
<th>{{__('ab')}}</th>
<th>{{__('delete')}}</th> <th>{{__('delete')}}</th>
</tr> </tr>
@ -104,15 +105,17 @@
"processing": true, "processing": true,
"serverSide": true, "serverSide": true,
"ajax": '{!! route('data_table_users') !!}', "ajax": '{!! route('data_table_users') !!}',
"order": [[0, "asc" ]],
"columns": [ "columns": [
{ data: 'action_edit', orderable: false, searchable: false}, { data: 'id', searchable: false},
{ data: 'first_name', name: 'first_name' }, { data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'last_name' }, { data: 'last_name', name: 'account.last_name' },
{ data: 'email', name: 'email' }, { data: 'email', name: 'email' },
{ data: 'admin', name: 'admin' }, { data: 'admin', name: 'admin' },
{ data: 'confirmed', name: 'confirmed' }, { data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' }, { data: 'active', name: 'active' },
{ data: 'shop', name: 'shop' }, { data: 'shop', name: 'shop' },
{ data: 'since', name: 'since' },
{ data: 'action_delete', orderable: false, searchable: false}, { data: 'action_delete', orderable: false, searchable: false},
], ],
"bLengthChange": false, "bLengthChange": false,

View file

@ -82,10 +82,9 @@
<style> <style>
.container-fluid { .container-fluid {
margin-right: 0;
margin-right: 0;
margin-left: 0; margin-left: 0;
max-width: 1240px; /*max-width: 1240px; */
} }
.note-toolbar { .note-toolbar {
z-index: auto; z-index: auto;

View file

@ -27,18 +27,28 @@
<li class="sidenav-header small font-weight-semibold">ADMIN</li> <li class="sidenav-header small font-weight-semibold">ADMIN</li>
<li class="sidenav-item @if(Request::is('admin/sites/*')) open @endif">
<li class="sidenav-item{{ Request::is('admin/leads') ? ' active' : '' }} {{ Request::is('admin/lead/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Berater') }}</div></a>
</li>
<li class="sidenav-item @if(Request::is('admin/sales/*')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle"> <a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-md-albums"></i> <i class="sidenav-icon ion ion-ios-cart"></i>
<div>{{ __('Seiten') }}</div> <div>{{ __('Bestellungen') }}</div>
</a> </a>
<ul class="sidenav-menu"> <ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('admin/sites/start') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('admin/sales/users') ? ' active' : '' }}">
<a href="{{route('admin_sites', ['start'])}}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-document"></i><div>{{ __('Startseite') }}</div></a> <a href="{{ route('admin_sales_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Berater') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/sales/customers') ? ' active' : '' }}">
<a href="{{ route('admin_sales_customers') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-contacts"></i><div>{{ __('Kunden') }}</div></a>
</li> </li>
</ul> </ul>
</li> </li>
<li class="sidenav-item @if(Request::is('admin/product/*')) open @endif"> <li class="sidenav-item @if(Request::is('admin/product/*')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle"> <a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-md-cube"></i> <i class="sidenav-icon ion ion-md-cube"></i>
@ -57,11 +67,18 @@
</ul> </ul>
</li> </li>
<li class="sidenav-item{{ Request::is('admin/leads') ? ' active' : '' }} {{ Request::is('admin/lead/edit/*') ? ' active' : '' }}"> <li class="sidenav-item @if(Request::is('admin/sites/*')) open @endif">
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Berater') }}</div></a> <a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-md-albums"></i>
<div>{{ __('Inhalte') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('admin/sites/start') ? ' active' : '' }}">
<a href="{{route('admin_sites', ['start'])}}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-document"></i><div>{{ __('Startseite') }}</div></a>
</li>
</ul>
</li> </li>
<li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}"> <li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle"> <a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-ios-browsers"></i> <i class="sidenav-icon ion ion-ios-browsers"></i>
@ -78,9 +95,8 @@
</li> </li>
</ul> </ul>
</li> </li>
@endif @endif
@if(Auth::user()->isSuperAdmin()) @if(Auth::user()->isSuperAdmin())
<li class="sidenav-divider mb-1"></li> <li class="sidenav-divider mb-1"></li>
<li class="sidenav-header small font-weight-semibold">SUPERADMIN</li> <li class="sidenav-header small font-weight-semibold">SUPERADMIN</li>
@ -98,10 +114,6 @@
<li class="sidenav-item{{ Request::is('admin/countries') ? ' active' : '' }} {{ Request::is('admin/country/edit/*') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('admin/countries') ? ' active' : '' }} {{ Request::is('admin/country/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_countries') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Länder') }}</div></a> <a href="{{ route('admin_countries') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Länder') }}</div></a>
</li> </li>
@endif @endif
@if(Auth::user()->isSySAdmin()) @if(Auth::user()->isSySAdmin())
<li class="sidenav-divider mb-1"></li> <li class="sidenav-divider mb-1"></li>
@ -113,8 +125,11 @@
<div>{{ __('Tools') }}</div> <div>{{ __('Tools') }}</div>
</a> </a>
<ul class="sidenav-menu"> <ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('sysadmin/tools/domainssl/*') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('sysadmin/tools/domainssl') ? ' active' : '' }}">
<a href="{{ route('sysadmin_tools_domainssl') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-browsers"></i><div>{{ __('Domain SSL') }}</div></a> <a href="{{ route('sysadmin_tools_domainssl') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-lock"></i><div>{{ __('Domain SSL') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('sysadmin/tools/shopping_orders') ? ' active' : '' }}">
<a href="{{ route('sysadmin_tools_shopping_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-analytics"></i><div>{{ __('Shopping Orders') }}</div></a>
</li> </li>
</ul> </ul>

View file

@ -0,0 +1,50 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold mb-4">
Content Tools: Links
</h4>
<div class="card mb-4">
<div class="card-body">
<!-- Controls -->
{!! Form::open(['url' => url()->current(), 'class' => '']) !!}
<div class="form-group mb-1">
<label class="form-label" for="description">Description</label>
{{ Form::textarea('text', $text, array('class'=>'form-control', 'rows'=>1)) }}
</div>
<button type="submit" class="btn btn-primary"><i class="ion"></i> action</button>
{!! Form::close() !!}
</div>
@if(count($values)>0)
<div class="card-body">
<!-- Controls -->
@foreach($values as $value)
<pre>{{$value->billing_email}} | {{$value->orders}}</pre>
@endforeach
</div>
@endif
</div>
@endsection

View file

@ -255,16 +255,32 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
//Route::get('/admin/products/import', 'ImportProductController@import')->name('admin_product_import'); //Route::get('/admin/products/import', 'ImportProductController@import')->name('admin_product_import');
//leads //leads
Route::get('datatables/leads', 'DataTableController@getLeads')->name('datatables-leads');
Route::get('/admin/leads', 'LeadController@index')->name('admin_leads'); Route::get('/admin/leads', 'LeadController@index')->name('admin_leads');
Route::get('/admin/lead/edit/{id}', 'LeadController@edit')->name('admin_lead_edit'); Route::get('/admin/lead/edit/{id}', 'LeadController@edit')->name('admin_lead_edit');
Route::post('/admin/lead/edit/{id}', 'LeadController@editPost')->name('admin_lead_edit');
Route::get('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminChangeMail')->name('admin_lead_change_mail'); Route::get('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminChangeMail')->name('admin_lead_change_mail');
Route::post('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminUpdateMail')->name('admin_lead_change_mail'); Route::post('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminUpdateMail')->name('admin_lead_change_mail');
Route::post('/admin/lead/store', 'LeadController@store')->name('admin_lead_store'); Route::post('/admin/lead/store', 'LeadController@store')->name('admin_lead_store');
Route::get('/admin/leads/datatable', 'LeadController@getLeads')->name('admin_leads_datatable');
//sales
Route::get('/admin/sales/users', 'SalesController@users')->name('admin_sales_users');
Route::get('/admin/sales/users/detail/{id}', 'SalesController@usersDetail')->name('admin_sales_users_detail');
Route::get('/admin/sales/users/datatable', 'SalesController@usersDatatable')->name('admin_sales_users_datatable');
Route::get('/admin/sales/customers', 'SalesController@customers')->name('admin_sales_customers');
Route::get('/admin/sales/customers/detail/{id}', 'SalesController@customersDetail')->name('admin_sales_customers_detail');
Route::get('/admin/sales/customers/datatable', 'SalesController@customersDatatable')->name('admin_sales_customers_datatable');
}); });
//login pages for superadmin //login pages for superadmin
@ -304,6 +320,9 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
Route::group(['middleware' => ['sysadmin']], function() { Route::group(['middleware' => ['sysadmin']], function() {
Route::get('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSL')->name('sysadmin_tools_domainssl'); Route::get('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSL')->name('sysadmin_tools_domainssl');
Route::post('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSLStore')->name('sysadmin_tools_domainssl'); Route::post('/sysadmin/tools/domainssl', 'SyS\AdminToolsController@domainSSLStore')->name('sysadmin_tools_domainssl');
Route::get('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrders')->name('sysadmin_tools_shopping_orders');
Route::post('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrdersStore')->name('sysadmin_tools_shopping_orders');
}); });