The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix(front): show Select dropdowns above modals and fix the rollover credits label (#24137)
Félix Malfait13cab28543a1
diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsxindex 0157e2a7bca..22ce9ffb9a6 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceBillingContent.tsx@@ -237,7 +237,7 @@ export const SettingsAdminWorkspaceBillingContent = ({? [{Icon: IconCoins,- label: t`Rollover credits`,+ label: t`Granted credits`,value: formatCredits(usage.rolloverCredits),},]diff --git a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsxindex 2c2c467f405..7adf6b777bd 100644--- a/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx+++ b/packages/twenty-front/src/modules/settings/admin-panel/components/SettingsAdminWorkspaceCreditGrantModal.tsx@@ -184,6 +184,7 @@ export const SettingsAdminWorkspaceCreditGrantModal = ({label: t(CREDIT_GRANT_TYPE_LABELS[grantType]),}))}onChange={setType}+ isDropdownInModalfullWidth/>diff --git a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsxindex 2bcad7fd889..aecec380ba8 100644--- a/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx+++ b/packages/twenty-front/src/modules/settings/billing/components/SettingsBillingCreditsSection.tsx@@ -183,7 +183,9 @@ export const SettingsBillingCreditsSection = ({? MIN_VISIBLE_EMPTY_CREDIT_PROGRESS_PERCENTAGE: clampedRemainingCreditsPercentage;- const hasRolloverCredits = rolloverCredits > 0;+ // rolloverCredits sums every active grant, not just the rolled-over ones+ const extraCredits = rolloverCredits;+ const hasExtraCredits = extraCredits > 0;const usedCreditsDisplay = formatNumber(usedCredits, { decimals: 2 });const grantedCreditsDisplay = formatNumber(displayedGrantedCredits, {@@ -192,7 +194,7 @@ export const SettingsBillingCreditsSection = ({const totalGrantedCreditsDisplay = formatNumber(totalGrantedCredits, {decimals: 2,});- const rolloverCreditsDisplay = formatNumber(rolloverCredits, {+ const extraCreditsDisplay = formatNumber(extraCredits, {decimals: 2,});const rolloverCapDisplay = formatNumber(displayedGrantedCredits * 2, {@@ -269,12 +271,12 @@ export const SettingsBillingCreditsSection = ({</StyledMetricValue>{t`credits available during the trial period`}</StyledRolloverText>- ) : hasRolloverCredits ? (+ ) : hasExtraCredits ? (<StyledRolloverText><StyledMetricValue>{totalGrantedCreditsDisplay}</StyledMetricValue>- {t`credits available (Including ${rolloverCreditsDisplay} from rollover)`}+ {t`credits available (including ${extraCreditsDisplay} on top of your plan)`}</StyledRolloverText>) : (<StyledRolloverText>diff --git a/packages/twenty-front/src/modules/ui/input/components/Select.tsx b/packages/twenty-front/src/modules/ui/input/components/Select.tsxindex 04d95249f66..1a267403d7b 100644--- a/packages/twenty-front/src/modules/ui/input/components/Select.tsx+++ b/packages/twenty-front/src/modules/ui/input/components/Select.tsx@@ -55,6 +55,7 @@ export type SelectProps<Value extends SelectValue> = {dropdownOffset?: DropdownOffset;hasRightElement?: boolean;showContextualTextInControl?: boolean;+ isDropdownInModal?: boolean;};const StyledContainer = styled.div<{ fullWidth?: boolean }>`@@ -96,6 +97,7 @@ export const Select = <Value extends SelectValue>({dropdownOffset,hasRightElement,showContextualTextInControl = true,+ isDropdownInModal = false,}: SelectProps<Value>) => {const selectContainerRef = useRef<HTMLDivElement>(null);@@ -207,6 +209,7 @@ export const Select = <Value extends SelectValue>({dropdownId={dropdownId}dropdownPlacement="bottom-start"dropdownOffset={dropdownOffset}+ isDropdownInModal={isDropdownInModal}onOpen={handleDropdownOpen}clickableComponent={<SelectControl