-
Notifications
You must be signed in to change notification settings - Fork 21
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
Issue #1893 #2709
base: master
Are you sure you want to change the base?
Issue #1893 #2709
Conversation
Pushing for my partner on the project, as she was not added as a collaborator and couldn't make a PR. Added functionality to DemoDataInitializerService: • Reads demo_entities.json from the assets folder. • Logs a message if the file is found or defaults to the existing hardcoded setup if not. • Prepares for future insertion of JSON data into the database for scenario-specific demo customization. Co-Authored-By: Mira Panjaitan <113065773+mnauli@users.noreply.github.com>
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.
Thanks for contributing, @mnauli! Welcome to the Aam Digital community 😃
I think you should be able to open Pull Requests yourself without special permissions, if you fork the repository to your personal GitHub space (at least I don't see @kumarannathan having special access to our repository either). We are also happy to add anybody interested to contribute regularly, so that they can create branches directly in the repository.
When running your branch, I see the log message for the entities loaded from file 👍
Are you already looking into the steps to adjust or skip the DemoDataService generating the default data and instead saving the data you loaded from file (using the EntityMapperService)?
|
||
// Load and parse the demo_entities.json file before publishing demo data | ||
const demoDataFromJson = await this.loadDemoEntities(); | ||
if (demoDataFromJson?.docs) { | ||
console.log("Loaded demo_entities.json:", demoDataFromJson); | ||
} else { | ||
console.log( | ||
"No demo_entities.json found, proceeding with default demo setup.", | ||
); | ||
} | ||
|
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.
To keep the different functionalities separated and easier to understand, maybe you can create a new Angular Service ("DemoDataFromFileService" or something ...) for your logic. Then we can here in the DemoDataInitializerService (or possibly in the DemoDataService) just call the loaded or the generated data service
Pushing for my partner, @mnauli, on the project, as she was not added as a collaborator and couldn't make a PR.
Co-authored-by: Mira Panjaitan mnauli@umich.edu
Added functionality to DemoDataInitializerService:
• Reads demo_entities.json from the assets folder.
• Logs a message if the file is found or defaults to the existing hardcoded setup if not.
• Prepares for future insertion of JSON data into the database for scenario-specific demo customization.