Skip to content

Commit 5766af5

Browse files
committed
Remove global span tag CSS, add title to table supervisor list counts and remove extra closing div tag
1 parent b4e3688 commit 5766af5

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

app/javascript/src/dashboard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ $(() => { // JQuery's callback for the DOM loading
455455
const activeContactElement = activeContactVolunteers
456456
? (
457457
`
458-
<span class="attempted-contact status-btn success-bg text-white pl-${activeContactVolunteers * 15} pr-${activeContactVolunteers * 15}">
458+
<span class="attempted-contact volunteer-info success-bg text-white pl-${activeContactVolunteers * 15} pr-${activeContactVolunteers * 15}" title="Number of Volunteers attempting contact (within 2 weeks)">
459459
${activeContactVolunteers}
460460
</span>
461461
`
@@ -465,7 +465,7 @@ $(() => { // JQuery's callback for the DOM loading
465465
const noContactElement = noContactVolunteers > 0
466466
? (
467467
`
468-
<span class="no-attempted-contact status-btn danger-bg text-white pl-${noContactVolunteers * 15} pr-${noContactVolunteers * 15}">
468+
<span class="no-attempted-contact volunteer-info danger-bg text-white pl-${noContactVolunteers * 15} pr-${noContactVolunteers * 15}" title="Number of Volunteers not attempting contact (within 2 weeks)">
469469
${noContactVolunteers}
470470
</span>
471471
`
@@ -476,7 +476,7 @@ $(() => { // JQuery's callback for the DOM loading
476476
if (activeContactVolunteers <= 0 && noContactVolunteers <= 0) {
477477
volunteersCounterElement = '<span class="no-volunteers" style="flex-grow: 1">No assigned volunteers</span>'
478478
} else {
479-
volunteersCounterElement = `<span class="status-btn deactive-bg text-black pl-${transitionAgedCaseVolunteers * 15} pr-${transitionAgedCaseVolunteers * 15}">${transitionAgedCaseVolunteers}</span>`
479+
volunteersCounterElement = `<span class="volunteer-info deactive-bg text-black pl-${transitionAgedCaseVolunteers * 15} pr-${transitionAgedCaseVolunteers * 15}" title="Count of Transition Aged Youth">${transitionAgedCaseVolunteers}</span>`
480480
}
481481

482482
return `

app/views/casa_admins/index.html.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@
5858
</div>
5959
</div>
6060
</div>
61-
</div>

app/views/supervisors/index.html.erb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
<div class="card-style mb-30">
4949
<h6 class="mb-10">Legend for Supervisor List</h6>
5050
<p class="text-sm mb-20">
51-
<span class="status-btn success-bg text-white mb-10">Number of Volunteers attempting contact (within 2 weeks)</span><br>
52-
<span class="status-btn danger-bg text-white mb-10">Number of Volunteers not attempting contact (within 2 weeks)</span><br>
53-
<span class="status-btn deactive-bg text-black">Count of Transition Aged Youth</span>
51+
<span class="volunteer-info success-bg text-white mb-10">Number of Volunteers attempting contact (within 2 weeks)</span><br>
52+
<span class="volunteer-info danger-bg text-white mb-10">Number of Volunteers not attempting contact (within 2 weeks)</span><br>
53+
<span class="volunteer-info deactive-bg text-black">Count of Transition Aged Youth</span>
5454
</p>
5555
<div class="table-wrapper table-responsive">
5656
<table
@@ -78,20 +78,20 @@
7878

7979
<div class="d-flex flex-row w-100">
8080
<% if active_volunteers %>
81-
<div class="status-btn success-bg text-white flex-grow-1" style="max-width: <%= (active_volunteers * 15) %>%; text-align: center"><%= active_volunteers %></div>
81+
<div class="volunteer-info success-bg text-white flex-grow-1" style="max-width: <%= (active_volunteers * 15) %>%; text-align: center"><%= active_volunteers %></div>
8282
<% end %>
8383
<% if no_attempt_volunteers.nonzero? %>
84-
<div class="status-btn danger-bg text-white flex-grow-1" style="max-width: <%= (no_attempt_volunteers * 15) %>%; text-align: center"><%= no_attempt_volunteers %></div>
84+
<div class="volunteer-info danger-bg text-white flex-grow-1" style="max-width: <%= (no_attempt_volunteers * 15) %>%; text-align: center"><%= no_attempt_volunteers %></div>
8585
<% else %>
8686
<div class="flex-grow-1"></div>
8787
<% end %>
8888
</div>
8989

9090
<div class="d-flex flex-row py-2" style="max-width: 50%;">
9191
<% if !(active_volunteers || no_attempt_volunteers.nonzero?) %>
92-
<div class="status-btn bg-secondary text-white">No assigned volunteers</div>
92+
<div class="volunteer-info bg-secondary text-white">No assigned volunteers</div>
9393
<% else %>
94-
<div class="status-btn deactive-bg text-black" style="width:<%= (transition_volunteers * 15) %>; % text-align: center">
94+
<div class="volunteer-info deactive-bg text-black" style="width:<%= (transition_volunteers * 15) %>; % text-align: center">
9595
<%= transition_volunteers %>
9696
</div>
9797
<% end %>

public/assets/css/main.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ i,
5454
a {
5555
display: inline-block; }
5656

57-
span {
58-
display: block; }
59-
}
6057
audio,
6158
canvas,
6259
iframe,
@@ -510,6 +507,14 @@ h6,
510507
.buttons-group li {
511508
margin: 10px; }
512509

510+
/* ====== Supervisor Volunteer Info ====== */
511+
.volunteer-info {
512+
display: block;
513+
padding: 7px 15px;
514+
border-radius: 30px;
515+
font-size: 14px;
516+
font-weight: 400; }
517+
513518
/* ====== Status Button ====== */
514519
.status-btn {
515520
padding: 7px 15px;

0 commit comments

Comments
 (0)