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 {DayComponent} from './components/day/day.component';
|
||||
import {EventComponent} from './components/event/event.component';
|
||||
import {ChangeComponent} from './components/change/change.component';
|
||||
import {DatepickerComponent} from './components/datepicker/datepicker.component';
|
||||
import {EventDetailComponent} from './components/event-detail/event-detail.component';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
|
@ -27,7 +26,6 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
|||
WeekComponent,
|
||||
DayComponent,
|
||||
EventComponent,
|
||||
ChangeComponent,
|
||||
DatepickerComponent,
|
||||
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>
|
||||
</tr>
|
||||
<tr *ngIf="change.hasDetails">
|
||||
<td></td>
|
||||
<td class="change-old-version">{{change.oldVersion}}</td>
|
||||
<td>--></td>
|
||||
<td class="change-new-version">{{change.newVersion}}</td>
|
||||
|
|
|
@ -64,7 +64,6 @@ export class EventDetailComponent implements OnInit {
|
|||
let cOld = '';
|
||||
let cNew = '';
|
||||
let cDetails = false;
|
||||
let appendChange = true;
|
||||
|
||||
if (change.is_deleted) {
|
||||
cSummary = 'Deleted';
|
||||
|
@ -104,18 +103,16 @@ export class EventDetailComponent implements OnInit {
|
|||
cNew = change.new_categories;
|
||||
cDetails = true;
|
||||
} else {
|
||||
appendChange = false;
|
||||
cSummary = 'Internal change';
|
||||
}
|
||||
|
||||
if(appendChange) {
|
||||
this.changeDetails.push({
|
||||
timestamp: cTs,
|
||||
summary: cSummary,
|
||||
oldVersion: cOld,
|
||||
newVersion: cNew,
|
||||
hasDetails: cDetails
|
||||
});
|
||||
}
|
||||
this.changeDetails.push({
|
||||
timestamp: cTs,
|
||||
summary: cSummary,
|
||||
oldVersion: cOld,
|
||||
newVersion: cNew,
|
||||
hasDetails: cDetails
|
||||
});
|
||||
|
||||
lastChange = change;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user