added get functions

This commit is contained in:
2024-02-08 13:12:01 +01:00
parent 73d0b89b4d
commit c91f9a53b6
31 changed files with 6614 additions and 2442 deletions

View File

@ -14,17 +14,18 @@
State</th>
<th :class="['Amount', darkMode ? 'th-darkmode' : 'th-lightmode']">Amount</th>
</tr>
<tr :class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
<tr v-for="issue in issues" :key="issue.primaryID"
:class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
<td
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
...</td>
{{ issue.name }}</td>
<td
:class="['Type', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Type-darkmode' : 'Type-lightmode']">
...</td>
{{ issue.type }}</td>
<td
:class="['State', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'State-darkmode' : 'State-lightmode']">
...</td>
<td :class="['Amount', darkMode ? 'td-darkmode' : 'td-lightmode']">...</td>
{{ issue.state }}</td>
<td :class="['Amount', darkMode ? 'td-darkmode' : 'td-lightmode']">{{ issue.amount }}</td>
</tr>
</table>
</div>
@ -32,9 +33,26 @@
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import Axios from '../axios.config.js';
import serversideConfig from '../serversideConfig.js';
const darkMode = ref(true)
const issues = ref([]);
//get all issue
const getIssues = async () => {
try {
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllIssues`);
issues.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
}
onMounted(() => {
getIssues();
});
</script>
<script>
@ -181,4 +199,5 @@ th {
.label-lightmode {
color: #000;
}</style>
}
</style>