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

17468 fixed Entity Type menu #673

Conversation

severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Sep 7, 2023

Issue #: bcgov/entity#17468

Description of changes:

  • app version = 5.0.37
  • simplified entity type menu bindings
  • fixed entity type reactivity bug
  • cleaned up / fixed modal bindings
  • misc cleanup

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

@severinbeauvais severinbeauvais self-assigned this Sep 7, 2023
- simplified entity type menu bindings
- fixed entity type reactivity bug
- misc cleanup
@severinbeauvais severinbeauvais changed the base branch from main to feature-way-of-navigating September 7, 2023 21:32
hide-details="auto"
filled
v-model="entity_type_options_select_bind"
:value="isConversion ? getOriginEntityTypeCd : entity_type_cd"
@change="setClearErrors(); entity_type_cd = $event"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One less level of indirection (instead of get + set).

@@ -274,7 +275,8 @@
:href="colinLink"
target="_blank"
>
Go to Corporate Online to {{ goToColinText }} <v-icon small class="ml-1">mdi-open-in-new</v-icon>
Go to Corporate Online to {{ isConversion ? 'Alter' : 'Register' }}
<v-icon small class="ml-1">mdi-open-in-new</v-icon>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved very simple function code into here (only place it was used).

if (this.isContinuationIn) return 'Continue In Now'
if (this.isAmalgamation) return 'Amalgamate Now'
if (this.isConversion) return 'Alter Now'
if (this.isRestoration) return 'Restore Now'
return 'Incorporate Now'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Easier pattern to read/understand/extend.

@severinbeauvais severinbeauvais marked this pull request as ready for review September 7, 2023 21:34
@severinbeauvais severinbeauvais marked this pull request as draft September 7, 2023 21:41
@severinbeauvais
Copy link
Collaborator Author

severinbeauvais commented Sep 7, 2023

Moved to draft -- doesn't work twice in a row! (I thought I had tested this.) :/ fixed!

@@ -1,12 +1,12 @@
<template>
<v-dialog v-model="showModal" :max-width="width" persistent>
<v-dialog :value="getPickEntityModalVisible" :max-width="width" persistent>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dialog doesn't set this value so can use store getter directly here.

closeIconClicked () {
this.setPickEntityModalVisible(false)
// clear "View all business types" selection
this.setEntityTypeCd(null)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Compare this to search.vue where we set this to empty string. This maintains reactivity, so the v-select clears itself correctly.


set showModal (value: boolean) {
this.setPickEntityModalVisible(value)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just used the store getter/action directly.

@severinbeauvais severinbeauvais marked this pull request as ready for review September 7, 2023 21:52
@bcgov bcgov deleted a comment from bcregistry-sre Sep 7, 2023
@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://namerequest-dev--pr-673-kfkjfou9.web.app

Copy link
Collaborator

@JazzarKarim JazzarKarim left a comment

Choose a reason for hiding this comment

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

LGTM Sev 👍

@severinbeauvais severinbeauvais merged commit 6dac03a into bcgov:feature-way-of-navigating Sep 7, 2023
5 checks passed
JazzarKarim pushed a commit to JazzarKarim/namerequest that referenced this pull request Sep 8, 2023
* - app version = 5.0.37
- simplified entity type menu bindings
- fixed entity type reactivity bug
- misc cleanup

* - cleaned up / fixed modal bindings
JazzarKarim pushed a commit that referenced this pull request Sep 11, 2023
* - app version = 5.0.37
- simplified entity type menu bindings
- fixed entity type reactivity bug
- misc cleanup

* - cleaned up / fixed modal bindings
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