mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Merge pull request #246 from Freika/fix/visits-notificaton-url
Fix/visits notificaton url
This commit is contained in:
commit
3c1aa1655e
3 changed files with 8 additions and 2 deletions
|
|
@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
- `GET /api/v1/points` response now will include `X-Total-Pages` and `X-Current-Page` headers to make it easier to work with the endpoint
|
||||
- The Pages point now shows total number of points found for provided date range
|
||||
|
||||
## Fixed
|
||||
|
||||
- Link to Visits page in notification informing about new visit suggestion
|
||||
|
||||
|
||||
## [0.13.6] — 2024-09-13
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Visits::Suggest
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
attr_reader :points, :user, :start_at, :end_at
|
||||
|
||||
def initialize(user, start_at:, end_at:)
|
||||
|
|
@ -72,7 +74,7 @@ class Visits::Suggest
|
|||
|
||||
def create_visits_notification(user)
|
||||
content = <<~CONTENT
|
||||
New visits have been suggested based on your location data from #{Time.zone.at(start_at)} to #{Time.zone.at(end_at)}. You can review them in the <%= link_to 'Visits', visits_path %> section.
|
||||
New visits have been suggested based on your location data from #{Time.zone.at(start_at)} to #{Time.zone.at(end_at)}. You can review them on the <a href="#{visits_path}" class="link">Visits</a> page.
|
||||
CONTENT
|
||||
|
||||
user.notifications.create!(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<% if params[:action] == 'show' %>
|
||||
<div class="mt-2">
|
||||
<%= notification.content %>
|
||||
<%= notification.content.html_safe %>
|
||||
|
||||
<% if notification.error? %>
|
||||
<div class="mt-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue