Merge pull request #26 from jitendra-webkul/jitendra

Customer Profile issues fixed
This commit is contained in:
JItendra Singh 2018-08-22 12:58:21 +05:30 committed by GitHub
commit 0197103dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 93 additions and 66 deletions

View File

@ -315,50 +315,4 @@ Route::group(['middleware' => ['web']], function () {
])->name('admin.sliders.store');
});
});
//customer routes starts here
Route::prefix('customer')->group(function () {
// Login Routes
Route::get('login', 'Webkul\Customer\Http\Controllers\SessionController@show')->defaults('_config', [
'view' => 'shop::customers.session.index',
])->name('customer.session.index');
Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [
'redirect' => 'customer.account.profile'
])->name('customer.session.create');
// Registration Routes
Route::get('register', 'Webkul\Customer\Http\Controllers\RegistrationController@show')->defaults('_config', [
'view' => 'shop::customers.signup.index' //hint path
])->name('customer.register.index');
Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [
'redirect' => 'customer.account.profile',
])->name('customer.register.create'); //redirect attribute will get changed immediately to account.index when account's index page will be made
// Auth Routes
Route::group(['middleware' => ['customer']], function () {
//route for logout which will be under the auth guard of the customer by default
Route::get('logout', 'Webkul\Customer\Http\Controllers\SessionController@destroy')->defaults('_config', [
'redirect' => 'customer.session.index'
])->name('customer.session.destroy');
//customer account
Route::prefix('account')->group(function () {
Route::get('profile', 'Webkul\Customer\Http\Controllers\CustomerController@profile')->defaults('_config', [
'view' => 'shop::customers.account.profile.home.index'
])->name('customer.account.profile');
//profile edit
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@editProfile')->defaults('_config', [
'view' => 'shop::customers.account.profile.edit.index'
])->name('customer.profile.edit');
});
});
});
//customer routes end here
});

View File

@ -14,4 +14,49 @@ Route::group(['middleware' => ['web']], function () {
Route::view('/products/{slug}', 'shop::store.product.details.index');
//customer routes starts here
Route::prefix('customer')->group(function () {
// Login Routes
Route::get('login', 'Webkul\Customer\Http\Controllers\SessionController@show')->defaults('_config', [
'view' => 'shop::customers.session.index',
])->name('customer.session.index');
Route::post('login', 'Webkul\Customer\Http\Controllers\SessionController@create')->defaults('_config', [
'redirect' => 'customer.account.profile'
])->name('customer.session.create');
// Registration Routes
Route::get('register', 'Webkul\Customer\Http\Controllers\RegistrationController@show')->defaults('_config', [
'view' => 'shop::customers.signup.index' //hint path
])->name('customer.register.index');
Route::post('register', 'Webkul\Customer\Http\Controllers\RegistrationController@create')->defaults('_config', [
'redirect' => 'customer.account.profile',
])->name('customer.register.create'); //redirect attribute will get changed immediately to account.index when account's index page will be made
// Auth Routes
Route::group(['middleware' => ['customer']], function () {
//route for logout which will be under the auth guard of the customer by default
Route::get('logout', 'Webkul\Customer\Http\Controllers\SessionController@destroy')->defaults('_config', [
'redirect' => 'customer.session.index'
])->name('customer.session.destroy');
//customer account
Route::prefix('account')->group(function () {
Route::get('profile', 'Webkul\Customer\Http\Controllers\CustomerController@profile')->defaults('_config', [
'view' => 'shop::customers.account.profile.index'
])->name('customer.account.profile');
//profile edit
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@editProfile')->defaults('_config', [
'view' => 'shop::customers.account.profile.edit'
])->name('customer.profile.edit');
});
});
});
//customer routes end here
});

View File

@ -7,11 +7,14 @@
body {
margin: 0;
padding: 0;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: 14px;
}
* {
font-family: "Montserrat", sans-serif;
}
.header {
margin-top: 16px;
margin-bottom: 21px;
@ -864,14 +867,6 @@ section.slider-block {
flex-direction: column;
min-height: 345px;
padding: 25px;
.control-group {
input,
select {
font-family: "Montserrat", sans-serif;
width: 100%;
}
}
}
}
//edit form ends

View File

@ -1,24 +1,35 @@
@extends('shop::layouts.master')
@section('content-wrapper')
<div class="account-content">
@include('shop::customers.account.partials.sidemenu')
<div class="edit-form-content">
<div class="edit-text">Edit Profile</div>
<form method="post" action="{{ route('customer.register.create') }}">
<div class="edit-form">
{{ csrf_field() }}
<div class="control-group">
<label for="first_name">First Name</label>
<input type="text" class="control" name="first_name" value="{{ $customer['first_name'] }}" v-validate="'required'"> {{-- <span>@{{ errors.first('first_name') }}</span> --}}
</div>
<div class="control-group">
<label for="last_name">Last Name</label>
<input type="text" class="control" name="last_name" value="{{ $customer['last_name'] }}" v-validate="'required'"> {{-- <span>@{{ errors.first('last_name') }}</span> --}}
</div>
<div class="control-group">
<label for="email">Email</label>
<input type="email" class="control" name="email" value="{{ $customer['email'] }}" v-validate="'required'"> {{-- <span>@{{ errors.first('email') }}</span> --}}
</div>
<div class="control-group">
<label for="email">Gender</label>
<select name="gender" class="control" value="{{ $customer['gender'] }}" v-validate="'required'">
@ -26,25 +37,35 @@
<option value="Female">Female</option>
</select> {{-- <span>@{{ errors.first('gender') }}</span> --}}
</div>
<div class="control-group">
<label for="dob">Date of Birth</label>
<input type="date" class="control" name="dob" value="{{ $customer['date_of_birth'] }}" v-validate="'required'"> {{-- <span>@{{ errors.first('first_name') }}</span> --}}
</div>
<div class="control-group">
<label for="phone">Phone</label>
<input type="text" class="control" name="phone" value="{{ $customer['phone'] }}" v-validate="'required'"> {{-- <span>@{{ errors.first('phone') }}</span> --}}
</div>
<div class="control-group">
<label for="password">Password</label>
<input type="password" class="control" name="password">
</div>
<div class="control-group">
<label for="password">Confirm Password</label>
<input type="password" class="control" name="password">
</div>
<input class="btn btn-primary btn-lg" type="submit" value="Update Profile">
<div class="button-group">
<input class="btn btn-primary btn-lg" type="submit" value="Update Profile">
</div>
</div>
</form>
</div>
</div>
@endsection

View File

@ -1,43 +1,58 @@
@extends('shop::layouts.master')
@section('content-wrapper')
<div class="account-content">
@include('shop::customers.account.partials.sidemenu')
<div class="profile">
<div class="section-head">
<span class="profile-heading">Profile</span>
<span class="profile-edit"><a href="{{ route('customer.profile.edit') }}">Edit</a></span>
<div class="horizontal-rule"></div>
</div>
<div class="profile-content">
<table>
<tbody>
<tr>
<td>First Name</td>
<td>{{ $customer['first_name'] }}</td>
</tr>
<tr>
<td>Last Name</td>
<td>{{ $customer['last_name'] }}</td>
</tr>
<tr>
<td>Gender Name</td>
<td>{{ $customer['gender'] }}</td>
</tr>
<tr>
<td>Date of Birth</td>
<td>{{ $customer['date_of_birth'] }}</td>
</tr>
<tr>
<td>Email Address</td>
<td>{{ $customer['email'] }}</td>
</tr>
<tr>
<td>Mobile</td>
<td>{{ $customer['phone'] }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@endsection

View File

@ -14,11 +14,14 @@
body {
margin: 0;
padding: 0;
font-family: "Montserrat", sans-serif;
font-weight: 500;
font-size: 14px;
}
* {
font-family: "Montserrat", sans-serif;
}
.header {
margin-top: 16px;
margin-bottom: 21px;
@ -975,12 +978,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
padding: 25px;
}
.account-content .edit-form-content .edit-form .control-group input,
.account-content .edit-form-content .edit-form .control-group select {
font-family: "Montserrat", sans-serif;
width: 100%;
}
section.product-detail, section.product-review {
font-size: 16px;
color: #242424;

File diff suppressed because one or more lines are too long