diff --git a/admin-spa/src/components/ui/drawer.tsx b/admin-spa/src/components/ui/drawer.tsx index 8f4fe09..b9b8838 100644 --- a/admin-spa/src/components/ui/drawer.tsx +++ b/admin-spa/src/components/ui/drawer.tsx @@ -26,7 +26,7 @@ const DrawerOverlay = React.forwardRef< >(({ className, ...props }, ref) => ( )) @@ -41,7 +41,7 @@ const DrawerContent = React.forwardRef< (null); const [selectedZone, setSelectedZone] = useState(null); const [showAddMethod, setShowAddMethod] = useState(false); + const [showAvailableMethods, setShowAvailableMethods] = useState(false); const [expandedMethod, setExpandedMethod] = useState(''); const [methodSettings, setMethodSettings] = useState>({}); const [deletingMethod, setDeletingMethod] = useState<{ zoneId: number; instanceId: number; name: string } | null>(null); @@ -256,10 +257,12 @@ export default function ShippingPage() { } > @@ -269,10 +272,12 @@ export default function ShippingPage() { {__('No shipping zones configured yet. Create your first zone to start offering shipping.')}

) : ( @@ -399,14 +404,47 @@ export default function ShippingPage() {
{/* Add Delivery Option Button */} - + {!showAvailableMethods ? ( + + ) : ( +
+
+

{__('Available Shipping Methods')}

+ +
+ {availableMethods.map((method: any) => ( + + ))} +
+ )} {/* Delivery Options Accordion */} { @@ -578,14 +616,47 @@ export default function ShippingPage() {
{/* Add Delivery Option Button */} - + {!showAvailableMethods ? ( + + ) : ( +
+
+

{__('Available Shipping Methods')}

+ +
+ {availableMethods.map((method: any) => ( + + ))} +
+ )} {/* Delivery Options Accordion (Mobile) */} { @@ -740,36 +811,6 @@ export default function ShippingPage() { ) )} - {/* Add Delivery Option Dialog */} - - - - {__('Add Delivery Option')} - -
-

- {__('Select a delivery option to add:')}

-
- {availableMethods.map((method: any) => ( - - ))} -
-
-
-
- {/* Delete Method Confirmation Dialog */} setDeletingMethod(null)}>