1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

Merge branch 'dev' for release 2.7.1

This commit is contained in:
Sylvain 2018-11-27 17:28:00 +01:00
commit 635e30900f
63 changed files with 366 additions and 920 deletions

View File

@ -1,5 +1,14 @@
# Changelog Fab Manager
# v2.7.1 2018 November 27
- Updated angular.js to 1.6
- Fix a security issue: dependency jQuery < 3.0.0 has a vulnerability as described in [CVE-2015-9251](https://nvd.nist.gov/vuln/detail/CVE-2015-9251)
- Fix a security issue: dependency moment < 2.11.2 has a vulnerability as described in [CVE-2016-4055](https://nvd.nist.gov/vuln/detail/CVE-2016-4055)
- Fix a security issue: dependency moment < 2.19.3 has a vulnerability as described in [CVE-2017-18214](https://nvd.nist.gov/vuln/detail/CVE-2017-18214)
- Fix a security issue: dependency RubyZip < 1.1.2 has a vulnerability as described in [CVE-2018-1000544](https://nvd.nist.gov/vuln/detail/CVE-2018-1000544)
- Fix a security issue: dependency ffi < 1.9.24 has a vulnerability as described in [CVE-2018-1000201](https://nvd.nist.gov/vuln/detail/CVE-2018-1000201)
# v2.7.0 2018 November 27
- Nom using standard [package.json](package.json) file to save application version number

View File

@ -140,7 +140,8 @@ gem 'apipie-rails'
gem 'has_secure_token'
# XLS files generation
gem 'axlsx', git: 'https://github.com/randym/axlsx', branch: 'release-3.0.0'
gem 'axlsx', git: 'https://github.com/randym/axlsx', branch: 'master'
gem 'axlsx_rails'
gem 'rubyzip', '>= 1.2.2'
gem 'rack-protection', '1.5.5'

View File

@ -1,12 +1,12 @@
GIT
remote: https://github.com/randym/axlsx
revision: 977c09de1515e86536f0c952c08be319fbbab870
branch: release-3.0.0
revision: c593a08b2a929dac7aa8dc418b55e26b4c49dc34
branch: master
specs:
axlsx (3.0.0.pre)
htmlentities (~> 4.3.4)
htmlentities (~> 4.3, >= 4.3.4)
mimemagic (~> 0.3)
nokogiri (>= 1.7.1)
nokogiri (~> 1.8, >= 1.8.2)
rubyzip (~> 1.2, >= 1.2.1)
GEM
@ -175,7 +175,7 @@ GEM
i18n (~> 0.5)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.8)
ffi (1.9.24)
figaro (1.1.0)
thor (~> 0.14)
font-awesome-rails (4.6.3.0)
@ -366,7 +366,7 @@ GEM
rolify (4.0.0)
ruby-progressbar (1.7.5)
ruby-rc4 (0.1.5)
rubyzip (1.2.1)
rubyzip (1.2.2)
rufus-scheduler (3.0.9)
tzinfo
rvm-capistrano (1.5.6)
@ -550,6 +550,7 @@ DEPENDENCIES
recurrence
responders (~> 2.0)
rolify
rubyzip (>= 1.2.2)
rvm-capistrano
sass-rails (= 5.0.1)
sdoc (~> 0.4.0)

View File

@ -54,8 +54,8 @@ Contributions are welcome. Please read [the contribution guidelines](CONTRIBUTIN
<a name="setup-a-production-environment"></a>
## Setup a production environment
To run fab-manager as a production application, this is highly recommended to use [Docker](https://www.docker.com/).
The procedure to follow is described in the [docker readme](docker/README.md).
To run fab-manager as a production application, this is highly recommended to use [Docker-compose](https://docs.docker.com/compose/overview/).
The procedure to follow is described in the [docker-compose readme](docker/README.md).
<a name="setup-a-development-environment"></a>
## Setup a development environment
@ -70,7 +70,7 @@ This procedure is not easy to follow so if you don't need to write some code for
For more details about the process, please read the [official RVM documentation](http://rvm.io/rvm/install).
If you're using ArchLinux, you may have to [read this](doc/archlinux_readme.md) before.
2. Install NVM, withe the node.js version specified in the [.nvmrc file](.nvmrc).
2. Install NVM, with the node.js version specified in the [.nvmrc file](.nvmrc).
For instructions about installing NVM, please refer to [the NVM readme](https://github.com/creationix/nvm#installation).
3. Install Yarn, the front-end package manager.
@ -80,8 +80,7 @@ This procedure is not easy to follow so if you don't need to write some code for
Your system may provide a pre-packaged version of docker in its repositories, but this version may be outdated.
Please refer to [ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/), [debian](https://docs.docker.com/install/linux/docker-ce/debian/) or [MacOS](https://docs.docker.com/docker-for-mac/install/) documentation to setup a recent version of docker.
5. Add your current user to the docker group, to allow using docker without sudo.
This may not be required on some systems, if docker was already installed.
5. Add your current user to the docker group, to allow using docker without `sudo`.
```bash
# add the docker group if it doesn't already exist
sudo groupadd doker

View File

@ -14,7 +14,7 @@ Application.Controllers = angular.module('application.controllers', []);
Application.Filters = angular.module('application.filters', []);
Application.Directives = angular.module('application.directives', []);
angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ngCookies', 'ui.router', 'ui.bootstrap',
angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ui.router', 'ui.bootstrap',
'ngUpload', 'duScroll', 'application.filters', 'application.services', 'application.directives',
'frapontillo.bootstrap-switch', 'application.constants', 'application.controllers', 'application.router',
'ui.select', 'ui.calendar', 'angularMoment', 'Devise', 'DeviseModal', 'angular-growl', 'xeditable',
@ -112,6 +112,8 @@ angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ngCooki
if (currentUser.need_completion && toState.name !== 'app.logged.profileCompletion') {
$state.go('app.logged.profileCompletion');
}
}).catch(() => {
// no one is logged, just ignore
});
});

View File

@ -505,7 +505,7 @@ Application.Controllers.controller('EditEventController', ['$scope', '$state', '
// List of categories for the events
$scope.categories = categoriesPromise;
// List of availables price's categories
// List of available price's categories
$scope.priceCategories = priceCategoriesPromise;
// List of events themes

View File

@ -258,8 +258,8 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
if (user.need_completion) {
return $state.transitionTo('app.logged.profileCompletion');
}
}, function (error) {
console.error(`Authentication failed: ${error}`);
}, function () {
console.info('No users currently logged');
$rootScope.toCheckNotifications = false;
});
@ -289,7 +289,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
// shorthands
$scope.isAuthenticated = Auth.isAuthenticated;
$scope.isAuthorized = AuthService.isAuthorized;
return $rootScope.login = $scope.login;
$rootScope.login = $scope.login;
};
/**
@ -323,6 +323,8 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
$scope.notifications = data.totals;
angular.forEach(data.notifications, function (notification) { growl.info(notification.message.description); });
}).catch(function (error) {
console.error('Error while polling notifications', error);
});
}
};

View File

@ -13,7 +13,7 @@
/**
* Navigation controller. List the links availables in the left navigation pane and their icon.
*/
Application.Controllers.controller('MainNavController', ['$scope', '$location', '$cookies', function ($scope, $location, $cookies) {
Application.Controllers.controller('MainNavController', ['$scope', function ($scope) {
// Common links (public application)
$scope.navLinks = [
{

View File

@ -74,7 +74,7 @@ Application.Controllers.controller('MembersController', ['$scope', 'Member', 'me
*/
Application.Controllers.controller('EditProfileController', ['$scope', '$rootScope', '$state', '$window', 'Member', 'Auth', 'Session', 'activeProviderPromise', 'growl', 'dialogs', 'CSRF', 'memberPromise', 'groups', '_t',
function ($scope, $rootScope, $state, $window, Member, Auth, Session, activeProviderPromise, growl, dialogs, CSRF, memberPromise, groups, _t) {
/* PUBLIC SCOPE */
/* PUBLIC SCOPE */
// API URL where the form will be posted
$scope.actionUrl = `/api/members/${$scope.currentUser.id}`;

View File

@ -85,7 +85,7 @@ Application.Directives.directive('disableAnimation', ['$animate', ($animate) =>
({
restrict: 'A',
link (scope, elem, attrs) {
return attrs.$observe('disableAnimation', value => $animate.enabled(!value, elem));
return attrs.$observe('disableAnimation', value => $animate.enabled(elem, !value));
}
})
]);

View File

@ -13,8 +13,8 @@
*/
'use strict';
Application.Filters.filter('array', [ () =>
function (arrayLength) {
Application.Filters.filter('array', [function () {
return function (arrayLength) {
if (arrayLength) {
arrayLength = Math.ceil(arrayLength);
const arr = new Array(arrayLength);
@ -25,13 +25,12 @@ Application.Filters.filter('array', [ () =>
return arr;
}
}
]);
};
}]);
// filter for projects and trainings
Application.Filters.filter('machineFilter', [ () =>
function (elements, selectedMachine) {
Application.Filters.filter('machineFilter', [function () {
return function (elements, selectedMachine) {
if (!angular.isUndefined(elements) && !angular.isUndefined(selectedMachine) && (elements != null) && (selectedMachine != null)) {
const filteredElements = [];
angular.forEach(elements, function (element) {
@ -43,12 +42,11 @@ Application.Filters.filter('machineFilter', [ () =>
} else {
return elements;
}
}
};
}]);
]);
Application.Filters.filter('projectMemberFilter', [ 'Auth', Auth =>
function (projects, selectedMember) {
Application.Filters.filter('projectMemberFilter', [ 'Auth', function (Auth) {
return function (projects, selectedMember) {
if (!angular.isUndefined(projects) && angular.isDefined(selectedMember) && (projects != null) && (selectedMember != null) && (selectedMember !== '')) {
const filteredProject = [];
// Mes projets
@ -70,12 +68,11 @@ Application.Filters.filter('projectMemberFilter', [ 'Auth', Auth =>
} else {
return projects;
}
}
};
}]);
]);
Application.Filters.filter('themeFilter', [ () =>
function (projects, selectedTheme) {
Application.Filters.filter('themeFilter', [function () {
return function (projects, selectedTheme) {
if (!angular.isUndefined(projects) && !angular.isUndefined(selectedTheme) && (projects != null) && (selectedTheme != null)) {
const filteredProjects = [];
angular.forEach(projects, function (project) {
@ -87,12 +84,11 @@ Application.Filters.filter('themeFilter', [ () =>
} else {
return projects;
}
}
};
}]);
]);
Application.Filters.filter('componentFilter', [ () =>
function (projects, selectedComponent) {
Application.Filters.filter('componentFilter', [function () {
return function (projects, selectedComponent) {
if (!angular.isUndefined(projects) && !angular.isUndefined(selectedComponent) && (projects != null) && (selectedComponent != null)) {
const filteredProjects = [];
angular.forEach(projects, function (project) {
@ -104,12 +100,11 @@ Application.Filters.filter('componentFilter', [ () =>
} else {
return projects;
}
}
};
}]);
]);
Application.Filters.filter('projectsByAuthor', [ () =>
function (projects, authorId) {
Application.Filters.filter('projectsByAuthor', [function () {
return function (projects, authorId) {
if (!angular.isUndefined(projects) && angular.isDefined(authorId) && (projects != null) && (authorId != null) && (authorId !== '')) {
const filteredProject = [];
angular.forEach(projects, function (project) {
@ -121,12 +116,11 @@ Application.Filters.filter('projectsByAuthor', [ () =>
} else {
return projects;
}
}
};
}]);
]);
Application.Filters.filter('projectsCollabored', [ () =>
function (projects, memberId) {
Application.Filters.filter('projectsCollabored', [function () {
return function (projects, memberId) {
if (!angular.isUndefined(projects) && angular.isDefined(memberId) && (projects != null) && (memberId != null) && (memberId !== '')) {
const filteredProject = [];
angular.forEach(projects, function (project) {
@ -138,55 +132,49 @@ Application.Filters.filter('projectsCollabored', [ () =>
} else {
return projects;
}
}
]);
};
}]);
// depend on humanize.js lib in /vendor
Application.Filters.filter('humanize', [ () =>
(element, param) => Humanize.truncate(element, param, null)
]);
Application.Filters.filter('humanize', [function () {
return (element, param) => Humanize.truncate(element, param, null);
}]);
/**
* This filter will convert ASCII carriage-return character to the HTML break-line tag
*/
Application.Filters.filter('breakFilter', [ () =>
function (text) {
Application.Filters.filter('breakFilter', [function () {
return function (text) {
if (text != null) {
return text.replace(/\n+/g, '<br />');
}
}
]);
};
}]);
/**
* This filter will take a HTML text as input and will return it without the html tags
*/
Application.Filters.filter('simpleText', [ () =>
function (text) {
Application.Filters.filter('simpleText', [function () {
return function (text) {
if (text != null) {
text = text.replace(/<br\s*\/?>/g, '\n');
return text.replace(/<\/?\w+[^>]*>/g, '');
} else {
return '';
}
}
};
}]);
]);
Application.Filters.filter('toTrusted', [ '$sce', function ($sce) {
return text => $sce.trustAsHtml(text);
}]);
Application.Filters.filter('toTrusted', [ '$sce', $sce =>
text => $sce.trustAsHtml(text)
Application.Filters.filter('planIntervalFilter', [function () {
return (interval, intervalCount) => moment.duration(intervalCount, interval).humanize();
}]);
]);
Application.Filters.filter('planIntervalFilter', [ () =>
(interval, intervalCount) => moment.duration(intervalCount, interval).humanize()
]);
Application.Filters.filter('humanReadablePlanName', ['$filter', $filter =>
function (plan, groups, short) {
Application.Filters.filter('humanReadablePlanName', ['$filter', function ($filter) {
return function (plan, groups, short) {
if (plan != null) {
let result = plan.base_name;
if (groups != null) {
@ -203,12 +191,11 @@ Application.Filters.filter('humanReadablePlanName', ['$filter', $filter =>
result += ` - ${$filter('planIntervalFilter')(plan.interval, plan.interval_count)}`;
return result;
}
}
};
}]);
]);
Application.Filters.filter('trainingReservationsFilter', [ () =>
function (elements, selectedScope) {
Application.Filters.filter('trainingReservationsFilter', [function () {
return function (elements, selectedScope) {
if (!angular.isUndefined(elements) && !angular.isUndefined(selectedScope) && (elements != null) && (selectedScope != null)) {
const filteredElements = [];
angular.forEach(elements, function (element) {
@ -236,12 +223,11 @@ Application.Filters.filter('trainingReservationsFilter', [ () =>
} else {
return elements;
}
}
};
}]);
]);
Application.Filters.filter('eventsReservationsFilter', [ () =>
function (elements, selectedScope) {
Application.Filters.filter('eventsReservationsFilter', [function () {
return function (elements, selectedScope) {
if (!angular.isUndefined(elements) && !angular.isUndefined(selectedScope) && (elements != null) && (selectedScope != null) && (selectedScope !== '')) {
const filteredElements = [];
angular.forEach(elements, function (element) {
@ -276,12 +262,11 @@ Application.Filters.filter('eventsReservationsFilter', [ () =>
} else {
return elements;
}
}
};
}]);
]);
Application.Filters.filter('groupFilter', [ () =>
function (elements, member) {
Application.Filters.filter('groupFilter', [function () {
return function (elements, member) {
if (!angular.isUndefined(elements) && !angular.isUndefined(member) && (elements != null) && (member != null)) {
const filteredElements = [];
angular.forEach(elements, function (element) {
@ -293,86 +278,78 @@ Application.Filters.filter('groupFilter', [ () =>
} else {
return elements;
}
}
};
}]);
]);
Application.Filters.filter('groupByFilter', [ () =>
_.memoize((elements, field) => _.groupBy(elements, field))
]);
Application.Filters.filter('groupByFilter', [function () {
return _.memoize((elements, field) => _.groupBy(elements, field));
}]);
Application.Filters.filter('capitalize', [() =>
text => `${text.charAt(0).toUpperCase()}${text.slice(1).toLowerCase()}`
]);
Application.Filters.filter('reverse', [ () =>
function (items) {
Application.Filters.filter('reverse', [function () {
return function (items) {
if (!angular.isArray(items)) {
return items;
}
return items.slice().reverse();
}
};
}]);
]);
Application.Filters.filter('toArray', [ () =>
function (obj) {
Application.Filters.filter('toArray', [function () {
return function (obj) {
if (!(obj instanceof Object)) { return obj; }
return _.map(obj, function (val, key) {
if (angular.isObject(val)) {
return Object.defineProperty(val, '$key', { __proto__: null, value: key });
}
});
}
};
}]);
]);
Application.Filters.filter('toIsoDate', [ () =>
function (date) {
Application.Filters.filter('toIsoDate', [function () {
return function (date) {
if (!(date instanceof Date) && !moment.isMoment(date)) { return date; }
return moment(date).format('YYYY-MM-DD');
}
};
}]);
]);
Application.Filters.filter('booleanFormat', [ '_t', _t =>
function (boolean) {
Application.Filters.filter('booleanFormat', [ '_t', function (_t) {
return function (boolean) {
if (boolean || (boolean === 'true')) {
return _t('yes');
} else {
return _t('no');
}
}
};
}]);
]);
Application.Filters.filter('booleanFormat', [ '_t', _t =>
function (boolean) {
Application.Filters.filter('booleanFormat', [ '_t', function (_t) {
return function (boolean) {
if (((typeof boolean === 'boolean') && boolean) || ((typeof boolean === 'string') && (boolean === 'true'))) {
return _t('yes');
} else {
return _t('no');
}
}
};
}]);
]);
Application.Filters.filter('maxCount', [ '_t', _t =>
function (max) {
Application.Filters.filter('maxCount', [ '_t', function (_t) {
return function (max) {
if ((typeof max === 'undefined') || (max === null) || ((typeof max === 'number') && (max === 0))) {
return _t('unlimited');
} else {
return max;
}
}
};
}]);
]);
Application.Filters.filter('filterDisabled', [ () =>
function (list, filter) {
Application.Filters.filter('filterDisabled', [function () {
return function (list, filter) {
if (angular.isArray(list)) {
return list.filter(function (e) {
switch (filter) {
@ -384,6 +361,5 @@ Application.Filters.filter('filterDisabled', [ () =>
} else {
return list;
}
}
]);
};
}]);

View File

@ -1,21 +1,9 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('_t', ['$filter', $filter =>
function (key, interpolation, options) {
Application.Services.factory('_t', ['$filter', function ($filter) {
return function (key, interpolation, options) {
if (interpolation == null) { interpolation = undefined; }
if (options == null) { options = undefined; }
return $filter('translate')(key, interpolation, options);
}
]);
};
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Abuse', ['$resource', $resource =>
$resource('/api/abuses/:id',
Application.Services.factory('Abuse', ['$resource', function ($resource) {
return $resource('/api/abuses/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Admin', ['$resource', $resource =>
$resource('/api/admins/:id',
Application.Services.factory('Admin', ['$resource', function ($resource) {
return $resource('/api/admins/:id',
{ id: '@id' }, {
query: {
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('AgeRange', ['$resource', $resource =>
$resource('/api/age_ranges/:id',
Application.Services.factory('AgeRange', ['$resource', function ($resource) {
return $resource('/api/age_ranges/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,14 +1,3 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('AuthService', ['Session', function (Session) {
@ -25,5 +14,4 @@ Application.Services.factory('AuthService', ['Session', function (Session) {
return this.isAuthenticated() && (authorizedRoles.indexOf(Session.currentUser.role) !== -1);
}
};
}
]);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('AuthProvider', ['$resource', $resource =>
$resource('/api/auth_providers/:id',
Application.Services.factory('AuthProvider', ['$resource', function ($resource) {
return $resource('/api/auth_providers/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -29,6 +19,5 @@ Application.Services.factory('AuthProvider', ['$resource', $resource =>
url: '/api/auth_providers/send_code'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Availability', ['$resource', $resource =>
$resource('/api/availabilities/:id',
Application.Services.factory('Availability', ['$resource', function ($resource) {
return $resource('/api/availabilities/:id',
{ id: '@id' }, {
machine: {
method: 'GET',
@ -44,6 +34,5 @@ Application.Services.factory('Availability', ['$resource', $resource =>
url: '/api/availabilities/:id/lock'
}
}
)
]);
);
}]);

View File

@ -1,14 +1,3 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('CalendarConfig', [() =>

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Category', ['$resource', $resource =>
$resource('/api/categories/:id',
Application.Services.factory('Category', ['$resource', function ($resource) {
return $resource('/api/categories/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Component', ['$resource', $resource =>
$resource('/api/components/:id',
Application.Services.factory('Component', ['$resource', function($resource) {
return $resource('/api/components/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Coupon', ['$resource', $resource =>
$resource('/api/coupons/:id',
Application.Services.factory('Coupon', ['$resource', function ($resource) {
return $resource('/api/coupons/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -25,6 +15,5 @@ Application.Services.factory('Coupon', ['$resource', $resource =>
url: '/api/coupons/send'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Credit', ['$resource', $resource =>
$resource('/api/credits/:id',
Application.Services.factory('Credit', ['$resource', function ($resource) {
return $resource('/api/credits/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,16 @@
/* eslint-disable
no-undef,
no-useless-escape,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
'use strict';
Application.Services.service('CSRF', ['$cookies',
$cookies =>
({
function ($cookies) {
return ({
setMetaTags () {
if (angular.element('meta[name="csrf-param"]').length === 0) {
angular.element('head').append('<meta name="csrf-param" content="authenticity_token">');
angular.element('head').append(`<meta name=\"csrf-token\" content=\"${$cookies['XSRF-TOKEN']}\">`);
angular.element('head').append(`<meta name="csrf-token" content="${$cookies.get('XSRF-TOKEN')}">`);
} else {
angular.element('meta[name="csrf-token"]').replaceWith(`<meta name=\"csrf-token\" content=\"${$cookies['XSRF-TOKEN']}\">`);
angular.element('meta[name="csrf-token"]').replaceWith(`<meta name="csrf-token" content="${$cookies.get('XSRF-TOKEN')}">`);
}
}
})
});
}
]);

View File

@ -1,17 +1,6 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('CustomAsset', ['$resource', $resource =>
$resource('/api/custom_assets/:name',
{ name: '@name' })
]);
Application.Services.factory('CustomAsset', ['$resource', function ($resource) {
return $resource('/api/custom_assets/:name',
{ name: '@name' });
}]);

View File

@ -1,14 +1,3 @@
/* eslint-disable
no-return-assign,
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('dialogs', ['$uibModal', function ($uibModal) {

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Event', ['$resource', $resource =>
$resource('/api/events/:id',
Application.Services.factory('Event', ['$resource', function ($resource) {
return $resource('/api/events/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -23,6 +13,5 @@ Application.Services.factory('Event', ['$resource', $resource =>
isArray: true
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('EventTheme', ['$resource', $resource =>
$resource('/api/event_themes/:id',
Application.Services.factory('EventTheme', ['$resource', function ($resource) {
return $resource('/api/event_themes/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,20 +1,9 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Export', ['$http', $http =>
({
Application.Services.factory('Export', ['$http', function ($http) {
return ({
status (query) {
return $http.post('/api/exports/status', query);
}
})
]);
});
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Group', ['$resource', $resource =>
$resource('/api/groups/:id',
Application.Services.factory('Group', ['$resource', function ($resource) {
return $resource('/api/groups/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,20 +1,9 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('helpers', [() =>
({
Application.Services.factory('helpers', [function () {
return ({
getAmountToPay (price, walletAmount) {
if (walletAmount > price) { return 0; } else { return price - walletAmount; }
}
})
]);
});
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Invoice', ['$resource', $resource =>
$resource('/api/invoices/:id',
Application.Services.factory('Invoice', ['$resource', function ($resource) {
return $resource('/api/invoices/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -22,6 +12,5 @@ Application.Services.factory('Invoice', ['$resource', $resource =>
isArray: true
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Licence', ['$resource', $resource =>
$resource('/api/licences/:id',
Application.Services.factory('Licence', ['$resource', function ($resource) {
return $resource('/api/licences/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Machine', ['$resource', $resource =>
$resource('/api/machines/:id',
Application.Services.factory('Machine', ['$resource', function ($resource) {
return $resource('/api/machines/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Member', ['$resource', $resource =>
$resource('/api/members/:id',
Application.Services.factory('Member', ['$resource', function ($resource) {
return $resource('/api/members/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -42,6 +32,5 @@ Application.Services.factory('Member', ['$resource', $resource =>
url: '/api/members/mapping'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Notification', ['$resource', $resource =>
$resource('/api/notifications/:id',
Application.Services.factory('Notification', ['$resource', function ($resource) {
return $resource('/api/notifications/:id',
{ id: '@id' }, {
query: {
isArray: false
@ -28,6 +18,5 @@ Application.Services.factory('Notification', ['$resource', $resource =>
method: 'GET'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('OpenAPIClient', ['$resource', $resource =>
$resource('/api/open_api_clients/:id',
Application.Services.factory('OpenAPIClient', ['$resource', function ($resource) {
return $resource('/api/open_api_clients/:id',
{ id: '@id' }, {
resetToken: {
method: 'PATCH',
@ -21,6 +11,5 @@ Application.Services.factory('OpenAPIClient', ['$resource', $resource =>
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,23 +1,12 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('OpenlabProject', ['$resource', $resource =>
$resource('/api/openlab_projects/:id',
Application.Services.factory('OpenlabProject', ['$resource', function ($resource) {
return $resource('/api/openlab_projects/:id',
{ id: '@id' }, {
query: {
method: 'GET',
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,14 +1,3 @@
/* eslint-disable
no-return-assign,
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('paginationService', [function () {
@ -58,9 +47,9 @@ Application.Services.factory('paginationService', [function () {
_queryParams[k] = v;
}
return this.resourceService[this.functionName](_queryParams, dataPromise => {
this.resourceService[this.functionName](_queryParams, dataPromise => {
this.callback(dataPromise);
return this.loading = false;
this.loading = false;
});
};
};

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Plan', ['$resource', $resource =>
$resource('/api/plans/:id',
Application.Services.factory('Plan', ['$resource', function ($resource) {
return $resource('/api/plans/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Price', ['$resource', $resource =>
$resource('/api/prices/:id',
Application.Services.factory('Price', ['$resource', function ($resource) {
return $resource('/api/prices/:id',
{}, {
query: {
isArray: true
@ -25,6 +15,5 @@ Application.Services.factory('Price', ['$resource', $resource =>
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('PriceCategory', ['$resource', $resource =>
$resource('/api/price_categories/:id',
Application.Services.factory('PriceCategory', ['$resource', function ($resource) {
return $resource('/api/price_categories/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Pricing', ['$resource', $resource =>
$resource('/api/pricing',
Application.Services.factory('Pricing', ['$resource', function ($resource) {
return $resource('/api/pricing',
{}, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Project', ['$resource', $resource =>
$resource('/api/projects/:id',
Application.Services.factory('Project', ['$resource', function ($resource) {
return $resource('/api/projects/:id',
{ id: '@id' }, {
lastPublished: {
method: 'GET',
@ -29,6 +19,5 @@ Application.Services.factory('Project', ['$resource', $resource =>
isArray: true
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Reservation', ['$resource', $resource =>
$resource('/api/reservations/:id',
Application.Services.factory('Reservation', ['$resource', function ($resource) {
return $resource('/api/reservations/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,25 +1,13 @@
/* eslint-disable
no-return-assign,
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.service('Session', [ function () {
this.create = function (user) {
return this.currentUser = user;
this.currentUser = user;
};
this.destroy = function () {
return this.currentUser = null;
this.currentUser = null;
};
return this;
}
]);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Setting', ['$resource', $resource =>
$resource('/api/settings/:name',
Application.Services.factory('Setting', ['$resource', function ($resource) {
return $resource('/api/settings/:name',
{ name: '@name' }, {
update: {
method: 'PUT'
@ -20,6 +10,5 @@ Application.Services.factory('Setting', ['$resource', $resource =>
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Slot', ['$resource', $resource =>
$resource('/api/slots/:id',
Application.Services.factory('Slot', ['$resource', function ($resource) {
return $resource('/api/slots/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -21,6 +11,5 @@ Application.Services.factory('Slot', ['$resource', $resource =>
url: '/api/slots/:id/cancel'
}
}
)
]);
);
}]);

View File

@ -1,15 +1,6 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
// list the social networks supported in the user's profiles
Application.Services.factory('SocialNetworks', [ () => ['facebook', 'twitter', 'google_plus', 'viadeo', 'linkedin', 'instagram', 'youtube', 'vimeo', 'dailymotion', 'github', 'echosciences', 'website', 'pinterest', 'lastfm', 'flickr']
]);
Application.Services.factory('SocialNetworks', [function () {
return ['facebook', 'twitter', 'google_plus', 'viadeo', 'linkedin', 'instagram', 'youtube', 'vimeo', 'dailymotion', 'github', 'echosciences', 'website', 'pinterest', 'lastfm', 'flickr'];
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Space', ['$resource', $resource =>
$resource('/api/spaces/:id',
Application.Services.factory('Space', ['$resource', function ($resource) {
return $resource('/api/spaces/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,14 +1,5 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Statistics', ['$resource', $resource => $resource('/api/statistics')
]);
Application.Services.factory('Statistics', ['$resource', function ($resource) {
return $resource('/api/statistics');
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Subscription', ['$resource', $resource =>
$resource('/api/subscriptions/:id',
Application.Services.factory('Subscription', ['$resource', function ($resource) {
return $resource('/api/subscriptions/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Tag', ['$resource', $resource =>
$resource('/api/tags/:id',
Application.Services.factory('Tag', ['$resource', function ($resource) {
return $resource('/api/tags/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Theme', ['$resource', $resource =>
$resource('/api/themes/:id',
Application.Services.factory('Theme', ['$resource', function ($resource) {
return $resource('/api/themes/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Training', ['$resource', $resource =>
$resource('/api/trainings/:id',
Application.Services.factory('Training', ['$resource', function ($resource) {
return $resource('/api/trainings/:id',
{ id: '@id' }, {
update: {
method: 'PUT'
@ -21,6 +11,5 @@ Application.Services.factory('Training', ['$resource', $resource =>
url: '/api/trainings/:id/availabilities'
}
}
)
]);
);
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('TrainingsPricing', ['$resource', $resource =>
$resource('/api/trainings_pricings/:id',
Application.Services.factory('TrainingsPricing', ['$resource', function ($resource) {
return $resource('/api/trainings_pricings/:id',
{}, {
update: {
method: 'PUT'
}
}
)
]);
);
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Translations', ['$translatePartialLoader', '$translate', ($translatePartialLoader, $translate) =>
({
Application.Services.factory('Translations', ['$translatePartialLoader', '$translate', function ($translatePartialLoader, $translate) {
return ({
query (stateName) {
if (angular.isArray((stateName))) {
angular.forEach(stateName, state => $translatePartialLoader.addPart(state));
@ -20,6 +10,5 @@ Application.Services.factory('Translations', ['$translatePartialLoader', '$trans
}
return $translate.refresh();
}
})
]);
});
}]);

View File

@ -1,14 +1,5 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Twitter', ['$resource', $resource => $resource('/api/feeds/twitter_timelines')
]);
Application.Services.factory('Twitter', ['$resource', function ($resource) {
return $resource('/api/feeds/twitter_timelines');
}]);

View File

@ -1,22 +1,11 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('User', ['$resource', $resource =>
$resource('/api/users',
Application.Services.factory('User', ['$resource', function ($resource) {
return $resource('/api/users',
{}, {
query: {
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,14 +1,5 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Version', ['$resource', $resource => $resource('/api/version')
]);
Application.Services.factory('Version', ['$resource', function ($resource) {
return $resource('/api/version');
}]);

View File

@ -1,17 +1,7 @@
/* eslint-disable
no-undef,
*/
// TODO: This file was created by bulk-decaffeinate.
// Fix any style issues and re-enable lint.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
'use strict';
Application.Services.factory('Wallet', ['$resource', $resource =>
$resource('/api/wallet',
Application.Services.factory('Wallet', ['$resource', function ($resource) {
return $resource('/api/wallet',
{}, {
getWalletByUser: {
method: 'GET',
@ -29,6 +19,5 @@ Application.Services.factory('Wallet', ['$resource', $resource =>
isArray: false
}
}
)
]);
);
}]);

View File

@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "2.7.0",
"version": "2.7.1",
"description": "FabManager is the FabLab management solution. It is web-based, open-source and totally free.",
"keywords": [
"fablab",
@ -27,24 +27,24 @@
"dependencies": {
"@uirouter/angularjs": "0.4",
"AngularDevise": "https://github.com/cloudspace/angular_devise.git#1.0.2",
"angular": "1.3",
"angular-animate": "1.3",
"angular": "1.6",
"angular-animate": "1.6",
"angular-aside": "1.3",
"angular-base64-upload": "^0.0.9",
"angular-bootstrap-switch": "0.4.0",
"angular-cookies": "1.3",
"angular-cookies": "1.6",
"angular-google-analytics": "1.1",
"angular-growl-v2": "https://github.com/JanStevens/angular-growl-2.git#0.7.9",
"angular-i18n": "1.3.15",
"angular-i18n": "1.6",
"angular-loading-bar": "^0.9.0",
"angular-medium-editor": "https://github.com/thijsw/angular-medium-editor.git#0.1.1",
"angular-minicolors": "https://github.com/kaihenzler/angular-minicolors.git#0.0.5",
"angular-moment": "0.10",
"angular-resource": "1.3",
"angular-sanitize": "1.3",
"angular-moment": "1.3",
"angular-resource": "1.6",
"angular-sanitize": "1.6",
"angular-scroll": "0.6",
"angular-summernote": "0.7.1",
"angular-touch": "1.3",
"angular-touch": "1.6",
"angular-translate": "2.8",
"angular-translate-interpolation-messageformat": "2.8",
"angular-translate-loader-partial": "2.8",
@ -60,19 +60,19 @@
"fullcalendar": "2.3.1",
"holderjs": "2.6",
"jasny-bootstrap": "3.1",
"jquery": "1",
"jquery": "3",
"jquery-minicolors": "^2.1.10",
"jquery-ui": "https://github.com/devongovett/jqueryui-npm.git#1.10.4",
"medium-editor": "4.4.0",
"messageformat": "0.1.8",
"moment": "2.10.6",
"moment": "2.22",
"moment-timezone": "0.5",
"ng-caps-lock": "https://github.com/FabioMR/ng-caps-lock.git#1.0.3",
"ng-fittext": "https://github.com/patrickmarabeas/ng-FitText.js.git#4.1.1",
"ngUpload": "0.5",
"nvd3": "1.8",
"summernote": "0.7.3",
"ui-select": "https://github.com/angular-ui/ui-select.git#0.13.2",
"ui-select": "0.19",
"underscore": "1.7"
}
}

View File

@ -62,10 +62,10 @@ ambi@^2.2.0:
editions "^1.1.1"
typechecker "^4.3.0"
angular-animate@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular-animate/-/angular-animate-1.3.20.tgz#d1707c727f8ad0df21c4a2dec20cd7fc4945b52a"
integrity sha1-0XB8cn+K0N8hxKLewgzX/ElFtSo=
angular-animate@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-animate/-/angular-animate-1.6.10.tgz#c520f6d341370e34e0a62060c99bcf47b7d7db8c"
integrity sha512-RU9ZJbTspq0W0x675H5k1DeSgKbAFfp2aiYoNGdlD+wQNKvwwMR5ho+EkDKkx9zE02a5goe8Z6EhhYPQSff9dA==
angular-aside@1.3:
version "1.3.2"
@ -82,10 +82,10 @@ angular-bootstrap-switch@0.4.0:
resolved "https://registry.yarnpkg.com/angular-bootstrap-switch/-/angular-bootstrap-switch-0.4.0.tgz#8f4d45a0de5ff1227bd6ae2c5348e4c821d9303a"
integrity sha1-j01FoN5f8SJ71q4sU0jkyCHZMDo=
angular-cookies@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular-cookies/-/angular-cookies-1.3.20.tgz#590ed18501815a7898aa734e411d409ef390348b"
integrity sha1-WQ7RhQGBWniYqnNOQR1AnvOQNIs=
angular-cookies@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-cookies/-/angular-cookies-1.6.10.tgz#20a014d501242e2edacd21397c0e5480e08dee00"
integrity sha512-ADfbqXLhwcaecAiWIaxpl8XWFJgWsrDl/ksSEkYm5dSoXHYlj3HKlAhPbjBv/foYS7pdI0apmSGHWrBPqdjF/g==
angular-google-analytics@1.1:
version "1.1.8"
@ -96,10 +96,10 @@ angular-google-analytics@1.1:
version "0.7.9"
resolved "https://github.com/JanStevens/angular-growl-2.git#2a3a40e01419af879f80f582baaeceef3408e295"
angular-i18n@1.3.15:
version "1.3.15"
resolved "https://registry.yarnpkg.com/angular-i18n/-/angular-i18n-1.3.15.tgz#8c497a7926b08a2fdf39f3ed61a65b4172f45332"
integrity sha1-jEl6eSawii/fOfPtYaZbQXL0UzI=
angular-i18n@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-i18n/-/angular-i18n-1.6.10.tgz#16d9d6e6f9501a2cb80bce30c5cd1c76ddb5a545"
integrity sha512-/57YZVxgyGmdCDttNe9fuAepI/c3lA9KgER9IY4U75f6K8eM8Y7GVhqBy3x2QQ9uTiubfvlcmoOJKCC621pPFw==
angular-loading-bar@^0.9.0:
version "0.9.0"
@ -114,22 +114,22 @@ angular-loading-bar@^0.9.0:
version "0.0.0"
resolved "https://github.com/kaihenzler/angular-minicolors.git#0bf9edcb45eea49210e2f6355e24f162362eeb5a"
angular-moment@0.10:
version "0.10.3"
resolved "https://registry.yarnpkg.com/angular-moment/-/angular-moment-0.10.3.tgz#63775c8e12f68fb353b8c80bc79db45689f8bf9d"
integrity sha1-Y3dcjhL2j7NTuMgLx520Von4v50=
angular-moment@1.3:
version "1.3.0"
resolved "https://registry.yarnpkg.com/angular-moment/-/angular-moment-1.3.0.tgz#f501f66b6fcc832d8d36f8905cc7a93123ab2af0"
integrity sha512-KG8rvO9MoaBLwtGnxTeUveSyNtrL+RNgGl1zqWN36+HDCCVGk2DGWOzqKWB6o+eTTbO3Opn4hupWKIElc8XETA==
dependencies:
moment ">=2.8.0 <2.11.0"
moment ">=2.8.0 <3.0.0"
angular-resource@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular-resource/-/angular-resource-1.3.20.tgz#5415731074439efff5abad0dd9d4c51b63d951b8"
integrity sha1-VBVzEHRDnv/1q60N2dTFG2PZUbg=
angular-resource@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-resource/-/angular-resource-1.6.10.tgz#28c1834e9fa623467d2f9894716a4e6c7e077459"
integrity sha512-jrYXUGPtpv/lTBlYZ6HZefIV6Lb+6e1HUavBPg9TSzW7s4zYRBWzMj6vMg8gZzVjWdH/nYBWfilV0qfnmZSI+A==
angular-sanitize@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular-sanitize/-/angular-sanitize-1.3.20.tgz#5b1caa4176b8db2039d7d1c1527537a61be3cd67"
integrity sha1-WxyqQXa42yA519HBUnU3phvjzWc=
angular-sanitize@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-sanitize/-/angular-sanitize-1.6.10.tgz#635a362afb2dd040179f17d3a5455962b2c1918f"
integrity sha512-01i1Xoq9ykUrsoYQMSB6dWZmPp9Df5hfCqMAGGzJBWZ7L2WY0OtUphdI0YvR8ZF9lAsWtGNtsEFilObjq5nTgQ==
angular-scroll@0.6:
version "0.6.5"
@ -141,10 +141,10 @@ angular-summernote@0.7.1:
resolved "https://registry.yarnpkg.com/angular-summernote/-/angular-summernote-0.7.1.tgz#c4bfa83020c4e32f96955b9974c43e5eaeea342e"
integrity sha1-xL+oMCDE4y+WlVuZdMQ+Xq7qNC4=
angular-touch@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular-touch/-/angular-touch-1.3.20.tgz#3363d28fe9091fab2669d524a0b9a9d247d814a4"
integrity sha1-M2PSj+kJH6smadUkoLmp0kfYFKQ=
angular-touch@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular-touch/-/angular-touch-1.6.10.tgz#bd51fa48bd2c2c477fea776817535601e6340c2f"
integrity sha512-ZblW46aN5s7OOihpXDa0qzrJXdaVGE44jc+a8e1NpOjhCKZDQze+nBHh3xw3toAF1BIfDJIkRstadk4h2R/uLg==
angular-translate-interpolation-messageformat@2.8:
version "2.8.1"
@ -190,10 +190,10 @@ angular-xeditable@0.1:
jquery "^1.11.1"
moment "^2.5.0"
angular@1.3:
version "1.3.20"
resolved "https://registry.yarnpkg.com/angular/-/angular-1.3.20.tgz#b23a3d7c5e7f99f7d95b9b4d49b9ac355269baee"
integrity sha1-sjo9fF5/mffZW5tNSbmsNVJpuu4=
angular@1.6:
version "1.6.10"
resolved "https://registry.yarnpkg.com/angular/-/angular-1.6.10.tgz#eed3080a34d29d0f681ff119b18ce294e3f74826"
integrity sha512-PCZ5/hVdvPQiYyH0VwsPjrErPHRcITnaXxhksceOXgtJeesKHLA7KDu4X/yvcAi+1zdGgGF+9pDxkJvghXI9Wg==
angular@^1.0.8, angular@~1.x:
version "1.7.5"
@ -880,16 +880,16 @@ jquery-minicolors@^2.1.10:
version "1.10.4"
resolved "https://github.com/devongovett/jqueryui-npm.git#51bc3549dd6530a18f43be45c3e8ae520805b9e4"
jquery@1, jquery@^1.11.1:
version "1.12.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-1.12.4.tgz#01e1dfba290fe73deba77ceeacb0f9ba2fec9e0c"
integrity sha1-AeHfuikP5z3rp3zurLD5ui/sngw=
"jquery@>= 1.7.x", jquery@>=1.7.1, jquery@>=1.9.0:
jquery@3, "jquery@>= 1.7.x", jquery@>=1.7.1, jquery@>=1.9.0:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==
jquery@^1.11.1:
version "1.12.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-1.12.4.tgz#01e1dfba290fe73deba77ceeacb0f9ba2fec9e0c"
integrity sha1-AeHfuikP5z3rp3zurLD5ui/sngw=
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@ -1010,12 +1010,7 @@ moment-timezone@0.5:
dependencies:
moment ">= 2.9.0"
moment@2.10.6, "moment@>=2.8.0 <2.11.0":
version "2.10.6"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.10.6.tgz#6cb21967c79cba7b0ca5e66644f173662b3efa77"
integrity sha1-bLIZZ8ecunsMpeZmRPFzZis++nc=
"moment@>= 2.9.0", moment@>=2.5.0, moment@^2.5.0:
moment@2.22, "moment@>= 2.9.0", moment@>=2.5.0, "moment@>=2.8.0 <3.0.0", moment@^2.5.0:
version "2.22.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=
@ -1483,9 +1478,10 @@ typechecker@~2.0.1:
resolved "https://registry.yarnpkg.com/typechecker/-/typechecker-2.0.8.tgz#e83da84bb64c584ccb345838576c40b0337db82e"
integrity sha1-6D2oS7ZMWEzLNFg4V2xAsDN9uC4=
"ui-select@https://github.com/angular-ui/ui-select.git#0.13.2":
version "0.13.2"
resolved "https://github.com/angular-ui/ui-select.git#a7dc9d0226130d288fbc97ad93930da38225234a"
ui-select@0.19:
version "0.19.8"
resolved "https://registry.yarnpkg.com/ui-select/-/ui-select-0.19.8.tgz#74860848a7fd8bc494d9856d2f62776ea98637c1"
integrity sha1-dIYISKf9i8SU2YVtL2J3bqmGN8E=
underscore@1.7:
version "1.7.0"