Skip to content

Commit 581cee8

Browse files
committed
feat: add media handling to job postings in seed and jobs live modules
1 parent 1b226e4 commit 581cee8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/algora_web/live/admin/seed_live.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ defmodule AlgoraWeb.Admin.SeedLive do
374374
end,
375375
"countries" => list_from_string(row["countries"]),
376376
"regions" => list_from_string(row["regions"]),
377-
"price" => money_from_string(row["price"])
377+
"price" => money_from_string(row["price"]),
378+
"media" => list_from_string(row["media"])
378379
})
379380
end
380381

@@ -418,6 +419,8 @@ defmodule AlgoraWeb.Admin.SeedLive do
418419
)
419420
)
420421
|> Repo.update() do
422+
Enum.each(row["media"], fn url -> {:ok, _media} = Algora.Accounts.create_user_media(org, %{"url" => url}) end)
423+
421424
Repo.insert(%JobPosting{
422425
status: :processing,
423426
id: Nanoid.generate(),

lib/algora_web/live/org/jobs_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ defmodule AlgoraWeb.Org.JobsLive do
3939
}>
4040
<div class={
4141
classes([
42-
if(!@current_user, do: "text-center", else: "")
42+
if(!@current_user, do: "text-center", else: "text-center")
4343
])
4444
}>
4545
<div class="flex items-start md:items-center justify-center gap-4">

0 commit comments

Comments
 (0)