Admin package summary sheet

This commit is contained in:
Codex Agent
2026-01-06 11:57:30 +01:00
parent eba212a056
commit a796973861
13 changed files with 320 additions and 92 deletions

View File

@@ -25,6 +25,8 @@ export default function WelcomeEventPage() {
const hasActivePackage =
Boolean(overview?.activePackage) || Boolean(overview?.packages?.some((pkg) => pkg.active));
const remainingEvents = overview?.activePackage?.remaining_events ?? null;
const shouldGoBilling = !hasActivePackage || (remainingEvents !== null && remainingEvents <= 0);
const handleSkip = React.useCallback(() => {
void trackOnboarding('dismissed');
navigate(ADMIN_HOME_PATH);
@@ -87,7 +89,10 @@ export default function WelcomeEventPage() {
"You're switching to the event manager. Assign tasks, invite members, and test the gallery. You can always return to the welcome journey.",
)}
</Text>
<CTAButton label={t('eventSetup.cta.button', 'Create event')} onPress={() => navigate(adminPath('/mobile/events/new'))} />
<CTAButton
label={shouldGoBilling ? t('eventSetup.cta.billing', 'Open billing') : t('eventSetup.cta.button', 'Create event')}
onPress={() => navigate(shouldGoBilling ? adminPath('/mobile/billing#packages') : adminPath('/mobile/events/new'))}
/>
</MobileCard>
<YStack space="$2">

View File

@@ -30,6 +30,8 @@ export default function WelcomeLandingPage() {
const hasActivePackage =
Boolean(packagesData?.activePackage) || Boolean(packagesData?.packages?.some((pkg) => pkg.active));
const remainingEvents = packagesData?.activePackage?.remaining_events ?? null;
const shouldGoBilling = !hasActivePackage || (remainingEvents !== null && remainingEvents <= 0);
const handleSkip = React.useCallback(() => {
void trackOnboarding('dismissed');
navigate(ADMIN_HOME_PATH);
@@ -60,11 +62,11 @@ export default function WelcomeLandingPage() {
<XStack space="$2" flexWrap="wrap">
<CTAButton
label={
hasActivePackage
? t('ctaList.createEvent.button', 'Go to event manager')
: t('hero.primary.button', 'Explore packages')
shouldGoBilling
? t('hero.primary.billing', 'Open billing')
: t('ctaList.createEvent.button', 'Go to event manager')
}
onPress={() => navigate(hasActivePackage ? ADMIN_WELCOME_EVENT_PATH : ADMIN_WELCOME_PACKAGES_PATH)}
onPress={() => navigate(shouldGoBilling ? adminPath('/mobile/billing#packages') : ADMIN_WELCOME_EVENT_PATH)}
fullWidth={false}
/>
{hasEvents ? (