-
Notifications
You must be signed in to change notification settings - Fork 70
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
Conversation
@@ -111,6 +111,7 @@ export default class TermsOfUseDialog extends Vue { | |||
@Prop({ default: 'termsofuse' }) tosType: string |
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.
Looks good Jia, is it possible to refactor this into composition-api? If your too busy we can worry about it another time
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.
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.
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.
yes, I can do it today
@@ -111,6 +111,7 @@ export default class TermsOfUseDialog extends Vue { | |||
@Prop({ default: 'termsofuse' }) tosType: string |
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.
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.
also.. I should ask... this doesn't have any impact on an existing flow without EFT? EG. PAD etc. |
|
Quality Gate passedIssues Measures |
/gcbrun |
Temporary Url for review: https://bcregistry-account-dev--pr-2818-gmoammzq.web.app |
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).