diff --git a/@salix/app/src/app.js b/@salix/app/src/app.js index 81835fd89..4683d2169 100644 --- a/@salix/app/src/app.js +++ b/@salix/app/src/app.js @@ -6,14 +6,14 @@ import * as run from './run'; import * as configNgTranslate from './translate'; import * as components from './components'; -import title from './styles/title.css' -import padding from './styles/layout.css' -import margin from './styles/margin.scss' -import layout from './styles/padding.scss' -import background from './styles/background.scss' -import border from './styles/border.scss' -import fontStyle from './styles/font-style.scss' -import misc from './styles/misc.scss' -import display from './styles/display.css' +import title from './styles/title.css'; +import padding from './styles/layout.css'; +import margin from './styles/margin.scss'; +import layout from './styles/padding.scss'; +import background from './styles/background.scss'; +import border from './styles/border.scss'; +import fontStyle from './styles/font-style.scss'; +import misc from './styles/misc.scss'; +import display from './styles/display.css'; bootstrap(); diff --git a/@salix/app/src/components/searchbar/searchbar.js b/@salix/app/src/components/searchbar/searchbar.js index ff5987a55..9a013a5e7 100644 --- a/@salix/app/src/components/searchbar/searchbar.js +++ b/@salix/app/src/components/searchbar/searchbar.js @@ -19,7 +19,7 @@ function controller($element, $scope, $document, $compile, popover) { this.onClick = function(event) { var child = $document[0].createElement(this.popover); $compile(child)($scope); - popover.show(child, $element); + popover.show(child, $element[0]); // XXX: ¿Existe una forma más adecuada de acceder al controlador de un componente? var childCtrl = angular.element(child).isolateScope().$ctrl; diff --git a/@salix/core/src/autocomplete/index.js b/@salix/core/src/autocomplete/index.js index cb153da0e..844897b3b 100644 --- a/@salix/core/src/autocomplete/index.js +++ b/@salix/core/src/autocomplete/index.js @@ -1,124 +1,369 @@ import {module} from '../module'; export {factory as mdlFactory} from './index.mdl'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as normalizerFactory from '../inputAttrsNormalizer'; -require('./style.css'); +require('./style.scss'); -directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; -export function directive(resolve, normalizer) { - return { - restrict: 'E', - transclude: true, - scope: { - url: '@', - showField: '@', - valueField: '@', - model: '<' - }, - template: function(element, attrs) { - normalizer.normalize(attrs); - return resolve.getTemplate('autocomplete', attrs); - }, - link: function(scope, element, attrs) { - scope.$watch(attrs.model, () => { - let mdlField = element[0].firstChild.MaterialTextfield; - if (mdlField) - mdlField.updateClasses_(); - }); - componentHandler.upgradeElement(element[0].firstChild); - }, - controller: controller - }; +export const component = { + restrict: 'E', + transclude: true, + bindings: { + url: '@', + showField: '@', + valueField: '@', + model: '<' + }, + template: template, + controller: controller +}; +module.component('vnAutocomplete', component); + +template.$inject = ['$element', '$attrs', 'vnInputAttrsNormalizer', 'vnResolveDefaultComponent']; +function template($element, $attrs, normalizer, resolve) { + normalizer.normalize($attrs); + return resolve.getTemplate('autocomplete', $attrs); } -module.directive('vnAutocomplete', directive); controller.$inject = ['$http', '$element', '$attrs', '$scope', '$parse', '$document', 'vnPopover']; -export function controller($http, $element, $attrs, $scope, $parse, $document, popover) { - let dropdown = null; - let input = $element.find('input'); - let data = []; +function controller($http, $element, $attrs, $scope, $parse, $document, popoverProvider) { let locked = false; - $http.get($scope.url).then( - json => { - data = json.data; - setTimeout(function() { - $scope.setValue($scope.model); - }); - }, - json => {data = [];} - ); - $scope.$watch($attrs.model, (newValue) => { if(!locked) { locked = true; - $scope.setValue(newValue); + this.setValue(newValue); locked = false; } }); - $scope.setValue = function(value) { - let index = -1; + componentHandler.upgradeElement($element[0].firstChild); - if(value && data) - for(let i = 0; i < data.length; i++) - if(data[i][$scope.valueField] == value) { - $scope.selectOptionByIndex(i); - return; - } - - $scope.selectOptionByIndex(-1); + function mdlUpdate() { + let mdlField = $element[0].firstChild.MaterialTextfield; + if (mdlField) + mdlField.updateClasses_(); } - $scope.selectOptionByIndex = function(index) { - let value; + Object.assign(this, { + init: function() { + this.input = $element.find('input')[0]; + this.item = null; + this.data = null; + this.popover = null; + this.popoverData = null; + this.timeoutId = null; + this.lastSearch = null; + this.lastRequest = null; + this.currentRequest = null; + this.moreData = false; + this.activeOption = -1; + this.maxRows = 10; + this.requestDelay = 350; + this.requestItem(); + }, + loadData: function(textFilter) { + textFilter = textFilter ? textFilter : ''; - if(index >= 0) { - let item = data[index]; - input.val(item[$scope.showField]); - value = item[$scope.valueField]; - } - else { - input.val(''); - value = undefined; - } + if(this.lastSearch === textFilter) { + this.popoverDataReady(); + return; + } - if(!locked) { - $scope.$apply(function () { - locked = true; - $parse($attrs.model).assign($scope, value); - locked = false; + this.lastSearch = textFilter; + + let lastRequest = this.lastRequest; + let requestWillSame = lastRequest !== null + && !this.moreData + && textFilter.substr(0, lastRequest.length) === lastRequest; + + if(requestWillSame) + this.localFilter(textFilter); + else + this.requestData(textFilter, false); + }, + getRequestFields: function() { + let fields = {}; + fields[this.valueField] = true; + fields[this.showField] = true; + return fields; + }, + requestData: function(textFilter, append) { + let where = {}; + let skip = 0; + + if(textFilter) + where[this.showField] = {ilike: textFilter}; + if(append && this.data) + skip = this.data.length; + + let filter = { + fields: this.getRequestFields(), + where: where, + order: `${this.showField} ASC`, + skip: skip, + limit: this.maxRows + }; + + this.lastRequest = textFilter ? textFilter : ''; + let json = JSON.stringify(filter); + + if(this.currentRequest) + this.currentRequest.resolve(); + + this.currentRequest = $http.get(`${this.url}?filter=${json}`); + this.currentRequest.then( + json => this.onRequest(json.data, append), + json => this.onRequest([]) + ); + }, + onRequest: function(data, append) { + this.currentRequest = null; + this.moreData = data.length >= this.maxRows; + + if(!append || !this.data) + this.data = data; + else + this.data = this.data.concat(data); + + this.setPopoverData(this.data); + }, + localFilter: function(textFilter) { + let regex = new RegExp(textFilter, 'i'); + let data = this.data.filter((item) => { + return regex.test(item[this.showField]); }); + this.setPopoverData(data); + }, + setPopoverData: function(data) { + this.popoverData = data; + this.popoverDataReady(); + }, + popoverDataReady: function() { + if(this.hasFocus) + this.showPopover(); + }, + showPopover: function() { + if(!this.data) return; + + let fragment = $document[0].createDocumentFragment(); + let data = this.popoverData; + + for(let i = 0; i < data.length; i++) { + let li = $document[0].createElement('li'); + li.appendChild($document[0].createTextNode(data[i][this.showField])); + fragment.appendChild(li); + } + + if(this.moreData) { + let li = $document[0].createElement('li'); + li.appendChild($document[0].createTextNode('Load more')); + li.className = 'load-more'; + fragment.appendChild(li); + } + + if (!this.popover) { + let popover = $document[0].createElement('ul'); + popover.addEventListener('click', + (e) => this.onPopoverClick(e)); + popover.addEventListener('mousedown', + (e) => this.onPopoverMousedown(e)); + popover.className = 'vn-autocomplete'; + popover.appendChild(fragment); + popoverProvider.show(popover, this.input); + this.popover = popover; + } + else { + this.popover.innerHTML = ''; + this.popover.appendChild(fragment); + } + }, + hidePopover: function() { + if(!this.popover) return; + this.activeOption = -1; + popoverProvider.hide(); + this.popover = null; + }, + selectPopoverOption: function(index) { + if(!this.popover || index == -1) return; + if(index < this.popoverData.length) { + this.selectOptionByDataIndex(this.popoverData, index); + this.hidePopover(); + } + else + this.requestData(this.lastRequest, true); + }, + onPopoverClick: function(event) { + let childs = this.popover.childNodes; + for(let i = 0; i < childs.length; i++) + if(childs[i] === event.target) { + this.selectPopoverOption(i); + break; + } + }, + onPopoverMousedown: function(event) { + // Prevents input from loosing focus + event.preventDefault(); + }, + onClick: function(event) { + if(!this.popover) + this.showPopover(); + }, + onFocus: function() { + this.hasFocus = true; + this.input.select(); + + if(this.data) + this.showPopover(); + else + this.loadData(); + }, + onBlur: function() { + this.hasFocus = false; + this.restoreShowValue(); + this.hidePopover(); + }, + onKeydown: function(event) { + switch(event.keyCode) { + case 13: // Enter + this.selectPopoverOption(this.activeOption); + break; + case 27: // Escape + this.restoreShowValue(); + this.input.select(); + break; + case 38: // Arrow up + this.activateOption(this.activeOption-1); + break; + case 40: // Arrow down + this.activateOption(this.activeOption+1); + break; + default: + return; + } + + event.preventDefault(); + }, + onKeyup: function(event) { + if(!this.isKeycodePrintable(event.keyCode)) return; + if(this.timeoutId) clearTimeout(this.timeoutId); + this.timeoutId = setTimeout(() => this.onTimeout(), this.requestDelay); + }, + onTimeout: function() { + this.loadData(this.input.value); + this.timeoutId = null; + }, + isKeycodePrintable: function(keyCode) { + return keyCode == 32 // Spacebar + || keyCode == 8 // Backspace + || (keyCode > 47 && keyCode < 58) // Numbers + || (keyCode > 64 && keyCode < 91) // Letters + || (keyCode > 95 && keyCode < 112) // Numpad + || (keyCode > 185 && keyCode < 193) // ;=,-./` + || (keyCode > 218 && keyCode < 223); // [\]' + }, + restoreShowValue: function() { + this.putItem(this.item); + }, + requestItem: function() { + if(!this.model) return; + + let where = {}; + where[this.valueField] = this.model; + + let filter = { + fields: this.getRequestFields(), + where: where, + }; + + let json = JSON.stringify(filter); + + $http.get(`${this.url}?filter=${json}`).then( + json => this.onItemRequest(json.data), + json => this.onItemRequest(null) + ); + }, + onItemRequest: function(data) { + if(data && data.length > 0) + this.showItem(data[0]); + else + this.showItem(null); + }, + activateOption: function(index) { + + if(!this.popover) + this.showPopover(); + + let popover = this.popover; + let childs = popover.childNodes; + let len = this.popoverData.length; + + if(this.activeOption >= 0) + childs[this.activeOption].className = ''; + + if(index >= len) + index = 0; + else if(index < 0) + index = len - 1; + + if (index >= 0) { + let opt = childs[index]; + let top = popover.scrollTop; + let height = popover.clientHeight; + + if(opt.offsetTop + opt.offsetHeight > top + height) + top = opt.offsetTop + opt.offsetHeight - height; + else if(opt.offsetTop < top) + top = opt.offsetTop; + + opt.className = 'active'; + popover.scrollTop = top; + } + + this.activeOption = index; + }, + setValue: function(value) { + if(value) { + let data = this.data; + + if(data) + for(let i = 0; i < data.length; i++) + if(data[i][this.valueField] == value) { + this.putItem(data[i]); + return; + } + + this.requestItem(); + } + else + this.putItem(null); + }, + selectOptionByIndex: function(index) { + this.selectOptionByDataIndex(this.data, index); + }, + selectOptionByDataIndex: function(data, index) { + if(data && index >= 0 && index < data.length) + this.putItem(data[index]); + else + this.putItem(null); + }, + putItem: function(item) { + this.showItem(item); + let value = item ? item[this.valueField] : undefined; + + if(!locked) { + setTimeout (() => { + $scope.$apply(function () { + locked = true; + $parse($attrs.model).assign($scope, value); + locked = false; + }); + }); + } + }, + showItem: function(item) { + this.input.value = item ? item[this.showField] : ''; + this.item = item; + mdlUpdate(); } - } + }); - function onOptionClick(event) { - popover.hide(); - - let childs = dropdown.childNodes; - for(let i = 0; i < childs.length; i++) - if(childs[i] === event.target) { - $scope.selectOptionByIndex(i); - break; - } - } - - $scope.onClick = () => { - dropdown = $document[0].createElement('ul'); - dropdown.addEventListener('click', onOptionClick); - dropdown.className = 'vn-dropdown'; - - for(let i = 0; i < data.length; i++) { - let item = $document[0].createElement('li'); - item.className = 'vn-dropdown-item'; - item.appendChild($document[0].createTextNode(data[i][$scope.showField])); - dropdown.appendChild(item); - } - - popover.show(dropdown, input); - }; - - $scope.onKeypress = () => { - console.log(input.val()); - }; + this.init(); } diff --git a/@salix/core/src/autocomplete/index.mdl.html b/@salix/core/src/autocomplete/index.mdl.html index 04ef50d81..bef534feb 100644 --- a/@salix/core/src/autocomplete/index.mdl.html +++ b/@salix/core/src/autocomplete/index.mdl.html @@ -1,4 +1,14 @@ -
- +
+
diff --git a/@salix/core/src/autocomplete/style.css b/@salix/core/src/autocomplete/style.css deleted file mode 100644 index 39811f1a1..000000000 --- a/@salix/core/src/autocomplete/style.css +++ /dev/null @@ -1,18 +0,0 @@ -.vn-dropdown { - list-style-type: none; - padding: 1em; - margin: 0; - padding: 0; -} -.vn-dropdown-item { - display: block; - padding: .8em; - margin: 0; -} -.vn-dropdown-item:hover { - background-color: rgba(1,1,1,.1); - cursor: pointer; -} -.vn-dropdown-item:active { - background-color: rgba(1,1,1,.2); -} \ No newline at end of file diff --git a/@salix/core/src/autocomplete/style.scss b/@salix/core/src/autocomplete/style.scss new file mode 100644 index 000000000..1ddff61ec --- /dev/null +++ b/@salix/core/src/autocomplete/style.scss @@ -0,0 +1,25 @@ +ul.vn-autocomplete { + list-style-type: none; + padding: 1em; + margin: 0; + padding: 0; + overflow: auto; + max-height: 300px; + + li { + display: block; + padding: .8em; + margin: 0; + cursor: pointer; + + &.active, + &:hover { + background-color: rgba(1,1,1,.1); + } + &.load-more { + color: #ffa410; + font-weight: bold; + padding: .4em .8em; + } + } +} \ No newline at end of file diff --git a/@salix/core/src/mdl-override.css b/@salix/core/src/mdl-override.css index f2ea87bfd..c556fa556 100644 --- a/@salix/core/src/mdl-override.css +++ b/@salix/core/src/mdl-override.css @@ -9,6 +9,8 @@ /* TODO: No utilizar !important */ .mdl-button { font-weight: bolder; + color: #ffa410; + } .mdl-button--colored { color: white !important; @@ -26,3 +28,14 @@ color: white !important; background-color: #ff9400 !important; } + +.mdl-dialog__actions--full-width>*{ + text-align: center; +} + +.mdl-dialog{ + width: 400px; + font-family: raleway-regular; + line-height:60px; + text-align: center; +} \ No newline at end of file diff --git a/@salix/core/src/popover/index.js b/@salix/core/src/popover/index.js index d2ef01b6f..629d74835 100644 --- a/@salix/core/src/popover/index.js +++ b/@salix/core/src/popover/index.js @@ -47,7 +47,7 @@ function provider($document, $compile) { } if(parent) { - let parentNode = parent[0]; + let parentNode = parent; let rect = parentNode.getBoundingClientRect(); let left = rect.left; let top = rect.top + spacing + parentNode.offsetHeight; @@ -77,6 +77,7 @@ function provider($document, $compile) { this.show(childElement, parent); }, hide: function() { + if(!this.popover) return; $document.off('mousedown', this.docMouseDownHandler); $document[0].body.removeChild (this.popover); this.popover = null; diff --git a/@salix/crud/src/client/addresses-data-edit/index.js b/@salix/crud/src/client/addresses-data-edit/index.js index 0e7d785a8..268389dc1 100644 --- a/@salix/crud/src/client/addresses-data-edit/index.js +++ b/@salix/crud/src/client/addresses-data-edit/index.js @@ -13,7 +13,7 @@ export const COMPONENT = { this.copyAddress(); } ); - + $http.get('/client/api/Agencies').then( json => { this.agencies = json.data; diff --git a/@salix/crud/src/client/basic-data/index.js b/@salix/crud/src/client/basic-data/index.js index 9d8da6f5d..33ae58e41 100644 --- a/@salix/crud/src/client/basic-data/index.js +++ b/@salix/crud/src/client/basic-data/index.js @@ -21,11 +21,7 @@ export const COMPONENT = { this.$onDestroy = function() { deregister(); }; -/* - $http.get('/client/api/SalesPeople').then( - json => {this.sales = json.data;} - ); -*/ + function callback(transition) { if (!equalsObject(self.client, self.clientOld)) { self.state = transition.to().name; diff --git a/@salix/crud/src/client/confirm/index.html b/@salix/crud/src/client/confirm/index.html index 5547c7527..82a6b0f26 100644 --- a/@salix/crud/src/client/confirm/index.html +++ b/@salix/crud/src/client/confirm/index.html @@ -1,11 +1,14 @@ - -
-

- ¿Desea salir sin guardar los cambios? -

-
-
- - -
+ + +
+ ¿Seguro que quieres salir sin guardar? +
+
+ Los cambios que no hayas guardado se perderán +
+
+ + + +
\ No newline at end of file diff --git a/@salix/crud/src/client/confirm/index.js b/@salix/crud/src/client/confirm/index.js index f9c3400bb..877de9b7b 100644 --- a/@salix/crud/src/client/confirm/index.js +++ b/@salix/crud/src/client/confirm/index.js @@ -1,6 +1,8 @@ import template from './index.html'; import {module} from '../../module'; +require('./style.css'); + export const NAME = 'vnDialogConfirm'; export const COMPONENT = { template: template, diff --git a/@salix/crud/src/client/confirm/style.css b/@salix/crud/src/client/confirm/style.css new file mode 100644 index 000000000..97fc32283 --- /dev/null +++ b/@salix/crud/src/client/confirm/style.css @@ -0,0 +1,5 @@ + +.dialog-title{ + color:#424242; + font-family: raleway-bold; +} diff --git a/@salix/crud/src/client/descriptor/descriptor.html b/@salix/crud/src/client/descriptor/descriptor.html index c6a198de2..05a869d34 100644 --- a/@salix/crud/src/client/descriptor/descriptor.html +++ b/@salix/crud/src/client/descriptor/descriptor.html @@ -8,8 +8,8 @@
{{descriptor.client.id}}
{{descriptor.client.name}}
{{descriptor.client.phone}}
+ - - + diff --git a/@salix/crud/src/client/fiscal-data/index.html b/@salix/crud/src/client/fiscal-data/index.html index 8a4d59651..d4de95dbd 100644 --- a/@salix/crud/src/client/fiscal-data/index.html +++ b/@salix/crud/src/client/fiscal-data/index.html @@ -13,12 +13,20 @@ - - - - - - + + + + @@ -27,9 +35,13 @@ Información de facturación - - - + + diff --git a/@salix/crud/src/client/fiscal-data/index.js b/@salix/crud/src/client/fiscal-data/index.js index 401c22d97..c589a4cba 100644 --- a/@salix/crud/src/client/fiscal-data/index.js +++ b/@salix/crud/src/client/fiscal-data/index.js @@ -12,18 +12,6 @@ export const COMPONENT = { var self = this; var deregister = $transitions.onStart({ }, callback); - $http.get('/client/api/Countries').then( - json => this.countries = json.data - ); - - $http.get('/client/api/Provinces').then( - json => this.provinces = json.data - ); - - $http.get('/client/api/PaymentMethods').then( - json => this.payments = json.data - ); - this.submit = function() { if (!equalsObject(this.client, this.clientOld)) { this.client.modify = "FiscalData"; diff --git a/@salix/crud/src/client/new-note/index.js b/@salix/crud/src/client/new-note/index.js index f1bd48dfa..d9bc9de0e 100644 --- a/@salix/crud/src/client/new-note/index.js +++ b/@salix/crud/src/client/new-note/index.js @@ -6,14 +6,13 @@ export const COMPONENT = { template: template, controllerAs: 'newNote', controller: function($http, $state, copyObject, equalsObject, $transitions, $element) { - this.client = $state.params.id; this.note = {text: null}; var self = this; - + var deregister = $transitions.onStart({ }, callback); copyNote(); - + this.submit = function() { if (this.note) { let observation = this.createNote(); @@ -21,7 +20,7 @@ export const COMPONENT = { json => { this.note = json.data; copyNote(); - $state.go('clientCard.notes'); + $state.go('clientCard.notes'); } ); } diff --git a/db.json b/db.json index 529d5023b..923d9c442 100644 --- a/db.json +++ b/db.json @@ -2,15 +2,15 @@ "ids": { "User": 2, "AccessToken": 2, - "Client": 16, + "Client": 17, "PaymentMethod": 4, - "SalesPerson": 4, - "Address": 58, - "Country": 3, - "Province": 3, + "SalesPerson": 11, + "Address": 61, + "Country": 10, + "Province": 44, "Agency": 4, - "Account": 20, - "ClientObservation": 1265 + "Account": 21, + "ClientObservation": 1268 }, "models": { "User": { @@ -22,7 +22,8 @@ "Client": { "12": "{\"name\":\"Verdnatura\",\"id\":12,\"fi\":\"B97367486\",\"salesPerson\":\"1\",\"telefono\":\"963242100\",\"socialName\":\"Verdnatura Levante SL\",\"active\":true,\"user\":\"verdnatura\",\"fax\":\"963242100\",\"phone\":\"963242101d\",\"email\":\"informatica@verdnatura.es\",\"surcharge\":true,\"cyc\":2345,\"credit\":1000,\"iban\":\"456\",\"street\":\"Avenida Espioca, 100\",\"city\":\"Silla\",\"postcode\":\"46013\",\"mobile\":\"654654654\",\"dueDay\":10,\"gestdoc\":23452343,\"province\":\"2\",\"country\":\"1\",\"modify\":\"BasicData\",\"navigate\":true,\"payMethod\":\"1\"}", "14": "{\"name\":\"Cliente 1\",\"id\":14,\"street\":\"Aaaaaaaaaa\",\"fi\":\"1234567890A\",\"socialName\":\"Cliente 1\",\"fax\":\"963242100\",\"dischargeDate\":\"01/01/2017\",\"telefono\":\"963242100\",\"salesPerson\":\"2\",\"email\":\"informatica@verdnatura.es\",\"city\":\"asdf\",\"postcode\":\"asdf\",\"phone\":\"asdf\",\"mobile\":\"asdf\",\"credit\":2345,\"cyc\":123,\"iban\":\"asdf\",\"dueDay\":345,\"gestdoc\":2435,\"surcharge\":true,\"navigate\":true}", - "15": "{\"name\":\"afsdf\",\"fi\":\"12341234rasf\",\"socialName\":\"asdfasd\",\"dueDay\":5,\"id\":15,\"payMethod\":\"2\",\"salesPerson\":\"1\",\"modify\":\"BasicData\",\"iban\":\"sdfgsdfgsdfg\"}" + "15": "{\"name\":\"afsdf\",\"fi\":\"12341234rasf\",\"socialName\":\"asdfasd\",\"dueDay\":5,\"id\":15,\"payMethod\":\"2\",\"salesPerson\":\"1\",\"modify\":\"BasicData\",\"iban\":\"sdfgsdfgsdfg\"}", + "16": "{\"name\":\"floristeria laasdfas\",\"fi\":\"2345234523d\",\"socialName\":\"23452345assdfgsdfgt\",\"active\":true,\"dueDay\":5,\"id\":16,\"modify\":\"FiscalData\",\"email\":\"asdfopi jso@aosijf.com\",\"phone\":\"654654654\",\"mobile\":\"654456456\",\"fax\":\"456456456\",\"street\":\"asdfasdf\"}" }, "PaymentMethod": { "1": "{\"name\":\"Tarjeta\",\"id\":1}", @@ -32,20 +33,78 @@ "SalesPerson": { "1": "{\"id\":1,\"name\":\"Jesus Brocal\"}", "2": "{\"name\":\"Juan Carlos Lorenzo\",\"id\":2}", - "3": "{\"name\":\"Carlos Zambrano\",\"id\":3}" + "3": "{\"name\":\"Carlos Zambrano\",\"id\":3}", + "4": "{\"name\":\"Juan Ferrer\",\"id\":4}", + "5": "{\"name\":\"Javi Gallego\",\"id\":5}", + "6": "{\"name\":\"Vicente Falco\",\"id\":6}", + "7": "{\"name\":\"Nelo Sanchez\",\"id\":7}", + "8": "{\"name\":\"Francisco Natek\",\"id\":8}", + "9": "{\"name\":\"Silverio Rodriguez\",\"id\":9}", + "10": "{\"name\":\"Manoli\",\"id\":10}" }, "Address": { "57": "{\"street\":\"Avda Espioca\",\"consignee\":\"Vicente\",\"city\":\"Silla\",\"postcode\":\"46900\",\"phone\":\"963242100\",\"province\":\"1\",\"agency\":\"3\",\"id\":57,\"enabled\":true,\"default\":true}", + "58": "{\"street\":\"asdfasdfsdf\",\"consignee\":\"oiaspjdfopasidjfopsj\",\"city\":\"asdfasd\",\"postcode\":\"46460\",\"enabled\":true,\"phone\":\"23423342\",\"mobile\":\"234423\",\"default\":false,\"province\":\"19\",\"agency\":\"1\",\"client\":\"16\",\"id\":58}", + "59": "{\"street\":\"asdfasdf\",\"consignee\":\"asdfasdfasdf\",\"city\":\"sdfasdf\",\"postcode\":\"asdfa\",\"enabled\":true,\"phone\":\"a\",\"province\":\"14\",\"agency\":\"3\",\"client\":\"16\",\"id\":59,\"default\":false}", + "60": "{\"street\":\"asdfasdf\",\"consignee\":\"aasdfasdf\",\"city\":\"asdf\",\"postcode\":\"asdf\",\"enabled\":false,\"default\":false,\"province\":\"3\",\"client\":\"16\",\"id\":60}", "63": "{\"street\":\"Avd. Espioca nº 100\",\"consignee\":\"Verndatura Silla\",\"city\":\"Silla\",\"postcode\":\"46460\",\"phone\":\"66666666\",\"mobile\":\"989898888\",\"id\":63,\"province\":\"2\",\"agency\":\"3\",\"default\":false,\"enabled\":false}", "64": "{\"street\":\"Aaa\",\"consignee\":\"aaa\",\"city\":\"121212\",\"postcode\":\"11111\",\"phone\":\"963242100\",\"mobile\":\"11231241423\",\"id\":64,\"default\":false,\"province\":\"1\",\"agency\":\"2\",\"enabled\":false}" }, "Country": { "1": "{\"id\":1,\"name\":\"Spain\"}", - "2": "{\"id\":2,\"name\":\"France\"}" + "2": "{\"id\":2,\"name\":\"France\"}", + "3": "{\"name\":\"Italy\",\"id\":3}", + "4": "{\"name\":\"Germany\",\"id\":4}", + "5": "{\"name\":\"Portugal\",\"id\":5}", + "6": "{\"name\":\"Netherlands\",\"id\":6}", + "7": "{\"name\":\"Colombia\",\"id\":7}", + "8": "{\"name\":\"Mexico\",\"id\":8}", + "9": "{\"name\":\"USA\",\"id\":9}" }, "Province": { "1": "{\"id\":1,\"name\":\"Valencia\"}", - "2": "{\"id\":2,\"name\":\"Madrid\"}" + "2": "{\"id\":2,\"name\":\"Madrid\"}", + "3": "{\"id\":3,\"name\":\"Alicante\"}", + "4": "{\"id\":4,\"name\":\"Castellon\"}", + "5": "{\"id\":5,\"name\":\"Murcia\"}", + "6": "{\"id\":6,\"name\":\"Albacete\"}", + "7": "{\"id\":7,\"name\":\"Barcelona\"}", + "8": "{\"id\":8,\"name\":\"Tarragona\"}", + "9": "{\"id\":9,\"name\":\"Gerona\"}", + "10": "{\"id\":10,\"name\":\"Granada\"}", + "11": "{\"id\":11,\"name\":\"Guadalajara\"}", + "12": "{\"id\":12,\"name\":\"Cuenca\"}", + "13": "{\"id\":13,\"name\":\"Asturias\"}", + "14": "{\"id\":14,\"name\":\"Almería\"}", + "15": "{\"id\":15,\"name\":\"Ávila\"}", + "16": "{\"id\":16,\"name\":\"Vadajoz\"}", + "17": "{\"id\":17,\"name\":\"Burgos\"}", + "18": "{\"id\":18,\"name\":\"Málaga\"}", + "19": "{\"id\":19,\"name\":\"Navarra\"}", + "20": "{\"id\":20,\"name\":\"Ceuta\"}", + "21": "{\"id\":21,\"name\":\"Melilla\"}", + "22": "{\"id\":22,\"name\":\"Melilla\"}", + "23": "{\"id\":23,\"name\":\"Zaragoza\"}", + "24": "{\"id\":24,\"name\":\"Zamora\"}", + "25": "{\"id\":25,\"name\":\"Vizcaya\"}", + "26": "{\"id\":26,\"name\":\"Valladolid\"}", + "27": "{\"id\":27,\"name\":\"Toledo\"}", + "28": "{\"id\":28,\"name\":\"Teruel\"}", + "29": "{\"id\":29,\"name\":\"Santa Cruz de Tenerife\"}", + "30": "{\"id\":30,\"name\":\"Soria\"}", + "31": "{\"id\":31,\"name\":\"Sevilla\"}", + "32": "{\"id\":32,\"name\":\"Segovia\"}", + "33": "{\"id\":33,\"name\":\"Salamanca\"}", + "34": "{\"id\":34,\"name\":\"La Rioja\"}", + "35": "{\"id\":35,\"name\":\"Pontevedra\"}", + "36": "{\"id\":36,\"name\":\"Las Palmas\"}", + "37": "{\"id\":37,\"name\":\"Palencia\"}", + "38": "{\"id\":38,\"name\":\"Orense\"}", + "39": "{\"id\":39,\"name\":\"Lugo\"}", + "40": "{\"id\":40,\"name\":\"Lérida\"}", + "41": "{\"id\":41,\"name\":\"León\"}", + "42": "{\"id\":42,\"name\":\"Jaén\"}", + "43": "{\"id\":43,\"name\":\"Baleares\"}" }, "Agency": { "1": "{\"name\":\"Zeleris\",\"id\":1}", @@ -55,7 +114,8 @@ "Account": { "1": "{\"id\":1,\"password\":\"joselito\",\"name\":\"asdf\"}", "14": "{\"id\":14,\"active\":true,\"name\":\"f\"}", - "15": "{\"id\":15,\"name\":\"asdf\"}" + "15": "{\"id\":15,\"name\":\"asdf\"}", + "16": "{\"id\":16,\"name\":\"joselito\",\"active\":true}" }, "ClientObservation": { "1258": "{\"text\":\"Nota de prueba 1\",\"creationDate\":\"2017-01-17T15:24:23.320Z\",\"client\":12,\"salesPerson\":\"user\",\"id\":1258}", @@ -64,7 +124,10 @@ "1261": "{\"text\":\"Nota 2\",\"creationDate\":\"2017-01-17T15:35:06.313Z\",\"client\":14,\"salesPerson\":\"user\",\"id\":1261}", "1262": "{\"text\":\"Nota 3\",\"creationDate\":\"2017-01-17T15:35:10.602Z\",\"client\":14,\"salesPerson\":\"user\",\"id\":1262}", "1263": "{\"text\":\"Nota 4\",\"creationDate\":\"2017-01-17T15:35:44.768Z\",\"client\":14,\"salesPerson\":\"user\",\"id\":1263}", - "1264": "{\"text\":\"Nota 5\",\"creationDate\":\"2017-01-17T15:35:50.064Z\",\"client\":14,\"salesPerson\":\"user\",\"id\":1264}" + "1264": "{\"text\":\"Nota 5\",\"creationDate\":\"2017-01-17T15:35:50.064Z\",\"client\":14,\"salesPerson\":\"user\",\"id\":1264}", + "1265": "{\"text\":\"primera nota\",\"creationDate\":\"2017-01-20T10:23:28.000Z\",\"client\":\"16\",\"salesPerson\":\"user\",\"modify\":\"ClientObservation\",\"id\":1265}", + "1266": "{\"text\":\"segunda nota\",\"creationDate\":\"2017-01-20T10:23:37.000Z\",\"client\":\"16\",\"salesPerson\":\"user\",\"modify\":\"ClientObservation\",\"id\":1266}", + "1267": "{\"text\":\"tercera nota\",\"creationDate\":\"2017-01-20T10:23:53.000Z\",\"client\":\"16\",\"salesPerson\":\"user\",\"modify\":\"ClientObservation\",\"id\":1267}" } } } \ No newline at end of file