cluster fuck

This commit is contained in:
NotII
2025-03-08 05:14:50 +00:00
parent b8e6e1dfc0
commit 8ea692eda2
3 changed files with 144 additions and 117 deletions

View File

@@ -224,33 +224,37 @@ export default function PromotionsList() {
{/* New Promotion Dialog */}
<Dialog open={showNewDialog} onOpenChange={setShowNewDialog}>
<DialogContent className="max-w-2xl">
<DialogHeader>
<DialogTitle>Create New Promotion</DialogTitle>
<DialogContent className="max-w-4xl">
<DialogHeader className="pb-4">
<DialogTitle className="text-xl">Create New Promotion</DialogTitle>
<DialogDescription>
Add a promotional code to offer discounts to your customers.
</DialogDescription>
</DialogHeader>
<NewPromotionForm onSuccess={handleCreateComplete} onCancel={() => setShowNewDialog(false)} />
<div className="max-h-[70vh] overflow-y-auto pr-1">
<NewPromotionForm onSuccess={handleCreateComplete} onCancel={() => setShowNewDialog(false)} />
</div>
</DialogContent>
</Dialog>
{/* Edit Promotion Dialog */}
<Dialog open={!!editingPromotion} onOpenChange={() => editingPromotion && handleCloseEditDialog()}>
<DialogContent className="max-w-2xl">
<DialogHeader>
<DialogTitle>Edit Promotion</DialogTitle>
<DialogContent className="max-w-4xl">
<DialogHeader className="pb-4">
<DialogTitle className="text-xl">Edit Promotion</DialogTitle>
<DialogDescription>
Modify this promotional code's details.
</DialogDescription>
</DialogHeader>
{editingPromotion && (
<EditPromotionForm
promotion={editingPromotion}
onSuccess={handleEditComplete}
onCancel={handleCloseEditDialog}
/>
)}
<div className="max-h-[70vh] overflow-y-auto pr-1">
{editingPromotion && (
<EditPromotionForm
promotion={editingPromotion}
onSuccess={handleEditComplete}
onCancel={handleCloseEditDialog}
/>
)}
</div>
</DialogContent>
</Dialog>