Skip to content

Commit 0eb7301

Browse files
committed
company creation ui clean up final
1 parent b849d48 commit 0eb7301

33 files changed

Lines changed: 493 additions & 309 deletions

File tree

src/components/UseForm/CheckboxController/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import { Checkbox } from '@/components/ui/checkbox';
42
import {
53
FormControl,
@@ -16,6 +14,8 @@ interface CheckboxControllerProps {
1614
rules?: any;
1715
control: any;
1816
disabled?: boolean;
17+
bottomText?: string; // Added property
18+
bottomTextClass?: string; // Added property for custom bottom text styling
1919
}
2020

2121
const CheckboxController: React.FC<CheckboxControllerProps> = ({
@@ -24,6 +24,8 @@ const CheckboxController: React.FC<CheckboxControllerProps> = ({
2424
rules,
2525
control,
2626
disabled = false,
27+
bottomText, // Added property
28+
bottomTextClass = 'text-gray-500', // Added property with default value
2729
}) => {
2830
return (
2931
<FormField
@@ -50,11 +52,14 @@ const CheckboxController: React.FC<CheckboxControllerProps> = ({
5052
);
5153
}}
5254
/>
55+
{bottomText && (
56+
<span className={`text-sm ${bottomTextClass}`}>{bottomText}</span>
57+
)}
5358
<FormMessage />
5459
</FormItem>
5560
)}
5661
/>
5762
);
5863
};
5964

60-
export default CheckboxController;
65+
export default CheckboxController;

src/components/UseForm/ControllerMap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import SelectController from './SelectController';
42
import InputController from './InputController';
53
import CheckboxController from './CheckboxController';
@@ -119,6 +117,7 @@ export type FormFieldConfig = {
119117
placeholder?: string;
120118
maxSize?: number;
121119
bottomText?: string;
120+
bottomTextClass?: string; // Added property for custom bottom text styling
122121
maxDate?: boolean;
123122
meta?: {
124123
refId: string;
@@ -130,4 +129,4 @@ export type FormFieldConfig = {
130129
inputType?: 'text' | 'number';
131130
};
132131

133-
export default ControllerMap;
132+
export default ControllerMap;

src/components/UseForm/InputController/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ interface InputControllerProps {
2323
iconPosition?: "left" | "right";
2424
placeholder?: string;
2525
defaultValue?: string | number;
26+
bottomText?: string; // Added property
27+
bottomTextClass?: string; // Added property for custom bottom text styling
2628
}
2729

2830
const InputController: React.FC<InputControllerProps> = ({
@@ -37,6 +39,8 @@ const InputController: React.FC<InputControllerProps> = ({
3739
onChange,
3840
placeholder,
3941
defaultValue,
42+
bottomText, // Added property
43+
bottomTextClass = 'text-gray-500', // Added property with default value
4044
}) => {
4145
return (
4246
<FormField
@@ -107,6 +111,9 @@ const InputController: React.FC<InputControllerProps> = ({
107111
)}
108112
</div>
109113
</FormControl>
114+
{bottomText && (
115+
<span className={`text-sm ${bottomTextClass}`}>{bottomText}</span>
116+
)}
110117
{error && <FormMessage>{error.message}</FormMessage>}
111118
</FormItem>
112119
);
@@ -115,4 +122,4 @@ const InputController: React.FC<InputControllerProps> = ({
115122
);
116123
};
117124

118-
export default InputController;
125+
export default InputController;

src/components/UseForm/SelectController/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ interface IndexProps {
2424
onChange?: (value: string) => void;
2525
defaultValue?: string;
2626
onBlur?: () => void;
27+
bottomText?: string; // Added property
28+
bottomTextClass?: string; // Added property for custom bottom text styling
2729
}
2830

2931
const Index: React.FC<IndexProps> = ({
@@ -36,6 +38,8 @@ const Index: React.FC<IndexProps> = ({
3638
defaultValue = "",
3739
onChange,
3840
onBlur,
41+
bottomText, // Added property
42+
bottomTextClass = 'text-gray-500', // Added property with default value
3943
}) => {
4044
return (
4145
<FormField
@@ -84,6 +88,9 @@ const Index: React.FC<IndexProps> = ({
8488
))}
8589
</SelectContent>
8690
</Select>
91+
{bottomText && (
92+
<span className={`text-sm ${bottomTextClass}`}>{bottomText}</span>
93+
)}
8794
<FormMessage />
8895
</FormItem>
8996
);
@@ -92,4 +99,4 @@ const Index: React.FC<IndexProps> = ({
9299
);
93100
};
94101

95-
export default Index;
102+
export default Index;

src/components/UseForm/TextareaController/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import React from 'react';
42
import {
53
FormField,
@@ -18,6 +16,7 @@ interface TextareaControllerProps {
1816
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
1917
rules?: any;
2018
bottomText?: string;
19+
bottomTextClass?: string; // Added property for custom bottom text styling
2120
}
2221

2322
const TextareaController: React.FC<TextareaControllerProps> = ({
@@ -26,6 +25,7 @@ const TextareaController: React.FC<TextareaControllerProps> = ({
2625
control,
2726
rules,
2827
bottomText,
28+
bottomTextClass = 'text-gray-500', // Default class
2929
disabled = false,
3030
onChange,
3131
}) => {
@@ -58,7 +58,7 @@ const TextareaController: React.FC<TextareaControllerProps> = ({
5858
}}
5959
/>
6060
{bottomText && (
61-
<span className='text-sm text-gray-500'>{bottomText}</span>
61+
<span className={`text-sm ${bottomTextClass}`}>{bottomText}</span>
6262
)}
6363
</div>
6464
</FormControl>
@@ -70,4 +70,4 @@ const TextareaController: React.FC<TextareaControllerProps> = ({
7070
);
7171
};
7272

73-
export default TextareaController;
73+
export default TextareaController;

src/components/cards/company/addbank/AddAccount.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ const AddAccount = () => {
3636
>
3737
<div className='flex justify-between items-center'>
3838
<div className="flex items-center gap-2">
39-
<CreditCard className="h-5 w-5 text-blue-600" />
39+
<CreditCard className="h-5 w-5 text-gray-600" />
4040
<h1 className='text-lg font-bold'>Bank Account List</h1>
4141
</div>
42-
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700">
42+
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm">
4343
Add Bank Account <Plus className='h-4 w-4 ml-2' />
4444
</Button>
4545
</div>
@@ -49,8 +49,8 @@ const AddAccount = () => {
4949
<DialogContent className="sm:max-w-[425px] rounded-2xl shadow-xl">
5050
<DialogHeader className="mb-2">
5151
<div className="flex items-center gap-3 mb-2">
52-
<div className="p-2 bg-blue-100 rounded-lg">
53-
<CreditCard className="h-5 w-5 text-blue-600" />
52+
<div className="p-2 bg-gray-100 rounded-lg">
53+
<CreditCard className="h-5 w-5 text-gray-600" />
5454
</div>
5555
<div>
5656
<DialogTitle className='text-xl font-bold text-gray-900'>
@@ -64,10 +64,10 @@ const AddAccount = () => {
6464
</DialogHeader>
6565

6666
{/* Information Banner */}
67-
<div className="bg-blue-50 rounded-lg p-3 border border-blue-100 mb-4">
67+
<div className="bg-gray-50 rounded-lg p-3 border border-gray-100 mb-4">
6868
<div className="flex items-start gap-2">
69-
<Info className="h-4 w-4 text-blue-600 mt-0.5 flex-shrink-0" />
70-
<p className="text-sm text-blue-700">
69+
<Info className="h-4 w-4 text-gray-600 mt-0.5 flex-shrink-0" />
70+
<p className="text-sm text-gray-700">
7171
All bank accounts must be verified before they can be used for transactions.
7272
</p>
7373
</div>
@@ -88,7 +88,7 @@ const AddAccount = () => {
8888
<Button type='button' variant='outline' onClick={() => setOpen(false)}>
8989
Cancel
9090
</Button>
91-
<Button type='submit' className='bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700'>
91+
<Button type='submit' className='bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm'>
9292
Save Account
9393
</Button>
9494
</div>

src/components/cards/company/board/Board.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const BoardMember = () => {
4141
<Users className="h-5 w-5 text-green-600" />
4242
<h1 className='text-lg font-bold'>Board Member List</h1>
4343
</div>
44-
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700">
44+
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm">
4545
Add Board Member <Plus className='h-4 w-4 ml-2' />
4646
</Button>
4747
</div>
@@ -90,7 +90,7 @@ const BoardMember = () => {
9090
<Button type='button' variant='outline' onClick={() => setOpen(false)}>
9191
Cancel
9292
</Button>
93-
<Button type='submit' className='bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700'>
93+
<Button type='submit' className='bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm'>
9494
Save Member
9595
</Button>
9696
</div>

src/components/cards/company/legal/Legal.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ const LegalAdvisor = () => {
3838
>
3939
<div className='flex justify-between items-center'>
4040
<div className="flex items-center gap-2">
41-
<Scale className="h-5 w-5 text-purple-600" />
41+
<Scale className="h-5 w-5 text-gray-600" />
4242
<h1 className='text-lg font-bold'>Legal Advisor List</h1>
4343
</div>
44-
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700">
44+
<Button size='sm' type='button' onClick={() => setOpen(true)} className="bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm">
4545
Add Legal Advisor <Plus className='h-4 w-4 ml-2' />
4646
</Button>
4747
</div>
@@ -51,8 +51,8 @@ const LegalAdvisor = () => {
5151
<DialogContent className="sm:max-w-[500px] rounded-2xl shadow-xl">
5252
<DialogHeader className="mb-2">
5353
<div className="flex items-center gap-3 mb-2">
54-
<div className="p-2 bg-purple-100 rounded-lg">
55-
<Scale className="h-5 w-5 text-purple-600" />
54+
<div className="p-2 bg-gray-100 rounded-lg">
55+
<Scale className="h-5 w-5 text-gray-600" />
5656
</div>
5757
<div>
5858
<DialogTitle className='text-xl font-bold text-gray-900'>
@@ -66,10 +66,10 @@ const LegalAdvisor = () => {
6666
</DialogHeader>
6767

6868
{/* Information Banner */}
69-
<div className="bg-purple-50 rounded-lg p-3 border border-purple-100 mb-4">
69+
<div className="bg-gray-50 rounded-lg p-3 border border-gray-100 mb-4">
7070
<div className="flex items-start gap-2">
71-
<Info className="h-4 w-4 text-purple-600 mt-0.5 flex-shrink-0" />
72-
<p className="text-sm text-purple-700">
71+
<Info className="h-4 w-4 text-gray-600 mt-0.5 flex-shrink-0" />
72+
<p className="text-sm text-gray-700">
7373
Legal advisors will have access to company documents based on their area of expertise.
7474
</p>
7575
</div>
@@ -90,7 +90,7 @@ const LegalAdvisor = () => {
9090
<Button type='button' variant='outline' onClick={() => setOpen(false)}>
9191
Cancel
9292
</Button>
93-
<Button type='submit' className='bg-gradient-to-r from-purple-600 to-indigo-600 hover:from-purple-700 hover:to-indigo-700'>
93+
<Button type='submit' className='bg-white hover:bg-gray-50 text-gray-700 border border-gray-300 hover:border-gray-400 shadow-sm'>
9494
Save Advisor
9595
</Button>
9696
</div>

src/components/ui/dialog.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import * as React from 'react';
42
import * as DialogPrimitive from '@radix-ui/react-dialog';
53
import { X } from 'lucide-react';
@@ -33,7 +31,7 @@ const DialogContent = ({
3331
<DialogOverlay />
3432
<DialogPrimitive.Content
3533
className={cn(
36-
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[85vh] overflow-y-scroll',
34+
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[90vh] overflow-y-auto',
3735
className
3836
)}
3937
{...props}

src/layout/Navbar.tsx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,7 @@ const Navbar = ({ onMenuToggle, className, isMobileMenuOpen = false, setIsMobile
265265
const chainId = useChainId();
266266
const { chains, switchChain, error: switchChainError } = useSwitchChain();
267267

268-
// Debug logging
269-
console.log("=== WALLET DEBUG INFO ===");
270-
console.log("isConnected:", isConnected);
271-
console.log("address:", address);
272-
console.log("currentChainId:", chainId);
273-
console.log("chains array:", chains);
274-
console.log("chains length:", chains?.length);
275-
console.log("avalancheFujiChain state:", avalancheFujiChain);
268+
276269

277270
// Find Avalanche Fuji chain dynamically from available chains
278271
useEffect(() => {
@@ -287,21 +280,15 @@ const Navbar = ({ onMenuToggle, className, isMobileMenuOpen = false, setIsMobile
287280
const fujiById = chains.find(chain => chain.id === 43113);
288281
const fujiBySymbol = chains.find(chain => chain.nativeCurrency?.symbol === 'AVAX');
289282

290-
console.log("Search results:");
291-
console.log("- By name 'Avalanche Fuji':", fujiByName);
292-
console.log("- By ID 43113:", fujiById);
293-
console.log("- By symbol 'AVAX':", fujiBySymbol);
283+
294284

295285
const fujiChain = fujiByName || fujiById || fujiBySymbol;
296286

297287
if (fujiChain) {
298288
console.log('✅ Found Avalanche Fuji chain:', fujiChain);
299289
setAvalancheFujiChain(fujiChain);
300290
} else {
301-
console.log('❌ Avalanche Fuji chain not found in available chains');
302-
console.log('Available chain names:', chains.map(c => c.name));
303-
console.log('Available chain IDs:', chains.map(c => c.id));
304-
console.log('Available chain symbols:', chains.map(c => c.nativeCurrency?.symbol));
291+
305292
}
306293
} else {
307294
console.log('❌ Conditions not met for chain detection');
@@ -314,13 +301,6 @@ const Navbar = ({ onMenuToggle, className, isMobileMenuOpen = false, setIsMobile
314301
});
315302

316303
// Debug balance fetching
317-
console.log("=== BALANCE DEBUG INFO ===");
318-
console.log("Balance fetch params:", {
319-
address,
320-
chainId: avalancheFujiChain?.id,
321-
avalancheFujiChainExists: !!avalancheFujiChain
322-
});
323-
console.log("Balance result:", { data, isLoading, balanceError });
324304

325305
// Check if currently connected to Avalanche Fuji
326306
const isOnAvalancheFuji = avalancheFujiChain && chainId === avalancheFujiChain.id;
@@ -435,7 +415,7 @@ const Navbar = ({ onMenuToggle, className, isMobileMenuOpen = false, setIsMobile
435415
fixed left-0 right-0 rounded-6xl border border-gray-200/20 drop-shadow-lg dark:border-gray-800/20 h-16 z-50 transition-all duration-500 ease-out
436416
${isScrolled
437417
? 'bg-white/80 dark:bg-gray-900/80 backdrop-blur-xl shadow-lg shadow-black/5 border-b border-gray-200/20 dark:border-gray-800/20'
438-
: 'bg-white/60 dark:bg-gray-900/60 backdrop-blur-lg border-b border-transparent'
418+
: 'bg-white/60 dark:bg-gray-900/80 backdrop-blur-lg border-b border-transparent'
439419
}
440420
`}>
441421
{/* Animated gradient background */}

0 commit comments

Comments
 (0)