From bf229d5af7ea135c1f420f3ff371a811450898fd Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Fri, 17 Feb 2017 17:37:46 +0300 Subject: [PATCH 1/4] Lint --- metadata/collection/permissions.js | 12 +++++------- organizations/collection/schema.js | 2 +- settings/server/methods.js | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/metadata/collection/permissions.js b/metadata/collection/permissions.js index 2d5e829849..fe17877fea 100644 --- a/metadata/collection/permissions.js +++ b/metadata/collection/permissions.js @@ -8,15 +8,13 @@ ApiMetadata.allow({ // Make sure there is only one document per API Backend ID // TODO: refactor ApiMetadata schema to use 'apiId' field if (ApiMetadata.find({ apiBackendId: apiId }).count() !== 0) { - return false; - } else { - // Find related API Backend, select only "managerIds" field + return false; + } + // Find related API Backend, select only "managerIds" field const api = Apis.findOne(apiId, { fields: { managerIds: 1 } }); - // Check if current user can edit API Backend - const userCanEdit = api.currentUserCanEdit(); - - return userCanEdit; + // Check if current user can edit API Backend + return api.currentUserCanEdit(); }, update (userId, metadata) { // Get API Backend ID diff --git a/organizations/collection/schema.js b/organizations/collection/schema.js index 3a9241d880..deec1632c1 100644 --- a/organizations/collection/schema.js +++ b/organizations/collection/schema.js @@ -14,7 +14,7 @@ Organizations.schema = new SimpleSchema({ 'contact.phone': { type: String, // all numbers (0-9) , + , - , space ,/ are allowed and can appear anywhere in the phone numbers - //e.g. 754-3010,(541) 754-3010,1-541-754-3010,1-541-754-3010,191 541 754 3010,(089) / 636-48018 + // e.g. 754-3010,(541) 754-3010,1-541-754-3010,1-541-754-3010,191 541 754 3010,(089) / 636-48018 regEx: /^[0-9-+()/\s.]+$/, optional: true, }, diff --git a/settings/server/methods.js b/settings/server/methods.js index cbc42ae2d5..eda75cb107 100644 --- a/settings/server/methods.js +++ b/settings/server/methods.js @@ -78,8 +78,8 @@ Meteor.methods({ } catch (error) { // otherwise show an error const message = `Update gitHub configuration: ${error}`; - - } + console.log(message); + } }, updateMailConfiguration () { // Try if settings exist @@ -103,7 +103,7 @@ Meteor.methods({ const message = `Update mail configuration: ${error}`; // Show an error message - + console.log(message); } }, }); From 203f30b9950ee62650b62e2ec8e13130cfe4751f Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Mon, 20 Feb 2017 16:55:05 +0300 Subject: [PATCH 2/4] delete hardcoded labels --- backlog/collection/schema.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/backlog/collection/schema.js b/backlog/collection/schema.js index cf180d0e4c..7816ca48c4 100644 --- a/backlog/collection/schema.js +++ b/backlog/collection/schema.js @@ -6,24 +6,17 @@ import ApiBacklogItems from './'; ApiBacklogItems.schema = new SimpleSchema({ title: { type: String, - label: 'Title', max: 100, - autoform: { - placeholder: 'Title', - }, }, details: { type: String, - label: 'Details', max: 1000, autoform: { rows: 5, - placeholder: 'Description', }, }, priority: { type: Number, - label: 'Priority', min: 0, max: 2, autoform: { From 76611fa7ea70c5d00f0df338a91d13be7e0ca642 Mon Sep 17 00:00:00 2001 From: Daria Voytova Date: Mon, 20 Feb 2017 16:55:40 +0300 Subject: [PATCH 3/4] Don't show placeholder as (Select one) --- backlog/client/form/form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backlog/client/form/form.html b/backlog/client/form/form.html index 1bc2cda2d0..e96902331c 100644 --- a/backlog/client/form/form.html +++ b/backlog/client/form/form.html @@ -31,7 +31,7 @@