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

COM-8341: Avoid calling getb2b user api. #466

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
12 changes: 4 additions & 8 deletions scripts/modules/b2b-account/edit-quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,10 @@ define([
var customerAccountId = self.model.get('customerAccountId');
if (!self.model.get('b2bUsers')) {
var b2bAccount = new B2BAccountModels.b2bAccount({ id: customerAccountId });
b2bAccount.apiGet().then(function (account) {
return b2bAccount.apiGetUsers().then(function (users) {
self.model.isLoading(false);
self.model.set("b2bUsers", users.data.items);
self.render();
}, function (error) {
self.showMessageBar(error);
});
b2bAccount.apiGetUsers().then(function (users) {
self.model.isLoading(false);
self.model.set("b2bUsers", users.data.items);
self.render();
}, function (error) {
self.showMessageBar(error);
});
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/cart/cart-table.hypr.live
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
{% if externalPayment.name == "VisaCheckout" %}
<img alt="Visa Checkout" class="v-button" role="button" src="{{pageContext.visaCheckoutButtonUrl}}"/>
{%endif%}
{% if externalPayment.name == "PayPalExpress2" %}
{% if externalPayment.name.includes("paypal")"" %}
<img id="btn_xpressPaypal" class="p-button" alt="Check out with PayPal" role="button" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png" width="170px" height="32px" />
{%endif%}
{% if externalPayment.name == "APPLEPAY" %}
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/checkout/payment-selector.hypr.live
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
src="{{pageContext.visaCheckoutButtonUrl}}?size=154&amp;color=neutral"/>
</div>
{% endif %}
{% if name == "paypalexpress2" %}
{% if name.includes("paypal")%}
<img id="btn_xpressPaypal" class="p-button" alt="Check out with PayPal" role="button" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png" width="170px" height="32px" align="left" style="margin-right:7px; float:right;"/>
{%endif%}
{% if name == "paywithamazon" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
src="{{pageContext.visaCheckoutButtonUrl}}?size=154&amp;color=neutral"/>
</div>
{% endif %}
{% if name == "paypalexpress2" %}
{% if name.includes("paypal") %}
<img id="btn_xpressPaypal" class="p-button" alt="Check out with PayPal" role="button" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png" width="170px" height="32px" align="left" style="margin-right:7px; float:right;"/>
{%endif%}
{% if name == "paywithamazon" %}
Expand Down