Client and External Id

This commit is contained in:
Jose Alberto Hernandez
2022-12-03 15:21:09 -06:00
parent de24c49633
commit 60a4511c42
18 changed files with 159 additions and 46 deletions
@@ -0,0 +1,4 @@
<div>
<span *ngIf="isLongValue()"><fa-icon icon="eye" size="sm" [title]="externalId"></fa-icon></span>
{{ externalId | externalIdentifier }}
</div>
@@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ExternalIdentifierComponent } from './external-identifier.component';
describe('ExternalIdentifierComponent', () => {
let component: ExternalIdentifierComponent;
let fixture: ComponentFixture<ExternalIdentifierComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ExternalIdentifierComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ExternalIdentifierComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,23 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'mifosx-external-identifier',
templateUrl: './external-identifier.component.html',
styleUrls: ['./external-identifier.component.scss']
})
export class ExternalIdentifierComponent implements OnInit {
@Input() externalId: string;
constructor() { }
ngOnInit(): void {
}
isLongValue(): boolean {
if (this.externalId == null) {
return false;
}
return (this.externalId.length > 15);
}
}