@iankibetsh/shframework 5.3.7 → 5.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.js +8 -2
- package/dist/library.mjs +8 -2
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -5209,7 +5209,8 @@ const __default__ = {
|
|
|
5209
5209
|
range: null,
|
|
5210
5210
|
from: null,
|
|
5211
5211
|
to: null,
|
|
5212
|
-
period: null
|
|
5212
|
+
period: null,
|
|
5213
|
+
lastId: null
|
|
5213
5214
|
}
|
|
5214
5215
|
},
|
|
5215
5216
|
mounted(){
|
|
@@ -5375,6 +5376,7 @@ const __default__ = {
|
|
|
5375
5376
|
from: this.from,
|
|
5376
5377
|
to: this.to,
|
|
5377
5378
|
period: this.period,
|
|
5379
|
+
lastId: this.lastId,
|
|
5378
5380
|
};
|
|
5379
5381
|
shApis.doPost(this.endPoint, data).then(res => {
|
|
5380
5382
|
this.downloading = false;
|
|
@@ -5414,7 +5416,8 @@ const __default__ = {
|
|
|
5414
5416
|
from: this.from,
|
|
5415
5417
|
to: this.to,
|
|
5416
5418
|
period: this.period,
|
|
5417
|
-
exact: this.exactMatch
|
|
5419
|
+
exact: this.exactMatch,
|
|
5420
|
+
lastId: this.lastId
|
|
5418
5421
|
};
|
|
5419
5422
|
// remove empty values
|
|
5420
5423
|
Object.keys(data).forEach(key => {
|
|
@@ -5439,6 +5442,7 @@ const __default__ = {
|
|
|
5439
5442
|
if (this.page < 2 && this.cacheKey) {
|
|
5440
5443
|
shStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
|
|
5441
5444
|
}
|
|
5445
|
+
|
|
5442
5446
|
this.pagination_data = {
|
|
5443
5447
|
current: response.current_page,
|
|
5444
5448
|
start: response.from,
|
|
@@ -5451,6 +5455,8 @@ const __default__ = {
|
|
|
5451
5455
|
if (!this.headers && response.total > 0) {
|
|
5452
5456
|
this.tableHeaders = Object.keys(response.data[0]);
|
|
5453
5457
|
}
|
|
5458
|
+
// get id value of the last record
|
|
5459
|
+
this.lastId = response.data.length > 0 ? response.data[response.data.length - 1].id : null;
|
|
5454
5460
|
if (append) {
|
|
5455
5461
|
this.records.push(...response.data);
|
|
5456
5462
|
let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
|
package/dist/library.mjs
CHANGED
|
@@ -5197,7 +5197,8 @@ const __default__ = {
|
|
|
5197
5197
|
range: null,
|
|
5198
5198
|
from: null,
|
|
5199
5199
|
to: null,
|
|
5200
|
-
period: null
|
|
5200
|
+
period: null,
|
|
5201
|
+
lastId: null
|
|
5201
5202
|
}
|
|
5202
5203
|
},
|
|
5203
5204
|
mounted(){
|
|
@@ -5363,6 +5364,7 @@ const __default__ = {
|
|
|
5363
5364
|
from: this.from,
|
|
5364
5365
|
to: this.to,
|
|
5365
5366
|
period: this.period,
|
|
5367
|
+
lastId: this.lastId,
|
|
5366
5368
|
};
|
|
5367
5369
|
shApis.doPost(this.endPoint, data).then(res => {
|
|
5368
5370
|
this.downloading = false;
|
|
@@ -5402,7 +5404,8 @@ const __default__ = {
|
|
|
5402
5404
|
from: this.from,
|
|
5403
5405
|
to: this.to,
|
|
5404
5406
|
period: this.period,
|
|
5405
|
-
exact: this.exactMatch
|
|
5407
|
+
exact: this.exactMatch,
|
|
5408
|
+
lastId: this.lastId
|
|
5406
5409
|
};
|
|
5407
5410
|
// remove empty values
|
|
5408
5411
|
Object.keys(data).forEach(key => {
|
|
@@ -5427,6 +5430,7 @@ const __default__ = {
|
|
|
5427
5430
|
if (this.page < 2 && this.cacheKey) {
|
|
5428
5431
|
shStorage.setItem('sh_table_cache_' + this.cacheKey, response.data);
|
|
5429
5432
|
}
|
|
5433
|
+
|
|
5430
5434
|
this.pagination_data = {
|
|
5431
5435
|
current: response.current_page,
|
|
5432
5436
|
start: response.from,
|
|
@@ -5439,6 +5443,8 @@ const __default__ = {
|
|
|
5439
5443
|
if (!this.headers && response.total > 0) {
|
|
5440
5444
|
this.tableHeaders = Object.keys(response.data[0]);
|
|
5441
5445
|
}
|
|
5446
|
+
// get id value of the last record
|
|
5447
|
+
this.lastId = response.data.length > 0 ? response.data[response.data.length - 1].id : null;
|
|
5442
5448
|
if (append) {
|
|
5443
5449
|
this.records.push(...response.data);
|
|
5444
5450
|
let totalShown = response.total > response.per_page ? response.per_page * response.current_page : response.total;
|