diff --git a/examples/example_pro/src/FirestoreApp/App.tsx b/examples/example_pro/src/FirestoreApp/App.tsx index 16d5e6275..99a8b26e4 100644 --- a/examples/example_pro/src/FirestoreApp/App.tsx +++ b/examples/example_pro/src/FirestoreApp/App.tsx @@ -305,6 +305,7 @@ export function App() { `https://console.firebase.google.com/project/${firebaseApp.options.projectId}/firestore/data/${entity.path}/${entity.id}`} diff --git a/packages/collection_editor/src/ui/HomePageEditorCollectionAction.tsx b/packages/collection_editor/src/ui/HomePageEditorCollectionAction.tsx index 5e5eb124f..791eea894 100644 --- a/packages/collection_editor/src/ui/HomePageEditorCollectionAction.tsx +++ b/packages/collection_editor/src/ui/HomePageEditorCollectionAction.tsx @@ -1,5 +1,5 @@ import { - DeleteConfirmationDialog, + ConfirmationDialog, PluginHomePageActionsProps, useAuthController, useSnackbarController @@ -76,7 +76,7 @@ export function HomePageEditorCollectionAction({ } - setDeleteRequested(false)} diff --git a/packages/collection_editor/src/ui/collection_editor/PropertyEditView.tsx b/packages/collection_editor/src/ui/collection_editor/PropertyEditView.tsx index 667133ef1..781ed26cd 100644 --- a/packages/collection_editor/src/ui/collection_editor/PropertyEditView.tsx +++ b/packages/collection_editor/src/ui/collection_editor/PropertyEditView.tsx @@ -4,7 +4,7 @@ import equal from "react-fast-compare" import { Formex, FormexController, getIn, useCreateFormex } from "@firecms/formex"; import { DEFAULT_FIELD_CONFIGS, - DeleteConfirmationDialog, + ConfirmationDialog, getFieldConfig, getFieldId, isPropertyBuilder, @@ -583,11 +583,11 @@ function PropertyEditFormFields({ {onDelete && - onDelete(values?.id, propertyNamespace)} - onCancel={() => setDeleteDialogOpen(false)} - title={
Delete this property?
} - body={ + onDelete(values?.id, propertyNamespace)} + onCancel={() => setDeleteDialogOpen(false)} + title={
Delete this property?
} + body={
This will not delete any data, only modify the collection.
diff --git a/packages/collection_editor/src/ui/collection_editor/SubcollectionsEditTab.tsx b/packages/collection_editor/src/ui/collection_editor/SubcollectionsEditTab.tsx index 7668e8322..3da7fb42c 100644 --- a/packages/collection_editor/src/ui/collection_editor/SubcollectionsEditTab.tsx +++ b/packages/collection_editor/src/ui/collection_editor/SubcollectionsEditTab.tsx @@ -1,6 +1,6 @@ import React from "react"; import { - DeleteConfirmationDialog, + ConfirmationDialog, EntityCollection, EntityCustomView, resolveEntityView, @@ -211,8 +211,8 @@ export function SubcollectionsEditTab({
{subcollectionToDelete && - { + { const props = { id: subcollectionToDelete, parentCollectionIds: [...(parentCollectionIds ?? []), collection.id] @@ -223,20 +223,20 @@ export function SubcollectionsEditTab({ setSubcollections(subcollections?.filter(e => e.id !== subcollectionToDelete)) }); }} - onCancel={() => setSubcollectionToDelete(undefined)} - title={<>Delete this subcollection?} - body={<> This will not + onCancel={() => setSubcollectionToDelete(undefined)} + title={<>Delete this subcollection?} + body={<> This will not delete any data, only the collection in the CMS}/>} {viewToDelete && - { + { setFieldValue("entityViews", values.entityViews?.filter(e => e !== viewToDelete)); setViewToDelete(undefined); }} - onCancel={() => setViewToDelete(undefined)} - title={<>Remove this view?} - body={<>This will not + onCancel={() => setViewToDelete(undefined)} + title={<>Remove this view?} + body={<>This will not delete any data, only the view in the CMS}/>} diff --git a/packages/firecms_cloud/src/components/settings/common.tsx b/packages/firecms_cloud/src/components/settings/common.tsx index e1e4a5d58..7b3682174 100644 --- a/packages/firecms_cloud/src/components/settings/common.tsx +++ b/packages/firecms_cloud/src/components/settings/common.tsx @@ -1,10 +1,14 @@ -import { ProductPrice, Subscription, SubscriptionStatus } from "../../types/subscriptions"; +import { ProductPrice, SubscriptionStatus } from "../../types/subscriptions"; import { ProjectSubscriptionPlan } from "../../types/projects"; export function getPriceString(price: ProductPrice) { if (price.billing_scheme === "tiered") { - return "Tiered pricing" + const firstFlatPrice = price.tiers.find(p => p.flat_amount); + if (firstFlatPrice) + return "Starting at " + formatPrice(firstFlatPrice.flat_amount as number, price.currency); + else + return "Billing in " + price.currency; } return formatPrice(price.unit_amount, price.currency) + " user/" + price.interval; diff --git a/packages/firecms_cloud/src/components/subscriptions/PlansComparison.tsx b/packages/firecms_cloud/src/components/subscriptions/PlansComparison.tsx index 5e3711f51..e43924098 100644 --- a/packages/firecms_cloud/src/components/subscriptions/PlansComparison.tsx +++ b/packages/firecms_cloud/src/components/subscriptions/PlansComparison.tsx @@ -14,7 +14,7 @@ export function PlansComparisonDialog({ const navigationController = useNavigationController(); const navigate = useNavigate(); - const goToSettings = () => { + const goToSubscriptions = () => { onClose(); navigate(navigationController.basePath + "/settings"); } diff --git a/packages/firecms_cloud/src/components/subscriptions/SubscriptionPriceSelect.tsx b/packages/firecms_cloud/src/components/subscriptions/SubscriptionPriceSelect.tsx index 1d6016d6d..970a8ef2a 100644 --- a/packages/firecms_cloud/src/components/subscriptions/SubscriptionPriceSelect.tsx +++ b/packages/firecms_cloud/src/components/subscriptions/SubscriptionPriceSelect.tsx @@ -7,15 +7,18 @@ export interface SubscriptionPriceSelectParams { selectedPrice?: ProductPrice; setSelectedPrice: (price?: ProductPrice) => void; largePriceLabel: boolean; + fullWidth?: boolean; } export function SubscriptionPriceSelect({ productPrices, setSelectedPrice, largePriceLabel, - selectedPrice + selectedPrice, + fullWidth = true }: SubscriptionPriceSelectParams) { + return (productPrices ?? [])?.length > 1 ? <>