Browse Source

make it work with support users

CLDC-1324-remove-not-started
Jack S 2 years ago
parent
commit
a4d789a0f1
  1. 14
      app/helpers/log_actions_helper.rb
  2. 2
      app/models/log.rb

14
app/helpers/log_actions_helper.rb

@ -22,16 +22,16 @@ module LogActionsHelper
def create_lettings_log_for_org_button(org) def create_lettings_log_for_org_button(org)
# This doesn't work because it's a get request and can't old params like that # This doesn't work because it's a get request and can't old params like that
if FeatureToggle.not_started_status_removed? # if FeatureToggle.not_started_status_removed?
govuk_button_link_to( # govuk_button_link_to(
"Create a new lettings log for this organisation", # "Create a new lettings log for this organisation",
lettings_log_path(id: "new", lettings_log: { owning_organisation_id: org.id }), # lettings_log_path(id: "new", lettings_log: { owning_organisation_id: org.id }),
) # )
else # else
govuk_button_to( govuk_button_to(
"Create a new lettings log for this organisation", lettings_logs_path(lettings_log: { owning_organisation_id: org.id }, method: :post) "Create a new lettings log for this organisation", lettings_logs_path(lettings_log: { owning_organisation_id: org.id }, method: :post)
) )
end # end
end end
def create_sales_log_button def create_sales_log_button

2
app/models/log.rb

@ -152,7 +152,7 @@ class Log < ApplicationRecord
if all_fields_completed? && errors.empty? if all_fields_completed? && errors.empty?
"completed" "completed"
elsif all_fields_nil? elsif all_fields_nil? && !FeatureToggle.not_started_status_removed?
"not_started" "not_started"
else else
"in_progress" "in_progress"

Loading…
Cancel
Save