From ebdc9b1e555c10081a5fba6159094939c5165460 Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 16 Dec 2025 16:26:15 +0330 Subject: [PATCH 1/2] ProgramManager PermissionCodes set --- .../Constants/ProgramManagerPermissionCode.cs | 221 +++++++++++- .../Pages/Accounts/Account/CreateRole.cshtml | 315 ++++++++++++++---- .../Pages/Accounts/Account/EditRole.cshtml | 301 +++++++++++++---- .../Areas/Admin/Pages/Shared/_Menu.cshtml | 2 +- .../Areas/AdminNew/Pages/Shared/_Menu.cshtml | 2 +- ServiceHost/Properties/launchSettings.json | 2 +- 6 files changed, 694 insertions(+), 149 deletions(-) diff --git a/ProgramManager/src/Application/GozareshgirProgramManager.Application/_Common/Constants/ProgramManagerPermissionCode.cs b/ProgramManager/src/Application/GozareshgirProgramManager.Application/_Common/Constants/ProgramManagerPermissionCode.cs index f5578ea2..3449f4f0 100644 --- a/ProgramManager/src/Application/GozareshgirProgramManager.Application/_Common/Constants/ProgramManagerPermissionCode.cs +++ b/ProgramManager/src/Application/GozareshgirProgramManager.Application/_Common/Constants/ProgramManagerPermissionCode.cs @@ -4,30 +4,233 @@ namespace GozareshgirProgramManager.Application._Common.Constants; public static class ProgramManagerPermissionCode { - + /// + /// دسترسی به بخش مدیریت پروژه + /// public const int Code = 99; + #region DeveloperUsers[تب کاربران برنامه نویسی] /// - ///بخش اجرا + /// تب کاربران برنامه نویسی + /// + public static class DeveloperUsers + { + public const int Code = 9900; + + /// + /// تب تعیین حقوق + /// + public static class SalaryDetermination + { + public const int Code = 990001; + + /// + /// تعیین زمان + /// + public const int WorkingHoursDetermination = 990001; + } + + /// + /// تب وضعیت کارکرد + /// + public static class WorkingStatus + { + public const int Code = 990002; + } + + /// + /// تب فیش حقوقی + /// + public static class Checkout + { + public const int Code = 990003; + + /// + /// ایجاد فیش + /// + public const int Create = 99000301; + + /// + /// حذف تکی فیش + /// + public const int SingleDeletion = 99000302; + + /// + /// حذف گروهی فیش ها + /// + public const int GroupDeletion = 99000303; + + /// + /// محاسبه مجدد گروهی فیش ها + /// + public const int GroupReCompute = 99000304; + + /// + /// محاسبه مجدد تکی فیش + /// + public const int SingleReCompute = 99000305; + + } + + } + + #endregion + + #region ProgramManager[تب مدیریت پروژه] + + /// + /// تب مدیریت پروژه + /// + public static class ProgramManager + { + public const int Code = 9901; + + /// + /// ایجاد پروژه + /// + public static class CreateProject + { + public const int Code = 9901; + } + + /// + /// همه پروژه ها + /// + public static class AllProjects + { + public const int Code = 990102; + + } + + /// + /// تعیین کاربر + /// + public static class UserDetermination + { + public const int Code = 990106; + } + + /// + /// تعیین زمان پروژه + /// + public static class ProjectTimeSetting + { + public const int Code = 990107; + } + + /// + /// ویرایش پروژه + /// + public static class EditProject + { + public const int Code = 990108; + } + + /// + /// حذف پروژه + /// + public static class DeleteProject + { + public const int Code = 990109; + } + + /// + /// ایجاد بخش اصلی + /// + public static class CreateMainSection + { + public const int Code = 990110; + } + + /// + /// ایجاد بخش فرعی + /// + public static class CreateSubSection + { + public const int Code = 990111; + } + } + + #endregion + + #region Board[تب اجرا] + + /// + ///تب اجرا /// public static class Board { - public const int Code = 991; + public const int Code = 9902; /// /// تب همه /// public static class All { - public const int Code = 99101; + public const int Code = 990201; + } - /// - /// دیدن همه تسک ها - /// - public const int ViewAll = 9910101; + /// + /// آماده اجرا + /// + public static class ReadyToRun + { + public const int Code = 990202; + } + + /// + /// در حال اجرا + /// + public static class Running + { + public const int Code = 990203; + } + + + /// + /// نیمه کاره + /// + public static class Unfinished + { + public const int Code = 990204; + } + + /// + /// اتمام اجرا + /// + public static class Finished + { + public const int Code = 990204; + } + + /// + /// دیدن پروژه همه کاربران + /// + public static class ViewAllUsersProjects + { + public const int Code = 990206; + } + + /// + /// ارجاع به دیگران + /// + public static class ReferralToOthers + { + public const int Code = 990207; + } + + /// + /// چت + /// + public static class Chat + { + public const int Code = 990208; } } - + + #endregion + + public static List GetAllCodes() { var result = new List(); diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml index 398e2b56..e276aecf 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml @@ -1014,7 +1014,7 @@ -
+ @*
@@ -1024,111 +1024,281 @@ -
+
*@ - +
- - -
+ + + + +
- - + + + +
- + + + +
+ +
+
+ + +
+ + + + +
+ + +
+ + + + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + + + +
+ + + +
+ +
- - + + +
- - -
- -
-
- -
-
- -
-
- -
+ +
- +
- + -
- -
-
- -
-
- -
-
- -
+
- +
- + -
- -
-
- -
-
- -
-
- -
+
-
- + + +
+ + + + +
+ +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + + +
+ + + + +
+ + + +
+ + + + +
+
+ + +
- + + + + +
+ + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+
-
- -
-
- -
-
- -
-
- -
-
@@ -1324,6 +1494,13 @@ name="PmPermissions[${pmIndex}]" value="${chk.checked ? chk.value : 0}"> `); + if(chk.checked && chk.value == 99){ + $("#hiddenInput").append(` + `); + normalIndex++; + } pmIndex++; } else { $("#hiddenInput").append(` diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml index da948964..b1e53af0 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/EditRole.cshtml @@ -1017,124 +1017,282 @@ - +
- + - - - -
- - -
- - - - + +
- + + +
- + + + +
+ +
+
+ + +
+ + +
- +
- + +
- +
- +
- +
- -
-
- -
- - - -
- +
- -
-
- -
-
- -
-
- -
- - - -
- -
-
- -
-
- -
-
- +
- + + + +
- + + +
+ + -
-
+ + +
- + + +
+
- + + + +
+
- + + + + +
+ + +
+ + + + +
+ +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + + +
+ + + + +
+ + + +
+ + + +
+ + +
+ + + + + +
+ + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+ + +
+ + + + +
+
+ +
+
@@ -1378,6 +1536,13 @@ name="PmPermissions[${pmIndex}]" value="${chk.checked ? chk.value : 0}"> `); + if(chk.checked && chk.value == 99){ + $("#hiddenInput").append(` + `); + normalIndex++; + } pmIndex++; } else { $("#hiddenInput").append(` diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml index b1f15662..90b8007a 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml @@ -518,7 +518,7 @@ diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml index 2aa0ccd4..7e246091 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml @@ -671,7 +671,7 @@ diff --git a/ServiceHost/Properties/launchSettings.json b/ServiceHost/Properties/launchSettings.json index d7381591..788962e4 100644 --- a/ServiceHost/Properties/launchSettings.json +++ b/ServiceHost/Properties/launchSettings.json @@ -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 }, From 2ef1ea3d1a6b0715ee7f244730cf32d022c330c4 Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 16 Dec 2025 17:02:40 +0330 Subject: [PATCH 2/2] add new permission for workshop --- .../Pages/Accounts/Account/CreateRole.cshtml | 19 ++++++++++++++++--- .../Pages/Accounts/Account/EditRole.cshtml | 18 +++++++++++++++--- .../Company/Workshops/CreateWorkshop.cshtml | 2 +- .../Company/Workshops/EditWorkshop.cshtml | 2 +- .../SignalRBoardNotificationPublisher.cs | 2 +- 5 files changed, 34 insertions(+), 9 deletions(-) diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml index e276aecf..5172224a 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/CreateRole.cshtml @@ -1,6 +1,10 @@ @model AccountManagement.Application.Contracts.Role.CreateRole @{