Skip to content

Commit fd230e2

Browse files
committed
fix: update event status from 'Analysing' to 'Detected' across multiple components and increment version to 0.2.1
1 parent 8d34ec8 commit fd230e2

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/Components/Event/Enums.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ export function IsIncident(type: EventType): boolean {
6464
/**
6565
* @author Aloento
6666
* @since 1.0.0
67-
* @version 0.2.0
67+
* @version 0.2.1
6868
*/
6969
export enum EventStatus {
70-
Analysing = "Analysing",
70+
Detected = "Detected",
7171
Fixing = "Fixing",
7272
Observing = "Observing",
7373
Resolved = "Resolved",
@@ -115,8 +115,8 @@ export function IsOpenStatus(status: EventStatus): boolean {
115115
*/
116116
export function GetStatusString(status: EventStatus): string {
117117
switch (status) {
118-
case EventStatus.Analysing:
119-
return StatusEnum.Analysing;
118+
case EventStatus.Detected:
119+
return StatusEnum.Detected;
120120
case EventStatus.Fixing:
121121
return StatusEnum.Fixing;
122122
case EventStatus.Observing:

src/Components/History/EventItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function EventItem({ Prev, Curr }: IEventItem) {
6767
let color: any;
6868

6969
switch (Curr.Status) {
70-
case EventStatus.Analysing:
70+
case EventStatus.Detected:
7171
color = "red";
7272
break;
7373

src/Components/New/useNewForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function useNewForm() {
149149
}
150150

151151
const status = IsIncident(type)
152-
? EventStatus.Analysing : EventStatus.Planned
152+
? EventStatus.Detected : EventStatus.Planned
153153

154154
const event: Models.IEvent = {
155155
Id: Math.max(...DB.Events.map(event => event.Id), 0) + 1,

src/Services/Status.Entities.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ interface UpdateEntityV2 extends UpdateEntityV1 {
6464
/**
6565
* @author Aloento
6666
* @since 1.0.0
67-
* @version 0.2.0
67+
* @version 0.2.1
6868
*/
6969
export const enum StatusEnum {
7070
Analyzing = "analyzing",
7171
Analysing = "analysing",
72+
Detected = "detected",
7273
Changed = "changed",
7374
ImpactChanged = "impact changed",
7475
Completed = "completed",

src/Services/Status.Trans.V2.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function TransformerV2({ Components, Events }: { Components: StatusEntity
115115
Title: event.title,
116116
Start: dayjs(event.start_date).toDate(),
117117
Type: type,
118-
Status: IsIncident(type) ? EventStatus.Analysing : EventStatus.Planned,
118+
Status: IsIncident(type) ? EventStatus.Detected : EventStatus.Planned,
119119
Histories: new Set(),
120120
RegionServices: new Set(),
121121
Description: event.description
@@ -154,7 +154,8 @@ export function TransformerV2({ Components, Events }: { Components: StatusEntity
154154

155155
case StatusEnum.Analyzing:
156156
case StatusEnum.Analysing:
157-
return EventStatus.Analysing;
157+
case StatusEnum.Detected:
158+
return EventStatus.Detected;
158159
case StatusEnum.Reopened:
159160
return EventStatus.Reopened;
160161
case StatusEnum.Fixing:

0 commit comments

Comments
 (0)