Merge pull request 'Changed the feature permission grouping' (#46) from Ashutosh_Feature_Permission into Issue_May_3W

Reviewed-on: #46
This commit is contained in:
Gitea Admin 2025-05-14 08:05:03 +00:00
commit a0f1777316
5 changed files with 2844 additions and 85 deletions

View File

@ -483,47 +483,45 @@ namespace Marco.Pms.DataAccess.Data
new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Manage Project", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), Description = "Manage Infra", Name = "Manage Infra", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Manage Tasks", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Task Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Assign and Update Tasks Progress", Name = "Assign and Update Tasks Progress", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
//new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Assign and Update Tasks Progress", Name = "Assign and Update Tasks Progress", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Manage Employee", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Employee Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
//new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
);
modelBuilder.Entity<FeaturePermission>().HasData(
new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project", Description = "" },
new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "" },
new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "" },
new FeaturePermission { Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "View Project", Description = "Access all information related to the project." },
new FeaturePermission { Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Project", Description = "Potentially edit the project name, description, start/end dates, or status." },
new FeaturePermission { Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"), FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), IsEnabled = true, Name = "Manage Team", Description = "The \"Manage Team\" feature allows authorized users to organize project personnel by adding, removing, and assigning employee to projects." },
new FeaturePermission { Id = new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"), FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), IsEnabled = true, Name = "View Project Infra", Description = "" },
new FeaturePermission { Id = new Guid("f2aee20a-b754-4537-8166-f9507b44585b"), FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), IsEnabled = true, Name = "Manage Project Infra", Description = "" },
new FeaturePermission { Id = new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"), FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), IsEnabled = true, Name = "View Project Infra", Description = "Grants a user comprehensive read-only access to all details concerning the project's underlying systems, technologies, resources, and configurations" },
new FeaturePermission { Id = new Guid("f2aee20a-b754-4537-8166-f9507b44585b"), FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), IsEnabled = true, Name = "Manage Project Infra", Description = "This allows them to create, modify, and manage all aspects of the supporting infrastructure." },
new FeaturePermission { Id = new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "View Task", Description = "" },
new FeaturePermission { Id = new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Manage Task", Description = "" },
new FeaturePermission { Id = new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "View Task", Description = "Grants a user comprehensive read-only access to all details associated with tasks within a project. This includes task descriptions, statuses, assignees, due dates, dependencies, progress, history, and any related attachments or discussions." },
new FeaturePermission { Id = new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Add/Edit Task", Description = "This allows them to create new tasks, modify existing task attributes (description, status, assignee, due date, etc.)," },
new FeaturePermission { Id = new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Assign/Report Progress", Description = "Grants a user the ability to designate team members responsible for specific tasks and to update the completion status or provide progress updates for those tasks" },
new FeaturePermission { Id = new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"), FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), IsEnabled = true, Name = "Approve Task", Description = "Grants a user the authority to officially confirm the completion or acceptance of a task, often signifying that it meets the required standards or criteria" },
new FeaturePermission { Id = new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Assign Task and Report Progress", Description = "" },
new FeaturePermission { Id = new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Approve Task", Description = "" },
new FeaturePermission { Id = new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "View Employee", Description = "Grants a user read-only access to details about the individuals within the system. This typically includes names, contact information, roles, departments, and potentially other relevant employee data" },
new FeaturePermission { Id = new Guid("a97d366a-c2bb-448d-be93-402bd2324566"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Add/Edit Employee", Description = "Grants a user the authority to create new employee profiles and modify existing employee details within the system. This typically includes adding or updating information such as names, contact details, roles, departments, skills, and potentially other personal or professional data" },
new FeaturePermission { Id = new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Assign Roles", Description = "Grants a user the authority to manage employee application roles, enabling them to assign or revoke access privileges within the system." },
new FeaturePermission { Id = new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "View Employee", Description = "" },
new FeaturePermission { Id = new Guid("a97d366a-c2bb-448d-be93-402bd2324566"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Manage Employee", Description = "" },
new FeaturePermission { Id = new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"), FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), IsEnabled = true, Name = "Assign To Project", Description = "" },
new FeaturePermission { Id = new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Perform Attendance ", Description = "Grants a user the ability to record their own work hours or presence within the system. This typically involves checking in and checking out, logging break times, and potentially viewing their own attendance history." },
new FeaturePermission { Id = new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Regularize Attendance", Description = "Grants a user the authority to approve requests from employees to adjust or correct their recorded attendance. This typically involves reviewing the reason for the regularization, verifying any supporting documentation, and then officially accepting the changes to the employee's attendance records" },
new FeaturePermission { Id = new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Perform Attendance ", Description = "" },
new FeaturePermission { Id = new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Regularize Attendance", Description = "" },
new FeaturePermission { Id = new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "View Masters", Description = "" },
new FeaturePermission { Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "Manage Masters", Description = "" },
new FeaturePermission { Id = new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "View Masters", Description = "" },
new FeaturePermission { Id = new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "Manage Masters", Description = "" }
new FeaturePermission { Id = new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "View Masters", Description = "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency" },
new FeaturePermission { Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "Manage Masters", Description = "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories" }
//new FeaturePermission { Id = new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "View Masters", Description = "" },
//new FeaturePermission { Id = new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "Manage Masters", Description = "" }
);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,314 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Changed_Freture_Permissions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"));
migrationBuilder.DeleteData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"));
migrationBuilder.DeleteData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"));
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"),
columns: new[] { "Description", "Name" },
values: new object[] { "This allows them to create new tasks, modify existing task attributes (description, status, assignee, due date, etc.),", "Add/Edit Task" });
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"),
column: "Description",
value: "Potentially edit the project name, description, start/end dates, or status.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"),
column: "Description",
value: "Grants a user the authority to approve requests from employees to adjust or correct their recorded attendance. This typically involves reviewing the reason for the regularization, verifying any supporting documentation, and then officially accepting the changes to the employee's attendance records");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("588a8824-f924-4955-82d8-fc51956cf323"),
column: "Description",
value: "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"),
column: "Description",
value: "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"),
column: "Description",
value: "Access all information related to the project.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"),
column: "Description",
value: "Grants a user the ability to record their own work hours or presence within the system. This typically involves checking in and checking out, logging break times, and potentially viewing their own attendance history.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"),
column: "Description",
value: "Grants a user comprehensive read-only access to all details associated with tasks within a project. This includes task descriptions, statuses, assignees, due dates, dependencies, progress, history, and any related attachments or discussions.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("a97d366a-c2bb-448d-be93-402bd2324566"),
columns: new[] { "Description", "Name" },
values: new object[] { "Grants a user the authority to create new employee profiles and modify existing employee details within the system. This typically includes adding or updating information such as names, contact details, roles, departments, skills, and potentially other personal or professional data", "Add/Edit Employee" });
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"),
column: "Description",
value: "Grants a user read-only access to details about the individuals within the system. This typically includes names, contact information, roles, departments, and potentially other relevant employee data");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"),
column: "Description",
value: "The \"Manage Team\" feature allows authorized users to organize project personnel by adding, removing, and assigning employee to projects.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"),
column: "Description",
value: "Grants a user comprehensive read-only access to all details concerning the project's underlying systems, technologies, resources, and configurations");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("f2aee20a-b754-4537-8166-f9507b44585b"),
column: "Description",
value: "This allows them to create, modify, and manage all aspects of the supporting infrastructure.");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"),
columns: new[] { "Description", "Name" },
values: new object[] { "Grants a user the authority to manage employee application roles, enabling them to assign or revoke access privileges within the system.", "Assign Roles" });
migrationBuilder.InsertData(
table: "FeaturePermissions",
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
values: new object[,]
{
{ new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"), "Grants a user the ability to designate team members responsible for specific tasks and to update the completion status or provide progress updates for those tasks", new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), true, "Assign/Report Progress" },
{ new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"), "Grants a user the authority to officially confirm the completion or acceptance of a task, often signifying that it meets the required standards or criteria", new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), true, "Approve Task" }
});
migrationBuilder.UpdateData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
column: "Name",
value: "Employee Management");
migrationBuilder.UpdateData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
column: "Name",
value: "Task Management");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"));
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"),
columns: new[] { "Description", "Name" },
values: new object[] { "", "Manage Task" });
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("588a8824-f924-4955-82d8-fc51956cf323"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("a97d366a-c2bb-448d-be93-402bd2324566"),
columns: new[] { "Description", "Name" },
values: new object[] { "", "Manage Employee" });
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("f2aee20a-b754-4537-8166-f9507b44585b"),
column: "Description",
value: "");
migrationBuilder.UpdateData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"),
columns: new[] { "Description", "Name" },
values: new object[] { "", "Assign To Project" });
migrationBuilder.UpdateData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
column: "Name",
value: "Manage Employee");
migrationBuilder.UpdateData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
column: "Name",
value: "Manage Tasks");
migrationBuilder.InsertData(
table: "Features",
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
values: new object[,]
{
{ new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), "Assign and Update Tasks Progress", true, new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), "Assign and Update Tasks Progress" },
{ new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), "Tenant Masters", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Tenant Masters" }
});
migrationBuilder.InsertData(
table: "FeaturePermissions",
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
values: new object[,]
{
{ new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), "", new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), true, "Manage Masters" },
{ new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"), "", new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), true, "View Masters" },
{ new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"), "", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Assign Task and Report Progress" },
{ new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"), "", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Approve Task" }
});
}
}
}

View File

@ -511,7 +511,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"),
Description = "",
Description = "Access all information related to the project.",
FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"),
IsEnabled = true,
Name = "View Project"
@ -519,7 +519,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"),
Description = "",
Description = "Potentially edit the project name, description, start/end dates, or status.",
FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"),
IsEnabled = true,
Name = "Manage Project"
@ -527,7 +527,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"),
Description = "",
Description = "The \"Manage Team\" feature allows authorized users to organize project personnel by adding, removing, and assigning employee to projects.",
FeatureId = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"),
IsEnabled = true,
Name = "Manage Team"
@ -535,7 +535,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"),
Description = "",
Description = "Grants a user comprehensive read-only access to all details concerning the project's underlying systems, technologies, resources, and configurations",
FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"),
IsEnabled = true,
Name = "View Project Infra"
@ -543,7 +543,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("f2aee20a-b754-4537-8166-f9507b44585b"),
Description = "",
Description = "This allows them to create, modify, and manage all aspects of the supporting infrastructure.",
FeatureId = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"),
IsEnabled = true,
Name = "Manage Project Infra"
@ -551,7 +551,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"),
Description = "",
Description = "Grants a user comprehensive read-only access to all details associated with tasks within a project. This includes task descriptions, statuses, assignees, due dates, dependencies, progress, history, and any related attachments or discussions.",
FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
IsEnabled = true,
Name = "View Task"
@ -559,31 +559,31 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"),
Description = "",
Description = "This allows them to create new tasks, modify existing task attributes (description, status, assignee, due date, etc.),",
FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
IsEnabled = true,
Name = "Manage Task"
Name = "Add/Edit Task"
},
new
{
Id = new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"),
Description = "",
FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
Id = new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"),
Description = "Grants a user the ability to designate team members responsible for specific tasks and to update the completion status or provide progress updates for those tasks",
FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
IsEnabled = true,
Name = "Assign Task and Report Progress"
Name = "Assign/Report Progress"
},
new
{
Id = new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"),
Description = "",
FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
Id = new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"),
Description = "Grants a user the authority to officially confirm the completion or acceptance of a task, often signifying that it meets the required standards or criteria",
FeatureId = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
IsEnabled = true,
Name = "Approve Task"
},
new
{
Id = new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"),
Description = "",
Description = "Grants a user read-only access to details about the individuals within the system. This typically includes names, contact information, roles, departments, and potentially other relevant employee data",
FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
IsEnabled = true,
Name = "View Employee"
@ -591,23 +591,23 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("a97d366a-c2bb-448d-be93-402bd2324566"),
Description = "",
Description = "Grants a user the authority to create new employee profiles and modify existing employee details within the system. This typically includes adding or updating information such as names, contact details, roles, departments, skills, and potentially other personal or professional data",
FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
IsEnabled = true,
Name = "Manage Employee"
Name = "Add/Edit Employee"
},
new
{
Id = new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"),
Description = "",
Description = "Grants a user the authority to manage employee application roles, enabling them to assign or revoke access privileges within the system.",
FeatureId = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
IsEnabled = true,
Name = "Assign To Project"
Name = "Assign Roles"
},
new
{
Id = new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"),
Description = "",
Description = "Grants a user the ability to record their own work hours or presence within the system. This typically involves checking in and checking out, logging break times, and potentially viewing their own attendance history.",
FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"),
IsEnabled = true,
Name = "Perform Attendance "
@ -615,7 +615,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"),
Description = "",
Description = "Grants a user the authority to approve requests from employees to adjust or correct their recorded attendance. This typically involves reviewing the reason for the regularization, verifying any supporting documentation, and then officially accepting the changes to the employee's attendance records",
FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"),
IsEnabled = true,
Name = "Regularize Attendance"
@ -623,7 +623,7 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"),
Description = "",
Description = "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency",
FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"),
IsEnabled = true,
Name = "View Masters"
@ -631,26 +631,10 @@ namespace Marco.Pms.DataAccess.Migrations
new
{
Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"),
Description = "",
Description = "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories",
FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"),
IsEnabled = true,
Name = "Manage Masters"
},
new
{
Id = new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"),
Description = "",
FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"),
IsEnabled = true,
Name = "View Masters"
},
new
{
Id = new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"),
Description = "",
FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"),
IsEnabled = true,
Name = "Manage Masters"
});
});
@ -970,15 +954,7 @@ namespace Marco.Pms.DataAccess.Migrations
Description = "Manage Tasks",
IsActive = true,
ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
Name = "Manage Tasks"
},
new
{
Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
Description = "Assign and Update Tasks Progress",
IsActive = true,
ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"),
Name = "Assign and Update Tasks Progress"
Name = "Task Management"
},
new
{
@ -986,7 +962,7 @@ namespace Marco.Pms.DataAccess.Migrations
Description = "Manage Employee",
IsActive = true,
ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"),
Name = "Manage Employee"
Name = "Employee Management"
},
new
{
@ -1003,14 +979,6 @@ namespace Marco.Pms.DataAccess.Migrations
IsActive = true,
ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
Name = "Global Masters"
},
new
{
Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"),
Description = "Tenant Masters",
IsActive = true,
ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
Name = "Tenant Masters"
});
});

View File

@ -157,12 +157,12 @@ namespace Marco.Pms.Services.Controllers
var Employees = await _context.Employees.Where(e => e.TenantId == tenantId && e.IsActive == true).Select(e => e.Id).ToListAsync();
var checkedInEmployee = await _context.Attendes.Where(e => e.Date.Date == date).ToListAsync();
var checkedInEmployee = await _context.Attendes.Where(e => e.InTime != null ? e.InTime.Value.Date == date : false).Select(e => e.EmployeeID).ToListAsync();
TeamDashboardVM teamDashboardVM = new TeamDashboardVM
{
TotalEmployees = Employees.Count(),
InToday = checkedInEmployee.Count()
InToday = checkedInEmployee.Distinct().Count()
};
return Ok(ApiResponse<object>.SuccessResponse(teamDashboardVM, "Success", 200));
}