mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-09 08:47:11 -05:00
Return missing map buttons
This commit is contained in:
parent
0295d3f2a0
commit
9a326733c7
4 changed files with 5 additions and 13 deletions
|
|
@ -236,6 +236,9 @@ export default class extends BaseController {
|
|||
|
||||
// Add right panel toggle
|
||||
this.addTogglePanelButton();
|
||||
|
||||
// Add visits buttons after calendar button to position them below
|
||||
this.visitsManager.addDrawerButton();
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Stat < ApplicationRecord
|
|||
timespan.to_a.map.with_index(1) do |day, index|
|
||||
daily_points = filter_points_for_day(monthly_points, day)
|
||||
# Calculate distance in meters for consistent storage
|
||||
distance_meters = Point.total_distance(daily_points, :km)
|
||||
distance_meters = Point.total_distance(daily_points, :m)
|
||||
[index, distance_meters.round]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -121,17 +121,6 @@ RSpec.describe Point, type: :model do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#recalculate_track' do
|
||||
let(:point) { create(:point, track: track) }
|
||||
let(:track) { create(:track) }
|
||||
|
||||
it 'recalculates the track' do
|
||||
expect(track).to receive(:recalculate_path_and_distance!)
|
||||
|
||||
point.update(lonlat: 'POINT(-79.85581250721961 15.854775993302411)')
|
||||
end
|
||||
end
|
||||
|
||||
describe '#trigger_incremental_track_generation' do
|
||||
let(:point) do
|
||||
create(:point, track: track, import_id: nil, timestamp: 1.hour.ago.to_i, reverse_geocoded_at: 1.hour.ago)
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ RSpec.describe Tracks::TrackBuilder do
|
|||
end
|
||||
|
||||
before do
|
||||
allow_any_instance_of(Track).to receive(:save!).and_return(false)
|
||||
allow_any_instance_of(Track).to receive(:save).and_return(false)
|
||||
end
|
||||
|
||||
it 'returns nil and logs error' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue