Skip to content

Commit

Permalink
SHIBUI-1364 Adding version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 13, 2019
1 parent b7801ab commit 1052fd9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@
import { Component } from '@angular/core';
import { Component, Input } from '@angular/core';
import { FilterConfiguration } from '../model/metadata-configuration';


const data = {
dates: ['2019-08-08T08:40:32.015', '2019-08-08T08:40:19.266'],
filters: [
[
{
id: '1',
name: 'Example Filter 1',
type: 'EntityAttributesFilter',
comparable: true
},
{
id: '2',
name: 'Example Filter 2',
type: 'NameIdFilter',
comparable: true
}
],
[
{
id: '2',
name: 'Example Filter 2',
type: 'NameIdFilter',
comparable: true
},
{
id: '1',
name: 'Example Filter 1',
type: 'EntityAttributesFilter',
comparable: true
}
],
[
{
id: '4',
name: 'Example Filter 4',
type: 'EntityAttributesFilter',
comparable: false
},
{
id: '3',
name: 'Example Filter 3',
type: 'EntityAttributesFilter',
comparable: false
}
]
]
};

@Component({
selector: 'filter-version-list',
templateUrl: './filter-version-list.component.html'
})
export class FilterVersionListComponent {

filters = data;
@Input() filters: FilterConfiguration;
selected: string;
comparing: string;

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/configuration/model/history.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MetadataVersion } from './version';
import { MetadataVersion, FilterVersion } from './version';

export interface MetadataHistory {
versions: MetadataVersion[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Section } from './section';
import { Metadata } from '../../domain/domain.type';
import { FilterVersion } from './version';

export interface MetadataConfiguration {
sections: Section[];
dates: String[];
}

export interface FilterConfiguration {
dates: ['2019-08-08T08:40:32.015', '2019-08-08T08:40:19.266'];
filters: FilterVersion[];
}
7 changes: 7 additions & 0 deletions ui/src/app/metadata/configuration/model/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ export interface MetadataVersion {
date: string;
creator: string;
}

export interface FilterVersion {
id: string;
name: string;
type: string;
comparable: boolean;
}

0 comments on commit 1052fd9

Please sign in to comment.