File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
components/frontapp/actions/list-message-templates Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,38 @@ export default {
88 type : "action" ,
99 props : {
1010 frontApp,
11+ sortBy : {
12+ type : "string" ,
13+ label : "Sort By Field" ,
14+ description : "Field used to sort the message templates" ,
15+ options : [
16+ {
17+ label : "Created At" ,
18+ value : "created_at" ,
19+ } ,
20+ {
21+ label : "Updated At" ,
22+ value : "updated_at" ,
23+ } ,
24+ ] ,
25+ optional : true ,
26+ } ,
27+ sortOrder : {
28+ type : "string" ,
29+ label : "Sort Order" ,
30+ description : "Order by which results should be sorted" ,
31+ options : [
32+ {
33+ label : "Ascending" ,
34+ value : "asc" ,
35+ } ,
36+ {
37+ label : "Descending" ,
38+ value : "desc" ,
39+ } ,
40+ ] ,
41+ optional : true ,
42+ } ,
1143 maxResults : {
1244 propDefinition : [
1345 frontApp ,
@@ -18,6 +50,10 @@ export default {
1850 async run ( { $ } ) {
1951 const items = this . frontApp . paginate ( {
2052 fn : this . frontApp . listMessageTemplates ,
53+ params : {
54+ sort_by : this . sortBy ,
55+ sort_order : this . sortOrder ,
56+ } ,
2157 maxResults : this . maxResults ,
2258 $,
2359 } ) ;
You can’t perform that action at this time.
0 commit comments