Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
6bb61d6
renew tabkes
LeahPrag Apr 28, 2025
e8ca1b3
check
LeahPrag Apr 28, 2025
afada5d
check
LeahPrag Apr 28, 2025
5a73829
correct
LeahPrag Apr 28, 2025
0f6c42f
add tables
LeahPrag Apr 28, 2025
1420abb
adding files
LeahPrag Apr 28, 2025
1ad3555
startBL
LeahPrag Apr 28, 2025
a42fd22
doctor
LeahPrag Apr 28, 2025
1f97e2c
check1
LeahPrag Apr 28, 2025
a48b165
malky
LeahPrag Apr 29, 2025
0a1ac83
with update Client classes and interface
MalkyDoutsch Apr 29, 2025
e0c3287
shiffi
Apr 29, 2025
6ca75e7
add doctor query
LeahPrag Apr 29, 2025
71f6067
check
HANAmelloul8394 Apr 29, 2025
c916d93
add Clients query
LeahPrag Apr 29, 2025
e6597db
Save local changes before merging
LeahPrag Apr 29, 2025
55e8159
Save local changes before merging
LeahPrag Apr 29, 2025
119b4ab
DROP COLUMN is_available
HANAmelloul8394 Apr 29, 2025
1e05ff3
"help"
Apr 29, 2025
b3c9094
leah
LeahPrag Apr 29, 2025
23d7b9c
Merge branch 'main' of https://github.com/LeahPrag/ClinicProject
Apr 29, 2025
b0baa5f
leah
LeahPrag Apr 29, 2025
fc968dc
leah
LeahPrag Apr 29, 2025
b234dda
DROP COLUMN is_available
LeahPrag Apr 29, 2025
5d2ba4c
add doctors
LeahPrag Apr 29, 2025
3f33d42
add clinic queues
LeahPrag Apr 29, 2025
da4c9c2
add day data
LeahPrag Apr 30, 2025
2df1cae
add client inteface
HANAmelloul8394 Apr 30, 2025
306be9b
change doctor
LeahPrag May 5, 2025
c75683c
for shiffi!!
LeahPrag May 6, 2025
f5d97b0
ClientDal changes
MalkyDoutsch May 6, 2025
09b2118
doctor controller
LeahPrag May 6, 2025
191f349
doctor controller
LeahPrag May 6, 2025
e3fe40e
add wxceptions and controllers
MalkyDoutsch May 12, 2025
1fc29c0
add exceptions and controllers
MalkyDoutsch May 12, 2025
a210c02
controler work
LeahPrag May 13, 2025
f331de8
correct controller
LeahPrag May 13, 2025
870e7b5
async
LeahPrag May 13, 2025
7910de3
Your commit message here
LeahPrag May 13, 2025
8e77ada
available qeue manager
LeahPrag May 13, 2025
3c8812b
updated
MalkyDoutsch May 14, 2025
1df7aea
finished doctor
LeahPrag May 14, 2025
0e14f2b
finished doctor
LeahPrag May 14, 2025
485ea98
final changes in doctor
LeahPrag May 14, 2025
4e778f2
relativePath to data base
HANAmelloul8394 May 18, 2025
0b7605a
correct path
LeahPrag May 18, 2025
3668f45
correct path
LeahPrag May 18, 2025
e269360
add get to the cintroller
LeahPrag May 18, 2025
d0f6da9
relativePath
LeahPrag May 19, 2025
fd947d1
add DoctorDay data
LeahPrag May 20, 2025
2ce24a7
new data
LeahPrag May 20, 2025
2ca782e
doctor day
LeahPrag May 20, 2025
c0c2def
correct
May 20, 2025
9885807
work
LeahPrag May 20, 2025
c3639e2
mapper
HANAmelloul8394 May 20, 2025
784b934
Queue maneger
shiffiH May 22, 2025
2bbf2fd
without extra pages
LeahPrag May 25, 2025
c5e8ffe
add simple functions
HANAmelloul8394 May 25, 2025
a834111
doctor controller
LeahPrag May 25, 2025
911ee36
Save local changes before pulling
LeahPrag May 25, 2025
394930d
doctor controller
LeahPrag May 25, 2025
72fec4b
correct!!
LeahPrag May 26, 2025
c34c970
the correct!!
LeahPrag May 26, 2025
276f9fd
Merge pull request #4 from LeahPrag/leah
LeahPrag May 26, 2025
65c7fc1
add to doctor controller
LeahPrag May 27, 2025
f6ad515
specialization
LeahPrag May 27, 2025
2002581
shiffffi
LeahPrag May 27, 2025
356f6d8
shiffi!!
LeahPrag May 27, 2025
3404a44
shifffffi
LeahPrag May 27, 2025
b582e45
shiffi leale
LeahPrag May 27, 2025
20ceb3f
add react
LeahPrag Jun 2, 2025
9c480eb
update all, also with the client, Hope there won't be any more changes.
MalkyDoutsch Jun 16, 2025
a234012
recorrect the doctor conntroller and added profil for the mapper
LeahPrag Jun 16, 2025
8c3c255
change in AvailableQueuesForToday
LeahPrag Jun 18, 2025
2feb3e6
function addDoctor
LeahPrag Jun 21, 2025
171f1ec
added a function DeleteADoctor
LeahPrag Jun 22, 2025
74a980f
updateDoctor function
LeahPrag Jun 22, 2025
8857228
makeAnApointment function + mapper for clinicQueue
LeahPrag Jun 23, 2025
b432745
updated all
LeahPrag Jun 24, 2025
091c5d8
login in backend
MalkyDoutsch Jun 24, 2025
ecb117e
correct syntax
HANAmelloul8394 Jun 24, 2025
111567c
correct doctorQueuesForToday
LeahPrag Jun 24, 2025
5a5dfb2
doctorQueuesForTodat
LeahPrag Jun 24, 2025
babe0d6
add middlware
HANAmelloul8394 Jun 24, 2025
3d03584
add try catch
HANAmelloul8394 Jun 29, 2025
e1481ca
add try catch
HANAmelloul8394 Jun 29, 2025
1e9f6a5
Reloud the mapping client and clinic queues.
HANAmelloul8394 Jul 8, 2025
707a31f
add exceptions handler.
HANAmelloul8394 Jul 8, 2025
547bc0f
update DB_Manager with delete Queues when delete client
MalkyDoutsch Jul 10, 2025
7cf0f31
adding more a few things)
MalkyDoutsch Jul 10, 2025
1ec778e
____
MalkyDoutsch Jul 10, 2025
d7be835
add GetDoctorName function
HANAmelloul8394 Jul 13, 2025
830d927
fix sum functions.
HANAmelloul8394 Jul 24, 2025
b29f6bf
delete doctor
shiffiH Jul 26, 2025
ef5dbad
Add ClientQueues and DoctorQueues
HANAmelloul8394 Jul 28, 2025
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
766 changes: 366 additions & 400 deletions .gitignore

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions .vs/MVCProject/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Version": 1,
"WorkspaceRootPath": "H:\\\u05DC\u05D0\u05D4\u05DC\u05D4\\c#\\ClinicProject\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": []
}
]
{
"Version": 1,
"WorkspaceRootPath": "H:\\\u05DC\u05D0\u05D4\u05DC\u05D4\\c#\\ClinicProject\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": []
}
]
}
Binary file modified fullstackProject/.vs/MVCProject/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified fullstackProject/.vs/MVCProject/v17/.futdcache.v2
Binary file not shown.
Binary file modified fullstackProject/.vs/MVCProject/v17/.suo
Binary file not shown.
993 changes: 867 additions & 126 deletions fullstackProject/.vs/MVCProject/v17/DocumentLayout.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions fullstackProject/BL/API/IAvailableQueueManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace BL.API
{
public interface IAvailableQueueManager
{
public Task<bool> IsHolidayAsync(DateTime date);
}
}
13 changes: 13 additions & 0 deletions fullstackProject/BL/API/IClientBL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using DAL.Models;
using BL.Models;
namespace BL.API
{
public interface IClientBL
{
Task<List<M_Client>> GetAllClients();
Task<M_Client> GetClientById(string id);
Task AddClient(M_Client client);
Task RemoveClient(string id);
Task UpdateClient(M_Client updatedClient, string existingClientId);
}
}
14 changes: 14 additions & 0 deletions fullstackProject/BL/API/IClinicQueueBL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using BL.Models;
using DAL.Models;

namespace BL.API
{
public interface IClinicQueueBL
{
Task DeleteAnApointment(string udDoctor, string idClient, DateOnly date);
Task GenerateFutureAvailableQueues();
Task MakeAnAppointment(string idDoctor, string idClient, DateOnly date, int hour);
Task<List<M_ClinicQueue>> GetClientQueues(string clientId);
Task<List<int>> ClientsNames(int doctorID);
}
}
21 changes: 21 additions & 0 deletions fullstackProject/BL/API/IDoctorBL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using BL.Models;

namespace BL.API
{
public interface IDoctorBL
{
Task<int> GetNumOfClientForToday(string idNumber, DateOnly day);
Task<List<M_Doctor>> GetDoctors();
Task<List<M_AvailableQueue>> IsDoctorAvailable(string firstName, string lastName, DateOnly day);
Task<List<M_ClinicQueue>> GetDoctorQueuesForToday(string idNumber, DateOnly day);
Task<bool> DeleteADayOfWork(string idNumber, DateOnly day);
Task<List<M_AvailableQueue>> GetDoctorAvailableQueuesForASpesificday(string firstName, string lastName, DateOnly day);
Task<List<M_AvailableQueue>> GetAvailableQueuesForASpesificday(DateOnly day);
Task<List<M_AvailableQueue>> AvailableQueuesForASpezesilation(string specialization);
Task AddDoctor(M_Doctor doctor);
Task DeleteADoctor(string id);
Task UpdateDoctor(UpdateDoctorDto updatedDoctor);
Task<bool> SearchDoctorById(string idNumber);
Task<M_Doctor> GetDoctorById(string id);
}
}
9 changes: 9 additions & 0 deletions fullstackProject/BL/API/IManagerBL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace BL.API
{
public interface IManagerBL
{
public IClientBL _clientBL { get; set; }
public IDoctorBL _doctorBL { get; set; }
public IClinicQueueBL _clinicQueueBL { get; set; }
}
}
13 changes: 13 additions & 0 deletions fullstackProject/BL/API/IManagerDAL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using DAL.API;
using DAL.service;

namespace BL.API
{
public interface IManagerDAL
{
public IClinicQueueDAL _clinicQueueDAL { get; set; }
public IDoctorDAL _doctorDAL { get; set; }
public IClientDAL _clientDAL { get; set; }
public IAvailableQueueDAL _availableQueueDAL { get; set; }
}
}
5 changes: 5 additions & 0 deletions fullstackProject/BL/BL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DAL\DAL.csproj" />
</ItemGroup>
Expand Down
52 changes: 52 additions & 0 deletions fullstackProject/BL/Exceptions/Exceptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
namespace BL.Exceptions
{
public class ClientNotExistException(string ClientId) : Exception($"The Client with Id {ClientId} not Exist")
{
public int StatusCode { get; } = 600;
}
public class ClientAlreadyExistException(string ClientId) : Exception($"The Client with Id {ClientId} aleady Exist")
{
public int StatusCode { get; } = 604;
}
public class SpecializationNotExistException(string specialization) : Exception($"The specialization {specialization} not Exist")
{
public int StatusCode { get; } = 605;
}
public class DoctorNotExistException : Exception
{
public int StatusCode { get; }
public DoctorNotExistException(string firstName, string lastName) : base($"The doctor: {firstName} {lastName} not Exist")
{
StatusCode = 620;
}
public DoctorNotExistException(string id) : base($"The doctor: {id} not Exist")
{
StatusCode = 621;
}
}
public class DoctorAlreadyExistException(string ClientId) : Exception($"The Doctor with Id {ClientId} aleady Exist")
{
public int StatusCode { get; } = 604;
}
public class QueueDoesNotExistException(string idDoctor, string idClient, DateTime date) : Exception($"The queue: doctor: {idDoctor} client:{idClient} date: {date}does not Exist")
{
public int StatusCode { get; } = 650;
}
public class DayOfQueueIsNotPermission(DateTime date) : Exception($"The date: {date} does not permission for a queue")
{
public int StatusCode { get; } = 650;
}
public class AvailableQueueNotFoundException(string idDoctor, DateTime date) : Exception($"The queue in date: {date:yyyy-MM-dd HH:mm} for doctor {idDoctor} is not available")
{
public int StatusCode { get; } = 650;
}
public class IncompatibleOrIincompleteValuesException : Exception
{
public int StatusCode { get; }
public IncompatibleOrIincompleteValuesException() : base($"Incompatible or incomplete values")
{
StatusCode = 699;
}
}
}

13 changes: 13 additions & 0 deletions fullstackProject/BL/Mapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using AutoMapper;
namespace BL
{
public class Mapper : Profile
{
public Mapper()
{
CreateMap<DAL.Models.Client, BL.Models.M_Client>().ReverseMap();
CreateMap<DAL.Models.Doctor, BL.Models.M_Doctor>().ReverseMap();
CreateMap<DAL.Models.AvailableQueue, BL.Models.M_AvailableQueue>().ReverseMap();
}
}
}
18 changes: 18 additions & 0 deletions fullstackProject/BL/Models/ClinicQueueMappingProfile .cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using AutoMapper;
using DAL.Models;
namespace BL.Models
{
public class ClinicQueueMappingProfile : Profile
{
public ClinicQueueMappingProfile()
{
CreateMap<ClinicQueue, M_ClinicQueue>()
.ForMember(dest => dest.ClientId, opt => opt.MapFrom(src => src.Client.ClientId))
.ForMember(dest => dest.ClientFirstName, opt => opt.MapFrom(src => src.Client.FirstName))
.ForMember(dest => dest.ClientLastName, opt => opt.MapFrom(src => src.Client.LastName))
.ForMember(dest => dest.DoctorId, opt => opt.MapFrom(src => src.Doctor.DoctorId))
.ForMember(dest => dest.DoctorFirstName, opt => opt.MapFrom(src => src.Doctor.FirstName))
.ForMember(dest => dest.DoctorLastName, opt => opt.MapFrom(src => src.Doctor.LastName));
}
}
}
9 changes: 9 additions & 0 deletions fullstackProject/BL/Models/M_AvailableQueue.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace BL.Models
{
public class M_AvailableQueue
{
public int QueueId { get; set; }
public DateTime AppointmentDate { get; set; }
public int DoctorId { get; set; }
}
}
14 changes: 14 additions & 0 deletions fullstackProject/BL/Models/M_Client.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace BL.Models
{
public class M_Client
{
public string FirstName { get; set; } = null!;
public string LastName { get; set; } = null!;
public string? Phone { get; set; }
public string? Email { get; set; }
public string Address { get; set; } = null!;
public string IdNumber { get; set; } = null!;
public List<M_ClinicQueue> ClinicQueues { get; set; } = new();

}
}
14 changes: 14 additions & 0 deletions fullstackProject/BL/Models/M_ClinicQueue.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace BL.Models
{
public class M_ClinicQueue
{
public int QueueId { get; set; }
public DateTime AppointmentDate { get; set; }
public int ClientId { get; set; }
public string ClientFirstName { get; set; } = "";
public string ClientLastName { get; set; } = "";
public int DoctorId { get; set; }
public string DoctorFirstName { get; set; } = "";
public string DoctorLastName { get; set; } = "";
}
}
12 changes: 12 additions & 0 deletions fullstackProject/BL/Models/M_Doctor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace BL.Models
{
public class M_Doctor
{
public int DoctorId { get; set; }
public string FirstName { get; set; } = null!;
public string LastName { get; set; } = null!;
public string Specialization { get; set; } = null!;
public string IdNumber { get; set; } = null!;

}
}
28 changes: 28 additions & 0 deletions fullstackProject/BL/Models/ManagerBL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using BL.API;
using BL.service;
using DAL.service;
using Microsoft.Extensions.DependencyInjection;

public class ManagerBL : IManagerBL
{
public IClientBL _clientBL { get; set; }
public IDoctorBL _doctorBL { get; set; }
public IClinicQueueBL _clinicQueueBL { get; set; }
private readonly IManagerDAL _managerDAL;
public ManagerBL()
{
ServiceCollection services = new();
services.AddSingleton<IManagerDAL, ManagerDAL>();
services.AddSingleton<IDoctorBL, DoctorBL>();
services.AddSingleton<IClientBL, ClientBL>();
services.AddSingleton<IClinicQueueBL, ClinicQueueBL>();
services.AddAutoMapper(typeof(DoctorBL).Assembly);

ServiceProvider serviceProvider = services.BuildServiceProvider();

_managerDAL = serviceProvider.GetService<IManagerDAL>();
_doctorBL = serviceProvider.GetService<IDoctorBL>();
_clientBL = serviceProvider.GetService<IClientBL>();
_clinicQueueBL = serviceProvider.GetService<IClinicQueueBL>();
}
}
28 changes: 28 additions & 0 deletions fullstackProject/BL/Models/ManagerDAL.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using BL.API;
using BL.service;
using DAL.API;
using DAL.Models;
using DAL.service;
using Microsoft.Extensions.DependencyInjection;
public class ManagerDAL : IManagerDAL
{
public IClinicQueueDAL _clinicQueueDAL { get; set; }
public IAvailableQueueDAL _availableQueueDAL { get; set; }
public IDoctorDAL _doctorDAL { get; set; }
public IClientDAL _clientDAL { get; set; }
public ManagerDAL()
{
ServiceCollection services = new();
services.AddSingleton<IDoctorDAL, DoctorDAL>();
services.AddSingleton<IClientDAL, ClientDAL>();
services.AddSingleton<IClinicQueueDAL, ClinicQueueDAL>();
services.AddSingleton<IAvailableQueueDAL, AvailableQueueDAL>();
services.AddSingleton<DB_Manager>();
services.AddAutoMapper(typeof(DoctorBL).Assembly);
ServiceProvider serviceProvider = services.BuildServiceProvider();
_doctorDAL = serviceProvider.GetService<IDoctorDAL>();
_clientDAL = serviceProvider.GetService<IClientDAL>();
_clinicQueueDAL = serviceProvider.GetService<IClinicQueueDAL>();
_availableQueueDAL = serviceProvider.GetService<IAvailableQueueDAL>();
}
}
15 changes: 15 additions & 0 deletions fullstackProject/BL/Models/QueueMappingProfile.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using DAL.Models;
using AutoMapper;
namespace BL.Models
{
public class QueueMappingProfile : Profile
{
public QueueMappingProfile()
{
CreateMap<AvailableQueue, M_AvailableQueue>()
.ForMember(dest => dest.QueueId, opt => opt.MapFrom(src => src.QueueId))
.ForMember(dest => dest.AppointmentDate, opt => opt.MapFrom(src => src.AppointmentDate))
.ForMember(dest => dest.DoctorId, opt => opt.MapFrom(src => src.Doctor.DoctorId));
}
}
}
18 changes: 18 additions & 0 deletions fullstackProject/BL/Models/UpdateDoctorDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BL.Models
{
public class UpdateDoctorDto
{

public string IdNumber { get; set; } = null!;
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Specialization { get; set; }

}
}
Loading