Conformance: infinite scroll done.
This commit is contained in:
@@ -5,6 +5,7 @@ import {useToast} from 'vue-toast-notification';
|
||||
import 'vue-toast-notification/dist/theme-sugar.css';
|
||||
import moment from "moment";
|
||||
import { Decimal } from 'decimal.js';
|
||||
import { resolveTransitionHooks } from "vue";
|
||||
|
||||
const loading = loadingStore(pinia);
|
||||
const $toast = useToast();
|
||||
@@ -28,6 +29,7 @@ export default defineStore('conformanceStore', {
|
||||
selectedProcessScope: 'End to end', // radio
|
||||
selectedActSeqMore: 'All', // radio
|
||||
selectedActSeqFromTo: 'From', // radio
|
||||
infinite404: null,
|
||||
}),
|
||||
getters: {
|
||||
conformanceTask: state => {
|
||||
@@ -148,22 +150,25 @@ export default defineStore('conformanceStore', {
|
||||
/**
|
||||
* Get the Trace Details of a Temporary Log Conformance lssue.
|
||||
*/
|
||||
async getLogConformanceTraceDetail(issueNo, traceId, start, pageSize) {
|
||||
async getLogConformanceTraceDetail(issueNo, traceId, start) {
|
||||
let checkerId = this.conformanceTempCheckerId;
|
||||
const api = `/api/temp-log-checkers/${checkerId}/issues/${issueNo}/traces/${traceId}?start=${start}&page_size=${pageSize}`;
|
||||
const api = `/api/temp-log-checkers/${checkerId}/issues/${issueNo}/traces/${traceId}?start=${start}&page_size=20`;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
this.allTaskSeq = response.data.task_seq;
|
||||
this.allCases = response.data.cases;
|
||||
return response.data.cases;
|
||||
} catch(error) {
|
||||
await delay();
|
||||
loading.isLoading = true;
|
||||
await delay(1000);
|
||||
loading.isLoading = false;
|
||||
await delay(500);
|
||||
$toast.default('Failed to Get the detail of a temporary log conformance issue.',{position: 'bottom'});
|
||||
|
||||
if(error.response.status === 404) this.infinite404 = 404;
|
||||
else {
|
||||
await delay();
|
||||
loading.isLoading = true;
|
||||
await delay(1000);
|
||||
loading.isLoading = false;
|
||||
await delay(500);
|
||||
$toast.default('Failed to Get the detail of a temporary log conformance issue.',{position: 'bottom'});
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user