Skip to content

Commit

Permalink
Disable priceType dropdown in custom-projects preview page
Browse files Browse the repository at this point in the history
  • Loading branch information
atrincas authored and agnlez committed Dec 17, 2024
1 parent dc7551c commit 59c80b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const PROJECT_PARAMETERS = [
key: FILTER_KEYS[3],
label: "Project size",
className: "w-[125px]",
disabled: false,
options: [
{
label: COST_TYPE_SELECTOR.NPV,
Expand All @@ -41,6 +42,7 @@ export const PROJECT_PARAMETERS = [
key: FILTER_KEYS[2],
label: "Carbon pricing type",
className: "w-[195px]",
disabled: true,
options: [
{
label: PROJECT_PRICE_TYPE.MARKET_PRICE,
Expand Down Expand Up @@ -81,19 +83,14 @@ export default function CustomProjectParameters() {
onValueChange={(v) => {
handleParameters(v, parameter.key);
}}
disabled={parameter.disabled}
>
<SelectTrigger className={parameter.className}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{parameter.options.map((option) => (
<SelectItem
key={option.value}
value={option.value}
disabled={
option.value === PROJECT_PRICE_TYPE.OPEN_BREAK_EVEN_PRICE
}
>
<SelectItem key={option.value} value={option.value}>
{option.label}
</SelectItem>
))}
Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/projects/url-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const filtersSchema = z.object({
});

export const INITIAL_FILTERS_STATE: z.infer<typeof filtersSchema> = {
priceType: PROJECT_PRICE_TYPE.MARKET_PRICE,
priceType: PROJECT_PRICE_TYPE.OPEN_BREAK_EVEN_PRICE,
costRangeSelector: COST_TYPE_SELECTOR.NPV,
};

Expand Down

0 comments on commit 59c80b7

Please sign in to comment.