Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/User/List.vue
Show All 27 Lines | <div class="container"> | ||||
class="btn btn-link text-danger button-delete p-0" | class="btn btn-link text-danger button-delete p-0" | ||||
@click="deleteUser(user.id)" | @click="deleteUser(user.id)" | ||||
> | > | ||||
<svg-icon icon="trash-alt"></svg-icon><span class="sr-only">Delete</span> | <svg-icon icon="trash-alt"></svg-icon><span class="sr-only">Delete</span> | ||||
</button> | </button> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</tbody> | </tbody> | ||||
<tfoot class="table-fake-body"> | |||||
<tr> | |||||
<td colspan="2">There are no users in this account.</td> | |||||
</tr> | |||||
</tfoot> | |||||
</table> | </table> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div id="delete-warning" class="modal" tabindex="-1" role="dialog"> | <div id="delete-warning" class="modal" tabindex="-1" role="dialog"> | ||||
<div class="modal-dialog" role="document"> | <div class="modal-dialog" role="document"> | ||||
<div class="modal-content"> | <div class="modal-content"> | ||||
Show All 24 Lines | <script> | ||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
users: [], | users: [], | ||||
current_user: null | current_user: null | ||||
} | } | ||||
}, | }, | ||||
created() { | created() { | ||||
this.$root.startLoading() | |||||
axios.get('/api/v4/users') | axios.get('/api/v4/users') | ||||
.then(response => { | .then(response => { | ||||
this.$root.stopLoading() | |||||
this.users = response.data | this.users = response.data | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
}, | }, | ||||
methods: { | methods: { | ||||
deleteUser(id) { | deleteUser(id) { | ||||
let dialog = $('#delete-warning').modal('hide') | let dialog = $('#delete-warning').modal('hide') | ||||
Show All 38 Lines |