Skip to content

Commit

Permalink
Revert "šŸ› Fixed unexpected leave confirmation after Cmd+S on member pā€¦
Browse files Browse the repository at this point in the history
ā€¦rofile"

This reverts commit 186c6f3.
  • Loading branch information
daniellockyer committed Jul 2, 2024
1 parent 8d33c9d commit 895e371
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 6 additions & 7 deletions ghost/admin/app/controllers/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default class MemberController extends Controller {
@tracked showImpersonateMemberModal = false;
@tracked modalLabel = null;
@tracked showLabelModal = false;
@tracked scratchMember = null;

_previousLabels = null;
_previousNewsletters = null;
Expand Down Expand Up @@ -57,12 +56,6 @@ export default class MemberController extends Controller {

set member(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() {
Expand Down Expand Up @@ -99,6 +92,12 @@ export default class MemberController extends Controller {
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() {
let memberSince = moment(this.member.createdAtUTC).from(moment());
let createdDate = moment(this.member.createdAtUTC).format('D MMM YYYY');
Expand Down
1 change: 0 additions & 1 deletion ghost/admin/app/routes/member.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default class MembersRoute extends AdminRoute {

setupController(controller, member, transition) {
super.setupController(...arguments);
controller.member = member;

controller.setInitialRelationshipValues();

Expand Down

0 comments on commit 895e371

Please sign in to comment.