From e4055f36b310eb49e15e8b2c1cc72d034887c510 Mon Sep 17 00:00:00 2001
From: Tim Golen <tgolen@expensify.com>
Date: Fri, 19 Dec 2025 15:02:01 -0500
Subject: [PATCH] Fix button size and unassigned card number

---
 .../WorkspaceCompanyCardsTableItem.tsx        | 34 ++++++++++++-------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/pages/workspace/companyCards/WorkspaceCompanyCardsTableItem.tsx b/src/pages/workspace/companyCards/WorkspaceCompanyCardsTableItem.tsx
index 5adae9286cd9..9ab7dcf1706e 100644
--- a/src/pages/workspace/companyCards/WorkspaceCompanyCardsTableItem.tsx
+++ b/src/pages/workspace/companyCards/WorkspaceCompanyCardsTableItem.tsx
@@ -117,7 +117,7 @@ function WorkspaceCompanyCardTableItem({
 
     const lastCardNumbers = isPlaidCardFeed ? lastFourNumbersFromCardName(cardName) : splitMaskedCardNumber(cardName)?.lastDigits;
 
-    const alternateLoginText = shouldUseNarrowTableRowLayout ? `${customCardName}${lastCardNumbers ? ` - ${lastCardNumbers}` : ''}` : (cardholder?.login ?? '');
+    const alternateLoginText = shouldUseNarrowTableRowLayout ? `${customCardName ?? ''}${lastCardNumbers ? ` - ${lastCardNumbers}` : ''}` : (cardholder?.login ?? '');
 
     const resetFailedCompanyCardAssignment = () => {
         if (!failedCompanyCardAssignment) {
@@ -213,12 +213,16 @@ function WorkspaceCompanyCardTableItem({
                                         />
                                     )}
 
-                                    <Text
-                                        numberOfLines={1}
-                                        style={[styles.optionDisplayName, styles.textStrong, styles.pre]}
-                                    >
-                                        {translate('workspace.moreFeatures.companyCards.unassignedCards')}
-                                    </Text>
+                                    <View style={[styles.flex1, styles.flexColumn, styles.justifyContentCenter, styles.alignItemsStretch]}>
+                                        <TextWithTooltip
+                                            text={translate('workspace.moreFeatures.companyCards.unassignedCards')}
+                                            style={[styles.optionDisplayName, styles.sidebarLinkTextBold, styles.pre, styles.justifyContentCenter]}
+                                        />
+                                        <TextWithTooltip
+                                            text={cardName}
+                                            style={[styles.textLabelSupporting, styles.lh16, styles.pre, styles.mr3]}
+                                        />
+                                    </View>
                                 </>
                             )}
                         </View>
@@ -254,14 +258,20 @@ function WorkspaceCompanyCardTableItem({
                                     />
                                 </View>
                             )}
-                            {!isAssigned && (
-                                <Button
+                            {!isAssigned && shouldUseNarrowTableRowLayout && (<Button
                                     success
-                                    text={shouldUseNarrowTableRowLayout ? translate('workspace.companyCards.assign') : translate('workspace.companyCards.assignCard')}
+                                    small
+                                    text={translate('workspace.companyCards.assign')}
                                     onPress={assignCard}
                                     isDisabled={isAssigningCardDisabled}
-                                />
-                            )}
+                                />)}
+
+                            {!isAssigned && !shouldUseNarrowTableRowLayout && (<Button
+                                    success
+                                    text={translate('workspace.companyCards.assignCard')}
+                                    onPress={assignCard}
+                                    isDisabled={isAssigningCardDisabled}
+                                />)}
                         </View>
                     </View>
                 )}
