-
Notifications
You must be signed in to change notification settings - Fork 68
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
24936 - Product and Services tab update #3193
Conversation
@@ -889,6 +891,17 @@ export const useOrgStore = defineStore('org', () => { | |||
return [] | |||
} | |||
|
|||
async function getProductPaymentMethods (productCode?: string | undefined): Promise<any> { | |||
const response: any = await CodesService.getPaymentMethods(productCode || undefined) | |||
if (response?.data && response.status === 200) { |
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.
Should move this to service, store doesn't really care about the status?
store just cares about the data?
@@ -7,4 +7,11 @@ export default class CodesService { | |||
public static async getCodes (codeType: string): Promise<AxiosResponse<Code[]>> { | |||
return axios.get(`${ConfigHelper.getAuthAPIUrl()}/codes/${codeType}`) | |||
} | |||
|
|||
public static async getPaymentMethods (productCode?: string): Promise<AxiosResponse<{[key: string]: string[]}>> { | |||
const url = productCode |
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.
const baseUrl = ${ConfigHelper.getPayAPIURL()}/codes/valid_payment_methods
;
const url = productCode ? ${baseUrl}/${productCode}
: baseUrl;
return axios.get(url);
@@ -34,6 +26,7 @@ | |||
:productDetails="product" | |||
:isexpandedView="product.code === expandedProductCode" | |||
:isSelected="currentSelectedProducts.includes(product.code)" | |||
:paymentMethods="productPaymentMethods[product.code === 'BUSINESS_SEARCH' ? 'BUSINESSSearch' : product.code] || []" |
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.
Seems weird haha
Quality Gate passedIssues Measures |
9f5a259
into
bcgov:feature-remove-account-type
Issue #:
bcgov/entity#24936
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).