-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSP-6948 : Create a disposition file #3631
Conversation
eddherrera
commented
Dec 1, 2023
# Conflicts: # source/backend/entities/Partials/DispositionStatusTypeCode.cs # source/backend/tests/core/Entities/DispositionFileHelper.cs
adding a property to a disposition file doesn't appear to work. Clicking the drop marker icon on the map doesn't seem to add anything to the list. |
[HasPermission(Permissions.DispositionAdd)] | ||
[Produces("application/json")] | ||
[ProducesResponseType(typeof(DispositionFileModel), 200)] | ||
[SwaggerOperation(Tags = new[] { "dispositionfile" })] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add:
[TypeFilter(typeof(NullJsonResultFilter))]
to ensure that null values are handled appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
} | ||
else | ||
{ | ||
if (overrideCodes.Contains(UserOverrideCode.DisposingPropertyNotInventoried)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some potential to extract this repeated code into a shared method.
(153 - 161
try | ||
{ | ||
var foundProperty = _propertyRepository.GetByPid(pid); | ||
dispProperty.PropertyId = foundProperty.Internal_Id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing the
UpdateLocation(acquisitionProperty.Property, ref foundProperty, userOverrideCodes);
method that is in the acquisitionfileservice.
What that'll mean is that when a pre-existing property is added to a disposition file it will not be possible to update it's location on the map. Perhaps this is ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
@@ -15,6 +16,11 @@ namespace Pims.Dal.Repositories | |||
/// </summary> | |||
public class DispositionFileRepository : BaseRepository<PimsDispositionFile>, IDispositionFileRepository | |||
{ | |||
private const string FILENUMBERPREFIX = "D"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this. The D in front of the file number is for display only, we don't want the D in the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
using var scope = Logger.QueryScope(); | ||
disposition.ThrowIfNull(nameof(disposition)); | ||
|
||
disposition.FileNumber = GeneratetDispositionFileNumber(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Generatet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
dispositionInitialValues: DispositionFormModel; | ||
loading: boolean; | ||
displayFormInvalid: boolean; | ||
// onSubmit: (dispositionFile: Api_DispositionFile) => Promise<Api_DispositionFile | undefined>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need the properties selector to add properties to the form.
# Conflicts: # source/backend/api/Areas/Disposition/Controllers/DispositionFileController.cs # source/backend/api/Services/IDispositionFileService.cs # source/backend/dal/Repositories/DispositionFileRepository.cs # source/frontend/src/constants/API.ts # source/frontend/src/hooks/pims-api/useApiDispositionFile.ts # source/frontend/src/hooks/repositories/useDispositionProvider.ts
Fixed issues, pending to review with Ana |
# Conflicts: # source/backend/api/Areas/Disposition/Controllers/DispositionFileController.cs # source/backend/apimodels/Models/Concepts/DispositionFile/DispositionFileMap.cs # source/backend/dal/Exceptions/OverrideExceptions.cs