Skip to content

Commit

Permalink
comlete the style of the organazation btns #61
Browse files Browse the repository at this point in the history
  • Loading branch information
Zahra Rezaei committed Aug 22, 2024
1 parent 5d7fe1d commit 642ccde
Showing 1 changed file with 58 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,64 @@
@using CrystallineSociety.Shared.Dtos.Organization
@inherits AppComponentBase

<div class="container mt-5">
<div class="table-container">
<h3 class="mb-3">Manage organizations</h3>
<div class="d-flex justify-content-end mb-3">
<button class="btn btn-outline-success">
+ Add new organization
</button>
</div>
<table class="table table-bordered">
<thead class="table-light">
<div class="container-fluid p-4 pt-2">
<div class="table-container">
<h3 class="mb-3">Manage organizations</h3>
<div class="d-flex justify-content-end mb-3">
<button class="btn btn-outline-success">
+ Add new organization
</button>
</div>
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th>Organization name</th>
<th>Organization actions</th>
</tr>
</thead>
<tbody>
@foreach (var organization in Organizations)
{
<tr>
<th>Organization name</th>
<th>Organization actions</th>
<td>@organization.Title</td>
<td class="d-flex justify-content-start gap-1 flex-wrap">
<button class="btn btn-sm @(IsSyncing ? "btn-success opacity-100" : "btn-outline-success")"
@onclick="async () => await HandelSyncAsync(organization)"
disabled="@(IsSyncing)">
@if (IsSyncing)
{
<div class="d-flex align-items-center">
<span class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></span>
Sync
</div>
}
else
{
<span>Sync</span>
}
</button>
<button class="btn btn-outline-primary btn-sm">
Edit
</button>
<button class="btn btn-sm @(IsDeleting ? "btn-danger opacity-100" : "btn-outline-danger")"
@onclick="async () => await HandelDeleteAsync(organization)"
disabled="@(IsDeleting)">
@if (IsDeleting)
{
<div class="d-flex align-items-center">
<span class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></span>
Delete
</div>
}
else
{
<span>Delete</span>
}
</button>
</td>
</tr>
</thead>
<tbody>
@foreach (var organization in Organizations)
{
<tr>
<td>@organization.Title</td>
<td>
<button class="btn btn-outline-success btn-sm" @onclick="async () => await HandelSyncAsync(organization)" disabled="@(IsSyncing)">
@if (IsSyncing)
{
<div class="d-flex align-items-center">
<span class="spinner-border bg-white spinner-border-sm me-2" role="status" aria-hidden="true"></span>
Sync
</div>
}
else
{
<span>Sync</span>
}
</button>
<button class="btn btn-outline-primary btn-sm">
Edit
</button>
<button class="btn btn-outline-danger btn-sm" @onclick="async () => await HandelDeleteAsync(organization)" disabled="@(IsDeleting)">
@if (IsDeleting)
{
<div class="d-flex align-items-center">
<span class="spinner-border bg-white spinner-border-sm me-2" role="status" aria-hidden="true"></span>
Delete
</div>
}
else
{
<span>Delete</span>
}
</button>
</td>
</tr>
}
</tbody>
</table>
</div>
}
</tbody>
</table>
</div>
</div>

0 comments on commit 642ccde

Please sign in to comment.