From 5fc1244e215fcbe96be9938dbf949cf36eb0a98a Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 11:45:46 -0400 Subject: [PATCH 1/9] skylight env --- config/environments/staging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 38bc8e70..9c19707b 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -98,5 +98,5 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - # config.skylight.environments << "staging" + config.skylight.environments << "staging" end From 2be0f884f32a278ba2f5f01d97f8e4cfcef0994a Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 14:37:54 -0400 Subject: [PATCH 2/9] change fields order --- app/views/buildings/_floors.html.erb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/buildings/_floors.html.erb b/app/views/buildings/_floors.html.erb index ae427817..04edf11b 100644 --- a/app/views/buildings/_floors.html.erb +++ b/app/views/buildings/_floors.html.erb @@ -14,9 +14,9 @@ - + @@ -29,15 +29,14 @@ <% rooms.order(:room_number).each do |room| %> + <%= room.rmrecnbr %> + - - + + diff --git a/app/views/common_attributes/_form.html.erb b/app/views/common_attributes/_form.html.erb index 91f3a299..3732f0a7 100644 --- a/app/views/common_attributes/_form.html.erb +++ b/app/views/common_attributes/_form.html.erb @@ -18,12 +18,12 @@
<%= form.check_box :need_checkbox, class: "form-check-input" %> - <%= form.label :need_checkbox, "Needs Checkbox?", class: "form-check-label" %> + <%= form.label :need_checkbox, "Include Yes/No Buttons", class: "form-check-label" %>
<%= form.check_box :need_quantity_box, class: "form-check-input" %> - <%= form.label :need_quantity_box, "Needs Quantity Box?", class: "form-check-label" %> + <%= form.label :need_quantity_box, "Include Quantity Box", class: "form-check-label" %>
diff --git a/app/views/rooms/_attributes_list.html.erb b/app/views/rooms/_attributes_list.html.erb index 6876b3d5..598a9fa9 100644 --- a/app/views/rooms/_attributes_list.html.erb +++ b/app/views/rooms/_attributes_list.html.erb @@ -2,8 +2,8 @@
- - + + diff --git a/app/views/rooms/specific_attributes/_form.html.erb b/app/views/rooms/specific_attributes/_form.html.erb index 5d492f39..5e84feb7 100644 --- a/app/views/rooms/specific_attributes/_form.html.erb +++ b/app/views/rooms/specific_attributes/_form.html.erb @@ -19,12 +19,12 @@ <% unless specific_attribute.specific_attribute_states.present? %>
<%= form.check_box :need_checkbox, class: "form-check-input" %> - <%= form.label :need_checkbox, "Needs Checkbox?", class: "form-check-label" %> + <%= form.label :need_checkbox, "Include Yes/No Buttons", class: "form-check-label" %>
<%= form.check_box :need_quantity_box, class: "form-check-input" %> - <%= form.label :need_quantity_box, "Needs Quantity Box?", class: "form-check-label" %> + <%= form.label :need_quantity_box, "Include Quantity Box ", class: "form-check-label" %>
<% end %> diff --git a/app/views/rooms/specific_attributes/_specific_attributes_list.html.erb b/app/views/rooms/specific_attributes/_specific_attributes_list.html.erb index da610610..9247bb2b 100644 --- a/app/views/rooms/specific_attributes/_specific_attributes_list.html.erb +++ b/app/views/rooms/specific_attributes/_specific_attributes_list.html.erb @@ -3,8 +3,8 @@ - - + + diff --git a/app/views/zones/index.html.erb b/app/views/zones/index.html.erb index 286f040c..c477ca4d 100644 --- a/app/views/zones/index.html.erb +++ b/app/views/zones/index.html.erb @@ -2,7 +2,7 @@

All Zones

- <%= link_to "Add New Zone", new_zone_path, class: "btn btn-primary h-50 mt-auto mb-auto" %> + <%= link_to "Add New Zone", new_zone_path, class: "btn btn-primary focus-ring h-50 mt-auto mb-auto", style: "--bs-focus-ring-color:#ffcb05;" %>
<% @zones.each do |zone| %> diff --git a/spec/system/common_attributes_controller_spec.rb b/spec/system/common_attributes_controller_spec.rb index 6066d030..8772a85f 100644 --- a/spec/system/common_attributes_controller_spec.rb +++ b/spec/system/common_attributes_controller_spec.rb @@ -14,7 +14,7 @@ VCR.use_cassette "common_attribute" do visit common_attributes_path fill_in "Description", with: "common attribute one" - check "Needs Checkbox?" + check "Include Yes/No Buttons" click_on "Create" expect(page).to have_content("Common attribute was successfully created.") expect(CommonAttribute.find_by(description: "common attribute one").present?).to be_truthy diff --git a/spec/system/specific_attributes_controller_spec.rb b/spec/system/specific_attributes_controller_spec.rb index 2409fa57..22dab8f5 100644 --- a/spec/system/specific_attributes_controller_spec.rb +++ b/spec/system/specific_attributes_controller_spec.rb @@ -15,7 +15,7 @@ VCR.use_cassette "specific_attribute" do visit "rooms/#{room.id}/specific_attributes" fill_in "Description", with: "specific attribute one" - check "Needs Checkbox?" + check "Include Yes/No Buttons" click_on "Create" expect(page).to have_content("Specific attribute was successfully created.") expect(SpecificAttribute.find_by(description: "specific attribute one").present?).to be_truthy From 4e4d6b04b702f35b9487a8641a917d4488c3d784 Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Fri, 26 Jul 2024 11:04:43 -0400 Subject: [PATCH 8/9] edit dashboard --- app/views/static_pages/dashboard.html.erb | 49 ++++++++++++----------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/app/views/static_pages/dashboard.html.erb b/app/views/static_pages/dashboard.html.erb index 0f604569..a6a900c9 100644 --- a/app/views/static_pages/dashboard.html.erb +++ b/app/views/static_pages/dashboard.html.erb @@ -1,26 +1,25 @@

Admin Dashboard - <%= show_date_with_month_name(@selected_date) %>

+
+

Zone Overview for

<%= form_with url: dashboard_path, method: :get, - data: { - controller: "autosubmit", - autosubmit_target: "form" - } do |form| %> -
-
- <%= form.label :dashboard_date, "Change Date to Update Zone Overview" %> -
-
- <%= form.date_field :dashboard_date, value: @selected_date, max: Date.today.to_s, :"data-action" => "change->autosubmit#submitForm" %> + data: { + controller: "autosubmit", + autosubmit_target: "form" + } do |form| %> +
+
+
-
<% end %> - - -

Zone Overview

-
+
+
+ <% @zones.each do |zone| %> -
+

<%= zone.name %>

@@ -46,8 +45,8 @@

Reports for Last Checks

-
-
+
+

Rooms were not Accessable

@@ -58,7 +57,7 @@
-
+

Rooms were not Checked

@@ -72,9 +71,9 @@

Recent Room Issues

-
+
<% latest_room_tickets.each do |ticket| %> -
+

@@ -92,7 +91,9 @@


Daily Resource Update Script

- <% if @room_update_log %> - <%= render 'last_room_update_log', last_room_update_log: @room_update_log %> - <% end %> +
+ <% if @room_update_log %> + <%= render 'last_room_update_log', last_room_update_log: @room_update_log %> + <% end %> +
From 9f03dcbf2462e5337cb331d7a2ac1c08b051e044 Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Fri, 26 Jul 2024 11:52:30 -0400 Subject: [PATCH 9/9] edit dashboard styles --- app/assets/stylesheets/_custom_layout.scss | 6 ++++++ app/views/static_pages/dashboard.html.erb | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/_custom_layout.scss b/app/assets/stylesheets/_custom_layout.scss index 975c2106..e944ae62 100644 --- a/app/assets/stylesheets/_custom_layout.scss +++ b/app/assets/stylesheets/_custom_layout.scss @@ -322,6 +322,12 @@ svg.wh6 { white-space: nowrap; } +@media (min-width: 1400px) { + .nowrap-card { + white-space: nowrap; + } +} + .nav-user { font-size: 0.875rem; width: 150px; diff --git a/app/views/static_pages/dashboard.html.erb b/app/views/static_pages/dashboard.html.erb index a6a900c9..7e44b1cc 100644 --- a/app/views/static_pages/dashboard.html.erb +++ b/app/views/static_pages/dashboard.html.erb @@ -16,11 +16,11 @@
<% end %>
-
+
<% @zones.each do |zone| %>
-
+

<%= zone.name %>

@@ -34,7 +34,7 @@
- + <%= rooms_checked_for_date(zone, @selected_date) %>/<%= total_rooms(zone) %> Classrooms Complete
Room Record Number Number Room TypeRoom Record Number View
- <%#= link_to room.room_number, room_path(room), class: "link_to" %> - <%= room.rmrecnbr %> + <%= link_to room.room_number, room_path(room), data: { turbo_frame: "_top" }, class: "link_to" %> - <%= link_to room.room_number, room_path(room), data: { turbo_frame: "_top" }, class: "link_to" %> + <%= room.room_type %> - <%= room.room_type %> - <%= link_to room_path(room), class: "link_to", 'data-bs-toggle': "tooltip", 'data-bs-placement': "bottom", 'title': "View", data: { turbo_frame: "_top" } do %> From 03d4a456b991be5ca58e4874bbd8fe1279d368c9 Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 14:38:12 -0400 Subject: [PATCH 3/9] add placeholders --- app/views/buildings/_form.html.erb | 2 +- app/views/zones/_form.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/buildings/_form.html.erb b/app/views/buildings/_form.html.erb index 9ee2eb18..2899a52e 100644 --- a/app/views/buildings/_form.html.erb +++ b/app/views/buildings/_form.html.erb @@ -11,7 +11,7 @@ <% end %>
<%= form.label :bldrecnbr, 'Building Record Number', class: "nowrap" %> - <%= form.text_field :bldrecnbr, required: true %> + <%= form.text_field :bldrecnbr, required: true, placeholder: "Building Record Number" %>
<% if @zone.present? %> diff --git a/app/views/zones/_form.html.erb b/app/views/zones/_form.html.erb index a43ad9ff..14282ac0 100644 --- a/app/views/zones/_form.html.erb +++ b/app/views/zones/_form.html.erb @@ -13,7 +13,7 @@
<%= form.label :name, class: "nowrap" %> - <%= form.text_field :name %> + <%= form.text_field :name, placeholder: "Zone Name" %>
From 1cc792679f49d0d1b167484f82e81980284ee0fc Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 14:38:54 -0400 Subject: [PATCH 4/9] edit buttons --- app/views/buildings/index.html.erb | 2 +- app/views/rooms/room_states/index.html.erb | 4 ++-- app/views/rooms/show.html.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/buildings/index.html.erb b/app/views/buildings/index.html.erb index 55d16429..87748238 100644 --- a/app/views/buildings/index.html.erb +++ b/app/views/buildings/index.html.erb @@ -2,7 +2,7 @@

Buildings

- <%= link_to "Add Building", new_building_path, class: "btn btn-primary" %> + <%= link_to "Add New Building", new_building_path, class: "btn btn-primary" %>
diff --git a/app/views/rooms/room_states/index.html.erb b/app/views/rooms/room_states/index.html.erb index 9f14742e..420b407f 100644 --- a/app/views/rooms/room_states/index.html.erb +++ b/app/views/rooms/room_states/index.html.erb @@ -9,7 +9,7 @@ <%# Filter to get recent states %>

- Enter a Time Period to Filter Room States + Enter a Time Period to Filter Room Checks

<%= form_with url: room_room_states_path(@room), method: :get, @@ -23,7 +23,7 @@ <%= form.label :to, "To: "%> <%= form.date_field :to, value: params[:to], class: "form-control" %>
- <%= form.submit "Filter Room States" %> + <%= form.submit "Filter Room Checks" %> Clear Filters <%end%>
diff --git a/app/views/rooms/show.html.erb b/app/views/rooms/show.html.erb index acbf37be..4220c7cf 100644 --- a/app/views/rooms/show.html.erb +++ b/app/views/rooms/show.html.erb @@ -3,7 +3,7 @@

Room: <%= @room.full_name %>

<%= link_to 'Back to Building', building_path(@room.floor.building), class: "link_to" %> - <%= link_to 'Show Room States', room_room_states_path(@room), class: 'btn btn-primary h-50 mt-auto mb-auto' %> + <%= link_to 'Show Room Checks', room_room_states_path(@room), class: 'btn btn-primary h-50 mt-auto mb-auto' %>
From b5b48631785198220f3e214b733c77f235c0adf6 Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 14:44:17 -0400 Subject: [PATCH 5/9] add more placeholders --- app/views/app_preferences/_form.html.erb | 4 ++-- app/views/common_attributes/_form.html.erb | 2 +- app/views/rooms/_form.html.erb | 2 +- app/views/rooms/specific_attributes/_form.html.erb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/app_preferences/_form.html.erb b/app/views/app_preferences/_form.html.erb index 03142530..60992309 100644 --- a/app/views/app_preferences/_form.html.erb +++ b/app/views/app_preferences/_form.html.erb @@ -14,12 +14,12 @@
<%= form.label :name, "Name *", class: "form-label" %> - <%= form.text_field :name, class: "form-control form-control-sm", required: true %> + <%= form.text_field :name, class: "form-control form-control-sm", required: true, placeholder: "Name" %>
<%= form.label :description, "Description *", class: "form-label" %> - <%= form.text_field :description, class: "form-control form-control-sm", required: true %> + <%= form.text_field :description, class: "form-control form-control-sm", required: true, placeholder: "Description" %>
diff --git a/app/views/common_attributes/_form.html.erb b/app/views/common_attributes/_form.html.erb index 7ddd30de..91f3a299 100644 --- a/app/views/common_attributes/_form.html.erb +++ b/app/views/common_attributes/_form.html.erb @@ -13,7 +13,7 @@
<%= form.label :description, "Description *", class: "form-label" %> - <%= form.text_field :description, class: "form-control form-control-sm", required: true %> + <%= form.text_field :description, class: "form-control form-control-sm", required: true, placeholder: "Description" %>
diff --git a/app/views/rooms/_form.html.erb b/app/views/rooms/_form.html.erb index d8b2322f..28a47cc9 100644 --- a/app/views/rooms/_form.html.erb +++ b/app/views/rooms/_form.html.erb @@ -13,7 +13,7 @@ <% end %>
<%= form.label :rmrecnbr, 'Room Record Number (Barcode) *', class: "nowrap" %> - <%= form.text_field :rmrecnbr, required: true %> + <%= form.text_field :rmrecnbr, required: true, placeholder: "Room Record Number" %>
<%= hidden_field_tag 'building_id', @building.id %> diff --git a/app/views/rooms/specific_attributes/_form.html.erb b/app/views/rooms/specific_attributes/_form.html.erb index 187c0fe2..5d492f39 100644 --- a/app/views/rooms/specific_attributes/_form.html.erb +++ b/app/views/rooms/specific_attributes/_form.html.erb @@ -13,7 +13,7 @@
<%= form.label :description, "Description *", class: "form-label" %> - <%= form.text_field :description, class: "form-control form-control-sm", required: true %> + <%= form.text_field :description, class: "form-control form-control-sm", required: true, placeholder: "Description" %>
<% unless specific_attribute.specific_attribute_states.present? %> From fe13d023459317a27c3f7fe356145c9b2c8adbb4 Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Thu, 25 Jul 2024 18:02:41 -0400 Subject: [PATCH 6/9] add margins around announcements --- app/views/common_attribute_states/edit.html.erb | 4 ++-- app/views/common_attribute_states/new.html.erb | 4 ++-- app/views/resource_states/edit.html.erb | 4 ++-- app/views/resource_states/new.html.erb | 4 ++-- app/views/rooms/room_states/edit.html.erb | 10 +++++----- app/views/rooms/room_states/new.html.erb | 8 ++++---- app/views/specific_attribute_states/edit.html.erb | 4 ++-- app/views/specific_attribute_states/new.html.erb | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/common_attribute_states/edit.html.erb b/app/views/common_attribute_states/edit.html.erb index e0bf7c72..f5f8a9c9 100644 --- a/app/views/common_attribute_states/edit.html.erb +++ b/app/views/common_attribute_states/edit.html.erb @@ -25,8 +25,8 @@
<% if @common_form_announcement.content.present? %> -
-

<%= @common_form_announcement.content %>

+
+ <%= @common_form_announcement.content %>
<% end %>
diff --git a/app/views/common_attribute_states/new.html.erb b/app/views/common_attribute_states/new.html.erb index 977bff72..391ea424 100644 --- a/app/views/common_attribute_states/new.html.erb +++ b/app/views/common_attribute_states/new.html.erb @@ -25,8 +25,8 @@
<% if @common_form_announcement.content.present? %> -
-

<%= @common_form_announcement.content %>

+
+ <%= @common_form_announcement.content %>
<% end %>
diff --git a/app/views/resource_states/edit.html.erb b/app/views/resource_states/edit.html.erb index 535fab66..78766fae 100644 --- a/app/views/resource_states/edit.html.erb +++ b/app/views/resource_states/edit.html.erb @@ -30,8 +30,8 @@
<% if @resource_form_announcement.content.present? %> -
-

<%= @resource_form_announcement.content %>

+
+ <%= @resource_form_announcement.content %>
<% end %>
diff --git a/app/views/resource_states/new.html.erb b/app/views/resource_states/new.html.erb index 683ad5a9..429b63bf 100644 --- a/app/views/resource_states/new.html.erb +++ b/app/views/resource_states/new.html.erb @@ -31,8 +31,8 @@
<% if @resource_form_announcement.content.present? %> -
-

<%= @resource_form_announcement.content %>

+
+ <%= @resource_form_announcement.content %>
<% end %>
diff --git a/app/views/rooms/room_states/edit.html.erb b/app/views/rooms/room_states/edit.html.erb index 7ec55697..4fe62dcb 100644 --- a/app/views/rooms/room_states/edit.html.erb +++ b/app/views/rooms/room_states/edit.html.erb @@ -7,7 +7,7 @@

Edit Room Check for Room <%= @room.room_number %>

-

Location: <%= @room.floor.building.name %> (Floor <%= @room.floor.name %>)

+

Location: <%= @room.floor.building.name %> (Floor <%= @room.floor.name %>)

@@ -20,16 +20,16 @@
<% if @rovers_form_announcement.content.present? %> -
-

<%= @rovers_form_announcement.content %>

+
+ <%= @rovers_form_announcement.content %>
<% end %>
<% if @notes.present? %> -
-

Notes

+
+

Room Notes

<% @notes.each do |note| %>

<%= note.content %> diff --git a/app/views/rooms/room_states/new.html.erb b/app/views/rooms/room_states/new.html.erb index 532c5b20..82f606af 100644 --- a/app/views/rooms/room_states/new.html.erb +++ b/app/views/rooms/room_states/new.html.erb @@ -10,7 +10,7 @@

Location: <%= @room.floor.building.name %> (Floor <%= @room.floor.name %>)

- + Show Announcement @@ -20,7 +20,7 @@
<% if @rovers_form_announcement.content.present? %> -
+

<%= @rovers_form_announcement.content %>

<% end %> @@ -28,8 +28,8 @@
<% if @notes.present? %> -
-

Notes

+
+

Room Notes

<% @notes.each do |note| %>

<%= note.content %> diff --git a/app/views/specific_attribute_states/edit.html.erb b/app/views/specific_attribute_states/edit.html.erb index ec8a7494..35b7822a 100644 --- a/app/views/specific_attribute_states/edit.html.erb +++ b/app/views/specific_attribute_states/edit.html.erb @@ -28,8 +28,8 @@

<% if @specific_form_announcement.content.present? %> -
-

<%= @specific_form_announcement.content %>

+
+ <%= @specific_form_announcement.content %>
<% end %>
diff --git a/app/views/specific_attribute_states/new.html.erb b/app/views/specific_attribute_states/new.html.erb index 809c989b..2bcc39e8 100644 --- a/app/views/specific_attribute_states/new.html.erb +++ b/app/views/specific_attribute_states/new.html.erb @@ -27,8 +27,8 @@
<% if @specific_form_announcement.content.present? %> -
-

<%= @specific_form_announcement.content %>

+
+ <%= @specific_form_announcement.content %>
<% end %>
From 05d4cbc87525a3f0021d0154401501d4ff50b6ee Mon Sep 17 00:00:00 2001 From: Margarita Barvinok Date: Fri, 26 Jul 2024 10:12:02 -0400 Subject: [PATCH 7/9] checnge titles --- app/views/common_attributes/_common_attributes_list.html.erb | 4 ++-- app/views/common_attributes/_form.html.erb | 4 ++-- app/views/rooms/_attributes_list.html.erb | 4 ++-- app/views/rooms/specific_attributes/_form.html.erb | 4 ++-- .../specific_attributes/_specific_attributes_list.html.erb | 4 ++-- app/views/zones/index.html.erb | 2 +- spec/system/common_attributes_controller_spec.rb | 2 +- spec/system/specific_attributes_controller_spec.rb | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/views/common_attributes/_common_attributes_list.html.erb b/app/views/common_attributes/_common_attributes_list.html.erb index 7098e031..51d4c88d 100644 --- a/app/views/common_attributes/_common_attributes_list.html.erb +++ b/app/views/common_attributes/_common_attributes_list.html.erb @@ -2,8 +2,8 @@
DescriptionNeeds Checkbox?Needs Quantity Box?Include Yes/No ButtonsInclude Quantity Box Edit <%= @option_header %>
DescriptionNeeds Checkbox?Needs Quantity Box?Include Yes/No ButtonsInclude Quantity Box
DescriptionNeeds Checkbox?Needs Quantity Box?Include Yes/No ButtonsInclude Quantity Box Edit <%= @action_title %>