@@ -57,71 +57,73 @@ defmodule AlgoraWeb.Forms.ContractForm do
57
57
phx-change = "validate_contract_main "
58
58
>
59
59
< div class = "space-y-4 " >
60
- <%= if contractor = get_field ( @ form . source , :contractor ) do %>
61
- < . card >
62
- < . card_content >
63
- < div class = "flex items-center gap-4 " >
64
- < . avatar class = "h-16 w-16 rounded-full " >
65
- < . avatar_image src = { contractor . avatar_url } alt = { contractor . name } />
66
- < . avatar_fallback class = "rounded-lg " >
67
- { Algora.Util . initials ( contractor . name ) }
68
- </ . avatar_fallback >
69
- </ . avatar >
70
-
71
- < div >
72
- < div class = "flex items-center gap-1 text-base text-foreground " >
73
- < span class = "font-semibold " > { contractor . name } </ span >
74
- { Algora.Misc.CountryEmojis . get ( contractor . country ) }
75
- </ div >
60
+ <%= if get_field ( @ form . source , :marketplace? ) do %>
61
+ <%= if contractor = get_field ( @ form . source , :contractor ) do %>
62
+ < . card >
63
+ < . card_content >
64
+ < div class = "flex items-center gap-4 " >
65
+ < . avatar class = "h-16 w-16 rounded-full " >
66
+ < . avatar_image src = { contractor . avatar_url } alt = { contractor . name } />
67
+ < . avatar_fallback class = "rounded-lg " >
68
+ { Algora.Util . initials ( contractor . name ) }
69
+ </ . avatar_fallback >
70
+ </ . avatar >
71
+
72
+ < div >
73
+ < div class = "flex items-center gap-1 text-base text-foreground " >
74
+ < span class = "font-semibold " > { contractor . name } </ span >
75
+ { Algora.Misc.CountryEmojis . get ( contractor . country ) }
76
+ </ div >
76
77
77
- < div
78
- :if = { contractor . provider_meta }
79
- class = "pt-0.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
80
- >
81
- < . link
82
- :if = { contractor . provider_login }
83
- href = { "https://github.com/#{ contractor . provider_login } " }
84
- target = "_blank "
85
- class = "flex items-center gap-1 hover:underline "
78
+ < div
79
+ :if = { contractor . provider_meta }
80
+ class = "pt-0.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground sm:text-sm "
86
81
>
87
- < . icon name = "github " class = "h-4 w-4 " />
88
- < span class = "whitespace-nowrap " > { contractor . provider_login } </ span >
89
- </ . link >
90
- < . link
91
- :if = { contractor . provider_meta [ "twitter_handle" ] }
92
- href = { "https://x.com/#{ contractor . provider_meta [ "twitter_handle" ] } " }
93
- target = "_blank "
94
- class = "flex items-center gap-1 hover:underline "
95
- >
96
- < . icon name = "tabler-brand-x " class = "h-4 w-4 " />
97
- < span class = "whitespace-nowrap " >
98
- { contractor . provider_meta [ "twitter_handle" ] }
99
- </ span >
100
- </ . link >
101
- < div :if = { contractor . provider_meta [ "location" ] } class = "flex items-center gap-1 " >
102
- < . icon name = "tabler-map-pin " class = "h-4 w-4 " />
103
- < span class = "whitespace-nowrap " >
104
- { contractor . provider_meta [ "location" ] }
105
- </ span >
106
- </ div >
107
- < div :if = { contractor . provider_meta [ "company" ] } class = "flex items-center gap-1 " >
108
- < . icon name = "tabler-building " class = "h-4 w-4 " />
109
- < span class = "whitespace-nowrap " >
110
- { contractor . provider_meta [ "company" ] |> String . trim_leading ( "@" ) }
111
- </ span >
82
+ < . link
83
+ :if = { contractor . provider_login }
84
+ href = { "https://github.com/#{ contractor . provider_login } " }
85
+ target = "_blank "
86
+ class = "flex items-center gap-1 hover:underline "
87
+ >
88
+ < . icon name = "github " class = "h-4 w-4 " />
89
+ < span class = "whitespace-nowrap " > { contractor . provider_login } </ span >
90
+ </ . link >
91
+ < . link
92
+ :if = { contractor . provider_meta [ "twitter_handle" ] }
93
+ href = { "https://x.com/#{ contractor . provider_meta [ "twitter_handle" ] } " }
94
+ target = "_blank "
95
+ class = "flex items-center gap-1 hover:underline "
96
+ >
97
+ < . icon name = "tabler-brand-x " class = "h-4 w-4 " />
98
+ < span class = "whitespace-nowrap " >
99
+ { contractor . provider_meta [ "twitter_handle" ] }
100
+ </ span >
101
+ </ . link >
102
+ < div :if = { contractor . provider_meta [ "location" ] } class = "flex items-center gap-1 " >
103
+ < . icon name = "tabler-map-pin " class = "h-4 w-4 " />
104
+ < span class = "whitespace-nowrap " >
105
+ { contractor . provider_meta [ "location" ] }
106
+ </ span >
107
+ </ div >
108
+ < div :if = { contractor . provider_meta [ "company" ] } class = "flex items-center gap-1 " >
109
+ < . icon name = "tabler-building " class = "h-4 w-4 " />
110
+ < span class = "whitespace-nowrap " >
111
+ { contractor . provider_meta [ "company" ] |> String . trim_leading ( "@" ) }
112
+ </ span >
113
+ </ div >
112
114
</ div >
113
115
</ div >
114
116
</ div >
115
- </ div >
116
- < div class = " pt-6 flex flex-wrap gap-2 line-clamp-1 " >
117
- <%= for tech <- contractor . tech_stack do % >
118
- < div class = " rounded-lg bg-foreground/5 px-2 py-1 text-xs font-medium text-foreground ring-1 ring-inset ring-foreground/25 " >
119
- { tech }
120
- </ div >
121
- <% end % >
122
- </ div >
123
- </ . card_content >
124
- </ . card >
117
+ < div class = " pt-6 flex flex-wrap gap-2 line-clamp-1 " >
118
+ <%= for tech <- contractor . tech_stack do % >
119
+ < div class = " rounded-lg bg-foreground/5 px-2 py-1 text-xs font-medium text-foreground ring-1 ring-inset ring-foreground/25 " >
120
+ { tech }
121
+ </ div >
122
+ <% end % >
123
+ </ div >
124
+ </ . card_content >
125
+ </ . card >
126
+ <% end % >
125
127
<% end %>
126
128
127
129
< . input label = "Title " field = { @ form [ :title ] } />
0 commit comments