refs #6905 add rows #235
|
@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2414.01] - 2024-04-04
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
## [2400.01] - 2024-01-04
|
## [2400.01] - 2024-01-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.12.0",
|
"version": "24.14.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -2,9 +2,11 @@ import { useState } from './useState';
|
||||||
import { useRole } from './useRole';
|
import { useRole } from './useRole';
|
||||||
import { useUserConfig } from './useUserConfig';
|
import { useUserConfig } from './useUserConfig';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import useNotify from './useNotify';
|
||||||
|
|
||||||
export function useSession() {
|
export function useSession() {
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
function getToken() {
|
function getToken() {
|
||||||
const localToken = localStorage.getItem('token');
|
const localToken = localStorage.getItem('token');
|
||||||
const sessionToken = sessionStorage.getItem('token');
|
const sessionToken = sessionStorage.getItem('token');
|
||||||
|
@ -27,38 +29,28 @@ export function useSession() {
|
||||||
sessionStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
sessionStorage.setItem('tokenMultimedia', data.tokenMultimedia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function destroyToken(url, storage, key) {
|
||||||
|
if (storage.getItem(key)) {
|
||||||
|
try {
|
||||||
|
await axios.post(url, null, {
|
||||||
|
headers: { Authorization: storage.getItem(key) },
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
notify('errors.statusUnauthorized', 'negative');
|
||||||
|
} finally {
|
||||||
|
storage.removeItem(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
async function destroy() {
|
async function destroy() {
|
||||||
if (localStorage.getItem('tokenMultimedia')){
|
const tokens = {
|
||||||
await axios.post('VnUsers/logoutMultimedia', null, {
|
tokenMultimedia: 'Accounts/logout',
|
||||||
headers: {Authorization: localStorage.getItem('tokenMultimedia') }
|
token: 'VnUsers/logout',
|
||||||
});
|
};
|
||||||
localStorage.removeItem('tokenMultimedia')
|
for (const [key, url] of Object.entries(tokens)) {
|
||||||
|
await destroyToken(url, localStorage, key);
|
||||||
|
await destroyToken(url, sessionStorage, key);
|
||||||
}
|
}
|
||||||
if (localStorage.getItem('token')){
|
|
||||||
await axios.post('VnUsers/logout', null, {
|
|
||||||
headers: {Authorization: localStorage.getItem('token') }
|
|
||||||
});
|
|
||||||
localStorage.removeItem('token')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (sessionStorage.getItem('tokenMultimedia')){
|
|
||||||
await axios.post('VnUsers/logoutMultimedia', null, {
|
|
||||||
headers: {Authorization: sessionStorage.getItem('tokenMultimedia') }
|
|
||||||
});
|
|
||||||
sessionStorage.removeItem('tokenMultimedia')
|
|
||||||
|
|
||||||
}
|
|
||||||
if (sessionStorage.getItem('token')){
|
|
||||||
await axios.post('VnUsers/logout', null, {
|
|
||||||
headers: {Authorization: sessionStorage.getItem('token') }
|
|
||||||
});
|
|
||||||
sessionStorage.removeItem('token')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { setUser } = useState();
|
const { setUser } = useState();
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ function openDialog(dmsId) {
|
||||||
>
|
>
|
||||||
<ItemDescriptorProxy
|
<ItemDescriptorProxy
|
||||||
v-if="col.name == 'description'"
|
v-if="col.name == 'description'"
|
||||||
:id="props.row.id"
|
:id="props.row.sale.itemFk"
|
||||||
:sale-fk="props.row.saleFk"
|
:sale-fk="props.row.saleFk"
|
||||||
></ItemDescriptorProxy>
|
></ItemDescriptorProxy>
|
||||||
</QTh>
|
</QTh>
|
||||||
|
|
|
@ -40,9 +40,9 @@ describe('VnLocation', () => {
|
||||||
cy.waitForElement('.q-card');
|
cy.waitForElement('.q-card');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Show all options', function() {
|
it('Show locations options', function() {
|
||||||
cy.get(inputLocation).click();
|
cy.get(inputLocation).click();
|
||||||
cy.get(locationOptions).should('have.length', 1);
|
cy.get(locationOptions).should('have.length', 5);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('WorkerList', () => {
|
||||||
it('should open the worker summary', () => {
|
it('should open the worker summary', () => {
|
||||||
cy.openListSummary(0);
|
cy.openListSummary(0);
|
||||||
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
|
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
|
||||||
cy.get('.summary .header').eq(0).invoke('text').should('include', 'Basic data');
|
cy.get('.summary .header-link').eq(0).invoke('text').should('include', 'Basic data');
|
||||||
cy.get('.summary .header').eq(1).should('have.text', 'User data');
|
cy.get('.summary .header-link').eq(1).should('have.text', 'User data');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -49,6 +49,8 @@ describe('VnPaginate', () => {
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
vm.arrayData.hasMoreData.value = true;
|
vm.arrayData.hasMoreData.value = true;
|
||||||
|
await vm.$nextTick();
|
||||||
|
|
||||||
vm.store.data = [
|
vm.store.data = [
|
||||||
{ id: 1, name: 'Tony Stark' },
|
{ id: 1, name: 'Tony Stark' },
|
||||||
{ id: 2, name: 'Jessica Jones' },
|
{ id: 2, name: 'Jessica Jones' },
|
||||||
|
|
Loading…
Reference in New Issue