mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
corrected the documentation about BOOK_SLOT_AT_SAME_TIME
Also: [ongoing] help for managers
This commit is contained in:
parent
68fd322398
commit
59a20d71bd
@ -2,6 +2,7 @@
|
||||
|
||||
- Interface to manage partners
|
||||
- Ability to define, per availability, a custom duration for the reservation slots
|
||||
- Corrected the documentation about BOOK_SLOT_AT_SAME_TIME
|
||||
- Fix a bug: unable to change group if the previous was deactivated
|
||||
- Fix a bug: unable to create events or trainings that are not multiples of SLOT_DURATION
|
||||
- Fix a bug: unable to delete an unreserved event
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
Application.Controllers.controller('HomeController', ['$scope', '$stateParams', 'settingsPromise', 'Member', 'uiTourService', '_t', 'Help',
|
||||
function ($scope, $stateParams, settingsPromise, Member, uiTourService, _t, Help) {
|
||||
Application.Controllers.controller('HomeController', ['$scope', '$stateParams', '$translatePartialLoader', 'AuthService', 'settingsPromise', 'Member', 'uiTourService', '_t', 'Help',
|
||||
function ($scope, $stateParams, $translatePartialLoader, AuthService, settingsPromise, Member, uiTourService, _t, Help) {
|
||||
/* PUBLIC SCOPE */
|
||||
|
||||
// Home page HTML content
|
||||
@ -21,8 +21,10 @@ Application.Controllers.controller('HomeController', ['$scope', '$stateParams',
|
||||
* This is intended as a contextual help (when pressing F1)
|
||||
*/
|
||||
$scope.setupHomeTour = function () {
|
||||
if ($scope.currentUser && $scope.currentUser.role === 'admin') {
|
||||
setupWelcomeTour();
|
||||
if (AuthService.isAuthorized(['admin', 'manager'])) {
|
||||
// this is an ugly hack, but we can't do better for now because angular-ui-tour does not support removing steps
|
||||
// and we can't use promises with _t's translations (needs a very big refactoring)
|
||||
setTimeout(setupWelcomeTour, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
@ -271,14 +273,16 @@ Application.Controllers.controller('HomeController', ['$scope', '$stateParams',
|
||||
placement: 'bottom',
|
||||
orphan: 'true'
|
||||
});
|
||||
uitour.createStep({
|
||||
selector: '.app-generator .app-version',
|
||||
stepId: 'version',
|
||||
order: 19,
|
||||
title: _t('app.public.tour.welcome.version.title'),
|
||||
content: _t('app.public.tour.welcome.version.content'),
|
||||
placement: 'top'
|
||||
});
|
||||
if (AuthService.isAuthorized('admin')) {
|
||||
uitour.createStep({
|
||||
selector: '.app-generator .app-version',
|
||||
stepId: 'version',
|
||||
order: 19,
|
||||
title: _t('app.public.tour.welcome.version.title'),
|
||||
content: _t('app.public.tour.welcome.version.content'),
|
||||
placement: 'top'
|
||||
});
|
||||
}
|
||||
uitour.createStep({
|
||||
selector: 'body',
|
||||
stepId: 'conclusion',
|
||||
|
@ -1,9 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
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);
|
||||
Application.Services.factory('_t', ['$translate', function ($translate) {
|
||||
return function (key, interpolations) {
|
||||
if (interpolations == null) { interpolations = undefined; }
|
||||
return $translate.instant(key, interpolations);
|
||||
};
|
||||
}]);
|
||||
|
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
Application.Services.factory('Help', ['$rootScope', '$uibModal', '$state', function ($rootScope, $uibModal, $state) {
|
||||
Application.Services.factory('Help', ['$rootScope', '$uibModal', '$state', 'AuthService',
|
||||
function ($rootScope, $uibModal, $state, AuthService) {
|
||||
const TOURS = {
|
||||
'app.public.home': 'welcome',
|
||||
'app.public.machines_list': 'machines',
|
||||
@ -19,7 +20,7 @@ Application.Services.factory('Help', ['$rootScope', '$uibModal', '$state', funct
|
||||
|
||||
|
||||
return function (e) {
|
||||
if (!$rootScope.currentUser || $rootScope.currentUser.role !== 'admin') return;
|
||||
if (!AuthService.isAuthorized(['admin', 'manager'])) return;
|
||||
|
||||
if (e.key === 'F1') {
|
||||
e.preventDefault();
|
||||
|
@ -121,7 +121,7 @@ If set to 'false' the phone number won't be required to register a new user on t
|
||||
|
||||
BOOK_SLOT_AT_SAME_TIME
|
||||
|
||||
If set to 'false', users won't be able to book a machine/formation/event slot if they already have a reservation the same day at the same time.
|
||||
If set to 'true', users will be able to book a machine/formation/event slot, even if they already have a reservation the same day at the same time.
|
||||
<a name="USER_CONFIRMATION_NEEDED_TO_SIGN_IN"></a>
|
||||
|
||||
USER_CONFIRMATION_NEEDED_TO_SIGN_IN
|
||||
|
Loading…
x
Reference in New Issue
Block a user