Skip to content

Commit

Permalink
chore: add admin switch to edit dialog #198
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed Apr 11, 2024
2 parents 380f6ee + 86c422b commit 22d1905
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/views/admins/UsersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ const saveItem = (): void => {
// func(editItem.value);
}
}
// update admin status TODO
// update locally
pagination.value.results.splice(index, 1, { ...editItem.value });
}
Expand Down Expand Up @@ -243,6 +244,10 @@ const saveItem = (): void => {
<label class="font-semibold w-10rem">{{ t('admin.' + role) }}</label>
<InputSwitch :model-value="editItem.roles.includes(role)" @click="() => updateRole(role)" />
</div>
<div class="flex align-items-center gap-3 mb-3">
<label>{{ t('admin.title') }}</label>
<InputSwitch :model-value="editItem.is_staff" @click="editItem.is_staff = true" />
</div>
<div class="flex justify-content-end gap-2">
<Button type="button" :label="t('admin.cancel')" severity="secondary" @click="popupEdit = false"></Button>
<Button type="button" :label="t('admin.save')" @click="saveItem"></Button>
Expand Down

0 comments on commit 22d1905

Please sign in to comment.