From 9596c8f8b68290e6fc1d9da16dcf83041e7ff5b9 Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 27 Jan 2026 16:24:34 +0330 Subject: [PATCH 1/2] refactor FileUploadService to simplify category folder naming --- .../FileManagement/FileUploadService.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Services/FileManagement/FileUploadService.cs b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Services/FileManagement/FileUploadService.cs index ec50de7e..92d439b6 100644 --- a/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Services/FileManagement/FileUploadService.cs +++ b/ProgramManager/src/Infrastructure/GozareshgirProgramManager.Infrastructure/Services/FileManagement/FileUploadService.cs @@ -95,7 +95,7 @@ public class FileUploadService : IFileUploadService await _fileRepository.SaveChangesAsync(); // آپلود فایل به استوریج - var categoryFolder = GetCategoryFolderName(category); + var categoryFolder = category.ToString(); var uploadResult = await _fileStorageService.UploadAsync( fileStream, uploadedFile.UniqueFileName, @@ -227,21 +227,5 @@ public class FileUploadService : IFileUploadService return FileType.Document; } - - /// - /// دریافت نام پوشه بر اساس دسته‌بندی - /// - private string GetCategoryFolderName(FileCategory category) - { - return category switch - { - FileCategory.TaskChatMessage => "TaskChatMessage", - FileCategory.TaskAttachment => "TaskAttachment", - FileCategory.ProjectDocument => "ProjectDocument", - FileCategory.UserProfilePhoto => "UserProfilePhoto", - FileCategory.Report => "Report", - _ => "Other" - }; - } } From a55492b16a4615f70138b56b3a579b9d2776dfbb Mon Sep 17 00:00:00 2001 From: mahan Date: Tue, 27 Jan 2026 17:43:05 +0330 Subject: [PATCH 2/2] add CancelSendVerificationSms flag to InstitutionContractExtensionCompleteRequest and update SMS sending logic --- ...itutionContractExtensionCompleteRequest.cs | 1 + .../InstitutionContractRepository.cs | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CompanyManagment.App.Contracts/InstitutionContract/InstitutionContractExtensionCompleteRequest.cs b/CompanyManagment.App.Contracts/InstitutionContract/InstitutionContractExtensionCompleteRequest.cs index 8de7ac89..e507db6d 100644 --- a/CompanyManagment.App.Contracts/InstitutionContract/InstitutionContractExtensionCompleteRequest.cs +++ b/CompanyManagment.App.Contracts/InstitutionContract/InstitutionContractExtensionCompleteRequest.cs @@ -7,6 +7,7 @@ public class InstitutionContractExtensionCompleteRequest public Guid TemporaryId { get; set; } public bool IsInstallment { get; set; } public long LawId { get; set; } + public bool CancelSendVerificationSms { get; set; } } public class InstitutionContractCreationCompleteRequest diff --git a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs index 99f7b652..39c98954 100644 --- a/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs +++ b/CompanyManagment.EFCore/Repository/InstitutionContractRepository.cs @@ -2269,7 +2269,8 @@ public class InstitutionContractRepository : RepositoryBase x.WorkshopId.Value)??[]; + var workshopIds = prevInstitutionContracts.WorkshopGroup?.CurrentWorkshops?.Select(x => x.WorkshopId.Value) ?? + []; var workshopsNotInInstitution = employerWorkshopIds.Where(x => !workshopIds.Contains(x)).ToList(); @@ -2317,7 +2318,7 @@ public class InstitutionContractRepository : RepositoryBase workshopsNotInInstitution.Contains(x.WorkshopId) && x.StartWorkDate <= DateTime.Now && x.LeftWorkDate >= DateTime.Now) @@ -2959,8 +2960,11 @@ public class InstitutionContractRepository : RepositoryBase workshopDetails = []; @@ -5109,9 +5113,11 @@ public class InstitutionContractRepository : RepositoryBase