Calculate door lock charges
This commit is contained in:
@@ -2,20 +2,66 @@ const USER_ENTRY_EVENT = 'User Entry';
|
||||
const ENABLE_PASSAGE_MODE = 'Enable Passage Mode by Group 2';
|
||||
const DISABLE_PASSAGE_MODE = 'Disable Passage Mode by Group 2';
|
||||
|
||||
const USER_LOCKED_DOOR = 'locked';
|
||||
const USER_UNLOCKED_DOOR = 'unlocked';
|
||||
|
||||
const VALID_CSV_HEADERS = ['Date', 'Time', 'User No', 'Name', 'Event'];
|
||||
|
||||
|
||||
const doorLockEvents = {
|
||||
USER_LOCKED: 'locked',
|
||||
USER_UNLOCKED: 'unlocked',
|
||||
};
|
||||
const unlockedIncidentLevelsPrices = {
|
||||
UNLOCKED_0: {
|
||||
id: 0,
|
||||
title: 'UNLOCKED_0',
|
||||
price: parseInt(process.env.UNLOCK_0) || 0
|
||||
},
|
||||
UNLOCKED_1: {
|
||||
id: 1,
|
||||
title: 'UNLOCKED_1',
|
||||
price: parseInt(process.env.UNLOCK_1) || 10
|
||||
},
|
||||
UNLOCKED_2: {
|
||||
id: 2,
|
||||
title: 'UNLOCKED_2',
|
||||
price: parseInt(process.env.UNLOCK_2) || 20
|
||||
},
|
||||
UNLOCKED_3: {
|
||||
id: 3,
|
||||
title: 'UNLOCKED_3',
|
||||
price: parseInt(process.env.UNLOCK_3) || 30
|
||||
},
|
||||
UNLOCKED_4: {
|
||||
id: 4,
|
||||
title: 'UNLOCKED_4',
|
||||
price: parseInt(process.env.UNLOCK_4) || 40
|
||||
},
|
||||
UNLOCKED_5: {
|
||||
id: 5,
|
||||
title: 'UNLOCKED_5',
|
||||
price: parseInt(process.env.UNLOCK_5) || 50
|
||||
}
|
||||
};
|
||||
const csvParserErrors = {
|
||||
INVALID_HEADERS: 'Invalid headers',
|
||||
INVALID_ENTRY_EXPECTED_USER: 'Invalid entry type. Expected user entry type',
|
||||
INVALID_ENTRY_EXPECTED_PASSAGE_MODE: 'Invalid entry type. Expected enable/disable passage mode following user entry',
|
||||
UNKNOWN_MEMBER: 'Member is not registered in OfficeRnD system',
|
||||
GENERIC_ERROR: 'There was error while parsing uploaded file(s)',
|
||||
};
|
||||
|
||||
const officeRnDAPIErrors = {
|
||||
FAILED_TO_FETCH_MEMBERS: 'Failed to fetch members',
|
||||
FAILED_TO_FETCH_BOOKINGS: 'Failed to fetch booking reservations'
|
||||
};
|
||||
const integrationServiceErrors = {
|
||||
FAILED_TO_SAVE_BOOKINGS: 'Failed to save booking reservations',
|
||||
FAILED_TO_SAVE_DOOR_LOCK_ENTRIES: 'Failed to save door lock entries',
|
||||
FAILED_TO_SAVE_DATA_GENERIC: 'Failed to save data',
|
||||
};
|
||||
|
||||
const incidentType = {
|
||||
NOT_AN_INCIDENT: 1,
|
||||
UNLOCKED_INCIDENT: 2,
|
||||
UNSCHEDULED_INCIDENT: 3,
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
@@ -23,8 +69,10 @@ module.exports = {
|
||||
USER_ENTRY_EVENT,
|
||||
ENABLE_PASSAGE_MODE,
|
||||
DISABLE_PASSAGE_MODE,
|
||||
USER_LOCKED_DOOR,
|
||||
USER_UNLOCKED_DOOR,
|
||||
csvParserErrors,
|
||||
officeRnDAPIErrors,
|
||||
doorLockEvents,
|
||||
unlockedIncidentLevelsPrices,
|
||||
integrationServiceErrors,
|
||||
incidentType,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user