mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
Fix a bug: unable to show tours in machines and spaces page
This commit is contained in:
parent
ef5d603065
commit
f9bd27ea13
@ -3,6 +3,7 @@
|
||||
## next deploy
|
||||
|
||||
- Fix a bug: admins are shown in select member for reservation by admin
|
||||
- Fix a bug: unable to show tours in machines and spaces page
|
||||
|
||||
## v5.4.2 2022 June 1
|
||||
|
||||
|
@ -213,14 +213,14 @@ Application.Controllers.controller('MachinesController', ['$scope', '$state', '_
|
||||
});
|
||||
// on tour end, save the status in database
|
||||
uitour.on('ended', function () {
|
||||
if (uitour.getStatus() === uitour.Status.ON && $scope.currentUser.profile.tours.indexOf('machines') < 0) {
|
||||
if (uitour.getStatus() === uitour.Status.ON && $scope.currentUser.profile_attributes.tours.indexOf('machines') < 0) {
|
||||
Member.completeTour({ id: $scope.currentUser.id }, { tour: 'machines' }, function (res) {
|
||||
$scope.currentUser.profile.tours = res.tours;
|
||||
$scope.currentUser.profile_attributes.tours = res.tours;
|
||||
});
|
||||
}
|
||||
});
|
||||
// if the user has never seen the tour, show him now
|
||||
if (settingsPromise.feature_tour_display !== 'manual' && $scope.currentUser.profile.tours.indexOf('machines') < 0) {
|
||||
if (settingsPromise.feature_tour_display !== 'manual' && $scope.currentUser.profile_attributes.tours.indexOf('machines') < 0) {
|
||||
uitour.start();
|
||||
}
|
||||
}
|
||||
|
@ -186,14 +186,14 @@ Application.Controllers.controller('SpacesController', ['$scope', '$state', 'spa
|
||||
});
|
||||
// on tour end, save the status in database
|
||||
uitour.on('ended', function () {
|
||||
if (uitour.getStatus() === uitour.Status.ON && $scope.currentUser.profile.tours.indexOf('spaces') < 0) {
|
||||
if (uitour.getStatus() === uitour.Status.ON && $scope.currentUser.profile_attributes.tours.indexOf('spaces') < 0) {
|
||||
Member.completeTour({ id: $scope.currentUser.id }, { tour: 'spaces' }, function (res) {
|
||||
$scope.currentUser.profile.tours = res.tours;
|
||||
$scope.currentUser.profile_attributes.tours = res.tours;
|
||||
});
|
||||
}
|
||||
});
|
||||
// if the user has never seen the tour, show him now
|
||||
if (settingsPromise.feature_tour_display !== 'manual' && $scope.currentUser.profile.tours.indexOf('spaces') < 0) {
|
||||
if (settingsPromise.feature_tour_display !== 'manual' && $scope.currentUser.profile_attributes.tours.indexOf('spaces') < 0) {
|
||||
uitour.start();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user