1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

typo and syntax

This commit is contained in:
Sylvain 2020-02-11 10:48:29 +01:00
parent 7c86adde4b
commit 54bcc392f3
4 changed files with 13 additions and 14 deletions

View File

@ -1,6 +1,6 @@
# Changelog Fab Manager
- Ability to configure allowing or preventing member book a machine/formation/event slot if he already have a reservation the same day at the same time
- Ability to configure the policy (allow or prevent) for members booking a machine/formation/event slot, if they already have a reservation the same day at the same time
- Ability to create and delete periodic calendar availabilities (recurrence)
- Ability to fully customize the home page
- Automated setup assistant
@ -142,7 +142,7 @@
## v4.0.4 2019 August 14
- Fix a bug: #140 VAT rate is erroneous in invoices.
Note: this bug was introduced in v4.0.3 and requires (if you are on v4.0.3) to regenerate the invoices since August 1st (if
Note: this bug was introduced in v4.0.3 and requires (if you are on v4.0.3) to regenerate the invoices since August 1st
- [TODO DEPLOY] `rake fablab:maintenance:regenerate_invoices[2019,8]`
## v4.0.3 2019 August 01

View File

@ -820,8 +820,7 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
};
/**
* find user reservations the same date at the same time with event
*
* Find user's reservations, the same date at the same time, with event
*/
var findReservationsAtSameTime = function () {
let sameTimeReservations = [
@ -829,18 +828,18 @@ Application.Controllers.controller('ShowEventController', ['$scope', '$state', '
'machine_reservations',
'space_reservations',
'events_reservations'
].map(k => {
return _.filter($scope.ctrl.member[k], r => {
].map(function(k) {
return _.filter($scope.ctrl.member[k], function(r) {
if (r.reservable_type === 'Event' && r.reservable.id === $scope.event.id) {
return false;
};
}
return moment($scope.event.start_time).isSame(r.start_at) ||
(moment($scope.event.end_time).isAfter(r.start_at) && moment($scope.event.end_time).isBefore(r.end_at)) ||
(moment($scope.event.start_time).isAfter(r.start_at) && moment($scope.event.start_time).isBefore(r.end_at)) ||
(moment($scope.event.start_time).isBefore(r.start_at) && moment($scope.event.end_time).isAfter(r.end_at));
});
});
return _.union(...sameTimeReservations);
return _.union.apply(null, sameTimeReservations);
};
/**

View File

@ -77,15 +77,15 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
'machine_reservations',
'space_reservations',
'events_reservations'
].map(k => {
return _.filter($scope.user[k], r => {
].map(function (k) {
return _.filter($scope.user[k], function(r) {
return slot.start.isSame(r.start_at) ||
(slot.end.isAfter(r.start_at) && slot.end.isBefore(r.end_at)) ||
(slot.start.isAfter(r.start_at) && slot.start.isBefore(r.end_at)) ||
(slot.start.isBefore(r.start_at) && slot.end.isAfter(r.end_at));
});
})
});
sameTimeReservations = _.union(...sameTimeReservations);
sameTimeReservations = _.union.apply(null, sameTimeReservations);
if (sameTimeReservations.length > 0) {
const modalInstance = $uibModal.open({
animation: true,
@ -93,7 +93,7 @@ Application.Directives.directive('cart', [ '$rootScope', '$uibModal', 'dialogs',
size: 'md',
controller: 'ReserveSlotSameTimeController',
resolve: {
sameTimeReservations: function() { return sameTimeReservations; },
sameTimeReservations: function() { return sameTimeReservations; }
}
});
modalInstance.result.then(function(res) {

View File

@ -111,7 +111,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' user won't book a machine/formation/event slot if he already have a reservation the same day at the 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.
<a name="USER_CONFIRMATION_NEEDED_TO_SIGN_IN"></a>
USER_CONFIRMATION_NEEDED_TO_SIGN_IN