@flusys/ng-auth 1.0.1 → 1.1.0
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 +46 -3
- package/fesm2022/flusys-ng-auth.mjs +187 -90
- package/fesm2022/flusys-ng-auth.mjs.map +1 -1
- package/package.json +4 -4
- package/types/flusys-ng-auth.d.ts +11 -1
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
`@flusys/ng-auth` provides complete authentication functionality including login, registration, token management, company/branch selection, user administration, and permission handling.
|
|
6
6
|
|
|
7
7
|
**Package:** `@flusys/ng-auth`
|
|
8
|
+
**Version:** 1.1.0
|
|
8
9
|
**Dependencies:** ng-core, ng-shared, ng-layout
|
|
9
10
|
**Build:** `npm run build:ng-auth`
|
|
10
11
|
|
|
@@ -27,7 +28,9 @@
|
|
|
27
28
|
│ Guards │
|
|
28
29
|
│ ├── authGuard (requires authentication) │
|
|
29
30
|
│ ├── guestGuard (allows only unauthenticated) │
|
|
30
|
-
│
|
|
31
|
+
│ ├── companyFeatureGuard (requires company feature enabled) │
|
|
32
|
+
│ ├── emailFeatureGuard (requires email service enabled) │
|
|
33
|
+
│ └── signUpFeatureGuard (requires sign-up enabled) │
|
|
31
34
|
├─────────────────────────────────────────────────────────────┤
|
|
32
35
|
│ Interceptors │
|
|
33
36
|
│ ├── authInterceptor (adds JWT + tenant headers) │
|
|
@@ -273,7 +276,39 @@ import { companyFeatureGuard } from '@flusys/ng-auth';
|
|
|
273
276
|
}
|
|
274
277
|
```
|
|
275
278
|
|
|
276
|
-
**Checks:** `
|
|
279
|
+
**Checks:** `enableCompanyFeature` in APP_CONFIG. Redirects to `/` if disabled.
|
|
280
|
+
|
|
281
|
+
### emailFeatureGuard
|
|
282
|
+
|
|
283
|
+
Protects email-related routes (forgot-password, reset-password, verify-email).
|
|
284
|
+
|
|
285
|
+
```typescript
|
|
286
|
+
import { emailFeatureGuard } from '@flusys/ng-auth';
|
|
287
|
+
|
|
288
|
+
{
|
|
289
|
+
path: 'auth/forgot-password',
|
|
290
|
+
canActivate: [emailFeatureGuard, guestGuard],
|
|
291
|
+
loadComponent: () => import('./forgot-password.component')
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Checks:** `services.email.enabled` in APP_CONFIG. Redirects to `/auth/login` if disabled.
|
|
296
|
+
|
|
297
|
+
### signUpFeatureGuard
|
|
298
|
+
|
|
299
|
+
Protects registration route when sign-up is disabled.
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
import { signUpFeatureGuard } from '@flusys/ng-auth';
|
|
303
|
+
|
|
304
|
+
{
|
|
305
|
+
path: 'auth/register',
|
|
306
|
+
canActivate: [signUpFeatureGuard, guestGuard],
|
|
307
|
+
loadComponent: () => import('./register.component')
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Checks:** `enableSignUp` in APP_CONFIG (defaults to `true`). Redirects to `/auth/login` if `false`.
|
|
277
312
|
|
|
278
313
|
---
|
|
279
314
|
|
|
@@ -408,12 +443,19 @@ All page components follow Angular 21 best practices:
|
|
|
408
443
|
- Auto-selects if only one company/branch available
|
|
409
444
|
- Stores returnUrl for post-login redirect
|
|
410
445
|
- Responsive form layout with mobile padding
|
|
446
|
+
- **Conditional UI based on config:**
|
|
447
|
+
- "Forgot password?" link hidden when `services.email.enabled: false`
|
|
448
|
+
- "Sign Up" link hidden when `enableSignUp: false`
|
|
411
449
|
|
|
412
450
|
**RegisterPageComponent** (`/auth/register`)
|
|
413
451
|
- User registration with optional company creation
|
|
414
452
|
- Two-column responsive grid layout
|
|
415
453
|
- Email/password validation with signal forms
|
|
416
454
|
- Company details section (when company feature enabled)
|
|
455
|
+
- **Default company/branch support:**
|
|
456
|
+
- When `defaultCompanySlug` is set: pre-fills company code field and makes it readonly
|
|
457
|
+
- When `defaultBranchSlug` is set: pre-fills branch code field and makes it readonly
|
|
458
|
+
- "Create new company" option hidden when defaults are configured
|
|
417
459
|
|
|
418
460
|
**ForgotPasswordPageComponent** (`/auth/forgot-password`)
|
|
419
461
|
- Email input with validation
|
|
@@ -1091,7 +1133,8 @@ If using `*hasPermission` directive, it will also respect wildcard:
|
|
|
1091
1133
|
|
|
1092
1134
|
---
|
|
1093
1135
|
|
|
1094
|
-
**Last Updated:** 2026-02-
|
|
1136
|
+
**Last Updated:** 2026-02-23
|
|
1137
|
+
**Version:** 1.1.0
|
|
1095
1138
|
**Angular Version:** 21
|
|
1096
1139
|
|
|
1097
1140
|
## Component Checklist
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Injectable, signal, computed, effect, PLATFORM_ID, ChangeDetectionStrategy, Component, untracked, DestroyRef, input, output, makeStateKey, TransferState } from '@angular/core';
|
|
4
|
-
import { APP_CONFIG, getServiceUrl, isCompanyFeatureEnabled, isFeatureEnabled, getPermissionMode } from '@flusys/ng-core';
|
|
4
|
+
import { APP_CONFIG, getServiceUrl, isCompanyFeatureEnabled, isEmailFeatureEnabled, isSignUpEnabled, isFeatureEnabled, getPermissionMode, getDefaultCompanySlug, getDefaultBranchSlug } from '@flusys/ng-core';
|
|
5
5
|
import * as i2$1 from '@angular/router';
|
|
6
6
|
import { Router, RouterOutlet, RouterLink, RouterLinkActive, ActivatedRoute } from '@angular/router';
|
|
7
7
|
import { of, timeout, switchMap, map, tap, catchError, shareReplay, finalize, BehaviorSubject, throwError, filter, take, firstValueFrom } from 'rxjs';
|
|
@@ -672,6 +672,22 @@ const companyFeatureGuard = () => {
|
|
|
672
672
|
return router.createUrlTree(['/']);
|
|
673
673
|
return true;
|
|
674
674
|
};
|
|
675
|
+
/** Protects routes requiring email feature to be enabled */
|
|
676
|
+
const emailFeatureGuard = () => {
|
|
677
|
+
const router = inject(Router);
|
|
678
|
+
const appConfig = inject(APP_CONFIG);
|
|
679
|
+
if (!appConfig.services.email?.enabled)
|
|
680
|
+
return router.createUrlTree([AUTH_ENDPOINTS.LOGIN]);
|
|
681
|
+
return true;
|
|
682
|
+
};
|
|
683
|
+
/** Protects routes requiring sign-up feature to be enabled */
|
|
684
|
+
const signUpFeatureGuard = () => {
|
|
685
|
+
const router = inject(Router);
|
|
686
|
+
const appConfig = inject(APP_CONFIG);
|
|
687
|
+
if (appConfig.enableSignUp === false)
|
|
688
|
+
return router.createUrlTree([AUTH_ENDPOINTS.LOGIN]);
|
|
689
|
+
return true;
|
|
690
|
+
};
|
|
675
691
|
|
|
676
692
|
/** Endpoints that need withCredentials for cookie handling */
|
|
677
693
|
const COOKIE_ENDPOINTS = [
|
|
@@ -789,21 +805,22 @@ const AUTH_ROUTES = [
|
|
|
789
805
|
{
|
|
790
806
|
path: 'register',
|
|
791
807
|
loadComponent: () => Promise.resolve().then(function () { return registerPage_component; }).then((m) => m.RegisterPageComponent),
|
|
792
|
-
canActivate: [guestGuard],
|
|
808
|
+
canActivate: [signUpFeatureGuard, guestGuard],
|
|
793
809
|
},
|
|
794
810
|
{
|
|
795
811
|
path: 'forgot-password',
|
|
796
812
|
loadComponent: () => Promise.resolve().then(function () { return forgotPasswordPage_component; }).then((m) => m.ForgotPasswordPageComponent),
|
|
797
|
-
canActivate: [guestGuard],
|
|
813
|
+
canActivate: [emailFeatureGuard, guestGuard],
|
|
798
814
|
},
|
|
799
815
|
{
|
|
800
816
|
path: 'reset-password',
|
|
801
817
|
loadComponent: () => Promise.resolve().then(function () { return resetPasswordPage_component; }).then((m) => m.ResetPasswordPageComponent),
|
|
802
|
-
canActivate: [guestGuard],
|
|
818
|
+
canActivate: [emailFeatureGuard, guestGuard],
|
|
803
819
|
},
|
|
804
820
|
{
|
|
805
821
|
path: 'verify-email',
|
|
806
822
|
loadComponent: () => Promise.resolve().then(function () { return verifyEmailPage_component; }).then((m) => m.VerifyEmailPageComponent),
|
|
823
|
+
canActivate: [emailFeatureGuard],
|
|
807
824
|
},
|
|
808
825
|
{
|
|
809
826
|
path: '',
|
|
@@ -2862,6 +2879,8 @@ class LoginPageComponent {
|
|
|
2862
2879
|
});
|
|
2863
2880
|
isSelectionFormValid = computed(() => this.selectionForm().valid(), ...(ngDevMode ? [{ debugName: "isSelectionFormValid" }] : []));
|
|
2864
2881
|
companyFeatureEnabled = computed(() => isCompanyFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "companyFeatureEnabled" }] : []));
|
|
2882
|
+
emailFeatureEnabled = computed(() => isEmailFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "emailFeatureEnabled" }] : []));
|
|
2883
|
+
signUpEnabled = computed(() => isSignUpEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "signUpEnabled" }] : []));
|
|
2865
2884
|
sessionId = null;
|
|
2866
2885
|
companies = signal([], ...(ngDevMode ? [{ debugName: "companies" }] : []));
|
|
2867
2886
|
userName = signal('', ...(ngDevMode ? [{ debugName: "userName" }] : []));
|
|
@@ -3144,11 +3163,13 @@ class LoginPageComponent {
|
|
|
3144
3163
|
[formField]="loginForm.rememberMe" />
|
|
3145
3164
|
<span>Remember me</span>
|
|
3146
3165
|
</label>
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3166
|
+
@if (emailFeatureEnabled()) {
|
|
3167
|
+
<span
|
|
3168
|
+
class="font-medium no-underline ml-2 text-right cursor-pointer text-primary"
|
|
3169
|
+
routerLink="/auth/forgot-password">
|
|
3170
|
+
Forgot password?
|
|
3171
|
+
</span>
|
|
3172
|
+
}
|
|
3152
3173
|
</div>
|
|
3153
3174
|
|
|
3154
3175
|
<p-button
|
|
@@ -3158,12 +3179,14 @@ class LoginPageComponent {
|
|
|
3158
3179
|
[loading]="isLoading()"
|
|
3159
3180
|
[disabled]="!isLoginFormValid() || isLoading()" />
|
|
3160
3181
|
|
|
3161
|
-
|
|
3162
|
-
<
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3182
|
+
@if (signUpEnabled()) {
|
|
3183
|
+
<div class="flex items-center justify-center mt-4 gap-2">
|
|
3184
|
+
<span class="font-medium">Don't have an account?</span>
|
|
3185
|
+
<a routerLink="/auth/register" class="font-semibold text-primary cursor-pointer">
|
|
3186
|
+
Sign Up
|
|
3187
|
+
</a>
|
|
3188
|
+
</div>
|
|
3189
|
+
}
|
|
3167
3190
|
</form>
|
|
3168
3191
|
}
|
|
3169
3192
|
|
|
@@ -3348,11 +3371,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3348
3371
|
[formField]="loginForm.rememberMe" />
|
|
3349
3372
|
<span>Remember me</span>
|
|
3350
3373
|
</label>
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3374
|
+
@if (emailFeatureEnabled()) {
|
|
3375
|
+
<span
|
|
3376
|
+
class="font-medium no-underline ml-2 text-right cursor-pointer text-primary"
|
|
3377
|
+
routerLink="/auth/forgot-password">
|
|
3378
|
+
Forgot password?
|
|
3379
|
+
</span>
|
|
3380
|
+
}
|
|
3356
3381
|
</div>
|
|
3357
3382
|
|
|
3358
3383
|
<p-button
|
|
@@ -3362,12 +3387,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
3362
3387
|
[loading]="isLoading()"
|
|
3363
3388
|
[disabled]="!isLoginFormValid() || isLoading()" />
|
|
3364
3389
|
|
|
3365
|
-
|
|
3366
|
-
<
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3390
|
+
@if (signUpEnabled()) {
|
|
3391
|
+
<div class="flex items-center justify-center mt-4 gap-2">
|
|
3392
|
+
<span class="font-medium">Don't have an account?</span>
|
|
3393
|
+
<a routerLink="/auth/register" class="font-semibold text-primary cursor-pointer">
|
|
3394
|
+
Sign Up
|
|
3395
|
+
</a>
|
|
3396
|
+
</div>
|
|
3397
|
+
}
|
|
3371
3398
|
</form>
|
|
3372
3399
|
}
|
|
3373
3400
|
|
|
@@ -4343,6 +4370,10 @@ class RegisterPageComponent {
|
|
|
4343
4370
|
returnUrl = input('', ...(ngDevMode ? [{ debugName: "returnUrl" }] : []));
|
|
4344
4371
|
isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
4345
4372
|
companyFeatureEnabled = computed(() => isCompanyFeatureEnabled(this.appConfig), ...(ngDevMode ? [{ debugName: "companyFeatureEnabled" }] : []));
|
|
4373
|
+
defaultCompanySlug = computed(() => getDefaultCompanySlug(this.appConfig), ...(ngDevMode ? [{ debugName: "defaultCompanySlug" }] : []));
|
|
4374
|
+
defaultBranchSlug = computed(() => getDefaultBranchSlug(this.appConfig), ...(ngDevMode ? [{ debugName: "defaultBranchSlug" }] : []));
|
|
4375
|
+
hasDefaultCompany = computed(() => !!this.defaultCompanySlug(), ...(ngDevMode ? [{ debugName: "hasDefaultCompany" }] : []));
|
|
4376
|
+
hasDefaultBranch = computed(() => !!this.defaultBranchSlug(), ...(ngDevMode ? [{ debugName: "hasDefaultBranch" }] : []));
|
|
4346
4377
|
userFormModel = signal({
|
|
4347
4378
|
name: '',
|
|
4348
4379
|
email: '',
|
|
@@ -4390,14 +4421,24 @@ class RegisterPageComponent {
|
|
|
4390
4421
|
return userValid;
|
|
4391
4422
|
}, ...(ngDevMode ? [{ debugName: "isFormValid" }] : []));
|
|
4392
4423
|
constructor() {
|
|
4424
|
+
// Initialize with defaults from config or query params
|
|
4393
4425
|
effect(() => {
|
|
4394
4426
|
const params = this.queryParamMap();
|
|
4395
4427
|
if (!params || this.companySlugInitialized)
|
|
4396
4428
|
return;
|
|
4397
4429
|
this.companySlugInitialized = true;
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4430
|
+
// Priority: config defaults > query params
|
|
4431
|
+
const configCompanySlug = this.defaultCompanySlug();
|
|
4432
|
+
const configBranchSlug = this.defaultBranchSlug();
|
|
4433
|
+
const queryCompanySlug = params.get('companySlug');
|
|
4434
|
+
const companySlug = configCompanySlug || queryCompanySlug || '';
|
|
4435
|
+
const branchSlug = configBranchSlug || '';
|
|
4436
|
+
if (companySlug || branchSlug) {
|
|
4437
|
+
this.companyFormModel.update((model) => ({
|
|
4438
|
+
...model,
|
|
4439
|
+
companySlug,
|
|
4440
|
+
branchSlug,
|
|
4441
|
+
}));
|
|
4401
4442
|
}
|
|
4402
4443
|
});
|
|
4403
4444
|
}
|
|
@@ -4603,22 +4644,28 @@ class RegisterPageComponent {
|
|
|
4603
4644
|
Company Details
|
|
4604
4645
|
</div>
|
|
4605
4646
|
<span class="text-muted-color font-medium"
|
|
4606
|
-
|
|
4647
|
+
>@if (hasDefaultCompany()) {
|
|
4648
|
+
You will join the default company
|
|
4649
|
+
} @else {
|
|
4650
|
+
Join existing or create new company
|
|
4651
|
+
}</span
|
|
4607
4652
|
>
|
|
4608
4653
|
</div>
|
|
4609
4654
|
|
|
4610
|
-
|
|
4611
|
-
<
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4655
|
+
@if (!hasDefaultCompany()) {
|
|
4656
|
+
<div class="mb-4">
|
|
4657
|
+
<label
|
|
4658
|
+
class="p-checkbox-native"
|
|
4659
|
+
(click)="onCreateCompanyToggle()"
|
|
4660
|
+
>
|
|
4661
|
+
<input
|
|
4662
|
+
type="checkbox"
|
|
4663
|
+
[formField]="companyForm.createNewCompany"
|
|
4664
|
+
/>
|
|
4665
|
+
<span>Create new company</span>
|
|
4666
|
+
</label>
|
|
4667
|
+
</div>
|
|
4668
|
+
}
|
|
4622
4669
|
|
|
4623
4670
|
@if (!companyFormModel().createNewCompany) {
|
|
4624
4671
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
|
@@ -4626,29 +4673,51 @@ class RegisterPageComponent {
|
|
|
4626
4673
|
<label for="companySlug" class="block font-medium mb-2"
|
|
4627
4674
|
>Company Code</label
|
|
4628
4675
|
>
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
>
|
|
4638
|
-
|
|
4676
|
+
@if (hasDefaultCompany()) {
|
|
4677
|
+
<input
|
|
4678
|
+
pInputText
|
|
4679
|
+
id="companySlug"
|
|
4680
|
+
[value]="defaultCompanySlug()"
|
|
4681
|
+
class="w-full bg-surface-100"
|
|
4682
|
+
readonly
|
|
4683
|
+
/>
|
|
4684
|
+
<small class="text-muted-color">Pre-configured company</small>
|
|
4685
|
+
} @else {
|
|
4686
|
+
<input
|
|
4687
|
+
pInputText
|
|
4688
|
+
id="companySlug"
|
|
4689
|
+
[formField]="companyForm.companySlug"
|
|
4690
|
+
placeholder="Company code/slug"
|
|
4691
|
+
class="w-full"
|
|
4692
|
+
/>
|
|
4693
|
+
<small class="text-muted-color"
|
|
4694
|
+
>Enter company code to join</small
|
|
4695
|
+
>
|
|
4696
|
+
}
|
|
4639
4697
|
</div>
|
|
4640
4698
|
|
|
4641
4699
|
<div>
|
|
4642
4700
|
<label for="branchSlug" class="block font-medium mb-2"
|
|
4643
4701
|
>Branch Code</label
|
|
4644
4702
|
>
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4703
|
+
@if (hasDefaultBranch()) {
|
|
4704
|
+
<input
|
|
4705
|
+
pInputText
|
|
4706
|
+
id="branchSlug"
|
|
4707
|
+
[value]="defaultBranchSlug()"
|
|
4708
|
+
class="w-full bg-surface-100"
|
|
4709
|
+
readonly
|
|
4710
|
+
/>
|
|
4711
|
+
<small class="text-muted-color">Pre-configured branch</small>
|
|
4712
|
+
} @else {
|
|
4713
|
+
<input
|
|
4714
|
+
pInputText
|
|
4715
|
+
id="branchSlug"
|
|
4716
|
+
[formField]="companyForm.branchSlug"
|
|
4717
|
+
placeholder="Branch code (optional)"
|
|
4718
|
+
class="w-full"
|
|
4719
|
+
/>
|
|
4720
|
+
}
|
|
4652
4721
|
</div>
|
|
4653
4722
|
</div>
|
|
4654
4723
|
} @else {
|
|
@@ -4842,22 +4911,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4842
4911
|
Company Details
|
|
4843
4912
|
</div>
|
|
4844
4913
|
<span class="text-muted-color font-medium"
|
|
4845
|
-
|
|
4914
|
+
>@if (hasDefaultCompany()) {
|
|
4915
|
+
You will join the default company
|
|
4916
|
+
} @else {
|
|
4917
|
+
Join existing or create new company
|
|
4918
|
+
}</span
|
|
4846
4919
|
>
|
|
4847
4920
|
</div>
|
|
4848
4921
|
|
|
4849
|
-
|
|
4850
|
-
<
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4922
|
+
@if (!hasDefaultCompany()) {
|
|
4923
|
+
<div class="mb-4">
|
|
4924
|
+
<label
|
|
4925
|
+
class="p-checkbox-native"
|
|
4926
|
+
(click)="onCreateCompanyToggle()"
|
|
4927
|
+
>
|
|
4928
|
+
<input
|
|
4929
|
+
type="checkbox"
|
|
4930
|
+
[formField]="companyForm.createNewCompany"
|
|
4931
|
+
/>
|
|
4932
|
+
<span>Create new company</span>
|
|
4933
|
+
</label>
|
|
4934
|
+
</div>
|
|
4935
|
+
}
|
|
4861
4936
|
|
|
4862
4937
|
@if (!companyFormModel().createNewCompany) {
|
|
4863
4938
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
|
|
@@ -4865,29 +4940,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
4865
4940
|
<label for="companySlug" class="block font-medium mb-2"
|
|
4866
4941
|
>Company Code</label
|
|
4867
4942
|
>
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
>
|
|
4877
|
-
|
|
4943
|
+
@if (hasDefaultCompany()) {
|
|
4944
|
+
<input
|
|
4945
|
+
pInputText
|
|
4946
|
+
id="companySlug"
|
|
4947
|
+
[value]="defaultCompanySlug()"
|
|
4948
|
+
class="w-full bg-surface-100"
|
|
4949
|
+
readonly
|
|
4950
|
+
/>
|
|
4951
|
+
<small class="text-muted-color">Pre-configured company</small>
|
|
4952
|
+
} @else {
|
|
4953
|
+
<input
|
|
4954
|
+
pInputText
|
|
4955
|
+
id="companySlug"
|
|
4956
|
+
[formField]="companyForm.companySlug"
|
|
4957
|
+
placeholder="Company code/slug"
|
|
4958
|
+
class="w-full"
|
|
4959
|
+
/>
|
|
4960
|
+
<small class="text-muted-color"
|
|
4961
|
+
>Enter company code to join</small
|
|
4962
|
+
>
|
|
4963
|
+
}
|
|
4878
4964
|
</div>
|
|
4879
4965
|
|
|
4880
4966
|
<div>
|
|
4881
4967
|
<label for="branchSlug" class="block font-medium mb-2"
|
|
4882
4968
|
>Branch Code</label
|
|
4883
4969
|
>
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4970
|
+
@if (hasDefaultBranch()) {
|
|
4971
|
+
<input
|
|
4972
|
+
pInputText
|
|
4973
|
+
id="branchSlug"
|
|
4974
|
+
[value]="defaultBranchSlug()"
|
|
4975
|
+
class="w-full bg-surface-100"
|
|
4976
|
+
readonly
|
|
4977
|
+
/>
|
|
4978
|
+
<small class="text-muted-color">Pre-configured branch</small>
|
|
4979
|
+
} @else {
|
|
4980
|
+
<input
|
|
4981
|
+
pInputText
|
|
4982
|
+
id="branchSlug"
|
|
4983
|
+
[formField]="companyForm.branchSlug"
|
|
4984
|
+
placeholder="Branch code (optional)"
|
|
4985
|
+
class="w-full"
|
|
4986
|
+
/>
|
|
4987
|
+
}
|
|
4891
4988
|
</div>
|
|
4892
4989
|
</div>
|
|
4893
4990
|
} @else {
|
|
@@ -6861,5 +6958,5 @@ var verifyEmailPage_component = /*#__PURE__*/Object.freeze({
|
|
|
6861
6958
|
* Generated bundle index. Do not edit.
|
|
6862
6959
|
*/
|
|
6863
6960
|
|
|
6864
|
-
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_ROUTES, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_ROUTES, ProfilePageComponent, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, tokenRefreshInterceptor };
|
|
6961
|
+
export { ADMINISTRATION_ROUTES, AUTH_ENDPOINTS, AUTH_ROUTES, AdministrationPageComponent, AuthApiService, AuthCompanyApiProviderAdapter, AuthInitService, AuthLayoutApiAdapter, AuthLayoutStateAdapter, AuthStateProviderAdapter, AuthStateService, AuthUserPermissionProviderAdapter, AuthUserProviderAdapter, BranchApiService, BranchFormComponent, BranchListComponent, CompanyApiService, CompanyFormComponent, CompanyListComponent, ForgotPasswordPageComponent, LoginPageComponent, PROFILE_ROUTES, ProfilePageComponent, RegisterPageComponent, ResetPasswordPageComponent, TokenRefreshStateService, UserApiService, UserBranchPermissionDialogComponent, UserCompanyPermissionDialogComponent, UserFormComponent, UserListComponent, UserPermissionApiService, VerifyEmailPageComponent, authGuard, authInterceptor, companyFeatureGuard, emailFeatureGuard, guestGuard, isCompanySelectionResponse, isEmailVerificationRequired, isEndpoint, isLoginResponse, provideAuthLayoutIntegration, provideAuthProviders, signUpFeatureGuard, tokenRefreshInterceptor };
|
|
6865
6962
|
//# sourceMappingURL=flusys-ng-auth.mjs.map
|