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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,6 +27,8 @@ import { TenantSelectorComponent } from './tenant-selector/tenant-selector.compo
|
||||
import { IconsModule } from './icons.module';
|
||||
import { MaterialModule } from './material.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ExternalIdentifierComponent } from './external-identifier/external-identifier.component';
|
||||
import { PipesModule } from 'app/pipes/pipes.module';
|
||||
|
||||
/**
|
||||
* Shared Module
|
||||
@@ -40,6 +42,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
MaterialModule,
|
||||
ReactiveFormsModule,
|
||||
TranslateModule.forRoot(),
|
||||
PipesModule
|
||||
],
|
||||
declarations: [
|
||||
FormfieldComponent,
|
||||
@@ -59,7 +62,8 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
NotificationsTrayComponent,
|
||||
SearchToolComponent,
|
||||
ServerSelectorComponent,
|
||||
TenantSelectorComponent
|
||||
TenantSelectorComponent,
|
||||
ExternalIdentifierComponent
|
||||
],
|
||||
exports: [
|
||||
FileUploadComponent,
|
||||
@@ -76,7 +80,8 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
TranslateModule,
|
||||
TenantSelectorComponent
|
||||
TenantSelectorComponent,
|
||||
ExternalIdentifierComponent
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
||||
Reference in New Issue
Block a user