diff --git a/client/core/src/autocomplete/index.js b/client/core/src/autocomplete/index.js index 3cd5cdb69..9cb309650 100644 --- a/client/core/src/autocomplete/index.js +++ b/client/core/src/autocomplete/index.js @@ -73,7 +73,7 @@ export default class Autocomplete extends Component { let skip = 0; if (textFilter) - where[this.showField] = {ilike: textFilter}; + where[this.showField] = {regexp: textFilter}; if (append && this.data) skip = this.data.length; diff --git a/client/core/src/textfield/index.js b/client/core/src/textfield/index.js index 2c600b74b..7320f7c6b 100644 --- a/client/core/src/textfield/index.js +++ b/client/core/src/textfield/index.js @@ -23,15 +23,15 @@ export default class Textfield extends Component { clearButton.addEventListener('mousedown', event => event.preventDefault()); - // input.value = ' '; let div = this.element.firstChild; componentHandler.upgradeElement(div); } link($scope, $attrs) { let mdlTextField = this.element.firstChild.MaterialTextfield; + mdlTextField.updateClasses_(); + $scope.$watch($attrs.model, () => mdlTextField.updateClasses_()); - mdlTextField.updateClasses_(); } onClearClick() { this.input.value = ''; diff --git a/dev.cmd b/dev.cmd index eff109181..57908de14 100644 --- a/dev.cmd +++ b/dev.cmd @@ -14,17 +14,15 @@ goto caseUsage echo "################################ Starting services" if not exist "%nginxPrefix%\temp" (mkdir "%nginxPrefix%\temp") start /I nginx -c "%nginxConf%" -p "%nginxPrefix%" - call forever --minUptime 1000 --spinSleepTime 1000 start forever.json - gulp --gulpfile gulpfile.js - goto caseExit + node dev.js + goto caseEnd :caseStop echo "################################ Stoping services" if exist "%nginxPrefix%\temp\nginx.pid" (nginx -c "%nginxConf%" -p "%nginxPrefix%" -s stop) - forever stopall - goto caseExit + goto caseEnd :caseUsage echo "Usage: %0 [start|stop]" -:caseExit \ No newline at end of file +:caseEnd diff --git a/dev.js b/dev.js new file mode 100644 index 000000000..d6fb5b167 --- /dev/null +++ b/dev.js @@ -0,0 +1,11 @@ +require('./gulpfile'); +var auth = require('./services/auth/server/server.js'); +var client = require('./services/client/server/server.js'); +var server = require('./services/salix/server/server.js'); +var gulp = require('gulp'); + +gulp.start(['default']); + +auth.start(); +client.start(); +server.start(); diff --git a/dev.sh b/dev.sh index c7c611f90..cdf040d5b 100755 --- a/dev.sh +++ b/dev.sh @@ -13,12 +13,10 @@ case "$1" in $0 stop echo "################################ Starting services" "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" - forever --minUptime 1000 --spinSleepTime 1000 start forever.json - gulp --gulpfile gulpfile.js + node dev.js ;; stop) echo "################################ Stoping services" - forever stopall "$nginxBin" -c "$nginxConf" -p "$nginxPrefix" -s stop ;; *) diff --git a/services/auth/server/datasources.json b/services/auth/server/datasources.json index 12a0c1946..ea04dddf1 100644 --- a/services/auth/server/datasources.json +++ b/services/auth/server/datasources.json @@ -6,7 +6,7 @@ "auth": { "name": "mysql", "connector": "mysql", - "database": "auth", + "database": "salix", "debug": false, "host": "localhost", "port": 3306, diff --git a/services/auth/server/server.js b/services/auth/server/server.js index 0f21d62ce..f873e2c7d 100644 --- a/services/auth/server/server.js +++ b/services/auth/server/server.js @@ -8,9 +8,9 @@ var app = module.exports = loopback(); // modificado app.set('view engine', 'ejs'); -app.set('views',path.join(__dirname,'../client')); +app.set('views', path.join(__dirname,'../client')); app.use(loopback.static(path.resolve(__dirname, '../client'))); -app.set('applications',require("./application.json")); +app.set('applications', require("./application.json")); // fin app.start = function() { diff --git a/services/client/common/models/Client.js b/services/client/common/models/Client.js index c6e37c61d..b52ea0033 100644 --- a/services/client/common/models/Client.js +++ b/services/client/common/models/Client.js @@ -80,12 +80,12 @@ module.exports = function(Client) { return { where: { id: p.id, - name: {ilike: p.name}, + name: {regexp: p.name}, cif: p.cif, - socialName: {ilike: p.socialName}, - city: {ilike: p.city}, + socialName: {regexp: p.socialName}, + city: {regexp: p.city}, postcode: p.postcode, - email: {ilike: p.email}, + email: {regexp: p.email}, phone: p.phone }, skip: (p.page - 1) * p.size, diff --git a/services/client/common/models/Client.json b/services/client/common/models/Client.json index e45d83576..9e49ea167 100644 --- a/services/client/common/models/Client.json +++ b/services/client/common/models/Client.json @@ -88,6 +88,12 @@ "invoiceByEmail": { "type": "boolean", "description": "Send invoices by email" + }, + "payMethod": { + "type": "Number" + }, + "salesPerson": { + "type": "Number" } }, "validations": [], diff --git a/services/client/common/models/ClientObservation.json b/services/client/common/models/ClientObservation.json index b875c4ce0..43ae368e0 100644 --- a/services/client/common/models/ClientObservation.json +++ b/services/client/common/models/ClientObservation.json @@ -16,6 +16,12 @@ "creationDate": { "type": "date", "description": "Creation Date" + }, + "client": { + "type": "Number" + }, + "salesPerson": { + "type": "Number" } }, "relations": { diff --git a/services/client/server/datasources.json b/services/client/server/datasources.json index 782619ed1..99577e192 100644 --- a/services/client/server/datasources.json +++ b/services/client/server/datasources.json @@ -7,7 +7,7 @@ "auth": { "name": "mysql", "connector": "mysql", - "database": "auth", + "database": "salix", "debug": false, "host": "localhost", "port": 3306, @@ -17,7 +17,7 @@ "vn": { "name": "mysql", "connector": "mysql", - "database": "vn", + "database": "salix", "debug": false, "host": "localhost", "port": 3306,