Skip to content

Commit

Permalink
fix: disable when reload
Browse files Browse the repository at this point in the history
  • Loading branch information
HungLV46 committed Aug 30, 2024
1 parent 1539ac1 commit 666d642
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/routes/(sidebar)/crud/products/Product.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
deleteId = data.product.id?.toString();
openDelete = true;
}}
disabled={isViewMode}
>
<TrashBinSolid size="sm" /> Delete
</Button>
Expand All @@ -136,7 +137,13 @@
<EditOutline size="sm" /> Edit
</Button>
{:else}
<Button type="submit" size="sm" class="w-36 gap-2 px-3" color="green">
<Button
type="submit"
size="sm"
class="w-36 gap-2 px-3"
color="green"
disabled={isViewMode}
>
<CheckOutline size="sm" /> Save
</Button>
{/if}
Expand Down
9 changes: 8 additions & 1 deletion src/routes/(sidebar)/crud/users/User.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
deleteId = data.user.id?.toString();
openDelete = true;
}}
disabled={isViewMode}
>
<TrashBinSolid size="sm" /> Delete
</Button>
Expand All @@ -103,7 +104,13 @@
<EditOutline size="sm" /> Edit
</Button>
{:else}
<Button type="submit" size="sm" class="w-36 gap-2 px-3" color="green">
<Button
type="submit"
size="sm"
class="w-36 gap-2 px-3"
color="green"
disabled={isViewMode}
>
<CheckOutline size="sm" /> Save
</Button>
{/if}
Expand Down

0 comments on commit 666d642

Please sign in to comment.