-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from green-ecolution/feature/update-backend-c…
…lient-3b372d3 Update Backend API Client
- Loading branch information
Showing
7 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import { EntitiesTreeClusterWateringStatus } from "@green-ecolution/backend-client"; | ||
import { EntitiesWateringStatus } from "@green-ecolution/backend-client"; | ||
|
||
const WateringStatusProperties = { | ||
[EntitiesTreeClusterWateringStatus.TreeClusterWateringStatusUnknown]: { | ||
[EntitiesWateringStatus.WateringStatusUnknown]: { | ||
color: 'dark-400', | ||
label: 'Unbekannt', | ||
description: 'Der Bewässerungsstatus ist unbekannt.', | ||
}, | ||
[EntitiesTreeClusterWateringStatus.TreeClusterWateringStatusBad]: { | ||
[EntitiesWateringStatus.WateringStatusBad]: { | ||
color: 'red', | ||
label: 'Sehr trocken', | ||
description: 'Die Bäume benötigen dringend Wasser.', | ||
}, | ||
[EntitiesTreeClusterWateringStatus.TreeClusterWateringStatusModerate]: { | ||
[EntitiesWateringStatus.WateringStatusModerate]: { | ||
color: 'yellow', | ||
label: 'Leicht trocken', | ||
description: 'Die Bäume sind leicht trocken und benötigen etwas Wasser.', | ||
}, | ||
[EntitiesTreeClusterWateringStatus.TreeClusterWateringStatusGood]: { | ||
[EntitiesWateringStatus.WateringStatusGood]: { | ||
color: 'green-light', | ||
label: 'In Ordnung', | ||
description: 'Die Bewässerung ist ausreichend, keine Maßnahmen erforderlich.', | ||
}, | ||
} as const; | ||
|
||
type WateringStatusDetails = typeof WateringStatusProperties[EntitiesTreeClusterWateringStatus]; | ||
type WateringStatusDetails = typeof WateringStatusProperties[EntitiesWateringStatus]; | ||
|
||
export const getWateringStatusDetails = (status: EntitiesTreeClusterWateringStatus): WateringStatusDetails => { | ||
export const getWateringStatusDetails = (status: EntitiesWateringStatus): WateringStatusDetails => { | ||
return WateringStatusProperties[status]; | ||
}; |