Merge branch 'test' into warmfix_descriptorProxy_dataKey
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
commit
4910970ffe
|
@ -153,6 +153,7 @@ globals:
|
||||||
maxTemperature: Max
|
maxTemperature: Max
|
||||||
minTemperature: Min
|
minTemperature: Min
|
||||||
changePass: Change password
|
changePass: Change password
|
||||||
|
setPass: Set password
|
||||||
deleteConfirmTitle: Delete selected elements
|
deleteConfirmTitle: Delete selected elements
|
||||||
changeState: Change state
|
changeState: Change state
|
||||||
raid: 'Raid {daysInForward} days'
|
raid: 'Raid {daysInForward} days'
|
||||||
|
|
|
@ -157,6 +157,7 @@ globals:
|
||||||
maxTemperature: Máx
|
maxTemperature: Máx
|
||||||
minTemperature: Mín
|
minTemperature: Mín
|
||||||
changePass: Cambiar contraseña
|
changePass: Cambiar contraseña
|
||||||
|
setPass: Establecer contraseña
|
||||||
deleteConfirmTitle: Eliminar los elementos seleccionados
|
deleteConfirmTitle: Eliminar los elementos seleccionados
|
||||||
changeState: Cambiar estado
|
changeState: Cambiar estado
|
||||||
raid: 'Redada {daysInForward} días'
|
raid: 'Redada {daysInForward} días'
|
||||||
|
|
|
@ -25,12 +25,13 @@ const $props = defineProps({
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { hasAccount } = toRefs($props);
|
const { hasAccount } = toRefs($props);
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
|
const arrayData = useArrayData('Account');
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const { notify } = useQuasar();
|
const { notify } = useQuasar();
|
||||||
const account = computed(() => useArrayData('Account').store.data[0]);
|
const account = computed(() => arrayData.store.data);
|
||||||
account.value.hasAccount = hasAccount.value;
|
account.value.hasAccount = hasAccount.value;
|
||||||
const entityId = computed(() => +route.params.id);
|
const entityId = computed(() => +route.params.id);
|
||||||
const hasitManagementAccess = ref();
|
const hasitManagementAccess = ref();
|
||||||
|
@ -39,7 +40,7 @@ const isHimself = computed(() => user.value.id === account.value.id);
|
||||||
const url = computed(() =>
|
const url = computed(() =>
|
||||||
isHimself.value
|
isHimself.value
|
||||||
? 'Accounts/change-password'
|
? 'Accounts/change-password'
|
||||||
: `Accounts/${entityId.value}/setPassword`
|
: `Accounts/${entityId.value}/setPassword`,
|
||||||
);
|
);
|
||||||
|
|
||||||
async function updateStatusAccount(active) {
|
async function updateStatusAccount(active) {
|
||||||
|
@ -153,6 +154,7 @@ onMounted(() => {
|
||||||
t('account.card.actions.disableAccount.title'),
|
t('account.card.actions.disableAccount.title'),
|
||||||
t('account.card.actions.disableAccount.subtitle'),
|
t('account.card.actions.disableAccount.subtitle'),
|
||||||
() => deleteAccount(),
|
() => deleteAccount(),
|
||||||
|
() => deleteAccount(),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -172,6 +174,7 @@ onMounted(() => {
|
||||||
t('account.card.actions.enableAccount.title'),
|
t('account.card.actions.enableAccount.title'),
|
||||||
t('account.card.actions.enableAccount.subtitle'),
|
t('account.card.actions.enableAccount.subtitle'),
|
||||||
() => updateStatusAccount(true),
|
() => updateStatusAccount(true),
|
||||||
|
() => updateStatusAccount(true),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -186,6 +189,7 @@ onMounted(() => {
|
||||||
t('account.card.actions.disableAccount.title'),
|
t('account.card.actions.disableAccount.title'),
|
||||||
t('account.card.actions.disableAccount.subtitle'),
|
t('account.card.actions.disableAccount.subtitle'),
|
||||||
() => updateStatusAccount(false),
|
() => updateStatusAccount(false),
|
||||||
|
() => updateStatusAccount(false),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -201,6 +205,7 @@ onMounted(() => {
|
||||||
t('account.card.actions.activateUser.title'),
|
t('account.card.actions.activateUser.title'),
|
||||||
t('account.card.actions.activateUser.title'),
|
t('account.card.actions.activateUser.title'),
|
||||||
() => updateStatusUser(true),
|
() => updateStatusUser(true),
|
||||||
|
() => updateStatusUser(true),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -215,6 +220,7 @@ onMounted(() => {
|
||||||
t('account.card.actions.deactivateUser.title'),
|
t('account.card.actions.deactivateUser.title'),
|
||||||
t('account.card.actions.deactivateUser.title'),
|
t('account.card.actions.deactivateUser.title'),
|
||||||
() => updateStatusUser(false),
|
() => updateStatusUser(false),
|
||||||
|
() => updateStatusUser(false),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
describe('ClaimNotes', () => {
|
||||||
|
const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
|
||||||
|
const url = '/#/account/1/summary';
|
||||||
|
|
||||||
|
it('should see all the account options', () => {
|
||||||
|
cy.login('itManagement');
|
||||||
|
cy.visit(url);
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(descriptorOptions)
|
||||||
|
.find('.q-item')
|
||||||
|
.its('length')
|
||||||
|
.then((count) => {
|
||||||
|
cy.log('Número de opciones:', count);
|
||||||
|
expect(count).to.equal(5);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not see any option', () => {
|
||||||
|
cy.login('salesPerson');
|
||||||
|
cy.visit(url);
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(descriptorOptions).should('not.be.visible');
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue