Did stuff

This commit is contained in:
2021-09-30 00:50:44 +02:00
parent c59646b8bd
commit d094b9dafc
4 changed files with 197 additions and 38 deletions

View File

@@ -1,41 +1,48 @@
<template>
<b-row>
<b-col>
<b-modal id="delete-confirm-modal" @ok="performDelete(confirmModal.type, confirmModal.id)" title="Confirmation">
<p>
Are you sure you want to <b>delete</b> the following model?
</p>
<p>
<b>type:</b> {{ confirmModal.type }}
</p>
<p>
<b>id:</b> {{ confirmModal.id }}
</p>
</b-modal>
<model-modal-info v-model="infoModal.show" :id="infoModal.id" :type="infoModal.type" @refresh="updateModelList"
@delete="childActionDelete"/>
<b-table striped hover :items="models" :fields="fields" :tbody-tr-class="rowClass" :busy="actionPending">
<div>
<b-row>
<b-col class="my-2 text-right">
<b-button @click="updateModelList" variant="primary" :disabled="actionPending">Update</b-button>
</b-col>
</b-row>
<b-row>
<b-col>
<b-modal id="delete-confirm-modal" @ok="performDelete(confirmModal.type, confirmModal.id)" title="Confirmation">
<p>
Are you sure you want to <b>delete</b> the following model?
</p>
<p>
<b>type:</b> {{ confirmModal.type }}
</p>
<p>
<b>id:</b> {{ confirmModal.id }}
</p>
</b-modal>
<model-modal-info v-model="infoModal.show" :id="infoModal.id" :type="infoModal.type" @refresh="updateModelList"
@delete="childActionDelete"/>
<b-table striped hover :items="models" :fields="fields" :tbody-tr-class="rowClass" :busy="actionPending">
<!-- A virtual column -->
<template #cell(actions)="data">
<b-button class="mx-1" size="sm" variant="primary" @click="actionInfo(data)">
<b-icon icon="info"/>
</b-button>
<b-button class="mx-1" size="sm" variant="danger" @click="actionDelete(data)">
<b-icon icon="trash"/>
</b-button>
</template>
<!-- A virtual column -->
<template #cell(actions)="data">
<b-button class="mx-1" size="sm" variant="primary" @click="actionInfo(data)">
<b-icon icon="info"/>
</b-button>
<b-button class="mx-1" size="sm" variant="danger" @click="actionDelete(data)">
<b-icon icon="trash"/>
</b-button>
</template>
<template #table-busy>
<div class="text-center my-2">
<b-spinner class="align-middle mx-2"/>
<strong>Loading...</strong>
</div>
</template>
<template #table-busy>
<div class="text-center my-2">
<b-spinner class="align-middle mx-2"/>
<strong>Loading...</strong>
</div>
</template>
</b-table>
</b-col>
</b-row>
</b-table>
</b-col>
</b-row>
</div>
</template>
<script>