-
Notifications
You must be signed in to change notification settings - Fork 46
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
15092 - remove fee summary components from App.vue add to each view instead #458
15092 - remove fee summary components from App.vue add to each view instead #458
Conversation
<v-col cols="9" class="left-side"> | ||
<slot></slot> | ||
</v-col> |
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.
The ViewWrapper takes a significant chunk of the template from App.vue. Here we're using a <slot>
to allow the views to add back their own content with the minimum of disruption.
Codecov Report
@@ Coverage Diff @@
## main #458 +/- ##
==========================================
- Coverage 85.70% 84.06% -1.65%
==========================================
Files 177 186 +9
Lines 3289 3558 +269
Branches 524 711 +187
==========================================
+ Hits 2819 2991 +172
- Misses 468 566 +98
+ Partials 2 1 -1
|
<ViewWrapper> | ||
<section class="pb-10" id="alteration-view"> |
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.
The wrapper is added in each view like this.
<AlterationSummary | ||
class="mt-10" | ||
:sectionNumber="showTransactionalFolioNumber ? '4.' : '3.'" | ||
:autoValidation="getAppValidate" | ||
:validate="getAppValidate" | ||
@haveChanges="onAlterationSummaryChanges()" | ||
/> | ||
|
||
<StaffPayment | ||
<DocumentsDelivery | ||
class="mt-10" | ||
:sectionNumber="showTransactionalFolioNumber ? '5.' : '4.'" | ||
@haveChanges="onStaffPaymentChanges()" | ||
sectionNumber="1." | ||
:validate="getAppValidate" | ||
@valid="setDocumentOptionalEmailValidity($event)" | ||
/> | ||
</template> |
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.
This hasn't changed. It's just Github being dumb with how it recognizes changes.
|
||
it('renders the fee summary properly following changes', async () => { | ||
store.state.stateModel.tombstone.entityType = 'SP' | ||
store.state.stateModel.tombstone.filingType = 'changeOfRegistration' | ||
store.state.stateModel.entitySnapshot = mockEntitySnapshot | ||
store.state.stateModel.officeAddresses = mockAddresses | ||
store.state.stateModel.filingData = { | ||
filingTypeCode: 'FMCHANGE', | ||
entityType: 'SP', | ||
priority: false, | ||
waiveFees: false | ||
} | ||
await Vue.nextTick() | ||
|
||
expect(wrapper.findComponent(FeeSummaryShared).exists()).toBe(true) // not displayed initially | ||
}) |
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.
Removed this test as FeeSummaryShared is no longer rendered with App.vue
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.
LGTM! Nice and concise!
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. Clean!
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.
Love it. No complaints here!
Issue #: /bcgov/entity#15092
This is an incremental PR as the changes are potentially disruptive. The PR removes the fee summaries from App.vue and moves them to a ViewWrapper component that's added to the following views:
By removing the fee summary components from App.vue it gives us more flexibility to handle the actions from FeeSummaryShared differently.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).