-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a163829
commit 46318b8
Showing
5 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...ack-web-core/components/framework/properties/general.AutoPromotionPropertyType/Display.js
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import {Space, Typography} from "antd"; | ||
import ValidationStamp from "@components/validationStamps/ValidationStamp"; | ||
import PromotionLevel from "@components/promotionLevels/PromotionLevel"; | ||
|
||
export default function Display({property}) { | ||
return ( | ||
<> | ||
<Space direction="vertical"> | ||
{ | ||
property.value.validationStamps.length > 0 && | ||
<> | ||
<Typography.Text strong>Validations</Typography.Text> | ||
<Space> | ||
{ | ||
property.value.validationStamps.map(vs => ( | ||
<> | ||
<ValidationStamp | ||
key={vs.id} | ||
validationStamp={vs} | ||
/> | ||
</> | ||
)) | ||
} | ||
</Space> | ||
</> | ||
} | ||
{ | ||
property.value.promotionLevels.length > 0 && | ||
<> | ||
<Typography.Text strong>Promotions</Typography.Text> | ||
<Space> | ||
{ | ||
property.value.promotionLevels.map(pl => ( | ||
<> | ||
<PromotionLevel | ||
key={pl.id} | ||
promotionLevel={pl} | ||
displayText={true} | ||
/> | ||
</> | ||
)) | ||
} | ||
</Space> | ||
</> | ||
} | ||
</Space> | ||
</> | ||
) | ||
} |
5 changes: 5 additions & 0 deletions
5
ontrack-web-core/components/framework/properties/general.AutoPromotionPropertyType/Icon.js
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {FaBolt} from "react-icons/fa"; | ||
|
||
export default function Icon() { | ||
return <FaBolt/> | ||
} |
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
24 changes: 24 additions & 0 deletions
24
ontrack-web-core/components/promotionLevels/PromotionLevelViewDrawer.js
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import InfoViewDrawer from "@components/common/InfoViewDrawer"; | ||
import PropertiesSection from "@components/framework/properties/PropertiesSection"; | ||
import InformationSection from "@components/framework/information/InformationSection"; | ||
|
||
export default function PromotionLevelViewDrawer({promotionLevel, loading}) { | ||
return ( | ||
<> | ||
<InfoViewDrawer | ||
title="Promotion level information" | ||
tooltip="Displays information about the promotion level" | ||
width="33%" | ||
> | ||
<PropertiesSection | ||
entity={promotionLevel} | ||
loading={loading} | ||
/> | ||
<InformationSection | ||
entity={promotionLevel} | ||
loading={loading} | ||
/> | ||
</InfoViewDrawer> | ||
</> | ||
) | ||
} |
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