Merge pull request #5326 from devansh-webkul/delete-profile-fix
Delete Profile Fixed #5325
This commit is contained in:
commit
b59f3875b3
|
|
@ -12,7 +12,6 @@
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
|
|
||||||
@section('page-detail-wrapper')
|
@section('page-detail-wrapper')
|
||||||
<div class="account-head mb-0">
|
<div class="account-head mb-0">
|
||||||
<span class="back-icon">
|
<span class="back-icon">
|
||||||
|
|
@ -20,6 +19,7 @@
|
||||||
<i class="icon icon-menu-back"></i>
|
<i class="icon icon-menu-back"></i>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="account-heading">
|
<span class="account-heading">
|
||||||
{{ __('shop::app.customer.account.profile.index.title') }}
|
{{ __('shop::app.customer.account.profile.index.title') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -37,12 +37,11 @@
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{!! view_render_event(
|
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.before', ['customer' => $customer]) !!}
|
||||||
'bagisto.shop.customers.account.profile.view.table.before', ['customer' => $customer])
|
|
||||||
!!}
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ __('shop::app.customer.account.profile.fname') }}</td>
|
<td>{{ __('shop::app.customer.account.profile.fname') }}</td>
|
||||||
|
|
||||||
<td>{{ $customer->first_name }}</td>
|
<td>{{ $customer->first_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
@ -50,6 +49,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ __('shop::app.customer.account.profile.lname') }}</td>
|
<td>{{ __('shop::app.customer.account.profile.lname') }}</td>
|
||||||
|
|
||||||
<td>{{ $customer->last_name }}</td>
|
<td>{{ $customer->last_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ __('shop::app.customer.account.profile.gender') }}</td>
|
<td>{{ __('shop::app.customer.account.profile.gender') }}</td>
|
||||||
|
|
||||||
<td>{{ $customer->gender ?? '-' }}</td>
|
<td>{{ $customer->gender ?? '-' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
@ -64,6 +65,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ __('shop::app.customer.account.profile.dob') }}</td>
|
<td>{{ __('shop::app.customer.account.profile.dob') }}</td>
|
||||||
|
|
||||||
<td>{{ $customer->date_of_birth ?? '-' }}</td>
|
<td>{{ $customer->date_of_birth ?? '-' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
@ -71,46 +73,64 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ __('shop::app.customer.account.profile.email') }}</td>
|
<td>{{ __('shop::app.customer.account.profile.email') }}</td>
|
||||||
|
|
||||||
<td>{{ $customer->email }}</td>
|
<td>{{ $customer->email }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{!! view_render_event(
|
{!! view_render_event('bagisto.shop.customers.account.profile.view.table.after', ['customer' => $customer]) !!}
|
||||||
'bagisto.shop.customers.account.profile.view.table.after', ['customer' => $customer])
|
|
||||||
!!}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
class="theme-btn mb20" @click="showModal('deleteProfile')" >
|
class="theme-btn mb20" @click="window.showDeleteProfileModal();">
|
||||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<form method="POST" action="{{ route('customer.profile.destroy') }}" @submit.prevent="onSubmit">
|
<div id="deleteProfileForm" class="d-none">
|
||||||
@csrf
|
<form method="POST" action="{{ route('customer.profile.destroy') }}" @submit.prevent="onSubmit">
|
||||||
|
@csrf
|
||||||
|
|
||||||
<modal id="deleteProfile" :is-open="modalIds.deleteProfile">
|
<modal id="deleteProfile" :is-open="modalIds.deleteProfile">
|
||||||
<h3 slot="header">{{ __('shop::app.customer.account.address.index.enter-password') }}
|
<h3 slot="header">
|
||||||
</h3>
|
{{ __('shop::app.customer.account.address.index.enter-password') }}
|
||||||
<i class="rango-close"></i>
|
</h3>
|
||||||
|
|
||||||
<div slot="body">
|
<i class="rango-close"></i>
|
||||||
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
|
||||||
<label for="password" class="required">{{ __('admin::app.users.users.password') }}</label>
|
<div slot="body">
|
||||||
<input type="password" v-validate="'required|min:6|max:18'" class="control" id="password" name="password" data-vv-as=""{{ __('admin::app.users.users.password') }}""/>
|
<div class="control-group" :class="[errors.has('password') ? 'has-error' : '']">
|
||||||
<span class="control-error" v-if="errors.has('password')" v-text="errors.first('password')"></span>
|
<label for="password" class="required">{{ __('admin::app.users.users.password') }}</label>
|
||||||
|
|
||||||
|
<input type="password" v-validate="'required|min:6|max:18'" class="control" id="password" name="password" data-vv-as=""{{ __('admin::app.users.users.password') }}""/>
|
||||||
|
|
||||||
|
<span class="control-error" v-if="errors.has('password')" v-text="errors.first('password')"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="page-action">
|
||||||
|
<button type="submit" class="theme-btn mb20">
|
||||||
|
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</modal>
|
||||||
<div class="page-action">
|
</form>
|
||||||
<button type="submit" class="theme-btn mb20">
|
</div>
|
||||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</modal>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
|
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@push('scripts')
|
||||||
|
<script>
|
||||||
|
/**
|
||||||
|
* Show delete profile modal.
|
||||||
|
*/
|
||||||
|
function showDeleteProfileModal() {
|
||||||
|
document.getElementById('deleteProfileForm').classList.remove('d-none');
|
||||||
|
|
||||||
|
window.app.showModal('deleteProfile');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
Loading…
Reference in New Issue