fixing modified changes

This commit is contained in:
prashant-webkul 2018-07-24 20:12:36 +05:30
parent 951266a100
commit fb1f042597
13 changed files with 197 additions and 135 deletions

View File

@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
class AppServiceProvider extends ServiceProvider
{
@ -13,7 +14,7 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
//
Schema::defaultStringLength(191);
}
/**

View File

@ -1,102 +1,60 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
'passwords' => 'admins',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
'provider' => 'admins',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
'provider' => 'admins',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'customer' =>[
'driver' => 'session',
'provider' => 'customers'
],
'admin' => [
'driver' => 'session',
'provider' => 'admins'
],
'admin-api' => [
'driver' => 'token',
'provider' => 'admins',
]
],
'providers' => [
'users' => [
'customers' => [
'driver' => 'eloquent',
'model' => App\User::class,
'model' => Webkul\Customer\Models\Customer::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
'admins' => [
'driver' => 'eloquent',
'model' => Webkul\User\Models\Admin::class,
]
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_resets',
'admins' => [
'provider' => 'admins',
'table' => 'admin_password_resets',
'expire' => 60,
],
'customers' => [
'provider' => 'customers',
'table' => 'customers_password_resets',
'expire' => 60,
],
],
];

View File

@ -51,7 +51,7 @@ return [
'table' => 'admin_password_resets',
'expire' => 60,
],
'admins' => [
'customers' => [
'provider' => 'customers',
'table' => 'customers_password_resets',
'expire' => 60,

View File

@ -158,6 +158,7 @@ class DataGridController extends Controller
'neqn' => "!=",
'ceq' => "<=>",
'like' => "like",
'nlike' => "not like",
],
'mass_operations' =>[
[

View File

@ -74,13 +74,13 @@ class AdminServiceProvider extends ServiceProvider
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/../Config/auth.php',
'auth'
);
}
// public function register()
// {
// $this->mergeConfigFrom(
// __DIR__ . '/../Config/auth.php',
// 'auth'
// );
// }
/**
* Merge the given configuration with the existing configuration.

View File

@ -728,15 +728,16 @@ h2 {
.filter-value {
display: inline-flex;
background: #e7e7e7;
height: 36px;
padding-left: 5px;
padding-right: 10px;
padding-top: 8px;
padding-bottom: 5px;
color: #000311;
vertical-align: middle;
.f-value {
margin: auto;
}
.cross-icon {
margin: 5px;
height: 18px !important;
width: 18px !important;
}
@ -745,16 +746,21 @@ h2 {
}
}
.table {
.xyz {
display: flex;
flex-direction: row;
// visibility: hidden;
padding-left: 10px;
justify-content: flex-start;
align-items: center;
thead {
.xyz {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.selected-items {
margin-right: 15px;
.massaction-remove {
margin-top: 5px;
margin-right: 10px;
}
.selected-items {
margin-right: 15px;
}
}
}
}

View File

@ -28,24 +28,25 @@
params = (new URL(document.location)).search;
if(params.length>0){
if(allFilters1.length == 0){
if(allFilters1.length == 0) {
//call reverse url function
arrayFromUrl(params.slice(1,params.length));
}
}
$('.search-btn').click(function(){
$('.search-btn').click(function() {
search_value = $(".search-field").val();
formURL('search','all',search_value,params); //format for search
alert(search_value);
});
$('.grid_head').on('click', function(){
$('.grid_head').on('click', function() {
var column = $(this).data('column-name');
var currentSort = $(this).data('column-sort');
if(currentSort == "asc"){
console.log(column, currentSort);
// return false;
if(currentSort == "asc") {
$(this).data('column-name','desc');
formURL(column,'sort','desc',params);
}else{
@ -166,51 +167,65 @@
});
$('.mass-action').css('display','');
$('.table-grid-header').css('display','none');
$('.selected-items').html(id.toString());
// $('.selected-items').html(id.toString());
$('#indexes').val(id);
console.log(id);
}
else if($("input[id=mastercheckbox]").prop('checked') == false){
else if($("input[id=mastercheckbox]").prop('checked') == false) {
$('.indexers').each(function(){ this.checked = false; });
id = [];
$('.mass-action').css('display','none');
$('.table-grid-header').css('display','');
$('#indexes').val('');
console.log(id);
}
});
$('.massaction-remove').on('click', function(){
id = [];
$('.mass-action').css('display','none');
if($('#mastercheckbox').prop('checked')) {
$('#mastercheckbox').prop('checked',false);
}
$("input[class=indexers]").each(function(){
if($(this).prop('checked')){
$(this).prop('checked',false);
}
});
$('.table-grid-header').css('display','');
});
$("input[class=indexers]").change(function() {
if(this.checked){
y = parseInt($(this).attr('id'));
id.push(y);
console.log(id);
}
else {
y = parseInt($(this).attr('id'));
var index = id.indexOf(y);
id.splice(index,1);
}
if(id.length>0){
if(id.length>0) {
$('.mass-action').css('display','');
$('.table-grid-header').css('display','none');
$('.selected-items').html(id.toString());
// $('.selected-items').html(id.toString());
$('#indexes').val(id);
}else if(id.length == 0){
}else if(id.length == 0) {
$('.mass-action').css('display','none');
$('.table-grid-header').css('display','');
$('#indexes').val('');
if($('#mastercheckbox').prop('checked')) {
$('#mastercheckbox').prop('checked',false);
}
}
});
//remove the mass action by clicking on the icon
$('.mass-action-remove').on('click', function(){
$("input[type=checkbox]").prop('checked',false);
id = [];
$('#indexes').val('');
$('.mass-action').css('display','none');
$('.table-grid-header').css('display','');
});
// $('.mass-action-remove').on('click', function() {
// $("input[type=checkbox]").prop('checked',false);
// id = [];
// $('#indexes').val('');
// $('.mass-action').css('display','none');
// $('.table-grid-header').css('display','');
// });
// $('.b-res').css('visibility','hidden');
// $('.t-res').css('visibility','hidden');
@ -264,7 +279,7 @@
// console.log('Array from URL = ',allFilters1);
makeTagsTestPrior();
}
var label;
function makeTagsTestPrior() {
var filterRepeat = 0;
//make sure the filter or sort param is not duplicate before pushing it into the all filters array
@ -275,10 +290,16 @@
// console.log(allFilters1[i][j],j);
for(k in allFilters1[i][j])
{
// console.log('column = ',j);
console.log('column = ',j);
if($("th[data-column-name='" + j +"']")) {
label = $("th[data-column-name='" + j +"']").data('column-label');
console.log(label);
}
// console.log('label = ',label);
// console.log('condition = ',k);
// console.log('value = ',allFilters1[i][j][k]);
var filter_card = '<span class="filter-one" id="'+ i +'"><span class="filter-name">'+ j +'</span><span class="filter-value">'+allFilters1[i][j][k] +'<span class="icon cross-icon remove-filter"></span></span></span>';
var filter_card = '<span class="filter-one" id="'+ i +'"><span class="filter-name">'+ label +'</span><span class="filter-value"><span class="f-value">'+allFilters1[i][j][k] +'</span><span class="icon cross-icon remove-filter"></span></span></span>';
$('.filter-row-two').append(filter_card);
}
}
@ -309,7 +330,7 @@
if(filterRepeat == 0) {
allFilters1.push(tmp);
// console.log(allFilters1);
var filter_card = '<span class="filter-one"><span class="filter-name">'+ column +'</span><span class="filter-value">'+ response +'<span class="icon cross-icon"></span></span></span>';
var filter_card = '<span class="filter-one"><span class="filter-name">'+ column +'</span><span class="filter-value"><span class="f-value">'+ response +'</span><span class="icon cross-icon"></span></span></span>';
$('.filter-row-two').append(filter_card);
makeURL(allFilters1);
count_filters++;

View File

@ -4,7 +4,10 @@
<tr class="mass-action" style="display: none;">
<th colspan="{{ count($columns)+1 }}">
<div class="xyz">
<div class="selected-items"></div>
<span class="massaction-remove">
<span class="icon checkbox-dash-icon"></span>
</span>
{{-- <div class="selected-items"></div> --}}
@foreach($massoperations as $massoperation) {{--
<h3>{{ $massoperation['label'] }}</h3> --}} @if($massoperation['type'] == "button")
<form @if(strtoupper($massoperation[ 'method'])=="GET" || strtoupper($massoperation[ 'method'])=="POST" ) method="{{ strtoupper($massoperation['method']) }}"
@ -40,10 +43,10 @@
</th>
@foreach ($columns as $column)
@if($column->sortable == "true")
<th class="" data-column-name={{ $column->name }} data-column-sort="asc"> {!! $column->sorting() !!}<span class="icon sort-down-icon"></span>
<th class="labelled-col grid_head" data-column-name="{{ $column->name }}" data-column-label="{{ $column->label }}" data-column-sort="asc"> {!! $column->sorting() !!} <span class="icon sort-down-icon"></span>
</th>
@else
<th class="">{!! $column->sorting() !!}</th>
<th class="labelled-col grid_head" data-column-name="{{ $column->name }}" data-column-label="{{ $column->label }}">{!! $column->sorting() !!}</th>
@endif
@endforeach
</tr>

View File

@ -14,7 +14,7 @@ mix.js(
],
"js/ui.js"
)
.copy(__dirname + "/src/Resources/assets/images", publicPath + "/images")
// .copy(__dirname + "/src/Resources/assets/images", publicPath + "/images")
.sass(__dirname + "/src/Resources/assets/sass/app.scss", "css/ui.css")
.options({
processCssUrls: false

View File

@ -10,12 +10,19 @@ class AdminsTableSeeder extends Seeder
{
public function run()
{
// $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
// $charactersLength = strlen($characters);
// $randomString = '';
// for ($i = 0; $i < $length; $i++) {
// $randomString .= $characters[rand(0, $charactersLength - 1)];
// }
$i=0;
for ($i=0;$i<10;$i++) {
$role = Role::first();
$admin = new Admin();
$admin->name = random_str(8);
$admin->email = random_str(10).'@example.com';
$admin->name = str_random(8);
$admin->email = str_random(10).'@example.com';
$admin->password = bcrypt('admin123');
$admin->status = 1;
$admin->role_id = $role->id;

View File

@ -55,7 +55,7 @@ class SessionController extends Controller
]);
$remember = request('remember');
if(! auth()->guard('admin')->attempt(request(['email', 'password']), $remember)) {
if (! auth()->guard('admin')->attempt(request(['email', 'password']), $remember)) {
session()->flash('error', 'Please check your credentials and try again.');
return back();
@ -76,4 +76,4 @@ class SessionController extends Controller
return redirect()->route($this->_config['redirect']);
}
}
}

View File

@ -69,3 +69,63 @@
height: 45px;
margin-bottom: 4%;
}
.dashboard-content {
width: 100%;
margin-top: 5.5%;
margin-bottom: 5.5%;
}
.dashboard-content .dashboard-side-menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-line-pack: center;
align-content: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
border: 1px solid #e8e8e8;
border-right: none;
background: #ffffff;
width: 25%;
text-transform: capitalize;
}
.dashboard-content .dashboard-side-menu li {
font-size: 16px;
width: 95%;
height: 50px;
margin-left: 15px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
border: 1px solid #ffe8e8e8;
border-left: none;
border-bottom: none;
text-align: center;
}
.dashboard-content .dashboard-side-menu li:first-child {
border-top: none;
border-left: none;
border-bottom: none;
}
.dashboard-content .dashboard-side-menu li:last-child {
border-bottom: none;
}

View File

@ -1001,21 +1001,22 @@ h2 {
display: -ms-inline-flexbox;
display: inline-flex;
background: #e7e7e7;
height: 36px;
padding-left: 5px;
padding-right: 10px;
padding-top: 8px;
padding-bottom: 5px;
color: #000311;
vertical-align: middle;
}
.grid-container .filter-wrapper .filter-row-two .filter-one .filter-value .f-value {
margin: auto;
}
.grid-container .filter-wrapper .filter-row-two .filter-one .filter-value .cross-icon {
margin: 5px;
height: 18px !important;
width: 18px !important;
}
.grid-container .table .xyz {
.grid-container .table thead .xyz {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
@ -1023,7 +1024,6 @@ h2 {
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
padding-left: 10px;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
@ -1032,7 +1032,12 @@ h2 {
align-items: center;
}
.grid-container .table .xyz .selected-items {
.grid-container .table thead .xyz .massaction-remove {
margin-top: 5px;
margin-right: 10px;
}
.grid-container .table thead .xyz .selected-items {
margin-right: 15px;
}