@@ -227,7 +227,8 @@ export default {
227227 sendDataEmail: null ,
228228 loadingEmail: true ,
229229 currentSchema: null ,
230- dataLoading: true
230+ dataLoading: true ,
231+ entriesTotal: 10
231232 }
232233 },
233234 components: {
@@ -282,11 +283,13 @@ export default {
282283 pagination (skip , limit , page ) {
283284 this .skip = skip
284285 this .limit = limit
286+ this .entriesTotal = limit
285287 this .pageno = page
286288 this .populateTables ()
287289 },
288290 handlepage (skip , limit , size ) {
289291 this .limit = size
292+ this .entriesTotal = size
290293 this .skip = 0
291294 this .populateTables ()
292295 },
@@ -910,6 +913,7 @@ export default {
910913 $limit: this .limit
911914 }).then (queryresp => {
912915 // console.log('queryresp: ', queryresp)
916+ // this.entriesTotal = queryresp.data.data.length
913917 this .isFlowzLoaded = true
914918 this .dataTotal = queryresp .data .total
915919 if (queryresp .data .data .length > 0 ) {
@@ -1010,7 +1014,29 @@ export default {
10101014 // console.log('err: ', err)
10111015 // })
10121016 // }, 2000)
1013- this .init ()
1017+ // console.log('Length: ', this.instanceEntries.length)
1018+ // console.log('instanceEntries: ', this.instanceEntries.length, this.entriesTotal)
1019+ if (this .instanceEntries .length < this .entriesTotal ) {
1020+ // console.log('Ready to push: ', this.instanceEntries.length)
1021+ // push to table
1022+ let instanceObj = data
1023+ // console.log('instanceObj: ', instanceObj)
1024+ let lastEntryId = data .stageReference [data .stageReference .length - 1 ].stageRecordId
1025+ // console.log('lastEntryId: ', lastEntryId)
1026+ if (lastEntryId !== undefined ) {
1027+ flowzdataModal .get (lastEntryId).then (res => {
1028+ // console.log('Response fdata: ', res)
1029+ instanceObj[' data' ] = res .data .data
1030+ instanceObj[' iid' ] = data .id
1031+ this .instanceEntries .push (instanceObj)
1032+ this .dataData .push (instanceObj)
1033+ // console.log('Pushed data: ', this.instanceEntries, this.dataData)
1034+ })
1035+ }
1036+ } else {
1037+ // don't do anything
1038+ }
1039+ // this.init()
10141040 } else if (this .$route .params .stateid === data .stageReference [(data .stageReference .length - 1 )].StageName ) {
10151041 let inx = _ .findIndex (this .instanceEntries , (o ) => { return o .id === data .id })
10161042 this .instanceEntries .splice (inx, 1 )
0 commit comments