diff --git a/source/backend/api/Controllers/LookupController.cs b/source/backend/api/Controllers/LookupController.cs index 600effdc15..21e902429e 100644 --- a/source/backend/api/Controllers/LookupController.cs +++ b/source/backend/api/Controllers/LookupController.cs @@ -133,6 +133,11 @@ public IActionResult GetAll() var leasePaymentCategoryTypes = _mapper.Map(_lookupRepository.GetAllLeasePaymentCategoryTypes()); var consultationOutcomeTypes = _mapper.Map(_lookupRepository.GetAllConsultationOutcomeTypes()); var subfileInterestTypes = _mapper.Map(_lookupRepository.GetAllSubfileInterestTypes()); + var acquisitionFileProgressStatuses = _mapper.Map(_lookupRepository.GetAllAcquisitionFileProgressStatusTypes()); + var acquisitionFileAppraisalStatuses = _mapper.Map(_lookupRepository.GetAllAcquisitionFileAppraisalStatusTypes()); + var acquisitionFileLegalSurveyStatuses = _mapper.Map(_lookupRepository.GetAllAcquisitionFileLegalSurveyStatusTypes()); + var acquisitionFileTakeTypesStatuses = _mapper.Map(_lookupRepository.GetAllAcquisitionFileTakeStatusTypes()); + var acquisitionFileExpropiationRiskStatuses = _mapper.Map(_lookupRepository.GetAllAcquisitionFileExpropiationRiskStatusTypes()); var codes = new List(); codes.AddRange(areaUnitTypes); @@ -209,6 +214,11 @@ public IActionResult GetAll() codes.AddRange(leasePaymentCategoryTypes); codes.AddRange(consultationOutcomeTypes); codes.AddRange(subfileInterestTypes); + codes.AddRange(acquisitionFileProgressStatuses); + codes.AddRange(acquisitionFileAppraisalStatuses); + codes.AddRange(acquisitionFileLegalSurveyStatuses); + codes.AddRange(acquisitionFileTakeTypesStatuses); + codes.AddRange(acquisitionFileExpropiationRiskStatuses); var response = new JsonResult(codes); diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileMap.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileMap.cs index 28a46032cf..af18fcfc36 100644 --- a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileMap.cs +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileMap.cs @@ -30,6 +30,11 @@ public void Register(TypeAdapterConfig config) .Map(dest => dest.DeliveryDate, src => src.DeliveryDate.ToNullableDateOnly()) .Map(dest => dest.EstimatedCompletionDate, src => src.EstCompletionDt.ToNullableDateOnly()) .Map(dest => dest.PossessionDate, src => src.PossessionDt.ToNullableDateOnly()) + .Map(dest => dest.AcquisitionFileProgressStatuses, src => src.PimsAcqFileAcqProgresses) + .Map(dest => dest.AcquisitionFileAppraisalStatusTypeCode, src => src.AcqFileAppraisalTypeCodeNavigation) + .Map(dest => dest.AcquisitionFileLegalSurveyStatusTypeCode, src => src.AcqFileLglSrvyTypeCodeNavigation) + .Map(dest => dest.AcquisitionFileTakingStatuses, src => src.PimsAcqFileAcqFlTakeTyps) + .Map(dest => dest.AcquisitionFileExpropiationRiskStatusTypeCode, src => src.AcqFileExpropRiskTypeCodeNavigation) .Map(dest => dest.TotalAllowableCompensation, src => src.TotalAllowableCompensation) .Map(dest => dest.FileStatusTypeCode, src => src.AcquisitionFileStatusTypeCodeNavigation) .Map(dest => dest.AcquisitionPhysFileStatusTypeCode, src => src.AcqPhysFileStatusTypeCodeNavigation) @@ -62,6 +67,11 @@ public void Register(TypeAdapterConfig config) .Map(dest => dest.DeliveryDate, src => src.DeliveryDate.ToNullableDateTime()) .Map(dest => dest.EstCompletionDt, src => src.EstimatedCompletionDate.ToNullableDateTime()) .Map(dest => dest.PossessionDt, src => src.PossessionDate.ToNullableDateTime()) + .Map(dest => dest.PimsAcqFileAcqProgresses, src => src.AcquisitionFileProgressStatuses) + .Map(dest => dest.AcqFileAppraisalTypeCode, src => src.AcquisitionFileAppraisalStatusTypeCode.Id) + .Map(dest => dest.AcqFileLglSrvyTypeCode, src => src.AcquisitionFileLegalSurveyStatusTypeCode.Id) + .Map(dest => dest.PimsAcqFileAcqFlTakeTyps, src => src.AcquisitionFileTakingStatuses) + .Map(dest => dest.AcqFileExpropRiskTypeCode, src => src.AcquisitionFileExpropiationRiskStatusTypeCode.Id) .Map(dest => dest.TotalAllowableCompensation, src => src.TotalAllowableCompensation) .Map(dest => dest.AcquisitionFileStatusTypeCode, src => src.FileStatusTypeCode.Id) .Map(dest => dest.AcqPhysFileStatusTypeCode, src => src.AcquisitionPhysFileStatusTypeCode.Id) diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileModel.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileModel.cs index aadf35ac51..4958cf9a71 100644 --- a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileModel.cs +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileModel.cs @@ -53,6 +53,31 @@ public class AcquisitionFileModel : FileWithChecklistModel /// public DateOnly? PossessionDate { get; set; } + /// + /// get/set - The list of progress statuses for this file. + /// + public IList AcquisitionFileProgressStatuses { get; set; } + + /// + /// get/set - The acquisition file appraisal status type. + /// + public CodeTypeModel AcquisitionFileAppraisalStatusTypeCode { get; set; } + + /// + /// get/set - The acquisition file Legal Survey status type. + /// + public CodeTypeModel AcquisitionFileLegalSurveyStatusTypeCode { get; set; } + + /// + /// get/set - The list of progress statuses for this file. + /// + public IList AcquisitionFileTakingStatuses { get; set; } + + /// + /// get/set - The acquisition file Legal Survey status type. + /// + public CodeTypeModel AcquisitionFileExpropiationRiskStatusTypeCode { get; set; } + /// /// get/set - The acquisition physical file status type. /// diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesMap.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesMap.cs new file mode 100644 index 0000000000..72688242de --- /dev/null +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesMap.cs @@ -0,0 +1,24 @@ +using Mapster; +using Pims.Api.Models.Base; +using Entity = Pims.Dal.Entities; + +namespace Pims.Api.Models.Concepts.AcquisitionFile +{ + public class AcquisitionFileProgressStatusesMap : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.NewConfig() + .Map(dest => dest.Id, src => src.AcqFileAcqProgressId) + .Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) + .Map(dest => dest.ProgressStatusTypeCode, src => src.AcqFileProgessTypeCodeNavigation) + .Inherits(); + + config.NewConfig() + .Map(dest => dest.AcqFileAcqProgressId, src => src.Id) + .Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) + .Map(dest => dest.AcqFileProgessTypeCode, src => src.ProgressStatusTypeCode.Id) + .Inherits(); + } + } +} diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesModel.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesModel.cs new file mode 100644 index 0000000000..3a6b4485af --- /dev/null +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesModel.cs @@ -0,0 +1,22 @@ +using Pims.Api.Models.Base; + +namespace Pims.Api.Models.Concepts.AcquisitionFile +{ + public class AcquisitionFileProgressStatusesModel : BaseAuditModel + { + /// + /// get/set - AcquisitionFile Progress id. + /// + public long Id { get; set; } + + /// + /// get/set - Parent Acquisition file id. + /// + public long AcquisitionFileId { get; set; } + + /// + /// get/set - Progress Status type code. + /// + public virtual CodeTypeModel ProgressStatusTypeCode { get; set; } + } +} diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesMap.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesMap.cs new file mode 100644 index 0000000000..6124c5f053 --- /dev/null +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesMap.cs @@ -0,0 +1,24 @@ +using Mapster; +using Pims.Api.Models.Base; +using Entity = Pims.Dal.Entities; + +namespace Pims.Api.Models.Concepts.AcquisitionFile +{ + public class AcquisitionFileTakingStatusesMap : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.NewConfig () + .Map(dest => dest.Id, src => src.AcqFileAcqFlTakeTypeId) + .Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) + .Map(dest => dest.TakingStatusTypeCode, src => src.AcqFileTakeTypeCodeNavigation) + .Inherits(); + + config.NewConfig() + .Map(dest => dest.AcqFileAcqFlTakeTypeId, src => src.Id) + .Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) + .Map(dest => dest.AcqFileTakeTypeCode, src => src.TakingStatusTypeCode.Id) + .Inherits(); + } + } +} diff --git a/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesModel.cs b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesModel.cs new file mode 100644 index 0000000000..deeacca9ad --- /dev/null +++ b/source/backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesModel.cs @@ -0,0 +1,22 @@ +using Pims.Api.Models.Base; + +namespace Pims.Api.Models.Concepts.AcquisitionFile +{ + public class AcquisitionFileTakingStatusesModel : BaseAuditModel + { + /// + /// get/set - AcquisitionFile Taking type id. + /// + public long Id { get; set; } + + /// + /// get/set - Parent Acquisition file id. + /// + public long AcquisitionFileId { get; set; } + + /// + /// get/set - Taking type code. + /// + public virtual CodeTypeModel TakingStatusTypeCode { get; set; } + } +} diff --git a/source/backend/apimodels/Models/Concepts/DocumentQueue/DocumentQueueModel.cs b/source/backend/apimodels/Models/Concepts/DocumentQueue/DocumentQueueModel.cs index aa7e0c27f6..216db81e4a 100644 --- a/source/backend/apimodels/Models/Concepts/DocumentQueue/DocumentQueueModel.cs +++ b/source/backend/apimodels/Models/Concepts/DocumentQueue/DocumentQueueModel.cs @@ -71,5 +71,5 @@ public class DocumentQueueModel : BaseAuditModel /// public CodeTypeModel DocumentQueueStatusTypeCode { get; set; } #endregion -} + } } diff --git a/source/backend/dal/Repositories/AcquisitionFileRepository.cs b/source/backend/dal/Repositories/AcquisitionFileRepository.cs index b558efca19..e296f4e620 100644 --- a/source/backend/dal/Repositories/AcquisitionFileRepository.cs +++ b/source/backend/dal/Repositories/AcquisitionFileRepository.cs @@ -99,6 +99,13 @@ public PimsAcquisitionFile GetById(long id) .Include(r => r.RegionCodeNavigation) .Include(r => r.AcquisitionFundingTypeCodeNavigation) .Include(r => r.SubfileInterestTypeCodeNavigation) + .Include(s => s.PimsAcqFileAcqProgresses) + .ThenInclude(p => p.AcqFileProgessTypeCodeNavigation) + .Include(s => s.AcqFileAppraisalTypeCodeNavigation) + .Include(s => s.AcqFileLglSrvyTypeCodeNavigation) + .Include(s => s.PimsAcqFileAcqFlTakeTyps) + .ThenInclude(t => t.AcqFileTakeTypeCodeNavigation) + .Include(s => s.AcqFileExpropRiskTypeCodeNavigation) .Include(r => r.Project) .ThenInclude(x => x.WorkActivityCode) .Include(r => r.Project) @@ -730,6 +737,8 @@ public PimsAcquisitionFile Update(PimsAcquisitionFile acquisitionFile) Context.UpdateChild(p => p.PimsAcquisitionFileTeams, acquisitionFile.Internal_Id, acquisitionFile.PimsAcquisitionFileTeams.ToArray()); Context.UpdateChild(p => p.PimsInterestHolders, acquisitionFile.Internal_Id, acquisitionFile.PimsInterestHolders.ToArray()); Context.UpdateGrandchild(o => o.PimsAcquisitionOwners, oa => oa.Address, acquisitionFile.Internal_Id, acquisitionFile.PimsAcquisitionOwners.ToArray()); + Context.UpdateChild(p => p.PimsAcqFileAcqProgresses, acquisitionFile.AcquisitionFileId, acquisitionFile.PimsAcqFileAcqProgresses.ToArray()); + Context.UpdateChild(p => p.PimsAcqFileAcqFlTakeTyps, acquisitionFile.AcquisitionFileId, acquisitionFile.PimsAcqFileAcqFlTakeTyps.ToArray()); return acquisitionFile; } diff --git a/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs b/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs index ba895f0898..f8b1b245c9 100644 --- a/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs +++ b/source/backend/dal/Repositories/Interfaces/ILookupRepository.cs @@ -159,5 +159,15 @@ public interface ILookupRepository : IRepository IEnumerable GetAllConsultationOutcomeTypes(); IEnumerable GetAllSubfileInterestTypes(); + + IEnumerable GetAllAcquisitionFileProgressStatusTypes(); + + IEnumerable GetAllAcquisitionFileAppraisalStatusTypes(); + + IEnumerable GetAllAcquisitionFileLegalSurveyStatusTypes(); + + IEnumerable GetAllAcquisitionFileTakeStatusTypes(); + + IEnumerable GetAllAcquisitionFileExpropiationRiskStatusTypes(); } } diff --git a/source/backend/dal/Repositories/LookupRepository.cs b/source/backend/dal/Repositories/LookupRepository.cs index 3c6d6eb813..84abb84909 100644 --- a/source/backend/dal/Repositories/LookupRepository.cs +++ b/source/backend/dal/Repositories/LookupRepository.cs @@ -445,6 +445,31 @@ public IEnumerable GetAllSubfileInterestTypes() return Context.PimsSubfileInterestTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); } + public IEnumerable GetAllAcquisitionFileProgressStatusTypes() + { + return Context.PimsAcqFileProgessTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); + } + + public IEnumerable GetAllAcquisitionFileAppraisalStatusTypes() + { + return Context.PimsAcqFileAppraisalTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); + } + + public IEnumerable GetAllAcquisitionFileLegalSurveyStatusTypes() + { + return Context.PimsAcqFileLglSrvyTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); + } + + public IEnumerable GetAllAcquisitionFileTakeStatusTypes() + { + return Context.PimsAcqFileTakeTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); + } + + public IEnumerable GetAllAcquisitionFileExpropiationRiskStatusTypes() + { + return Context.PimsAcqFileExpropRiskTypes.AsNoTracking().OrderBy(a => a.DisplayOrder).ToList(); + } + #endregion } } diff --git a/source/backend/entities/Partials/AcquisitionFileAppraisalType.cs b/source/backend/entities/Partials/AcquisitionFileAppraisalType.cs new file mode 100644 index 0000000000..d7677aadd8 --- /dev/null +++ b/source/backend/entities/Partials/AcquisitionFileAppraisalType.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileAppraisalType class, provides an entity for the datamodel to manage acquisition status types. + /// + public partial class PimsAcqFileAppraisalType : ITypeEntity + { + /// + /// get/set - Primary key to identify acquisition file appraisal status type. + /// + [NotMapped] + public string Id { get => AcqFileAppraisalTypeCode; set => AcqFileAppraisalTypeCode = value; } + + /// + /// Create a new instance of a PimsAcqFileAppraisalType class. + /// + /// + public PimsAcqFileAppraisalType(string id) + : this() + { + Id = id; + } + + public PimsAcqFileAppraisalType() + { + } + } +} diff --git a/source/backend/entities/Partials/AcquisitionFileExpropiationRiskType.cs b/source/backend/entities/Partials/AcquisitionFileExpropiationRiskType.cs new file mode 100644 index 0000000000..3322f18201 --- /dev/null +++ b/source/backend/entities/Partials/AcquisitionFileExpropiationRiskType.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileExpropRiskType class, provides an entity for the datamodel to manage acquisition file progress status types. + /// + public partial class PimsAcqFileExpropRiskType : ITypeEntity + { + /// + /// get/set - Primary key to identify acquisition file risk type status type. + /// + [NotMapped] + public string Id { get => AcqFileExpropRiskTypeCode; set => AcqFileExpropRiskTypeCode = value; } + + /// + /// Create a new instance of a PimsAcqFileExpropRiskType class. + /// + /// + public PimsAcqFileExpropRiskType(string id) + : this() + { + Id = id; + } + + public PimsAcqFileExpropRiskType() + { + } + } +} diff --git a/source/backend/entities/Partials/AcquisitionFileLegalSurveyType.cs b/source/backend/entities/Partials/AcquisitionFileLegalSurveyType.cs new file mode 100644 index 0000000000..6c20b0c412 --- /dev/null +++ b/source/backend/entities/Partials/AcquisitionFileLegalSurveyType.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileProgessType class, provides an entity for the datamodel to manage acquisition file legal survey status types. + /// + public partial class PimsAcqFileLglSrvyType : ITypeEntity + { + /// + /// get/set - Primary key to identify acquisition file legal survey status type. + /// + [NotMapped] + public string Id { get => AcqFileLglSrvyTypeCode; set => AcqFileLglSrvyTypeCode = value; } + + /// + /// Create a new instance of a PimsAcqFileProgessType class. + /// + /// + public PimsAcqFileLglSrvyType(string id) + : this() + { + Id = id; + } + + public PimsAcqFileLglSrvyType() + { + } + } +} diff --git a/source/backend/entities/Partials/AcquisitionFileProgressType.cs b/source/backend/entities/Partials/AcquisitionFileProgressType.cs new file mode 100644 index 0000000000..dc0a1f44bc --- /dev/null +++ b/source/backend/entities/Partials/AcquisitionFileProgressType.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileProgessType class, provides an entity for the datamodel to manage acquisition file progress status types. + /// + public partial class PimsAcqFileProgessType : ITypeEntity + { + /// + /// get/set - Primary key to identify acquisition file progress status type. + /// + [NotMapped] + public string Id { get => AcqFileProgessTypeCode; set => AcqFileProgessTypeCode = value; } + + /// + /// Create a new instance of a PimsAcqFileProgessType class. + /// + /// + public PimsAcqFileProgessType(string id) + : this() + { + Id = id; + } + + public PimsAcqFileProgessType() + { + } + } +} diff --git a/source/backend/entities/Partials/AcquisitionFileTakeType.cs b/source/backend/entities/Partials/AcquisitionFileTakeType.cs new file mode 100644 index 0000000000..f53e45f7f4 --- /dev/null +++ b/source/backend/entities/Partials/AcquisitionFileTakeType.cs @@ -0,0 +1,30 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileTakeType class, provides an entity for the datamodel to manage acquisition file progress status types. + /// + public partial class PimsAcqFileTakeType : ITypeEntity + { + /// + /// get/set - Primary key to identify acquisition file take type status type. + /// + [NotMapped] + public string Id { get => AcqFileTakeTypeCode; set => AcqFileTakeTypeCode = value; } + + /// + /// Create a new instance of a PimsAcqFileProgessType class. + /// + /// + public PimsAcqFileTakeType(string id) + : this() + { + Id = id; + } + + public PimsAcqFileTakeType() + { + } + } +} diff --git a/source/backend/entities/Partials/PimsAcqFileAcqFlTakeTyp.cs b/source/backend/entities/Partials/PimsAcqFileAcqFlTakeTyp.cs new file mode 100644 index 0000000000..9bda169ea7 --- /dev/null +++ b/source/backend/entities/Partials/PimsAcqFileAcqFlTakeTyp.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileAcqFlTakeTyp class, provides an entity for the datamodel to manage Lease Purposes types. + /// + public partial class PimsAcqFileAcqFlTakeTyp : StandardIdentityBaseAppEntity, IBaseAppEntity + { + [NotMapped] + public override long Internal_Id { get => AcqFileAcqFlTakeTypeId; set => AcqFileAcqFlTakeTypeId = value; } + } +} diff --git a/source/backend/entities/Partials/PimsAcqFileAcqProgress.cs b/source/backend/entities/Partials/PimsAcqFileAcqProgress.cs new file mode 100644 index 0000000000..7acd721ec2 --- /dev/null +++ b/source/backend/entities/Partials/PimsAcqFileAcqProgress.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Pims.Dal.Entities +{ + /// + /// PimsAcqFileAcqProgress class, provides an entity for the datamodel to manage Lease Purposes types. + /// + public partial class PimsAcqFileAcqProgress : StandardIdentityBaseAppEntity, IBaseAppEntity + { + [NotMapped] + public override long Internal_Id { get => AcqFileAcqProgressId; set => AcqFileAcqProgressId = value; } + } +} diff --git a/source/frontend/src/constants/API.ts b/source/frontend/src/constants/API.ts index 2620dfc1ae..5961837e64 100644 --- a/source/frontend/src/constants/API.ts +++ b/source/frontend/src/constants/API.ts @@ -136,6 +136,11 @@ export const LEASE_CHECKLIST_SECTION_TYPES = 'PimsLeaseChklstSectionType'; export const LEASE_CHECKLIST_ITEM_STATUS_TYPES = 'PimsChklstItemStatusType'; export const LEASE_PAYMENT_CATEGORY_TYPES = 'PimsLeasePaymentCategoryType'; export const SUBFILE_INTEREST_TYPES = 'PimsSubfileInterestType'; +export const ACQUISITION_PROGRESS_STATUS_TYPES = 'PimsAcqFileProgessType'; +export const ACQUISITION_APPRAISAL_STATUS_TYPES = 'PimsAcqFileAppraisalType'; +export const ACQUISITION_LEGALSURVEY_STATUS_TYPES = 'PimsAcqFileLglSrvyType'; +export const ACQUISITION_TAKING_STATUS_TYPES = 'PimsAcqFileTakeType'; +export const ACQUISITION_EXPROPIATIONRISK_STATUS_TYPES = 'PimsAcqFileExpropRiskType'; // TODO: PSP-4395 This should all be removed from this and moved to the useApi* hooks. // Auth Service diff --git a/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap index e8440d3f00..e9b3b13f7e 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap @@ -1134,6 +1134,188 @@ exports[`AcquisitionView component > renders as expected 1`] = ` +
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+ Received +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx index 4ee03bd6f5..4bca538ab6 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/add/AddAcquisitionForm.tsx @@ -5,6 +5,7 @@ import styled from 'styled-components'; import { FastDatePicker, Input, + Multiselect, ProjectSelector, Select, SelectOption, @@ -33,6 +34,8 @@ import { PropertyForm } from '../../shared/models'; import { AcquisitionFormModal } from '../common/modals/AcquisitionFormModal'; import UpdateAcquisitionOwnersSubForm from '../common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm'; import { UpdateAcquisitionTeamSubForm } from '../common/update/acquisitionTeam/UpdateAcquisitionTeamSubForm'; +import { ProgressStatusModel } from '../models/ProgressStatusModel'; +import { TakingTypeStatusModel } from '../models/TakingTypeStatusModel'; import { AcquisitionPropertiesSubForm } from './AcquisitionPropertiesSubForm'; import { AcquisitionForm } from './models'; @@ -132,11 +135,24 @@ const AddAcquisitionDetailSubForm: React.FC<{ const ownerSolicitorContact = values?.ownerSolicitor.contact; const { retrieveProjectProducts } = useProjectProvider(); - const { getOptionsByType } = useLookupCodeHelpers(); + const { getOptionsByType, getByType } = useLookupCodeHelpers(); const acquisitionTypes = getOptionsByType(API.ACQUISITION_TYPES); const acquisitionPhysFileTypes = getOptionsByType(API.ACQUISITION_PHYSICAL_FILE_STATUS_TYPES); const acquisitionFundingTypes = getOptionsByType(API.ACQUISITION_FUNDING_TYPES); const subfileInterestTypes = getOptionsByType(API.SUBFILE_INTEREST_TYPES); + const acquisitionProgressStatusTypesOptions = getByType( + API.ACQUISITION_PROGRESS_STATUS_TYPES, + ).map(x => ProgressStatusModel.fromLookup(x)); + const acquisitionAppraisalStatusTypes = getOptionsByType(API.ACQUISITION_APPRAISAL_STATUS_TYPES); + const acquisitionLegalSurveyStatusTypes = getOptionsByType( + API.ACQUISITION_LEGALSURVEY_STATUS_TYPES, + ); + const acquisitionTakingStatusTypesOptions = getByType(API.ACQUISITION_TAKING_STATUS_TYPES).map( + x => TakingTypeStatusModel.fromLookup(x), + ); + const acquisitionExpropiationRiskStatusTypes = getOptionsByType( + API.ACQUISITION_EXPROPIATIONRISK_STATUS_TYPES, + ); const isSubFile = exists(parentId) && isValidId(parentId); @@ -248,6 +264,48 @@ const AddAcquisitionDetailSubForm: React.FC<{ )} +
+ + + + + + + + + + + +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+ + + +
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ +
@@ -3272,6 +3727,461 @@ exports[`AddAcquisitionContainer component > renders as expected 1`] = `
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionForm.test.tsx.snap index ab4201159a..f2977140d7 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionForm.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/add/__snapshots__/AddAcquisitionForm.test.tsx.snap @@ -664,6 +664,461 @@ exports[`AddAcquisitionForm component > Sub-interest files > renders as expected
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
@@ -2803,6 +3258,461 @@ exports[`AddAcquisitionForm component > renders as expected 1`] = `
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/add/models.ts b/source/frontend/src/features/mapSideBar/acquisition/add/models.ts index 172c0b7b32..84d0bef964 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/add/models.ts +++ b/source/frontend/src/features/mapSideBar/acquisition/add/models.ts @@ -4,7 +4,12 @@ import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_C import { ApiGen_Concepts_AcquisitionFileOwner } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFileOwner'; import { ApiGen_Concepts_AcquisitionFileProperty } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFileProperty'; import { getEmptyBaseAudit } from '@/models/defaultInitializers'; -import { fromTypeCode, stringToNumberOrNull, toTypeCodeNullable } from '@/utils/formUtils'; +import { + fromTypeCode, + fromTypeCodeNullable, + stringToNumberOrNull, + toTypeCodeNullable, +} from '@/utils/formUtils'; import { exists, isValidId, isValidIsoDateTime } from '@/utils/utils'; import { PropertyForm } from '../../shared/models'; @@ -15,6 +20,8 @@ import { WithAcquisitionOwners, WithAcquisitionTeam, } from '../common/models'; +import { ProgressStatusModel } from '../models/ProgressStatusModel'; +import { TakingTypeStatusModel } from '../models/TakingTypeStatusModel'; import { InterestHolderForm } from '../tabs/stakeholders/update/models'; export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwners { @@ -27,6 +34,14 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne estimatedCompletionDate?: string = ''; possessionDate?: string = ''; rowVersion?: number; + + //Progress Statuses + progressStatuses: ProgressStatusModel[] = []; + appraisalStatusType: string | null = null; + legalSurveyStatusType: string | null = null; + takingStatuses: TakingTypeStatusModel[] = []; + expropiationRiskStatusType: string | null = null; + // Code Tables acquisitionFileStatusType?: string = ''; acquisitionPhysFileStatusType?: string = ''; @@ -68,6 +83,13 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne ? this.estimatedCompletionDate : null, possessionDate: isValidIsoDateTime(this.possessionDate) ? this.possessionDate : null, + acquisitionFileProgressStatuses: this.progressStatuses.map(x => x.toApi(this.id ?? 0)), + acquisitionFileAppraisalStatusTypeCode: toTypeCodeNullable(this.appraisalStatusType), + acquisitionFileLegalSurveyStatusTypeCode: toTypeCodeNullable(this.appraisalStatusType), + acquisitionFileTakingStatuses: this.takingStatuses.map(x => x.toApi(this.id ?? 0)), + acquisitionFileExpropiationRiskStatusTypeCode: toTypeCodeNullable( + this.expropiationRiskStatusType, + ), totalAllowableCompensation: stringToNumberOrNull(this.totalAllowableCompensation), legacyFileNumber: this.legacyFileNumber ?? null, fileStatusTypeCode: toTypeCodeNullable(this.acquisitionFileStatusType), @@ -172,6 +194,19 @@ export class AcquisitionForm implements WithAcquisitionTeam, WithAcquisitionOwne newForm.deliveryDate = model.deliveryDate ?? undefined; newForm.estimatedCompletionDate = model.estimatedCompletionDate ?? undefined; newForm.possessionDate = model.possessionDate ?? undefined; + newForm.progressStatuses = + model.acquisitionFileProgressStatuses.map(x => ProgressStatusModel.fromApi(x)) ?? []; + newForm.appraisalStatusType = fromTypeCodeNullable( + model.acquisitionFileAppraisalStatusTypeCode, + ); + newForm.legalSurveyStatusType = fromTypeCodeNullable( + model.acquisitionFileLegalSurveyStatusTypeCode, + ); + newForm.takingStatuses = + model.acquisitionFileTakingStatuses.map(x => TakingTypeStatusModel.fromApi(x)) ?? []; + newForm.expropiationRiskStatusType = fromTypeCodeNullable( + model.acquisitionFileExpropiationRiskStatusTypeCode, + ); newForm.totalAllowableCompensation = model.totalAllowableCompensation || ''; newForm.legacyFileNumber = model.legacyFileNumber ?? undefined; newForm.acquisitionFileStatusType = fromTypeCode(model.fileStatusTypeCode) ?? undefined; diff --git a/source/frontend/src/features/mapSideBar/acquisition/models/ProgressStatusModel.ts b/source/frontend/src/features/mapSideBar/acquisition/models/ProgressStatusModel.ts new file mode 100644 index 0000000000..e7c15cabb7 --- /dev/null +++ b/source/frontend/src/features/mapSideBar/acquisition/models/ProgressStatusModel.ts @@ -0,0 +1,46 @@ +import { ApiGen_Concepts_AcquisitionFileProgressStatuses } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFileProgressStatuses'; +import { getEmptyBaseAudit } from '@/models/defaultInitializers'; +import { ILookupCode } from '@/store/slices/lookupCodes'; + +export class ProgressStatusModel { + acquisitionFileId: number; + progressTypeCode: string; + progressTypeCodeDescription: string; + + constructor(readonly id: number | null = null, readonly rowVersion: number | null = null) { + this.id = id; + this.rowVersion = rowVersion; + } + + static fromApi(base: ApiGen_Concepts_AcquisitionFileProgressStatuses): ProgressStatusModel { + const newModel = new ProgressStatusModel(base.id, base.rowVersion); + + newModel.acquisitionFileId = base.acquisitionFileId; + newModel.progressTypeCode = base.progressStatusTypeCode.id; + newModel.progressTypeCodeDescription = base.progressStatusTypeCode.description; + + return newModel; + } + + static fromLookup(base: ILookupCode): ProgressStatusModel { + const newModel = new ProgressStatusModel(); + newModel.progressTypeCode = base.id.toString(); + newModel.progressTypeCodeDescription = base.name; + + return newModel; + } + + toApi(acquisitionFileId: number): ApiGen_Concepts_AcquisitionFileProgressStatuses { + return { + id: this.id ?? 0, + acquisitionFileId: acquisitionFileId, + progressStatusTypeCode: { + id: this.progressTypeCode, + description: null, + displayOrder: null, + isDisabled: false, + }, + ...getEmptyBaseAudit(this.rowVersion), + }; + } +} diff --git a/source/frontend/src/features/mapSideBar/acquisition/models/TakingTypeStatusModel.ts b/source/frontend/src/features/mapSideBar/acquisition/models/TakingTypeStatusModel.ts new file mode 100644 index 0000000000..6589496402 --- /dev/null +++ b/source/frontend/src/features/mapSideBar/acquisition/models/TakingTypeStatusModel.ts @@ -0,0 +1,46 @@ +import { ApiGen_Concepts_AcquisitionFileTakingStatuses } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFileTakingStatuses'; +import { getEmptyBaseAudit } from '@/models/defaultInitializers'; +import { ILookupCode } from '@/store/slices/lookupCodes'; + +export class TakingTypeStatusModel { + acquisitionFileId: number; + takingTypeCode: string; + takingTypeCodeDescription: string; + + constructor(readonly id: number | null = null, readonly rowVersion: number | null = null) { + this.id = id; + this.rowVersion = rowVersion; + } + + static fromApi(base: ApiGen_Concepts_AcquisitionFileTakingStatuses): TakingTypeStatusModel { + const newModel = new TakingTypeStatusModel(base.id, base.rowVersion); + + newModel.acquisitionFileId = base.acquisitionFileId; + newModel.takingTypeCode = base.takingStatusTypeCode.id; + newModel.takingTypeCodeDescription = base.takingStatusTypeCode.description; + + return newModel; + } + + static fromLookup(base: ILookupCode): TakingTypeStatusModel { + const newModel = new TakingTypeStatusModel(); + newModel.takingTypeCode = base.id.toString(); + newModel.takingTypeCodeDescription = base.name; + + return newModel; + } + + toApi(acquisitionFileId: number): ApiGen_Concepts_AcquisitionFileTakingStatuses { + return { + id: this.id ?? 0, + acquisitionFileId: acquisitionFileId, + takingStatusTypeCode: { + id: this.takingTypeCode, + description: null, + displayOrder: null, + isDisabled: false, + }, + ...getEmptyBaseAudit(this.rowVersion), + }; + } +} diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap index 174dafdb55..80e6f9ae95 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/__snapshots__/AcquisitionFileTabs.test.tsx.snap @@ -251,6 +251,188 @@ exports[`AcquisitionFileTabs component > matches snapshot 1`] = `
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+ Received +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx index 8f1c0c9519..914a38b305 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.test.tsx @@ -122,6 +122,100 @@ describe('AcquisitionSummaryView component', () => { expect(getByText('legacy file number')).toBeVisible(); }); + it('renders the file progress statuses', async () => { + const { getByTestId } = setup( + { + acquisitionFile: { + ...mockAcquisitionFileResponse(), + estimatedCompletionDate: '2030-01-10T00:00:00', + possessionDate: '2035-03-10T00:00:00', + acquisitionFileProgressStatuses: [ + { + id: 3, + acquisitionFileId: 64, + progressStatusTypeCode: { + id: 'OWNRCNTCTD', + description: 'Owner contacted', + isDisabled: false, + displayOrder: 6, + }, + appCreateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateUserid: 'EHERRERA', + appCreateUserid: 'EHERRERA', + appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + rowVersion: 1, + }, + { + id: 4, + acquisitionFileId: 64, + progressStatusTypeCode: { + id: 'WTG4PAPLN', + description: 'Waiting for PA plan', + isDisabled: false, + displayOrder: 7, + }, + appCreateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateUserid: 'EHERRERA', + appCreateUserid: 'EHERRERA', + appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + rowVersion: 1, + }, + ], + acquisitionFileAppraisalStatusTypeCode: { + id: 'RECEIVED', + description: 'Received', + isDisabled: false, + displayOrder: 3, + }, + acquisitionFileLegalSurveyStatusTypeCode: { + id: 'OUT4SIGN', + description: 'Out for Signatures', + isDisabled: false, + displayOrder: 4, + }, + acquisitionFileTakingStatuses: [ + { + id: 4, + acquisitionFileId: 64, + takingStatusTypeCode: { + id: 'PARTLTACQ', + description: 'Partial Acquisition', + isDisabled: false, + displayOrder: 3, + }, + appCreateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateTimestamp: '2024-12-27T17:33:21.553', + appLastUpdateUserid: 'EHERRERA', + appCreateUserid: 'EHERRERA', + appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', + rowVersion: 1, + }, + ], + acquisitionFileExpropiationRiskStatusTypeCode: { + id: 'MED', + description: 'Medium', + isDisabled: false, + displayOrder: 3, + }, + }, + }, + { claims: [] }, + ); + await waitForEffects(); + + expect(getByTestId('prg-file-progress-status')).toHaveTextContent('Owner contacted'); + expect(getByTestId('prg-file-progress-status')).toHaveTextContent('Waiting for PA plan'); + expect(getByTestId('prg-appraisal-status')).toHaveTextContent('Received'); + expect(getByTestId('prg-legal-survey-status')).toHaveTextContent('Out for Signatures'); + expect(getByTestId('prg-taking-type-status')).toHaveTextContent('Partial Acquisition'); + expect(getByTestId('prg-expropiation-risk-status')).toHaveTextContent('Medium'); + }); + it('renders acquisition-related dates', async () => { const { getByText, getByTestId } = setup( { diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx index b1360d0fd9..5236a58099 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/AcquisitionSummaryView.tsx @@ -1,9 +1,11 @@ +import Multiselect from 'multiselect-react-dropdown'; import React, { useEffect } from 'react'; import { FaExternalLinkAlt } from 'react-icons/fa'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import EditButton from '@/components/common/buttons/EditButton'; +import { readOnlyMultiSelectStyle } from '@/components/common/form'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -13,6 +15,7 @@ import { Claims, Roles } from '@/constants'; import { InterestHolderType } from '@/constants/interestHolderTypes'; import { usePersonRepository } from '@/features/contacts/repositories/usePersonRepository'; import useKeycloakWrapper from '@/hooks/useKeycloakWrapper'; +import { ApiGen_Base_CodeType } from '@/models/api/generated/ApiGen_Base_CodeType'; import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFile'; import { exists, prettyFormatDate } from '@/utils'; import { formatApiPersonNames } from '@/utils/personUtils'; @@ -51,6 +54,16 @@ const AcquisitionSummaryView: React.FC = ({ getPersonDetail: { execute: fetchPerson, response: ownerSolicitorPrimaryContact }, } = usePersonRepository(); + const selectedProgressStatuses: ApiGen_Base_CodeType[] = + acquisitionFile?.acquisitionFileProgressStatuses + .map(x => x.progressStatusTypeCode) + .filter(exists) ?? []; + + const selectedTakingStatuses: ApiGen_Base_CodeType[] = + acquisitionFile?.acquisitionFileTakingStatuses + .map(x => x.takingStatusTypeCode) + .filter(exists) ?? []; + useEffect(() => { if (ownerSolicitor?.primaryContactId) { fetchPerson(ownerSolicitor?.primaryContactId); @@ -92,6 +105,39 @@ const AcquisitionSummaryView: React.FC = ({ {acquisitionFile.fundingOther} )} +
+ + + + + {detail.appraisalStatusDescription} + + + {detail.legalSurveyStatusDescription} + + + + + + {detail.expropiationRiskStatusDescription} + +
{prettyFormatDate(detail.assignedDate)} diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap index f8190f1690..dc7ee10c05 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/__snapshots__/AcquisitionSummaryView.test.tsx.snap @@ -6,7 +6,14 @@ exports[`AcquisitionSummaryView component > matches snapshot 1`] = ` class="Toastify" />
- .c0 { + .c7 { + color: #474543; + font-size: 1.6rem; + -webkit-text-decoration: none; + text-decoration: none; +} + +.c0 { background-color: #f2f2f2; padding-top: 1rem; } @@ -42,13 +49,6 @@ exports[`AcquisitionSummaryView component > matches snapshot 1`] = ` font-weight: bold; } -.c7 { - color: #474543; - font-size: 1.6rem; - -webkit-text-decoration: none; - text-decoration: none; -} - .c8 { white-space: pre-line; } @@ -143,6 +143,188 @@ exports[`AcquisitionSummaryView component > matches snapshot 1`] = `
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+ Received +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
    + + No Options Available + +
+
+
+
+
+
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/models.ts b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/models.ts index f895d05cb9..e80a71bd58 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/models.ts +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/detail/models.ts @@ -12,6 +12,9 @@ export class DetailAcquisitionFile { deliveryDate?: string; estimatedCompletionDate?: string; possessionDate?: string; + appraisalStatusDescription: string; + legalSurveyStatusDescription: string; + expropiationRiskStatusDescription: string; acquisitionPhysFileStatusTypeDescription?: string; acquisitionTypeDescription?: string; subfileInterestTypeDescription: string | null = null; @@ -29,6 +32,13 @@ export class DetailAcquisitionFile { detail.deliveryDate = model?.deliveryDate ?? undefined; detail.estimatedCompletionDate = model?.estimatedCompletionDate ?? undefined; detail.possessionDate = model?.possessionDate ?? undefined; + + detail.appraisalStatusDescription = + model.acquisitionFileAppraisalStatusTypeCode?.description ?? ''; + detail.legalSurveyStatusDescription = + model.acquisitionFileLegalSurveyStatusTypeCode?.description ?? ''; + detail.expropiationRiskStatusDescription = + model.acquisitionFileExpropiationRiskStatusTypeCode?.description ?? ''; detail.acquisitionPhysFileStatusTypeDescription = model?.acquisitionPhysFileStatusTypeCode?.description ?? undefined; detail.acquisitionTypeDescription = model?.acquisitionTypeCode?.description ?? undefined; diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx index c13ad75194..8b69c1a5b1 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.test.tsx @@ -125,6 +125,8 @@ describe('UpdateAcquisitionForm component', () => { ) as HTMLSelectElement, getOtherSubfileInterestTypeTextbox: () => utils.container.querySelector(`input[name="otherSubfileInterestType"]`) as HTMLInputElement, + getProgessAppraisalStatusTypeDropdown: () => + utils.container.querySelector(`#input-appraisalStatusType`) as HTMLSelectElement, }; }; @@ -158,6 +160,12 @@ describe('UpdateAcquisitionForm component', () => { expect(getByDisplayValue('legacy file number')).toBeVisible(); }); + it('displays progress statuses', async () => { + const { getProgessAppraisalStatusTypeDropdown } = setup({ initialValues }); + await act(async () => {}); + expect(getProgessAppraisalStatusTypeDropdown()).toHaveValue('RECEIVED'); + }); + it('displays owner solicitor and owner representative', async () => { const { getByText } = setup({ initialValues }); await act(async () => {}); diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx index d8c155dc3c..e31f086197 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/UpdateAcquisitionForm.tsx @@ -5,6 +5,7 @@ import styled from 'styled-components'; import { FastDatePicker, Input, + Multiselect, ProjectSelector, Select, SelectOption, @@ -31,6 +32,8 @@ import { formatApiPersonNames } from '@/utils/personUtils'; import UpdateAcquisitionOwnersSubForm from '../../../common/update/acquisitionOwners/UpdateAcquisitionOwnersSubForm'; import { UpdateAcquisitionTeamSubForm } from '../../../common/update/acquisitionTeam/UpdateAcquisitionTeamSubForm'; +import { ProgressStatusModel } from '../../../models/ProgressStatusModel'; +import { TakingTypeStatusModel } from '../../../models/TakingTypeStatusModel'; import { UpdateAcquisitionSummaryFormModel } from './models'; import StatusToolTip from './StatusToolTip'; @@ -76,7 +79,7 @@ const AcquisitionDetailSubForm: React.FC<{ ApiGen_Concepts_Product[] | undefined >(undefined); const { retrieveProjectProducts } = useProjectProvider(); - const { getOptionsByType } = useLookupCodeHelpers(); + const { getOptionsByType, getByType } = useLookupCodeHelpers(); const regionTypes = getOptionsByType(API.REGION_TYPES); const acquisitionTypes = getOptionsByType(API.ACQUISITION_TYPES); const acquisitionPhysFileTypes = getOptionsByType(API.ACQUISITION_PHYSICAL_FILE_STATUS_TYPES); @@ -85,6 +88,20 @@ const AcquisitionDetailSubForm: React.FC<{ const ownerSolicitorContact = values.ownerSolicitor.contact; const subfileInterestTypes = getOptionsByType(API.SUBFILE_INTEREST_TYPES); + const acquisitionProgressStatusTypesOptions = getByType( + API.ACQUISITION_PROGRESS_STATUS_TYPES, + ).map(x => ProgressStatusModel.fromLookup(x)); + const acquisitionAppraisalStatusTypes = getOptionsByType(API.ACQUISITION_APPRAISAL_STATUS_TYPES); + const acquisitionLegalSurveyStatusTypes = getOptionsByType( + API.ACQUISITION_LEGALSURVEY_STATUS_TYPES, + ); + const acquisitionTakingStatusTypesOptions = getByType(API.ACQUISITION_TAKING_STATUS_TYPES).map( + x => TakingTypeStatusModel.fromLookup(x), + ); + const acquisitionExpropiationRiskStatusTypes = getOptionsByType( + API.ACQUISITION_EXPROPIATIONRISK_STATUS_TYPES, + ); + const onMinistryProjectSelected = React.useCallback( async (param: IAutocompletePrediction[]) => { if (param.length > 0) { @@ -230,6 +247,48 @@ const AcquisitionDetailSubForm: React.FC<{ )} +
+ + + + + + + + + + + +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+
+ + +
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+ +
@@ -4495,6 +4950,461 @@ exports[`UpdateAcquisitionForm component > renders as expected 1`] = `
+
+

+
+
+ Progress Statuses +
+
+

+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Not required +
  • +
  • + No longer required +
  • +
  • + Acquired by others +
  • +
  • + Preliminary design stage +
  • +
  • + Approved for acquisition +
  • +
  • + Owner contacted +
  • +
  • + Waiting for PA plan +
  • +
  • + PA plan received +
  • +
  • + Waiting for ancillary plan +
  • +
  • + Waiting for appraisal / other report +
  • +
  • + Negotiating +
  • +
  • + Offer made +
  • +
  • + Contract signed +
  • +
  • + Out for conveyancing +
  • +
  • + Possession for construction +
  • +
  • + Ownership (tenure) +
  • +
  • + Expropriated +
  • +
  • + Settled +
  • +
  • + File complete (return to MoTT) +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
    +
  • + Unknown +
  • +
  • + Not required +
  • +
  • + Partial Acquisition +
  • +
  • + Permanent SRW +
  • +
  • + Temporary SRW +
  • +
  • + Total Acquisition +
  • +
  • + Lease +
  • +
  • + Licence +
  • +
  • + Access closure +
  • +
  • + By dedication +
  • +
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
diff --git a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/models.ts b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/models.ts index dc2911336b..72957d9509 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/models.ts +++ b/source/frontend/src/features/mapSideBar/acquisition/tabs/fileDetails/update/models.ts @@ -5,7 +5,7 @@ import { ApiGen_Concepts_AcquisitionFile } from '@/models/api/generated/ApiGen_C import { ApiGen_Concepts_AcquisitionFileOwner } from '@/models/api/generated/ApiGen_Concepts_AcquisitionFileOwner'; import { ApiGen_Concepts_InterestHolder } from '@/models/api/generated/ApiGen_Concepts_InterestHolder'; import { getEmptyBaseAudit } from '@/models/defaultInitializers'; -import { fromTypeCode, toTypeCodeNullable } from '@/utils/formUtils'; +import { fromTypeCode, fromTypeCodeNullable, toTypeCodeNullable } from '@/utils/formUtils'; import { exists, isValidId, isValidIsoDateTime } from '@/utils/utils'; import { @@ -14,6 +14,8 @@ import { WithAcquisitionOwners, WithAcquisitionTeam, } from '../../../common/models'; +import { ProgressStatusModel } from '../../../models/ProgressStatusModel'; +import { TakingTypeStatusModel } from '../../../models/TakingTypeStatusModel'; import { InterestHolderForm } from '../../stakeholders/update/models'; export class UpdateAcquisitionSummaryFormModel @@ -30,6 +32,14 @@ export class UpdateAcquisitionSummaryFormModel deliveryDate?: string; estimatedCompletionDate?: string; possessionDate?: string; + + //Progress Statuses + progressStatuses: ProgressStatusModel[] = []; + appraisalStatusType: string | null = null; + legalSurveyStatusType: string | null = null; + takingStatuses: TakingTypeStatusModel[] = []; + expropiationRiskStatusType: string | null = null; + rowVersion?: number; // Code Tables fileStatusTypeCode?: string; @@ -77,6 +87,13 @@ export class UpdateAcquisitionSummaryFormModel ? this.estimatedCompletionDate : null, possessionDate: isValidIsoDateTime(this.possessionDate) ? this.possessionDate : null, + acquisitionFileProgressStatuses: this.progressStatuses.map(x => x.toApi(this.id ?? 0)), + acquisitionFileAppraisalStatusTypeCode: toTypeCodeNullable(this.appraisalStatusType), + acquisitionFileLegalSurveyStatusTypeCode: toTypeCodeNullable(this.legalSurveyStatusType), + acquisitionFileTakingStatuses: this.takingStatuses.map(x => x.toApi(this.id ?? 0)), + acquisitionFileExpropiationRiskStatusTypeCode: toTypeCodeNullable( + this.expropiationRiskStatusType, + ), fileStatusTypeCode: toTypeCodeNullable(this.fileStatusTypeCode), acquisitionPhysFileStatusTypeCode: toTypeCodeNullable(this.acquisitionPhysFileStatusType), acquisitionTypeCode: toTypeCodeNullable(this.acquisitionType), @@ -124,6 +141,19 @@ export class UpdateAcquisitionSummaryFormModel newForm.deliveryDate = model.deliveryDate ?? undefined; newForm.estimatedCompletionDate = model.estimatedCompletionDate ?? undefined; newForm.possessionDate = model.possessionDate ?? undefined; + newForm.progressStatuses = + model.acquisitionFileProgressStatuses.map(x => ProgressStatusModel.fromApi(x)) ?? []; + newForm.appraisalStatusType = fromTypeCodeNullable( + model.acquisitionFileAppraisalStatusTypeCode, + ); + newForm.legalSurveyStatusType = fromTypeCodeNullable( + model.acquisitionFileLegalSurveyStatusTypeCode, + ); + newForm.takingStatuses = + model.acquisitionFileTakingStatuses.map(x => TakingTypeStatusModel.fromApi(x)) ?? []; + newForm.expropiationRiskStatusType = fromTypeCodeNullable( + model.acquisitionFileExpropiationRiskStatusTypeCode, + ); newForm.fileStatusTypeCode = fromTypeCode(model.fileStatusTypeCode) ?? undefined; newForm.acquisitionPhysFileStatusType = fromTypeCode(model.acquisitionPhysFileStatusTypeCode) ?? undefined; diff --git a/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx b/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx index f11d3dcfa3..72bb90bfe7 100644 --- a/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx +++ b/source/frontend/src/features/mapSideBar/compensation/detail/CompensationRequisitionDetailView.tsx @@ -286,11 +286,14 @@ export const CompensationRequisitionDetailView: React.FunctionComponent< {prettyFormatDate(compensation.expropriationVestingDate)} - + > + {prettyFormatDate(compensation.advancedPaymentServedDate)} + */} )} diff --git a/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap b/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap index 1a6eb271b6..132eb63954 100644 --- a/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/compensation/detail/__snapshots__/CompensationRequisitionDetailView.test.tsx.snap @@ -627,23 +627,6 @@ exports[`Compensation Detail View Component > renders as expected 1`] = ` class="c10 text-left col" />
-
-
- -
-
-
diff --git a/source/frontend/src/mocks/acquisitionFiles.mock.ts b/source/frontend/src/mocks/acquisitionFiles.mock.ts index 8cd2a38a04..e3fbe657af 100644 --- a/source/frontend/src/mocks/acquisitionFiles.mock.ts +++ b/source/frontend/src/mocks/acquisitionFiles.mock.ts @@ -414,6 +414,16 @@ export const mockAcquisitionFileResponse = ( compensationRequisitions: null, fundingOther: null, fundingTypeCode: null, + acquisitionFileProgressStatuses: [], + acquisitionFileAppraisalStatusTypeCode: { + id: 'RECEIVED', + description: 'Received', + isDisabled: false, + displayOrder: 3, + }, + acquisitionFileLegalSurveyStatusTypeCode: null, + acquisitionFileTakingStatuses: [], + acquisitionFileExpropiationRiskStatusTypeCode: null, }); export const getMockExpropriationFile = ( @@ -1511,6 +1521,11 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', rowVersion: 1, + acquisitionFileProgressStatuses: [], + acquisitionFileAppraisalStatusTypeCode: null, + acquisitionFileLegalSurveyStatusTypeCode: null, + acquisitionFileTakingStatuses: [], + acquisitionFileExpropiationRiskStatusTypeCode: null, }, { parentAcquisitionFileId: 64, @@ -1561,5 +1576,10 @@ export const mockAcquisitionFileSubFilesResponse = (): ApiGen_Concepts_Acquisiti appLastUpdateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', appCreateUserGuid: '939a27d0-76cd-49b0-b474-53166adb73da', rowVersion: 5, + acquisitionFileProgressStatuses: [], + acquisitionFileAppraisalStatusTypeCode: null, + acquisitionFileLegalSurveyStatusTypeCode: null, + acquisitionFileTakingStatuses: [], + acquisitionFileExpropiationRiskStatusTypeCode: null, }, ]; diff --git a/source/frontend/src/mocks/lookups.mock.ts b/source/frontend/src/mocks/lookups.mock.ts index a2ec43b0d1..de2ed7546f 100644 --- a/source/frontend/src/mocks/lookups.mock.ts +++ b/source/frontend/src/mocks/lookups.mock.ts @@ -4895,6 +4895,300 @@ export const mockLookups: ILookupCode[] = [ displayOrder: 999, type: 'PimsSubfileInterestType', }, + { + id: 'NOTREQ', + name: 'Not required', + isDisabled: false, + displayOrder: 1, + type: 'PimsAcqFileProgessType', + }, + { + id: 'NOLNGRREQ', + name: 'No longer required', + isDisabled: false, + displayOrder: 2, + type: 'PimsAcqFileProgessType', + }, + { + id: 'ACQRDBYOTH', + name: 'Acquired by others', + isDisabled: false, + displayOrder: 3, + type: 'PimsAcqFileProgessType', + }, + { + id: 'PRELIMDES', + name: 'Preliminary design stage', + isDisabled: false, + displayOrder: 4, + type: 'PimsAcqFileProgessType', + }, + { + id: 'APPRVD4ACQ', + name: 'Approved for acquisition', + isDisabled: false, + displayOrder: 5, + type: 'PimsAcqFileProgessType', + }, + { + id: 'OWNRCNTCTD', + name: 'Owner contacted', + isDisabled: false, + displayOrder: 6, + type: 'PimsAcqFileProgessType', + }, + { + id: 'WTG4PAPLN', + name: 'Waiting for PA plan', + isDisabled: false, + displayOrder: 7, + type: 'PimsAcqFileProgessType', + }, + { + id: 'PAPLNRCVD', + name: 'PA plan received', + isDisabled: false, + displayOrder: 8, + type: 'PimsAcqFileProgessType', + }, + { + id: 'WTG4ANCILPLN', + name: 'Waiting for ancillary plan', + isDisabled: false, + displayOrder: 9, + type: 'PimsAcqFileProgessType', + }, + { + id: 'WTG4APPRSL', + name: 'Waiting for appraisal / other report', + isDisabled: false, + displayOrder: 10, + type: 'PimsAcqFileProgessType', + }, + { + id: 'NEGOTIATNG', + name: 'Negotiating', + isDisabled: false, + displayOrder: 11, + type: 'PimsAcqFileProgessType', + }, + { + id: 'OFFERMADE', + name: 'Offer made', + isDisabled: false, + displayOrder: 12, + type: 'PimsAcqFileProgessType', + }, + { + id: 'CNTRCTSGND', + name: 'Contract signed', + isDisabled: false, + displayOrder: 13, + type: 'PimsAcqFileProgessType', + }, + { + id: 'OUT4CONVEY', + name: 'Out for conveyancing', + isDisabled: false, + displayOrder: 14, + type: 'PimsAcqFileProgessType', + }, + { + id: 'PSN4CNSTRCT', + name: 'Possession for construction', + isDisabled: false, + displayOrder: 15, + type: 'PimsAcqFileProgessType', + }, + { + id: 'OWNERTENURE', + name: 'Ownership (tenure)', + isDisabled: false, + displayOrder: 16, + type: 'PimsAcqFileProgessType', + }, + { + id: 'EXPROPRTD', + name: 'Expropriated', + isDisabled: false, + displayOrder: 17, + type: 'PimsAcqFileProgessType', + }, + { + id: 'SETTLED', + name: 'Settled', + isDisabled: false, + displayOrder: 18, + type: 'PimsAcqFileProgessType', + }, + { + id: 'FILCOMPLT', + name: 'File complete (return to MoTT)', + isDisabled: false, + displayOrder: 19, + type: 'PimsAcqFileProgessType', + }, + { + id: 'NOTREQ', + name: 'Not required', + isDisabled: false, + displayOrder: 1, + type: 'PimsAcqFileAppraisalType', + }, + { + id: 'ORDERED', + name: 'Ordered', + isDisabled: false, + displayOrder: 2, + type: 'PimsAcqFileAppraisalType', + }, + { + id: 'RECEIVED', + name: 'Received', + isDisabled: false, + displayOrder: 3, + type: 'PimsAcqFileAppraisalType', + }, + { + id: 'OWNERCOMM', + name: 'Owner Commission', + isDisabled: false, + displayOrder: 4, + type: 'PimsAcqFileAppraisalType', + }, + { + id: 'NOTREQ', + name: 'Not required', + isDisabled: false, + displayOrder: 1, + type: 'PimsAcqFileLglSrvyType', + }, + { + id: 'ORDERED', + name: 'Ordered', + isDisabled: false, + displayOrder: 2, + type: 'PimsAcqFileLglSrvyType', + }, + { + id: 'RECEIVED', + name: 'Received', + isDisabled: false, + displayOrder: 3, + type: 'PimsAcqFileLglSrvyType', + }, + { + id: 'OUT4SIGN', + name: 'Out for Signatures', + isDisabled: false, + displayOrder: 4, + type: 'PimsAcqFileLglSrvyType', + }, + { + id: 'REGISTRD', + name: 'Registered', + isDisabled: false, + displayOrder: 5, + type: 'PimsAcqFileLglSrvyType', + }, + { + id: 'UNKNOWN', + name: 'Unknown', + isDisabled: false, + displayOrder: 1, + type: 'PimsAcqFileTakeType', + }, + { + id: 'NOTREQ', + name: 'Not required', + isDisabled: false, + displayOrder: 2, + type: 'PimsAcqFileTakeType', + }, + { + id: 'PARTLTACQ', + name: 'Partial Acquisition', + isDisabled: false, + displayOrder: 3, + type: 'PimsAcqFileTakeType', + }, + { + id: 'PERMSRW', + name: 'Permanent SRW', + isDisabled: false, + displayOrder: 4, + type: 'PimsAcqFileTakeType', + }, + { + id: 'TEMPSRW', + name: 'Temporary SRW', + isDisabled: false, + displayOrder: 5, + type: 'PimsAcqFileTakeType', + }, + { + id: 'TTLACQ', + name: 'Total Acquisition', + isDisabled: false, + displayOrder: 6, + type: 'PimsAcqFileTakeType', + }, + { + id: 'LEASE', + name: 'Lease', + isDisabled: false, + displayOrder: 7, + type: 'PimsAcqFileTakeType', + }, + { + id: 'LICENCE', + name: 'Licence', + isDisabled: false, + displayOrder: 8, + type: 'PimsAcqFileTakeType', + }, + { + id: 'ACCSSCLOS', + name: 'Access closure', + isDisabled: false, + displayOrder: 9, + type: 'PimsAcqFileTakeType', + }, + { + id: 'BYDEDCTN', + name: 'By dedication', + isDisabled: false, + displayOrder: 10, + type: 'PimsAcqFileTakeType', + }, + { + id: 'NIL', + name: 'Nil', + isDisabled: false, + displayOrder: 1, + type: 'PimsAcqFileExpropRiskType', + }, + { + id: 'LOW', + name: 'Low', + isDisabled: false, + displayOrder: 2, + type: 'PimsAcqFileExpropRiskType', + }, + { + id: 'MED', + name: 'Medium', + isDisabled: false, + displayOrder: 3, + type: 'PimsAcqFileExpropRiskType', + }, + { + id: 'HIGH', + name: 'High', + isDisabled: false, + displayOrder: 4, + type: 'PimsAcqFileExpropRiskType', + }, ]; export const getMockLookUpsByType = (codeType: string): SelectOption[] => { diff --git a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts index 3c2449193b..65328f7a97 100644 --- a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts +++ b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFile.ts @@ -6,7 +6,9 @@ import { UtcIsoDate } from '@/models/api/UtcIsoDateTime'; import { ApiGen_Base_CodeType } from './ApiGen_Base_CodeType'; import { ApiGen_Concepts_AcquisitionFileOwner } from './ApiGen_Concepts_AcquisitionFileOwner'; +import { ApiGen_Concepts_AcquisitionFileProgressStatuses } from './ApiGen_Concepts_AcquisitionFileProgressStatuses'; import { ApiGen_Concepts_AcquisitionFileProperty } from './ApiGen_Concepts_AcquisitionFileProperty'; +import { ApiGen_Concepts_AcquisitionFileTakingStatuses } from './ApiGen_Concepts_AcquisitionFileTakingStatuses'; import { ApiGen_Concepts_AcquisitionFileTeam } from './ApiGen_Concepts_AcquisitionFileTeam'; import { ApiGen_Concepts_CompensationRequisition } from './ApiGen_Concepts_CompensationRequisition'; import { ApiGen_Concepts_FileWithChecklist } from './ApiGen_Concepts_FileWithChecklist'; @@ -24,6 +26,11 @@ export interface ApiGen_Concepts_AcquisitionFile extends ApiGen_Concepts_FileWit deliveryDate: UtcIsoDate | null; estimatedCompletionDate: UtcIsoDate | null; possessionDate: UtcIsoDate | null; + acquisitionFileProgressStatuses: ApiGen_Concepts_AcquisitionFileProgressStatuses[] | null; + acquisitionFileAppraisalStatusTypeCode: ApiGen_Base_CodeType | null; + acquisitionFileLegalSurveyStatusTypeCode: ApiGen_Base_CodeType | null; + acquisitionFileTakingStatuses: ApiGen_Concepts_AcquisitionFileTakingStatuses[] | null; + acquisitionFileExpropiationRiskStatusTypeCode: ApiGen_Base_CodeType | null; acquisitionPhysFileStatusTypeCode: ApiGen_Base_CodeType | null; acquisitionTypeCode: ApiGen_Base_CodeType | null; productId: number | null; diff --git a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileProgressStatuses.ts b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileProgressStatuses.ts new file mode 100644 index 0000000000..c20c146e98 --- /dev/null +++ b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileProgressStatuses.ts @@ -0,0 +1,13 @@ +/** + * File autogenerated by TsGenerator. + * Do not manually modify, changes made to this file will be lost when this file is regenerated. + */ +import { ApiGen_Base_BaseAudit } from './ApiGen_Base_BaseAudit'; +import { ApiGen_Base_CodeType } from './ApiGen_Base_CodeType'; + +// LINK: @backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileProgressStatusesModel.cs +export interface ApiGen_Concepts_AcquisitionFileProgressStatuses extends ApiGen_Base_BaseAudit { + id: number; + acquisitionFileId: number; + progressStatusTypeCode: ApiGen_Base_CodeType | null; +} diff --git a/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileTakingStatuses.ts b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileTakingStatuses.ts new file mode 100644 index 0000000000..cd7bfd07bf --- /dev/null +++ b/source/frontend/src/models/api/generated/ApiGen_Concepts_AcquisitionFileTakingStatuses.ts @@ -0,0 +1,13 @@ +/** + * File autogenerated by TsGenerator. + * Do not manually modify, changes made to this file will be lost when this file is regenerated. + */ +import { ApiGen_Base_BaseAudit } from './ApiGen_Base_BaseAudit'; +import { ApiGen_Base_CodeType } from './ApiGen_Base_CodeType'; + +// LINK: @backend/apimodels/Models/Concepts/AcquisitionFile/AcquisitionFileTakingStatusesModel.cs +export interface ApiGen_Concepts_AcquisitionFileTakingStatuses extends ApiGen_Base_BaseAudit { + id: number; + acquisitionFileId: number; + takingStatusTypeCode: ApiGen_Base_CodeType | null; +} diff --git a/source/frontend/src/models/defaultInitializers.ts b/source/frontend/src/models/defaultInitializers.ts index 961e6a39e7..b0079e66fa 100644 --- a/source/frontend/src/models/defaultInitializers.ts +++ b/source/frontend/src/models/defaultInitializers.ts @@ -199,6 +199,11 @@ export const getEmptyAcquisitionFile = (): ApiGen_Concepts_AcquisitionFile => { deliveryDate: null, estimatedCompletionDate: null, possessionDate: null, + acquisitionFileProgressStatuses: [], + acquisitionFileAppraisalStatusTypeCode: null, + acquisitionFileLegalSurveyStatusTypeCode: null, + acquisitionFileTakingStatuses: [], + acquisitionFileExpropiationRiskStatusTypeCode: null, acquisitionPhysFileStatusTypeCode: null, acquisitionTypeCode: null, subfileInterestTypeCode: null,