This commit is contained in:
parent
7224a732e2
commit
84aaa9ed99
|
@ -9,7 +9,6 @@ import {PageNotFoundComponent} from './pages/page-not-found/page-not-found.compo
|
||||||
import {WeekComponent} from './components/week/week.component';
|
import {WeekComponent} from './components/week/week.component';
|
||||||
import {DayComponent} from './components/day/day.component';
|
import {DayComponent} from './components/day/day.component';
|
||||||
import {EventComponent} from './components/event/event.component';
|
import {EventComponent} from './components/event/event.component';
|
||||||
import {ChangeComponent} from './components/change/change.component';
|
|
||||||
import {DatepickerComponent} from './components/datepicker/datepicker.component';
|
import {DatepickerComponent} from './components/datepicker/datepicker.component';
|
||||||
import {EventDetailComponent} from './components/event-detail/event-detail.component';
|
import {EventDetailComponent} from './components/event-detail/event-detail.component';
|
||||||
import {HttpClientModule} from '@angular/common/http';
|
import {HttpClientModule} from '@angular/common/http';
|
||||||
|
@ -27,7 +26,6 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
WeekComponent,
|
WeekComponent,
|
||||||
DayComponent,
|
DayComponent,
|
||||||
EventComponent,
|
EventComponent,
|
||||||
ChangeComponent,
|
|
||||||
DatepickerComponent,
|
DatepickerComponent,
|
||||||
EventDetailComponent
|
EventDetailComponent
|
||||||
],
|
],
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
<p>Change details</p>
|
|
|
@ -1,25 +0,0 @@
|
||||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
|
||||||
|
|
||||||
import {ChangeComponent} from './change.component';
|
|
||||||
|
|
||||||
describe('ChangeComponent', () => {
|
|
||||||
let component: ChangeComponent;
|
|
||||||
let fixture: ComponentFixture<ChangeComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
declarations: [ChangeComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(ChangeComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,16 +0,0 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-change',
|
|
||||||
templateUrl: './change.component.html',
|
|
||||||
styleUrls: ['./change.component.css']
|
|
||||||
})
|
|
||||||
export class ChangeComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -56,6 +56,7 @@
|
||||||
<td class="change-summary">{{change.summary}}</td>
|
<td class="change-summary">{{change.summary}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngIf="change.hasDetails">
|
<tr *ngIf="change.hasDetails">
|
||||||
|
<td></td>
|
||||||
<td class="change-old-version">{{change.oldVersion}}</td>
|
<td class="change-old-version">{{change.oldVersion}}</td>
|
||||||
<td>--></td>
|
<td>--></td>
|
||||||
<td class="change-new-version">{{change.newVersion}}</td>
|
<td class="change-new-version">{{change.newVersion}}</td>
|
||||||
|
|
|
@ -64,7 +64,6 @@ export class EventDetailComponent implements OnInit {
|
||||||
let cOld = '';
|
let cOld = '';
|
||||||
let cNew = '';
|
let cNew = '';
|
||||||
let cDetails = false;
|
let cDetails = false;
|
||||||
let appendChange = true;
|
|
||||||
|
|
||||||
if (change.is_deleted) {
|
if (change.is_deleted) {
|
||||||
cSummary = 'Deleted';
|
cSummary = 'Deleted';
|
||||||
|
@ -104,18 +103,16 @@ export class EventDetailComponent implements OnInit {
|
||||||
cNew = change.new_categories;
|
cNew = change.new_categories;
|
||||||
cDetails = true;
|
cDetails = true;
|
||||||
} else {
|
} else {
|
||||||
appendChange = false;
|
cSummary = 'Internal change';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(appendChange) {
|
this.changeDetails.push({
|
||||||
this.changeDetails.push({
|
timestamp: cTs,
|
||||||
timestamp: cTs,
|
summary: cSummary,
|
||||||
summary: cSummary,
|
oldVersion: cOld,
|
||||||
oldVersion: cOld,
|
newVersion: cNew,
|
||||||
newVersion: cNew,
|
hasDetails: cDetails
|
||||||
hasDetails: cDetails
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
lastChange = change;
|
lastChange = change;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user