Skip to content

Commit a0a3965

Browse files
committed
Merge remote-tracking branch 'origin/main' into request-limit-on-forms
2 parents b163681 + 0d71043 commit a0a3965

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+135
-92
lines changed

app/controllers/kits_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
class KitsController < ApplicationController
2+
def show
3+
redirect_to allocations_kit_path
4+
end
5+
26
def index
37
@kits = current_organization.kits.includes(:item, line_items: :item).class_filter(filter_params)
48
@inventory = View::Inventory.new(current_organization.id)

app/helpers/kits_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def deactivate_kit_button(kit, inventory)
1010
tag.span(**span_options) do
1111
deactivate_button_to(deactivate_kit_path(kit),
1212
options.merge({text: "Deactivate",
13-
confirm: confirm_deactivate_msg(kit.name), size: "m"}))
13+
confirm: confirm_deactivate_msg(kit.name), size: "xs"}))
1414
end
1515
end
1616
end

app/javascript/controllers/deadline_day_controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default class extends Controller {
4747

4848
if (this.byDayOfMonthTarget.checked && this.dayOfMonthTarget.value) {
4949
const rule = new RRule({
50-
dtstart: today,
50+
dtstart: new Date(Date.UTC(today.getFullYear(), today.getMonth(), today.getDate(), 12)),
5151
freq: RRule.MONTHLY,
5252
interval: monthlyInterval,
5353
bymonthday: parseInt(this.dayOfMonthTarget.value),
@@ -57,7 +57,7 @@ export default class extends Controller {
5757
}
5858
if (this.byDayOfWeekTarget.checked && this.everyNthDayTarget.value && (this.dayOfWeekTarget.value)) {
5959
const rule = new RRule({
60-
dtstart: today,
60+
dtstart: new Date(Date.UTC(today.getFullYear(), today.getMonth(), today.getDate(), 12)),
6161
freq: RRule.MONTHLY,
6262
interval: monthlyInterval,
6363
byweekday: WEEKDAY_NUM_TO_OBJ[ parseInt(this.dayOfWeekTarget.value) ].nth( parseInt(this.everyNthDayTarget.value) ),

app/jobs/backup_db_rds.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ def self.run
1818
client.put_object(key: "backups/#{backup_filename}",
1919
body: File.read(backup_filename),
2020
bucket: "human-essentials-backups")
21+
22+
Rails.root.glob("*.rds.dump").each do |file|
23+
File.delete(file)
24+
end
2125
end
2226
end

app/models/partners/profile.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
# new_client_times :string
3838
# no_social_media_presence :boolean
3939
# other_agency_type :string
40-
# partner_status :string default("pending")
4140
# pick_up_email :string
4241
# pick_up_name :string
4342
# pick_up_phone :string

app/models/storage_location.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def validate_empty_inventory
159159
end
160160

161161
def self.csv_export_headers
162-
["Name", "Address", "Square Footage", "Warehouse Type", "Total Inventory"]
162+
["Name", "Address", "Square Footage", "Warehouse Type", "Total Inventory", "Fair Market Value"]
163163
end
164164

165165
# @param storage_locations [Array<StorageLocation>]
@@ -171,7 +171,7 @@ def self.generate_csv_from_inventory(storage_locations, inventory)
171171
CSV.generate(headers: true) do |csv|
172172
csv_data = storage_locations.map do |sl|
173173
total_quantity = inventory.quantity_for(storage_location: sl.id)
174-
attributes = [sl.name, sl.address, sl.square_footage, sl.warehouse_type, total_quantity] +
174+
attributes = [sl.name, sl.address, sl.square_footage, sl.warehouse_type, total_quantity, sl.inventory_total_value_in_dollars] +
175175
all_items.map { |i| inventory.quantity_for(storage_location: sl.id, item_id: i.item_id) }
176176
attributes.map { |attr| normalize_csv_attribute(attr) }
177177
end

app/views/adjustments/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<th>Storage location</th>
8181
<th>Comment</th>
8282
<th>Summary</th>
83-
<th>&nbsp;</th>
83+
<th class="text-right">Actions</th>
8484
</tr>
8585
</thead>
8686
<tbody>

app/views/admin/account_requests/_open_account_request.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<%= open_account_request.name %>
1111
<br><%= open_account_request.email %>
1212
</td>
13-
<td><%= js_button(text: 'Reject',
13+
<td class="text-right"><%= js_button(text: 'Reject',
1414
icon: 'ban',
1515
class: 'reject-button',
16-
data: { request_id: open_account_request.id, modal: 'reject' }) %></td>
17-
<td><%= js_button(text: 'Close (Admin)',
16+
data: { request_id: open_account_request.id, modal: 'reject' }) %>
17+
<%= js_button(text: 'Close (Admin)',
1818
icon: 'times',
1919
class: 'reject-button',
2020
data: { request_id: open_account_request.id, modal: 'close' }) %></td>

app/views/admin/account_requests/for_rejection.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<th>Request details</th>
2626
<th>Request status</th>
2727
<th>Contact Details</th>
28-
<th>Actions</th>
28+
<th class="text-right">Actions</th>
2929
</tr>
3030
</thead>
3131
<tbody>

app/views/admin/account_requests/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<th>Request details</th>
2727
<th>Request status</th>
2828
<th>Contact Details</th>
29-
<th>Actions</th>
29+
<th class="text-right">Actions</th>
3030
</tr>
3131
</thead>
3232
<tbody>

0 commit comments

Comments
 (0)