@flusys/ng-auth 1.0.0-beta → 1.1.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -406,6 +406,27 @@ getCompanyBranches(companyId); // User's permitted branches
406
406
  - Email/password validation
407
407
  - Terms acceptance
408
408
 
409
+ ### Profile Page
410
+
411
+ **ProfilePageComponent** (`/profile`)
412
+ - Update name and phone
413
+ - Upload profile picture (requires `PROFILE_UPLOAD_PROVIDER` from ng-storage)
414
+ - Change password
415
+ - View company/branch info (if company feature enabled)
416
+ - View roles/actions (requires `PROFILE_PERMISSION_PROVIDER` from ng-iam)
417
+
418
+ **Optional Provider Dependencies:**
419
+
420
+ | Provider | Source | Feature Enabled |
421
+ |----------|--------|-----------------|
422
+ | `PROFILE_UPLOAD_PROVIDER` | ng-storage via `provideStorageProviders()` | Profile picture upload |
423
+ | `PROFILE_PERMISSION_PROVIDER` | ng-iam via `provideIamProviders()` | Roles/actions display |
424
+
425
+ **Graceful Degradation:**
426
+ - If provider not registered, feature shows "not enabled" message
427
+ - If service disabled in config, section is hidden
428
+ - No errors thrown for missing optional providers
429
+
409
430
  ### Administration Pages
410
431
 
411
432
  **AdministrationPageComponent** (`/administration`)
@@ -513,6 +534,21 @@ import { ADMINISTRATION_ROUTES } from '@flusys/ng-auth';
513
534
  }
514
535
  ```
515
536
 
537
+ ### PROFILE_ROUTES
538
+
539
+ User profile page routes.
540
+
541
+ ```typescript
542
+ import { PROFILE_ROUTES } from '@flusys/ng-auth';
543
+
544
+ // Route: /profile
545
+ {
546
+ path: 'profile',
547
+ canActivate: [authGuard],
548
+ children: PROFILE_ROUTES
549
+ }
550
+ ```
551
+
516
552
  ---
517
553
 
518
554
  ## Setup
@@ -529,6 +565,8 @@ import {
529
565
  provideAuthLayoutIntegration,
530
566
  provideAuthProviders
531
567
  } from '@flusys/ng-auth';
568
+ import { provideIamProviders } from '@flusys/ng-iam';
569
+ import { provideStorageProviders } from '@flusys/ng-storage';
532
570
 
533
571
  export const appConfig: ApplicationConfig = {
534
572
  providers: [
@@ -542,7 +580,9 @@ export const appConfig: ApplicationConfig = {
542
580
  ),
543
581
  { provide: APP_CONFIG, useValue: DEFAULT_APP_CONFIG },
544
582
  ...provideAuthLayoutIntegration(),
545
- ...provideAuthProviders()
583
+ ...provideAuthProviders(),
584
+ ...provideIamProviders(), // Enables permissions display on profile page
585
+ ...provideStorageProviders(), // Enables profile picture upload
546
586
  ]
547
587
  };
548
588
  ```
@@ -551,7 +591,7 @@ export const appConfig: ApplicationConfig = {
551
591
 
552
592
  ```typescript
553
593
  import { Routes } from '@angular/router';
554
- import { authGuard, guestGuard, AUTH_ROUTES, ADMINISTRATION_ROUTES } from '@flusys/ng-auth';
594
+ import { authGuard, guestGuard, AUTH_ROUTES, ADMINISTRATION_ROUTES, PROFILE_ROUTES } from '@flusys/ng-auth';
555
595
 
556
596
  export const routes: Routes = [
557
597
  { path: 'auth', children: AUTH_ROUTES },
@@ -560,7 +600,8 @@ export const routes: Routes = [
560
600
  canActivate: [authGuard],
561
601
  children: [
562
602
  { path: 'dashboard', loadComponent: () => import('./dashboard.component') },
563
- { path: 'administration', children: ADMINISTRATION_ROUTES }
603
+ { path: 'administration', children: ADMINISTRATION_ROUTES },
604
+ { path: 'profile', children: PROFILE_ROUTES }
564
605
  ]
565
606
  }
566
607
  ];
@@ -770,5 +811,5 @@ providers: [
770
811
 
771
812
  ---
772
813
 
773
- **Last Updated:** 2026-02-15
814
+ **Last Updated:** 2026-02-16
774
815
  **Angular Version:** 21