diff --git a/src/client/dd-hub-react/src/services/document-service.ts b/src/client/dd-hub-react/src/services/document-service.ts index b995f8c..4545e44 100644 --- a/src/client/dd-hub-react/src/services/document-service.ts +++ b/src/client/dd-hub-react/src/services/document-service.ts @@ -22,6 +22,11 @@ const validExtensions: FileFormat[] = [ 'png', 'svg', 'zip', 'md' ]; +type DocAttribute = { + name: string; + serilizedValue: string; +} + export class Doc { static map(source?: Partial): Doc { @@ -37,6 +42,7 @@ export class Doc { addedWho!: string; changedWhen?: Date; changedWho?: string; + attributes: Array = []; getChangedInfo(separator: string = " | "): string | null { const who = this.changedWho?.trim(); @@ -53,7 +59,7 @@ export class Doc { const parts = this.name.split('.'); if (parts.length > 1 && parts[parts.length - 1].trim() !== '') { const ext = parts[parts.length - 1].toLowerCase(); - + if (validExtensions.includes(ext as FileFormat)) return ext as FileFormat; }