535 lines
22 KiB
C#
535 lines
22 KiB
C#
using Marco.Pms.Model.DocumentManager;
|
||
using Marco.Pms.Model.Forum;
|
||
using Marco.Pms.Model.Master;
|
||
|
||
namespace Marco.Pms.Services.Service
|
||
{
|
||
public class MasterDataService
|
||
{
|
||
public List<TicketStatusMaster> GetTicketStatusesData(Guid tenantId)
|
||
{
|
||
return new List<TicketStatusMaster>
|
||
{
|
||
new TicketStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "New",
|
||
Description = "This is a newly created issue.",
|
||
ColorCode = "#FFCC99",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Assigned",
|
||
Description = "Assigned to employee or team of employees",
|
||
ColorCode = "#E6FF99",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "In Progress",
|
||
Description = "These issues are currently in progress",
|
||
ColorCode = "#99E6FF",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "In Review",
|
||
Description = "These issues are currently under review",
|
||
ColorCode = "#8592a3",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Done",
|
||
Description = "The following issues are resolved and closed",
|
||
ColorCode = "#B399FF",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<TicketTypeMaster> GetTicketTypesData(Guid tenantId)
|
||
{
|
||
return new List<TicketTypeMaster>
|
||
{
|
||
new TicketTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Quality Issue",
|
||
Description = "An identified problem that affects the performance, reliability, or standards of a product or service",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Help Desk",
|
||
Description = "A support service that assists users with technical issues, requests, or inquiries.",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<TicketPriorityMaster> GetTicketPrioritysData(Guid tenantId)
|
||
{
|
||
return new List<TicketPriorityMaster>
|
||
{
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Low",
|
||
ColorCode = "008000",
|
||
Level = 1,
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Medium",
|
||
ColorCode = "FFFF00",
|
||
Level = 2,
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "High",
|
||
ColorCode = "#FFA500",
|
||
Level = 3,
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Critical",
|
||
ColorCode = "#FFA500",
|
||
Level = 4,
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketPriorityMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Urgent",
|
||
ColorCode = "#FF0000",
|
||
Level = 5,
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<TicketTagMaster> GetTicketTagsData(Guid tenantId)
|
||
{
|
||
return new List<TicketTagMaster>
|
||
{
|
||
new TicketTagMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Quality Issue",
|
||
ColorCode = "#e59866",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
},
|
||
new TicketTagMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Help Desk",
|
||
ColorCode = "#85c1e9",
|
||
IsDefault = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<WorkCategoryMaster> GetWorkCategoriesData(Guid tenantId)
|
||
{
|
||
return new List<WorkCategoryMaster>
|
||
{
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Fresh Work",
|
||
Description = "Created new task in a professional or creative context",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
},
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Rework",
|
||
Description = "Revising, modifying, or correcting a task to improve its quality or fix issues",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
},
|
||
new WorkCategoryMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Quality Issue",
|
||
Description = "Any defect, deviation, or non-conformance in a task that fails to meet established standards or customer expectations.",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<WorkStatusMaster> GetWorkStatusesData(Guid tenantId)
|
||
{
|
||
return new List<WorkStatusMaster>
|
||
{
|
||
new WorkStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Approve",
|
||
Description = "Confirm the tasks are actually finished as reported",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
},
|
||
new WorkStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Partially Approve",
|
||
Description = "Not all tasks are actually finished as reported",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
},
|
||
new WorkStatusMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "NCR",
|
||
Description = "Tasks are not finished as reported or have any issues in al the tasks",
|
||
IsSystem = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<ExpensesTypeMaster> GetExpensesTypeesData(Guid tenantId)
|
||
{
|
||
return new List<ExpensesTypeMaster>
|
||
{
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Procurement",
|
||
Description = "Materials, equipment and supplies purchased for site operations.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Transport",
|
||
Description = "Vehicle fuel, logistics services and delivery of goods or personnel.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = false,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Travelling",
|
||
Description = "Delivery of personnel.",
|
||
NoOfPersonsRequired = true,
|
||
IsActive = true,
|
||
IsAttachmentRequried = false,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Mobilization",
|
||
Description = "Site setup costs including equipment deployment and temporary infrastructure.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Employee Welfare",
|
||
Description = " Worker amenities like snacks, meals, safety gear, accommodation, medical support etc.",
|
||
NoOfPersonsRequired = true,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Maintenance & Utilities",
|
||
Description = "Machinery servicing, electricity, water, and temporary office needs.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Vendor/Supplier Payments",
|
||
Description = "Scheduled payments for external services or goods.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
},
|
||
new ExpensesTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Compliance & Safety",
|
||
Description = "Government fees, insurance, inspections and safety-related expenditures.",
|
||
NoOfPersonsRequired = false,
|
||
IsActive = true,
|
||
IsAttachmentRequried = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<PaymentModeMatser> GetPaymentModesData(Guid tenantId)
|
||
{
|
||
return new List<PaymentModeMatser>
|
||
{
|
||
new PaymentModeMatser
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Cash",
|
||
Description = "Physical currency; still used for small or informal transactions.",
|
||
IsActive = true,
|
||
TenantId = tenantId
|
||
},
|
||
new PaymentModeMatser
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Cheque",
|
||
Description = "Paper-based payment order; less common now due to processing delays and fraud risks.",
|
||
IsActive = true,
|
||
TenantId = tenantId
|
||
},
|
||
new PaymentModeMatser
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "NetBanking",
|
||
Description = "Online banking portals used to transfer funds directly between accounts",
|
||
IsActive = true,
|
||
TenantId = tenantId
|
||
},
|
||
new PaymentModeMatser
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "UPI",
|
||
Description = "Real-time bank-to-bank transfer using mobile apps; widely used for peer-to-peer and merchant payments.",
|
||
IsActive = true,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<DocumentCategoryMaster> GetDocumentCategoryData(Guid tenantId)
|
||
{
|
||
return new List<DocumentCategoryMaster> {
|
||
new DocumentCategoryMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Project Documents",
|
||
Description = "Project documents are formal records that outline the plans, progress, and details necessary to execute and manage a project effectively.",
|
||
EntityTypeId = Guid.Parse("c8fe7115-aa27-43bc-99f4-7b05fabe436e"),
|
||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentCategoryMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Employee Documents",
|
||
Description = "Employment details along with legal IDs like passports or driver’s licenses to verify identity and work authorization.",
|
||
EntityTypeId = Guid.Parse("dbb9555a-7a0c-40f2-a9ed-f0463f1ceed7"),
|
||
CreatedAt = new DateTime(2025, 9, 15, 12, 42, 3, 202, DateTimeKind.Utc),
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<DocumentTypeMaster> GetDocumentTypeData(Guid tenantId, Guid employeeDocumentId, Guid projectDocumentId)
|
||
{
|
||
return new List<DocumentTypeMaster> {
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Aadhaar card",
|
||
RegexExpression = "^[2-9][0-9]{11}$",
|
||
AllowedContentType = "application/pdf,image/jpeg",
|
||
MaxSizeAllowedInMB = 2,
|
||
IsValidationRequired = true,
|
||
IsMandatory = true,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = employeeDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Pan Card",
|
||
RegexExpression = "^[A-Z]{5}[0-9]{4}[A-Z]{1}$",
|
||
AllowedContentType = "application/pdf,image/jpeg",
|
||
MaxSizeAllowedInMB = 2,
|
||
IsValidationRequired = true,
|
||
IsMandatory = true,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = employeeDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Voter Card",
|
||
RegexExpression = "^[A-Z]{3}[0-9]{7}$",
|
||
AllowedContentType = "application/pdf,image/jpeg",
|
||
MaxSizeAllowedInMB = 2,
|
||
IsValidationRequired = true,
|
||
IsMandatory = true,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = employeeDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Passport",
|
||
RegexExpression = "^[A-PR-WY][1-9]\\d\\s?\\d{4}[1-9]$",
|
||
AllowedContentType = "application/pdf,image/jpeg",
|
||
MaxSizeAllowedInMB = 2,
|
||
IsValidationRequired = true,
|
||
IsMandatory = true,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = employeeDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Bank Passbook",
|
||
RegexExpression = "^\\d{9,18}$",
|
||
AllowedContentType = "application/pdf,image/jpeg",
|
||
MaxSizeAllowedInMB = 2,
|
||
IsValidationRequired = true,
|
||
IsMandatory = true,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = employeeDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Bill of Quantities (BOQ)",
|
||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||
MaxSizeAllowedInMB = 1,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Work Order",
|
||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||
MaxSizeAllowedInMB = 1,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Letter of Agreement",
|
||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||
MaxSizeAllowedInMB = 1,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Health and Safety Document",
|
||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||
MaxSizeAllowedInMB = 1,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Standard Operating Procedure (SOP)",
|
||
AllowedContentType = "application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||
MaxSizeAllowedInMB = 1,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
},
|
||
new DocumentTypeMaster
|
||
{
|
||
Id = Guid.NewGuid(),
|
||
Name = "Drawings",
|
||
AllowedContentType = "application/pdf,image/vnd.dwg,application/acad",
|
||
MaxSizeAllowedInMB = 20,
|
||
IsValidationRequired = false,
|
||
IsMandatory = false,
|
||
CreatedAt = new DateTime(2025, 9, 3, 10, 46, 49, 955, DateTimeKind.Utc),
|
||
IsSystem = true,
|
||
IsActive = true,
|
||
DocumentCategoryId = projectDocumentId,
|
||
TenantId = tenantId
|
||
}
|
||
};
|
||
}
|
||
public List<object> GetData(Guid tenantId)
|
||
{
|
||
return new List<object>
|
||
{
|
||
};
|
||
}
|
||
}
|
||
}
|