Skip to content

Commit 8429f00

Browse files
committed
feat: update dashboard achievements
1 parent 654b3d4 commit 8429f00

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
809809
{&install_app_status/1, "Install the Algora app", nil},
810810
{&create_bounty_status/1, "Create a bounty", nil},
811811
{&reward_bounty_status/1, "Reward a bounty", nil},
812-
{&begin_collaboration_status/1, "Contract a contributor", nil},
813-
{&complete_first_contract_status/1, "Complete a contract", nil}
812+
{&share_with_friend_status/1, "Share Algora with a friend", nil}
814813
]
815814

816815
{achievements, _} =
@@ -853,17 +852,5 @@ defmodule AlgoraWeb.Org.DashboardLive do
853852
end
854853
end
855854

856-
defp begin_collaboration_status(socket) do
857-
case Contracts.list_contracts(client_id: socket.assigns.current_org.id, active_or_paid?: true, limit: 1) do
858-
[] -> :upcoming
859-
_ -> :completed
860-
end
861-
end
862-
863-
defp complete_first_contract_status(socket) do
864-
case Contracts.list_contracts(client_id: socket.assigns.current_org.id, status: :paid, limit: 1) do
865-
[] -> :upcoming
866-
_ -> :completed
867-
end
868-
end
855+
defp share_with_friend_status(_socket), do: :upcoming
869856
end

lib/algora_web/live/user/dashboard_live.ex

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ defmodule AlgoraWeb.User.DashboardLive do
191191
<!-- Achievements Section -->
192192
<div class="mt-8 flex items-center justify-between">
193193
<h2 class="text-xl font-semibold leading-none tracking-tight">Achievements</h2>
194-
<.link
195-
class="whitespace-pre text-sm text-muted-foreground hover:underline hover:brightness-125"
196-
href="#"
197-
>
198-
View all
199-
</.link>
200194
</div>
201195
<nav class="pt-4">
202196
<ol role="list" class="space-y-6">
@@ -216,7 +210,7 @@ defmodule AlgoraWeb.User.DashboardLive do
216210
{&personalize_status/1, "Personalize Algora", nil},
217211
{&setup_stripe_status/1, "Create Stripe account", ~p"/user/transactions"},
218212
{&earn_first_bounty_status/1, "Earn first bounty", ~p"/bounties"},
219-
{&earn_through_referral_status/1, "Earn through referral", nil},
213+
{&share_with_friend_status/1, "Share Algora with a friend", nil},
220214
{&earn_10k_status/1, "Earn $10K", ~p"/bounties"}
221215
]
222216

@@ -256,8 +250,7 @@ defmodule AlgoraWeb.User.DashboardLive do
256250
end
257251
end
258252

259-
# TODO: implement referral earnings check
260-
defp earn_through_referral_status(_socket), do: :upcoming
253+
defp share_with_friend_status(_socket), do: :upcoming
261254

262255
defp earn_10k_status(socket) do
263256
if earned?(socket.assigns.current_user, Money.new!(10_000, :USD)) do

0 commit comments

Comments
 (0)