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

21107 - Add T&C to Selecting EFT Payment #2818

Merged
merged 4 commits into from
May 13, 2024
Merged

21107 - Add T&C to Selecting EFT Payment #2818

merged 4 commits into from
May 13, 2024

Conversation

Jxio
Copy link
Collaborator

@Jxio Jxio commented May 11, 2024

Issue #:
bcgov/entity#21107

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 May 11, 2024
@@ -111,6 +111,7 @@ export default class TermsOfUseDialog extends Vue {
@Prop({ default: 'termsofuse' }) tosType: string
Copy link
Collaborator

@seeker25 seeker25 May 11, 2024

Choose a reason for hiding this comment

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

Looks good Jia, is it possible to refactor this into composition-api? If your too busy we can worry about it another time

Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's a prompt that might help you out - haven't tried but we should figure something out that can do 85% of the work:

You are code translator, that takes a vuejs 2 component written with vue-class-component and vue-property-decorator and converts it to a vuejs 3 using composition API. These are your guidelines:
1. Replace class-based component with the Composition API.
2. Use the `<script lang="ts" setup>` syntax for the script section.
3. Define props using `defineProps`, maintaining and specifying their types with type annotations, eg.: `const props = defineProps<{ propName: Type; }>();`
4. Convert methods to regular anonymous functions inside constants, eg.: `const coolFunction = () => {};`.
5. Replace `this.$t` and `i18n.t` function calls with the `t` function, which you can import with `const { t } = useI18n();`.
6. Preserve translation keys in the format of 'NAMESPACE.KEY'.
7. Use 4 spaces for indentation.
8. Avoid destructuring props; use `props.propName`.
9. Convert computed properties to use the `computed` function.
10. Do not import anything, even `ref` and `computed` from vue, as everything is globally imported.
11. Do not return the template part under any circumstances, even as an example, I only care about the script.
12. Use TypeScript and type annotations wherever possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, I can do it today

@@ -111,6 +111,7 @@ export default class TermsOfUseDialog extends Vue {
@Prop({ default: 'termsofuse' }) tosType: string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's a prompt that might help you out - haven't tried but we should figure something out that can do 85% of the work:

You are code translator, that takes a vuejs 2 component written with vue-class-component and vue-property-decorator and converts it to a vuejs 3 using composition API. These are your guidelines:
1. Replace class-based component with the Composition API.
2. Use the `<script lang="ts" setup>` syntax for the script section.
3. Define props using `defineProps`, maintaining and specifying their types with type annotations, eg.: `const props = defineProps<{ propName: Type; }>();`
4. Convert methods to regular anonymous functions inside constants, eg.: `const coolFunction = () => {};`.
5. Replace `this.$t` and `i18n.t` function calls with the `t` function, which you can import with `const { t } = useI18n();`.
6. Preserve translation keys in the format of 'NAMESPACE.KEY'.
7. Use 4 spaces for indentation.
8. Avoid destructuring props; use `props.propName`.
9. Convert computed properties to use the `computed` function.
10. Do not import anything, even `ref` and `computed` from vue, as everything is globally imported.
11. Do not return the template part under any circumstances, even as an example, I only care about the script.
12. Use TypeScript and type annotations wherever possible.

@seeker25
Copy link
Collaborator

seeker25 commented May 13, 2024

also.. I should ask... this doesn't have any impact on an existing flow without EFT? EG. PAD etc.

@Jxio
Copy link
Collaborator Author

Jxio commented May 13, 2024

also.. I should ask... this doesn't have any impact on an existing flow without EFT? EG. PAD etc.
it only used by PAD and EFT for now

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bcgov bcgov deleted a comment from bcregistry-sre May 13, 2024
@Jxio
Copy link
Collaborator Author

Jxio commented May 13, 2024

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://bcregistry-account-dev--pr-2818-gmoammzq.web.app

@Jxio Jxio merged commit 27aa231 into bcgov:main May 13, 2024
6 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.

3 participants