Merge branch 'dev' into 7055-testFilterItemForm
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:
commit
92a130b5db
|
@ -2,9 +2,9 @@
|
|||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnRow from '../ui/VnRow.vue';
|
||||
import VnInput from './VnInput.vue';
|
||||
import FetchData from '../FetchData.vue';
|
||||
import useNotify from 'src/composables/useNotify';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const props = defineProps({
|
||||
submitFn: { type: Function, default: () => {} },
|
||||
|
@ -70,19 +70,19 @@ defineExpose({ show: () => changePassDialog.value.show() });
|
|||
</QCardSection>
|
||||
<QForm ref="form">
|
||||
<QCardSection>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
v-if="props.askOldPass"
|
||||
:label="t('Old password')"
|
||||
v-model="passwords.oldPassword"
|
||||
type="password"
|
||||
:required="true"
|
||||
:toggle-visibility="true"
|
||||
autofocus
|
||||
/>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
:label="t('New password')"
|
||||
v-model="passwords.newPassword"
|
||||
type="password"
|
||||
:required="true"
|
||||
:toggle-visibility="true"
|
||||
:info="
|
||||
t('passwordRequirements', {
|
||||
length: requirements.length,
|
||||
|
@ -95,10 +95,10 @@ defineExpose({ show: () => changePassDialog.value.show() });
|
|||
autofocus
|
||||
/>
|
||||
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
:label="t('Repeat password')"
|
||||
v-model="passwords.repeatPassword"
|
||||
type="password"
|
||||
:toggle-visibility="true"
|
||||
/>
|
||||
</QCardSection>
|
||||
</QForm>
|
||||
|
|
|
@ -45,6 +45,7 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
const vnInputRef = ref(null);
|
||||
const showPassword = ref(false);
|
||||
const value = computed({
|
||||
get() {
|
||||
return $props.modelValue;
|
||||
|
@ -134,7 +135,7 @@ const handleInsertMode = (e) => {
|
|||
hide-bottom-space
|
||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_input'"
|
||||
>
|
||||
<template v-if="$slots.prepend" #prepend>
|
||||
<template #prepend>
|
||||
<slot name="prepend" />
|
||||
</template>
|
||||
<template #append>
|
||||
|
@ -158,7 +159,7 @@ const handleInsertMode = (e) => {
|
|||
emit('remove');
|
||||
}
|
||||
"
|
||||
></QIcon>
|
||||
/>
|
||||
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
|
||||
<QIcon v-if="info" name="info">
|
||||
<QTooltip max-width="350px">
|
||||
|
@ -169,18 +170,3 @@ const handleInsertMode = (e) => {
|
|||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
inputMin: Must be more than {value}
|
||||
maxLength: The value exceeds {value} characters
|
||||
inputMax: Must be less than {value}
|
||||
es:
|
||||
inputMin: Debe ser mayor a {value}
|
||||
maxLength: El valor excede los {value} carácteres
|
||||
inputMax: Debe ser menor a {value}
|
||||
</i18n>
|
||||
<style lang="scss">
|
||||
.q-field__append {
|
||||
padding-inline: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<script setup>
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const model = defineModel({ type: [Number, String] });
|
||||
const $props = defineProps({
|
||||
toggleVisibility: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const showPassword = ref(false);
|
||||
</script>
|
||||
<template>
|
||||
<VnInput
|
||||
v-bind="{ ...$attrs }"
|
||||
v-model="model"
|
||||
:type="
|
||||
$props.toggleVisibility ? (showPassword ? 'text' : 'password') : $attrs.type
|
||||
"
|
||||
>
|
||||
<template #append v-if="toggleVisibility">
|
||||
<QIcon
|
||||
:name="showPassword ? 'visibility_off' : 'visibility'"
|
||||
class="cursor-pointer"
|
||||
@click="showPassword = !showPassword"
|
||||
/>
|
||||
</template>
|
||||
</VnInput>
|
||||
</template>
|
|
@ -0,0 +1,81 @@
|
|||
import { describe, expect, it } from 'vitest';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
||||
|
||||
describe('tags computed property', () => {
|
||||
it('returns an object with the correct keys and values', () => {
|
||||
const vm = createWrapper(FetchedTags, {
|
||||
props: {
|
||||
item: {
|
||||
tag1: 'JavaScript',
|
||||
value1: 'Programming Language',
|
||||
tag2: 'Vue',
|
||||
value2: 'Framework',
|
||||
tag3: 'EmptyTag',
|
||||
},
|
||||
tag: 'tag',
|
||||
value: 'value',
|
||||
columns: 2,
|
||||
},
|
||||
}).vm;
|
||||
expect(vm.tags).toEqual({
|
||||
JavaScript: 'Programming Language',
|
||||
Vue: 'Framework',
|
||||
EmptyTag: '',
|
||||
});
|
||||
});
|
||||
|
||||
it('returns an empty object if the item prop is an empty object', () => {
|
||||
const vm = createWrapper(FetchedTags, {
|
||||
props: {
|
||||
item: {},
|
||||
tag: 'tag',
|
||||
value: 'value',
|
||||
},
|
||||
}).vm;
|
||||
expect(vm.tags).toEqual({});
|
||||
});
|
||||
|
||||
it('should calculate the correct columnStyle when columns prop is defined', () => {
|
||||
const vm = createWrapper(FetchedTags, {
|
||||
props: {
|
||||
item: {
|
||||
tag1: 'JavaScript',
|
||||
value1: 'Programming Language',
|
||||
tag2: 'Vue',
|
||||
value2: 'Framework',
|
||||
tag3: 'EmptyTag',
|
||||
},
|
||||
tag: 'tag',
|
||||
value: 'value',
|
||||
columns: 2,
|
||||
},
|
||||
}).vm;
|
||||
|
||||
const expectedStyle = {
|
||||
'grid-template-columns': 'repeat(2, 1fr)',
|
||||
'max-width': '8rem',
|
||||
};
|
||||
|
||||
expect(vm.columnStyle).toEqual(expectedStyle);
|
||||
});
|
||||
|
||||
it('should return an empty object for columnStyle when columns prop is not defined', () => {
|
||||
const vm = createWrapper(FetchedTags, {
|
||||
props: {
|
||||
item: {
|
||||
tag1: 'JavaScript',
|
||||
value1: 'Programming Language',
|
||||
tag2: 'Vue',
|
||||
value2: 'Framework',
|
||||
tag3: 'EmptyTag',
|
||||
},
|
||||
tag: 'tag',
|
||||
value: 'value',
|
||||
columns: null,
|
||||
},
|
||||
}).vm;
|
||||
|
||||
expect(vm.columnStyle).toEqual({});
|
||||
});
|
||||
});
|
|
@ -455,12 +455,26 @@ entry:
|
|||
packingOut: Package out
|
||||
landing: Landing
|
||||
isExcludedFromAvailable: Es inventory
|
||||
params:
|
||||
toShipped: To
|
||||
fromShipped: From
|
||||
warehouseiNFk: Warehouse
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
warehouseInFk: Warehouse in
|
||||
ticket:
|
||||
params:
|
||||
ticketFk: Ticket ID
|
||||
weekDay: Weekday
|
||||
agencyModeFk: Agency
|
||||
id: Worker
|
||||
state: State
|
||||
created: Created
|
||||
externalId: External ID
|
||||
counter: Counter
|
||||
freightItemName: Freight item name
|
||||
packageItemName: Package item name
|
||||
longName: Long name
|
||||
card:
|
||||
customerId: Customer ID
|
||||
customerCard: Customer card
|
||||
|
|
|
@ -456,12 +456,25 @@ entry:
|
|||
packingOut: Embalaje envíos
|
||||
landing: Llegada
|
||||
isExcludedFromAvailable: Es inventario
|
||||
params:
|
||||
toShipped: Hasta
|
||||
fromShipped: Desde
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
ticket:
|
||||
params:
|
||||
ticketFk: ID de ticket
|
||||
weekDay: Salida
|
||||
agencyModeFk: Agencia
|
||||
id: Comercial
|
||||
created: Creado
|
||||
state: Estado
|
||||
externalId: ID externo
|
||||
counter: Contador
|
||||
freightItemName: Nombre
|
||||
packageItemName: Embalaje
|
||||
longName: Descripción
|
||||
card:
|
||||
customerId: ID cliente
|
||||
customerCard: Ficha del cliente
|
||||
|
|
|
@ -6,6 +6,7 @@ import FormModelPopup from 'components/FormModelPopup.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
@ -61,10 +62,10 @@ const redirectToAccountBasicData = (_, { id }) => {
|
|||
hide-selected
|
||||
:rules="validate('VnUser.roleFk')"
|
||||
/>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
v-model="data.password"
|
||||
:label="t('ldap.password')"
|
||||
type="password"
|
||||
:toggle-visibility="true"
|
||||
:rules="validate('VnUser.password')"
|
||||
/>
|
||||
<QCheckbox
|
||||
|
|
|
@ -8,6 +8,7 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
@ -128,10 +129,9 @@ onMounted(async () => await getInitialLdapConfig());
|
|||
:required="true"
|
||||
:rules="validate('LdapConfig.rdn')"
|
||||
/>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
:label="t('ldap.password')"
|
||||
clearable
|
||||
type="password"
|
||||
v-model="data.password"
|
||||
:required="true"
|
||||
:rules="validate('LdapConfig.password')"
|
||||
|
|
|
@ -4,9 +4,9 @@ import { computed, ref } from 'vue';
|
|||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import AccountSummary from './Card/AccountSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -168,10 +168,9 @@ function exprBuilder(param, value) {
|
|||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<QCardSection>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
:label="t('Password')"
|
||||
v-model="data.password"
|
||||
type="password"
|
||||
:required="true"
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
|
|
|
@ -8,6 +8,7 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
|
@ -143,10 +144,9 @@ onMounted(async () => await getInitialSambaConfig());
|
|||
v-model="data.adUser"
|
||||
:rules="validate('SambaConfigs.adUser')"
|
||||
/>
|
||||
<VnInput
|
||||
<VnInputPassword
|
||||
:label="t('samba.passwordAD')"
|
||||
clearable
|
||||
type="password"
|
||||
v-model="data.adPassword"
|
||||
/>
|
||||
<VnInput
|
||||
|
|
|
@ -9,6 +9,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
|||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||
import { useQuasar } from 'quasar';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
hasAccount: {
|
||||
|
@ -97,14 +98,13 @@ async function sync() {
|
|||
<QTooltip>{{ t('account.card.actions.sync.tooltip') }}</QTooltip>
|
||||
</QIcon></QCheckbox
|
||||
>
|
||||
<QInput
|
||||
<VnInputPassword
|
||||
v-if="shouldSyncPassword"
|
||||
:label="t('login.password')"
|
||||
v-model="syncPassword"
|
||||
class="full-width"
|
||||
clearable
|
||||
clear-icon="close"
|
||||
type="password"
|
||||
/>
|
||||
</template>
|
||||
</VnConfirm>
|
||||
|
|
|
@ -95,6 +95,7 @@ customer:
|
|||
isToBeMailed: Mailing
|
||||
hasSepaVnl: VNL B2B received
|
||||
params:
|
||||
id: Id
|
||||
isWorker: Is Worker
|
||||
payMethod: Payment Method
|
||||
workerFk: Author
|
||||
|
@ -102,4 +103,15 @@ customer:
|
|||
created: Last Update Date
|
||||
creditInsurance: Credit Insurance
|
||||
defaulterSinced: Defaulted Since
|
||||
hasRecovery: Has Recovery
|
||||
hasRecovery: Has Recovery
|
||||
socialName: Social name
|
||||
city: City
|
||||
phone: Phone
|
||||
postcode: Postcode
|
||||
campaign: Campaign
|
||||
grouped: Grouped
|
||||
search: Contains
|
||||
itemId: Item Id
|
||||
ticketFk: Ticket Id
|
||||
description: Description
|
||||
quantity: Quantity
|
||||
|
|
|
@ -97,6 +97,7 @@ customer:
|
|||
isToBeMailed: Env. emails
|
||||
hasSepaVnl: Recibido B2B VNL
|
||||
params:
|
||||
id: ID
|
||||
isWorker: Es trabajador
|
||||
payMethod: F. Pago
|
||||
workerFk: Autor
|
||||
|
@ -104,4 +105,15 @@ customer:
|
|||
created: Fecha Ú. O.
|
||||
creditInsurance: Crédito A.
|
||||
defaulterSinced: Desde
|
||||
hasRecovery: Tiene recobro
|
||||
hasRecovery: Tiene recobro
|
||||
socialName: Razón social
|
||||
campaign: Campaña
|
||||
city: Ciudad
|
||||
phone: Teléfono
|
||||
postcode: Código postal
|
||||
grouped: Agrupado
|
||||
search: Contiene
|
||||
itemId: Id Artículo
|
||||
ticketFk: Id Ticket
|
||||
description: Descripción
|
||||
quantity: Cantidad
|
||||
|
|
|
@ -20,11 +20,3 @@ myEntries:
|
|||
downloadCsv: Download CSV
|
||||
wasteRecalc:
|
||||
recalcOk: The wastes were successfully recalculated
|
||||
entry:
|
||||
params:
|
||||
toShipped: To
|
||||
fromShipped: From
|
||||
warehouseiNFk: Warehouse
|
||||
daysOnward: Days onward
|
||||
daysAgo: Days ago
|
||||
|
|
@ -23,11 +23,3 @@ myEntries:
|
|||
downloadCsv: Descargar CSV
|
||||
wasteRecalc:
|
||||
recalcOk: Se han recalculado las mermas correctamente
|
||||
entry:
|
||||
params:
|
||||
toShipped: Hasta
|
||||
fromShipped: Desde
|
||||
warehouseInFk: Alm. entrada
|
||||
daysOnward: Días adelante
|
||||
daysAgo: Días atras
|
||||
|
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||
import { Notify } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { useLogin } from 'src/composables/useLogin';
|
||||
|
||||
|
@ -63,11 +63,10 @@ async function onSubmit() {
|
|||
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
||||
color="primary"
|
||||
/>
|
||||
<VnInput
|
||||
type="password"
|
||||
<VnInputPassword
|
||||
v-model="password"
|
||||
:label="t('login.password')"
|
||||
lazy-rules
|
||||
:toggle-visibility="true"
|
||||
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
||||
class="red"
|
||||
/>
|
||||
|
|
|
@ -7,6 +7,7 @@ import axios from 'axios';
|
|||
|
||||
import VnInput from 'components/common/VnInput.vue';
|
||||
import VnOutForm from 'components/ui/VnOutForm.vue';
|
||||
import VnInputPassword from 'src/components/common/VnInputPassword.vue';
|
||||
|
||||
const quasar = useQuasar();
|
||||
const router = useRouter();
|
||||
|
@ -54,8 +55,7 @@ async function onSubmit() {
|
|||
<template>
|
||||
<VnOutForm @submit="onSubmit" :title="t('globals.pageTitles.resetPassword')">
|
||||
<template #default>
|
||||
<VnInput
|
||||
type="password"
|
||||
<VnInputPassword
|
||||
:label="t('login.password')"
|
||||
v-model="newPassword"
|
||||
:info="
|
||||
|
@ -72,9 +72,8 @@ async function onSubmit() {
|
|||
<template #prepend>
|
||||
<QIcon name="password" />
|
||||
</template>
|
||||
</VnInput>
|
||||
<VnInput
|
||||
type="password"
|
||||
</VnInputPassword>
|
||||
<VnInputPassword
|
||||
:label="t('resetPassword.repeatPassword')"
|
||||
v-model="repeatPassword"
|
||||
required
|
||||
|
@ -82,7 +81,7 @@ async function onSubmit() {
|
|||
<template #prepend>
|
||||
<QIcon name="password" />
|
||||
</template>
|
||||
</VnInput>
|
||||
</VnInputPassword>
|
||||
</template>
|
||||
<template #buttons>
|
||||
<QBtn
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
route:
|
||||
params:
|
||||
etd: ETD
|
||||
tractorPlate: Plate
|
||||
price: Price
|
||||
observations: Observations
|
||||
id: ID
|
||||
name: Name
|
||||
cmrFk: CMR id
|
||||
hasCmrDms: Attached in gestdoc
|
||||
ticketFk: Ticketd id
|
||||
routeFk: Route id
|
||||
shipped: Shipped
|
||||
agencyAgreement: Agency agreement
|
||||
agencyModeName: Agency route
|
||||
Worker: Worker
|
||||
Agency: Agency
|
||||
Vehicle: Vehicle
|
||||
|
|
|
@ -19,6 +19,7 @@ describe('Login', () => {
|
|||
it('should fail to log in using wrong password', () => {
|
||||
cy.get('input[aria-label="Username"]').type('employee');
|
||||
cy.get('input[aria-label="Password"]').type('wrongPassword');
|
||||
cy.get('.q-field__append > .q-icon');
|
||||
cy.get('button[type="submit"]').click();
|
||||
cy.get('.q-notification__message').should(
|
||||
'have.text',
|
||||
|
|
Loading…
Reference in New Issue