mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 23:21:05 +03:30
Product
This commit is contained in:
@@ -59,9 +59,15 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-folder</v-icon>
|
||||
<span>Archive</span>
|
||||
</v-btn>
|
||||
<v-btn color="cyan" class="mr-2">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
<router-link :to="{name: 'EditTestResult', params: {testResult: item.id}}">
|
||||
<v-btn color="cyan" class="mr-2">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
</router-link>
|
||||
<v-btn color="pink" class="mr-2" @click="remove(item.id)" >
|
||||
<v-icon class="white--text mr-1 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
@@ -141,9 +147,24 @@ export default {
|
||||
this.lastPage = result.data.data.last_page;
|
||||
}
|
||||
},
|
||||
async load() {
|
||||
const result = await ApiService.get(urls.listTestResult);
|
||||
if (result && result.status == 200) {
|
||||
this.items = result.data.data.data;
|
||||
this.currentPage = result.data.data.current_page;
|
||||
this.lastPage = result.data.data.last_page;
|
||||
}
|
||||
},
|
||||
async remove(testResultId) {
|
||||
const result = await ApiService.get(urls.removeTestResult(testResultId));
|
||||
if (result && result.status == 200) {
|
||||
for (const key in this.items) {
|
||||
if (this.items.hasOwnProperty(key) && this.items[key].id == testResultId) {
|
||||
this.items.splice(key, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
</script>
|
||||
Reference in New Issue
Block a user