Skip to content

Commit

Permalink
disable sf id field
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed May 9, 2024
1 parent 6c3345d commit 6db297d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion ui/src/app/member/member-update.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
class="form-control"
name="salesforceId"
id="field_salesforceId"
[attr.disabled]="editForm.get('id')?.value !== undefined ? true : null"
formControlName="salesforceId"
/>
<div
Expand Down
6 changes: 6 additions & 0 deletions ui/src/app/member/member-update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,18 @@ export class MemberUpdateComponent implements OnInit {
lastModifiedDate: member.lastModifiedDate != null ? member.lastModifiedDate.format(DATE_TIME_FORMAT) : null,
})
const clientId = this.editForm.get('clientId')?.value
const sfId = this.editForm.get('salesforceId')?.value

if (!clientId || (clientId && clientId === '')) {
this.editForm.get('assertionServiceEnabled')?.reset()
this.editForm.get('assertionServiceEnabled')?.disable()
} else {
this.editForm.get('assertionServiceEnabled')?.enable()
}

if (sfId) {
this.editForm.get('salesforceId')?.disable()
}
}

navigateToMembersList() {
Expand Down

0 comments on commit 6db297d

Please sign in to comment.