Conformance: StatusSidebar Have activity Clear button done.
This commit is contained in:
@@ -12,6 +12,7 @@ let delay = (s = 0) => new Promise((resolve, reject) => setTimeout(resolve, s))
|
||||
export default defineStore('conformanceStore', {
|
||||
state: () => ({
|
||||
conformanceLogId: null,
|
||||
conformanceLogTempCheckerId: null,
|
||||
conformanceFilterId: null,
|
||||
allConformanceTask: [],
|
||||
selectedRuleType: 'Have activity', // radio
|
||||
@@ -45,6 +46,27 @@ export default defineStore('conformanceStore', {
|
||||
await delay(500);
|
||||
$toast.default('Failed to load the Conformance Parameters.',{position: 'bottom'});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Creates a new temporary checker for a log.
|
||||
*/
|
||||
async addLogConformanceTempCheckerId() {
|
||||
let logId = this.conformanceLogId;
|
||||
const api = `/api/temp-log-checkers?log_id=${logId}`;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.post(api);
|
||||
console.log(response);
|
||||
this.conformanceLogTempCheckerId = response.data.id;
|
||||
} catch(error) {
|
||||
console.log(error);
|
||||
await delay();
|
||||
loading.isLoading = true;
|
||||
await delay(1000);
|
||||
loading.isLoading = false;
|
||||
await delay(500);
|
||||
$toast.default('Failed to add the Temporary Checker for a log.',{position: 'bottom'});
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user