-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: use paddle prices and pass country data #34
Conversation
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.
Some comments for this work in progress.
Co-authored-by: Mazarin <djaiss@users.noreply.github.com>
…s into 20220603-price-country
…s into 20220603-price-country
…s into 20220603-price-country
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.
This is great overall.
Kudos, SonarCloud Quality Gate passed! |
axios | ||
.post(plan.url.price, this.form) | ||
.post(route('officelife.price', { plan: plan.id }), { quantity: plan.quantity }) |
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.
I don't like this, but I won't fight it on this project.
In my opinion we shouldn't call route names in the views directly. This knowledge should come from the backend.
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.
I kindly disagree. We always call route names in the view. On the contrary, calling url directly is really a bad choice.
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.
I prefer that routes are not built on the front end at all.
If the URL comes from the backend, it's better as urls are like any other data needed to display and build the view.
What is the benefits from building the url in the view? To me it's just additional logic that the view should not have to worry about.
No description provided.