Skip to content

Commit

Permalink
chore: implement review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepehr-Sobhani committed Jul 21, 2023
1 parent d3e164d commit 728f1fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/data/jsonSchemaForm/emissionIntensityUiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const emissionIntensityReportingRequirementUiSchema = {
"ui:tooltip": {
text: emissionsIntentityTooltips.adjustedEmissionsIntensityPerformance,
},
"ui:classNames": "adjustable-calculated-value-widget",
},
calculatedEiPerformance: {
isPercentage: true,
Expand Down
3 changes: 0 additions & 3 deletions app/data/jsonSchemaForm/projectMilestoneUiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const projectMilestoneUiSchema = {
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedGrossAmount",
"ui:classNames": "adjustable-calculated-value-widget",
},
adjustedNetAmount: {
"ui:widget": "AdjustableCalculatedValueWidget",
Expand All @@ -100,7 +99,6 @@ const projectMilestoneUiSchema = {
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedNetAmount",
"ui:classNames": "adjustable-calculated-value-widget",
},
adjustedHoldbackAmount: {
"ui:widget": "AdjustableCalculatedValueWidget",
Expand All @@ -110,7 +108,6 @@ const projectMilestoneUiSchema = {
isMoney: true,
hideOptional: true,
calculatedValueFormContextProperty: "calculatedHoldbackAmount",
"ui:classNames": "adjustable-calculated-value-widget",
},
dateSentToCsnr: {
"ui:widget": "DateWidget",
Expand Down
8 changes: 7 additions & 1 deletion app/lib/theme/ReadOnlyFieldTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ const FieldTemplate: React.FC<FieldTemplateProps> = ({
}) => {
return (
<div>
<div className={`${uiSchema["ui:classNames"] ?? "definition-container"}`}>
<div
className={
uiSchema.calculatedValueFormContextProperty
? "adjustable-calculated-value-widget"
: "definition-container"
}
>
{displayLabel && (
<FieldLabel
label={label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const ReadOnlyAdjustableCalculatedValueWidget: React.FC<WidgetProps> = (
dt {
margin: 0 1em 0 0;
}
dd {
margin-bottom: 0; // Override default margin-bottom for styling consistency
}
`}</style>
</div>
)}
Expand Down

0 comments on commit 728f1fc

Please sign in to comment.