111 lines
5.3 KiB
Swift
111 lines
5.3 KiB
Swift
//
|
|
// PricingFeature.swift
|
|
// AlloVoisinsSwiftUI
|
|
//
|
|
// Created by Victor on 22/01/2025.
|
|
//
|
|
|
|
// Représente une fonctionnalité individuelle
|
|
struct PricingFeature {
|
|
let description: String
|
|
let value: FeatureValue
|
|
|
|
enum FeatureValue {
|
|
case boolean(Bool)
|
|
case text(String)
|
|
}
|
|
}
|
|
|
|
// Représente une section de fonctionnalités
|
|
struct PricingFeatureSection {
|
|
let title: String
|
|
let subtitle: String?
|
|
let features: [PricingFeature]
|
|
}
|
|
|
|
// Extension de Pricing pour gérer les sections de fonctionnalités
|
|
extension Pricing {
|
|
var featureSections: [PricingFeatureSection] {
|
|
switch self {
|
|
case .standard:
|
|
// MARK: - Standard
|
|
return [
|
|
PricingFeatureSection(
|
|
title: "Proposer mes services",
|
|
subtitle: "Répondez aux demandes dans votre périmètre d'intervention",
|
|
features: [
|
|
PricingFeature(description: "Nombre de réponses", value: .text("jusqu'à 4 / mois")),
|
|
PricingFeature(description: "Demandes ayant déjà reçu 3 réponses", value: .boolean(false)),
|
|
PricingFeature(description: "Demandes réservées aux abonnés Premier", value: .boolean(false))
|
|
]
|
|
),
|
|
PricingFeatureSection(
|
|
title: "Gérer la visibilité de mon profil",
|
|
subtitle: nil,
|
|
features: [
|
|
PricingFeature(description: "Possibilité d'afficher mon numéro de téléphone", value: .boolean(false)),
|
|
PricingFeature(description: "Affichage des photos de mes réalisations", value: .text("3")),
|
|
PricingFeature(description: "Collecte d'avis auprès de mes anciens contacts", value: .boolean(false)),
|
|
PricingFeature(description: "Référencement prioritaire sur Google", value: .boolean(false))
|
|
]
|
|
)
|
|
]
|
|
case .premier:
|
|
// MARK: - Premier
|
|
return [
|
|
PricingFeatureSection(
|
|
title: "Proposer mes services",
|
|
subtitle: "Répondez aux demandes dans votre périmètre d'intervention",
|
|
features: [
|
|
PricingFeature(description: "Nombre de réponses", value: .text("illimité")),
|
|
PricingFeature(description: "Demandes ayant déjà reçu 3 réponses", value: .boolean(true)),
|
|
PricingFeature(description: "Demandes réservées aux abonnés Premier", value: .boolean(true))
|
|
]
|
|
),
|
|
PricingFeatureSection(
|
|
title: "Gérer la visibilité de mon profil",
|
|
subtitle: nil,
|
|
features: [
|
|
PricingFeature(description: "Possibilité d'afficher mon numéro de téléphone", value: .boolean(true)),
|
|
PricingFeature(description: "Affichage des photos de mes réalisations", value: .text("50")),
|
|
PricingFeature(description: "Collecte d'avis auprès de mes anciens contacts", value: .boolean(true)),
|
|
PricingFeature(description: "Référencement prioritaire sur Google", value: .boolean(true))
|
|
]
|
|
)
|
|
]
|
|
case .premierPro:
|
|
// MARK: - Premier Pro
|
|
return [
|
|
PricingFeatureSection(
|
|
title: "Développer ma clientèle",
|
|
subtitle: "Répondez aux demandes dans votre périmètre d'intervention",
|
|
features: [
|
|
PricingFeature(description: "Nombre de réponses", value: .text("illimité")),
|
|
PricingFeature(description: "Demandes ayant déjà reçu 3 réponses", value: .boolean(true)),
|
|
PricingFeature(description: "Demandes réservées aux Pros", value: .boolean(true))
|
|
]
|
|
),
|
|
PricingFeatureSection(
|
|
title: "Augmenter ma visibilité",
|
|
subtitle: nil,
|
|
features: [
|
|
PricingFeature(description: "Référencement prioritaire sur Google", value: .boolean(true)),
|
|
PricingFeature(description: "Affichage de mon numéro de téléphone\nsur mon profil", value: .boolean(true)),
|
|
PricingFeature(description: "Collecte d'avis auprès de mes anciens\nclients (hors AlloVoisins)", value: .boolean(true)),
|
|
PricingFeature(description: "Cartes de visite et prospectus\npersonnalisés", value: .boolean(true))
|
|
]
|
|
),
|
|
PricingFeatureSection(
|
|
title: "Gagner du temps",
|
|
subtitle: nil,
|
|
features: [
|
|
PricingFeature(description: "Logiciel de facturation intégré", value: .boolean(true)),
|
|
PricingFeature(description: "Signature électronique des documents", value: .boolean(true)),
|
|
PricingFeature(description: "Relance client automatisée", value: .boolean(true))
|
|
]
|
|
)
|
|
]
|
|
}
|
|
}
|
|
}
|