Commit 0510532f authored by huzaifaiftikhar1's avatar huzaifaiftikhar1

Remove count badge for projects pending deletion tab

parent cab18008
......@@ -10,4 +10,4 @@
= gl_tab_counter_badge(limited_counter_with_delimiter(@total_starred_projects_count))
= gl_tab_link_to _("Explore projects"), explore_root_path, { item_active: is_explore_projects_path, data: { placement: 'right' } }
= gl_tab_link_to _("Explore topics"), topics_explore_projects_path, { data: { placement: 'right' } }
= render_if_exists "dashboard/removed_projects_tab", removed_projects_count: @removed_projects_count
= render_if_exists "dashboard/removed_projects_tab"
......@@ -33,13 +33,6 @@ module EE
.with_group_saml_provider
end
override :load_projects
def load_projects(finder_params)
@removed_projects_count = ::ProjectsFinder.new(params: finder_params_for_removed, current_user: current_user).execute # rubocop:disable Gitlab/ModuleWithInstanceVariables
super
end
def check_adjourned_deletion_listing_availability
return render_404 unless can?(current_user, :list_removable_projects)
end
......
......@@ -11,13 +11,6 @@ module EE
def preload_associations(projects)
super.with_compliance_framework_settings
end
override :load_project_counts
def load_project_counts
@removed_projects_count = ::ProjectsFinder.new(params: { aimed_for_deletion: true }, current_user: current_user).execute # rubocop:disable Gitlab/ModuleWithInstanceVariables
super
end
end
end
end
- if can?(current_user, :list_removable_projects)
= gl_tab_link_to removed_dashboard_projects_path, { data: { placement: 'right' } } do
= _("Pending deletion")
= gl_tab_counter_badge(limited_counter_with_delimiter(removed_projects_count))
......@@ -45,12 +45,6 @@ RSpec.describe Dashboard::ProjectsController do
expect(assigns(:projects).count).to eq(1)
end
it 'accounts total removable projects' do
subject
expect(assigns(:removed_projects_count).count).to eq(2)
end
end
context 'for non-admin users', :saas do
......@@ -89,13 +83,14 @@ RSpec.describe Dashboard::ProjectsController do
with_them do
before do
allow(Kaminari.config).to receive(:default_per_page).and_return(10)
stub_ee_application_setting(should_check_namespace_plan: should_check_namespace_plan)
end
it 'accounts total removable projects' do
subject
expect(assigns(:removed_projects_count).count).to eq(removed_projects_count)
expect(assigns(:projects).count).to eq(removed_projects_count)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment