@@ -7,14 +7,6 @@ import {
7
7
import toast from '~/vue_shared/plugins/global_toast' ;
8
8
import { sprintf , __ } from '~/locale' ;
9
9
10
- const isAdjournedDeletionEnabled = ( project ) => {
11
- // Check if enabled at the project level or globally
12
- return (
13
- project . isAdjournedDeletionEnabled ||
14
- gon ?. licensed_features ?. adjournedDeletionForProjectsAndGroups
15
- ) ;
16
- } ;
17
-
18
10
export const availableGraphQLProjectActions = ( { userPermissions, markedForDeletionOn } ) => {
19
11
const availableActions = [ ] ;
20
12
@@ -42,11 +34,7 @@ export const renderRestoreSuccessToast = (project) => {
42
34
} ;
43
35
44
36
export const renderDeleteSuccessToast = ( project ) => {
45
- // Delete immediately if
46
- // 1. Adjourned deletion is not enabled
47
- // 2. The project is in a personal namespace
48
- // 3. The project has already been marked for deletion
49
- if ( ! isAdjournedDeletionEnabled ( project ) || project . isPersonal || project . markedForDeletionOn ) {
37
+ if ( ! project . isAdjournedDeletionEnabled || project . markedForDeletionOn ) {
50
38
toast (
51
39
sprintf ( __ ( "Project '%{project_name}' is being deleted." ) , {
52
40
project_name : project . nameWithNamespace ,
@@ -56,23 +44,8 @@ export const renderDeleteSuccessToast = (project) => {
56
44
return ;
57
45
}
58
46
59
- // Adjourned deletion is available for the project
60
- if ( project . isAdjournedDeletionEnabled ) {
61
- toast (
62
- sprintf ( __ ( "Project '%{project_name}' will be deleted on %{date}." ) , {
63
- project_name : project . nameWithNamespace ,
64
- date : project . permanentDeletionDate ,
65
- } ) ,
66
- ) ;
67
-
68
- return ;
69
- }
70
-
71
- // Adjourned deletion is available globally but not at the project level.
72
- // This means we are deleting a free project. It will be deleted delayed but can only be
73
- // restored by an admin.
74
47
toast (
75
- sprintf ( __ ( "Deleting project '%{project_name}'. All data will be removed on %{date}." ) , {
48
+ sprintf ( __ ( "Project '%{project_name}' will be deleted on %{date}." ) , {
76
49
project_name : project . nameWithNamespace ,
77
50
date : project . permanentDeletionDate ,
78
51
} ) ,
0 commit comments