Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4658-createWorker
This commit is contained in:
commit
27e19234f9
|
@ -8,9 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [2302.01] - 2023-01-12
|
## [2302.01] - 2023-01-12
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- [General](Inicio) Permite recuperar la contraseña
|
||||||
-
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Se ha eliminado la sección "Control clientes" dentro de Ticket
|
|
||||||
|
### Removed
|
||||||
|
- [Tickets](Control clientes) Eliminada sección
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default {
|
||||||
firstModuleRemovePinIcon: 'vn-home a:nth-child(1) vn-icon[icon="remove_circle"]'
|
firstModuleRemovePinIcon: 'vn-home a:nth-child(1) vn-icon[icon="remove_circle"]'
|
||||||
},
|
},
|
||||||
recoverPassword: {
|
recoverPassword: {
|
||||||
recoverPasswordButton: 'vn-login a[ui-sref="recoverPassword"]',
|
recoverPasswordButton: 'vn-login a[ui-sref="recover-password"]',
|
||||||
email: 'vn-recover-password vn-textfield[ng-model="$ctrl.email"]',
|
email: 'vn-recover-password vn-textfield[ng-model="$ctrl.email"]',
|
||||||
sendEmailButton: 'vn-recover-password vn-submit',
|
sendEmailButton: 'vn-recover-password vn-submit',
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors';
|
import selectors from '../../helpers/selectors';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
// https://redmine.verdnatura.es/issues/4995 fix login
|
describe('RecoverPassword path', async() => {
|
||||||
xdescribe('RecoverPassword path', async() => {
|
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ xdescribe('RecoverPassword path', async() => {
|
||||||
page = browser.page;
|
page = browser.page;
|
||||||
|
|
||||||
await page.waitToClick(selectors.recoverPassword.recoverPasswordButton);
|
await page.waitToClick(selectors.recoverPassword.recoverPasswordButton);
|
||||||
await page.waitForState('recoverPassword');
|
await page.waitForState('recover-password');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async() => {
|
afterAll(async() => {
|
||||||
|
|
|
@ -24,7 +24,7 @@ export default class Auth {
|
||||||
initialize() {
|
initialize() {
|
||||||
let criteria = {
|
let criteria = {
|
||||||
to: state => {
|
to: state => {
|
||||||
const outLayout = ['login', 'recoverPassword', 'resetPassword'];
|
const outLayout = ['login', 'recover-password', 'reset-password'];
|
||||||
return !outLayout.some(ol => ol == state.name);
|
return !outLayout.some(ol => ol == state.name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
<vn-layout
|
<ui-view></ui-view>
|
||||||
ng-if="$ctrl.showLayout">
|
|
||||||
</vn-layout>
|
|
||||||
<ui-view
|
|
||||||
name="login"
|
|
||||||
ng-if="!$ctrl.showLayout">
|
|
||||||
</ui-view>
|
|
||||||
<vn-snackbar vn-id="snackbar"></vn-snackbar>
|
<vn-snackbar vn-id="snackbar"></vn-snackbar>
|
||||||
<vn-debug-info></vn-debug-info>
|
<vn-debug-info></vn-debug-info>
|
||||||
|
|
|
@ -19,12 +19,6 @@ export default class App extends Component {
|
||||||
this.vnApp.logger = this;
|
this.vnApp.logger = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
get showLayout() {
|
|
||||||
const state = this.$state.current.name || this.$location.$$path.substring(1).replace('/', '.');
|
|
||||||
const outLayout = ['login', 'recoverPassword', 'resetPassword', 'reset-password'];
|
|
||||||
return state && !outLayout.some(ol => ol == state);
|
|
||||||
}
|
|
||||||
|
|
||||||
$onDestroy() {
|
$onDestroy() {
|
||||||
this.deregisterCallback();
|
this.deregisterCallback();
|
||||||
this.vnApp.logger = null;
|
this.vnApp.logger = null;
|
||||||
|
|
|
@ -1,32 +1,27 @@
|
||||||
<div class="box">
|
<vn-textfield
|
||||||
<img src="./logo.svg"/>
|
label="User"
|
||||||
<form name="form" ng-submit="$ctrl.submit()">
|
ng-model="$ctrl.user"
|
||||||
<vn-textfield
|
vn-id="userField"
|
||||||
label="User"
|
vn-focus>
|
||||||
ng-model="$ctrl.user"
|
</vn-textfield>
|
||||||
vn-id="userField"
|
<vn-textfield
|
||||||
vn-focus>
|
label="Password"
|
||||||
</vn-textfield>
|
ng-model="$ctrl.password"
|
||||||
<vn-textfield
|
type="password">
|
||||||
label="Password"
|
</vn-textfield>
|
||||||
ng-model="$ctrl.password"
|
<vn-check
|
||||||
type="password">
|
label="Do not close session"
|
||||||
</vn-textfield>
|
ng-model="$ctrl.remember"
|
||||||
<vn-check
|
name="remember">
|
||||||
label="Do not close session"
|
</vn-check>
|
||||||
ng-model="$ctrl.remember"
|
<div class="footer">
|
||||||
name="remember">
|
<vn-submit label="Enter" ng-click="$ctrl.submit()"></vn-submit>
|
||||||
</vn-check>
|
<div class="spinner-wrapper">
|
||||||
<div class="footer">
|
<vn-spinner enable="$ctrl.loading"></vn-spinner>
|
||||||
<vn-submit label="Enter" ng-click="$ctrl.submit()"></vn-submit>
|
</div>
|
||||||
<div class="spinner-wrapper">
|
<div class="vn-pt-lg">
|
||||||
<vn-spinner enable="$ctrl.loading"></vn-spinner>
|
<a ui-sref="recover-password" translate>
|
||||||
</div>
|
I do not remember my password
|
||||||
<!--<div class="vn-pt-lg">
|
</a>
|
||||||
<a ui-sref="recoverPassword" translate>
|
</div>
|
||||||
I do not remember my password
|
|
||||||
</a>
|
|
||||||
</div>-->
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,7 @@ vn-recover-password{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vn-login{
|
vn-out-layout{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -3,27 +3,38 @@ import getMainRoute from 'core/lib/get-main-route';
|
||||||
|
|
||||||
config.$inject = ['$stateProvider', '$urlRouterProvider'];
|
config.$inject = ['$stateProvider', '$urlRouterProvider'];
|
||||||
function config($stateProvider, $urlRouterProvider) {
|
function config($stateProvider, $urlRouterProvider) {
|
||||||
$urlRouterProvider.otherwise('/');
|
$urlRouterProvider
|
||||||
|
.otherwise('/');
|
||||||
|
|
||||||
$stateProvider
|
$stateProvider
|
||||||
|
.state('layout', {
|
||||||
|
abstract: true,
|
||||||
|
template: '<vn-layout></vn-layout>',
|
||||||
|
})
|
||||||
|
.state('outLayout', {
|
||||||
|
abstract: true,
|
||||||
|
template: '<vn-out-layout></vn-out-layout>',
|
||||||
|
})
|
||||||
.state('login', {
|
.state('login', {
|
||||||
|
parent: 'outLayout',
|
||||||
url: '/login?continue',
|
url: '/login?continue',
|
||||||
description: 'Login',
|
description: 'Login',
|
||||||
views: {
|
template: '<vn-login></vn-login>'
|
||||||
'login': {template: '<vn-login></vn-login>'},
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.state('recoverPassword', {
|
.state('recover-password', {
|
||||||
|
parent: 'outLayout',
|
||||||
url: '/recover-password',
|
url: '/recover-password',
|
||||||
description: 'Recover-password',
|
description: 'Recover password',
|
||||||
template: '<vn-recover-password>asd</vn-recover-password>'
|
template: '<vn-recover-password></vn-recover-password>'
|
||||||
})
|
})
|
||||||
.state('resetPassword', {
|
.state('reset-password', {
|
||||||
|
parent: 'outLayout',
|
||||||
url: '/reset-password',
|
url: '/reset-password',
|
||||||
description: 'Reset-password',
|
description: 'Reset password',
|
||||||
template: '<vn-reset-password></vn-reset-password>'
|
template: '<vn-reset-password></vn-reset-password>'
|
||||||
})
|
})
|
||||||
.state('home', {
|
.state('home', {
|
||||||
|
parent: 'layout',
|
||||||
url: '/',
|
url: '/',
|
||||||
description: 'Home',
|
description: 'Home',
|
||||||
template: '<vn-home></vn-home>'
|
template: '<vn-home></vn-home>'
|
||||||
|
@ -54,6 +65,10 @@ function config($stateProvider, $urlRouterProvider) {
|
||||||
};
|
};
|
||||||
if (route.abstract)
|
if (route.abstract)
|
||||||
configRoute.abstract = true;
|
configRoute.abstract = true;
|
||||||
|
|
||||||
|
if (!route.state.includes('.'))
|
||||||
|
configRoute.parent = 'layout';
|
||||||
|
|
||||||
if (route.routeParams)
|
if (route.routeParams)
|
||||||
configRoute.params = route.routeParams;
|
configRoute.params = route.routeParams;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue