fix: styles and i18n
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-06-06 23:39:38 +02:00
parent f305cee3ce
commit 17924dfeb3
5 changed files with 16 additions and 21 deletions

View File

@ -42,15 +42,12 @@ const onSynchronizeRoles = async () => {
>
<template #moreActions>
<QBtn
round
flat
style="margin-left: 0"
color="primary"
:label="t('accounts.syncAll')"
@click="onSynchronizeAll()"
/>
<QBtn
round
flat
color="primary"
:label="t('accounts.syncRoles')"
@click="onSynchronizeRoles()"

View File

@ -38,7 +38,7 @@ const hasData = computed({
const initialDataLoaded = ref(false);
const urlCreate = ref(null);
const urlUpdate = ref(null);
const urlUpdate = ref(`LdapConfigs/${1}`);
const customFn = ref(null);
const onTestConection = async () => {
@ -53,7 +53,7 @@ const onTestConection = async () => {
const getInitialLdapConfig = async () => {
try {
initialDataLoaded.value = false;
const { data } = await axios.get(`LdapConfigs/${1}`);
const { data } = await axios.get(urlUpdate.value);
initialData.value = data;
hasData.value = true;
return data;
@ -62,10 +62,8 @@ const getInitialLdapConfig = async () => {
console.error('Error fetching initial LDAP config', error);
return null;
} finally {
if (hasData.value) {
urlUpdate.value = `LdapConfigs/${1}`;
urlCreate.value = null;
} else {
if (hasData.value) urlCreate.value = null;
else {
urlUpdate.value = null;
urlCreate.value = `LdapConfigs`;
}
@ -75,7 +73,7 @@ const getInitialLdapConfig = async () => {
const deleteMailForward = async () => {
try {
await axios.delete(`LdapConfigs/${1}`);
await axios.delete(urlUpdate.value);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
@ -89,7 +87,7 @@ onMounted(async () => await getInitialLdapConfig());
<template>
<QPage>
<VnSubToolbar></VnSubToolbar>
<VnSubToolbar />
<FormModel
:key="initialDataLoaded"
model="AccountLdap"

View File

@ -40,7 +40,7 @@ const hasData = computed({
const initialDataLoaded = ref(false);
const urlCreate = ref(null);
const urlUpdate = ref(null);
const urlUpdate = ref(`SambaConfigs/${1}`);
const customFn = ref(null);
const onTestConection = async () => {
@ -55,7 +55,7 @@ const onTestConection = async () => {
const getInitialLdapConfig = async () => {
try {
initialDataLoaded.value = false;
const { data } = await axios.get(`SambaConfigs/${1}`);
const { data } = await axios.get(urlUpdate.value);
initialData.value = data;
hasData.value = true;
return data;
@ -64,10 +64,8 @@ const getInitialLdapConfig = async () => {
console.error('Error fetching initial LDAP config', error);
return null;
} finally {
if (hasData.value) {
urlUpdate.value = `SambaConfigs/${1}`;
urlCreate.value = null;
} else {
if (hasData.value) urlCreate.value = null;
else {
urlUpdate.value = null;
urlCreate.value = `SambaConfigs`;
}
@ -77,7 +75,7 @@ const getInitialLdapConfig = async () => {
const deleteMailForward = async () => {
try {
await axios.delete(`SambaConfigs/${1}`);
await axios.delete(urlUpdate.value);
initialData.value = { ...DEFAULT_DATA };
hasData.value = false;
notify(t('globals.dataSaved'), 'positive');
@ -91,7 +89,7 @@ onMounted(async () => await getInitialLdapConfig());
<template>
<QPage>
<VnSubToolbar></VnSubToolbar>
<VnSubToolbar />
<FormModel
ref="formModel"
:key="initialDataLoaded"

View File

@ -54,6 +54,7 @@ ldap:
groupDN: Group DN
testConnection: Test connection
success: LDAP connection established!
password: Password
samba:
enableSync: Enable synchronization
domainController: Domain controller

View File

@ -57,6 +57,7 @@ role:
name: Nombre
description: Descripción
ldap:
password: Contraseña
enableSync: Habilitar sincronización
server: Servidor
rdn: RDN
@ -73,7 +74,7 @@ samba:
userAD: Usuario AD
passwordAD: Contraseña AD
domainPart: DN usuarios (sin la parte del dominio)
Verify certificate: Verificar certificado
verifyCertificate: Verificar certificado
testConnection: Probar conexión
success: ¡Conexión con Samba establecida!
accounts: