Hide properties filters with count = 0
This commit is contained in:
@@ -1510,6 +1510,7 @@ const EventFeed = ({
|
||||
|
||||
{/* Order Property Filters */}
|
||||
<div className="flex flex-wrap gap-2 justify-center mt-4">
|
||||
{counts.orderProperties.hasPreorder > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('hasPreorder')}
|
||||
@@ -1519,8 +1520,10 @@ const EventFeed = ({
|
||||
: 'bg-purple-100 dark:bg-purple-900/20 text-purple-800 dark:text-purple-300 hover:bg-purple-100 dark:hover:bg-purple-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Pre-order {counts.orderProperties.hasPreorder > 0 && `(${counts.orderProperties.hasPreorder})`}
|
||||
Pre-order ({counts.orderProperties.hasPreorder})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.localPickup > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('localPickup')}
|
||||
@@ -1530,8 +1533,10 @@ const EventFeed = ({
|
||||
: 'bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 hover:bg-green-100 dark:hover:bg-green-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Local {counts.orderProperties.localPickup > 0 && `(${counts.orderProperties.localPickup})`}
|
||||
Local ({counts.orderProperties.localPickup})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.isOnHold > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('isOnHold')}
|
||||
@@ -1541,8 +1546,10 @@ const EventFeed = ({
|
||||
: 'bg-blue-100 dark:bg-blue-900/20 text-blue-800 dark:text-blue-300 hover:bg-blue-100 dark:hover:bg-blue-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
On Hold {counts.orderProperties.isOnHold > 0 && `(${counts.orderProperties.isOnHold})`}
|
||||
On Hold ({counts.orderProperties.isOnHold})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.onHoldReleased > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('onHoldReleased')}
|
||||
@@ -1552,8 +1559,10 @@ const EventFeed = ({
|
||||
: 'bg-green-100 dark:bg-green-900/20 text-green-800 dark:text-green-300 hover:bg-green-100 dark:hover:bg-green-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Hold Released {counts.orderProperties.onHoldReleased > 0 && `(${counts.orderProperties.onHoldReleased})`}
|
||||
Hold Released ({counts.orderProperties.onHoldReleased})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.hasDigiItem > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('hasDigiItem')}
|
||||
@@ -1563,8 +1572,10 @@ const EventFeed = ({
|
||||
: 'bg-indigo-100 dark:bg-indigo-900/20 text-indigo-800 dark:text-indigo-300 hover:bg-indigo-100 dark:hover:bg-indigo-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Digital {counts.orderProperties.hasDigiItem > 0 && `(${counts.orderProperties.hasDigiItem})`}
|
||||
Digital ({counts.orderProperties.hasDigiItem})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.hasNotions > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('hasNotions')}
|
||||
@@ -1574,8 +1585,10 @@ const EventFeed = ({
|
||||
: 'bg-yellow-100 dark:bg-yellow-900/20 text-yellow-800 dark:text-yellow-300 hover:bg-yellow-100 dark:hover:bg-yellow-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Notions {counts.orderProperties.hasNotions > 0 && `(${counts.orderProperties.hasNotions})`}
|
||||
Notions ({counts.orderProperties.hasNotions})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.hasGiftCard > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('hasGiftCard')}
|
||||
@@ -1585,8 +1598,10 @@ const EventFeed = ({
|
||||
: 'bg-pink-100 dark:bg-pink-900/20 text-pink-800 dark:text-pink-300 hover:bg-pink-100 dark:hover:bg-pink-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
eGift Card {counts.orderProperties.hasGiftCard > 0 && `(${counts.orderProperties.hasGiftCard})`}
|
||||
eGift Card ({counts.orderProperties.hasGiftCard})
|
||||
</Badge>
|
||||
)}
|
||||
{counts.orderProperties.stillOwes > 0 && (
|
||||
<Badge
|
||||
variant="secondary"
|
||||
onClick={() => handleOrderPropertyClick('stillOwes')}
|
||||
@@ -1596,8 +1611,9 @@ const EventFeed = ({
|
||||
: 'bg-red-100 dark:bg-red-900/20 text-red-800 dark:text-red-300 hover:bg-red-100 dark:hover:bg-red-900/20'
|
||||
} cursor-pointer`}
|
||||
>
|
||||
Owes {counts.orderProperties.stillOwes > 0 && `(${counts.orderProperties.stillOwes})`}
|
||||
Owes ({counts.orderProperties.stillOwes})
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
</CardHeader>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user