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

14975-fix style and validation #457

Merged
merged 5 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "3.10.6",
"version": "3.10.7",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
3 changes: 1 addition & 2 deletions src/components/common/PeopleAndRoles/ListPeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,9 @@ export default class ListPeopleAndRoles extends Mixins(CommonMixin, OrgPersonMix
.actions {
position: absolute;
right: 0;
margin-top: -0.5rem;
margin-top: -0.25rem;
@extend .actions-width;
margin-top: -8px;
Copy link
Collaborator Author

@ketaki-deodhar ketaki-deodhar Mar 16, 2023

Choose a reason for hiding this comment

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

Removed overall padding. margin-top at line 620 was being overridden by this (line 623). Reduced margin-top (line 620) to align with the column on left. It is misaligned in DEV as well. This fixes the alignment for other filings (Change, Correction and Conversion). I tested for all the other filing types

In DEV:
image

After Fix:
image

.v-btn + .v-btn {
margin-left: 0.5rem;
Expand Down
51 changes: 45 additions & 6 deletions src/components/common/PeopleAndRoles/PeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
</section>
<ul>
<li>
<v-icon v-if="hasApplicant" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else color="red">mdi-close</v-icon>
<!-- <v-icon>mdi-circle-small</v-icon> -->
<v-icon v-if="isApplicantPerson" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else-if="applicantPersonsRemoved && !isApplicantOrg" color="red">mdi-close</v-icon>
<v-icon v-else>mdi-circle-small</v-icon>
<span>An individual</span>
</li>
<li>
<v-icon v-if="hasApplicant" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else color="red">mdi-close</v-icon>
<!-- <v-icon>mdi-circle-small</v-icon> -->
<v-icon v-if="isApplicantOrg" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else-if="applicantOrgsRemoved && !isApplicantPerson" color="red">mdi-close</v-icon>
<v-icon v-else>mdi-circle-small</v-icon>
<span>A business or a corporation</span>
Copy link
Collaborator Author

@ketaki-deodhar ketaki-deodhar Mar 15, 2023

Choose a reason for hiding this comment

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

this is for point#1 - fix validations

Default Applicant:
image

Remove Person and add another Person
image

Remove Person and add Org
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

^^ Looks great! 😃

</li>
</ul>
Expand Down Expand Up @@ -296,6 +296,45 @@ export default class PeopleAndRoles extends Mixins(CommonMixin, DateMixin, OrgPe
return this.hasRole(RoleTypes.APPLICANT, 1, CompareModes.EXACT)
}

/** True when orgPerson applicant role. */
public isApplicant (orgPerson: OrgPersonIF): boolean {
return orgPerson?.roles.some(role => role.roleType === RoleTypes.APPLICANT)
}

get applicantPersons (): OrgPersonIF[] {
return this.getOrgPeople.filter(person =>
this.isApplicant(person) && this.isPartyTypePerson(person) && !this.wasRemoved(person)
)
}

get applicantOrgs (): OrgPersonIF[] {
return this.getOrgPeople.filter(person =>
this.isApplicant(person) && this.isPartyTypeOrg(person) && !this.wasRemoved(person)
)
}

get applicantPersonsRemoved (): OrgPersonIF[] {
return this.getOrgPeople.filter(person =>
this.isApplicant(person) && this.isPartyTypePerson(person) && this.wasRemoved(person)
)
}

get applicantOrgsRemoved (): OrgPersonIF[] {
return this.getOrgPeople.filter(person =>
this.isApplicant(person) && this.isPartyTypeOrg(person) && this.wasRemoved(person)
)
}

/** True when applicant party type is org. */
get isApplicantOrg () : boolean {
return this.applicantOrgs.length > 0
}

/** True when applicant party type is person. */
get isApplicantPerson () : boolean {
return this.applicantPersons.length > 0
}

/** True if we have all required parties. */
get haveRequiredParties (): boolean {
if (this.isAlterationFiling) {
Expand Down