Commit 09c55736 authored by Vipul Basapati's avatar Vipul Basapati

updated fronted account section to remove address, state, city, ssn and...

updated fronted account section to remove address, state, city, ssn and zipcode as we are not using it anywhere
parent cdaa0264
......@@ -30,11 +30,7 @@ class UpdateProfileRequest extends Request
return [
'first_name' => 'required|max:255',
'last_name' => 'required|max:255',
'email' => ['sometimes', 'required', 'email', 'max:255', Rule::unique('users')],
'state_id' => 'required',
'city_id' => 'required',
'zip_code' => 'required',
'ssn' => 'required',
'email' => ['sometimes', 'required', 'email', 'max:255', Rule::unique('users')]
];
}
}
......@@ -242,12 +242,6 @@ class UserRepository extends BaseRepository
$user = $this->find($id);
$user->first_name = $input['first_name'];
$user->last_name = $input['last_name'];
$user->address = $input['address'];
$user->state_id = $input['state_id'];
$user->country_id = config('access.constants.default_country');
$user->city_id = $input['city_id'];
$user->zip_code = $input['zip_code'];
$user->ssn = $input['ssn'];
$user->updated_by = access()->user()->id;
if ($user->canChangeEmail()) {
......
......@@ -89,58 +89,6 @@
$("#edit").removeClass("active");
}
//Getting States of default contry
ajaxCall("{{route('frontend.get.states')}}");
//Getting Cities of select State
$("#state").on("change", function() {
var stateId = $(this).val();
var url = "{{route('frontend.get.cities')}}";
ajaxCall(url, stateId);
});
function ajaxCall(url, data = null)
{
$.ajax({
url: url,
type: "POST",
data: {stateId: data},
success: function(result) {
if(result != null)
{
if(result.status == "city")
{
var userCity = "{{ $logged_in_user->city_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userCity)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#city").html('');
$("#city").append(options);
}
else
{
var userState = "{{ $logged_in_user->state_id }}";
var options;
$.each(result.data, function(key, value) {
if(key == userState)
options += "<option value='" + key + "' selected>" + value + "</option>";
else
options += "<option value='" + key + "'>" + value + "</option>";
});
$("#state").append(options);
$("#state").trigger('change');
}
}
}
});
}
$(".tabs").click(function() {
var tab = $(this).attr("aria-controls");
$.session.set("tab", tab);
......
......@@ -13,7 +13,7 @@
{{ Form::input('text', 'last_name', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.frontend.register-user.firstName')]) }}
</div>
</div>
@if ($logged_in_user->canChangeEmail())
<div class="form-group">
{{ Form::label('email', trans('validation.attributes.frontend.register-user.email'), ['class' => 'col-md-4 control-label']) }}
......@@ -26,45 +26,6 @@
</div>
</div>
@endif
<div class="form-group">
{{ Form::label('address', trans('validation.attributes.frontend.register-user.address'), ['class' => 'col-md-4 control-label']) }}
<div class="col-md-6">
{{ Form::input('textarea', 'address', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.frontend.register-user.address')]) }}
</div>
</div>
{{-- state --}}
<div class="form-group">
{{ Form::label('state_id', trans('validation.attributes.frontend.register-user.state'), ['class' => 'col-md-4 control-label']) }}
<div class="col-md-6">
{{ Form::select('state_id', [] , null, ['class' => 'form-control select2', 'placeholder' => trans('validation.attributes.frontend.register-user.state'), 'id' => 'state', 'style' => 'width : 539px !important;']) }}
</div><!--col-md-6-->
</div><!--form-group-->
{{-- city --}}
<div class="form-group">
{{ Form::label('city_id', trans('validation.attributes.frontend.register-user.city'), ['class' => 'col-md-4 control-label']) }}
<div class="col-md-6">
{{ Form::select('city_id', [], null, ['class' => 'form-control select2', 'placeholder' => trans('validation.attributes.frontend.register-user.city'), 'id' => 'city', 'style' => 'width : 539px !important;']) }}
</div><!--col-md-6-->
</div><!--form-group-->
{{-- zipcode --}}
<div class="form-group">
{{ Form::label('zip_code', trans('validation.attributes.frontend.register-user.zipcode'), ['class' => 'col-md-4 control-label']) }}
<div class="col-md-6">
{{ Form::input('name', 'zip_code', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.frontend.register-user.zipcode')]) }}
</div><!--col-md-6-->
</div><!--form-group-->
{{-- SSN --}}
<div class="form-group">
{{ Form::label('ssn', trans('validation.attributes.frontend.register-user.ssn'), ['class' => 'col-md-4 control-label']) }}
<div class="col-md-6">
{{ Form::input('name', 'ssn', null, ['class' => 'form-control', 'placeholder' => trans('validation.attributes.frontend.register-user.ssn')]) }}
</div><!--col-md-6-->
</div><!--form-group-->
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
......
......@@ -12,26 +12,6 @@
<th>{{ trans('labels.frontend.user.profile.email') }}</th>
<td>{{ !empty($logged_in_user->email) ? $logged_in_user->email : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.address') }}</th>
<td>{{ !empty($logged_in_user->address) ? $logged_in_user->address : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.state') }}</th>
<td>{{ !empty($logged_in_user->state->state) ? $logged_in_user->state->state : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.city') }}</th>
<td>{{ !empty($logged_in_user->city->city) ? $logged_in_user->city->city : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.zipcode') }}</th>
<td>{{ !empty($logged_in_user->zip_code) ? $logged_in_user->zip_code : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.ssn') }}</th>
<td>{{ !empty($logged_in_user->ssn) ? $logged_in_user->ssn : '' }}</td>
</tr>
<tr>
<th>{{ trans('labels.frontend.user.profile.created_at') }}</th>
<td>{{ $logged_in_user->created_at }} ({{ $logged_in_user->created_at->diffForHumans() }})</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment