Skip to content

Commit

Permalink
14975-fix style and validation (#457)
Browse files Browse the repository at this point in the history
* 14975-fix style and validation

* 14975-update package version

* 14975-fix styles and validation after code review

* 14975-fix validation

* 14975-fix validations
  • Loading branch information
ketaki-deodhar authored Mar 17, 2023
1 parent 1cb465d commit 1c3db81
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
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;
.v-btn + .v-btn {
margin-left: 0.5rem;
Expand Down
39 changes: 33 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 && hasApplicant" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else-if="!isApplicantOrg || !hasApplicant" 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 && hasApplicant" color="green darken-2" class="dir-valid">mdi-check</v-icon>
<v-icon v-else-if="!isApplicantPerson || !hasApplicant" color="red">mdi-close</v-icon>
<v-icon v-else>mdi-circle-small</v-icon>
<span>A business or a corporation</span>
</li>
</ul>
Expand Down Expand Up @@ -296,6 +296,33 @@ 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)
)
}
/** 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

0 comments on commit 1c3db81

Please sign in to comment.