-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * WIP * WIP * Spec fix * Async load and more specs * WIP * Replaced pixels with rem * Changed method name for clarity * WIP * Fix for issues found by Erica
- Loading branch information
Showing
8 changed files
with
185 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,74 @@ | ||
|
||
.dashboard-show-page-body{ | ||
.card{ | ||
border: 1px solid #757575; | ||
border: 0.1rem solid #757575; | ||
} | ||
select.select__element{ | ||
border: 1px solid #CFC5BF; | ||
border-radius: 5px; | ||
border: 0.1rem solid #CFC5BF; | ||
border-radius: 0.5rem; | ||
background-image: image-url('dropdown.svg'); | ||
background-repeat: no-repeat; | ||
background-position: right 10px center; | ||
background-position: right 1rem center; | ||
} | ||
|
||
.capacity { | ||
table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
width: 100%; | ||
|
||
tr th { | ||
font-weight: normal; | ||
color: #757575; | ||
text-align: left; | ||
padding: 1.2rem 0; | ||
} | ||
|
||
tr { | ||
border-bottom: 0.1rem solid #BEBEBE; | ||
td { | ||
padding: 1.2rem 0; | ||
} | ||
td:last-child { | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
tr:last-child { | ||
border-bottom: none; | ||
} | ||
|
||
.organization-link { | ||
color: #000; | ||
text-decoration: none; | ||
} | ||
|
||
.controls>div { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.5rem; | ||
img { | ||
width: 1.8rem; | ||
height: 1.8rem; | ||
} | ||
} | ||
|
||
.under-capacity { | ||
color: #07866C; | ||
} | ||
|
||
.at-capacity { | ||
} | ||
|
||
.over-capacity { | ||
color: #D73D02; | ||
} | ||
} | ||
} | ||
|
||
.paging { | ||
display: flex; | ||
justify-content: flex-end; | ||
gap: 2rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
<div class="card"> | ||
<h2>Capacity</h2> | ||
<p>TODO: Implement</p> | ||
<div class="card capacity"> | ||
<h2><%= I18n.t("hub.dashboard.show.capacity") %></h2> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th><%= I18n.t("hub.dashboard.show.org_name") %></th> | ||
<th><%= I18n.t("hub.dashboard.show.current_capacity") %></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<% @capacity[..3].each do |organization| %> | ||
<tr> | ||
<td> | ||
<%= link_to "#{organization.name}", | ||
can?(:edit, organization) ? edit_hub_organization_path(id: organization) : hub_organization_path(id: organization), | ||
class: "organization-link" | ||
%> | ||
</td> | ||
<td class="controls"> | ||
<div class="<%= capacity_css_class(organization) %>"> | ||
<div><%= organization.active_client_count %>/<%= organization.capacity_limit %></div> | ||
<% if organization.active_client_count.to_f / organization.capacity_limit > 1 %> | ||
<%= image_tag('icons/warning.svg', alt: "") %> | ||
<% end %> | ||
</div> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> | ||
<% if @selected.instance_of? Coalition %> | ||
<div class="paging"> | ||
<div><%= @capacity.length %> of <%= capacity_count %></div> | ||
<%= link_to I18n.t("hub.dashboard.show.view_all"), hub_organizations_path %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters