Client and External Id
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user