Merge remote-tracking branch 'origin/dev' into jgallego
This commit is contained in:
commit
a8a17b72bd
|
@ -19,5 +19,11 @@
|
|||
"expired": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
|
||||
"scope": {
|
||||
"where" :{
|
||||
"expired": null
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
describe('loopback model Company', () => {
|
||||
it('should check that the company FTH doesnt exists', async() => {
|
||||
let result = await app.models.Company.findOne({where: {code: 'FTH'}});
|
||||
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
});
|
|
@ -31,7 +31,7 @@ describe('User config', () => {
|
|||
expect(userLocalBank).toEqual('');
|
||||
expect(userLocalCompany).toEqual('');
|
||||
expect(userWarehouse).toEqual('Warehouse Three');
|
||||
expect(userCompany).toEqual('FTH');
|
||||
expect(userCompany).toEqual('VNH');
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -103,7 +103,7 @@ describe('User config', () => {
|
|||
expect(userLocalBank).toContain('Pay on receipt');
|
||||
expect(userLocalCompany).toContain('VNL');
|
||||
expect(userWarehouse).toEqual('Warehouse Three');
|
||||
expect(userCompany).toEqual('FTH');
|
||||
expect(userCompany).toEqual('VNH');
|
||||
});
|
||||
|
||||
it('should now clear the local settings', async() => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<md-checkbox
|
||||
aria-label="{{::$ctrl.label}}"
|
||||
aria-label="::$ctrl.label"
|
||||
md-indeterminate="$ctrl.isIntermediate"
|
||||
ng-disabled="$ctrl.disabled"
|
||||
ng-checked="$ctrl.isChecked"
|
||||
|
|
|
@ -16,9 +16,7 @@ export default class Controller extends Component {
|
|||
set model(value) {
|
||||
if (value === null) return;
|
||||
|
||||
if (this.model === true)
|
||||
value = false;
|
||||
else if (this.model === false && this.tripleState)
|
||||
if (this.model === false && this.tripleState)
|
||||
value = null;
|
||||
|
||||
this.emit('change', {value});
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
describe('Component vnCheck', () => {
|
||||
let controller;
|
||||
let $element;
|
||||
|
||||
beforeEach(ngModule('vnCore'));
|
||||
|
||||
beforeEach(inject(($compile, $rootScope) => {
|
||||
$element = $compile(`<vn-check></vn-check`)($rootScope);
|
||||
controller = $element.controller('vnCheck');
|
||||
}));
|
||||
|
||||
afterEach(() => {
|
||||
$element.remove();
|
||||
});
|
||||
|
||||
describe('model() setter', () => {
|
||||
it(`should set model value`, () => {
|
||||
controller.model = true;
|
||||
|
||||
expect(controller.model).toEqual(true);
|
||||
});
|
||||
|
||||
it(`should set model value to null if current model value is false and is a triple-state checkbox`, () => {
|
||||
controller._model = false;
|
||||
controller.tripleState = true;
|
||||
controller.model = true;
|
||||
|
||||
expect(controller.model).toEqual(null);
|
||||
});
|
||||
});
|
||||
|
||||
describe('field() setter', () => {
|
||||
it(`should set model value`, () => {
|
||||
controller.field = true;
|
||||
|
||||
expect(controller.field).toEqual(true);
|
||||
});
|
||||
|
||||
it(`should set model value and convert numerical values to boolean values`, () => {
|
||||
controller.field = 1;
|
||||
|
||||
expect(controller.field).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isIntermediate() getter', () => {
|
||||
it(`should return true if intermediate property is truthy`, () => {
|
||||
controller.intermediate = true;
|
||||
|
||||
let result = controller.isIntermediate;
|
||||
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
|
||||
it(`should return true if is a triple-state checkbox and has null or undefined value`, () => {
|
||||
controller.tripleState = true;
|
||||
controller.model = null;
|
||||
|
||||
let result = controller.isIntermediate;
|
||||
|
||||
expect(result).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -67,7 +67,7 @@ export default class Treeview extends Component {
|
|||
}
|
||||
|
||||
item.childs = newData.sort((a, b) => {
|
||||
let priority = b.isIncluded - a.isIncluded;
|
||||
let priority = (b.isIncluded - a.isIncluded) - 1;
|
||||
|
||||
if (b.name > a.name)
|
||||
priority++;
|
||||
|
|
|
@ -32,12 +32,12 @@ vn-treeview {
|
|||
background-color: $color-hover-cd
|
||||
}
|
||||
|
||||
li.expanded .actions > vn-icon[icon="keyboard_arrow_down"] {
|
||||
li.expanded > vn-horizontal > .actions > vn-icon[icon="keyboard_arrow_down"] {
|
||||
transition: all 0.2s;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
li.collapsed .actions > vn-icon[icon="keyboard_arrow_down"] {
|
||||
li.collapsed > vn-horizontal > .actions > vn-icon[icon="keyboard_arrow_down"] {
|
||||
transition: all 0.2s;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
const sortedLeaves = parentNodes.sort((a, b) => {
|
||||
let priority = b.isIncluded - a.isIncluded;
|
||||
let priority = (b.isIncluded - a.isIncluded) - 1;
|
||||
|
||||
if (b.name > a.name)
|
||||
priority++;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
|
@ -11,13 +11,13 @@
|
|||
"dependencies": {
|
||||
"compression": "^1.7.3",
|
||||
"fs-extra": "^5.0.0",
|
||||
"helmet": "^3.15.0",
|
||||
"helmet": "^3.15.1",
|
||||
"i18n": "^0.8.3",
|
||||
"loopback": "^3.24.0",
|
||||
"loopback": "^3.25.0",
|
||||
"loopback-boot": "^2.27.1",
|
||||
"loopback-component-explorer": "^6.3.1",
|
||||
"loopback-connector-mysql": "^5.3.1",
|
||||
"loopback-connector-remote": "^3.4.0",
|
||||
"loopback-connector-remote": "^3.4.1",
|
||||
"loopback-context": "^3.4.0",
|
||||
"md5": "^2.2.1",
|
||||
"object-diff": "0.0.4",
|
||||
|
@ -29,16 +29,16 @@
|
|||
"vn-loopback": "file:./loopback"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/core": "^7.3.3",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"@babel/preset-env": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@babel/register": "^7.0.0",
|
||||
"angular-mocks": "^1.7.4",
|
||||
"angular-mocks": "^1.7.7",
|
||||
"babel-loader": "^8.0.5",
|
||||
"css-loader": "^2.1.0",
|
||||
"del": "^2.2.2",
|
||||
"eslint": "^5.12.0",
|
||||
"eslint": "^5.14.0",
|
||||
"eslint-config-google": "^0.11.0",
|
||||
"eslint-plugin-jasmine": "^2.10.1",
|
||||
"fancy-log": "^1.3.2",
|
||||
|
@ -68,16 +68,16 @@
|
|||
"karma-webpack": "^3.0.5",
|
||||
"merge-stream": "^1.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"mysql2": "^1.6.1",
|
||||
"mysql2": "^1.6.5",
|
||||
"nightmare": "^3.0.1",
|
||||
"node-sass": "^4.9.3",
|
||||
"nodemon": "^1.18.5",
|
||||
"nodemon": "^1.18.10",
|
||||
"plugin-error": "^1.0.1",
|
||||
"raw-loader": "^1.0.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.28.3",
|
||||
"webpack-cli": "^3.2.1",
|
||||
"webpack": "^4.29.5",
|
||||
"webpack-cli": "^3.2.3",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-merge": "^4.2.1",
|
||||
"yaml-loader": "^0.5.0"
|
||||
|
|
|
@ -1055,7 +1055,7 @@ INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
|||
(1, 2, 69),
|
||||
(5, 1, 442),
|
||||
(9, 1, 442),
|
||||
(18, 3, 791);
|
||||
(18, 3, 567);
|
||||
|
||||
INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `amountUnpaid`, `payed`, `workerFk`, `bankFk`, `clientFk`, `created`, `companyFk`, `isConciliate`)
|
||||
VALUES
|
||||
|
|
Loading…
Reference in New Issue