fas-admin 0.0.96 → 0.0.98

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.
Files changed (24) hide show
  1. package/api/api-services/account-delete.service.d.ts +14 -0
  2. package/api/api-services/apply-subscription-plan.service.d.ts +16 -0
  3. package/api/apply-subscription-plan-result-vm.model.d.ts +4 -0
  4. package/api/apply-subscription-plan-to-company-im.model.d.ts +6 -0
  5. package/api/delete-result-vm.model.d.ts +4 -0
  6. package/api/platform-user-account-vm.model.d.ts +1 -0
  7. package/esm2022/api/api-services/account-delete.service.mjs +44 -0
  8. package/esm2022/api/api-services/apply-subscription-plan.service.mjs +42 -0
  9. package/esm2022/api/api-services/platform-users.service.mjs +2 -2
  10. package/esm2022/api/apply-subscription-plan-result-vm.model.mjs +2 -0
  11. package/esm2022/api/apply-subscription-plan-to-company-im.model.mjs +2 -0
  12. package/esm2022/api/delete-result-vm.model.mjs +2 -0
  13. package/esm2022/api/platform-user-account-vm.model.mjs +1 -1
  14. package/esm2022/lib/components/views/users/users-add-subscriptions/users-add-subscriptions.component.mjs +103 -43
  15. package/esm2022/lib/components/views/users/users-details/users-details.component.mjs +56 -30
  16. package/esm2022/lib/components/views/users/users-list/users-list.component.mjs +96 -20
  17. package/esm2022/lib/components/views/users/users.module.mjs +9 -4
  18. package/fesm2022/fas-admin.mjs +350 -110
  19. package/fesm2022/fas-admin.mjs.map +1 -1
  20. package/lib/components/views/users/users-add-subscriptions/users-add-subscriptions.component.d.ts +23 -17
  21. package/lib/components/views/users/users-details/users-details.component.d.ts +12 -9
  22. package/lib/components/views/users/users-list/users-list.component.d.ts +11 -2
  23. package/lib/components/views/users/users.module.d.ts +9 -8
  24. package/package.json +1 -1
@@ -1,22 +1,28 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { IDetailsControl } from '../../../../shared/models/details-control';
1
+ import { IPlatformSubscriptionPlanVm } from '../../../../../api/platform-subscription-plan-vm.model';
2
+ import { IPlatformUserAccountVm } from '../../../../../api/platform-user-account-vm.model';
3
+ import { OnInit } from '@angular/core';
3
4
  import * as i0 from "@angular/core";
4
- export declare class UsersAddSubscriptionsComponent implements OnInit, OnDestroy {
5
- dialogID_userAssignSub: string;
6
- private _expirationDateService;
7
- private dialogStateSubscription;
8
- private _dialogService;
9
- selectedSubscriptions: any[];
10
- dialogState: IDetailsControl;
11
- subcriptionsEntity: number;
12
- subscriptionStart: any;
13
- minimumDate: any;
5
+ export interface IAssignedSubscriptionResult {
6
+ subscriptionPlan: string;
7
+ subscriptionPlanActiveTo: Date;
8
+ }
9
+ export declare class UsersAddSubscriptionsComponent implements OnInit {
10
+ private _plansService;
11
+ private _applySubscriptionPlanService;
12
+ private _dynamicDialogRef;
13
+ private _config;
14
+ private _messageService;
15
+ user: IPlatformUserAccountVm;
16
+ plans: IPlatformSubscriptionPlanVm[];
17
+ plansLoading: boolean;
18
+ selectedPlan: IPlatformSubscriptionPlanVm | null;
19
+ validTo: Date | null;
20
+ minimumDate: Date;
21
+ isSaving: boolean;
14
22
  ngOnInit(): void;
15
- ngOnDestroy(): void;
16
- addNewSubscription(subName: string): void;
17
- removeSub(index: number): void;
23
+ onPlanSelected(): void;
24
+ assignSubscription(): void;
18
25
  closeDialog(): void;
19
- getSubscriptionTypeColor(subscriptionType: string): "#16A34A" | "#0D9488" | "#16A34A80" | "#0D948880";
20
26
  static ɵfac: i0.ɵɵFactoryDeclaration<UsersAddSubscriptionsComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<UsersAddSubscriptionsComponent, "lib-users-add-subscriptions", never, { "dialogID_userAssignSub": { "alias": "dialogID_userAssignSub"; "required": false; }; }, {}, never, never, false, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<UsersAddSubscriptionsComponent, "lib-users-add-subscriptions", never, {}, {}, never, never, false, never>;
22
28
  }
@@ -11,11 +11,12 @@ interface ReadOnlyData {
11
11
  fieldTooltip?: string;
12
12
  }
13
13
  export declare class UsersDetailsComponent implements OnInit {
14
- private _expirationDateService;
15
14
  private _loginAsParamService;
16
15
  private _config;
17
16
  private _dynamicDialogRef;
18
17
  private _messageService;
18
+ private _primengDialogService;
19
+ private assignSubscriptionRef;
19
20
  data: {
20
21
  currentUserIndex: number;
21
22
  usersListPerPage: IPlatformUserAccountVm[];
@@ -25,11 +26,8 @@ export declare class UsersDetailsComponent implements OnInit {
25
26
  currentUser: IPlatformUserAccountVm;
26
27
  currentUserIndex: number;
27
28
  isEditMode: boolean;
28
- isSubscriptionsEdit: boolean;
29
29
  selectedTabIndex: number;
30
- selectedSubscription: any;
31
30
  permisions: string[];
32
- daysToExtend: number;
33
31
  transColumns: ({
34
32
  field: string;
35
33
  header: string;
@@ -53,19 +51,24 @@ export declare class UsersDetailsComponent implements OnInit {
53
51
  sortable?: undefined;
54
52
  })[];
55
53
  ngOnInit(): void;
54
+ get currentUserSubscriptionRows(): IPlatformUserAccountVm[];
55
+ get subscriptionState(): {
56
+ label: string;
57
+ color: string;
58
+ };
56
59
  closeDialog(status?: eModalRoles): void;
57
60
  logAsCurrentUser(serviceType: 'Userserviceurl' | 'Admserviceurl'): void;
58
61
  workInProgressMessage(action: string): void;
62
+ openAssignSubscription(): void;
59
63
  moveUp(): void;
60
64
  moveDown(): void;
61
65
  private setReadOnlyFields;
62
66
  handleTabSwitch($event: any): void;
63
- getSubscriptionStatus(subscriptionStatus: string): string;
64
- getSubscriptionStatusMessage(subscriptionStatus: string): string;
65
- getSubscriptionTypeColor(subscriptionType: string, subscriptionStatus: string): "#16A34A" | "#0D9488" | "#16A34A80" | "#0D948880";
66
- getSubscriptionStatusColor(subscriptionStatus: string): string;
67
+ getSubscriptionState(activeTo?: Date): {
68
+ label: string;
69
+ color: string;
70
+ };
67
71
  showSuccess(): void;
68
- editSubscriptionToggle(): void;
69
72
  static ɵfac: i0.ɵɵFactoryDeclaration<UsersDetailsComponent, never>;
70
73
  static ɵcmp: i0.ɵɵComponentDeclaration<UsersDetailsComponent, "lib-users-details", never, {}, {}, never, never, false, never>;
71
74
  }
@@ -1,13 +1,17 @@
1
1
  import { IPlatformUserAccountVm } from '../../../../../api/platform-user-account-vm.model';
2
2
  import { FASDynamicTableColumnConfig } from 'fas-services';
3
3
  import { OnDestroy } from '@angular/core';
4
- import { Observable } from 'rxjs';
4
+ import { Observable, Subject } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class UsersListComponent implements OnDestroy {
7
7
  private _platformUsersService;
8
+ private _accountDeleteService;
8
9
  private _primengDialogService;
10
+ private _confirmationService;
9
11
  private _messageService;
10
12
  private ref;
13
+ readonly deleteUserDialogKey = "deleteUserConfirmation";
14
+ refreshList: Subject<void>;
11
15
  columns: FASDynamicTableColumnConfig<IPlatformUserAccountVm>[];
12
16
  fetchUsers: (params: {
13
17
  page: number;
@@ -27,8 +31,13 @@ export declare class UsersListComponent implements OnDestroy {
27
31
  ngOnDestroy(): void;
28
32
  handleDataLoaded(data: IPlatformUserAccountVm[]): void;
29
33
  private deleteUser;
34
+ private confirmDeleteUser;
35
+ /**
36
+ * Accounts registered before the registration date was stored have a default (year 0001) date - such value
37
+ * should stay empty in the table instead of showing 01.01.0001.
38
+ */
39
+ private skipEmptyDate;
30
40
  private addSubsccription;
31
- private workInProgressMessage;
32
41
  private showUserDetails;
33
42
  getSubscriptionStatus(subscriptionDate?: Date): {
34
43
  status: string;
@@ -16,15 +16,16 @@ import * as i14 from "primeng/checkbox";
16
16
  import * as i15 from "primeng/dropdown";
17
17
  import * as i16 from "primeng/stepper";
18
18
  import * as i17 from "primeng/tabview";
19
- import * as i18 from "primeng/dialog";
20
- import * as i19 from "@angular/common";
21
- import * as i20 from "primeng/toast";
22
- import * as i21 from "primeng/table";
23
- import * as i22 from "primeng/tooltip";
24
- import * as i23 from "primeng/inputtext";
25
- import * as i24 from "../../../shared/components/subscription-tag/subscription-tag.component";
19
+ import * as i18 from "primeng/confirmdialog";
20
+ import * as i19 from "primeng/dialog";
21
+ import * as i20 from "@angular/common";
22
+ import * as i21 from "primeng/toast";
23
+ import * as i22 from "primeng/table";
24
+ import * as i23 from "primeng/tooltip";
25
+ import * as i24 from "primeng/inputtext";
26
+ import * as i25 from "../../../shared/components/subscription-tag/subscription-tag.component";
26
27
  export declare class UsersModule {
27
28
  static ɵfac: i0.ɵɵFactoryDeclaration<UsersModule, never>;
28
- static ɵmod: i0.ɵɵNgModuleDeclaration<UsersModule, [typeof i1.UsersAddSubscriptionsComponent, typeof i2.UsersAddUserComponent, typeof i3.UsersDetailsComponent, typeof i4.UsersListComponent, typeof i5.UsersComponent], [typeof i6.FasServiceDynamicTableComponent, typeof i7.ProgressSpinnerModule, typeof i8.ReactiveFormsModule, typeof i9.InputNumberModule, typeof i10.MultiSelectModule, typeof i11.HttpClientModule, typeof i12.FileUploadModule, typeof i13.CalendarModule, typeof i14.CheckboxModule, typeof i15.DropdownModule, typeof i16.StepperModule, typeof i17.TabViewModule, typeof i18.DialogModule, typeof i19.CommonModule, typeof i8.FormsModule, typeof i20.ToastModule, typeof i21.TableModule, typeof i22.TooltipModule, typeof i23.InputTextModule, typeof i13.CalendarModule, typeof i24.SubscriptionTagComponent], never>;
29
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UsersModule, [typeof i1.UsersAddSubscriptionsComponent, typeof i2.UsersAddUserComponent, typeof i3.UsersDetailsComponent, typeof i4.UsersListComponent, typeof i5.UsersComponent], [typeof i6.FasServiceDynamicTableComponent, typeof i7.ProgressSpinnerModule, typeof i8.ReactiveFormsModule, typeof i9.InputNumberModule, typeof i10.MultiSelectModule, typeof i11.HttpClientModule, typeof i12.FileUploadModule, typeof i13.CalendarModule, typeof i14.CheckboxModule, typeof i15.DropdownModule, typeof i16.StepperModule, typeof i17.TabViewModule, typeof i18.ConfirmDialogModule, typeof i19.DialogModule, typeof i20.CommonModule, typeof i8.FormsModule, typeof i21.ToastModule, typeof i22.TableModule, typeof i23.TooltipModule, typeof i24.InputTextModule, typeof i13.CalendarModule, typeof i25.SubscriptionTagComponent], never>;
29
30
  static ɵinj: i0.ɵɵInjectorDeclaration<UsersModule>;
30
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fas-admin",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",