mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(quality) log errors to the JS console
This commit is contained in:
parent
cdc7dc963d
commit
c24673fefa
@ -50,7 +50,7 @@ const ReservationsSummary: React.FC<ReservationsSummaryProps> = ({ slot, custome
|
||||
}, [slot]);
|
||||
|
||||
useEffect(() => {
|
||||
if (customer) {
|
||||
if (customer && cart) {
|
||||
CartAPI.setCustomer(cart, customer.id).then(setCart).catch(onError);
|
||||
}
|
||||
}, [customer]);
|
||||
|
@ -121,6 +121,7 @@ Application.Controllers.controller('NewAuthenticationController', ['$scope', '$s
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -147,6 +148,7 @@ Application.Controllers.controller('EditAuthenticationController', ['$scope', '$
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -454,6 +454,7 @@ Application.Controllers.controller('NewEventController', ['$scope', '$state', 'C
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -483,6 +484,7 @@ Application.Controllers.controller('EditEventController', ['$scope', '$state', '
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -125,6 +125,7 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@ Application.Controllers.controller('AdminMachinesController', ['$scope', 'CSRF',
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -869,6 +869,7 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -1055,6 +1056,7 @@ Application.Controllers.controller('NewMemberController', ['$scope', '$state', '
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,7 @@ Application.Controllers.controller('AdminShowOrdersController', ['$rootScope', '
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -30,6 +30,7 @@ Application.Controllers.controller('NewPlanController', ['$scope', '$uibModal',
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -56,6 +57,7 @@ Application.Controllers.controller('EditPlanController', ['$scope', 'groups', 'p
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -87,6 +89,7 @@ Application.Controllers.controller('PlanCategoriesController', ['$scope', 'growl
|
||||
};
|
||||
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
}
|
||||
|
@ -652,6 +652,7 @@ Application.Controllers.controller('EditPricingController', ['$scope', '$state',
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -276,6 +276,7 @@ Application.Controllers.controller('AdminProjectsController', ['$scope', '$state
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -325,6 +325,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope'
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -471,6 +472,7 @@ Application.Controllers.controller('SettingsController', ['$scope', '$rootScope'
|
||||
};
|
||||
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -40,6 +40,7 @@ Application.Controllers.controller('AdminStoreController', ['$scope', 'CSRF', 'g
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,7 @@ Application.Controllers.controller('AdminStoreProductController', ['$scope', 'CS
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -96,6 +96,7 @@ Application.Controllers.controller('NewTrainingController', ['$scope', '$state',
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -137,6 +138,7 @@ Application.Controllers.controller('EditTrainingController', ['$scope', '$state'
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -39,6 +39,7 @@ Application.Controllers.controller('CartController', ['$scope', 'CSRF', 'growl',
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -47,6 +47,7 @@ Application.Controllers.controller('DashboardController', ['$scope', 'memberProm
|
||||
* Callback used in PaymentScheduleDashboard, in case of error
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -114,6 +114,7 @@ Application.Controllers.controller('MachinesController', ['$scope', '$state', '_
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
}
|
||||
|
||||
@ -238,6 +239,7 @@ Application.Controllers.controller('NewMachineController', ['$scope', '$state',
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
}
|
||||
|
||||
@ -270,6 +272,7 @@ Application.Controllers.controller('EditMachineController', ['$scope', '$state',
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -344,6 +347,7 @@ Application.Controllers.controller('ShowMachineController', ['$scope', '$state',
|
||||
* Shows an error message forwarded from a child component
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
}
|
||||
|
||||
@ -643,6 +647,7 @@ Application.Controllers.controller('ReserveMachineController', ['$scope', '$tran
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -289,6 +289,7 @@ Application.Controllers.controller('EditProfileController', ['$scope', '$rootSco
|
||||
* @param message {string}
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -15,6 +15,7 @@ Application.Controllers.controller('ShowOrdersController', ['$rootScope', '$scop
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -99,6 +99,7 @@ Application.Controllers.controller('PlansIndexController', ['$scope', '$rootScop
|
||||
* @param message {string}
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -28,6 +28,7 @@ Application.Controllers.controller('ShowProductController', ['$scope', 'CSRF', '
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -216,6 +216,7 @@ Application.Controllers.controller('CompleteProfileController', ['$scope', '$roo
|
||||
* @param message {string}
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -228,6 +228,7 @@ Application.Controllers.controller('NewSpaceController', ['$scope', '$state', 'C
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
@ -256,6 +257,7 @@ Application.Controllers.controller('EditSpaceController', ['$scope', '$state', '
|
||||
* Callback triggered by react components
|
||||
*/
|
||||
$scope.onError = function (message) {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -11,6 +11,7 @@ Application.Controllers.controller('StoreController', ['$scope', 'CSRF', 'growl'
|
||||
* Callback triggered in case of error
|
||||
*/
|
||||
$scope.onError = (message) => {
|
||||
console.error(message);
|
||||
growl.error(message);
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,8 @@ class Availabilities::AvailabilitiesService
|
||||
|
||||
# list all slots for the given machines, with visibility relative to the given user
|
||||
def machines(machines, user, window)
|
||||
ma_availabilities = Availability.includes('machines_availabilities')
|
||||
ma_availabilities = Availability.includes(:machines_availabilities, :availability_tags, :machines, :slots_reservations,
|
||||
slots: [:slots_reservations])
|
||||
.where('machines_availabilities.machine_id': machines.map(&:id))
|
||||
availabilities = availabilities(ma_availabilities, 'machines', user, window[:start], window[:end])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user