Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/views/templates_form_preview/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
</form>
<% end %>
<% unless @task_preview_mode == 'true' %>
<a href="<%= edit_template_path(@template, @auth_token || session[:auth_token] ? { auth_token: @auth_token || session[:auth_token] } : {}) %>" class="base-button" data-turbo="false" style="flex-shrink: 0; padding: 0px 24px;">
<% exit_params = {} %>
<% exit_params[:auth_token] = @auth_token || session[:auth_token] %>
<% exit_params[:external_account_id] = @external_account_id if @external_account_id.present? %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm reading this right, we need the following:

  1. An auth_token (which should always be present, right?)
  2. An account_id or a partnership_id which would then determine where we redirect back to, either retain side or partner hub.

Is that correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

<% exit_params[:accessible_partnership_ids] = @accessible_partnership_ids if @accessible_partnership_ids.present? %>
<a href="<%= edit_template_path(@template, exit_params) %>" class="base-button" data-turbo="false" style="flex-shrink: 0; padding: 0px 24px;">
<%= t('exit_preview') %>
</a>
<% end %>
Expand Down
Loading