Fixed misnaming of sendBillingUserSynchronizationFailed renamed to  sendBillingSynchronizationFailed
MODIFY
docker/initdb/002_createSuperAdmin.js
docker/initdb/002_createSuperAdmin.js
@@ -36,7 +36,7 @@ db.getCollection('default.users').insert({
sendCarSynchronizationFailed: true,
sendUserAccountInactivity: true,
sendPreparingSessionNotStarted: false,
- sendBillingUserSynchronizationFailed: false,
+ sendBillingSynchronizationFailed: false,
sendNewRegisteredUser: false,
sendUnknownUserBadged: false,
sendChargingStationStatusError: false,

MODIFY
docker/initdb/003_createSlfAdmin.js
docker/initdb/003_createSlfAdmin.js
@@ -36,7 +36,7 @@ db.getCollection('5c866e81a2d9593de43efdb4.users').insert({
sendCarSynchronizationFailed: true,
sendUserAccountInactivity: true,
sendPreparingSessionNotStarted: false,
- sendBillingUserSynchronizationFailed: false,
+ sendBillingSynchronizationFailed: false,
sendNewRegisteredUser: false,
sendUnknownUserBadged: false,
sendChargingStationStatusError: false,

MODIFY
src/notification/NotificationHandler.ts
src/notification/NotificationHandler.ts
@@ -696,7 +696,7 @@ export default class NotificationHandler {
}
}
- static async sendBillingUserSynchronizationFailed(tenantID: string, sourceData: BillingUserSynchronizationFailedNotification): Promise<void> {
+ static async sendBillingSynchronizationFailed(tenantID: string, sourceData: BillingUserSynchronizationFailedNotification): Promise<void> {
if (tenantID !== Constants.DEFAULT_TENANT) {
// Get the Tenant
const tenant = await TenantStorage.getTenant(tenantID);
@@ -720,7 +720,7 @@ export default class NotificationHandler {
for (const adminUser of adminUsers) {
// Enabled?
if (adminUser.notificationsActive && adminUser.notifications.sendBillingSynchronizationFailed) {
- await notificationSource.notificationTask.sendBillingUserSynchronizationFailed(
+ await notificationSource.notificationTask.sendBillingSynchronizationFailed(
sourceData, adminUser, tenant, NotificationSeverity.ERROR);
}
}

MODIFY
src/notification/NotificationTask.ts
src/notification/NotificationTask.ts
@@ -21,7 +21,7 @@ export default interface NotificationTask {
sendUserAccountInactivity(data: UserAccountInactivityNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
sendPreparingSessionNotStarted(data: PreparingSessionNotStartedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
sendOfflineChargingStations(data: OfflineChargingStationNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
- sendBillingUserSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
+ sendBillingSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
sendBillingInvoiceSynchronizationFailed(data: BillingInvoiceSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
sendCarCatalogSynchronizationFailed(data: CarCatalogSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;
sendSessionNotStarted(data: SessionNotStartedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void>;

MODIFY
src/notification/email/EMailNotificationTask.ts
src/notification/email/EMailNotificationTask.ts
@@ -117,7 +117,7 @@ export default class EMailNotificationTask implements NotificationTask {
return this.prepareAndSendEmail('offline-charging-station', data, user, tenant, severity);
}
- public async sendBillingUserSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void> {
+ public async sendBillingSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void> {
return this.prepareAndSendEmail('billing-user-synchronization-failed', data, user, tenant, severity);
}

MODIFY
src/notification/remote-push-notification/RemotePushNotificationTask.ts
src/notification/remote-push-notification/RemotePushNotificationTask.ts
@@ -295,7 +295,7 @@ export default class RemotePushNotificationTask implements NotificationTask {
return this.sendRemotePushNotificationToUser(tenant, UserNotificationType.OCPI_PATCH_STATUS_ERROR, title, body, user, null, severity);
}
- public async sendBillingUserSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void> {
+ public async sendBillingSynchronizationFailed(data: BillingUserSynchronizationFailedNotification, user: User, tenant: Tenant, severity: NotificationSeverity): Promise<void> {
// Set the locale
const i18nManager = new I18nManager(user.locale);
// Get Message Text

MODIFY
src/scheduler/tasks/SynchronizeBillingUsersTask.ts
src/scheduler/tasks/SynchronizeBillingUsersTask.ts
@@ -19,7 +19,7 @@ export default class SynchronizeBillingUsersTask extends SchedulerTask {
if (billingImpl) {
const synchronizeAction = await billingImpl.synchronizeUsers(tenant.id);
if (synchronizeAction.inError > 0) {
- await NotificationHandler.sendBillingUserSynchronizationFailed(
+ await NotificationHandler.sendBillingSynchronizationFailed(
tenant.id,
{
nbrUsersInError: synchronizeAction.inError,

MODIFY
src/storage/mongodb/UserStorage.ts
src/storage/mongodb/UserStorage.ts
@@ -253,7 +253,7 @@ export default class UserStorage {
sendUserAccountInactivity: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendUserAccountInactivity) : false,
sendPreparingSessionNotStarted: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendPreparingSessionNotStarted) : false,
sendOfflineChargingStations: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendOfflineChargingStations) : false,
- sendBillingUserSynchronizationFailed: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendBillingSynchronizationFailed) : false,
+ sendBillingSynchronizationFailed: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendBillingSynchronizationFailed) : false,
sendSessionNotStarted: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendSessionNotStarted) : false,
sendCarCatalogSynchronizationFailed: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendCarCatalogSynchronizationFailed) : false,
sendEndUserErrorNotification: userToSave.notifications ? Utils.convertToBoolean(userToSave.notifications.sendEndUserErrorNotification) : false,

MODIFY
src/types/UserNotifications.ts
src/types/UserNotifications.ts
@@ -36,7 +36,7 @@ export type UserNotificationKeys =
'sendUserAccountInactivity' |
'sendPreparingSessionNotStarted' |
'sendOfflineChargingStations' |
- 'sendBillingUserSynchronizationFailed' |
+ 'sendBillingSynchronizationFailed' |
'sendSessionNotStarted' |
'sendCarCatalogSynchronizationFailed' |
'sendEndUserErrorNotification'

Fixed misnaming of sendBillingUserSynchronizationFailed renamed to  sendBillingSynchronizationFailed