Correct Typo of OrganizationSize and OrganizationName
This commit is contained in:
parent
8210e250a1
commit
3915e9b9d0
@ -10,6 +10,7 @@ using Marco.Pms.Model.Mail;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Roles;
|
||||
using Marco.Pms.Model.TenantModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
@ -130,7 +131,7 @@ namespace Marco.Pms.DataAccess.Data
|
||||
new Tenant
|
||||
{
|
||||
Id = Guid.Parse("b3466e83-7e11-464c-b93a-daf047838b26"),
|
||||
OragnizationSize = "100-200",
|
||||
OrganizationSize = "100-200",
|
||||
Email = "admin@marcoaiot.com",
|
||||
Name = "MarcoBMS",
|
||||
ContactName = "Admin",
|
||||
|
3550
Marco.Pms.DataAccess/Migrations/20250801111158_Fixed_Spelling_Mistake_In_Tenant_Table.Designer.cs
generated
Normal file
3550
Marco.Pms.DataAccess/Migrations/20250801111158_Fixed_Spelling_Mistake_In_Tenant_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Fixed_Spelling_Mistake_In_Tenant_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OragnizationSize",
|
||||
table: "Tenants",
|
||||
newName: "OrganizationSize");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "OrganizationSize",
|
||||
table: "Tenants",
|
||||
newName: "OragnizationSize");
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -10,11 +10,11 @@
|
||||
public required string BillingAddress { get; set; }
|
||||
public string? TaxId { get; set; }
|
||||
public string? logoImage { get; set; }
|
||||
public required string OragnizationName { get; set; }
|
||||
public required string OrganizationName { get; set; }
|
||||
public string? OfficeNumber { get; set; }
|
||||
public required string ContactNumber { get; set; }
|
||||
public required DateTime OnBoardingDate { get; set; }
|
||||
public required string OragnizationSize { get; set; }
|
||||
public required string OrganizationSize { get; set; }
|
||||
public required Guid IndustryId { get; set; }
|
||||
public required string Reference { get; set; }
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Entitlements
|
||||
namespace Marco.Pms.Model.TenantModel
|
||||
{
|
||||
public class Tenant
|
||||
{
|
||||
@ -18,7 +18,7 @@ namespace Marco.Pms.Model.Entitlements
|
||||
public string? TaxId { get; set; }
|
||||
public string? logoImage { get; set; } // Base64
|
||||
public DateTime OnBoardingDate { get; set; }
|
||||
public string? OragnizationSize { get; set; }
|
||||
public string? OrganizationSize { get; set; }
|
||||
public Guid? IndustryId { get; set; }
|
||||
|
||||
[ForeignKey("IndustryId")]
|
@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.TenantModel;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marco.Pms.Model.Utilities
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.Roles;
|
||||
using Marco.Pms.Model.TenantModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Tenant;
|
||||
@ -211,7 +212,7 @@ namespace Marco.Pms.Services.Controllers
|
||||
var _emailSender = scope.ServiceProvider.GetRequiredService<IEmailSender>();
|
||||
var _permissionService = scope.ServiceProvider.GetRequiredService<PermissionServices>();
|
||||
|
||||
_logger.LogInfo("Attempting to create a new tenant with organization name: {OrganizationName}", model.OragnizationName);
|
||||
_logger.LogInfo("Attempting to create a new tenant with organization name: {OrganizationName}", model.OrganizationName);
|
||||
|
||||
// 1. --- PERMISSION CHECK ---
|
||||
var loggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
|
||||
@ -314,7 +315,7 @@ namespace Marco.Pms.Services.Controllers
|
||||
// If user creation fails, roll back the transaction immediately and return the errors.
|
||||
await transaction.RollbackAsync();
|
||||
var errors = result.Errors.Select(e => e.Description).ToList();
|
||||
_logger.LogWarning("Failed to create ApplicationUser for tenant {TenantName}. Errors: {Errors}", model.OragnizationName, string.Join(", ", errors));
|
||||
_logger.LogWarning("Failed to create ApplicationUser for tenant {TenantName}. Errors: {Errors}", model.OrganizationName, string.Join(", ", errors));
|
||||
return BadRequest(ApiResponse<object>.ErrorResponse("Failed to create user", errors, 400));
|
||||
}
|
||||
|
||||
@ -385,7 +386,7 @@ namespace Marco.Pms.Services.Controllers
|
||||
// Create a default project for the new tenant
|
||||
var project = new Project
|
||||
{
|
||||
Name = $"{model.OragnizationName} - Default Project",
|
||||
Name = $"{model.OrganizationName} - Default Project",
|
||||
ProjectStatusId = Guid.Parse("b74da4c2-d07e-46f2-9919-e75e49b12731"), // Consider using a constant for this GUID
|
||||
ProjectAddress = model.BillingAddress,
|
||||
ContactPerson = tenant.ContactName,
|
||||
|
@ -2,10 +2,10 @@ using AutoMapper;
|
||||
using Marco.Pms.Model.Dtos.Project;
|
||||
using Marco.Pms.Model.Dtos.Tenant;
|
||||
using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.Master;
|
||||
using Marco.Pms.Model.MongoDBModels;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.TenantModel;
|
||||
using Marco.Pms.Model.ViewModels.Activities;
|
||||
using Marco.Pms.Model.ViewModels.Employee;
|
||||
using Marco.Pms.Model.ViewModels.Projects;
|
||||
@ -27,7 +27,7 @@ namespace Marco.Pms.Services.MappingProfiles
|
||||
)
|
||||
.ForMember(
|
||||
dest => dest.Name,
|
||||
opt => opt.MapFrom(src => src.OragnizationName)
|
||||
opt => opt.MapFrom(src => src.OrganizationName)
|
||||
);
|
||||
#endregion
|
||||
|
||||
|
@ -7,6 +7,7 @@ using Marco.Pms.Model.Employees;
|
||||
using Marco.Pms.Model.Entitlements;
|
||||
using Marco.Pms.Model.MongoDBModels;
|
||||
using Marco.Pms.Model.Projects;
|
||||
using Marco.Pms.Model.TenantModel;
|
||||
using Marco.Pms.Model.Utilities;
|
||||
using Marco.Pms.Model.ViewModels.Employee;
|
||||
using Marco.Pms.Model.ViewModels.Projects;
|
||||
|
Loading…
x
Reference in New Issue
Block a user