[NAE-2401] Timestamp of case dataSet change#320
Conversation
- add lastModifiedDataSet property to case
- fix tests
WalkthroughA new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts`:
- Line 24: The interface field lastModifiedDataSet is declared as a required
NaeDate but actual payloads and tests assign null, undefined, or empty arrays;
change its declaration to be optional and nullable (e.g., lastModifiedDataSet?:
NaeDate | null) in the interface to reflect real usage, and update any
tests/mocks (where [] is used) to use null/undefined or adjust mock data to
match the new nullable type; ensure references in panels.component.ts and
add-child-node.component.spec.ts still compile against lastModifiedDataSet?:
NaeDate | null.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f4437736-9aff-4356-91c2-f0fce59eb241
📒 Files selected for processing (7)
projects/nae-example-app/src/app/doc/panels/panels.component.tsprojects/netgrif-components-core/src/lib/authorization/permission/permission.service.spec.tsprojects/netgrif-components-core/src/lib/panel/case-panel/abstract-case-panel.component.spec.tsprojects/netgrif-components-core/src/lib/resources/interface/case.tsprojects/netgrif-components-core/src/lib/utility/tests/mocks/mock-case-resource.service.tsprojects/netgrif-components-core/src/lib/utility/tests/utility/create-mock-case.tsprojects/netgrif-components/src/lib/view/tree-case-view/tree-component/add-child-node/add-child-node.component.spec.ts
- fix according to PR
- add to changelog
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
projects/netgrif-components-core/src/lib/resources/interface/case.ts (1)
24-24:⚠️ Potential issue | 🟠 MajorAvoid a required
| undefinedfield in exportedCaseAPI.Line 24 makes
lastModifiedDataSetrequired while still allowingundefined. In TypeScript this is a compatibility footgun for object literals and can introduce breaking changes in a patch line. Prefer an optional field.Suggested fix
- lastModifiedDataSet: NaeDate | undefined; + lastModifiedDataSet?: NaeDate;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts` at line 24, The exported Case interface currently declares lastModifiedDataSet as a required field unioned with undefined (lastModifiedDataSet: NaeDate | undefined), which is a compatibility hazard; change this to an optional property on the Case interface (lastModifiedDataSet?: NaeDate) so callers can omit it without breaking object literal checks and update any references to treat it as possibly absent instead of explicitly undefined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Line 23: Update the changelog entry that currently reads "Timestamp of case
dataSet change" (the NAE-2401 entry) to use natural-language spelling by
replacing "dataSet" with "dataset" so it reads "Timestamp of case dataset
change"; edit the CHANGELOG.md entry for NAE-2401 accordingly.
---
Duplicate comments:
In `@projects/netgrif-components-core/src/lib/resources/interface/case.ts`:
- Line 24: The exported Case interface currently declares lastModifiedDataSet as
a required field unioned with undefined (lastModifiedDataSet: NaeDate |
undefined), which is a compatibility hazard; change this to an optional property
on the Case interface (lastModifiedDataSet?: NaeDate) so callers can omit it
without breaking object literal checks and update any references to treat it as
possibly absent instead of explicitly undefined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9f10bf8b-f87c-4b9f-8ae8-f00d68ec2440
📒 Files selected for processing (3)
CHANGELOG.mdprojects/nae-example-app/src/app/doc/panels/panels.component.tsprojects/netgrif-components-core/src/lib/resources/interface/case.ts
|



Description
Implements NAE-2401
Dependencies
none
Third party dependencies
Blocking Pull requests
How Has Been This Tested?
manually
Test Configuration
<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc. You can use >
Checklist:
Summary by CodeRabbit