-
Notifications
You must be signed in to change notification settings - Fork 15
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.activities: dto mapping to endpoint #5911
feat.activities: dto mapping to endpoint #5911
Conversation
6bd726a
to
110d840
Compare
110d840
to
a1960c6
Compare
a1960c6
to
0e7834b
Compare
0e7834b
to
abdbc2e
Compare
abdbc2e
to
8fc0512
Compare
8fc0512
to
977f51b
Compare
774809b
to
94ca99d
Compare
977f51b
to
3e240af
Compare
94ca99d
to
836f386
Compare
8de13d2
to
4889e59
Compare
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.
Now this is easy to read code! :)
@diderikvw I've tried to align with the guidelines to have one export per file, but I think this is a great example of why I didn't like this guideline to begin with (as per our old discussions about it). I think that what I've pushed makes it simpler to answer the question "where should I put this?" but IMHO it does not make the code simpler / easier-to-use / easier-to-read / easier-to-navigate than what was there before: |
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.
Ok, great you addressed these.
Just a few small things left.
One of which here (because I cannot reply there for some reason):
I've tried to align with the guidelines to have one export per file, but I think this is a great example of why I didn't like this guideline to begin with (as per our old discussions about it).
I am happy to have a conversation about changing this convention. But I do want to have some convention on this and not let it depend on "whatever the developer favors who happens to work on this code". IMO having it "all the same way" does improve readability, even if TS code-wise it is not as efficient as could be.
export interface DataChangeActivity extends BaseActivity { | ||
type: ActivityTypeEnum.DataChange; | ||
attributes: { | ||
fieldName: string | null; |
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.
What is the necessity of having the fields to be | null? Not having this would make using the interface simpler.
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 stems from the input data being nullable:
[key: string]: string | null; |
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.
Ok, I would like to discuss this with @PeterSmallenbroek , related to the ##TODOs already in the code.
services/121-service/src/activities/interfaces/financial-service-provider.interface.ts
Show resolved
Hide resolved
5cf7221
to
479609c
Compare
* feat.activities: dto mapping to endpoint AB#30664 * add permissions handling AB#30716 * One export per file
* feat.activities: dto mapping to endpoint AB#30664 * add permissions handling AB#30716 * One export per file
* feat.activities: dto mapping to endpoint AB#30664 * add permissions handling AB#30716 * One export per file
* feat.activities: dto mapping to endpoint AB#30664 * add permissions handling AB#30716 * One export per file
* activity module & type * refactor: event scoped repository * repositories & types * Activities review Peter's code (#5908) Some comments and small changes * activities: fix unit tests (#5914) * activities: fix unit tests * temporarily disable exports * feat.activities: dto mapping to endpoint (#5911) * feat.activities: dto mapping to endpoint AB#30664 * add permissions handling AB#30716 * One export per file * Resolve TODOs activities endpoint (#5928) * resolve TODOs * Update services/121-service/src/activities/activities.controller.ts Co-authored-by: Domenico Gemoli <dgemoli@redcross.nl> --------- Co-authored-by: Domenico Gemoli <dgemoli@redcross.nl> --------- Co-authored-by: diderikvw <diderik@diderikvanwingerden.com> Co-authored-by: Domenico Gemoli <dgemoli@redcross.nl>
AB#30664
Checklist before requesting a review