Compare commits
5 Commits
v1.0.5
...
7b760afeb3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
||||||
@@ -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 = {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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