Skip to content

feat: Recreate free order buying process #4569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/public/ticket-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ export default Component.extend(FormMixin, {
&& !this.authManager.currentUser.isVerified;
}),

shouldDisableOrderButton: computed('hasTicketsInOrder', 'isDonationPriceValid', function() {
shouldDisableOrderButton: computed('hasTicketsInOrder', 'isDonationPriceValid', 'isUnverified', function() {
if (this.isUnverified) {return true}
let quantityDonation = sumBy(this.donationTickets.toArray(),
donationTicket => (donationTicket.orderQuantity || 0));
if (quantityDonation > 0) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/unverified-user-message.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{#if (eq this.session.currentRouteName 'events.view.index')}}
{{t 'To make your event live, please verify your account by clicking on the confirmation link that has been emailed to you.'}}
{{else}}
{{t 'Your account is unverified. Please verify by clicking on the confirmation link that has been emailed to you.'}}
{{t 'Your account is unverified.'}} {{@extraMessage}} {{t 'Please verify by clicking on the confirmation link that has been emailed to you.'}}
{{/if}}
</div>
<p>{{t 'Did not get the email?'}} <a href="#" onclick={{action 'sendConfirmationMail'}}>{{t 'Please click here to resend the confirmation mail.'}}</a></p>
Expand Down
1 change: 1 addition & 0 deletions app/controllers/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default class IndexController extends Controller {
this.set('orderInput', orderInput);
}
if (!this.session.isAuthenticated) {
this.set('userExists', false);
this.set('isLoginModalOpen', true);
return;
}
Expand Down
4 changes: 4 additions & 0 deletions app/styles/partials/utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@
.m-0 {
margin: 0 !important;
}

.m-2 {
margin: .5rem;
}
7 changes: 6 additions & 1 deletion app/templates/components/forms/orders/guest-order-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
{{/if}}
<h4 class="ui header">{{t 'Please enter your email address to continue.'}}</h4>
<div class="field">
<Input @type="text" @name="email" @value={{this.email}} @disabled={{this.userExists}} placeholder={{t "Email Address"}} />
<div class="ui icon input">
<Input @type="text" @name="email" @value={{this.email}} @disabled={{this.userExists}} placeholder={{t "Email Address"}} />
{{#if this.userExists}}
<i class="circular undo link icon" role="button" onclick={{action (mut this.userExists) false}}></i>
{{/if}}
</div>
</div>
{{#if this.userExists}}
<div class="ui text muted">{{t 'You have previously registered with this email address.'}}</div>
Expand Down
1 change: 1 addition & 0 deletions app/templates/public/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@errorMessage={{this.errorMessage}}
@save="save" />
</div>
<UnverifiedUserMessage class="m-2" @padless={{true}} @extraMessage={{t 'To place a ticket order: '}} />
</div>
</div>
<div class="ui hidden divider"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ module('Integration | Component | unverified user message', function(hooks) {
});
this.set('isMailSent', false);
await render(hbs`{{unverified-user-message session=session authManager=authManager isMailSent=isMailSent}}`);
assert.ok(this.element.innerHTML.trim().includes('Your account is unverified. Please verify by clicking on the confirmation link that has been emailed to you.'));
assert.dom(this.element).includesText('Your account is unverified. Please verify by clicking on the confirmation link that has been emailed to you.');
});
});