feat(backend): refactor/fix group management for admins (#838)

* fix(frontend): 🐛 update dialog implementation to simplify state management

* test(backend):  refactor test fixtures + admin group tests

* chore(backend): 🔨 add launcher.json for python debugging (tests)

* fix typing

* feat(backend):  refactor/fix group management for admins

* feat(frontend):  add/fix admin group management

* add LDAP checker

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-11-25 14:17:02 -09:00
committed by GitHub
parent 0db8a58963
commit 791aa8c610
52 changed files with 881 additions and 331 deletions

View File

@@ -2,8 +2,9 @@
<v-container fluid>
<BaseCardSectionTitle title="Manage Units"> </BaseCardSectionTitle>
<v-toolbar flat color="background">
<!-- New/Edit Food Dialog -->
<BaseDialog
ref="domFoodDialog"
v-model="newFoodDialog"
:title="dialog.title"
:icon="$globals.icons.units"
:submit-text="dialog.text"
@@ -18,12 +19,25 @@
</v-card-text>
</BaseDialog>
<!-- Delete Food Dialog -->
<BaseDialog
v-model="deleteFoodDialog"
:title="$t('general.confirm')"
color="error"
@confirm="actions.deleteOne(deleteTarget)"
>
<template #activator> </template>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
</v-card-text>
</BaseDialog>
<BaseButton
class="mr-1"
@click="
create = true;
actions.resetWorking();
domFoodDialog.open();
newFoodDialog = true;
"
></BaseButton>
<BaseButton secondary @click="filter = !filter"> Filter </BaseButton>
@@ -45,17 +59,17 @@
@click="
create = false;
actions.setWorking(item);
domFoodDialog.open();
newFoodDialog = true;
"
></BaseButton>
<BaseButton
delete
small
@click="
deleteFoodDialog = true;
deleteTarget = item.id;
"
></BaseButton>
<BaseDialog :title="$t('general.confirm')" color="error" @confirm="actions.deleteOne(item.id)">
<template #activator="{ open }">
<BaseButton delete small @click="open"></BaseButton>
</template>
<v-card-text>
{{ $t("general.confirm-delete-generic") }}
</v-card-text>
</BaseDialog>
</div>
</template>
</v-data-table>
@@ -90,6 +104,9 @@ export default defineComponent({
});
const state = reactive({
deleteFoodDialog: false,
newFoodDialog: false,
deleteTarget: 0,
headers: [
{ text: "Id", value: "id" },
{ text: "Name", value: "name" },