Document_Manager #129

Merged
ashutosh.nehete merged 83 commits from Document_Manager into main 2025-09-11 04:12:01 +00:00
Showing only changes of commit c27b2a2ff1 - Show all commits

View File

@ -1371,7 +1371,11 @@ namespace Marco.Pms.Services.Service
_logger.LogWarning("Employee {EmployeeId} tries to {Action} Document Type, but not found in database", loggedInEmployee.Id, action); _logger.LogWarning("Employee {EmployeeId} tries to {Action} Document Type, but not found in database", loggedInEmployee.Id, action);
return ApiResponse<object>.ErrorResponse("Document Type not found", "Document Type not found", 404); return ApiResponse<object>.ErrorResponse("Document Type not found", "Document Type not found", 404);
} }
if (documentType.IsSystem)
{
_logger.LogWarning("Employee {EmployeeId} tries to {Action} Document Type, but could not take action on system defined entity", loggedInEmployee.Id, action);
return ApiResponse<object>.ErrorResponse($"Document is system defined cannot be {action}d", $"Document is system defined cannot be {action}d", 400);
}
// Mapping DocumentTypeMatser to BsonDocument // Mapping DocumentTypeMatser to BsonDocument
var existingEntityBson = _updateLogHelper.EntityToBsonDocument(documentType); var existingEntityBson = _updateLogHelper.EntityToBsonDocument(documentType);