-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat:#712 migrate angular 17 #731
Conversation
…ing moment from fom-add-edit compoent with luxon.
…on (leaflet, leaflet.markercluster and object-hash).
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.
LGTM, lots of work! i noticed 3 files are deleted, were they not being used or did you move the code to somewhere else
Thanks for noticing that! Yes, I noticed those files are from pre-FOM era and not being used during upgrading. It will be headache in the future so decided to remove them. |
@@ -10,7 +11,7 @@ export class InteractionDetailForm implements Pick<InteractionRequest, typeof UP | |||
|
|||
@required() | |||
@prop() | |||
communicationDate: string = ''; | |||
communicationDatePickerDate: Date; // for datePicker only |
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.
Why is this needed? Maybe expand on this comment a bit.
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.
Hi Basil, I renamed this field and comment is added for more detail.
When replacing library moment
with 'luxon`, I found previously moment was TOO smart that it was both good with init with string type and date type. However, when switching to 'luxon', it did not work anymore for this field. So I decided to rename this field and specifically gave it a 'Date' type, that's what datePicker will set and to avoid confusion with setting to 'body' field for 'communicationDate' which only accepts 'string' type.
private fomFilters: Map<string, IFilter | IMultiFilter>; | ||
public fomNumberFilter = new Filter<number>({ filter: { queryParam: 'fomNumber', value: null }}); | ||
public forestClientNameFilter = new Filter<string>({ filter: { queryParam: 'fcName', value: null }}); | ||
public commentStatusFilters: MultiFilter<boolean>; // For 'Commenting Open' or 'Commenting Closed'. | ||
public postedOnAfterFilter = new Filter<Date>({ filter: { queryParam: 'pdOnAfter', value: null } }); | ||
readonly minDate = moment('2018-03-23').toDate(); // first app created | ||
readonly maxDate = moment().toDate(); // today | ||
readonly minDate = DateTime.fromISO('2018-03-23').toJSDate(); // first app created |
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 date is not correct (too far in the past), so I question whathever this logic is for...
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.
Hi @basilv, This date was not changed this time, but I did not know why this date was set as such. Seems it was already like this when FOM was copying over from previous project... Do you want to change this? But I don't see it will actually affect anything, it is a minimum date in the past for datePicker you can pick for "postedOnAfter".
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.
Left a couple comments...
Overall looks good. My main concerns from a testing perspective:
|
@ianliuwk1019 almost forgot - your comment at the top mentions removing ngx-bootstrap, but I'm pretty sure I still saw it listed as a dependency. |
Right! Thanks @basilv, that was a mistake in the comment. I meant to say removing 'ngx-dropzone' from 'public' project module. I adjusted the comment. |
Admin:
Public:
// -------------------------------------------------------------
Note:
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Once merged, code will be promoted and handed off to following workflow run.
ttps://github.com/bcgov/nr-fom/actions/workflows/merge-main.yml)
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Once merged, code will be promoted and handed off to following workflow run.