beeoclock / client-panel-app

https://panel.beeoclock.com
2 stars 0 forks source link

Додати нову конфігурацію NotificationSettings до налаштувань бізнесу на Панелі. #440

Open dokerwin opened 4 months ago

dokerwin commented 4 months ago

Для того щоб керувати нагадуваннями для клєінта було додано до BusinesProfile - новий об'єкт NotificationSettings

export interface IReminderSettings {
  // Whether or not reminders should be sent for this appointment. If false, no reminders will be sent, regardless of the reminder settings.
  sendReminder: boolean;
  // List of reminder settings to be used for this appointment. Reminders will be sent according to these settings.
  reminders: IReminder[];
  // Contact to escalate to if the reminder is not acknowledged which could be the email or phone number of a manager, supervisor, or another responsible party.
  escalationContact?: string;
}

export interface IReminder {
  // Time before the appointment when the reminder should be sent
  reminderTimeInMinutes: TimeInMinutesEnum;
  // Type of action required from the client
  actionType: ReminderActionType;
  // Priority of the reminder   
  // High Priority: These are often treated with immediate attention. Notifications might be sent through more intrusive methods such as SMS or phone calls, and might repeat more frequently until acknowledged.
  // Medium Priority: These might be sent through standard methods like email or app notifications, with moderate frequency of repetition.
  // Low Priority: Generally sent less urgently, with minimal or no repetition, possibly through less direct communication channels like a weekly digest email. 
  priority: ReminderPriority;
}

export interface INotificationSettings {
  reminderSettings: IReminderSettings;
}

Також по замовчуванні при створенні бізнесу буде додано два remimders за 1 годину до події і за один день до події а також sendReminder буде завжди в тру.

На деві вже по замовчуванні всі мають цю конфігурацію. Для продукції написана окрема джоба.