@@ -3,10 +3,8 @@ import {computed} from 'vue';
3
3
import { useFetch } from '@/composables/useFetch' ;
4
4
import { useModal } from '@/composables/useModal' ;
5
5
import { useLocalize } from '@/composables/useLocalize' ;
6
- import { replaceLocaleParams } from '@/utils/i18n.js' ;
7
6
import { cloneDeep } from 'lodash' ;
8
7
import ReviewerRecommendationsEditModal from './ReviewerRecommendationsEditModal.vue' ;
9
- import { escapeHtml } from '@/directives/stripUnsafeHtml' ;
10
8
import { useUrl } from '@/composables/useUrl' ;
11
9
import { useForm } from '@/composables/useForm' ;
12
10
@@ -24,11 +22,6 @@ export const useReviewerRecommendationManagerStore = defineComponentStore(
24
22
25
23
const items = computed ( {
26
24
get : ( ) => recommendations . value ?. items || [ ] ,
27
- set : ( newValue ) => {
28
- if ( recommendations . value ) {
29
- recommendations . value . items = newValue ;
30
- }
31
- } ,
32
25
} ) ;
33
26
34
27
const itemsMax = computed ( ( ) => recommendations . value ?. itemsMax || 0 ) ;
@@ -62,26 +55,24 @@ export const useReviewerRecommendationManagerStore = defineComponentStore(
62
55
title : newStatus
63
56
? t ( 'manager.reviewerRecommendations.activate.title' )
64
57
: t ( 'manager.reviewerRecommendations.deactivate.title' ) ,
65
- message : replaceLocaleParams (
58
+ message : t (
66
59
item . status
67
- ? t ( 'manager.reviewerRecommendations.confirmDeactivate' )
68
- : t ( 'manager.reviewerRecommendations.confirmActivate' ) ,
60
+ ? 'manager.reviewerRecommendations.confirmDeactivate'
61
+ : 'manager.reviewerRecommendations.confirmActivate' ,
69
62
{
70
- title : escapeHtml ( localize ( item . title ) ) ,
63
+ title : localize ( item . title ) ,
71
64
} ,
72
65
) ,
73
66
actions : [
74
67
{
75
68
label : t ( 'common.yes' ) ,
76
69
isPrimary : true ,
77
70
callback : async ( close ) => {
78
- const success = await toggleStatus ( {
71
+ await toggleStatus ( {
79
72
id : item . id ,
80
73
newStatus,
81
74
} ) ;
82
- if ( success ) {
83
- await fetchRecommendations ( ) ;
84
- }
75
+ await fetchRecommendations ( ) ;
85
76
close ( ) ;
86
77
} ,
87
78
} ,
@@ -98,23 +89,18 @@ export const useReviewerRecommendationManagerStore = defineComponentStore(
98
89
openDialog ( {
99
90
name : 'delete' ,
100
91
title : t ( 'grid.action.deleteReviewerRecommendation' ) ,
101
- message : replaceLocaleParams (
102
- t ( 'manager.reviewerRecommendations.confirmDelete' ) ,
103
- {
104
- title : escapeHtml ( localize ( item . title ) ) ,
105
- } ,
106
- ) ,
92
+ message : t ( 'manager.reviewerRecommendations.confirmDelete' , {
93
+ title : localize ( item . title ) ,
94
+ } ) ,
107
95
actions : [
108
96
{
109
97
label : t ( 'common.yes' ) ,
110
98
isPrimary : true ,
111
99
callback : async ( close ) => {
112
- const success = await deleteRecommendation ( {
100
+ await deleteRecommendation ( {
113
101
id : item . id ,
114
102
} ) ;
115
- if ( success ) {
116
- await fetchRecommendations ( ) ;
117
- }
103
+ await fetchRecommendations ( ) ;
118
104
close ( ) ;
119
105
} ,
120
106
} ,
0 commit comments