Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: link scheduling #75

Merged
merged 17 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feat:fregment update
  • Loading branch information
AfonsoMartins26 committed Sep 18, 2024
commit 3f115897703978f5f61c679c1a8fb654054ef286
2 changes: 1 addition & 1 deletion lib/cesium_link/links.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule CesiumLink.Links do
"""
def list_unarchived_links_by_index do
Link
|> where([l], fragment("? > now()", l.publish_at))
|> where([l], fragment("? <= now() OR ? IS NULL", l.publish_at, l.publish_at))
|> where([l], l.archived == false)
|> order_by([l], asc: l.index)
|> Repo.all()
Expand Down
1 change: 1 addition & 0 deletions lib/cesium_link_web/live/link_live/form_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defmodule CesiumLinkWeb.LinkLive.FormComponent do
<.input field={@form[:emoji]} type="emoji" label="Emoji" />
<.input field={@form[:url]} type="text" label="URL" />
<.input field={@form[:attention]} type="checkbox" label="Attention" />
<.input field={@form[:publish_at]} type="datetime-local" label="Publish At" />
<:actions>
<.button phx-disable-with="Saving...">Save Link</.button>
</:actions>
Expand Down
Loading