Improve expense dialog button layout
This commit is contained in:
@@ -813,23 +813,35 @@ export default function ExpensesPage() {
|
|||||||
|
|
||||||
<ExpenseReceiptsPanel expenseId={editId} readOnly={isViewMode} />
|
<ExpenseReceiptsPanel expenseId={editId} readOnly={isViewMode} />
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter className="gap-2 sm:gap-0">
|
<DialogFooter className="gap-2 sm:gap-3">
|
||||||
{isViewMode ? (
|
{isViewMode ? (
|
||||||
<>
|
<>
|
||||||
<Button variant="outline" onClick={closeDialog}>
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
className="w-full sm:w-auto"
|
||||||
|
onClick={closeDialog}
|
||||||
|
>
|
||||||
Close
|
Close
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => setDialogMode("edit")}>
|
<Button
|
||||||
|
className="w-full sm:w-auto"
|
||||||
|
onClick={() => setDialogMode("edit")}
|
||||||
|
>
|
||||||
<Pencil className="mr-2 h-4 w-4" />
|
<Pencil className="mr-2 h-4 w-4" />
|
||||||
Edit
|
Edit
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Button variant="outline" onClick={closeDialog}>
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
className="w-full sm:w-auto"
|
||||||
|
onClick={closeDialog}
|
||||||
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
className="w-full sm:w-auto"
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
disabled={create.isPending || update.isPending}
|
disabled={create.isPending || update.isPending}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user