Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the feature of sending appointment information to the patient by WhatsApp #127

Merged
merged 1 commit into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Extensions/ApplicationDependencies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static IServiceCollection AddServices(this IServiceCollection services)
.AddScoped<IRoleService, RoleService>()
.AddScoped<IOfficeService, OfficeService>()
.AddScoped<IAppointmentService, AppointmentService>()
.AddScoped<IAppointmentInformationSendingService, AppointmentInformationSendingService>()
.AddScoped<IAppointmentCancellationService, AppointmentCancellationService>()
.AddScoped<IEmployeeScheduleService, EmployeeScheduleService>()
.AddScoped<IFavoriteDentistService, FavoriteDentistService>()
Expand Down
4 changes: 0 additions & 4 deletions src/Features/Appointments/AppointmentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
public class AppointmentService : IAppointmentService
{
private readonly IAppointmentRepository _appointmentRepository;
private readonly IAppointmentInformationSendingService _sendingService;
private readonly IDateTimeProvider _dateTimeProvider;

public AppointmentService(IAppointmentRepository appointmentRepository,
IAppointmentInformationSendingService sendingService,
IDateTimeProvider dateTimeProvider)
{
_appointmentRepository = appointmentRepository;
_sendingService = sendingService;
_dateTimeProvider = dateTimeProvider;
}

Expand All @@ -23,7 +20,6 @@ public async Task<Response<DtoBase>> CreateAppointmentAsync(AppointmentInsertDto
var appointment = appointmentInsertDto.MapToAppointment();
_appointmentRepository.Insert(appointment);
await _appointmentRepository.SaveAsync();
await _sendingService.SendAppointmentInformationAsync(appointment.Id, appointmentInsertDto);
return new Response<DtoBase>
{
Data = new DtoBase { Id = appointment.Id },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public AppointmentInformationSendingService(IAppointmentRepository appointmentRe

public async Task SendAppointmentInformationAsync(int appointmentId, AppointmentInsertDto appointmentInsertDto)
{
// La consulta se ejecuta en caso que se realice el agendamiento de forma manual.
// The query is executed in case the scheduling of appointments is done manually by the secretary.
appointmentInsertDto.RangeToPay ??= await _treatmentRepository.GetTreatmentWithRangeToPayAsync(appointmentInsertDto.GeneralTreatmentId);
var businessName = EnvReader.Instance[AppSettings.BusinessName];
var info = await _appointmentRepository.GetAppointmentInformationAsync(appointmentId);
Expand Down