Added getSchema method to itemtypes service.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Mark van der Wal 2020-06-22 12:20:02 +02:00
parent ff06b419f2
commit aa3707aa56
2 changed files with 11 additions and 4 deletions

View File

@ -4,5 +4,6 @@ export interface IItemType {
editor?: string; editor?: string;
isFolder?: boolean; isFolder?: boolean;
iconColor?: string; iconColor?: string;
schema?: string;
extraAttributes?: string; extraAttributes?: string;
} }

View File

@ -31,6 +31,12 @@ export class ItemTypeService {
return extraAttributes; return extraAttributes;
} }
getSchema(itemType: string): string {
let schema = null;
if (this.itemTypes[itemType]) schema = this.itemTypes[itemType].schema;
return schema;
}
hasViewer(item: IItem) { hasViewer(item: IItem) {
let itemType: string = item.itemType; let itemType: string = item.itemType;
if (this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined; if (this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined;