diff --git a/FMS.Domain/Dto/Facility/FacilityCreateDto.cs b/FMS.Domain/Dto/Facility/FacilityCreateDto.cs index c282ced5..f79f7d0b 100644 --- a/FMS.Domain/Dto/Facility/FacilityCreateDto.cs +++ b/FMS.Domain/Dto/Facility/FacilityCreateDto.cs @@ -107,9 +107,6 @@ public class FacilityCreateDto [Display(Name = "Historical C.O.")] public string HistoricalComplianceOfficer { get; set; } - [Display(Name = "Tax ID")] - public string TaxId { get; set; } - [Display(Name = "Has Electronic Records")] public bool HasERecord { get; set; } @@ -124,7 +121,6 @@ public void TrimAll() PostalCode = PostalCode?.Trim(); HSInumber = HSInumber?.Trim(); HistoricalUnit = HistoricalUnit?.Trim(); - TaxId = TaxId?.Trim(); } } } \ No newline at end of file diff --git a/FMS.Domain/Dto/Facility/FacilityDetailDto.cs b/FMS.Domain/Dto/Facility/FacilityDetailDto.cs index 7a66bbda..feb1b873 100644 --- a/FMS.Domain/Dto/Facility/FacilityDetailDto.cs +++ b/FMS.Domain/Dto/Facility/FacilityDetailDto.cs @@ -43,9 +43,7 @@ public FacilityDetailDto(Facility facility) VRPReferral = facility.VRPReferral; RNDateReceived = facility.RNDateReceived; HistoricalUnit = facility.HistoricalUnit; - HistoricalComplianceOfficer = facility.HistoricalComplianceOfficer; - TaxId = facility.TaxId; - // *** End release Notification Only Properties + HistoricalComplianceOfficer = facility.HistoricalComplianceOfficer; IsRetained = facility.IsRetained; Cabinets = new List(); RetentionRecords = facility.RetentionRecords? @@ -144,11 +142,6 @@ public FacilityDetailDto(Facility facility) [Display(Name = "Historical C.O.")] public string HistoricalComplianceOfficer { get; set; } - [Display(Name = "Tax ID")] - public string TaxId { get; set; } - - // End release notification Only Properties - [Display(Name = "Has Electronic Records")] public bool HasERecord { get; set; } diff --git a/FMS.Domain/Dto/Facility/FacilityEditDto.cs b/FMS.Domain/Dto/Facility/FacilityEditDto.cs index 8ad74d30..6cc6505f 100644 --- a/FMS.Domain/Dto/Facility/FacilityEditDto.cs +++ b/FMS.Domain/Dto/Facility/FacilityEditDto.cs @@ -38,7 +38,6 @@ public FacilityEditDto(FacilityDetailDto facility) RNDateReceived = facility.RNDateReceived; HistoricalUnit = facility.HistoricalUnit; HistoricalComplianceOfficer = facility.HistoricalComplianceOfficer; - TaxId = facility.TaxId; HasERecord = facility.HasERecord; IsRetained = facility.IsRetained; } @@ -151,9 +150,6 @@ public FacilityEditDto(FacilityDetailDto facility) [Display(Name = "Historical Compliance Officer")] public string HistoricalComplianceOfficer { get; set; } - [Display(Name = "Tax ID")] - public string TaxId { get; set; } - [Display(Name = "Has Electronic Records")] public bool HasERecord { get; set; } @@ -168,7 +164,6 @@ public void TrimAll() PostalCode = PostalCode?.Trim(); HSInumber = HSInumber?.Trim(); HistoricalUnit = HistoricalUnit?.Trim(); - TaxId = TaxId?.Trim(); } } } \ No newline at end of file diff --git a/FMS.Domain/Dto/Facility/FacilitySpec.cs b/FMS.Domain/Dto/Facility/FacilitySpec.cs index e7e8f04c..b960cb52 100644 --- a/FMS.Domain/Dto/Facility/FacilitySpec.cs +++ b/FMS.Domain/Dto/Facility/FacilitySpec.cs @@ -92,9 +92,6 @@ public class FacilitySpec [Display(Name = "Historical C.O.")] public string HistoricalComplianceOfficer { get; set; } - [Display(Name = "Tax ID")] - public string TaxId { get; set; } - [Display(Name = "Has Electronic Records")] public bool HasERecord { get; set; } diff --git a/FMS.Domain/Entities/Facility.cs b/FMS.Domain/Entities/Facility.cs index a5e1965e..1efa1aad 100644 --- a/FMS.Domain/Entities/Facility.cs +++ b/FMS.Domain/Entities/Facility.cs @@ -42,7 +42,6 @@ public Facility(FacilityCreateDto newFacility) RNDateReceived = newFacility.RNDateReceived; HistoricalUnit = newFacility.HistoricalUnit; HistoricalComplianceOfficer = newFacility.HistoricalComplianceOfficer; - TaxId = newFacility.TaxId; } // Existing ID for Facility May be used by Programs - System Generated, but not a Guid @@ -130,8 +129,6 @@ public Facility(FacilityCreateDto newFacility) public string HistoricalComplianceOfficer { get; set; } - public string TaxId { get; set; } - // List of retention records for this Facility public ICollection RetentionRecords { get; set; } } diff --git a/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.Designer.cs b/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.Designer.cs new file mode 100644 index 00000000..cf6f0103 --- /dev/null +++ b/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.Designer.cs @@ -0,0 +1,1698 @@ +// +using System; +using FMS.Infrastructure.Contexts; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace FMS.Infrastructure.Migrations +{ + [DbContext(typeof(FmsDbContext))] + [Migration("20240205165242_RemoveTaxIDField")] + partial class RemoveTaxIDField + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("FMS.Domain.Entities.BudgetCode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("Code") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("ProjectNumber") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("BudgetCodes"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.Cabinet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("FirstFileLabel") + .HasMaxLength(9) + .HasColumnType("nvarchar(9)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique() + .HasFilter("[Name] IS NOT NULL"); + + b.ToTable("Cabinets"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.ComplianceOfficer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("FamilyName") + .HasColumnType("nvarchar(max)"); + + b.Property("GivenName") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("ComplianceOfficers"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.County", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Counties"); + + b.HasData( + new + { + Id = 131, + Name = "Appling" + }, + new + { + Id = 122, + Name = "Atkinson" + }, + new + { + Id = 110, + Name = "Bacon" + }, + new + { + Id = 105, + Name = "Baker" + }, + new + { + Id = 213, + Name = "Baldwin" + }, + new + { + Id = 179, + Name = "Banks" + }, + new + { + Id = 217, + Name = "Barrow" + }, + new + { + Id = 249, + Name = "Bartow" + }, + new + { + Id = 211, + Name = "Ben Hill" + }, + new + { + Id = 194, + Name = "Berrien" + }, + new + { + Id = 259, + Name = "Bibb" + }, + new + { + Id = 145, + Name = "Bleckley" + }, + new + { + Id = 108, + Name = "Brantley" + }, + new + { + Id = 158, + Name = "Brooks" + }, + new + { + Id = 111, + Name = "Bryan" + }, + new + { + Id = 159, + Name = "Bulloch" + }, + new + { + Id = 203, + Name = "Burke" + }, + new + { + Id = 188, + Name = "Butts" + }, + new + { + Id = 112, + Name = "Calhoun" + }, + new + { + Id = 169, + Name = "Camden" + }, + new + { + Id = 113, + Name = "Candler" + }, + new + { + Id = 241, + Name = "Carroll" + }, + new + { + Id = 225, + Name = "Catoosa" + }, + new + { + Id = 114, + Name = "Charlton" + }, + new + { + Id = 242, + Name = "Chatham" + }, + new + { + Id = 137, + Name = "Chattahoochee" + }, + new + { + Id = 174, + Name = "Chattooga" + }, + new + { + Id = 243, + Name = "Cherokee" + }, + new + { + Id = 252, + Name = "Clarke" + }, + new + { + Id = 104, + Name = "Clay" + }, + new + { + Id = 204, + Name = "Clayton" + }, + new + { + Id = 178, + Name = "Clinch" + }, + new + { + Id = 245, + Name = "Cobb" + }, + new + { + Id = 146, + Name = "Coffee" + }, + new + { + Id = 227, + Name = "Colquitt" + }, + new + { + Id = 232, + Name = "Columbia" + }, + new + { + Id = 212, + Name = "Cook" + }, + new + { + Id = 250, + Name = "Coweta" + }, + new + { + Id = 115, + Name = "Crawford" + }, + new + { + Id = 220, + Name = "Crisp" + }, + new + { + Id = 170, + Name = "Dade" + }, + new + { + Id = 180, + Name = "Dawson" + }, + new + { + Id = 244, + Name = "Decatur" + }, + new + { + Id = 218, + Name = "DeKalb" + }, + new + { + Id = 175, + Name = "Dodge" + }, + new + { + Id = 189, + Name = "Dooly" + }, + new + { + Id = 257, + Name = "Dougherty" + }, + new + { + Id = 253, + Name = "Douglas" + }, + new + { + Id = 195, + Name = "Early" + }, + new + { + Id = 103, + Name = "Echols" + }, + new + { + Id = 123, + Name = "Effingham" + }, + new + { + Id = 200, + Name = "Elbert" + }, + new + { + Id = 198, + Name = "Emanuel" + }, + new + { + Id = 109, + Name = "Evans" + }, + new + { + Id = 176, + Name = "Fannin" + }, + new + { + Id = 235, + Name = "Fayette" + }, + new + { + Id = 246, + Name = "Floyd" + }, + new + { + Id = 238, + Name = "Forsyth" + }, + new + { + Id = 201, + Name = "Franklin" + }, + new + { + Id = 261, + Name = "Fulton" + }, + new + { + Id = 165, + Name = "Gilmer" + }, + new + { + Id = 124, + Name = "Glascock" + }, + new + { + Id = 216, + Name = "Glynn" + }, + new + { + Id = 230, + Name = "Gordon" + }, + new + { + Id = 208, + Name = "Grady" + }, + new + { + Id = 171, + Name = "Greene" + }, + new + { + Id = 226, + Name = "Gwinnett" + }, + new + { + Id = 214, + Name = "Habersham" + }, + new + { + Id = 256, + Name = "Hall" + }, + new + { + Id = 107, + Name = "Hancock" + }, + new + { + Id = 209, + Name = "Haralson" + }, + new + { + Id = 138, + Name = "Harris" + }, + new + { + Id = 190, + Name = "Hart" + }, + new + { + Id = 152, + Name = "Heard" + }, + new + { + Id = 248, + Name = "Henry" + }, + new + { + Id = 239, + Name = "Houston" + }, + new + { + Id = 139, + Name = "Irwin" + }, + new + { + Id = 222, + Name = "Jackson" + }, + new + { + Id = 147, + Name = "Jasper" + }, + new + { + Id = 160, + Name = "Jeff Davis" + }, + new + { + Id = 199, + Name = "Jefferson" + }, + new + { + Id = 153, + Name = "Jenkins" + }, + new + { + Id = 140, + Name = "Johnson" + }, + new + { + Id = 161, + Name = "Jones" + }, + new + { + Id = 181, + Name = "Lamar" + }, + new + { + Id = 141, + Name = "Lanier" + }, + new + { + Id = 223, + Name = "Laurens" + }, + new + { + Id = 172, + Name = "Lee" + }, + new + { + Id = 148, + Name = "Liberty" + }, + new + { + Id = 125, + Name = "Lincoln" + }, + new + { + Id = 102, + Name = "Long" + }, + new + { + Id = 254, + Name = "Lowndes" + }, + new + { + Id = 192, + Name = "Lumpkin" + }, + new + { + Id = 182, + Name = "Macon" + }, + new + { + Id = 166, + Name = "Madison" + }, + new + { + Id = 133, + Name = "Marion" + }, + new + { + Id = 210, + Name = "McDuffie" + }, + new + { + Id = 126, + Name = "McIntosh" + }, + new + { + Id = 196, + Name = "Meriwether" + }, + new + { + Id = 154, + Name = "Miller" + }, + new + { + Id = 215, + Name = "Mitchell" + }, + new + { + Id = 184, + Name = "Monroe" + }, + new + { + Id = 134, + Name = "Montgomery" + }, + new + { + Id = 197, + Name = "Morgan" + }, + new + { + Id = 205, + Name = "Murray" + }, + new + { + Id = 258, + Name = "Muscogee" + }, + new + { + Id = 231, + Name = "Newton" + }, + new + { + Id = 191, + Name = "Oconee" + }, + new + { + Id = 127, + Name = "Oglethorpe" + }, + new + { + Id = 219, + Name = "Paulding" + }, + new + { + Id = 221, + Name = "Peach" + }, + new + { + Id = 185, + Name = "Pickens" + }, + new + { + Id = 116, + Name = "Pierce" + }, + new + { + Id = 149, + Name = "Pike" + }, + new + { + Id = 233, + Name = "Polk" + }, + new + { + Id = 155, + Name = "Pulaski" + }, + new + { + Id = 183, + Name = "Putnam" + }, + new + { + Id = 100, + Name = "Quitman" + }, + new + { + Id = 167, + Name = "Rabun" + }, + new + { + Id = 156, + Name = "Randolph" + }, + new + { + Id = 260, + Name = "Richmond" + }, + new + { + Id = 251, + Name = "Rockdale" + }, + new + { + Id = 135, + Name = "Schley" + }, + new + { + Id = 157, + Name = "Screven" + }, + new + { + Id = 150, + Name = "Seminole" + }, + new + { + Id = 240, + Name = "Spalding" + }, + new + { + Id = 229, + Name = "Stephens" + }, + new + { + Id = 117, + Name = "Stewart" + }, + new + { + Id = 236, + Name = "Sumter" + }, + new + { + Id = 128, + Name = "Talbot" + }, + new + { + Id = 118, + Name = "Taliaferro" + }, + new + { + Id = 136, + Name = "Tattnall" + }, + new + { + Id = 142, + Name = "Taylor" + }, + new + { + Id = 164, + Name = "Telfair" + }, + new + { + Id = 173, + Name = "Terrell" + }, + new + { + Id = 234, + Name = "Thomas" + }, + new + { + Id = 237, + Name = "Tift" + }, + new + { + Id = 151, + Name = "Toombs" + }, + new + { + Id = 129, + Name = "Towns" + }, + new + { + Id = 101, + Name = "Treutlen" + }, + new + { + Id = 247, + Name = "Troup" + }, + new + { + Id = 186, + Name = "Turner" + }, + new + { + Id = 130, + Name = "Twiggs" + }, + new + { + Id = 168, + Name = "Union" + }, + new + { + Id = 202, + Name = "Upson" + }, + new + { + Id = 224, + Name = "Walker" + }, + new + { + Id = 228, + Name = "Walton" + }, + new + { + Id = 177, + Name = "Ware" + }, + new + { + Id = 162, + Name = "Warren" + }, + new + { + Id = 206, + Name = "Washington" + }, + new + { + Id = 143, + Name = "Wayne" + }, + new + { + Id = 120, + Name = "Webster" + }, + new + { + Id = 106, + Name = "Wheeler" + }, + new + { + Id = 193, + Name = "White" + }, + new + { + Id = 255, + Name = "Whitfield" + }, + new + { + Id = 144, + Name = "Wilcox" + }, + new + { + Id = 163, + Name = "Wilkes" + }, + new + { + Id = 207, + Name = "Wilkinson" + }, + new + { + Id = 187, + Name = "Worth" + }, + new + { + Id = 99, + Name = "OUT OF STATE" + }); + }); + + modelBuilder.Entity("FMS.Domain.Entities.Facility", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("AdditionalDataRequested") + .HasColumnType("bit"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("BudgetCodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("City") + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Comments") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("ComplianceOfficerId") + .HasColumnType("uniqueidentifier"); + + b.Property("CountyId") + .HasColumnType("int"); + + b.Property("DeferredOnSiteScoring") + .HasColumnType("bit"); + + b.Property("DeterminationLetterDate") + .HasColumnType("date"); + + b.Property("FacilityNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("FacilityStatusId") + .HasColumnType("uniqueidentifier"); + + b.Property("FacilityTypeId") + .HasColumnType("uniqueidentifier"); + + b.Property("FileId") + .HasColumnType("uniqueidentifier"); + + b.Property("HSInumber") + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b.Property("HasERecord") + .HasColumnType("bit"); + + b.Property("HistoricalComplianceOfficer") + .HasColumnType("nvarchar(max)"); + + b.Property("HistoricalUnit") + .HasColumnType("nvarchar(max)"); + + b.Property("ImageChecked") + .HasColumnType("bit"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("IsRetained") + .HasColumnType("bit"); + + b.Property("Latitude") + .HasColumnType("decimal(8, 6)"); + + b.Property("Location") + .HasColumnType("nvarchar(max)"); + + b.Property("Longitude") + .HasColumnType("decimal(9, 6)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationalUnitId") + .HasColumnType("uniqueidentifier"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("PreRQSMcleanup") + .HasColumnType("bit"); + + b.Property("RNDateReceived") + .HasColumnType("date"); + + b.Property("State") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.Property("VRPReferral") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("BudgetCodeId"); + + b.HasIndex("ComplianceOfficerId"); + + b.HasIndex("CountyId"); + + b.HasIndex("FacilityStatusId"); + + b.HasIndex("FacilityTypeId"); + + b.HasIndex("FileId"); + + b.HasIndex("OrganizationalUnitId"); + + b.ToTable("Facilities"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.FacilityStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FacilityStatuses"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.FacilityType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique() + .HasFilter("[Name] IS NOT NULL"); + + b.ToTable("FacilityTypes"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.File", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("FileLabel") + .HasMaxLength(9) + .HasColumnType("nvarchar(9)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("FileLabel") + .IsUnique() + .HasFilter("[FileLabel] IS NOT NULL"); + + b.ToTable("Files"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.OrganizationalUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("OrganizationalUnits"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.RetentionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Active") + .HasColumnType("bit"); + + b.Property("BoxNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ConsignmentNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("EndYear") + .HasColumnType("int"); + + b.Property("FacilityId") + .HasColumnType("uniqueidentifier"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("RetentionSchedule") + .HasColumnType("nvarchar(max)"); + + b.Property("ShelfNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("StartYear") + .HasColumnType("int"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("FacilityId"); + + b.ToTable("RetentionRecords"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.Users.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("FamilyName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("GivenName") + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("ObjectId") + .HasColumnType("nvarchar(max)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AppUsers", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AppRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AppRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AppUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AppUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("RoleId") + .HasColumnType("uniqueidentifier"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AppUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uniqueidentifier"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("InsertDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("InsertUser") + .HasColumnType("nvarchar(max)"); + + b.Property("UpdateDateTime") + .HasColumnType("datetimeoffset"); + + b.Property("UpdateUser") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AppUserTokens", (string)null); + }); + + modelBuilder.Entity("FMS.Domain.Entities.Facility", b => + { + b.HasOne("FMS.Domain.Entities.BudgetCode", "BudgetCode") + .WithMany() + .HasForeignKey("BudgetCodeId"); + + b.HasOne("FMS.Domain.Entities.ComplianceOfficer", "ComplianceOfficer") + .WithMany() + .HasForeignKey("ComplianceOfficerId"); + + b.HasOne("FMS.Domain.Entities.County", "County") + .WithMany() + .HasForeignKey("CountyId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("FMS.Domain.Entities.FacilityStatus", "FacilityStatus") + .WithMany() + .HasForeignKey("FacilityStatusId"); + + b.HasOne("FMS.Domain.Entities.FacilityType", "FacilityType") + .WithMany() + .HasForeignKey("FacilityTypeId"); + + b.HasOne("FMS.Domain.Entities.File", "File") + .WithMany("Facilities") + .HasForeignKey("FileId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("FMS.Domain.Entities.OrganizationalUnit", "OrganizationalUnit") + .WithMany() + .HasForeignKey("OrganizationalUnitId"); + + b.Navigation("BudgetCode"); + + b.Navigation("ComplianceOfficer"); + + b.Navigation("County"); + + b.Navigation("FacilityStatus"); + + b.Navigation("FacilityType"); + + b.Navigation("File"); + + b.Navigation("OrganizationalUnit"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.RetentionRecord", b => + { + b.HasOne("FMS.Domain.Entities.Facility", "Facility") + .WithMany("RetentionRecords") + .HasForeignKey("FacilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Facility"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("FMS.Domain.Entities.Users.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("FMS.Domain.Entities.Users.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("FMS.Domain.Entities.Users.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("FMS.Domain.Entities.Users.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("FMS.Domain.Entities.Facility", b => + { + b.Navigation("RetentionRecords"); + }); + + modelBuilder.Entity("FMS.Domain.Entities.File", b => + { + b.Navigation("Facilities"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.cs b/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.cs new file mode 100644 index 00000000..e55714c1 --- /dev/null +++ b/FMS.Infrastructure/Migrations/20240205165242_RemoveTaxIDField.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace FMS.Infrastructure.Migrations +{ + /// + public partial class RemoveTaxIDField : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TaxId", + table: "Facilities"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TaxId", + table: "Facilities", + type: "nvarchar(max)", + nullable: true); + } + } +} diff --git a/FMS.Infrastructure/Migrations/FmsDbContextModelSnapshot.cs b/FMS.Infrastructure/Migrations/FmsDbContextModelSnapshot.cs index 92d3241f..4a4bb3c1 100644 --- a/FMS.Infrastructure/Migrations/FmsDbContextModelSnapshot.cs +++ b/FMS.Infrastructure/Migrations/FmsDbContextModelSnapshot.cs @@ -1071,9 +1071,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasMaxLength(20) .HasColumnType("nvarchar(20)"); - b.Property("TaxId") - .HasColumnType("nvarchar(max)"); - b.Property("UpdateDateTime") .HasColumnType("datetimeoffset"); diff --git a/FMS.Infrastructure/Repositories/FacilityRepository.cs b/FMS.Infrastructure/Repositories/FacilityRepository.cs index 90189ce2..6cb77060 100644 --- a/FMS.Infrastructure/Repositories/FacilityRepository.cs +++ b/FMS.Infrastructure/Repositories/FacilityRepository.cs @@ -308,7 +308,6 @@ private async Task UpdateFacilityInternalAsync(Guid id, FacilityEditDto facility facility.RNDateReceived = facilityUpdates.RNDateReceived; facility.HistoricalUnit = facilityUpdates.HistoricalUnit; facility.HistoricalComplianceOfficer = facilityUpdates.HistoricalComplianceOfficer; - facility.TaxId = facilityUpdates.TaxId; // ****************** facility.IsRetained = facilityUpdates.IsRetained; diff --git a/FMS/Helpers/FacilityDetailDtoScalar.cs b/FMS/Helpers/FacilityDetailDtoScalar.cs index 19ae007e..6678ce1c 100644 --- a/FMS/Helpers/FacilityDetailDtoScalar.cs +++ b/FMS/Helpers/FacilityDetailDtoScalar.cs @@ -36,7 +36,6 @@ public FacilityDetailDtoScalar(FacilityDetailDto facility) RNDateReceived = facility.RNDateReceived; HistoricalUnit = facility.HistoricalUnit; HistoricalComplianceOfficer = facility.HistoricalComplianceOfficer; - TaxId = facility.TaxId; HasERecord = facility.HasERecord; IsRetained = facility.IsRetained; Cabinets = facility.CabinetsToString; @@ -130,9 +129,6 @@ public FacilityDetailDtoScalar(FacilityDetailDto facility) [XLColumn(Header = "Historical C.O.")] public string HistoricalComplianceOfficer { get; set; } - [XLColumn(Header = "Tax ID")] - public string TaxId { get; set; } - [XLColumn(Header = "Has Electronic Records")] public bool HasERecord { get; set; } diff --git a/FMS/Pages/Facilities/Add.cshtml b/FMS/Pages/Facilities/Add.cshtml index 782676ea..0ff7741c 100644 --- a/FMS/Pages/Facilities/Add.cshtml +++ b/FMS/Pages/Facilities/Add.cshtml @@ -191,10 +191,6 @@ -
- - -
@@ -302,7 +298,6 @@ -
} diff --git a/FMS/Pages/Facilities/Delete.cshtml b/FMS/Pages/Facilities/Delete.cshtml index 20994eb7..47e45b1b 100644 --- a/FMS/Pages/Facilities/Delete.cshtml +++ b/FMS/Pages/Facilities/Delete.cshtml @@ -167,12 +167,6 @@
@Html.DisplayFor(model => model.FacilityDetail.HistoricalComplianceOfficer)
-
- @Html.DisplayNameFor(model => model.FacilityDetail.TaxId) -
-
- @Html.DisplayFor(model => model.FacilityDetail.TaxId) -
} diff --git a/FMS/Pages/Facilities/Details.cshtml b/FMS/Pages/Facilities/Details.cshtml index 1d9b2555..b17217c9 100644 --- a/FMS/Pages/Facilities/Details.cshtml +++ b/FMS/Pages/Facilities/Details.cshtml @@ -193,12 +193,6 @@
@Html.DisplayFor(model => model.FacilityDetail.HistoricalComplianceOfficer)
-
- @Html.DisplayNameFor(model => model.FacilityDetail.TaxId) -
-
- @Html.DisplayFor(model => model.FacilityDetail.TaxId) -
} diff --git a/FMS/Pages/Facilities/Edit.cshtml b/FMS/Pages/Facilities/Edit.cshtml index b215091a..7c86ff59 100644 --- a/FMS/Pages/Facilities/Edit.cshtml +++ b/FMS/Pages/Facilities/Edit.cshtml @@ -191,10 +191,6 @@ -
- - -
diff --git a/FMS/Pages/Facilities/Undelete.cshtml b/FMS/Pages/Facilities/Undelete.cshtml index e24bbf0b..adaeb253 100644 --- a/FMS/Pages/Facilities/Undelete.cshtml +++ b/FMS/Pages/Facilities/Undelete.cshtml @@ -167,12 +167,6 @@
@Html.DisplayFor(model => model.FacilityDetail.HistoricalComplianceOfficer)
-
- @Html.DisplayNameFor(model => model.FacilityDetail.TaxId) -
-
- @Html.DisplayFor(model => model.FacilityDetail.TaxId) -
} diff --git a/FMS/Platform/DevHelpers/SeedData/FacilitySeedData.cs b/FMS/Platform/DevHelpers/SeedData/FacilitySeedData.cs index eccf1e22..e688e102 100644 --- a/FMS/Platform/DevHelpers/SeedData/FacilitySeedData.cs +++ b/FMS/Platform/DevHelpers/SeedData/FacilitySeedData.cs @@ -329,7 +329,6 @@ private static IEnumerable GetFacilities() RNDateReceived = null, HistoricalUnit = "Old RRP Unit", HistoricalComplianceOfficer = "Someone Retired", - TaxId = "ABC-2637485-11", IsRetained = true }, new() @@ -344,7 +343,7 @@ private static IEnumerable GetFacilities() Name = "Facility Test-4 Release Notification", ComplianceOfficerId = new Guid("468F746A-270F-4584-8B04-71CD5271A40F"), FacilityStatusId = new Guid("0FF0A063-2D11-4305-BADA-E9A4414EDDF1"), - Location = "Some Random Strip Mall", + Location = "Some Random Strip Mall 102-395763-tk^other data", Address = "10919 HWY 92", City = "Woodstock", State = "Georgia", @@ -352,7 +351,6 @@ private static IEnumerable GetFacilities() Latitude = 34.086774m, Longitude = -84.506122m, CountyId = 243, - IsRetained = true, HSInumber = "10251", DeterminationLetterDate = null, Comments = "Strip that looks like every other strip mall. Extra long comment to see how it fits on the page. Strip that looks like every other strip mall. Extra long comment to see how it fits on the page. Strip that looks like every other strip mall. Extra long comment to see how it fits on the page. Strip that looks like every other strip mall. Extra long comment to see how it fits on the page.", @@ -364,7 +362,7 @@ private static IEnumerable GetFacilities() RNDateReceived = new(2018, 2, 13), HistoricalUnit = "Old RRP Unit", HistoricalComplianceOfficer = "Another Retired", - TaxId = "DEF-123456789-11" + IsRetained = true, } }; } diff --git a/README.md b/README.md index ebadc952..bde49295 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,34 @@ -# FMS - -File Management System for GAEPD Hazardous Waste - -[![.NET Test](https://github.com/gaepdit/fms/actions/workflows/dotnet-test.yml/badge.svg)](https://github.com/gaepdit/fms/actions/workflows/dotnet-test.yml) -[![CodeQL](https://github.com/gaepdit/fms/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/gaepdit/fms/actions/workflows/codeql-analysis.yml) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gaepdit_FMS&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gaepdit_FMS) -[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=gaepdit_FMS&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=gaepdit_FMS) - -## Development - -There are two launch profiles: - -* "FMS Local" -- Does not connect to any external server and no VPN access is needed (or even internet access except to load Google Maps). Uses LocalDB for storage with seed data and creates a local user account. - -* "FMS Dev Server" -- Connects to the dev database server, so it requires a VPN connection. Uses your SOG account to log in. *To use this profile, you must add the "appsettings.Development.json" file from the "app-config" repo.* - -Most development should be done using the Local profile. The Dev Server profile is only needed when specifically troubleshooting issues with the database server or SOG account. - -**NOTE:** In order to load Google Maps on the Location Search page, you must add a Google API key in the "appsettings.Local.json" or "appsettings.Development.json" file. - -### Entity Framework database migrations - -Instructions for adding a new Entity Framework database migration: - -1. Open a command prompt to the root folder of the solution. - -2. Run the following command with an appropriate migration name: - - `dotnet ef migrations add NAME_OF_MIGRATION --msbuildprojectextensionspath ..\artifacts\FMS.Infrastructure\obj\` - - `TK's path: D:\source\repos\FMS\fms.infrastructure> dotnet ef migrations add NAME_OF_MIGRATION --msbuildprojectextensionspath ..\artifacts\FMS.Infrastructure\obj\` +# FMS + +File Management System for GAEPD Hazardous Waste + +[![.NET Test](https://github.com/gaepdit/fms/actions/workflows/dotnet-test.yml/badge.svg)](https://github.com/gaepdit/fms/actions/workflows/dotnet-test.yml) +[![CodeQL](https://github.com/gaepdit/fms/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/gaepdit/fms/actions/workflows/codeql-analysis.yml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=gaepdit_FMS&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=gaepdit_FMS) +[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=gaepdit_FMS&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=gaepdit_FMS) + +## Development + +There are two launch profiles: + +* "FMS Local" -- Does not connect to any external server and no VPN access is needed (or even internet access except to load Google Maps). Uses LocalDB for storage with seed data and creates a local user account. + +* "FMS Dev Server" -- Connects to the dev database server, so it requires a VPN connection. Uses your SOG account to log in. *To use this profile, you must add the "appsettings.Development.json" file from the "app-config" repo.* + +Most development should be done using the Local profile. The Dev Server profile is only needed when specifically troubleshooting issues with the database server or SOG account. + +**NOTE:** In order to load Google Maps on the Location Search page, you must add a Google API key in the "appsettings.Local.json" or "appsettings.Development.json" file. + +### Entity Framework database migrations + +Instructions for adding a new Entity Framework database migration: + +1. Open a command prompt to the root folder of the solution. + +2. Run the following command with an appropriate migration name: + + `dotnet ef migrations add NAME_OF_MIGRATION --msbuildprojectextensionspath ..\artifacts\FMS.Infrastructure\obj\` + +Example to show exact path: + + `TK's path: D:\source\repos\FMS\fms.infrastructure> dotnet ef migrations add NAME_OF_MIGRATION --msbuildprojectextensionspath ..\artifacts\FMS.Infrastructure\obj\`