@@ -320,7 +320,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
320
320
title = { "#{ header_prefix ( @ previewed_user ) } 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 %>
@@ -344,9 +344,10 @@ defmodule AlgoraWeb.Org.DashboardLive do
344
344
< . getting_started
345
345
id = "getting_started_main "
346
346
achievements = {
347
- if incomplete? ( @ achievements , :complete_signin_status ) ,
348
- do: @ achievements |> Enum . take ( 1 ) ,
349
- else: @ achievements
347
+ if incomplete? ( @ achievements , :complete_signin_status ) or
348
+ incomplete? ( @ achievements , :complete_signup_status ) ,
349
+ do: @ achievements |> Enum . take ( 1 ) ,
350
+ else: @ achievements
350
351
}
351
352
current_user = { @ current_user }
352
353
current_org = { @ current_org }
@@ -1297,86 +1298,107 @@ defmodule AlgoraWeb.Org.DashboardLive do
1297
1298
defp match_card ( assigns ) do
1298
1299
~H"""
1299
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 " >
1300
- < div class = "xl:basis-[35%] truncate " >
1301
- < div class = "flex items-center gap-4 " >
1302
- < . link navigate = { User . url ( @ match . user ) } >
1303
- < . avatar class = "h-16 w-16 rounded-full " >
1304
- < . avatar_image src = { @ match . user . avatar_url } alt = { @ match . user . name } />
1305
- < . avatar_fallback class = "rounded-lg " >
1306
- { Algora.Util . initials ( @ match . user . name ) }
1307
- </ . avatar_fallback >
1308
- </ . avatar >
1309
- </ . link >
1301
+ < div class = "xl:basis-[45%] w-full truncate " >
1302
+ < div class = "flex items-center justify-between gap-4 " >
1303
+ < div class = "flex items-center gap-4 " >
1304
+ < . link navigate = { User . url ( @ match . user ) } >
1305
+ < . avatar class = "h-16 w-16 rounded-full " >
1306
+ < . avatar_image src = { @ match . user . avatar_url } alt = { @ match . user . name } />
1307
+ < . avatar_fallback class = "rounded-lg " >
1308
+ { Algora.Util . initials ( @ match . user . name ) }
1309
+ </ . avatar_fallback >
1310
+ </ . avatar >
1311
+ </ . link >
1310
1312
1311
- < div >
1312
- < div class = "flex items-center gap-4 text-foreground " >
1313
- < . link
1314
- navigate = { User . url ( @ match . user ) }
1315
- class = "text-base sm:text-lg font-semibold hover:underline "
1316
- >
1317
- { @ match . user . name } { Algora.Misc.CountryEmojis . get ( @ match . user . country ) }
1318
- </ . link >
1319
- < . badge
1320
- :if = { @ match . badge_text }
1321
- variant = { @ match . badge_variant }
1322
- size = "lg "
1323
- class = "shrink-0 absolute top-0 left-0 "
1324
- >
1325
- { @ match . badge_text }
1326
- </ . badge >
1327
- </ div >
1328
- < div
1329
- :if = { @ match . user . provider_meta }
1330
- class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
1331
- >
1332
- < . link
1333
- :if = { @ match . user . provider_login }
1334
- href = { "https://github.com/#{ @ match . user . provider_login } " }
1335
- target = "_blank "
1336
- class = "flex items-center gap-1 hover:underline "
1313
+ < div >
1314
+ < div class = "flex items-center gap-4 text-foreground " >
1315
+ < . link
1316
+ navigate = { User . url ( @ match . user ) }
1317
+ class = "text-base sm:text-lg font-semibold hover:underline "
1318
+ >
1319
+ { @ match . user . name } { Algora.Misc.CountryEmojis . get ( @ match . user . country ) }
1320
+ </ . link >
1321
+ < . badge
1322
+ :if = { @ match . badge_text }
1323
+ variant = { @ match . badge_variant }
1324
+ size = "lg "
1325
+ class = "shrink-0 absolute top-0 left-0 "
1326
+ >
1327
+ { @ match . badge_text }
1328
+ </ . badge >
1329
+ </ div >
1330
+ < div
1331
+ :if = { @ match . user . provider_meta }
1332
+ class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
1337
1333
>
1338
- < Logos . github class = "shrink-0 h-4 w-4 " />
1339
- < span class = "line-clamp-1 " > { @ match . user . provider_login } </ span >
1340
- </ . link >
1341
- < . link
1342
- :if = { @ match . user . provider_meta [ "twitter_handle" ] }
1343
- href = { "https://x.com/#{ @ match . user . provider_meta [ "twitter_handle" ] } " }
1344
- target = "_blank "
1345
- class = "flex items-center gap-1 hover:underline "
1334
+ < . link
1335
+ :if = { @ match . user . provider_login }
1336
+ href = { "https://github.com/#{ @ match . user . provider_login } " }
1337
+ target = "_blank "
1338
+ class = "flex items-center gap-1 hover:underline "
1339
+ >
1340
+ < Logos . github class = "shrink-0 h-4 w-4 " />
1341
+ < span class = "line-clamp-1 " > { @ match . user . provider_login } </ span >
1342
+ </ . link >
1343
+ < . link
1344
+ :if = { @ match . user . provider_meta [ "twitter_handle" ] }
1345
+ href = { "https://x.com/#{ @ match . user . provider_meta [ "twitter_handle" ] } " }
1346
+ target = "_blank "
1347
+ class = "flex items-center gap-1 hover:underline "
1348
+ >
1349
+ < . icon name = "tabler-brand-x " class = "shrink-0 h-4 w-4 " />
1350
+ < span class = "line-clamp-1 " > { @ match . user . provider_meta [ "twitter_handle" ] } </ span >
1351
+ </ . link >
1352
+ </ div >
1353
+ <%!-- <div
1354
+ :if={@match[:hourly_rate]}
1355
+ class="flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground sm:text-sm"
1346
1356
>
1347
- < . icon name = "tabler-brand-x " class = "shrink-0 h-4 w-4 " />
1348
- < span class = "line-clamp-1 " > { @ match . user . provider_meta [ "twitter_handle" ] } </ span >
1349
- </ . link >
1350
- </ div >
1351
- < div
1352
- :if = { @ match [ :hourly_rate ] }
1353
- class = "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground sm:text-sm "
1354
- >
1355
- < span class = "font-semibold font-display text-base sm:text-lg text-emerald-400 " >
1356
- { @ match [ :hourly_rate ]
1357
- |> Money . mult! ( @ match . user . hours_per_week || 30 )
1358
- |> Money . mult! ( Decimal . new ( "1.13" ) )
1359
- |> Money . to_string! ( ) } /wk
1360
- </ span >
1357
+ <span class="font-semibold font-display text-base sm:text-lg text-emerald-400">
1358
+ {@match[:hourly_rate]
1359
+ |> Money.mult!(@match.user.hours_per_week || 30)
1360
+ |> Money.mult!(Decimal.new("1.13"))
1361
+ |> Money.to_string!()}/wk
1362
+ </span>
1363
+ </div> --%>
1361
1364
</ div >
1362
1365
</ 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 >
1363
1376
</ 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 >
1364
1399
</ div >
1365
1400
1366
- < div class = "flex xl:flex-col gap-2 xl:basis-[5%] xl:ml-auto " >
1367
- < . button
1368
- phx-click = "share_opportunity "
1369
- phx-value-user_id = { @ match . user . id }
1370
- phx-value-type = "contract "
1371
- phx-value-marketplace = "true "
1372
- variant = "none "
1373
- 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 "
1374
- >
1375
- < . icon name = "tabler-contract " class = "size-4 text-current mr-2 -ml-1 " /> Contract
1376
- </ . button >
1377
- </ div >
1378
-
1379
- < div class = "pt-2 xl:pt-0 xl:pl-4 2xl:pl-8 xl:basis-[60%] xl:border-l xl:border-border " >
1401
+ < div class = "pt-2 xl:pt-0 xl:pl-4 2xl:pl-8 xl:basis-[55%] xl:border-l xl:border-border " >
1380
1402
< div class = "text-sm sm:text-base text-foreground font-medium " >
1381
1403
Completed
1382
1404
< span class = "font-semibold font-display text-emerald-400 " >
@@ -1538,7 +1560,12 @@ defmodule AlgoraWeb.Org.DashboardLive do
1538
1560
:if = { length ( @ achievements ) > 1 }
1539
1561
id = "getting_started_sidebar "
1540
1562
class = "pb-12 "
1541
- achievements = { @ achievements }
1563
+ achievements = {
1564
+ if incomplete? ( @ achievements , :complete_signin_status ) or
1565
+ incomplete? ( @ achievements , :complete_signup_status ) ,
1566
+ do: @ achievements |> Enum . take ( 1 ) ,
1567
+ else: @ achievements
1568
+ }
1542
1569
current_user = { @ current_user }
1543
1570
current_org = { @ current_org }
1544
1571
secret = { @ secret }
0 commit comments