feat: bolierplate layout samba and ldap
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
889263bfb8
commit
d46b906020
|
@ -29,7 +29,6 @@ const newAccountForm = reactive({
|
|||
url-create="Entries"
|
||||
model="account"
|
||||
:form-initial-data="newAccountForm"
|
||||
@on-data-saved="redirectToAccountBasicData"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
|
@ -17,7 +17,6 @@ import { toDate } from 'src/filters';
|
|||
const state = useState();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
|
||||
const user = state.getUser();
|
||||
|
@ -29,10 +28,6 @@ const newAccountForm = reactive({
|
|||
const suppliersOptions = ref([]);
|
||||
const travelsOptions = ref([]);
|
||||
const companiesOptions = ref([]);
|
||||
|
||||
const redirectToAccountBasicData = (_, { id }) => {
|
||||
router.push({ name: 'AccountBasicData', params: { id } });
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -75,7 +70,6 @@ const redirectToAccountBasicData = (_, { id }) => {
|
|||
url-create="Entries"
|
||||
model="account"
|
||||
:form-initial-data="newAccountForm"
|
||||
@on-data-saved="redirectToAccountBasicData"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const newAccountForm = reactive({
|
||||
|
@ -22,89 +18,47 @@ const newAccountForm = reactive({
|
|||
|
||||
<template>
|
||||
<QPage>
|
||||
<VnSubToolbar />
|
||||
<VnSubToolbar> </VnSubToolbar>
|
||||
<pre>TODO <b>LDAP</b></pre>
|
||||
<FormModel
|
||||
url-create="Entries"
|
||||
model="account"
|
||||
:form-initial-data="newAccountForm"
|
||||
@on-data-saved="redirectToAccountBasicData"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<template #moreActions>
|
||||
<QBtnGroup push class="q-gutter-x-sm">
|
||||
<QBtn round flat color="primary" :label="t('ldap.testConnection')">
|
||||
<QTooltip>
|
||||
{{ t('ldap.testConnection') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</QBtnGroup>
|
||||
</template>
|
||||
<template #form="{ data }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Supplier')"
|
||||
class="full-width"
|
||||
v-model="data.supplierFk"
|
||||
:options="suppliersOptions"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.supplierFk')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</div>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Travel')"
|
||||
class="full-width"
|
||||
v-model="data.travelFk"
|
||||
:options="travelsOptions"
|
||||
option-value="id"
|
||||
option-label="warehouseInName"
|
||||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.travelFk')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ scope.opt?.agencyModeName }} -
|
||||
{{ scope.opt?.warehouseInName }} ({{
|
||||
toDate(scope.opt?.shipped)
|
||||
}}) →
|
||||
{{ scope.opt?.warehouseOutName }} ({{
|
||||
toDate(scope.opt?.landed)
|
||||
}})</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</div>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Company')"
|
||||
class="full-width"
|
||||
v-model="data.companyFk"
|
||||
:options="companiesOptions"
|
||||
option-value="id"
|
||||
option-label="code"
|
||||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.companyFk')"
|
||||
<QCheckbox
|
||||
:label="t('ldap.enableSync')"
|
||||
v-model="data.enableSync"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
<template v-if="data.enableSync">
|
||||
<VnInput :label="t('ldap.server')" clearable v-model="data.server" />
|
||||
<VnInput :label="t('ldap.rdn')" clearable v-model="data.rdn" />
|
||||
<VnInput
|
||||
:label="t('ldap.passwordAD')"
|
||||
clearable
|
||||
type="password"
|
||||
v-model="data.passwordAD"
|
||||
/>
|
||||
<VnInput :label="t('ldap.userDN')" clearable v-model="data.userDN" />
|
||||
<VnInput
|
||||
:label="t('ldap.groupDN')"
|
||||
clearable
|
||||
v-model="data.groupDN"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</FormModel>
|
||||
</QPage>
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const newAccountForm = reactive({
|
||||
|
@ -22,89 +18,64 @@ const newAccountForm = reactive({
|
|||
|
||||
<template>
|
||||
<QPage>
|
||||
<VnSubToolbar />
|
||||
<VnSubToolbar></VnSubToolbar>
|
||||
<pre>TODO <b>SAMBA</b></pre>
|
||||
<FormModel
|
||||
url-create="Entries"
|
||||
model="account"
|
||||
:form-initial-data="newAccountForm"
|
||||
@on-data-saved="redirectToAccountBasicData"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<template #moreActions>
|
||||
<QBtn round flat color="primary" :label="t('samba.testConnection')">
|
||||
<QTooltip>
|
||||
{{ t('samba.testConnection') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn round flat color="primary" :label="t('samba.verifyCertificate')">
|
||||
<QTooltip>
|
||||
{{ t('samba.verifyCertificate') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
</template>
|
||||
<template #form="{ data }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Supplier')"
|
||||
class="full-width"
|
||||
v-model="data.supplierFk"
|
||||
:options="suppliersOptions"
|
||||
option-value="id"
|
||||
option-label="nickname"
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.supplierFk')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.nickname }}</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
#{{ scope.opt?.id }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</div>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Travel')"
|
||||
class="full-width"
|
||||
v-model="data.travelFk"
|
||||
:options="travelsOptions"
|
||||
option-value="id"
|
||||
option-label="warehouseInName"
|
||||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.travelFk')"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ scope.opt?.agencyModeName }} -
|
||||
{{ scope.opt?.warehouseInName }} ({{
|
||||
toDate(scope.opt?.shipped)
|
||||
}}) →
|
||||
{{ scope.opt?.warehouseOutName }} ({{
|
||||
toDate(scope.opt?.landed)
|
||||
}})</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
</div>
|
||||
</VnRow>
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<div class="col">
|
||||
<VnSelect
|
||||
:label="t('Company')"
|
||||
class="full-width"
|
||||
v-model="data.companyFk"
|
||||
:options="companiesOptions"
|
||||
option-value="id"
|
||||
option-label="code"
|
||||
map-options
|
||||
hide-selected
|
||||
:required="true"
|
||||
:rules="validate('account.companyFk')"
|
||||
<QCheckbox
|
||||
:label="t('samba.enableSync')"
|
||||
v-model="data.enableSync"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
<template v-if="data.enableSync">
|
||||
<VnInput
|
||||
:label="t('samba.domainController')"
|
||||
clearable
|
||||
v-model="data.domainController"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('samba.domainAD')"
|
||||
clearable
|
||||
v-model="data.domainAD"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('samba.groupDN')"
|
||||
clearable
|
||||
v-model="data.groupDN"
|
||||
/>
|
||||
|
||||
<VnInput :label="t('samba.userAD')" clearable v-model="data.userAD" />
|
||||
<VnInput
|
||||
:label="t('samba.passwordAD')"
|
||||
clearable
|
||||
type="password"
|
||||
v-model="data.passwordAD"
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('samba.domainPart')"
|
||||
clearable
|
||||
v-model="data.domainPart"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</FormModel>
|
||||
</QPage>
|
||||
|
|
|
@ -41,3 +41,24 @@ role:
|
|||
description: Description
|
||||
id: Id
|
||||
name: Name
|
||||
ldap:
|
||||
enableSync: Enable synchronization
|
||||
server: Server
|
||||
rdn: RDN
|
||||
userDN: User DN
|
||||
filter: Filter
|
||||
groupDN: Group DN
|
||||
testConnection: Test connection
|
||||
success: LDAP connection established!
|
||||
|
||||
samba:
|
||||
enableSync: Enable synchronization
|
||||
domainController: Domain controller
|
||||
domainAD: AD domain
|
||||
userAD: AD user
|
||||
groupDN: Group DN
|
||||
passwordAD: AD password
|
||||
domainPart: User DN (without domain part)
|
||||
verifyCertificate: Verify certificate
|
||||
testConnection: Test connection
|
||||
success: Samba connection established!
|
||||
|
|
|
@ -51,3 +51,24 @@ role:
|
|||
description: Descripción
|
||||
id: Idd
|
||||
name: Nombre
|
||||
|
||||
ldap:
|
||||
enableSync: Habilitar sincronización
|
||||
server: Servidor
|
||||
rdn: RDN
|
||||
userDN: DN usuarios
|
||||
filter: Filtro
|
||||
groupDN: DN grupos
|
||||
testConnection: Probar conexión
|
||||
success: ¡Conexión con LDAP establecida!
|
||||
samba:
|
||||
enableSync: Habilitar sincronización
|
||||
domainController: Controlador de dominio
|
||||
domainAD: Dominio AD
|
||||
groupDN: DN grupos
|
||||
userAD: Usuario AD
|
||||
passwordAD: Contraseña AD
|
||||
domainPart: DN usuarios (sin la parte del dominio)
|
||||
Verify certificate: Verificar certificado
|
||||
testConnection: Probar conexión
|
||||
success: ¡Conexión con Samba establecida!
|
||||
|
|
Loading…
Reference in New Issue