Skip to content
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

Merged
merged 24 commits into from
Jun 25, 2022
Merged

Conversation

asbiin
Copy link
Member

@asbiin asbiin commented Jun 6, 2022

No description provided.

@asbiin asbiin marked this pull request as draft June 6, 2022 16:55
Copy link
Member

@djaiss djaiss left a 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.

@asbiin asbiin marked this pull request as ready for review June 9, 2022 19:05
@asbiin asbiin requested a review from djaiss June 9, 2022 20:29
Copy link
Member

@djaiss djaiss left a 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.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.8% 97.8% Coverage
2.5% 2.5% Duplication

axios
.post(plan.url.price, this.form)
.post(route('officelife.price', { plan: plan.id }), { quantity: plan.quantity })
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

@asbiin asbiin merged commit 64fe925 into main Jun 25, 2022
@asbiin asbiin deleted the 20220603-price-country branch June 25, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants