-
Notifications
You must be signed in to change notification settings - Fork 60
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
First pass at Coupon support #1006
Conversation
OK, works, but might want a little UI polishing, I've picked what I think are the right classes, but the spacing might be a little off |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple initial comments without looking at the visuals of it.
frontend/src/pages/team/Billing.vue
Outdated
if (err.response.status === 404) { | ||
// check for 402 and redirect if 402 returned | ||
if (err.response.status === 402) { | ||
this.coupon = (await window.cookieStore.get('ff_coupon'))?.value.split('.')[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window.cookieStore
is not supported widely enough for us to use - https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will have to write a function to work with document.cookie
- https://www.w3schools.com/js/js_cookies.asp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed update without window.cookieStore
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
Should now work everywhere
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
http://forge.example.com/account/create?code=[CouponCode]
Sets the
ff_coupon
cookie with a week long lifecloses #978