Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #403

Merged
merged 24 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ba4a405
New User Journey (#388)
wayangalihpratama Jan 20, 2025
4d13ed8
Feature/395 user journey update state management (#396)
wayangalihpratama Jan 23, 2025
cda29fb
[#395] Merge branch 'main' into develop
wayangalihpratama Jan 23, 2025
828829c
[#398] Fix react duplicate keys warning
wayangalihpratama Jan 23, 2025
9f72ffa
[#398] Update segment answer when scenario driver changed
wayangalihpratama Jan 24, 2025
47a8c2a
[#398] Create new dashboard data value
wayangalihpratama Jan 24, 2025
65dcef3
[#398] Try to recalculate the income drivers on ScenarioModelingForm
wayangalihpratama Jan 24, 2025
b31814d
[#399] Update step1 wording
wayangalihpratama Jan 24, 2025
58ab16a
[#399] Enable show label in ChartCalculatedHhIncome
wayangalihpratama Jan 24, 2025
3994b6e
[#399] Enable export functionality
wayangalihpratama Jan 24, 2025
68d32c8
[#399] Create ExploreDataFromOtherStudies table
wayangalihpratama Jan 24, 2025
ebcddc7
[#399] Rotate chart xAxis label
wayangalihpratama Jan 24, 2025
21ea360
[#399] Enable show label and export btn in Understand income gap page
wayangalihpratama Jan 24, 2025
b652088
[#399] Create ExploreIncomeLevelsForDifferentCommodities chart
wayangalihpratama Jan 24, 2025
d7b892d
[#399] Update assess impact page
wayangalihpratama Jan 25, 2025
c6390bc
[#399] Update adjust income target modal step
wayangalihpratama Jan 25, 2025
7f6c638
[#399] Merge branch 'main' into develop
wayangalihpratama Jan 25, 2025
be55dcd
[#399] Fix case loading & default segment selected
wayangalihpratama Jan 27, 2025
2f61c1e
[#399] Don't sum parent value onLoad if have value
wayangalihpratama Jan 27, 2025
012cdba
[#399] Fix visual content on small screen
wayangalihpratama Jan 27, 2025
d8249b4
[#399] Merge branch 'main' into develop
wayangalihpratama Jan 27, 2025
304a2f0
Merge branch 'main' into develop
wayangalihpratama Jan 27, 2025
fe69c85
[#399] Add arrow into chart carousel
wayangalihpratama Jan 27, 2025
49e9b5f
[#399] Fix case sidebar overflow height
wayangalihpratama Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions frontend/src/pages/cases/layout/CaseWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@ const CaseSidebar = ({ step, caseId }) => {
)?.value;

return (
<Steps
direction="vertical"
items={sidebarItems}
className="case-step-wrapper"
onChange={(val) =>
navigate(`/case/${caseId}/${stepPath[`step${val + 1}`].label}`)
}
current={findStepPathValue ? findStepPathValue - 1 : 1}
/>
<div className="case-step-container">
<Steps
direction="vertical"
items={sidebarItems}
className="case-step-wrapper"
onChange={(val) =>
navigate(`/case/${caseId}/${stepPath[`step${val + 1}`].label}`)
}
current={findStepPathValue ? findStepPathValue - 1 : 1}
/>
</div>
);
};

Expand Down
98 changes: 50 additions & 48 deletions frontend/src/pages/cases/layout/case-wrapper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,71 +11,73 @@
z-index: 2;
overflow: auto;

.case-step-wrapper {
.case-step-container {
min-height: 100vh;
padding-bottom: 75px !important;
padding-bottom: 75px;

.ant-steps-item {
// not active
.ant-steps-item-tail::after {
border: 1px solid #e1e0da;
}
.case-step-wrapper {
.ant-steps-item {
// not active
.ant-steps-item-tail::after {
border: 1px solid #e1e0da;
}

.ant-steps-item-icon {
border: 1px solid #e3e3e3;
.ant-steps-item-icon {
border: 1px solid #e3e3e3;

.ant-steps-icon {
color: #979797;
text-align: center;
font-family: "RocGrotesk";
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: 24px;
}
}

.ant-steps-icon {
color: #979797;
text-align: center;
.ant-steps-item-title {
font-family: "RocGrotesk";
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: 24px;
}
}

.ant-steps-item-title {
font-family: "RocGrotesk";
font-size: 14px;
font-style: normal;
font-weight: 700;
line-height: 24px;
}
.ant-steps-item-description {
color: #475467;
font-family: "TabletGothic";
font-size: 13px;
font-style: normal;
font-weight: 400;
line-height: 24px;
}

// when active
&.ant-steps-item-active {
.ant-steps-item-tail::after {
border: 1px solid $primary-color;
.ant-steps-item-description {
color: #475467;
font-family: "TabletGothic";
font-size: 13px;
font-style: normal;
font-weight: 400;
line-height: 24px;
}

.ant-steps-item-icon {
border: 1px solid $primary-color;
box-shadow: 0 0 2px 4px rgba(203, 244, 220, 1);
background: #eaf2f2;
// when active
&.ant-steps-item-active {
.ant-steps-item-tail::after {
border: 1px solid $primary-color;
}

.ant-steps-icon {
color: $primary-color;
.ant-steps-item-icon {
border: 1px solid $primary-color;
box-shadow: 0 0 2px 4px rgba(203, 244, 220, 1);
background: #eaf2f2;

.ant-steps-icon {
color: $primary-color;
}
}
}
}

// when finished
&.ant-steps-item-finish {
.ant-steps-item-icon {
border: 1px solid #48d985;
background: #48d985;
// when finished
&.ant-steps-item-finish {
.ant-steps-item-icon {
border: 1px solid #48d985;
background: #48d985;

.ant-steps-icon {
color: #fff;
.ant-steps-icon {
color: #fff;
}
}
}
}
Expand Down
33 changes: 30 additions & 3 deletions frontend/src/pages/cases/steps/AssessImpactMitigationStrategies.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import React, { useCallback, useEffect, useState, useMemo } from "react";
import React, {
useCallback,
useEffect,
useState,
useMemo,
useRef,
} from "react";
import { useNavigate } from "react-router-dom";
import {
stepPath,
Expand Down Expand Up @@ -36,6 +42,7 @@ import {
determineDecimalRound,
} from "../../../lib";
import { thousandFormatter } from "../../../components/chart/options/common";
import { LeftOutlined, RightOutlined } from "@ant-design/icons";

/**
* STEP 4
Expand All @@ -57,6 +64,8 @@ const AssessImpactMitigationStrategies = ({
const [percentageSensitivity, setPercentageSensitivity] = useState(true);
const [adjustedValues, setAdjustedValues] = useState({});

const carouselChartRef = useRef(null);

const [messageApi, contextHolder] = message.useMessage();

// initial load adjusted income target
Expand Down Expand Up @@ -433,8 +442,26 @@ const AssessImpactMitigationStrategies = ({
</Card>
</Col>
{/* Carousel */}
<Col span={24}>
<Carousel autoplay>
<Col span={24} className="carousel-container">
<div className="carousel-arrows-wrapper">
<div className="arrow-left">
<Button
className="button-arrow-carousel"
type="link"
icon={<LeftOutlined />}
onClick={() => carouselChartRef?.current?.prev()}
/>
</div>
<div className="arrow-right">
<Button
className="button-arrow-carousel"
type="link"
icon={<RightOutlined />}
onClick={() => carouselChartRef?.current?.next()}
/>
</div>
</div>
<Carousel autoplay ref={carouselChartRef}>
<div>
<ChartBiggestImpactOnIncome />
</div>
Expand Down
21 changes: 21 additions & 0 deletions frontend/src/pages/cases/steps/steps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,27 @@
}

#assess-impact-mitigation-strategies {
.carousel-container {
width: 100%;
position: relative;

.carousel-arrows-wrapper {
position: absolute;
z-index: 2;
height: 100%;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: -12px;

.button-arrow-carousel {
border-radius: 22px;
background: #01625f;
color: #fff;
}
}
}
.ant-carousel {
.slick-dots {
li {
Expand Down
Loading