Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #6
89 lines
2.6 KiB
Rust
89 lines
2.6 KiB
Rust
use dioxus::prelude::*;
|
|
|
|
use crate::app::Route;
|
|
use crate::components::{PageHeader, PricingCard};
|
|
use crate::models::PricingPlan;
|
|
|
|
/// Organization pricing page displaying three plan tiers.
|
|
///
|
|
/// Clicking "Get Started" on any plan navigates to the
|
|
/// organization dashboard.
|
|
#[component]
|
|
pub fn OrgPricingPage() -> Element {
|
|
let navigator = use_navigator();
|
|
let plans = mock_plans();
|
|
|
|
rsx! {
|
|
section { class: "pricing-page",
|
|
PageHeader {
|
|
title: "Pricing".to_string(),
|
|
subtitle: "Choose the plan that fits your organization".to_string(),
|
|
}
|
|
div { class: "pricing-grid",
|
|
for plan in plans {
|
|
PricingCard {
|
|
key: "{plan.id}",
|
|
plan,
|
|
on_select: move |_| {
|
|
navigator.push(Route::OrgDashboardPage {});
|
|
},
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// Returns mock pricing plans.
|
|
fn mock_plans() -> Vec<PricingPlan> {
|
|
vec![
|
|
PricingPlan {
|
|
id: "starter".into(),
|
|
name: "Starter".into(),
|
|
price_eur: 49,
|
|
features: vec![
|
|
"Up to 5 users".into(),
|
|
"1 LLM provider".into(),
|
|
"100K tokens/month".into(),
|
|
"Community support".into(),
|
|
"Basic analytics".into(),
|
|
],
|
|
highlighted: false,
|
|
max_seats: Some(5),
|
|
},
|
|
PricingPlan {
|
|
id: "team".into(),
|
|
name: "Team".into(),
|
|
price_eur: 199,
|
|
features: vec![
|
|
"Up to 25 users".into(),
|
|
"All LLM providers".into(),
|
|
"1M tokens/month".into(),
|
|
"Priority support".into(),
|
|
"Advanced analytics".into(),
|
|
"Custom MCP tools".into(),
|
|
"SSO integration".into(),
|
|
],
|
|
highlighted: true,
|
|
max_seats: Some(25),
|
|
},
|
|
PricingPlan {
|
|
id: "enterprise".into(),
|
|
name: "Enterprise".into(),
|
|
price_eur: 499,
|
|
features: vec![
|
|
"Unlimited users".into(),
|
|
"All LLM providers".into(),
|
|
"Unlimited tokens".into(),
|
|
"Dedicated support".into(),
|
|
"Full observability".into(),
|
|
"Custom integrations".into(),
|
|
"SLA guarantee".into(),
|
|
"On-premise deployment".into(),
|
|
],
|
|
highlighted: false,
|
|
max_seats: None,
|
|
},
|
|
]
|
|
}
|