Skip to content

Nuxt Build Fold In#2124

Closed
cameron-eyds wants to merge 22 commits intomainfrom
feature-Nuxt-4.0.0
Closed

Nuxt Build Fold In#2124
cameron-eyds wants to merge 22 commits intomainfrom
feature-Nuxt-4.0.0

Conversation

@cameron-eyds
Copy link
Collaborator

Issue #: /bcgov/entity#23932

Description of changes:

  • Fold Our Nuxt Feature Branch Into Main Branch
  • Have cut a copy of MAIN as a fall back.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

@cameron-eyds cameron-eyds self-assigned this Mar 20, 2025
Comment on lines +264 to +265
const currency = getLengthTrust.value.lienAmount
?.replace('$', '')

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of '$'.

Copilot Autofix

AI 11 months ago

To fix the problem, we need to ensure that all occurrences of the dollar sign are removed from the lienAmount string. This can be achieved by using a regular expression with the global flag (g) in the replace method. This change will ensure that any dollar signs present in the string are removed, regardless of their position.

Suggested changeset 1
ppr-ui/src/components/registration/length-trust/RegistrationLengthTrustAmendment.vue

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/ppr-ui/src/components/registration/length-trust/RegistrationLengthTrustAmendment.vue b/ppr-ui/src/components/registration/length-trust/RegistrationLengthTrustAmendment.vue
--- a/ppr-ui/src/components/registration/length-trust/RegistrationLengthTrustAmendment.vue
+++ b/ppr-ui/src/components/registration/length-trust/RegistrationLengthTrustAmendment.vue
@@ -264,3 +264,3 @@
           const currency = getLengthTrust.value.lienAmount
-            ?.replace('$', '')
+            ?.replace(/\$/g, '')
             ?.replaceAll(',', '')
EOF
@@ -264,3 +264,3 @@
const currency = getLengthTrust.value.lienAmount
?.replace('$', '')
?.replace(/\$/g, '')
?.replaceAll(',', '')
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +276 to +277
const currency = getLengthTrust.value.lienAmount
?.replace('$', '')

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of '$'.

Copilot Autofix

AI 11 months ago

To fix the problem, we need to ensure that all occurrences of the specified character are replaced. This can be achieved by using a regular expression with the global flag (g). Specifically, we will replace the replace method calls with regular expressions to ensure that all occurrences of the characters ('$' and ',') are replaced.

Suggested changeset 1
ppr-ui/src/pages/renew/RenewRegistration.vue

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/ppr-ui/src/pages/renew/RenewRegistration.vue b/ppr-ui/src/pages/renew/RenewRegistration.vue
--- a/ppr-ui/src/pages/renew/RenewRegistration.vue
+++ b/ppr-ui/src/pages/renew/RenewRegistration.vue
@@ -276,4 +276,4 @@
           const currency = getLengthTrust.value.lienAmount
-            ?.replace('$', '')
-            ?.replaceAll(',', '')
+            ?.replace(/\$/g, '')
+            ?.replace(/,/g, '')
           const lienFloat = parseFloat(currency)
EOF
@@ -276,4 +276,4 @@
const currency = getLengthTrust.value.lienAmount
?.replace('$', '')
?.replaceAll(',', '')
?.replace(/\$/g, '')
?.replace(/,/g, '')
const lienFloat = parseFloat(currency)
Copilot is powered by AI and may make mistakes. Always verify output.
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