GNM-1188: FE Model (status) erweitern
GNM-1228: FE Calendar: ViewModel Äquivalent für SGMs neu erstellen
diff --git a/src/app/common/session-context.spec.ts b/src/app/common/session-context.spec.ts
index 594c309..451dfbe 100644
--- a/src/app/common/session-context.spec.ts
+++ b/src/app/common/session-context.spec.ts
@@ -83,7 +83,8 @@
}));
it('should return the correct statusById', inject([SessionContext], (sessionContext: SessionContext) => {
- sessionContext.setStatuses([{ id: 1, name: 'offen' }, { id: 2, name: 'in Bearbeitung' }, { id: 3, name: 'beendet' }]);
+ sessionContext.setStatuses([{ id: 1, name: 'offen', colorCode: '#990000' }, { id: 2, name: 'in Bearbeitung', colorCode: '#990000' },
+ { id: 3, name: 'beendet', colorCode: '#990000' }]);
expect(sessionContext.getStatusById(666)).toBeNull();
expect(sessionContext.getStatusById(3).id).toBe(3);
diff --git a/src/app/common/session-context.ts b/src/app/common/session-context.ts
index 6a9b862..7e9c1a4 100644
--- a/src/app/common/session-context.ts
+++ b/src/app/common/session-context.ts
@@ -244,7 +244,7 @@
return null;
}
}
- return { id: 0, name: 'NOSTATUS' };
+ return { id: 0, name: 'NOSTATUS', colorCode: 'NOCOLOR' };
}
getBranchById(id: number): Branch {
diff --git a/src/app/model/calendar-entry.ts b/src/app/model/calendar-entry.ts
new file mode 100644
index 0000000..3370b27
--- /dev/null
+++ b/src/app/model/calendar-entry.ts
@@ -0,0 +1,20 @@
+/*
+******************************************************************************
+* Copyright 2018 PTA GmbH.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+*
+* http://www.eclipse.org/legal/epl-v10.html
+*
+******************************************************************************
+*/
+export class CalendarEntry {
+ gridMeasureId: number;
+ gridMeasureTitle: string;
+ gridMeasureStatusId: number;
+ singleGridMeasureId: number;
+ singleGridMeasureTitle: string;
+ plannedStarttimSinglemeasure: string;
+ plannedEndtimeSinglemeasure: string;
+}
diff --git a/src/app/model/status.ts b/src/app/model/status.ts
index 1261581..8d70116 100644
--- a/src/app/model/status.ts
+++ b/src/app/model/status.ts
@@ -12,4 +12,5 @@
export class Status {
id: number;
name: string;
+ colorCode: string;
}
diff --git a/src/app/test-data/statuses.ts b/src/app/test-data/statuses.ts
index 32fcb81..02dd152 100644
--- a/src/app/test-data/statuses.ts
+++ b/src/app/test-data/statuses.ts
@@ -15,13 +15,16 @@
{
id: 1,
name: 'offen',
+ colorCode: '#990000',
},
{
id: 2,
name: 'in Bearbeitung',
+ colorCode: '#990000',
},
{
id: 3,
name: 'beendet',
+ colorCode: '#990000',
}
];