@@ -132,6 +132,13 @@ defmodule AlgoraWeb.Org.DashboardLive do
132132
133133 transactions = Payments . list_hosted_transactions ( current_org . id , limit: page_size ( ) )
134134
135+ socket =
136+ if params [ "action" ] == "create_contract" do
137+ assign ( socket , :main_contract_form_open? , true )
138+ else
139+ socket
140+ end
141+
135142 { :noreply ,
136143 socket
137144 |> assign ( :current_status , current_status )
@@ -1126,15 +1133,26 @@ defmodule AlgoraWeb.Org.DashboardLive do
11261133 defp achievement_todo ( % { achievement: % { id: :connect_github_status } } = assigns ) do
11271134 ~H"""
11281135 < . button :if = { ! @ current_user . provider_login } href = { Github . authorize_url ( ) } class = "ml-auto gap-2 " >
1129- < Logos . github class = "w-4 h-4 mr-2 -ml-1 " /> Connect GitHub
1136+ < Logos . github class = "w-4 h-4 -ml-1 " /> Connect GitHub
11301137 </ . button >
11311138 """
11321139 end
11331140
11341141 defp achievement_todo ( % { achievement: % { id: :install_app_status } } = assigns ) do
11351142 ~H"""
11361143 < . button phx-click = "install_app " class = "ml-auto gap-2 " >
1137- < Logos . github class = "w-4 h-4 mr-2 -ml-1 " /> Install GitHub App
1144+ < Logos . github class = "w-4 h-4 -ml-1 " /> Install GitHub App
1145+ </ . button >
1146+ """
1147+ end
1148+
1149+ defp achievement_todo ( % { achievement: % { id: :create_contract_status } } = assigns ) do
1150+ ~H"""
1151+ < . button
1152+ patch = { ~p" /#{ @ current_org . handle } /dashboard?action=create_contract" }
1153+ class = "ml-auto gap-2 "
1154+ >
1155+ < . icon name = "tabler-user-dollar " class = "w-4 h-4 -ml-1 " /> Create a contract
11381156 </ . button >
11391157 """
11401158 end
@@ -1154,7 +1172,8 @@ defmodule AlgoraWeb.Org.DashboardLive do
11541172 { & install_app_status / 1 , "Install Algora in #{ current_org . name } " , nil } ,
11551173 { & create_bounty_status / 1 , "Create a bounty" , nil } ,
11561174 { & reward_bounty_status / 1 , "Reward a bounty" , nil } ,
1157- { & create_contract_status / 1 , "Contract a developer" , nil } ,
1175+ { & create_contract_status / 1 , "Contract a developer" ,
1176+ [ patch: ~p" /#{ current_org . handle } /dashboard?action=create_contract" ] } ,
11581177 { & share_with_friend_status / 1 , "Share Algora with a friend" , nil }
11591178 ]
11601179
@@ -1625,6 +1644,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
16251644 < . achievement_todo
16261645 achievement = { achievement }
16271646 current_user = { @ current_user }
1647+ current_org = { @ current_org }
16281648 secret = { @ secret }
16291649 login_form = { @ login_form }
16301650 />
0 commit comments