Merge remote-tracking branch 'origin/Main' into Main

This commit is contained in:
2026-01-06 12:26:00 +03:30
8 changed files with 23 additions and 179 deletions

3
.gitignore vendored
View File

@@ -362,3 +362,6 @@ MigrationBackup/
# # Fody - auto-generated XML schema
# FodyWeavers.xsd
.idea
/ServiceHost/appsettings.Development.json
/ServiceHost/appsettings.json
/ServiceHost/web.config

View File

@@ -352,7 +352,8 @@ public class SetTimeProjectCommandHandler : IBaseCommandHandler<SetTimeProjectCo
private void SetSectionTime(TaskSection section, SetTimeProjectSkillItem sectionItem, long? addedByUserId)
{
var initData = sectionItem.InitData;
var initialTime = TimeSpan.FromHours(initData.Hours);
var initialTime = TimeSpan.FromHours(initData.Hours)
.Add(TimeSpan.FromMinutes(initData.Minutes));
if (initialTime <= TimeSpan.Zero)
{

View File

@@ -53,7 +53,8 @@ public class ProjectBoardListQueryHandler : IBaseQueryHandler<ProjectBoardListQu
.ToDictionaryAsync(x => x.Id, x => x.FullName, cancellationToken);
var result = data
var result = data .OrderByDescending(x => x.CurrentAssignedUserId == currentUserId)
.ThenBy(x => GetStatusOrder(x.Status))
.Select(x =>
{
// محاسبه یکبار برای هر Activity و Cache کردن نتیجه
@@ -95,9 +96,6 @@ public class ProjectBoardListQueryHandler : IBaseQueryHandler<ProjectBoardListQu
});
}
}
mergedHistories = mergedHistories.OrderByDescending(h => h.IsCurrentUser).ToList();
return new ProjectBoardListResponse()
{
Id = x.Id,
@@ -116,19 +114,21 @@ public class ProjectBoardListQueryHandler : IBaseQueryHandler<ProjectBoardListQu
: users.GetValueOrDefault(x.CurrentAssignedUserId, "ناشناس"),
SkillName = x.Skill?.Name??"-",
};
})
.OrderByDescending(r =>
{
// اگر AssignedUser null نباشد، بررسی کن که برابر current user هست یا نه
if (r.AssignedUser != null)
{
return users.FirstOrDefault(u => u.Value == r.AssignedUser).Key == currentUserId;
}
// اگر AssignedUser null بود، از OriginalUser بررسی کن
return users.FirstOrDefault(u => u.Value == r.OriginalUser).Key == currentUserId;
})
.ToList();
}).ToList();
return OperationResult<List<ProjectBoardListResponse>>.Success(result);
}
private static int GetStatusOrder(TaskSectionStatus status)
{
return status switch
{
TaskSectionStatus.InProgress => 0,
TaskSectionStatus.Incomplete => 1,
TaskSectionStatus.NotAssigned => 2,
TaskSectionStatus.ReadyToStart => 2,
TaskSectionStatus.PendingForCompletion => 3,
_ => 99
};
}
}

View File

@@ -19,7 +19,7 @@
"sqlDebugging": true,
"dotnetRunMessages": "true",
"nativeDebugging": true,
"applicationUrl": "https://localhost:5004;http://localhost:5003;https://192.168.0.117:5006",
"applicationUrl": "https://localhost:5004;http://localhost:5003;",
"jsWebView2Debugging": false,
"hotReloadEnabled": true
},

View File

@@ -10,6 +10,7 @@
</PropertyGroup>
<PropertyGroup>
<RazorCompileOnBuild>true</RazorCompileOnBuild>
<UserSecretsId>a6049acf-0286-4947-983a-761d06d65f36</UserSecretsId>
</PropertyGroup>
<!--<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

View File

@@ -1,77 +0,0 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"ConnectionStrings": {
//تست
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
//server
"MesbahDbServer": "Data Source=171.22.24.15;Initial Catalog=test_mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;",
//local
"MesbahDb": "Data Source=.;Initial Catalog=test_mesbah_db;Integrated Security=True;TrustServerCertificate=true;",
//server
//"MesbahDb": "Data Source=185.208.175.186;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;",
//dad-mehr
//"MesbahDb": "Data Source=.;Initial Catalog=teamWork;Integrated Security=True;TrustServerCertificate=true;",
"TestDb": "Data Source=.;Initial Catalog=TestDb;Integrated Security=True;TrustServerCertificate=true;",
//program_manager_db
"ProgramManagerDb": "Data Source=.;Initial Catalog=test_program_manager_db;Integrated Security=True;TrustServerCertificate=true;",
//"ProgramManagerDb": "Data Source=185.208.175.186;Initial Catalog=test_program_manager_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;"
"ProgramManagerDbServer": "Data Source=171.22.24.15;Initial Catalog=test_program_manager_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]18[3019]#@ATt;TrustServerCertificate=true;"
//mahan Docker
//"MesbahDb": "Data Source=localhost,5069;Initial Catalog=mesbah_db;User ID=sa;Password=YourPassword123;TrustServerCertificate=True;"
},
"GoogleRecaptchaV3": {
"SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH",
"SecretKey": "6Lfhp_AnAAAAANjDDY6DPrbbUQS7k6ZCRmrVP5Lb"
},
"SmsSecrets": {
"ApiKey": "Og5M562igmzJRhQPnq0GdtieYdLgtfikjzxOmeQBPxJjZtyge5Klc046Lfw1mxSa",
"SecretKey": "dadmehr"
},
"Domain": ".dadmehrg.ir",
"MongoDb": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "Gozareshgir"
},
"SmsSettings": {
"IsTestMode": true,
"TestNumbers": [
"09116967898"
//, "09116067106", "09114221321"
]
},
"InternalApi": {
"Local": "https://localhost:7032",
"Dadmehrg": "https://api.pm.dadmehrg.ir",
"Gozareshgir": "https://api.pm.gozareshgir.ir"
},
"SepehrGateWayTerminalId": 99213700,
"JwtSettings": {
"SecretKey": ">3£>^1UBG@yw)QdhRC3$£:;r8~?qpp^oKK4D3a~8L2>enF;lkgh",
"Issuer": "GozareshgirApp",
"Audience": "GozareshgirUsers",
"ExpirationMinutes": 30
},
"FileStorage": {
"BaseUrl": "https://localhost:7032/uploads",
"MaxFileSizeBytes": 104857600,
"AllowedImageExtensions": [ ".jpg", ".jpeg", ".png", ".gif", ".webp" ],
"AllowedVideoExtensions": [ ".mp4", ".avi", ".mov", ".wmv" ],
"AllowedAudioExtensions": [ ".mp3", ".wav", ".ogg", ".m4a" ],
"AllowedDocumentExtensions": [ ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".txt" ]
}
}

View File

@@ -1,62 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"ConnectionStrings": {
//"MesbahDb": "Data Source=.\\MSSQLSERVER2019;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=mesbah_db;Password=sa142857$@;"
"MesbahDb": "Data Source=.;Initial Catalog=test_mesbah_db;Integrated Security=True;TrustServerCertificate=true;",
//dad-mehr
//"MesbahDb": "Data Source=.;Initial Catalog=teamWork;Integrated Security=True;TrustServerCertificate=true;",
//testDb
"TestDb": "Data Source=.;Initial Catalog=TestDb;Integrated Security=True;TrustServerCertificate=true;",
//program_manager_db
"ProgramManagerDb": "Data Source=.;Initial Catalog=test_program_manager_db;Integrated Security=True;TrustServerCertificate=true;"
},
"BackupOptions": {
"DbName": "mesbah_db",
"DbBackupZipPath": "c://EveryHourBackupList//",
"FastDbBackupZipPath": "c://FastBackupZipList//",
"InsuranceListZipPath": "c://Logs//Gozareshgir//"
},
"faceModels": {
"Faces": "c://labels//20//"
},
"AllowedHosts": "*",
"Domain": ".dad-mehr.ir"
//"Domain": ".gozareshgir.ir",
"MongoDb": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "Gozareshgir"
},
"SmsSettings": {
"IsTestMode": false,
"TestNumbers": []
},
"InternalApi": {
"Local": "https://localhost:7032",
"Dadmehrg": "https://api.pm.dadmehrg.ir",
"Gozareshgir": "https://api.pm.gozareshgir.ir"
},
"SepehrGateWayTerminalId": 99213700,
"JwtSettings": {
"SecretKey": ">3£>^1UBG@yw)QdhRC3$£:;r8~?qpp^oKK4D3a~8L2>enF;lkgh",
"Issuer": "GozareshgirApp",
"Audience": "GozareshgirUsers",
"ExpirationMinutes": 30
},
"FileStorage": {
"BaseUrl": "https://api.pm.gozareshgir.ir/uploads",
"MaxFileSizeBytes": 104857600,
"AllowedImageExtensions": [ ".jpg", ".jpeg", ".png", ".gif", ".webp" ],
"AllowedVideoExtensions": [ ".mp4", ".avi", ".mov", ".wmv" ],
"AllowedAudioExtensions": [ ".mp3", ".wav", ".ogg", ".m4a" ],
"AllowedDocumentExtensions": [ ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".txt" ]
}
}

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\ServiceHost.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs" hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="200000000" />
</requestFiltering>
</security>
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 35b6b963-974a-4414-8609-b0668181fa64-->
<!--ProjectGuid: A7FC06EB-C37E-33D2-FBED-09D896C572BE-->