change generation of angular router component registration order

This commit is contained in:
Roland Schneider 2025-11-21 15:25:16 +01:00
parent af456a14bd
commit 1d1702408a

View File

@ -87,11 +87,11 @@ export class AngularGeneratorService {
const auth = { role: 'admin' };
// Pass the auth object to each route registration call
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}FormComponent`, formCompPath, `${names.plural}/new`, auth);
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}FormComponent`, formCompPath, `${names.plural}/:id/edit`, auth);
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}DetailsComponent`, detailsCompPath, `${names.plural}/:id`, auth);
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}TableComponent`, tableCompPath, `${names.plural}/table`, auth);
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}ListComponent`, listCompPath, names.plural, auth);
await this.moduleUpdaterService.addRouteToAngularApp(`${names.pascal}FormComponent`, formCompPath, `${names.plural}/new`, auth);
// --- END OF FIX ---
console.log(`✅ Angular files for "${tableName}" created successfully in: ${featureDir}`);