Skip to content

Commit 5133a46

Browse files
committed
in midst of updating matches section
1 parent 73de786 commit 5133a46

File tree

1 file changed

+62
-42
lines changed

1 file changed

+62
-42
lines changed

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,23 @@ defmodule AlgoraWeb.Org.DashboardLive do
365365
subtitle="Top 1% Algora developers in your tech stack available to hire now"
366366
>
367367
<div class="relative w-full flex flex-col gap-4">
368+
<div class="lg:pb-2 lg:pt-4 flex flex-col lg:flex-row gap-4 lg:gap-8">
369+
<h3 class="text-xl font-semibold whitespace-nowrap">How it works</h3>
370+
<ul class="lg:mx-auto grid grid-cols-1 lg:grid-cols-3 gap-4 text-sm font-medium">
371+
<li class="flex items-start">
372+
<.icon name="tabler-circle-number-1 mr-2" class="size-6 text-success-400 shrink-0" />
373+
Authorize payment to offer contract
374+
</li>
375+
<li class="flex items-start">
376+
<.icon name="tabler-circle-number-2 mr-2" class="size-6 text-success-400 shrink-0" />
377+
Escrowed when developer accepts
378+
</li>
379+
<li class="flex items-start">
380+
<.icon name="tabler-circle-number-3 mr-2" class="size-6 text-success-400 shrink-0" />
381+
Release or withhold escrow end of week
382+
</li>
383+
</ul>
384+
</div>
368385
<%= for match <- @matches do %>
369386
<.match_card
370387
match={match}
@@ -1297,8 +1314,8 @@ defmodule AlgoraWeb.Org.DashboardLive do
12971314

12981315
defp match_card(assigns) do
12991316
~H"""
1300-
<div class="relative flex flex-col xl:flex-row xl:items-center xl:justify-between gap-4 sm:gap-8 xl:gap-4 2xl:gap-8 border bg-card rounded-xl text-card-foreground shadow p-6">
1301-
<div class="xl:basis-[45%] w-full truncate">
1317+
<div class="relative flex flex-col xl:flex-row xl:items-center xl:justify-between gap-4 sm:gap-8 xl:gap-4 2xl:gap-6 border bg-card rounded-xl text-card-foreground shadow p-6">
1318+
<div class="xl:basis-[51%] w-full truncate">
13021319
<div class="flex items-center justify-between gap-4">
13031320
<div class="flex items-center gap-4">
13041321
<.link navigate={User.url(@match.user)}>
@@ -1363,45 +1380,10 @@ defmodule AlgoraWeb.Org.DashboardLive do
13631380
</div> --%>
13641381
</div>
13651382
</div>
1366-
<.button
1367-
phx-click="share_opportunity"
1368-
phx-value-user_id={@match.user.id}
1369-
phx-value-type="contract"
1370-
phx-value-marketplace="true"
1371-
variant="none"
1372-
class="group bg-emerald-900/10 text-emerald-300 transition-colors duration-75 hover:bg-emerald-800/10 hover:text-emerald-300 hover:drop-shadow-[0_1px_5px_#34d39980] focus:bg-emerald-800/10 focus:text-emerald-300 focus:outline-none focus:drop-shadow-[0_1px_5px_#34d39980] border border-emerald-400/40 hover:border-emerald-400/50 focus:border-emerald-400/50"
1373-
>
1374-
<.icon name="tabler-contract" class="size-4 text-current mr-2 -ml-1" /> Contract
1375-
</.button>
13761383
</div>
1377-
<dl :if={@match[:hourly_rate]} class="pt-4">
1378-
<div class="flex justify-between">
1379-
<dt class="text-foreground">
1380-
Total payment for <span class="font-semibold">{@match.user.hours_per_week || 30}</span>
1381-
hours
1382-
<span class="text-xs text-muted-foreground">
1383-
({@match.user.name}'s availability)
1384-
</span>
1385-
<div class="text-xs text-muted-foreground">
1386-
(includes all platform and payment processing fees)
1387-
</div>
1388-
</dt>
1389-
<dd class="font-display font-semibold tabular-nums text-lg text-emerald-400">
1390-
{Money.to_string!(
1391-
Money.mult!(
1392-
@match[:hourly_rate] |> Money.mult!(@match.user.hours_per_week || 30),
1393-
Decimal.new("1.13")
1394-
)
1395-
)}
1396-
</dd>
1397-
</div>
1398-
</dl>
1399-
</div>
1400-
1401-
<div class="pt-2 xl:pt-0 xl:pl-4 2xl:pl-8 xl:basis-[55%] xl:border-l xl:border-border">
1402-
<div class="text-sm sm:text-base text-foreground font-medium">
1384+
<div class="pt-4 text-sm sm:text-base text-muted-foreground font-medium">
14031385
Completed
1404-
<span class="font-semibold font-display text-emerald-400">
1386+
<span class="font-semibold font-display text-foreground/80">
14051387
{@match.user.transactions_count}
14061388
{ngettext(
14071389
"bounty",
@@ -1410,7 +1392,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
14101392
)}
14111393
</span>
14121394
across
1413-
<span class="font-semibold font-display text-emerald-400">
1395+
<span class="font-semibold font-display text-foreground/80">
14141396
{ngettext(
14151397
"%{count} project",
14161398
"%{count} projects",
@@ -1431,7 +1413,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
14311413
</.avatar_fallback>
14321414
</.avatar>
14331415
<div class="flex flex-col">
1434-
<div class="text-base font-medium text-muted-foreground">
1416+
<div class="text-base font-medium text-foreground/80">
14351417
{project.name}
14361418
</div>
14371419
@@ -1442,7 +1424,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
14421424
)}
14431425
</div>
14441426
<div class="text-sm text-muted-foreground">
1445-
<span class="text-foreground font-display font-semibold">
1427+
<span class="text-foreground/80 font-display font-semibold">
14461428
{total_earned}
14471429
</span>
14481430
awarded
@@ -1453,6 +1435,44 @@ defmodule AlgoraWeb.Org.DashboardLive do
14531435
<% end %>
14541436
</div>
14551437
</div>
1438+
1439+
<div class="pt-2 xl:pt-0 xl:pl-4 2xl:pl-6 xl:basis-[49%] w-full xl:border-l xl:border-border">
1440+
<dl :if={@match[:hourly_rate]} class="pt-4">
1441+
<div class="flex flex-col-reverse 3xl:flex-row justify-between items-center gap-2">
1442+
<dt class="text-foreground text-center">
1443+
Total payment for <span class="font-semibold">{@match.user.hours_per_week || 30}</span>
1444+
hours
1445+
<div class="text-[12px] text-muted-foreground">
1446+
(includes all platform and payment processing fees)
1447+
</div>
1448+
</dt>
1449+
<div class="flex flex-col items-center gap-2">
1450+
<.button
1451+
phx-click="share_opportunity"
1452+
phx-value-user_id={@match.user.id}
1453+
phx-value-type="contract"
1454+
phx-value-marketplace="true"
1455+
variant="none"
1456+
class="group bg-emerald-900/10 text-emerald-300 transition-colors duration-75 hover:bg-emerald-800/10 hover:text-emerald-300 hover:drop-shadow-[0_1px_5px_#34d39980] focus:bg-emerald-800/10 focus:text-emerald-300 focus:outline-none focus:drop-shadow-[0_1px_5px_#34d39980] border border-emerald-400/40 hover:border-emerald-400/50 focus:border-emerald-400/50 h-full py-4"
1457+
size="xl"
1458+
>
1459+
<div class="flex flex-col items-center gap-1 font-semibold">
1460+
<span>Offer contract</span>
1461+
<dd class="font-display font-semibold tabular-nums text-lg text-emerald-400">
1462+
{Money.to_string!(
1463+
Money.mult!(
1464+
@match[:hourly_rate] |> Money.mult!(@match.user.hours_per_week || 30),
1465+
Decimal.new("1.13")
1466+
),
1467+
no_fraction_if_integer: false
1468+
)} / week
1469+
</dd>
1470+
</div>
1471+
</.button>
1472+
</div>
1473+
</div>
1474+
</dl>
1475+
</div>
14561476
</div>
14571477
"""
14581478
end

0 commit comments

Comments
 (0)