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)
# This doesn't work because it's a get request and can't old params like that
if FeatureToggle.not_started_status_removed?
govuk_button_link_to(
"Create a new lettings log for this organisation",
lettings_log_path(id: "new", lettings_log: { owning_organisation_id: org.id }),
)
else
# if FeatureToggle.not_started_status_removed?
# govuk_button_link_to(
# "Create a new lettings log for this organisation",
# lettings_log_path(id: "new", lettings_log: { owning_organisation_id: org.id }),
# )
# else
govuk_button_to(
"Create a new lettings log for this organisation", lettings_logs_path(lettings_log: { owning_organisation_id: org.id }, method: :post)
)
end
# end
end
def create_sales_log_button

2
app/models/log.rb

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

Loading…
Cancel
Save