From 1fa4d5b2ba34367edcaa7effbb8f383ab09468cd Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Tue, 17 Mar 2026 23:17:30 -0600 Subject: [PATCH] refactor: improve formatting and readability in billing and users components - Enhanced code readability by adjusting formatting in the ShowBilling component, ensuring consistent line breaks and indentation. - Updated the ShowUsers component to improve the layout of the warning message for users with custom roles without a valid license, maintaining clarity in the alert presentation. --- .../settings/billing/show-billing.tsx | 39 +++++++++++++------ .../dashboard/settings/users/show-users.tsx | 24 ++++++------ 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx index fc8333430..2f04620f3 100644 --- a/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx +++ b/apps/dokploy/components/dashboard/settings/billing/show-billing.tsx @@ -92,7 +92,9 @@ export const ShowBilling = () => { const utils = api.useUtils(); const [hobbyServerQuantity, setHobbyServerQuantity] = useState(1); - const [startupServerQuantity, setStartupServerQuantity] = useState(STARTUP_SERVERS_INCLUDED); + const [startupServerQuantity, setStartupServerQuantity] = useState( + STARTUP_SERVERS_INCLUDED, + ); const [isAnnual, setIsAnnual] = useState(false); const [upgradeTier, setUpgradeTier] = useState<"hobby" | "startup" | null>( null, @@ -699,7 +701,8 @@ export const ShowBilling = () => {

$ {( - calculatePriceHobby(hobbyServerQuantity, true) / 12 + calculatePriceHobby(hobbyServerQuantity, true) / + 12 ).toFixed(2)} /mo

@@ -826,7 +829,10 @@ export const ShowBilling = () => {

$ {( - calculatePriceStartup(startupServerQuantity, true) / 12 + calculatePriceStartup( + startupServerQuantity, + true, + ) / 12 ).toFixed(2)} /mo

@@ -863,7 +869,8 @@ export const ShowBilling = () => {
@@ -1025,7 +1034,10 @@ export const ShowBilling = () => {

${" "} {( - calculatePrice(hobbyServerQuantity, isAnnual) / 12 + calculatePrice( + hobbyServerQuantity, + isAnnual, + ) / 12 ).toFixed(2)}{" "} / Month USD

@@ -1033,9 +1045,10 @@ export const ShowBilling = () => { ) : (

${" "} - {calculatePrice(hobbyServerQuantity, isAnnual).toFixed( - 2, - )}{" "} + {calculatePrice( + hobbyServerQuantity, + isAnnual, + ).toFixed(2)}{" "} USD

)} @@ -1089,7 +1102,9 @@ export const ShowBilling = () => { onClick={() => { if (hobbyServerQuantity <= 1) return; - setHobbyServerQuantity(hobbyServerQuantity - 1); + setHobbyServerQuantity( + hobbyServerQuantity - 1, + ); }} > @@ -1106,7 +1121,9 @@ export const ShowBilling = () => {
) : (
- {hasCustomRolesWithoutLicense && ( - - You have{" "} - {membersWithCustomRoles?.length === 1 - ? "1 user" - : `${membersWithCustomRoles?.length} users`}{" "} - assigned to custom roles. Custom roles will not work - without a valid Enterprise license. Please activate - your license or change these users to a free role - (Admin or Member). - - )} + {hasCustomRolesWithoutLicense && ( + + You have{" "} + {membersWithCustomRoles?.length === 1 + ? "1 user" + : `${membersWithCustomRoles?.length} users`}{" "} + assigned to custom roles. Custom roles will not work + without a valid Enterprise license. Please activate your + license or change these users to a free role (Admin or + Member). + + )}