Compare commits
6 Commits
v1.0.5
...
9866cc3ffd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9866cc3ffd | ||
|
|
7b760afeb3 | ||
|
|
21dcf1a476 | ||
|
|
35d1a0f734 | ||
|
|
effbb61707 | ||
|
|
7eb5ab9ab2 |
1
.env.development
Normal file
1
.env.development
Normal file
@@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL= https://localhost:9500/api
|
||||||
1
.env.production
Normal file
1
.env.production
Normal file
@@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL= https://members.tecamino.com/api
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,6 +36,7 @@ yarn-error.log*
|
|||||||
|
|
||||||
# local .db files
|
# local .db files
|
||||||
*.db
|
*.db
|
||||||
|
*.dba
|
||||||
|
|
||||||
# local .log files
|
# local .log files
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ go 1.24.5
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
gitea.tecamino.com/paadi/access-handler v1.0.12
|
gitea.tecamino.com/paadi/access-handler v1.0.12
|
||||||
gitea.tecamino.com/paadi/memberDB v1.0.11
|
gitea.tecamino.com/paadi/memberDB v1.0.12
|
||||||
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
|
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
|
||||||
gitea.tecamino.com/paadi/tecamino-logger v0.2.1
|
gitea.tecamino.com/paadi/tecamino-logger v0.2.1
|
||||||
github.com/gin-contrib/cors v1.7.6
|
github.com/gin-contrib/cors v1.7.6
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ gitea.tecamino.com/paadi/access-handler v1.0.12 h1:lSmW0YrBJJvCqCg0ukTJHlFUNwd7q
|
|||||||
gitea.tecamino.com/paadi/access-handler v1.0.12/go.mod h1:w71lpnuu5MgAWG3oiI9vsY2dWi4njF/iPrM/xV/dbBQ=
|
gitea.tecamino.com/paadi/access-handler v1.0.12/go.mod h1:w71lpnuu5MgAWG3oiI9vsY2dWi4njF/iPrM/xV/dbBQ=
|
||||||
gitea.tecamino.com/paadi/dbHandler v1.0.4 h1:ctnaec0GDdtw3gRQdUISVDYLJ9x+vt50VW41OemfhD4=
|
gitea.tecamino.com/paadi/dbHandler v1.0.4 h1:ctnaec0GDdtw3gRQdUISVDYLJ9x+vt50VW41OemfhD4=
|
||||||
gitea.tecamino.com/paadi/dbHandler v1.0.4/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw=
|
gitea.tecamino.com/paadi/dbHandler v1.0.4/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw=
|
||||||
gitea.tecamino.com/paadi/memberDB v1.0.11 h1:Mwo86NVe7sLReRf+R4Z6hRxeEIgjjq6EPyiL1L1TlrA=
|
gitea.tecamino.com/paadi/memberDB v1.0.12 h1:chUTNlRpbB0dMcZtXpi114mrWO8G7jrTSkDYIvWzVzQ=
|
||||||
gitea.tecamino.com/paadi/memberDB v1.0.11/go.mod h1:iLm7nunVRzqJK8CV4PJVuWIhgPlQjNIaeOkmtfK5fMg=
|
gitea.tecamino.com/paadi/memberDB v1.0.12/go.mod h1:iLm7nunVRzqJK8CV4PJVuWIhgPlQjNIaeOkmtfK5fMg=
|
||||||
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 h1:vAq7mwUxlxJuLzCQSDMrZCwo8ky5usWi9Qz+UP+WnkI=
|
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 h1:vAq7mwUxlxJuLzCQSDMrZCwo8ky5usWi9Qz+UP+WnkI=
|
||||||
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1/go.mod h1:+tmf1rjPaKEoNeUcr1vdtoFIFweNG3aUGevDAl3NMBk=
|
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1/go.mod h1:+tmf1rjPaKEoNeUcr1vdtoFIFweNG3aUGevDAl3NMBk=
|
||||||
gitea.tecamino.com/paadi/tecamino-logger v0.2.1 h1:sQTBKYPdzn9mmWX2JXZBtGBvNQH7cuXIwsl4TD0aMgE=
|
gitea.tecamino.com/paadi/tecamino-logger v0.2.1 h1:sQTBKYPdzn9mmWX2JXZBtGBvNQH7cuXIwsl4TD0aMgE=
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ func main() {
|
|||||||
auth.POST("/members/import/csv", dbHandler.ImportCSV)
|
auth.POST("/members/import/csv", dbHandler.ImportCSV)
|
||||||
|
|
||||||
auth.POST("/events/add", dbHandler.StartNewEvent)
|
auth.POST("/events/add", dbHandler.StartNewEvent)
|
||||||
|
auth.POST("/events/edit", dbHandler.UpdateEvent)
|
||||||
auth.POST("/events/add/attendees", dbHandler.AddNewAttendees)
|
auth.POST("/events/add/attendees", dbHandler.AddNewAttendees)
|
||||||
auth.POST("/events/delete/attendees", dbHandler.DeleteAttendee)
|
auth.POST("/events/delete/attendees", dbHandler.DeleteAttendee)
|
||||||
auth.POST("/events/delete", dbHandler.DeleteEvent)
|
auth.POST("/events/delete", dbHandler.DeleteEvent)
|
||||||
|
|||||||
Binary file not shown.
@@ -3,12 +3,11 @@ import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } fro
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useLogin } from 'src/vueLib/login/useLogin';
|
import { useLogin } from 'src/vueLib/login/useLogin';
|
||||||
|
|
||||||
const host = window.location.hostname;
|
const host = import.meta.env.VITE_API_URL;
|
||||||
export const portApp = 9500;
|
|
||||||
|
|
||||||
// Create axios instance
|
// Create axios instance
|
||||||
export const appApi: AxiosInstance = axios.create({
|
export const appApi: AxiosInstance = axios.create({
|
||||||
baseURL: `https://${host}:${portApp}/api`,
|
baseURL: host,
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
withCredentials: true,
|
withCredentials: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function open(Event: Event | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Event !== null) {
|
if (Event !== null) {
|
||||||
localEvent.value = Event;
|
localEvent.value = { ...Event };
|
||||||
newEvent.value = false;
|
newEvent.value = false;
|
||||||
} else {
|
} else {
|
||||||
localEvent.value = {
|
localEvent.value = {
|
||||||
@@ -68,13 +68,15 @@ async function save() {
|
|||||||
|
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
|
|
||||||
let query = 'events/edit?id=' + localEvent.value.id;
|
let query = 'events/edit';
|
||||||
|
let payload = JSON.stringify([localEvent.value]);
|
||||||
if (newEvent.value) {
|
if (newEvent.value) {
|
||||||
query = 'events/add?name=' + localEvent.value.name;
|
query = 'events/add?name=' + localEvent.value.name;
|
||||||
|
payload = JSON.stringify(localEvent.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
appApi
|
appApi
|
||||||
.post(query, JSON.stringify(localEvent.value))
|
.post(query, payload)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('update');
|
emit('update');
|
||||||
dialog.value.close();
|
dialog.value.close();
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ function open(member: Member | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (member !== null) {
|
if (member !== null) {
|
||||||
localMember.value = member;
|
localMember.value = { ...member };
|
||||||
newMember.value = false;
|
newMember.value = false;
|
||||||
} else {
|
} else {
|
||||||
localMember.value = {
|
localMember.value = {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function open(role: Role | null, typ?: 'permissions') {
|
|||||||
|
|
||||||
showRoleField.value = typ !== 'permissions';
|
showRoleField.value = typ !== 'permissions';
|
||||||
if (role !== null) {
|
if (role !== null) {
|
||||||
localRole.value = role;
|
localRole.value = { ...role };
|
||||||
localRole.value.permissions = role.permissions || defaultPermissions;
|
localRole.value.permissions = role.permissions || defaultPermissions;
|
||||||
newRole.value = false;
|
newRole.value = false;
|
||||||
} else {
|
} else {
|
||||||
@@ -80,7 +80,7 @@ function save() {
|
|||||||
if (newRole.value) {
|
if (newRole.value) {
|
||||||
query = 'roles/add';
|
query = 'roles/add';
|
||||||
update = false;
|
update = false;
|
||||||
localRole.value.permissions = defaultPermissions;
|
localRole.value.permissions = localRole.value.permissions ?? defaultPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
appApi
|
appApi
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ async function open(user: User | null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user !== null) {
|
if (user !== null) {
|
||||||
localUser.value = user;
|
localUser.value = { ...user };
|
||||||
newUser.value = false;
|
newUser.value = false;
|
||||||
} else {
|
} else {
|
||||||
localUser.value = {
|
localUser.value = {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('general') }}</p>
|
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('general') }}</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="!user.isPermittedTo('userSettings', 'write')"
|
:readonly="!user.isPermittedTo('settings', 'write')"
|
||||||
:class="[
|
:class="[
|
||||||
colorGroup ? 'col-md-4' : 'col-md-3',
|
colorGroup ? 'col-md-4' : 'col-md-3',
|
||||||
colorGroup ? 'col-md-6' : 'col-md-6',
|
colorGroup ? 'col-md-6' : 'col-md-6',
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('database') }}</p>
|
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('database') }}</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="!user.isPermittedTo('userSettings', 'write')"
|
:readonly="!user.isPermittedTo('settings', 'write')"
|
||||||
:class="[
|
:class="[
|
||||||
colorGroup ? 'col-md-4' : 'col-md-3',
|
colorGroup ? 'col-md-4' : 'col-md-3',
|
||||||
colorGroup ? 'col-md-6' : 'col-md-6',
|
colorGroup ? 'col-md-6' : 'col-md-6',
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<div class="col-12 col-sm-6 col-md-3 q-px-md">
|
<div class="col-12 col-sm-6 col-md-3 q-px-md">
|
||||||
<p class="text-center text-bold text-h6 text-primary">{{ $t('primaryColor') }}</p>
|
<p class="text-center text-bold text-h6 text-primary">{{ $t('primaryColor') }}</p>
|
||||||
<q-color
|
<q-color
|
||||||
:disable="!user.isPermittedTo('userSettings', 'write')"
|
:disable="!user.isPermittedTo('settings', 'write')"
|
||||||
bordered
|
bordered
|
||||||
class="q-mx-md"
|
class="q-mx-md"
|
||||||
v-model="settings.primaryColor"
|
v-model="settings.primaryColor"
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
{{ $t('primaryColorText') }}
|
{{ $t('primaryColorText') }}
|
||||||
</p>
|
</p>
|
||||||
<q-color
|
<q-color
|
||||||
:disable="!user.isPermittedTo('userSettings', 'write')"
|
:disable="!user.isPermittedTo('settings', 'write')"
|
||||||
bordered
|
bordered
|
||||||
class="q-mx-md"
|
class="q-mx-md"
|
||||||
v-model="settings.primaryColorText"
|
v-model="settings.primaryColorText"
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
{{ $t('secondaryColor') }}
|
{{ $t('secondaryColor') }}
|
||||||
</p>
|
</p>
|
||||||
<q-color
|
<q-color
|
||||||
:disable="!user.isPermittedTo('userSettings', 'write')"
|
:disable="!user.isPermittedTo('settings', 'write')"
|
||||||
class="q-mx-md"
|
class="q-mx-md"
|
||||||
v-model="settings.secondaryColor"
|
v-model="settings.secondaryColor"
|
||||||
></q-color>
|
></q-color>
|
||||||
@@ -105,14 +105,14 @@
|
|||||||
{{ $t('secondaryColorText') }}
|
{{ $t('secondaryColorText') }}
|
||||||
</p>
|
</p>
|
||||||
<q-color
|
<q-color
|
||||||
:disable="!user.isPermittedTo('userSettings', 'write')"
|
:disable="!user.isPermittedTo('settings', 'write')"
|
||||||
class="q-mx-md"
|
class="q-mx-md"
|
||||||
v-model="settings.secondaryColorText"
|
v-model="settings.secondaryColorText"
|
||||||
></q-color>
|
></q-color>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
:disable="!user.isPermittedTo('userSettings', 'write')"
|
:disable="!user.isPermittedTo('settings', 'write')"
|
||||||
class="q-my-md q-mx-md"
|
class="q-my-md q-mx-md"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
dense
|
dense
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<q-card>
|
<q-card>
|
||||||
<q-card bordered v-for="(permission, index) in localPermission" v-bind:key="index">
|
<q-card bordered v-for="(permission, index) in localPermission" v-bind:key="index">
|
||||||
<q-card-section class="text-center">
|
<q-card-section class="text-center">
|
||||||
{{ permission }}
|
|
||||||
<div class="text-h7 text-bold text-primary">{{ $t(permission.name) }}</div>
|
<div class="text-h7 text-bold text-primary">{{ $t(permission.name) }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<EditOneDialog
|
<EditOneDialog
|
||||||
ref="editOneDialog"
|
ref="editOneDialog"
|
||||||
endpoint="Events/edit"
|
endpoint="events/edit"
|
||||||
query-id
|
query-id
|
||||||
v-on:update="updateEvents"
|
v-on:update="updateEvents"
|
||||||
></EditOneDialog>
|
></EditOneDialog>
|
||||||
|
|||||||
@@ -17,14 +17,6 @@ export function useRoleTable() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
|
||||||
name: 'id',
|
|
||||||
align: 'left' as const,
|
|
||||||
label: 'Id',
|
|
||||||
field: 'id',
|
|
||||||
sortable: true,
|
|
||||||
style: 'width: 50px; max-width: 50px;',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'role',
|
name: 'role',
|
||||||
align: 'left' as const,
|
align: 'left' as const,
|
||||||
|
|||||||
@@ -15,14 +15,6 @@ export function useUserTable() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
|
||||||
name: 'id',
|
|
||||||
align: 'left' as const,
|
|
||||||
label: 'Id',
|
|
||||||
field: 'id',
|
|
||||||
sortable: true,
|
|
||||||
style: 'width: 50px; max-width: 50px;',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'user',
|
name: 'user',
|
||||||
align: 'left' as const,
|
align: 'left' as const,
|
||||||
|
|||||||
Reference in New Issue
Block a user