Skip to content

Commit

Permalink
linagora#26 use direct imports for lodash lib
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBailly committed Jul 15, 2020
1 parent 262acd4 commit 3365213
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const _ = require('lodash');

(function(angular) {
'use strict';

angular.module('esn.business-hours')
.controller('esnBusinessHoursController', esnBusinessHoursController);

function esnBusinessHoursController(_, ESN_CONFIG_DEFAULT) {
function esnBusinessHoursController(ESN_CONFIG_DEFAULT) {
var self = this;
var DEFAULT_BUSINESS_HOURS = ESN_CONFIG_DEFAULT.core.businessHours;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const _ = require('lodash');

(function(angular) {
'use strict';

Expand Down Expand Up @@ -27,7 +29,7 @@
angular.module('esn.business-hours')
.controller('esnBusinessHoursWorkingDaysController', esnBusinessHoursWorkingDaysController);

function esnBusinessHoursWorkingDaysController(_) {
function esnBusinessHoursWorkingDaysController() {
var self = this;

self.$onInit = $onInit;
Expand Down
4 changes: 3 additions & 1 deletion src/frontend/js/modules/home-page/home-page.service.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const _ = require('lodash');

(function(angular) {
'use strict';

angular.module('esn.home-page')
.factory('homePageService', homePageService);

function homePageService(_, esnI18nService, esnModuleRegistry) {
function homePageService(esnI18nService, esnModuleRegistry) {
return {
getHomePageCandidates: getHomePageCandidates
};
Expand Down
6 changes: 4 additions & 2 deletions src/frontend/js/modules/notification.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const _ = require('lodash');

(function(angular) {
'use strict';

Expand Down Expand Up @@ -72,7 +74,7 @@
};
})

.factory('notificationFactory', function(_, notifyService) {
.factory('notificationFactory', function(notifyService) {
function notify(type, title, text, delay, options) {
var animationDelay = 300;
options = options || {};
Expand Down Expand Up @@ -129,4 +131,4 @@
})(angular);

require('./i18n/i18n.module.js');
require('./escape-html.js');
require('./escape-html.js');

0 comments on commit 3365213

Please sign in to comment.