...
 
Commits (5)
......@@ -3,12 +3,10 @@
<div ngbDropdownMenu class="shadow">
<button class="dropdown-item btn btn-sm" *ngFor="let value of model.getAllPossibleValues()"
(click)="enumValueSelected(value)">
<span
class="fa"
[ngClass]="value === model.toString() ? 'fa-check' : ''"
style="width: 15pt">
</span>
{{value}}
</button>
<button class="dropdown-item btn btn-sm">
<input class="form-control form-control-sm" appFocus type="text" >
</button>
</div>
</div>
......@@ -11,13 +11,22 @@ export class SingleEnumInputComponent implements OnInit {
@Input() model: ICustomEnum;
@Output() modelChange = new EventEmitter<ICustomEnum>();
constructor() { }
dropdownExpanded: boolean;
constructor() {
this.dropdownExpanded = false;
}
ngOnInit() {
}
expandButtonClicked(): void {
this.dropdownExpanded = !this.dropdownExpanded;
}
enumValueSelected(value: string): void {
this.model.setValue(value);
this.modelChange.emit(this.model);
this.dropdownExpanded = !this.dropdownExpanded;
}
}
......@@ -71,6 +71,9 @@ export const routes: Routes = [
component: PoisComponent,
},
{
path: 'contacts',
component: PoisComponent,
},{
path: 'poi/:id',
component: PoisComponent,
},
......
......@@ -56,6 +56,10 @@ export const navBarData: INavBarDataModel = {
title: 'Users',
path: 'users',
},
{
title: 'Type of contacts',
path: 'contacts',
},
{
title: 'Backup',
path: 'backup',
......
......@@ -3,7 +3,7 @@ import {ICustomEnum} from '../../interfaces/ICustomEnum';
export class ContactTypeModel implements IModel, ICustomEnum {
static possibleContactTypes: string[] = [
'tel', 'www', 'email', '...',
'tel', 'www', 'email', 'add contact type'
];
contactType: string;
......