Repository navigation
Conversation
…LOG-478)
When getFee fails it returns undefined. The host application page spread it
into {} (truthy) and passed undefined to setPlaceholderServiceFee, so the fee
widget called undefined.toFixed() on the next render, which aborted navigation
back into an application/draft.
- host: only set the placeholder service fee when fee1 actually loaded
- base: default the placeholder service fee to 0 when undefined
- tests for both
|
|
Temporary Url for review: https://strr-hosts-dev--pr-1943-m91yl5a5.web.app |
Check with Pam and Liz so it can be implemented now. My opinion is to do both: show a message and be blocked from submitting (perhaps show the message when submit is clicked and don't actually submit; or an alert somewhere and disable submit). |
Showing a $0.00 service fee when Pay is down could make users think there's no service fee, and then they'd see a different total at payment. |
|
yeah agree $0.00 is misleading. checking with pam and liz on message + blocking submit, will follow up here once i hear back |



Issue:
Description of changes:
application.vueonly sets the placeholder service fee whenfee1actually loaded. Before, a failedgetFeereturnedundefined,{ ...fee1 }turned it into{}(truthy), andsetPlaceholderServiceFee(undefined)was called. The fee store kept thatundefined, so on the next visit the fee widget hitundefined.toFixed()while rendering and the page didn't load (you stayed on the dashboard).setPlaceholderServiceFeefalls back to0when the fee isundefined, so every app is covered. Note that the UIs build base-web frommain, so this part only takes effect after merge.platFeeSm.valuebefore calling it, so no change there.How this was tested:
connect-fee-store.spec.ts. It fails without the fix and passes with it. Lint passes; 91/91 pass.application.spec.ts(fee loaded → placeholder set; fee failed → not called). The failure test fails without the fix. Lint passes; 323 pass, 22 skipped.composable-use-renewals.spec.tstimes out in a setup hook locally; that happens on clean main too, unrelated to this change./fees/Pay API requests return 500 in the browser, then Resume Draft → breadcrumb back to dashboard → Resume Draft on the same draft. The second visit loads normally, the service fee shows $0.00, and there's notoFixederror.undefined(the old behaviour) brings backTypeError: Cannot read properties of undefined (reading 'toFixed'), and the Service Fee row disappears.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the BC Registry and Digital Services BSD 3-Clause License