Changed formating for Reservation and additional charge / fixed bugs

This commit is contained in:
Senad Uka
2019-08-08 16:48:05 +02:00
parent 23110d3c02
commit d2ac43bac4
4 changed files with 21 additions and 13 deletions

View File

@@ -67,7 +67,7 @@ const createFeeFromIncident = (incident) => {
bookingTimeExplanation = `${bookingStartMoment.clone().format('HH:mm a')} - ${bookingEndMoment.clone().format('HH:mm a')}`;
incidentTimeExplanation = ''; // `UNLOCK : ${unlockMoment.clone().format('HH:mm a')}`;
additionalIncidentExplanation = ` ${unlockedIncidentLevelsPrices[incidentLevel].description},`;
incidentTypeExplanation = '[Additional charge]';
incidentTypeExplanation = '';
date = bookingStartMoment.clone().startOf('day').format();
@@ -80,7 +80,7 @@ const createFeeFromIncident = (incident) => {
dateExplanation = bookingStartMoment.clone().startOf('day').format('MMM DD');
bookingTimeExplanation = `${bookingStartMoment.clone().format('HH:mm a')} - ${bookingEndMoment.clone().format('HH:mm a')}`;
incidentTimeExplanation = ` Unlock : ${unlockMoment.clone().format('HH:mm a')},`;
incidentTypeExplanation = '[Additional charge]';
incidentTypeExplanation = '';
date = bookingStartMoment.clone().startOf('day').format();
@@ -93,7 +93,7 @@ const createFeeFromIncident = (incident) => {
dateExplanation = bookingStartMoment.clone().startOf('day').format('MMM DD');
bookingTimeExplanation = `${bookingStartMoment.clone().format('HH:mm a')} - ${bookingEndMoment.clone().format('HH:mm a')}`;
incidentTimeExplanation = ` Lock : ${lockMoment.clone().format('HH:mm a')},`;
incidentTypeExplanation = '[Additional charge]';
incidentTypeExplanation = '';
date = bookingStartMoment.clone().startOf('day').format();
@@ -107,7 +107,7 @@ const createFeeFromIncident = (incident) => {
bookingTimeExplanation = `No reservation`;
incidentTimeExplanation = ''; // `UNLOCK : ${unlockMoment.clone().format('HH:mm a')}`;
additionalIncidentExplanation = ` ${unlockedIncidentLevelsPrices[incidentLevel].description},`;
incidentTypeExplanation = '[Additional charge]';
incidentTypeExplanation = '';
date = unlockMoment.clone().startOf('day').format();
@@ -120,7 +120,7 @@ const createFeeFromIncident = (incident) => {
dateExplanation = unlockMoment.clone().startOf('day').format('MMM DD');
bookingTimeExplanation = `No reservation`;
incidentTimeExplanation = ` Unlock : ${unlockMoment.clone().format('HH:mm a')} Lock : ${lockMoment.clone().format('HH:mm a')},`;
incidentTypeExplanation = '[Additional charge]';
incidentTypeExplanation = '';
date = unlockMoment.clone().startOf('day').format();
@@ -208,7 +208,7 @@ const createFeeFromBooking = (booking, resourceMappings) => {
const formattedStartTime = startMoment.format('HH:mm a');
const formattedEndTime = endMoment.format('HH:mm a');
const formattedName = `[Reservation] ${officeName}, ${resourceName}, ${formattedDate} [${formattedStartTime} - ${formattedEndTime}]`;
const formattedName = `${officeName}, ${resourceName}, ${formattedDate} [${formattedStartTime} - ${formattedEndTime}]`;
return {
name: formattedName,