@@ -320,7 +320,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
320
320
title = { "#{ header_prefix ( @ current_org ) } Contributors" }
321
321
subtitle = "Share bounties, tips or contract opportunities with your top contributors "
322
322
>
323
- < div class = "relative w-full overflow-auto max-h-[400px ] scrollbar-thin " >
323
+ < div class = "relative w-full overflow-auto max-h-[250px ] scrollbar-thin " >
324
324
< table class = "w-full caption-bottom text-sm " >
325
325
< tbody >
326
326
<%= for % Contributor { user: user } <- @ contributors do %>
@@ -343,9 +343,10 @@ defmodule AlgoraWeb.Org.DashboardLive do
343
343
< div class = "p-4 sm:p-6 " >
344
344
< . getting_started
345
345
achievements = {
346
- if incomplete? ( @ achievements , :complete_signin_status ) ,
347
- do: @ achievements |> Enum . take ( 1 ) ,
348
- else: @ achievements
346
+ if incomplete? ( @ achievements , :complete_signin_status ) or
347
+ incomplete? ( @ achievements , :complete_signup_status ) ,
348
+ do: @ achievements |> Enum . take ( 1 ) ,
349
+ else: @ achievements
349
350
}
350
351
current_user = { @ current_user }
351
352
current_org = { @ current_org }
@@ -1290,86 +1291,107 @@ defmodule AlgoraWeb.Org.DashboardLive do
1290
1291
defp match_card ( assigns ) do
1291
1292
~H"""
1292
1293
< 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 " >
1293
- < div class = "xl:basis-[35%] truncate " >
1294
- < div class = "flex items-center gap-4 " >
1295
- < . link navigate = { User . url ( @ match . user ) } >
1296
- < . avatar class = "h-16 w-16 rounded-full " >
1297
- < . avatar_image src = { @ match . user . avatar_url } alt = { @ match . user . name } />
1298
- < . avatar_fallback class = "rounded-lg " >
1299
- { Algora.Util . initials ( @ match . user . name ) }
1300
- </ . avatar_fallback >
1301
- </ . avatar >
1302
- </ . link >
1294
+ < div class = "xl:basis-[45%] w-full truncate " >
1295
+ < div class = "flex items-center justify-between gap-4 " >
1296
+ < div class = "flex items-center gap-4 " >
1297
+ < . link navigate = { User . url ( @ match . user ) } >
1298
+ < . avatar class = "h-16 w-16 rounded-full " >
1299
+ < . avatar_image src = { @ match . user . avatar_url } alt = { @ match . user . name } />
1300
+ < . avatar_fallback class = "rounded-lg " >
1301
+ { Algora.Util . initials ( @ match . user . name ) }
1302
+ </ . avatar_fallback >
1303
+ </ . avatar >
1304
+ </ . link >
1303
1305
1304
- < div >
1305
- < div class = "flex items-center gap-4 text-foreground " >
1306
- < . link
1307
- navigate = { User . url ( @ match . user ) }
1308
- class = "text-base sm:text-lg font-semibold hover:underline "
1309
- >
1310
- { @ match . user . name } { Algora.Misc.CountryEmojis . get ( @ match . user . country ) }
1311
- </ . link >
1312
- < . badge
1313
- :if = { @ match . badge_text }
1314
- variant = { @ match . badge_variant }
1315
- size = "lg "
1316
- class = "shrink-0 absolute top-0 left-0 "
1317
- >
1318
- { @ match . badge_text }
1319
- </ . badge >
1320
- </ div >
1321
- < div
1322
- :if = { @ match . user . provider_meta }
1323
- class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
1324
- >
1325
- < . link
1326
- :if = { @ match . user . provider_login }
1327
- href = { "https://github.com/#{ @ match . user . provider_login } " }
1328
- target = "_blank "
1329
- class = "flex items-center gap-1 hover:underline "
1306
+ < div >
1307
+ < div class = "flex items-center gap-4 text-foreground " >
1308
+ < . link
1309
+ navigate = { User . url ( @ match . user ) }
1310
+ class = "text-base sm:text-lg font-semibold hover:underline "
1311
+ >
1312
+ { @ match . user . name } { Algora.Misc.CountryEmojis . get ( @ match . user . country ) }
1313
+ </ . link >
1314
+ < . badge
1315
+ :if = { @ match . badge_text }
1316
+ variant = { @ match . badge_variant }
1317
+ size = "lg "
1318
+ class = "shrink-0 absolute top-0 left-0 "
1319
+ >
1320
+ { @ match . badge_text }
1321
+ </ . badge >
1322
+ </ div >
1323
+ < div
1324
+ :if = { @ match . user . provider_meta }
1325
+ class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
1330
1326
>
1331
- < Logos . github class = "shrink-0 h-4 w-4 " />
1332
- < span class = "line-clamp-1 " > { @ match . user . provider_login } </ span >
1333
- </ . link >
1334
- < . link
1335
- :if = { @ match . user . provider_meta [ "twitter_handle" ] }
1336
- href = { "https://x.com/#{ @ match . user . provider_meta [ "twitter_handle" ] } " }
1337
- target = "_blank "
1338
- class = "flex items-center gap-1 hover:underline "
1327
+ < . link
1328
+ :if = { @ match . user . provider_login }
1329
+ href = { "https://github.com/#{ @ match . user . provider_login } " }
1330
+ target = "_blank "
1331
+ class = "flex items-center gap-1 hover:underline "
1332
+ >
1333
+ < Logos . github class = "shrink-0 h-4 w-4 " />
1334
+ < span class = "line-clamp-1 " > { @ match . user . provider_login } </ span >
1335
+ </ . link >
1336
+ < . link
1337
+ :if = { @ match . user . provider_meta [ "twitter_handle" ] }
1338
+ href = { "https://x.com/#{ @ match . user . provider_meta [ "twitter_handle" ] } " }
1339
+ target = "_blank "
1340
+ class = "flex items-center gap-1 hover:underline "
1341
+ >
1342
+ < . icon name = "tabler-brand-x " class = "shrink-0 h-4 w-4 " />
1343
+ < span class = "line-clamp-1 " > { @ match . user . provider_meta [ "twitter_handle" ] } </ span >
1344
+ </ . link >
1345
+ </ div >
1346
+ <%!-- <div
1347
+ :if={@match[:hourly_rate]}
1348
+ class="flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground sm:text-sm"
1339
1349
>
1340
- < . icon name = "tabler-brand-x " class = "shrink-0 h-4 w-4 " />
1341
- < span class = "line-clamp-1 " > { @ match . user . provider_meta [ "twitter_handle" ] } </ span >
1342
- </ . link >
1343
- </ div >
1344
- < div
1345
- :if = { @ match [ :hourly_rate ] }
1346
- class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground sm:text-sm "
1347
- >
1348
- < span class = "font-semibold font-display text-base sm:text-lg text-emerald-400 " >
1349
- { @ match [ :hourly_rate ]
1350
- |> Money . mult! ( @ match . user . hours_per_week || 30 )
1351
- |> Money . mult! ( Decimal . new ( "1.13" ) )
1352
- |> Money . to_string! ( ) } /wk
1353
- </ span >
1350
+ <span class="font-semibold font-display text-base sm:text-lg text-emerald-400">
1351
+ {@match[:hourly_rate]
1352
+ |> Money.mult!(@match.user.hours_per_week || 30)
1353
+ |> Money.mult!(Decimal.new("1.13"))
1354
+ |> Money.to_string!()}/wk
1355
+ </span>
1356
+ </div> --%>
1354
1357
</ div >
1355
1358
</ div >
1359
+ < . button
1360
+ phx-click = "share_opportunity "
1361
+ phx-value-user_id = { @ match . user . id }
1362
+ phx-value-type = "contract "
1363
+ phx-value-marketplace = "true "
1364
+ variant = "none "
1365
+ 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 "
1366
+ >
1367
+ < . icon name = "tabler-contract " class = "size-4 text-current mr-2 -ml-1 " /> Contract
1368
+ </ . button >
1356
1369
</ div >
1370
+ < dl :if = { @ match [ :hourly_rate ] } class = "pt-4 " >
1371
+ < div class = "flex justify-between " >
1372
+ < dt class = "text-foreground " >
1373
+ Total payment for < span class = "font-semibold " > { @ match . user . hours_per_week || 30 } </ span >
1374
+ hours
1375
+ < span class = "text-xs text-muted-foreground " >
1376
+ ({ @ match . user . name } 's availability)
1377
+ </ span >
1378
+ < div class = "text-xs text-muted-foreground " >
1379
+ (includes all platform and payment processing fees)
1380
+ </ div >
1381
+ </ dt >
1382
+ < dd class = "font-display font-semibold tabular-nums text-lg text-emerald-400 " >
1383
+ { Money . to_string! (
1384
+ Money . mult! (
1385
+ @ match [ :hourly_rate ] |> Money . mult! ( @ match . user . hours_per_week || 30 ) ,
1386
+ Decimal . new ( "1.13" )
1387
+ )
1388
+ ) }
1389
+ </ dd >
1390
+ </ div >
1391
+ </ dl >
1357
1392
</ div >
1358
1393
1359
- < div class = "flex xl:flex-col gap-2 xl:basis-[5%] xl:ml-auto " >
1360
- < . button
1361
- phx-click = "share_opportunity "
1362
- phx-value-user_id = { @ match . user . id }
1363
- phx-value-type = "contract "
1364
- phx-value-marketplace = "true "
1365
- variant = "none "
1366
- 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 "
1367
- >
1368
- < . icon name = "tabler-contract " class = "size-4 text-current mr-2 -ml-1 " /> Contract
1369
- </ . button >
1370
- </ div >
1371
-
1372
- < div class = "pt-2 xl:pt-0 xl:pl-4 2xl:pl-8 xl:basis-[60%] xl:border-l xl:border-border " >
1394
+ < div class = "pt-2 xl:pt-0 xl:pl-4 2xl:pl-8 xl:basis-[55%] xl:border-l xl:border-border " >
1373
1395
< div class = "text-sm sm:text-base text-foreground font-medium " >
1374
1396
Completed
1375
1397
< span class = "font-semibold font-display text-emerald-400 " >
@@ -1549,7 +1571,12 @@ defmodule AlgoraWeb.Org.DashboardLive do
1549
1571
< . getting_started
1550
1572
:if = { length ( @ achievements ) > 1 }
1551
1573
class = "pb-12 "
1552
- achievements = { @ achievements }
1574
+ achievements = {
1575
+ if incomplete? ( @ achievements , :complete_signin_status ) or
1576
+ incomplete? ( @ achievements , :complete_signup_status ) ,
1577
+ do: @ achievements |> Enum . take ( 1 ) ,
1578
+ else: @ achievements
1579
+ }
1553
1580
current_user = { @ current_user }
1554
1581
current_org = { @ current_org }
1555
1582
secret = { @ secret }
0 commit comments