File tree Expand file tree Collapse file tree 6 files changed +31
-17
lines changed
src/Resources/app/administration/src/module/tinect-redirects Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ export default {
6464 appearance : 'light' ,
6565 } ;
6666 } ,
67+
68+ httpCodeOptions ( ) {
69+ return [
70+ { value : 301 , label : this . $tc ( 'tinect-redirects.detail.httpCodeLabelValues.301' ) } ,
71+ { value : 302 , label : this . $tc ( 'tinect-redirects.detail.httpCodeLabelValues.302' ) } ,
72+ { value : 410 , label : this . $tc ( 'tinect-redirects.detail.httpCodeLabelValues.410' ) } ,
73+ ] ;
74+ } ,
6775 } ,
6876
6977 watch : {
@@ -134,6 +142,6 @@ export default {
134142
135143 onCancel ( ) {
136144 this . $router . push ( { name : 'tinect.redirects.index' } ) ;
137- }
145+ } ,
138146 }
139147} ;
Original file line number Diff line number Diff line change 5656 validation =" required" ></sw -text-field >
5757 </sw -card >
5858
59- <sw -select-number-field :label =" $t('tinect-redirects.detail.httpCodeLabel')"
60- v-model:value =" redirect.httpCode"
61- validation =" required" >
62- <option value =301>{{ $t(' tinect-redirects.detail.httpCodeLabelValues.301' ) }}</option >
63- <option value =302>{{ $t(' tinect-redirects.detail.httpCodeLabelValues.302' ) }}</option >
64- <option value =410>{{ $t(' tinect-redirects.detail.httpCodeLabelValues.410' ) }}</option >
65- </sw -select-number-field >
59+ <mt -select
60+ :label =" $t('tinect-redirects.detail.httpCodeLabel')"
61+ v-model =" redirect.httpCode"
62+ :options =" httpCodeOptions"
63+ />
6664
6765 <sw -card v-if =" redirect.httpCode !== 410" :title =" $t('tinect-redirects.detail.target')"
6866 position-identifier =" tinect-redirects-details-target" >
Original file line number Diff line number Diff line change @@ -87,7 +87,11 @@ export default {
8787 const criteria = new Criteria ( this . page , this . limit ) ;
8888
8989 criteria . setTerm ( this . term ) ;
90- criteria . addFilter ( Criteria . equals ( 'active' , this . filter . active ) ) ;
90+
91+ if ( this . filter . active === 0 || this . filter . active === 1 ) {
92+ criteria . addFilter ( Criteria . equals ( 'active' , this . filter . active ) ) ;
93+ }
94+
9195 criteria . addFilter ( Criteria . equals ( 'hidden' , this . filter . hidden ) ) ;
9296 criteria . addSorting ( Criteria . sort ( this . sortBy , this . sortDirection , this . naturalSorting ) ) ;
9397
@@ -103,6 +107,13 @@ export default {
103107
104108 return criteria ;
105109 } ,
110+
111+ filterActiveOptions ( ) {
112+ return [
113+ { value : 1 , label : this . $tc ( 'tinect-redirects.sidebar.filter.active.values.yes' ) } ,
114+ { value : 0 , label : this . $tc ( 'tinect-redirects.sidebar.filter.active.values.no' ) } ,
115+ ] ;
116+ } ,
106117 } ,
107118
108119 watch : {
Original file line number Diff line number Diff line change 9292
9393 <sw -sidebar-item icon =" regular-filter" :title =" $tc('tinect-redirects.sidebar.filter.title')" >
9494
95- <sw -select-field :label =" $t('tinect-redirects.sidebar.filter.active.label')"
96- v-model:value =" filter.active" >
97- <option value =" " >{{ $t(' tinect-redirects.sidebar.filter.active.values.all' ) }}</option >
98- <option value =" 1" >{{ $t(' tinect-redirects.sidebar.filter.active.values.yes' ) }}</option >
99- <option value =" 0" >{{ $t(' tinect-redirects.sidebar.filter.active.values.no' ) }}</option >
100- </sw -select-field >
95+ <mt -select
96+ :label =" $t('tinect-redirects.sidebar.filter.active.label')"
97+ v-model =" filter.active"
98+ :options =" filterActiveOptions"
99+ />
101100
102101 <sw -number-field
103102 v-model:value =" filter.minimumRequestCount"
Original file line number Diff line number Diff line change 5959 "active" : {
6060 "label" : " Aktiv" ,
6161 "values" : {
62- "all" : " Alle" ,
6362 "yes" : " Ja" ,
6463 "no" : " Nein"
6564 }
Original file line number Diff line number Diff line change 5959 "active" : {
6060 "label" : " Active" ,
6161 "values" : {
62- "all" : " All" ,
6362 "yes" : " Yes" ,
6463 "no" : " No"
6564 }
You can’t perform that action at this time.
0 commit comments