Skip to content

Commit

Permalink
[UI] updating pricing list page ui based on workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ankita Sahu <[email protected]>
  • Loading branch information
SAHU-01 committed Oct 19, 2024
1 parent f07edcb commit 13bcf68
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sections/Pricing/comparison.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styled from "styled-components";
import { details } from "./data";
import details from "./generateDetails";
import { Container } from "../../reusecore/Layout";
// import FeatureDetails from "./collapsible-details";
import FeatureDetails from "../../components/PlanCard/collapsible-details";
Expand Down
48 changes: 48 additions & 0 deletions src/sections/Pricing/generateDetails.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from "react";
import { GiCheckMark } from "@react-icons/all-files/gi/GiCheckMark";
import { MdClose } from "@react-icons/all-files/md/MdClose";
import pricingData from "./pricing_data.json";
import Configuration from "./icons/configuration.svg";
import Lifecycle from "./icons/lifecycle.svg";
import Kanvas from "./icons/kanvas-icon.svg";
import Perforamance from "./icons/perf.svg";
import Collab from "./icons/collaboration.svg";
import Identity from "./icons/identity.svg";
import Notification from "./icons/notification.svg";
import Support from "./icons/support.svg";

function generateDetails(data) {
const categories = [
{ id: 0, name: "Configuration Management", icon: Configuration },
{ id: 1, name: "Lifecycle Management", icon: Lifecycle },
{ id: 2, name: "Kanvas", icon: Kanvas },
{ id: 3, name: "Performance Management", icon: Perforamance },
{ id: 4, name: "Collaboration", icon: Collab },
{ id: 5, name: "Identity & Access Management", icon: Identity },
{ id: 6, name: "Incident Management", icon: Notification },
{ id: 7, name: "Support and Deployment", icon: Support },
];

return categories.map(category => {
const features = data
.filter(item => item.entire_row.Category === category.name)
.map(item => ({
feature: item.entire_row.Function,
description: item.entire_row.Feature,
free: item.entire_row["Subscription Tier"] === "Free" ? <GiCheckMark className="yes-icon" /> : <MdClose className="no-icon" />,
team: item.entire_row["Subscription Tier"] === "Team" || item.entire_row["Subscription Tier"] === "Free" ? <GiCheckMark className="yes-icon" /> : <MdClose className="no-icon" />,
enterprise: <GiCheckMark className="yes-icon" />,
}));

return {
id: category.id,
category: category.name,
icon: category.icon,
features: features,
};
});
}

const details = generateDetails(pricingData);

export default details;

0 comments on commit 13bcf68

Please sign in to comment.