fetch only non-deleted unlocked/unscheduled incidents
This commit is contained in:
@@ -18,7 +18,8 @@ const { getAllFinishedBookings, getFirstPreviousBooking, getFirstNextBooking } =
|
||||
const getSortedIncidentsForMember = (memberId) => {
|
||||
const attributes = ['bookingStart', 'incidentLevel', 'incidentLevelPrice', 'unlockTimestamp'];
|
||||
const filters = {
|
||||
memberId
|
||||
memberId,
|
||||
deleted: false
|
||||
};
|
||||
const order = [['unlockTimestamp', 'DESC']];
|
||||
|
||||
@@ -59,6 +60,7 @@ const insertUnscheduledIncidents = (incidents) => {
|
||||
bookingEnd: end,
|
||||
unlockTimestamp,
|
||||
lockTimestamp,
|
||||
deleted: false
|
||||
},
|
||||
defaults: {...incidentForDB},
|
||||
}));
|
||||
@@ -93,6 +95,7 @@ const insertUnlockedIncidents = (incidents) => {
|
||||
bookingEnd: end,
|
||||
unlockTimestamp,
|
||||
incidentLevel,
|
||||
deleted: false
|
||||
},
|
||||
defaults: {...incidentForDB},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user