Skip to content

Commit

Permalink
Fix onSave
Browse files Browse the repository at this point in the history
  • Loading branch information
rune.laenen committed Mar 14, 2023
1 parent 57e3678 commit 1af3cc9
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Resources/app/administration/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import nlNL from './snippet/nl-NL.json';

import './component/rl-user-otp';
import './override/sw-login/view/sw-login-login';
import './override/sw-profile/page/sw-profile-index';
import './override/sw-profile/view/sw-profile-index-general';
import './override/sw-users-permissions/page/sw-users-permissions-user-detail';
import './override/sw-customer/component/sw-customer-base-info';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import template from './sw-profile-index.html.twig';

const { Component } = Shopware;

if (Component.getComponentRegistry().has('sw-profile-index')) {
Component.override('sw-profile-index', {
template,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% block sw_profile_index_router_view %}
<template v-if="isUserLoading">
<sw-skeleton />
<sw-skeleton />
</template>

<router-view
v-else
v-bind="{
user,
timezoneOptions,
languages,
newPassword,
newPasswordConfirm,
avatarMediaItem,
isUserLoading,
languageId,
isDisabled,
userRepository,
}"
@new-password-change="onChangeNewPassword"
@new-password-confirm-change="onChangeNewPasswordConfirm"
@media-upload="setMediaItem"
@media-remove="onUnlinkAvatar"
@media-open="openMediaModal"
@rl-2fa-save="onSave"
/>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ const { Component } = Shopware;
if (Component.getComponentRegistry().has('sw-profile-index-general')) {
Component.override('sw-profile-index-general', {
template,

methods: {
onSave() {
this.$emit('rl-2fa-save');
}
}
});
}

0 comments on commit 1af3cc9

Please sign in to comment.