Revert "🐛 Fixed unexpected leave confirmation after Cmd+S on member profile"

This reverts commit 186c6f3c42.
This commit is contained in:
Daniel Lockyer 2024-07-02 21:43:47 +02:00 committed by Daniel Lockyer
parent 8d33c9d64f
commit 895e3719bd
2 changed files with 6 additions and 8 deletions

View File

@ -29,7 +29,6 @@ export default class MemberController extends Controller {
@tracked showImpersonateMemberModal = false; @tracked showImpersonateMemberModal = false;
@tracked modalLabel = null; @tracked modalLabel = null;
@tracked showLabelModal = false; @tracked showLabelModal = false;
@tracked scratchMember = null;
_previousLabels = null; _previousLabels = null;
_previousNewsletters = null; _previousNewsletters = null;
@ -57,12 +56,6 @@ export default class MemberController extends Controller {
set member(member) { set member(member) {
this.model = member; this.model = member;
if (member !== this.scratchMember?.member) {
const scratchMember = EmberObject.create({member});
SCRATCH_PROPS.forEach(prop => defineProperty(scratchMember, prop, boundOneWay(`member.${prop}`)));
this.scratchMember = scratchMember;
}
} }
get dirtyAttributes() { get dirtyAttributes() {
@ -99,6 +92,12 @@ export default class MemberController extends Controller {
return options; return options;
} }
get scratchMember() {
let scratchMember = EmberObject.create({member: this.member});
SCRATCH_PROPS.forEach(prop => defineProperty(scratchMember, prop, boundOneWay(`member.${prop}`)));
return scratchMember;
}
get subscribedAt() { get subscribedAt() {
let memberSince = moment(this.member.createdAtUTC).from(moment()); let memberSince = moment(this.member.createdAtUTC).from(moment());
let createdDate = moment(this.member.createdAtUTC).format('D MMM YYYY'); let createdDate = moment(this.member.createdAtUTC).format('D MMM YYYY');

View File

@ -34,7 +34,6 @@ export default class MembersRoute extends AdminRoute {
setupController(controller, member, transition) { setupController(controller, member, transition) {
super.setupController(...arguments); super.setupController(...arguments);
controller.member = member;
controller.setInitialRelationshipValues(); controller.setInitialRelationshipValues();