@posiwise/user-module 0.0.176 → 0.0.177

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.
@@ -9,7 +9,7 @@ import { RouterModule } from "@angular/router";
9
9
  import * as i9$1 from "@angular-magic/ngx-gp-autocomplete";
10
10
  import { NgxGpAutocompleteModule } from "@angular-magic/ngx-gp-autocomplete";
11
11
  import { AppConfigService } from "@posiwise/app-config-service";
12
- import * as i5$1 from "@posiwise/app-loader";
12
+ import * as i5$2 from "@posiwise/app-loader";
13
13
  import { AppLoaderModule } from "@posiwise/app-loader";
14
14
  import * as i8$1 from "@posiwise/core-guards";
15
15
  import { TrackDirtyFormDirective } from "@posiwise/core-guards";
@@ -63,11 +63,11 @@ import sortBy from "lodash/sortBy";
63
63
  import { distinct, mergeMap } from "rxjs/operators";
64
64
  import { HttpErrorResponse, HttpParams } from "@angular/common/http";
65
65
  import { GetUser, getUser } from "@posiwise/app-store";
66
- import * as i4$3 from "@ngrx/store";
66
+ import * as i4$2 from "@ngrx/store";
67
67
  import * as i2$1 from "@posiwise/admin-module-utils";
68
68
  import { AppAdmin } from "@posiwise/admin-module-utils";
69
- import * as i5 from "@angular/cdk/clipboard";
70
- import * as i4$2 from "primeng/table";
69
+ import * as i5$1 from "@angular/cdk/clipboard";
70
+ import * as i5 from "primeng/table";
71
71
  import moment from "moment";
72
72
  import * as i4$1 from "primeng/autocomplete";
73
73
  import * as i4 from "primeng/tabs";
@@ -559,7 +559,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
559
559
  dependencies: [
560
560
  {
561
561
  kind: "component",
562
- type: i5$1.AppLoaderComponent,
562
+ type: i5$2.AppLoaderComponent,
563
563
  selector: "pw-loader",
564
564
  inputs: [
565
565
  "isVisible",
@@ -1494,7 +1494,7 @@ var SubscriptionCredentialComponent = class SubscriptionCredentialComponent exte
1494
1494
  dependencies: [
1495
1495
  {
1496
1496
  kind: "component",
1497
- type: i5$1.AppLoaderComponent,
1497
+ type: i5$2.AppLoaderComponent,
1498
1498
  selector: "pw-loader",
1499
1499
  inputs: [
1500
1500
  "isVisible",
@@ -2634,7 +2634,7 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
2634
2634
  { token: i1$1.UntypedFormBuilder },
2635
2635
  { token: i2$2.NgbModal },
2636
2636
  { token: i3.SubscriptionService },
2637
- { token: i4$3.Store },
2637
+ { token: i4$2.Store },
2638
2638
  { token: i3.ScriptLoaderService },
2639
2639
  { token: i0.ChangeDetectorRef },
2640
2640
  { token: i2$3.ConfirmDialogService }
@@ -2896,7 +2896,7 @@ i0.ɵɵngDeclareClassMetadata({
2896
2896
  { type: i1$1.UntypedFormBuilder },
2897
2897
  { type: i2$2.NgbModal },
2898
2898
  { type: i3.SubscriptionService },
2899
- { type: i4$3.Store },
2899
+ { type: i4$2.Store },
2900
2900
  { type: i3.ScriptLoaderService },
2901
2901
  { type: i0.ChangeDetectorRef },
2902
2902
  { type: i2$3.ConfirmDialogService }
@@ -3130,7 +3130,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
3130
3130
  { token: i3.GeoService },
3131
3131
  { token: i2$2.NgbModal },
3132
3132
  { token: i3.SubscriptionService },
3133
- { token: i4$3.Store },
3133
+ { token: i4$2.Store },
3134
3134
  { token: i0.Injector },
3135
3135
  { token: i0.ChangeDetectorRef },
3136
3136
  { token: i2$3.ConfirmDialogService }
@@ -3504,7 +3504,7 @@ i0.ɵɵngDeclareClassMetadata({
3504
3504
  { type: i3.GeoService },
3505
3505
  { type: i2$2.NgbModal },
3506
3506
  { type: i3.SubscriptionService },
3507
- { type: i4$3.Store },
3507
+ { type: i4$2.Store },
3508
3508
  { type: i0.Injector },
3509
3509
  { type: i0.ChangeDetectorRef },
3510
3510
  { type: i2$3.ConfirmDialogService }
@@ -3710,8 +3710,8 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
3710
3710
  { token: i3.SubscriptionService },
3711
3711
  { token: i2$1.AdminService },
3712
3712
  { token: i2$2.NgbModal },
3713
- { token: i4$3.Store },
3714
- { token: i5.Clipboard },
3713
+ { token: i4$2.Store },
3714
+ { token: i5$1.Clipboard },
3715
3715
  { token: i0.Injector },
3716
3716
  { token: i0.ChangeDetectorRef },
3717
3717
  { token: i2$3.ConfirmDialogService }
@@ -3943,8 +3943,8 @@ i0.ɵɵngDeclareClassMetadata({
3943
3943
  { type: i3.SubscriptionService },
3944
3944
  { type: i2$1.AdminService },
3945
3945
  { type: i2$2.NgbModal },
3946
- { type: i4$3.Store },
3947
- { type: i5.Clipboard },
3946
+ { type: i4$2.Store },
3947
+ { type: i5$1.Clipboard },
3948
3948
  { type: i0.Injector },
3949
3949
  { type: i0.ChangeDetectorRef },
3950
3950
  { type: i2$3.ConfirmDialogService }
@@ -4005,17 +4005,18 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4005
4005
  });
4006
4006
  }
4007
4007
  fetchInvoices(paging) {
4008
- this.isLoaded = false;
4009
4008
  this.userStore().subscribe((user) => {
4010
4009
  if (user) {
4011
4010
  this.userId = user.id;
4012
4011
  this.userService.getUserInvoices(paging, user.id).subscribe((response) => {
4013
- this.isLoaded = true;
4014
4012
  this.invoices = response.invoices;
4015
4013
  this.totalRecords = response.object_count;
4016
4014
  this.totalRecordsUnFiltered = response.unfiltered_count;
4017
4015
  this.pollForInvoices();
4018
4016
  this.cdr.markForCheck();
4017
+ }).add(() => {
4018
+ this.isLoaded = true;
4019
+ this.cdr.markForCheck();
4019
4020
  });
4020
4021
  }
4021
4022
  this.cdr.markForCheck();
@@ -4050,7 +4051,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4050
4051
  selector: "pw-user-invoice",
4051
4052
  usesInheritance: true,
4052
4053
  ngImport: i0,
4053
- template: "<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progress-spinner strokeWidth=\"2\"></p-progress-spinner>\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n stateKey=\"pw-table.user-invoice\"\n stateStorage=\"session\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n >\n <ng-template #caption>\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template #body let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n",
4054
+ template: "<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 mt-3\">\n <pw-skeleton-table [rows]=\"8\" [columns]=\"6\" [showCaption]=\"true\" />\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.d-none]=\"!isLoaded\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n stateKey=\"pw-table.user-invoice\"\n stateStorage=\"session\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n >\n <ng-template #caption>\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template #body let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n",
4054
4055
  styles: [".page-heading{background:#fcfcfc;border-bottom:1px solid rgba(0,0,0,.1);position:relative;width:100%}.page-heading:after{clear:both;content:\"\";display:table}.page-heading .page-heading__container{padding:15px 20px;position:relative}.page-heading .page-heading__container .title{color:#242437;font-size:15px;font-weight:500;line-height:20px;margin:3px 0 0;overflow:hidden;padding:0;text-overflow:ellipsis;width:95%}.card .card-container{position:absolute;right:20px;top:25px;z-index:1}.td-total{font-weight:700}.card-inner-container{background:#0000000d;border:1px dashed rgba(0,0,0,.1);border-radius:3px;margin-bottom:20px;padding:20px}.invoice-text{display:flex;font-size:13px;justify-content:space-between;margin:10px 0}.invoice-template{min-height:calc(100vh - 190px)}\n"],
4055
4056
  dependencies: [
4056
4057
  {
@@ -4067,6 +4068,19 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4067
4068
  "invalid"
4068
4069
  ]
4069
4070
  },
4071
+ {
4072
+ kind: "component",
4073
+ type: i5$2.SkeletonTableComponent,
4074
+ selector: "pw-skeleton-table",
4075
+ inputs: [
4076
+ "rows",
4077
+ "columns",
4078
+ "showHeader",
4079
+ "showCaption",
4080
+ "density",
4081
+ "delay"
4082
+ ]
4083
+ },
4070
4084
  {
4071
4085
  kind: "directive",
4072
4086
  type: i6$2.DynamicBadgeDirective,
@@ -4090,7 +4104,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4090
4104
  },
4091
4105
  {
4092
4106
  kind: "component",
4093
- type: i4$2.Table,
4107
+ type: i5.Table,
4094
4108
  selector: "p-table",
4095
4109
  inputs: [
4096
4110
  "frozenColumns",
@@ -4203,36 +4217,22 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
4203
4217
  },
4204
4218
  {
4205
4219
  kind: "directive",
4206
- type: i4$2.SortableColumn,
4220
+ type: i5.SortableColumn,
4207
4221
  selector: "[pSortableColumn]",
4208
4222
  inputs: ["pSortableColumn", "pSortableColumnDisabled"]
4209
4223
  },
4210
4224
  {
4211
4225
  kind: "directive",
4212
- type: i4$2.ResizableColumn,
4226
+ type: i5.ResizableColumn,
4213
4227
  selector: "[pResizableColumn]",
4214
4228
  inputs: ["pResizableColumnDisabled"]
4215
4229
  },
4216
4230
  {
4217
4231
  kind: "component",
4218
- type: i4$2.SortIcon,
4232
+ type: i5.SortIcon,
4219
4233
  selector: "p-sort-icon, p-sorticon",
4220
4234
  inputs: ["field"]
4221
4235
  },
4222
- {
4223
- kind: "component",
4224
- type: i12.ProgressSpinner,
4225
- selector: "p-progress-spinner, p-progressspinner",
4226
- inputs: [
4227
- "value",
4228
- "strokeWidth",
4229
- "animationDuration",
4230
- "min",
4231
- "max",
4232
- "ariaLabel",
4233
- "fill"
4234
- ]
4235
- },
4236
4236
  {
4237
4237
  kind: "directive",
4238
4238
  type: i1$1.NgModel,
@@ -4291,7 +4291,7 @@ i0.ɵɵngDeclareClassMetadata({
4291
4291
  args: [{
4292
4292
  selector: "pw-user-invoice",
4293
4293
  standalone: false,
4294
- template: "<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progress-spinner strokeWidth=\"2\"></p-progress-spinner>\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n stateKey=\"pw-table.user-invoice\"\n stateStorage=\"session\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n >\n <ng-template #caption>\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template #body let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n",
4294
+ template: "<div class=\"row\" [class.custom-disable-wrapper]=\"buttonBusy\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Your Invoices</h2>\n </div>\n</div>\n\n@if (!isLoaded) {\n <div class=\"w-100 mt-3\">\n <pw-skeleton-table [rows]=\"8\" [columns]=\"6\" [showCaption]=\"true\" />\n </div>\n}\n<div class=\"row primeng-datatable-container actions-collapsed mt-0\" [class.d-none]=\"!isLoaded\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #tt\n [value]=\"invoices\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n stateKey=\"pw-table.user-invoice\"\n stateStorage=\"session\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n >\n <ng-template #caption>\n <div class=\"search-filter justify-content-end\">\n <div class=\"text-end\">\n <label for=\"user-invoice-search\" class=\"visually-hidden\">Search Invoices</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input id=\"user-invoice-search\"\n name=\"user-invoice-search\"\n [(ngModel)]=\"searchText\"\n (input)=\"tt.filterGlobal($event.target.value, 'contains')\"\n type=\"text\"\n pInputText\n placeholder=\"Search invoices...\"\n data-cy=\"incident-search\"\n aria-label=\"Search invoices...\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">Invoice Date <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">Frequency <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">Seats Purchased <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">Subtotal <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">Total (incl. tax) <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">Action</th>\n </tr>\n </ng-template>\n\n <ng-template #body let-invoice>\n <tr>\n <td>{{ invoice.date | date:'dd-MMM-yyyy' }}</td>\n <td>\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: invoiceFrequency,\n item: invoice.product.billing_frequency\n }\"\n color=\"blue-grey\">{{ invoice.product.billing_frequency }}</span>\n </td>\n <td>{{ invoice?.subscription_product?.purchased_units }}</td>\n <td>{{ (invoice.subtotal_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td class=\"td-total\">{{ (invoice.total_in_cents / 100) | currency:invoice?.product?.currency }}</td>\n <td>\n @if (invoice?.file?.url) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.file.url\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n } @else {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice?.stripe_invoice_pdf\" target=\"_blank\" title=\"Download\">\n <i class=\"fa fa-download\">&nbsp;Download</i>\n </a>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"tt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n\n </div>\n</div>\n@if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any invoice yet.\">\n </pw-no-data>\n}\n\n",
4295
4295
  styles: [".page-heading{background:#fcfcfc;border-bottom:1px solid rgba(0,0,0,.1);position:relative;width:100%}.page-heading:after{clear:both;content:\"\";display:table}.page-heading .page-heading__container{padding:15px 20px;position:relative}.page-heading .page-heading__container .title{color:#242437;font-size:15px;font-weight:500;line-height:20px;margin:3px 0 0;overflow:hidden;padding:0;text-overflow:ellipsis;width:95%}.card .card-container{position:absolute;right:20px;top:25px;z-index:1}.td-total{font-weight:700}.card-inner-container{background:#0000000d;border:1px dashed rgba(0,0,0,.1);border-radius:3px;margin-bottom:20px;padding:20px}.invoice-text{display:flex;font-size:13px;justify-content:space-between;margin:10px 0}.invoice-template{min-height:calc(100vh - 190px)}\n"]
4296
4296
  }]
4297
4297
  }],
@@ -4335,7 +4335,7 @@ var AiKnowledgeTabComponent = class AiKnowledgeTabComponent {
4335
4335
  dependencies: [
4336
4336
  {
4337
4337
  kind: "component",
4338
- type: i5$1.AppLoaderComponent,
4338
+ type: i5$2.AppLoaderComponent,
4339
4339
  selector: "pw-loader",
4340
4340
  inputs: [
4341
4341
  "isVisible",
@@ -4453,7 +4453,7 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
4453
4453
  deps: [
4454
4454
  { token: i3.CommonService },
4455
4455
  { token: i3.ProfileService },
4456
- { token: i4$3.Store },
4456
+ { token: i4$2.Store },
4457
4457
  { token: i0.Injector },
4458
4458
  { token: i0.ChangeDetectorRef }
4459
4459
  ],
@@ -4550,7 +4550,7 @@ i0.ɵɵngDeclareClassMetadata({
4550
4550
  ctorParameters: () => [
4551
4551
  { type: i3.CommonService },
4552
4552
  { type: i3.ProfileService },
4553
- { type: i4$3.Store },
4553
+ { type: i4$2.Store },
4554
4554
  { type: i0.Injector },
4555
4555
  { type: i0.ChangeDetectorRef }
4556
4556
  ]