We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ce2cb commit afc9be0Copy full SHA for afc9be0
lib/algora/matches/matches.ex
@@ -281,11 +281,15 @@ defmodule Algora.Matches do
281
Check if a match is considered "new" (within the last 7 days and not yet approved/bookmarked by company).
282
"""
283
def is_match_new?(match) do
284
- one_week_ago = DateTime.add(DateTime.utc_now(), -7, :day)
285
-
286
is_nil(match.company_approved_at) &&
287
is_nil(match.company_bookmarked_at) &&
288
- DateTime.after?(match.inserted_at, one_week_ago)
+ is_match_recent?(match)
+ end
+
289
+ def is_match_recent?(match) do
290
+ one_week_ago = DateTime.add(DateTime.utc_now(), -7, :day)
291
292
+ DateTime.after?(match.inserted_at, one_week_ago)
293
end
294
295
def get_latest_match_with_notes(user_id) do
0 commit comments