dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Dspace 7 2882

Open VictorHugoDuranS opened this issue 1 year ago • 0 comments

Hi @tdonohue , I'm @jtimal partner, I like to share this PR with you:

References

  • Fixes #2882

Description

Instructions for Reviewers

I added a function for year input to convert partial number years to full year values.

List of changes in this PR:

  • Create the function called "completeDate" form component https://github.com/VictorHugoDuranS/dspace-angular/blob/4a2a911c795671cd72ad2dc96990a6f7b3ab64c3/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts
  • Validate if the year size is 1, then I set the default value as the current year after that 00 and finally the typed value, I consider the user typed that value as initial years.
  • Another validation is for lengths between 2 and 3, this value is overwritten in the current year considering the positions from left to right. *Finally if the value has length of 4 return the value written

To review and check I attach a video with the changes added:

https://github.com/DSpace/dspace-angular/assets/25066032/d780130e-ec4f-4ab0-912b-775a41b62d80

Checklist

  • [x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • [x] My PR passes ESLint validation using yarn lint
  • [x] My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • [x] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • [ ] If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • [ ] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • [x] If my PR fixes an issue ticket, I've linked them together.

VictorHugoDuranS avatar Jun 15 '24 06:06 VictorHugoDuranS