web: create user manage dialog
This commit is contained in:
parent
39f1ec5752
commit
58c9a9f530
6 changed files with 62 additions and 8 deletions
1
web/components.d.ts
vendored
1
web/components.d.ts
vendored
|
@ -13,5 +13,6 @@ declare module 'vue' {
|
||||||
ListViewElement: typeof import('./src/components/ListViewElement.vue')['default']
|
ListViewElement: typeof import('./src/components/ListViewElement.vue')['default']
|
||||||
LoginPage: typeof import('./src/components/loginPage.vue')['default']
|
LoginPage: typeof import('./src/components/loginPage.vue')['default']
|
||||||
MainPage: typeof import('./src/components/MainPage.vue')['default']
|
MainPage: typeof import('./src/components/MainPage.vue')['default']
|
||||||
|
UsersDialog: typeof import('./src/components/NavBarIcons/UsersDialog.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
<v-toolbar color="main" dark prominent>
|
<v-toolbar color="main" dark prominent>
|
||||||
<img src="../assets/turbologo.svg" alt="logo" class="logo" width="75" />
|
<img src="../assets/turbologo.svg" alt="logo" class="logo" width="75" />
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<!-- Create, Edit -->
|
<!-- Users, Create, Edit -->
|
||||||
<div>
|
<div>
|
||||||
|
<!-- USER MANAGEMENT -->
|
||||||
|
<UsersDialog />
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- GROUP SECTION -->
|
<!-- GROUP SECTION -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@ -40,10 +42,16 @@
|
||||||
class="ms-auto"
|
class="ms-auto"
|
||||||
text="Cancel"
|
text="Cancel"
|
||||||
@click="group = false"
|
@click="group = false"
|
||||||
|
color="blue darken-1"
|
||||||
></v-btn>
|
></v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-btn class="ms-auto" text="Add" type="submit"></v-btn>
|
<v-btn
|
||||||
|
class="ms-auto"
|
||||||
|
text="Add"
|
||||||
|
type="submit"
|
||||||
|
color="blue darken-1"
|
||||||
|
></v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
@ -125,6 +133,7 @@
|
||||||
</div>
|
</div>
|
||||||
<v-number-input
|
<v-number-input
|
||||||
label="Amount (optional)"
|
label="Amount (optional)"
|
||||||
|
users
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
clearable
|
clearable
|
||||||
:min="0"
|
:min="0"
|
||||||
|
@ -148,11 +157,17 @@
|
||||||
<v-btn
|
<v-btn
|
||||||
class="ms-auto"
|
class="ms-auto"
|
||||||
text="Cancel"
|
text="Cancel"
|
||||||
|
color="blue darken-1"
|
||||||
@click="add = false"
|
@click="add = false"
|
||||||
></v-btn>
|
></v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-btn class="ms-auto" text="Add" type="submit"></v-btn>
|
<v-btn
|
||||||
|
class="ms-auto"
|
||||||
|
text="Add"
|
||||||
|
type="submit"
|
||||||
|
color="blue darken-1"
|
||||||
|
></v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{
|
{{
|
||||||
props.startDate
|
props.startDate
|
||||||
? props.startDate.toLocaleDateString()
|
? props.startDate.toLocaleDateString()
|
||||||
: "Verfügbar"
|
: "Indefinitely"
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
{{
|
{{
|
||||||
props.endDate
|
props.endDate
|
||||||
? props.endDate.toLocaleDateString()
|
? props.endDate.toLocaleDateString()
|
||||||
: "Ewig Verfügbar"
|
: "Indefinitely"
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +100,6 @@ import {
|
||||||
CalendarX,
|
CalendarX,
|
||||||
Pencil,
|
Pencil,
|
||||||
Trash,
|
Trash,
|
||||||
Power,
|
|
||||||
} from "lucide-vue-next";
|
} from "lucide-vue-next";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
|
31
web/src/components/NavBarIcons/UsersDialog.vue
Normal file
31
web/src/components/NavBarIcons/UsersDialog.vue
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<template>
|
||||||
|
<v-btn icon class="mr-3" @click="users = true">
|
||||||
|
<Users />
|
||||||
|
</v-btn>
|
||||||
|
<v-dialog v-model="users" width="1200" persistent>
|
||||||
|
<v-card max-width="1200">
|
||||||
|
<v-card-title>
|
||||||
|
<span class="headline">User Management Menu</span>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-subtitle>
|
||||||
|
<span>Add/Delete/Manage users who have access to this tool</span>
|
||||||
|
</v-card-subtitle>
|
||||||
|
<v-card-text>
|
||||||
|
<div>I am just a placeholder</div>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn color="blue darken-1" @click="users = false">Close</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { Users } from "lucide-vue-next";
|
||||||
|
|
||||||
|
const users = ref(false);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
|
@ -13,6 +13,13 @@ export interface License {
|
||||||
amount?: number;
|
amount?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CreateLicenseDto = Omit<License, "id"> & { group_id: string };
|
export interface CreateLicenseDto {
|
||||||
|
name: string;
|
||||||
|
start: Date | null;
|
||||||
|
end: Date | null;
|
||||||
|
key: string;
|
||||||
|
amount?: number;
|
||||||
|
group_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type CreateGroupDto = Omit<LicenseGroup, "id" | "licenses">;
|
export type CreateGroupDto = Omit<LicenseGroup, "id" | "licenses">;
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*",
|
"src/**/*",
|
||||||
"src/**/*.vue"
|
"src/**/*.vue",
|
||||||
|
"src/**/*/*.vue"
|
||||||
],
|
],
|
||||||
"exclude": ["dist", "node_modules", "cypress"],
|
"exclude": ["dist", "node_modules", "cypress"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }],
|
"references": [{ "path": "./tsconfig.node.json" }],
|
||||||
|
|
Loading…
Add table
Reference in a new issue