@@ -154,12 +154,6 @@ export default {
154154 completeUri () {
155155 return this .$store .getters .getUri
156156 },
157- typeUri () {
158- return this .$store .getters .preparedTypeUri
159- },
160- objectUri () {
161- return this .$store .getters .preparedUri
162- },
163157 message: {
164158 get () {
165159 return this .$store .getters .getPageNumber
@@ -172,35 +166,40 @@ export default {
172166 watch: {
173167 completeUri: {
174168 handler (newVal , oldVal ) {
175- console .log (" RRRRRRRRRRRRRRRRRR" )
169+ this .meta = []
170+ // this.meta = this.$store.getters.getTypes.find( v => { return v.name === this.$store.getters.getUri.type } )
171+
172+ this .$http .get (this .$store .getters .preparedTypeUri ).then (
173+ response => {
174+ this .meta = response .body [0 ]
175+
176+ /* if (Object.keys(this.$store.getters.getUri.orderby).length === 0) {
177+ console.log("EMPTY!")
178+ this.pagination.sortBy = 'time'
179+ this.setSort('time')
180+ return
181+ }*/
182+
183+ this .items = []
184+ this .isLoading = true
185+ this .$http .get (this .$store .getters .preparedUri ).then (
186+ response => {
187+ this .items = response .body
188+ if (this .items .length >= 15 && this .message === this .getPageCount ()) {
189+ this .increasePageCount ()
190+ }
191+ this .isLoading = false
192+ }, response => {
193+ this .$notify ({ group: ' foo' , type: ' error' , title: ' Server error' , text: response })
194+ this .isLoading = false
195+ }
196+ )
197+
198+ }
199+ )
176200 },
177201 deep: true ,
178202 },
179- typeUri (newValue ) {
180- this .meta = []
181- this .$http .get (newValue).then (
182- response => {
183- this .meta = response .body [0 ]
184- // this.setSort('time')
185- }
186- )
187- },
188- objectUri (newValue ) {
189- this .items = []
190- this .isLoading = true
191- this .$http .get (newValue).then (
192- response => {
193- this .items = response .body
194- if (this .items .length >= 15 && this .message === this .getPageCount ()) {
195- this .increasePageCount ()
196- }
197- this .isLoading = false
198- }, response => {
199- this .$notify ({ group: ' foo' , type: ' error' , title: ' Server error' , text: response })
200- this .isLoading = false
201- }
202- )
203- },
204203 getSort (newValue ) {
205204 if (newValue .descending === true ) {
206205 this .$store .commit (' setSort' , { " field" : newValue .sortBy , " ord" : " desc" })
0 commit comments