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

24936 - Product and Services tab update #3193

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

Jxio
Copy link
Collaborator

@Jxio Jxio commented Jan 2, 2025

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).

@Jxio Jxio self-assigned this Jan 2, 2025
@Jxio Jxio requested a review from seeker25 January 2, 2025 22:11
@@ -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) {
Copy link
Collaborator

@seeker25 seeker25 Jan 2, 2025

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
Copy link
Collaborator

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] || []"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems weird haha

Copy link

sonarqubecloud bot commented Jan 3, 2025

@seeker25 seeker25 merged commit 9f5a259 into bcgov:feature-remove-account-type Jan 3, 2025
2 of 3 checks passed
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.

2 participants