@posiwise/user-module 0.0.184 → 0.0.186
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.
|
@@ -31,7 +31,7 @@ import { Loader } from "@googlemaps/js-api-loader";
|
|
|
31
31
|
import { NgbDatepickerModule, NgbInputDatepicker, NgbModal, NgbModalModule } from "@ng-bootstrap/ng-bootstrap";
|
|
32
32
|
import { __decorate } from "tslib";
|
|
33
33
|
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
34
|
-
import { AuthService, CommonService, CustomToastService, FormHelperService, GeoService, PermissionService, ProductService, ProfileService, QualificationService, ScriptLoaderService, SubscriptionService, TagService, UserService, ValidationService, hasKnowledgeAlpha } from "@posiwise/common-services";
|
|
34
|
+
import { AuthService, CommonService, CustomToastService, FormHelperService, GeoService, PermissionService, ProductService, ProfileService, QualificationService, ScriptLoaderService, SubscriptionService, TagService, UserService, ValidationService, hasKnowledgeAlpha, isInMobileWebView } from "@posiwise/common-services";
|
|
35
35
|
import { AppUser, POLL_TIMEOUT, PRODUCT_CATEGORY, Project, TAG_ENTITY, TAG_TYPE } from "@posiwise/common-utilities";
|
|
36
36
|
import { HelperService } from "@posiwise/helper-service";
|
|
37
37
|
import { ProfileImageCropperComponent, ValidateForm, appendQueryParam, clearQueryParams } from "@posiwise/utils";
|
|
@@ -241,9 +241,9 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
241
241
|
this.validatePasswordBusyButton = true;
|
|
242
242
|
const password = this.passwordRef.nativeElement.value;
|
|
243
243
|
if (password) this.userService.checkPassword({ password }).subscribe((data) => {
|
|
244
|
-
if (data?.status === StatusCodes.OK) this.passwordVerified = true;
|
|
244
|
+
if (data?.result?.status === StatusCodes.OK) this.passwordVerified = true;
|
|
245
245
|
else {
|
|
246
|
-
this.toast.error(data
|
|
246
|
+
this.toast.error(data["error"].message);
|
|
247
247
|
this.passwordRef.nativeElement.value = "";
|
|
248
248
|
}
|
|
249
249
|
this.cdr.markForCheck();
|
|
@@ -271,7 +271,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
271
271
|
if (response.status_code === 200) {
|
|
272
272
|
this.toast.success(response.message, "", { positionClass: "toast-top-center" });
|
|
273
273
|
this.onTogglePassword();
|
|
274
|
-
} else this.toast.error(response
|
|
274
|
+
} else this.toast.error(response["error"].message);
|
|
275
275
|
this.passwordForm.reset();
|
|
276
276
|
this.cdr.markForCheck();
|
|
277
277
|
}).add(() => {
|
|
@@ -315,7 +315,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
315
315
|
this.slugBusyButton = true;
|
|
316
316
|
this.userService.updateSlug(this.slug).subscribe((response) => {
|
|
317
317
|
this.toggleNickName = false;
|
|
318
|
-
if (response?.status === StatusCodes.OK) this.getUserProfile();
|
|
318
|
+
if (response?.result?.status === StatusCodes.OK) this.getUserProfile();
|
|
319
319
|
else this.toast.error("User.Account.UserNameError");
|
|
320
320
|
this.cdr.markForCheck();
|
|
321
321
|
}).add(() => {
|
|
@@ -328,7 +328,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
328
328
|
const filename = `${`${this.slug.toLocaleLowerCase()}_${Date.parse((/* @__PURE__ */ new Date()).toString())}`}.png`;
|
|
329
329
|
const file = new File([blob], filename);
|
|
330
330
|
this.userService.addAvatar(file).subscribe((res) => {
|
|
331
|
-
this.image = res?.user_avatar[2]?.url;
|
|
331
|
+
this.image = res?.result?.user_avatar[2]?.url;
|
|
332
332
|
this.modalService.dismissAll();
|
|
333
333
|
this.cdr.markForCheck();
|
|
334
334
|
});
|
|
@@ -351,7 +351,7 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
351
351
|
loadConnections() {
|
|
352
352
|
this.loadingConnections = true;
|
|
353
353
|
this.userService.getMcpConnections().subscribe({ next: (response) => {
|
|
354
|
-
this.connections = response?.
|
|
354
|
+
this.connections = response?.result ?? [];
|
|
355
355
|
this.cdr.markForCheck();
|
|
356
356
|
} }).add(() => {
|
|
357
357
|
this.loadingConnections = false;
|
|
@@ -435,13 +435,13 @@ var AccountDetailsComponent = class AccountDetailsComponent extends AppBaseCompo
|
|
|
435
435
|
}
|
|
436
436
|
performTokenRefresh() {
|
|
437
437
|
this.refreshingTokens = true;
|
|
438
|
-
this.userService.refreshUserApiTokens().subscribe({ next: (
|
|
439
|
-
if (
|
|
438
|
+
this.userService.refreshUserApiTokens().subscribe({ next: ({ result }) => {
|
|
439
|
+
if (result && result.api_keys) {
|
|
440
440
|
if (!this.user.api_keys) this.user.api_keys = {};
|
|
441
|
-
if (
|
|
442
|
-
if (
|
|
443
|
-
if (
|
|
444
|
-
if (
|
|
441
|
+
if (result.api_keys.api_user_token) this.user.api_keys.api_user_token = result.api_keys.api_user_token;
|
|
442
|
+
if (result.api_keys.api_user_id) this.user.api_keys.api_user_id = result.api_keys.api_user_id;
|
|
443
|
+
if (result.api_keys.api_hits !== void 0) this.user.api_keys.api_hits = result.api_keys.api_hits;
|
|
444
|
+
if (result.api_keys.api_hits_max !== void 0) this.user.api_keys.api_hits_max = result.api_keys.api_hits_max;
|
|
445
445
|
}
|
|
446
446
|
this.showApiToken = false;
|
|
447
447
|
this.showApiClientId = false;
|
|
@@ -912,8 +912,8 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
912
912
|
this.getProducts();
|
|
913
913
|
}
|
|
914
914
|
getProducts() {
|
|
915
|
-
this.productService.getProductList({}, this.subscriptionId, { only_relevant: true }).subscribe((
|
|
916
|
-
this.products =
|
|
915
|
+
this.productService.getProductList({}, this.subscriptionId, { only_relevant: true }).subscribe(({ result }) => {
|
|
916
|
+
this.products = result || [];
|
|
917
917
|
if (this.products?.length) this.products = this.products.filter((x) => x.active);
|
|
918
918
|
this.isLoaded = true;
|
|
919
919
|
this.userStore().subscribe((user) => {
|
|
@@ -983,7 +983,7 @@ var AddSubscriptionComponent = class AddSubscriptionComponent extends AppBaseCom
|
|
|
983
983
|
usesInheritance: true,
|
|
984
984
|
ngImport: i0,
|
|
985
985
|
template: "@if (isLoaded && !selectedProduct) {\n <div\n class=\"mt-4\">\n <div class=\"d-flex align-items-start category-tabs-row\">\n <a [attr.aria-label]=\"'Button.Back' | transloco\"\n [routerLink]=\"['/account/subscriptions']\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <div class=\"d-flex category-tabs\">\n @for (item of subscribedPermissionKeys; track item; let i = $index) {\n <div class=\"toggle\"\n >\n <input type=\"radio\"\n name=\"sizeBy\"\n value=\"option{{ i + 1 }}\"\n id=\"option{{ i + 1 }}\"\n (change)=\"onChangeCategory(item)\"\n [checked]=\"i === 0\"\n [attr.aria-label]=\"item\" />\n <label for=\"option{{ i + 1 }}\">{{ item }}</label>\n </div>\n }\n </div>\n </div>\n <ul class=\"row animated fadeIn d-flex\">\n @for (product of availableProducts; track trackByProduct($index, product)) {\n <li\n class=\"col-sm-12 col-md-6 col-xl-4 my-3 mt-sm-2\">\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"text-bold-500 primary mb-3\">{{ product.name }}</h4>\n @if (product.price_per_unit) {\n @if (product?.purchased_units) {\n <h5\n class=\"my-3 branding-color-1\">\n {{ 'User.Subscriptions.Add.Currently' | transloco }} {{ product.currency | currencySymbol\n }}{{\n (\n (product.purchased_units * product.price_per_unit) /\n 100\n ) | number:'1.2-2'\n }} / {{ product.billing_frequency }}\n </h5>\n }\n <h5 class=\"my-3\">\n {{ 'User.Subscriptions.Add.Min' | transloco }}\n {{ (product.min_units > 1 ? 'User.Subscriptions.Add.SeatsCount' : 'User.Subscriptions.Add.SeatCount') | transloco: { count: product.min_units } }}\n - {{ product.currency | currencySymbol\n }}{{\n ((product.min_units * product.price_per_unit) / 100) | number:'1.2-2'\n }} / {{ product.billing_frequency }}\n </h5>\n <h5 class=\"d-inline-block text-bold-600 mb-2\">\n {{ product.currency | currencySymbol\n }}{{ (product.price_per_unit / 100) | number:'1.2-2' }} / {{\n product.billing_frequency\n }} / {{ 'User.Subscriptions.Add.PerSeat' | transloco }}\n </h5>\n } @else {\n <div class=\"d-inline-block text-bold-600 mb-2\">{{ 'User.Subscriptions.Free' | transloco }}</div>\n }\n <p class=\"mb-2\"\n [innerHTML]=\"product?.description\"></p>\n </div>\n <div class=\"card-footer px-3\">\n @if (\n !product.is_subscribed &&\n !product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <a [attr.aria-label]=\"'User.Subscriptions.Subscribe' | transloco\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </a>\n }\n @if (\n !product.is_subscribed &&\n product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <div class=\"mt-3\"\n >\n <a [attr.aria-label]=\"'Button.Upgrade' | transloco\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'Button.Upgrade' | transloco }}\n </a>\n <span class=\"badge bg-secondary position-absolute trial-badge\">{{ 'User.Subscriptions.Trial' | transloco }}\n </span>\n </div>\n }\n @if (\n product.is_subscribed &&\n !product.trial_subscription &&\n !product.is_deleted\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Subscribed' | transloco }}\n </span>\n }\n @if (\n product.is_subscribed &&\n product.trial_subscription &&\n product.price_per_unit === 0 &&\n !product.is_deleted &&\n !product.stripe_plan_id\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Free' | transloco }}\n </span>\n }\n @if (product.is_deleted) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.UnsubscribedButActive' | transloco }}\n </span>\n }\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (availableProducts && availableProducts.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No products available under this category.\"\n >\n </pw-no-data>\n }\n </div>\n </div>\n </div>\n}\n",
|
|
986
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
986
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.card .card-body{position:relative}.card .card-body .bottom-text{bottom:15px;left:20px;position:absolute}.card .card-body .card-btn{bottom:15px;position:absolute}.card.shadow-md{height:100%}.card .primary{text-transform:uppercase}.trial-badge{bottom:15px;left:20px}.category-tabs{flex-wrap:nowrap;justify-content:safe center;max-width:100%;min-width:0;overflow-x:auto;scrollbar-width:thin}.category-tabs .toggle{flex:0 0 auto}.category-tabs .toggle input+label{white-space:nowrap}.category-tabs-row .previous i{top:0}.toggle{align-items:stretch;box-sizing:border-box;display:flex;flex-flow:row nowrap;font-size:0;justify-content:flex-start;margin:0}.toggle input{height:0;left:-9999px;position:absolute;width:0}.toggle input+label{background-color:#fff;border:solid 1px rgb(221,221,221);box-shadow:0 0 #fff0;box-sizing:border-box;display:inline-block;font-size:1rem;font-weight:600;line-height:140%;margin:0;padding:.75rem 2rem;position:relative;text-align:center;transition:border-color .15s ease-out,color .25s ease-out,background-color .15s ease-out,box-shadow .15s ease-out}.toggle input:hover+label{border-color:#213140}.toggle input:checked+label{background-color:var(--tabs_bg);border-color:var(--tabs_bg);box-shadow:0 0 10px #66b3fb80;color:var(--tabs_text);z-index:1}.toggle:first-of-type input+label{border-radius:4px 0 0 4px}.toggle:last-of-type input+label{border-radius:0 4px 4px 0}.toggle:first-of-type:last-of-type input+label{border-radius:4px}.shadow-md{height:100%;padding-bottom:50px!important}.fadeIn{animation-name:fadeIn}.animated{animation-duration:2s;animation-fill-mode:both}.card-btn{bottom:15px;position:absolute;right:20px}.card-footer{height:60px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@media(max-width:800px){.toggle input+label{padding:.75rem 1rem}}.branding-color-1{color:var(--first)!important}\n"],
|
|
987
987
|
dependencies: [
|
|
988
988
|
{
|
|
989
989
|
kind: "directive",
|
|
@@ -1050,7 +1050,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1050
1050
|
CurrencySymbolPipe
|
|
1051
1051
|
],
|
|
1052
1052
|
template: "@if (isLoaded && !selectedProduct) {\n <div\n class=\"mt-4\">\n <div class=\"d-flex align-items-start category-tabs-row\">\n <a [attr.aria-label]=\"'Button.Back' | transloco\"\n [routerLink]=\"['/account/subscriptions']\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <div class=\"d-flex category-tabs\">\n @for (item of subscribedPermissionKeys; track item; let i = $index) {\n <div class=\"toggle\"\n >\n <input type=\"radio\"\n name=\"sizeBy\"\n value=\"option{{ i + 1 }}\"\n id=\"option{{ i + 1 }}\"\n (change)=\"onChangeCategory(item)\"\n [checked]=\"i === 0\"\n [attr.aria-label]=\"item\" />\n <label for=\"option{{ i + 1 }}\">{{ item }}</label>\n </div>\n }\n </div>\n </div>\n <ul class=\"row animated fadeIn d-flex\">\n @for (product of availableProducts; track trackByProduct($index, product)) {\n <li\n class=\"col-sm-12 col-md-6 col-xl-4 my-3 mt-sm-2\">\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h4 class=\"text-bold-500 primary mb-3\">{{ product.name }}</h4>\n @if (product.price_per_unit) {\n @if (product?.purchased_units) {\n <h5\n class=\"my-3 branding-color-1\">\n {{ 'User.Subscriptions.Add.Currently' | transloco }} {{ product.currency | currencySymbol\n }}{{\n (\n (product.purchased_units * product.price_per_unit) /\n 100\n ) | number:'1.2-2'\n }} / {{ product.billing_frequency }}\n </h5>\n }\n <h5 class=\"my-3\">\n {{ 'User.Subscriptions.Add.Min' | transloco }}\n {{ (product.min_units > 1 ? 'User.Subscriptions.Add.SeatsCount' : 'User.Subscriptions.Add.SeatCount') | transloco: { count: product.min_units } }}\n - {{ product.currency | currencySymbol\n }}{{\n ((product.min_units * product.price_per_unit) / 100) | number:'1.2-2'\n }} / {{ product.billing_frequency }}\n </h5>\n <h5 class=\"d-inline-block text-bold-600 mb-2\">\n {{ product.currency | currencySymbol\n }}{{ (product.price_per_unit / 100) | number:'1.2-2' }} / {{\n product.billing_frequency\n }} / {{ 'User.Subscriptions.Add.PerSeat' | transloco }}\n </h5>\n } @else {\n <div class=\"d-inline-block text-bold-600 mb-2\">{{ 'User.Subscriptions.Free' | transloco }}</div>\n }\n <p class=\"mb-2\"\n [innerHTML]=\"product?.description\"></p>\n </div>\n <div class=\"card-footer px-3\">\n @if (\n !product.is_subscribed &&\n !product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <a [attr.aria-label]=\"'User.Subscriptions.Subscribe' | transloco\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </a>\n }\n @if (\n !product.is_subscribed &&\n product.trial_subscription &&\n product.stripe_plan_id\n ) {\n <div class=\"mt-3\"\n >\n <a [attr.aria-label]=\"'Button.Upgrade' | transloco\"\n (click)=\"onSelection(product)\"\n class=\"card-btn btn btn-raised me-1 btn-primary btn-sm\">\n {{ 'Button.Upgrade' | transloco }}\n </a>\n <span class=\"badge bg-secondary position-absolute trial-badge\">{{ 'User.Subscriptions.Trial' | transloco }}\n </span>\n </div>\n }\n @if (\n product.is_subscribed &&\n !product.trial_subscription &&\n !product.is_deleted\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Subscribed' | transloco }}\n </span>\n }\n @if (\n product.is_subscribed &&\n product.trial_subscription &&\n product.price_per_unit === 0 &&\n !product.is_deleted &&\n !product.stripe_plan_id\n ) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.Free' | transloco }}\n </span>\n }\n @if (product.is_deleted) {\n <span\n class=\"card-btn badge bg-default text-white\">\n {{ 'User.Subscriptions.UnsubscribedButActive' | transloco }}\n </span>\n }\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n <div class=\"row\">\n <div class=\"col-12\">\n @if (availableProducts && availableProducts.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No products available under this category.\"\n >\n </pw-no-data>\n }\n </div>\n </div>\n </div>\n}\n",
|
|
1053
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
1053
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.card .card-body{position:relative}.card .card-body .bottom-text{bottom:15px;left:20px;position:absolute}.card .card-body .card-btn{bottom:15px;position:absolute}.card.shadow-md{height:100%}.card .primary{text-transform:uppercase}.trial-badge{bottom:15px;left:20px}.category-tabs{flex-wrap:nowrap;justify-content:safe center;max-width:100%;min-width:0;overflow-x:auto;scrollbar-width:thin}.category-tabs .toggle{flex:0 0 auto}.category-tabs .toggle input+label{white-space:nowrap}.category-tabs-row .previous i{top:0}.toggle{align-items:stretch;box-sizing:border-box;display:flex;flex-flow:row nowrap;font-size:0;justify-content:flex-start;margin:0}.toggle input{height:0;left:-9999px;position:absolute;width:0}.toggle input+label{background-color:#fff;border:solid 1px rgb(221,221,221);box-shadow:0 0 #fff0;box-sizing:border-box;display:inline-block;font-size:1rem;font-weight:600;line-height:140%;margin:0;padding:.75rem 2rem;position:relative;text-align:center;transition:border-color .15s ease-out,color .25s ease-out,background-color .15s ease-out,box-shadow .15s ease-out}.toggle input:hover+label{border-color:#213140}.toggle input:checked+label{background-color:var(--tabs_bg);border-color:var(--tabs_bg);box-shadow:0 0 10px #66b3fb80;color:var(--tabs_text);z-index:1}.toggle:first-of-type input+label{border-radius:4px 0 0 4px}.toggle:last-of-type input+label{border-radius:0 4px 4px 0}.toggle:first-of-type:last-of-type input+label{border-radius:4px}.shadow-md{height:100%;padding-bottom:50px!important}.fadeIn{animation-name:fadeIn}.animated{animation-duration:2s;animation-fill-mode:both}.card-btn{bottom:15px;position:absolute;right:20px}.card-footer{height:60px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@media(max-width:800px){.toggle input+label{padding:.75rem 1rem}}.branding-color-1{color:var(--first)!important}\n"]
|
|
1054
1054
|
}]
|
|
1055
1055
|
}]
|
|
1056
1056
|
});
|
|
@@ -1346,11 +1346,11 @@ var SubscriptionCredentialActionsService = class SubscriptionCredentialActionsSe
|
|
|
1346
1346
|
load(subscriptionId) {
|
|
1347
1347
|
return forkJoin({
|
|
1348
1348
|
stored: this.storedCredentials(subscriptionId),
|
|
1349
|
-
types: this.subscriptionService.getAllCredentials().pipe(map$1((
|
|
1349
|
+
types: this.subscriptionService.getAllCredentials().pipe(map$1(({ result }) => result))
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
1352
|
storedCredentials(subscriptionId) {
|
|
1353
|
-
return this.subscriptionService.getAllSubscriptionCredentials(subscriptionId).pipe(map$1((
|
|
1353
|
+
return this.subscriptionService.getAllSubscriptionCredentials(subscriptionId).pipe(map$1(({ result }) => result));
|
|
1354
1354
|
}
|
|
1355
1355
|
saveChanged(rows, subscriptionId) {
|
|
1356
1356
|
const requests = changedCredentials(rows).map((row) => {
|
|
@@ -2168,17 +2168,20 @@ var SecondaryPaymentMethodComponent = class SecondaryPaymentMethodComponent {
|
|
|
2168
2168
|
async mountForm(host) {
|
|
2169
2169
|
if (this.provider === "braintree") {
|
|
2170
2170
|
const response = await firstValueFrom(this.subscriptionService.getBraintreeClientToken(this.subscriptionId));
|
|
2171
|
-
await this.braintree.mount(host, response?.data?.client_token);
|
|
2171
|
+
await this.braintree.mount(host, response?.result?.data?.client_token);
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
2174
|
const response = await firstValueFrom(this.subscriptionService.getAirwallexIntent(this.subscriptionId));
|
|
2175
|
-
await this.airwallex.mount(host, response?.
|
|
2175
|
+
await this.airwallex.mount(host, response?.result);
|
|
2176
2176
|
}
|
|
2177
2177
|
collectCard() {
|
|
2178
2178
|
return this.provider === "braintree" ? this.braintree.requestNonce() : this.airwallex.confirm();
|
|
2179
2179
|
}
|
|
2180
2180
|
register(reference) {
|
|
2181
|
-
return this.provider === "braintree" ? this.subscriptionService.registerBraintreePaymentMethod(this.subscriptionId, reference) : this.subscriptionService.registerAirwallexPaymentMethod(this.subscriptionId, reference)
|
|
2181
|
+
return this.provider === "braintree" ? this.subscriptionService.registerBraintreePaymentMethod(this.subscriptionId, reference).pipe(map(({ result }) => result)) : this.subscriptionService.registerAirwallexPaymentMethod(this.subscriptionId, reference).pipe(map(({ result, message }) => ({
|
|
2182
|
+
data: result,
|
|
2183
|
+
message
|
|
2184
|
+
})));
|
|
2182
2185
|
}
|
|
2183
2186
|
teardown() {
|
|
2184
2187
|
this.braintree.teardown();
|
|
@@ -2359,12 +2362,12 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
|
|
|
2359
2362
|
paymentMethods: this.subscriptionService.getPaymentMethods(this.subscriptionId),
|
|
2360
2363
|
product: this.productService.getProductById(this.productId)
|
|
2361
2364
|
}).subscribe((response) => {
|
|
2362
|
-
this.stripePublishKey = response.product.stripe_publishable_key;
|
|
2363
|
-
if (response.paymentMethods.status === StatusCodes.OK) {
|
|
2364
|
-
const data = response.paymentMethods.data
|
|
2365
|
-
this.cardDetails = data
|
|
2366
|
-
this.secondaryCard = data
|
|
2367
|
-
this.secondaryProvider = data
|
|
2365
|
+
this.stripePublishKey = response.product.result.stripe_publishable_key;
|
|
2366
|
+
if (response.paymentMethods.result.status === StatusCodes.OK) {
|
|
2367
|
+
const data = response.paymentMethods.result.data;
|
|
2368
|
+
this.cardDetails = data?.primary || null;
|
|
2369
|
+
this.secondaryCard = data?.secondary || null;
|
|
2370
|
+
this.secondaryProvider = data?.secondary_provider || "braintree";
|
|
2368
2371
|
}
|
|
2369
2372
|
this.cdr.markForCheck();
|
|
2370
2373
|
}).add(() => {
|
|
@@ -2394,9 +2397,9 @@ var UpdatePaymentDetailsComponent = class UpdatePaymentDetailsComponent extends
|
|
|
2394
2397
|
this.cdr.markForCheck();
|
|
2395
2398
|
return;
|
|
2396
2399
|
}
|
|
2397
|
-
this.subscriptionService.updateCardDetails(this.form.value, this.subscriptionId).subscribe({ next: (
|
|
2398
|
-
if (
|
|
2399
|
-
else if (
|
|
2400
|
+
this.subscriptionService.updateCardDetails(this.form.value, this.subscriptionId).subscribe({ next: ({ result }) => {
|
|
2401
|
+
if (result.error) this.toast.error(result.error.errors[0].message);
|
|
2402
|
+
else if (result.status === StatusCodes.CREATED) this.toast.success(result.message);
|
|
2400
2403
|
this.form.markAsPristine();
|
|
2401
2404
|
this.cancel();
|
|
2402
2405
|
} }).add(() => {
|
|
@@ -2695,8 +2698,8 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2695
2698
|
});
|
|
2696
2699
|
}
|
|
2697
2700
|
getSubscriptionDetails() {
|
|
2698
|
-
this.subscriptionService.getById(this.subscriptionId).subscribe((
|
|
2699
|
-
this.subscription =
|
|
2701
|
+
this.subscriptionService.getById(this.subscriptionId).subscribe(({ result }) => {
|
|
2702
|
+
this.subscription = result;
|
|
2700
2703
|
const product = this.subscription.products.find((x) => x.id === this.productId);
|
|
2701
2704
|
this.form.patchValue({ units: product?.purchased_units });
|
|
2702
2705
|
this.units = this.form.get("units").value;
|
|
@@ -2706,10 +2709,10 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2706
2709
|
});
|
|
2707
2710
|
}
|
|
2708
2711
|
getProductDetails() {
|
|
2709
|
-
this.productService.getProductById(this.productId).subscribe((
|
|
2710
|
-
this.product =
|
|
2711
|
-
this.stripePublishKey =
|
|
2712
|
-
if (
|
|
2712
|
+
this.productService.getProductById(this.productId).subscribe(({ result }) => {
|
|
2713
|
+
this.product = result;
|
|
2714
|
+
this.stripePublishKey = result?.stripe_publishable_key;
|
|
2715
|
+
if (result?.stripe_publishable_key) Stripe.setPublishableKey(result.stripe_publishable_key);
|
|
2713
2716
|
const prodUnits = this.units > this.product.min_units ? this.units : this.product.min_units || 1;
|
|
2714
2717
|
this.form.patchValue({ units: prodUnits });
|
|
2715
2718
|
this.units = this.form.get("units").value;
|
|
@@ -2801,9 +2804,9 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2801
2804
|
subscription_id: this.subscriptionId
|
|
2802
2805
|
};
|
|
2803
2806
|
this.subscriptionService.postSubscription(data).subscribe({
|
|
2804
|
-
next: (
|
|
2807
|
+
next: ({ result }) => {
|
|
2805
2808
|
this.store.dispatch(new GetUser());
|
|
2806
|
-
if (
|
|
2809
|
+
if (result.id) {
|
|
2807
2810
|
this.form.markAsPristine();
|
|
2808
2811
|
this.router.navigate(["/account/subscriptions"]);
|
|
2809
2812
|
this.toast.success(this.translation.translate("User.Subscriptions.SubscriptionPurchased"));
|
|
@@ -2832,8 +2835,8 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2832
2835
|
});
|
|
2833
2836
|
}
|
|
2834
2837
|
getCardDetails(subscriptionId) {
|
|
2835
|
-
this.subscriptionService.getCardDetails(subscriptionId).subscribe((
|
|
2836
|
-
this.cardDetails =
|
|
2838
|
+
this.subscriptionService.getCardDetails(subscriptionId).subscribe(({ result }) => {
|
|
2839
|
+
this.cardDetails = result.data || null;
|
|
2837
2840
|
this.form.patchValue({
|
|
2838
2841
|
units: this.units,
|
|
2839
2842
|
card_number: this.cardDetails?.card_number,
|
|
@@ -2859,13 +2862,13 @@ var UpgradeSubscriptionComponent = class UpgradeSubscriptionComponent extends Ap
|
|
|
2859
2862
|
Stripe.card.createToken(cardDetails, (status, res) => {
|
|
2860
2863
|
if (status !== 200) this.toast.error(res.error.message);
|
|
2861
2864
|
else this.subscriptionService.updateCardDetails(this.form.value, this.subscriptionId).subscribe({
|
|
2862
|
-
next: (
|
|
2863
|
-
if (
|
|
2864
|
-
const err =
|
|
2865
|
+
next: ({ result }) => {
|
|
2866
|
+
if (result.error) {
|
|
2867
|
+
const err = result.error.errors[0].message;
|
|
2865
2868
|
this.toast.error(err);
|
|
2866
|
-
} else if (
|
|
2869
|
+
} else if (result.status === StatusCodes.CREATED) {
|
|
2867
2870
|
this.enrollUserToSubscription();
|
|
2868
|
-
this.toast.success(
|
|
2871
|
+
this.toast.success(result.message);
|
|
2869
2872
|
}
|
|
2870
2873
|
this.cdr.markForCheck();
|
|
2871
2874
|
},
|
|
@@ -3216,8 +3219,8 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3216
3219
|
});
|
|
3217
3220
|
}
|
|
3218
3221
|
fetchData() {
|
|
3219
|
-
this.subscriptionService.getById(this.subscriptionId).subscribe((
|
|
3220
|
-
this.subscription =
|
|
3222
|
+
this.subscriptionService.getById(this.subscriptionId).subscribe(({ result }) => {
|
|
3223
|
+
this.subscription = result;
|
|
3221
3224
|
this.fullLogo = this.subscription?.full_logo.url;
|
|
3222
3225
|
this.squaredLogo = this.subscription?.squared_logo?.url;
|
|
3223
3226
|
this.fullLogoBroken = false;
|
|
@@ -3279,7 +3282,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3279
3282
|
const file = new File([blob], filename);
|
|
3280
3283
|
this.subscriptionService.addFullLogo(this.subscriptionId, file).subscribe((res) => {
|
|
3281
3284
|
this.modalService.dismissAll();
|
|
3282
|
-
this.fullLogo = res?.full_logo?.url;
|
|
3285
|
+
this.fullLogo = res?.result?.full_logo?.url;
|
|
3283
3286
|
this.fullLogoBroken = false;
|
|
3284
3287
|
this.cdr.markForCheck();
|
|
3285
3288
|
});
|
|
@@ -3290,7 +3293,7 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3290
3293
|
const file = new File([blob], filename);
|
|
3291
3294
|
this.subscriptionService.addSquaredLogo(this.subscriptionId, file).subscribe((res) => {
|
|
3292
3295
|
this.modalService.dismissAll();
|
|
3293
|
-
this.squaredLogo = res?.squared_logo?.url;
|
|
3296
|
+
this.squaredLogo = res?.result?.squared_logo?.url;
|
|
3294
3297
|
this.squaredLogoBroken = false;
|
|
3295
3298
|
this.cdr.markForCheck();
|
|
3296
3299
|
});
|
|
@@ -3323,8 +3326,8 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3323
3326
|
});
|
|
3324
3327
|
}
|
|
3325
3328
|
onPasswordValidation(_event) {
|
|
3326
|
-
this.subscriptionService.updateSubscriptionUnit(this.subscription.id, this.units).subscribe((
|
|
3327
|
-
if (
|
|
3329
|
+
this.subscriptionService.updateSubscriptionUnit(this.subscription.id, this.units).subscribe(({ result }) => {
|
|
3330
|
+
if (result.status === StatusCodes.OK) this.toast.success(this.translation.translate("User.Subscriptions.Details.UnitsUpdatedMessage"));
|
|
3328
3331
|
else this.toast.error(this.translation.translate("GenericMessage.WentWrong"));
|
|
3329
3332
|
this.cdr.markForCheck();
|
|
3330
3333
|
});
|
|
@@ -3362,9 +3365,9 @@ var UserSubscriptionDetailsComponent = class UserSubscriptionDetailsComponent ex
|
|
|
3362
3365
|
}
|
|
3363
3366
|
performTokenRefresh() {
|
|
3364
3367
|
this.refreshingTokens = true;
|
|
3365
|
-
this.subscriptionService.refreshApiTokens(this.subscriptionId).subscribe({ next: (
|
|
3366
|
-
if (
|
|
3367
|
-
if (
|
|
3368
|
+
this.subscriptionService.refreshApiTokens(this.subscriptionId).subscribe({ next: ({ result }) => {
|
|
3369
|
+
if (result && result.api_access_token) this.subscription.api_access_token = result.api_access_token;
|
|
3370
|
+
if (result && result.api_client_id) this.subscription.api_client_id = result.api_client_id;
|
|
3368
3371
|
this.showApiToken = false;
|
|
3369
3372
|
this.showApiClientId = false;
|
|
3370
3373
|
this.fetchData();
|
|
@@ -3814,6 +3817,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3814
3817
|
this.clipboard = inject(Clipboard);
|
|
3815
3818
|
this.cdr = inject(ChangeDetectorRef);
|
|
3816
3819
|
this.confirmDialog = inject(ConfirmDialogService);
|
|
3820
|
+
this.inMobileApp = isInMobileWebView();
|
|
3817
3821
|
this.showApiKey = true;
|
|
3818
3822
|
this.subscribedSubscriptions = [];
|
|
3819
3823
|
this.isLoaded = false;
|
|
@@ -3867,8 +3871,8 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3867
3871
|
this.userStore().subscribe((user) => {
|
|
3868
3872
|
this.user = user;
|
|
3869
3873
|
if (user) this.userService.getUserSubscriptions(user.id).subscribe((response) => {
|
|
3870
|
-
this.subscribedSubscriptions = sortBy(response.subscriptions, "deleted");
|
|
3871
|
-
response?.expired_subscriptions.forEach((subscription) => {
|
|
3874
|
+
this.subscribedSubscriptions = sortBy(response.result.subscriptions, "deleted");
|
|
3875
|
+
response?.result?.expired_subscriptions.forEach((subscription) => {
|
|
3872
3876
|
this.subscribedSubscriptions.push(subscription);
|
|
3873
3877
|
});
|
|
3874
3878
|
this.subscribedSubscriptions.forEach((subscription) => {
|
|
@@ -3883,8 +3887,8 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
3883
3887
|
});
|
|
3884
3888
|
}
|
|
3885
3889
|
updateApiKey(subscription, product) {
|
|
3886
|
-
this.subscriptionService.updateSubscriptionAPIKey(subscription.id, product.id).subscribe((
|
|
3887
|
-
product.api_access_token =
|
|
3890
|
+
this.subscriptionService.updateSubscriptionAPIKey(subscription.id, product.id).subscribe(({ result }) => {
|
|
3891
|
+
product.api_access_token = result;
|
|
3888
3892
|
this.toast.success(this.translation.translate("User.Subscriptions.UpdatedKey"));
|
|
3889
3893
|
this.getSubscribedProduct();
|
|
3890
3894
|
this.cdr.markForCheck();
|
|
@@ -4011,7 +4015,7 @@ var UserSubscriptionListComponent = class UserSubscriptionListComponent extends
|
|
|
4011
4015
|
],
|
|
4012
4016
|
usesInheritance: true,
|
|
4013
4017
|
ngImport: i0,
|
|
4014
|
-
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.List.Title' | transloco }}</h2>\n <p>{{ 'User.Subscriptions.List.Description' | transloco }}</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>{{ 'User.Subscriptions.List.Organisation' | transloco }}</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? ('User.Subscriptions.List.AfterTrial' | transloco) : '' }}\n } @else {\n {{ 'User.Subscriptions.Free' | transloco }}\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n [attr.aria-label]=\"'Button.Edit' | transloco\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n (product.expired ? 'User.Subscriptions.List.Expired' : 'User.Subscriptions.List.ExpiryDate') | transloco\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ShowKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.CopyKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ChangeKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">{{ 'User.Subscriptions.List.Deleted' | transloco }}</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">{{ 'User.Subscriptions.Trial' | transloco }}</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.List.PausedCollection' | transloco }}\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">{{ 'User.Subscriptions.Free' | transloco }}</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.List.Invited' | transloco }}\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">{{ 'User.Subscriptions.List.AsAdmin' | transloco }}</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n {{ 'User.Subscriptions.List.NoProducts' | transloco }}\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
4018
|
+
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.List.Title' | transloco }}</h2>\n <p>{{ 'User.Subscriptions.List.Description' | transloco }}</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>{{ 'User.Subscriptions.List.Organisation' | transloco }}</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? ('User.Subscriptions.List.AfterTrial' | transloco) : '' }}\n } @else {\n {{ 'User.Subscriptions.Free' | transloco }}\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n [attr.aria-label]=\"'Button.Edit' | transloco\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!inMobileApp && !isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n @if (!inMobileApp) {\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n }\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n (product.expired ? 'User.Subscriptions.List.Expired' : 'User.Subscriptions.List.ExpiryDate') | transloco\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ShowKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.CopyKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ChangeKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">{{ 'User.Subscriptions.List.Deleted' | transloco }}</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">{{ 'User.Subscriptions.Trial' | transloco }}</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.List.PausedCollection' | transloco }}\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">{{ 'User.Subscriptions.Free' | transloco }}</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.List.Invited' | transloco }}\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">{{ 'User.Subscriptions.List.AsAdmin' | transloco }}</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (!inMobileApp && product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n {{ 'User.Subscriptions.List.NoProducts' | transloco }}\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
4015
4019
|
styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"],
|
|
4016
4020
|
dependencies: [
|
|
4017
4021
|
{
|
|
@@ -4180,7 +4184,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4180
4184
|
TranslocoPipe,
|
|
4181
4185
|
DateFormatPipe
|
|
4182
4186
|
],
|
|
4183
|
-
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.List.Title' | transloco }}</h2>\n <p>{{ 'User.Subscriptions.List.Description' | transloco }}</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>{{ 'User.Subscriptions.List.Organisation' | transloco }}</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? ('User.Subscriptions.List.AfterTrial' | transloco) : '' }}\n } @else {\n {{ 'User.Subscriptions.Free' | transloco }}\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n [attr.aria-label]=\"'Button.Edit' | transloco\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n (product.expired ? 'User.Subscriptions.List.Expired' : 'User.Subscriptions.List.ExpiryDate') | transloco\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ShowKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.CopyKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ChangeKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">{{ 'User.Subscriptions.List.Deleted' | transloco }}</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">{{ 'User.Subscriptions.Trial' | transloco }}</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.List.PausedCollection' | transloco }}\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">{{ 'User.Subscriptions.Free' | transloco }}</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.List.Invited' | transloco }}\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">{{ 'User.Subscriptions.List.AsAdmin' | transloco }}</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n {{ 'User.Subscriptions.List.NoProducts' | transloco }}\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
4187
|
+
template: "@if (!showTos) {\n <!-- Subscriptions Tab Content -->\n @if (!editing && !isAddNew) {\n <div class=\"row\">\n <div class=\"col-12\">\n <h2>{{ 'User.Subscriptions.List.Title' | transloco }}</h2>\n <p>{{ 'User.Subscriptions.List.Description' | transloco }}</p>\n </div>\n </div>\n }\n <!-- Subscribed Product Cards -->\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (\n !editing && !isAddNew && !isUpdatePayment && isLoaded && subscribedSubscriptions.length\n ) {\n <div class=\"row\"\n >\n @for (subscription of subscribedSubscriptions; track trackBySubscription($index, subscription)) {\n <div class=\"col-12 col-md-6 my-3\"\n >\n <div class=\"subscription-details mb-4\">\n <div class=\"subscription-summary d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3\">\n <div class=\"subscription-summary__info\">\n <div>\n <strong>{{ 'User.Subscriptions.List.Organisation' | transloco }}</strong>\n {{ subscription.organisation ? subscription.organisation : subscription.contact_name }}\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.TotalPriceExclTax' | transloco }}:</strong>\n @if (subscription.calculated_price) {\n {{ subscription.products[0]?.currency }} {{ subscription.calculated_price / 100 | number:'1.2-2' }}\n {{ subscription.products[0].trial_subscription ? ('User.Subscriptions.List.AfterTrial' | transloco) : '' }}\n } @else {\n {{ 'User.Subscriptions.Free' | transloco }}\n }\n </div>\n <div>\n <strong>{{ 'User.Subscriptions.SeatsInUse' | transloco }}:</strong>\n {{ subscription.units_in_use || 1 }} / {{ subscription.purchased_units }}\n @if (subscription.purchased_units) {\n <span class=\"seats-usage\"\n [style.--seats-pct]=\"(subscription.units_in_use || 1) / subscription.purchased_units\"></span>\n }\n </div>\n </div>\n <!-- Subscription-level actions (a subscription may hold multiple products) -->\n @if (\n (subscription.is_subscription_owner || subscription.is_subscription_admin) &&\n subscription.products?.length &&\n !subscription.products[0].deleted &&\n !subscription.products[0].dependency_products?.length\n ) {\n <div class=\"subscription-summary__actions d-flex flex-wrap align-items-center gap-2\">\n <a class=\"btn btn-outline-primary btn-sm\"\n [attr.aria-label]=\"'Button.Edit' | transloco\"\n [routerLink]=\"['../subscriptions', subscription.id]\">\n {{ 'Button.Edit' | transloco }}\n </a>\n @if (!subscription.products[0].expired && !subscription.products[0].trial_subscription) {\n <button [routerLink]=\"['../subscriptions', subscription.id, 'credential']\"\n class=\"btn btn-outline-secondary btn-sm\">\n {{ 'User.Subscriptions.Credentials' | transloco }}\n </button>\n }\n @if (!inMobileApp && !isUpdatePayment && subscription.stripe_customer_id) {\n <a class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['../subscriptions', subscription.id, 'product', subscription.products[0].id, 'update-payment']\">\n <i class=\"fa fa-edit me-1\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.UpdateCardDetails' | transloco }}</a>\n }\n @if (!inMobileApp) {\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"'/account/subscriptions/add-new'\"\n [queryParams]=\"{ subscription_id: subscription.id }\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.ManageAllProducts' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n <i class=\"fa fa-plus me-1\"></i>{{ 'User.Subscriptions.SeeAllProducts' | transloco }}\n </button>\n }\n @if (!subscription.has_child_subscriptions) {\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger\"\n (click)=\"deleteSubscription(subscription)\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.DeleteSubscription' | transloco\"\n tooltipPosition=\"bottom\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.DeleteSubscription' | transloco }}\n </button>\n }\n </div>\n }\n </div>\n <!-- Products list -->\n @for (\n product of subscription.products; track trackByProduct($index,\n product); let first = $first) {\n <div class=\"mb-3\">\n <div class=\"card subscription-products-cards\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <div>\n <h4 class=\"mb-3 text-bold-500 primary\">{{ product?.name }}</h4>\n <!-- Frequency -->\n <div>\n <div>\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.Frequency' | transloco\n }}:</strong>\n {{ product?.billing_frequency | uppercase }}\n </div>\n </div>\n <!-- Expiration -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n (product.expired ? 'User.Subscriptions.List.Expired' : 'User.Subscriptions.List.ExpiryDate') | transloco\n }}:</strong>\n {{ product.expires_at | dateFormat }}\n </div>\n <!-- Estimated Price -->\n <div [ngClass]=\"{ 'text-danger': product.expired }\">\n <strong class=\"d-inline-block w-50\">{{\n 'User.Subscriptions.PriceExclTax' | transloco\n }}:</strong>\n {{ product.currency }}\n {{ (product.calculated_price / 100) | number:'1.2-2' }}\n </div>\n <!-- Product API Key (Alpha-only) -->\n <ng-container *rbacAllow=\"'Pages.Alpha'\">\n @if (\n (product.stripe_plan_id && product.max_hits > 0) ||\n product.max_hits_trial > 0\n ) {\n <div class=\"d-flex align-items-center\">\n <strong class=\"d-inline-block w-50\">\n {{ 'User.Subscriptions.ApiKey' | transloco }}:\n <i class=\"far fa-info-circle ms-1 text-muted\"\n aria-hidden=\"true\"\n [pTooltip]=\"'User.Subscriptions.ApiKey.NotUsedHint' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"></i>\n </strong>\n <code class=\"text-truncate me-2\">{{ product.masked }}</code>\n <span class=\"ms-auto d-flex align-items-center flex-shrink-0\">\n <!-- Show Access Key -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ShowKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"showKey(product)\">\n <i class=\"fas fa-eye\" aria-hidden=\"true\"></i>\n </button>\n <!-- Copy To Clipboard -->\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.CopyKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <i class=\"fal fa-copy\"\n aria-hidden=\"true\"\n (click)=\"onClipboardCopy(product.api_access_token)\"\n (keydown.enter)=\"onClipboardCopy(product.api_access_token)\"></i>\n </button>\n <!-- Update API Key -->\n @if (!product.expired && !product.deleted) {\n <button class=\"btn\"\n [pTooltip]=\"'User.Subscriptions.List.ChangeKey' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\"\n (click)=\"updateApiKey(subscription, product)\">\n <i class=\"fal fa-sync-alt\" aria-hidden=\"true\"></i>\n </button>\n }\n </span>\n </div>\n }\n </ng-container>\n </div>\n </div>\n <div class=\"card-footer px-3 d-flex flex-column gap-2\">\n <div class=\"footer-status d-flex flex-wrap align-items-center gap-2\">\n @if (product.deleted && !product.expired) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.OutdatedMessage' | transloco }}\n </span>\n }\n @if (product.deleted) {\n <span class=\"badge bg-danger\">{{ 'User.Subscriptions.List.Deleted' | transloco }}</span>\n }\n @if (\n product.trial_subscription &&\n product.calculated_price\n ) {\n <span class=\"badge bg-warning\">{{ 'User.Subscriptions.Trial' | transloco }}</span>\n }\n @if (product?.pause_collection && objectKeys(product?.pause_collection)?.length) {\n <span class=\"badge bg-grey\"\n [pTooltip]=\"'User.Subscriptions.Tooltip.PausedCollection'|transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Subscriptions.List.PausedCollection' | transloco }}\n </span>\n }\n @if (!product.calculated_price) {\n <span class=\"badge bg-success\">{{ 'User.Subscriptions.Free' | transloco }}</span>\n }\n @if (!product?.deleted && !subscription.is_subscription_owner) {\n <span class=\"footer-note\">\n <i class=\"far fa-info-circle me-2\" aria-hidden=\"true\"></i>{{ 'User.Subscriptions.List.Invited' | transloco }}\n @if (subscription.is_subscription_admin) {\n <span class=\"badge bg-role-admin ms-1\">{{ 'User.Subscriptions.List.AsAdmin' | transloco }}</span>\n }\n </span>\n }\n </div>\n @if (\n subscription.is_subscription_owner ||\n subscription.is_subscription_admin\n ) {\n <div class=\"footer-actions d-flex flex-wrap align-items-center justify-content-end gap-2\">\n <!-- Secondary products only: the primary goes with the whole subscription -->\n @if (\n subscription.products.length > 1 &&\n !product.is_primary_product &&\n !product?.deleted\n ) {\n <span [pTooltip]=\"product.required_by_product_ids?.length ? ('User.Subscriptions.Tooltip.ProductRequired' | transloco) : ''\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n <button type=\"button\"\n class=\"btn btn-outline-danger btn-sm\"\n [disabled]=\"product.required_by_product_ids?.length\"\n (click)=\"deleteProduct(subscription, product)\">\n {{ 'User.Subscriptions.DeleteProduct' | transloco }}\n </button>\n </span>\n }\n @if (!inMobileApp && product.stripe_plan_id && product.active) {\n <!-- Upgrade (single primary CTA) -->\n @if (product.trial_subscription && !product.deleted) {\n <button class=\"btn btn-primary btn-sm\"\n (click)=\"attemptUpgrade(subscription, product)\">\n {{ 'Button.Upgrade' | transloco }}\n </button>\n }\n <!-- Subscribe -->\n @if (subscription.expired && product.stripe_plan_id) {\n <button class=\"btn btn-primary btn-sm\"\n [routerLink]=\"'/account/subscriptions/add-new'\">\n {{ 'User.Subscriptions.Subscribe' | transloco }}\n </button>\n }\n }\n <!-- Privacy & Terms of Service (quiet link, not a button) -->\n @if (product?.product_privacy_service_id) {\n <button class=\"btn btn-link btn-sm p-0 footer-tos-link\"\n (click)=\"showPrivacyAndTos(product)\">\n {{\n 'User.Subscriptions.PrivacyAndTermsOfService'\n | transloco\n }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n @if (subscription.products.length === 0) {\n <div>\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <p class=\"text-center\">\n {{ 'User.Subscriptions.List.NoProducts' | transloco }}\n </p>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n @if (!editing && !isAddNew && !isUpdatePayment) {\n <div class=\"col-12\"\n >\n @if (subscribedSubscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"You don't have any subscription.\"\n >\n </pw-no-data>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n <!-- Danger zone (demoted account deletion) -->\n @if (!editing && !isAddNew && !isUpdatePayment && isLoaded) {\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"danger-zone mt-4\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-danger danger-zone__action\"\n (click)=\"showModalForAccountDeletion()\"\n [pTooltip]=\"'User.Account.Tooltip.DeleteAccount' | transloco\"\n tooltipPosition=\"top\"\n appendTo=\"body\">\n {{ 'User.Account.DeleteAccount' | transloco }}\n </button>\n </div>\n </div>\n </div>\n }\n <!--\n Add New Subscription\n -->\n <!-- <ng-template [ngIf]=\"isAddNew && !isUpdatePayment\">\n <pw-subscription-details></pw-subscription-details>\n</ng-template> -->\n<!--\nValidate Password For Account Delete\n-->\n<pw-password-validation #passwordValidationModalForAccountDelete\n [destructive]=\"true\"\n (successEvent)=\"deleteUser($event)\">\n</pw-password-validation>\n<!--\nValidate Password For Display Key\n-->\n<pw-password-validation #passwordValidationModalForKey\n (successEvent)=\"displayApiKey()\">\n</pw-password-validation>\n<pw-subscription-removal [user]=\"user\" (removed)=\"onRemoved()\"></pw-subscription-removal>\n}\n\n@if (showTos) {\n <pw-privacy-and-tos [productId]=\"productId\"></pw-privacy-and-tos>\n}\n\n<router-outlet></router-outlet>\n",
|
|
4184
4188
|
styles: [".btn-list{bottom:24px;left:0;padding:0 38px;right:0}.shadow-md{padding-bottom:70px!important}.bg-dark{border:0}.subscription-details{background:#fff;border:1px solid #e2e5ea;border-radius:12px;padding:16px 16px 6px;font-size:14px;font-variant-numeric:tabular-nums}.subscription-summary{border-bottom:1px solid #eef0f3;padding-bottom:12px}.seats-usage{display:inline-block;width:120px;height:6px;margin-left:8px;border-radius:999px;vertical-align:middle;overflow:hidden;background:linear-gradient(#5a6473,#5a6473) left/calc(var(--seats-pct, 0) * 100%) 100% no-repeat,#e2e5ea}.subscription-products-cards{padding-bottom:0!important}.subscription-products-cards .card-footer{position:static!important}.subscription-products-cards.card{background:#f7f8fa;border:1px solid #eef0f3;border-radius:8px;box-shadow:none!important;font-size:14px}.card-footer{background:transparent;border-top:1px solid #eef0f3}.card-footer .footer-note{color:#5a6473;font-size:.875rem}.card-footer .footer-tos-link{color:#5a6473;font-weight:500;text-decoration:underline}.card-footer .footer-tos-link:hover{color:var(--first)}.badge{font-weight:600;border-radius:4px}.badge.bg-success{background-color:#e6f4ec!important;color:#0f6b3a!important}.badge.bg-danger{background-color:#fbeae8!important;color:#c0392b!important}.badge.bg-warning{background-color:#fbf1e3!important;color:#8a5a00!important}.badge.bg-grey,.badge.bg-role-admin{background-color:#eef0f3!important;color:#5a6473!important}code{color:var(--text);min-width:0}.danger-zone{border-top:1px solid #e2e5ea;padding-top:16px;text-align:right}\n"]
|
|
4185
4189
|
}]
|
|
4186
4190
|
}],
|
|
@@ -4240,10 +4244,10 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4240
4244
|
this.userStore().subscribe((user) => {
|
|
4241
4245
|
if (user) {
|
|
4242
4246
|
this.userId = user.id;
|
|
4243
|
-
this.userService.getUserInvoices(paging, user.id).subscribe((
|
|
4244
|
-
this.invoices =
|
|
4245
|
-
this.totalRecords =
|
|
4246
|
-
this.totalRecordsUnFiltered =
|
|
4247
|
+
this.userService.getUserInvoices(paging, user.id).subscribe(({ result, page_info }) => {
|
|
4248
|
+
this.invoices = result;
|
|
4249
|
+
this.totalRecords = page_info.total_count;
|
|
4250
|
+
this.totalRecordsUnFiltered = page_info.total_count_unfiltered;
|
|
4247
4251
|
this.pollForInvoices();
|
|
4248
4252
|
this.cdr.markForCheck();
|
|
4249
4253
|
}).add(() => {
|
|
@@ -4255,8 +4259,8 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4255
4259
|
});
|
|
4256
4260
|
}
|
|
4257
4261
|
pollForInvoices() {
|
|
4258
|
-
this.subscription = this.intervalTimer.pipe(mergeMap(() => this.userService.getUserInvoices({}, this.userId))).subscribe((
|
|
4259
|
-
this.invoices =
|
|
4262
|
+
this.subscription = this.intervalTimer.pipe(mergeMap(() => this.userService.getUserInvoices({}, this.userId))).subscribe(({ result }) => {
|
|
4263
|
+
this.invoices = result;
|
|
4260
4264
|
this.cdr.markForCheck();
|
|
4261
4265
|
});
|
|
4262
4266
|
}
|
|
@@ -4283,7 +4287,7 @@ var UserInvoiceComponent = class UserInvoiceComponent extends AppBaseComponent {
|
|
|
4283
4287
|
selector: "pw-user-invoice",
|
|
4284
4288
|
usesInheritance: true,
|
|
4285
4289
|
ngImport: i0,
|
|
4286
|
-
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\">{{ 'User.Invoices.Title' | transloco }}</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\">{{ 'User.Invoices.Search' | transloco }}</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]=\"'User.Invoices.SearchPlaceholder' | transloco\"\n data-cy=\"incident-search\"\n [attr.aria-label]=\"'User.Invoices.Search' | transloco\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">{{ 'User.Invoices.Date' | transloco }} <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">{{ 'User.Subscriptions.Frequency' | transloco }} <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">{{ 'User.Invoices.SeatsPurchased' | transloco }} <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">{{ 'User.Invoices.Subtotal' | transloco }} <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">{{ 'User.Invoices.TotalInclTax' | transloco }} <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">{{ 'Label.Actions' | transloco }}</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\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else if (invoice?.stripe_invoice_pdf) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.stripe_invoice_pdf\" target=\"_blank\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else {\n <button type=\"button\" class=\"btn btn-sm btn-primary invoice-download-unavailable\" aria-disabled=\"true\"\n data-cy=\"invoice-download-unavailable\"\n [pTooltip]=\"'User.Invoices.NoFile' | transloco\" tooltipPosition=\"top\" appendTo=\"body\"\n [attr.aria-label]=\"'User.Invoices.NoFile' | transloco\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </button>\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",
|
|
4290
|
+
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\">{{ 'User.Invoices.Title' | transloco }}</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]=\"true\" [alwaysShowPaginator]=\"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\">{{ 'User.Invoices.Search' | transloco }}</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]=\"'User.Invoices.SearchPlaceholder' | transloco\"\n data-cy=\"incident-search\"\n [attr.aria-label]=\"'User.Invoices.Search' | transloco\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">{{ 'User.Invoices.Date' | transloco }} <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">{{ 'User.Subscriptions.Frequency' | transloco }} <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">{{ 'User.Invoices.SeatsPurchased' | transloco }} <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">{{ 'User.Invoices.Subtotal' | transloco }} <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">{{ 'User.Invoices.TotalInclTax' | transloco }} <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">{{ 'Label.Actions' | transloco }}</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\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else if (invoice?.stripe_invoice_pdf) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.stripe_invoice_pdf\" target=\"_blank\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else {\n <button type=\"button\" class=\"btn btn-sm btn-primary invoice-download-unavailable\" aria-disabled=\"true\"\n data-cy=\"invoice-download-unavailable\"\n [pTooltip]=\"'User.Invoices.NoFile' | transloco\" tooltipPosition=\"top\" appendTo=\"body\"\n [attr.aria-label]=\"'User.Invoices.NoFile' | transloco\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </button>\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",
|
|
4287
4291
|
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)}.btn.btn-primary.invoice-download-unavailable{cursor:not-allowed;opacity:var(--bs-btn-disabled-opacity)}.btn.btn-primary.invoice-download-unavailable:hover,.btn.btn-primary.invoice-download-unavailable:active{background-color:var(--first)!important;border-color:var(--first)!important;color:rgba(var(--bs-light-rgb),1)!important}\n"],
|
|
4288
4292
|
dependencies: [
|
|
4289
4293
|
{
|
|
@@ -4571,7 +4575,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4571
4575
|
DatePipe,
|
|
4572
4576
|
TranslocoPipe
|
|
4573
4577
|
],
|
|
4574
|
-
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\">{{ 'User.Invoices.Title' | transloco }}</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\">{{ 'User.Invoices.Search' | transloco }}</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]=\"'User.Invoices.SearchPlaceholder' | transloco\"\n data-cy=\"incident-search\"\n [attr.aria-label]=\"'User.Invoices.Search' | transloco\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">{{ 'User.Invoices.Date' | transloco }} <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">{{ 'User.Subscriptions.Frequency' | transloco }} <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">{{ 'User.Invoices.SeatsPurchased' | transloco }} <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">{{ 'User.Invoices.Subtotal' | transloco }} <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">{{ 'User.Invoices.TotalInclTax' | transloco }} <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">{{ 'Label.Actions' | transloco }}</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\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else if (invoice?.stripe_invoice_pdf) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.stripe_invoice_pdf\" target=\"_blank\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else {\n <button type=\"button\" class=\"btn btn-sm btn-primary invoice-download-unavailable\" aria-disabled=\"true\"\n data-cy=\"invoice-download-unavailable\"\n [pTooltip]=\"'User.Invoices.NoFile' | transloco\" tooltipPosition=\"top\" appendTo=\"body\"\n [attr.aria-label]=\"'User.Invoices.NoFile' | transloco\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </button>\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",
|
|
4578
|
+
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\">{{ 'User.Invoices.Title' | transloco }}</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]=\"true\" [alwaysShowPaginator]=\"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\">{{ 'User.Invoices.Search' | transloco }}</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]=\"'User.Invoices.SearchPlaceholder' | transloco\"\n data-cy=\"incident-search\"\n [attr.aria-label]=\"'User.Invoices.Search' | transloco\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n\n <ng-template #header>\n <tr>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"date\">{{ 'User.Invoices.Date' | transloco }} <p-sort-icon field=\"date\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"frequency\">{{ 'User.Subscriptions.Frequency' | transloco }} <p-sort-icon field=\"frequency\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"seatsPurchased\">{{ 'User.Invoices.SeatsPurchased' | transloco }} <p-sort-icon field=\"seatsPurchased\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"subtotal\">{{ 'User.Invoices.Subtotal' | transloco }} <p-sort-icon field=\"subtotal\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\" pSortableColumn=\"total\">{{ 'User.Invoices.TotalInclTax' | transloco }} <p-sort-icon field=\"total\"></p-sort-icon></th>\n <th pResizableColumn scope=\"col\">{{ 'Label.Actions' | transloco }}</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\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else if (invoice?.stripe_invoice_pdf) {\n <a class=\"btn btn-sm btn-primary\" [attr.href]=\"invoice.stripe_invoice_pdf\" target=\"_blank\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </a>\n } @else {\n <button type=\"button\" class=\"btn btn-sm btn-primary invoice-download-unavailable\" aria-disabled=\"true\"\n data-cy=\"invoice-download-unavailable\"\n [pTooltip]=\"'User.Invoices.NoFile' | transloco\" tooltipPosition=\"top\" appendTo=\"body\"\n [attr.aria-label]=\"'User.Invoices.NoFile' | transloco\">\n <i class=\"fa fa-download\"> {{ 'User.Invoices.Download' | transloco }}</i>\n </button>\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",
|
|
4575
4579
|
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)}.btn.btn-primary.invoice-download-unavailable{cursor:not-allowed;opacity:var(--bs-btn-disabled-opacity)}.btn.btn-primary.invoice-download-unavailable:hover,.btn.btn-primary.invoice-download-unavailable:active{background-color:var(--first)!important;border-color:var(--first)!important;color:rgba(var(--bs-light-rgb),1)!important}\n"]
|
|
4576
4580
|
}]
|
|
4577
4581
|
}]
|
|
@@ -4686,14 +4690,14 @@ var CommunicationTabComponent = class CommunicationTabComponent extends AppBaseC
|
|
|
4686
4690
|
this.getAllSubscription();
|
|
4687
4691
|
}
|
|
4688
4692
|
getAllSubscription() {
|
|
4689
|
-
this.commonService.getAllNewsletter().subscribe((
|
|
4693
|
+
this.commonService.getAllNewsletter().subscribe(({ result }) => {
|
|
4690
4694
|
this.store.select(getUser).subscribe((user) => {
|
|
4691
4695
|
if (user?.currentUser) {
|
|
4692
4696
|
this.user = user.currentUser;
|
|
4693
4697
|
this.profileService.getUserObject("user_newsletters", this.user.slug).subscribe((newsletter) => {
|
|
4694
4698
|
this.isLoaded = true;
|
|
4695
|
-
this.userSubscription = newsletter;
|
|
4696
|
-
this.subscriptions =
|
|
4699
|
+
this.userSubscription = newsletter.result;
|
|
4700
|
+
this.subscriptions = result;
|
|
4697
4701
|
if (this.userSubscription.length > 0 && this.subscriptions.length > 0) this.subscriptions.forEach((element) => {
|
|
4698
4702
|
const item = this.userSubscription?.find((x) => x.newsletter_id === element.id);
|
|
4699
4703
|
element.enabled = item ? item.send_newsletters : false;
|
|
@@ -4852,8 +4856,8 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
|
|
|
4852
4856
|
});
|
|
4853
4857
|
}
|
|
4854
4858
|
getGlobalSubscriptionConfig() {
|
|
4855
|
-
this.commonService.getAllGlobalSubscriptionConfigs().subscribe((
|
|
4856
|
-
this.subscriptionConfigs =
|
|
4859
|
+
this.commonService.getAllGlobalSubscriptionConfigs().subscribe(({ result }) => {
|
|
4860
|
+
this.subscriptionConfigs = result;
|
|
4857
4861
|
this.globalConfigs.forEach((globalConfig) => {
|
|
4858
4862
|
const config = this.subscriptionConfigs?.find((subscriptionConfig) => subscriptionConfig.global_config_id === globalConfig?.id);
|
|
4859
4863
|
globalConfig.value = config?.value;
|
|
@@ -4866,8 +4870,8 @@ var OthersTabComponent = class OthersTabComponent extends AppBaseComponent {
|
|
|
4866
4870
|
});
|
|
4867
4871
|
}
|
|
4868
4872
|
getGlobalConfigs() {
|
|
4869
|
-
this.commonService.getAllGlobalConfigs().subscribe((
|
|
4870
|
-
this.globalConfigs =
|
|
4873
|
+
this.commonService.getAllGlobalConfigs().subscribe(({ result }) => {
|
|
4874
|
+
this.globalConfigs = result;
|
|
4871
4875
|
this.getGlobalSubscriptionConfig();
|
|
4872
4876
|
this.cdr.markForCheck();
|
|
4873
4877
|
});
|
|
@@ -5018,7 +5022,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
5018
5022
|
const password = this.passwordRef.nativeElement.value;
|
|
5019
5023
|
if (password) this.userService.checkPassword({ password }).subscribe({
|
|
5020
5024
|
next: (data) => {
|
|
5021
|
-
if (data?.status === StatusCodes.OK) {
|
|
5025
|
+
if (data?.result?.status === StatusCodes.OK) {
|
|
5022
5026
|
if (this.user?.enable_two_factor_authenticator === false) {
|
|
5023
5027
|
this.passwordVerified = true;
|
|
5024
5028
|
this.create2FA();
|
|
@@ -5040,8 +5044,8 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
5040
5044
|
else this.isCurrentPasswordValid = true;
|
|
5041
5045
|
}
|
|
5042
5046
|
create2FA() {
|
|
5043
|
-
this.userService.createTwoFactorAuthenticator().subscribe((
|
|
5044
|
-
this.created2faDetails =
|
|
5047
|
+
this.userService.createTwoFactorAuthenticator().subscribe(({ result }) => {
|
|
5048
|
+
this.created2faDetails = result;
|
|
5045
5049
|
this.cdr.markForCheck();
|
|
5046
5050
|
});
|
|
5047
5051
|
}
|
|
@@ -5078,7 +5082,7 @@ var SecurityTabComponent = class SecurityTabComponent extends AppBaseComponent {
|
|
|
5078
5082
|
const password = this.ssoPasswordRef.nativeElement.value;
|
|
5079
5083
|
if (password) this.userService.checkPassword({ password }).subscribe({
|
|
5080
5084
|
next: (data) => {
|
|
5081
|
-
if (data?.status === StatusCodes.OK) this.ssoPasswordVerified = true;
|
|
5085
|
+
if (data?.result?.status === StatusCodes.OK) this.ssoPasswordVerified = true;
|
|
5082
5086
|
this.cdr.markForCheck();
|
|
5083
5087
|
},
|
|
5084
5088
|
error: (err) => {
|
|
@@ -5335,8 +5339,8 @@ var SupportComponent = class SupportComponent extends AppBaseComponent {
|
|
|
5335
5339
|
}
|
|
5336
5340
|
getAllSupport() {
|
|
5337
5341
|
this.isLoading = true;
|
|
5338
|
-
this.commonService.getAllCustomerSupport(this.subscriptionId).subscribe((
|
|
5339
|
-
this.supports =
|
|
5342
|
+
this.commonService.getAllCustomerSupport(this.subscriptionId).subscribe(({ result }) => {
|
|
5343
|
+
this.supports = result;
|
|
5340
5344
|
this.cdr.markForCheck();
|
|
5341
5345
|
}).add(() => {
|
|
5342
5346
|
this.isLoading = false;
|
|
@@ -5822,8 +5826,8 @@ var EditPortfoliosComponent = class EditPortfoliosComponent {
|
|
|
5822
5826
|
this.filesUploaded = true;
|
|
5823
5827
|
}
|
|
5824
5828
|
getProjectPictures() {
|
|
5825
|
-
this.profileService.getProjectPictures(this.slug).subscribe((
|
|
5826
|
-
if (
|
|
5829
|
+
this.profileService.getProjectPictures(this.slug).subscribe(({ result }) => {
|
|
5830
|
+
if (result.length > 0) this.projectPictures = result.flatMap((x) => x.project_pictures);
|
|
5827
5831
|
this.cdr.markForCheck();
|
|
5828
5832
|
});
|
|
5829
5833
|
}
|
|
@@ -6477,7 +6481,7 @@ var EditQualificationsModalComponent = class EditQualificationsModalComponent ex
|
|
|
6477
6481
|
usesInheritance: true,
|
|
6478
6482
|
ngImport: i0,
|
|
6479
6483
|
template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ titleKey | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-school\"\n [label]=\"'User.Profile.Qualifications.Field.School' | transloco\"\n name=\"school\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <input type=\"text\"\n id=\"edit-qualifications-school\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.School' | transloco\"\n formControlName=\"school\"\n [attr.aria-label]=\"'User.Profile.Qualifications.Field.School' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-started_on\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.Qualifications.Field.DatesAttended' | transloco\"\n name=\"started_on\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-started_on\" formControlName=\"started_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-started_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n yearRange=\"1950:2020\"\n (onSelect)=\"onDateChange()\"\n [showIcon]=\"true\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n dateFormat=\"yy-mm-dd\">\n </p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-ended_on\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.Qualifications.Field.DatesCompleted' | transloco\"\n name=\"ended_on\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-ended_on\" formControlName=\"ended_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-ended_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n [showIcon]=\"true\"\n (onSelect)=\"onDateChange()\"\n [minDate]=\"minToDate\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n dateFormat=\"yy-mm-dd\"\n yearRange=\"1950:2025\"></p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-points\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.About.Degree' | transloco\"\n name=\"points\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <p-select inputId=\"edit-qualifications-points\"\n [options]=\"qualifications\"\n [attr.aria-labelledby]=\"'edit-qualifications-points-label'\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Degree' | transloco\"\n formControlName=\"points\"></p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-course\"\n [label]=\"'User.Profile.About.Course' | transloco\"\n name=\"course\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <input type=\"text\"\n id=\"edit-qualifications-course\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Course' | transloco\"\n formControlName=\"course\"\n [attr.aria-label]=\"'User.Profile.About.Course' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-description\"\n [label]=\"'User.Profile.Fields.Description' | transloco\"\n name=\"description\">\n <textarea type=\"text\"\n id=\"edit-qualifications-description\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n [attr.aria-label]=\"'User.Profile.Fields.Description' | transloco\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">{{ 'Button.Save' | transloco }}</button>\n </div>\n</ng-template>\n\n<i\n class=\"fa fa-lg pi pi-plus-circle float-end mt-2 pt-1 pt-md-0 profile-icons\"\n data-cy=\"add-qualification\"\n (keydown.enter)=\"onOpen()\"\n [attr.aria-label]=\"'User.Profile.Qualifications.Add' | transloco\"\n (click)=\"onOpen()\"\n aria-hidden=\"true\"\n></i>\n",
|
|
6480
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
6484
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.btn-add{cursor:pointer;font-size:24px}.profile-icons{color:var(--first)}\n"],
|
|
6481
6485
|
dependencies: [
|
|
6482
6486
|
{
|
|
6483
6487
|
kind: "ngmodule",
|
|
@@ -6739,7 +6743,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6739
6743
|
TranslocoPipe
|
|
6740
6744
|
],
|
|
6741
6745
|
template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ titleKey | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\">\n <div class=\"row p-2\">\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-school\"\n [label]=\"'User.Profile.Qualifications.Field.School' | transloco\"\n name=\"school\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <input type=\"text\"\n id=\"edit-qualifications-school\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.School' | transloco\"\n formControlName=\"school\"\n [attr.aria-label]=\"'User.Profile.Qualifications.Field.School' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-started_on\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.Qualifications.Field.DatesAttended' | transloco\"\n name=\"started_on\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-started_on\" formControlName=\"started_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-started_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n yearRange=\"1950:2020\"\n (onSelect)=\"onDateChange()\"\n [showIcon]=\"true\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n dateFormat=\"yy-mm-dd\">\n </p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-ended_on\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.Qualifications.Field.DatesCompleted' | transloco\"\n name=\"ended_on\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <div class=\"ui-fluid\">\n <p-datepicker inputId=\"edit-qualifications-ended_on\" formControlName=\"ended_on\"\n [attr.aria-labelledby]=\"'edit-qualifications-ended_on-label'\"\n [monthNavigator]=\"true\"\n [yearNavigator]=\"true\"\n [showIcon]=\"true\"\n (onSelect)=\"onDateChange()\"\n [minDate]=\"minToDate\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n dateFormat=\"yy-mm-dd\"\n yearRange=\"1950:2025\"></p-datepicker>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-points\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.About.Degree' | transloco\"\n name=\"points\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <p-select inputId=\"edit-qualifications-points\"\n [options]=\"qualifications\"\n [attr.aria-labelledby]=\"'edit-qualifications-points-label'\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Degree' | transloco\"\n formControlName=\"points\"></p-select>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-qualifications-course\"\n [label]=\"'User.Profile.About.Course' | transloco\"\n name=\"course\"\n errorMsg=\"User.Profile.Fields.Validation.Required\">\n <input type=\"text\"\n id=\"edit-qualifications-course\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Course' | transloco\"\n formControlName=\"course\"\n [attr.aria-label]=\"'User.Profile.About.Course' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-qualifications-description\"\n [label]=\"'User.Profile.Fields.Description' | transloco\"\n name=\"description\">\n <textarea type=\"text\"\n id=\"edit-qualifications-description\"\n class=\"form-control\"\n [placeholder]=\"'User.Profile.Qualifications.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n [attr.aria-label]=\"'User.Profile.Fields.Description' | transloco\"></textarea>\n </pw-input-container>\n </div>\n </form>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\"\n class=\"btn btn-outline-default\"\n (click)=\"modal.close()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n (click)=\"onSaveDetail()\">{{ 'Button.Save' | transloco }}</button>\n </div>\n</ng-template>\n\n<i\n class=\"fa fa-lg pi pi-plus-circle float-end mt-2 pt-1 pt-md-0 profile-icons\"\n data-cy=\"add-qualification\"\n (keydown.enter)=\"onOpen()\"\n [attr.aria-label]=\"'User.Profile.Qualifications.Add' | transloco\"\n (click)=\"onOpen()\"\n aria-hidden=\"true\"\n></i>\n",
|
|
6742
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
6746
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.btn-add{cursor:pointer;font-size:24px}.profile-icons{color:var(--first)}\n"]
|
|
6743
6747
|
}]
|
|
6744
6748
|
}],
|
|
6745
6749
|
ctorParameters: () => [],
|
|
@@ -6990,8 +6994,8 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
|
|
|
6990
6994
|
appendQueryParam(this.router, this.route, { modal: "editskills" });
|
|
6991
6995
|
}
|
|
6992
6996
|
getSkills() {
|
|
6993
|
-
this.tagService.getTagsByType("skills", {}).subscribe((
|
|
6994
|
-
this.allSkills =
|
|
6997
|
+
this.tagService.getTagsByType("skills", {}).subscribe(({ result }) => {
|
|
6998
|
+
this.allSkills = result;
|
|
6995
6999
|
this.getEntitySkills();
|
|
6996
7000
|
this.cdr.markForCheck();
|
|
6997
7001
|
});
|
|
@@ -7009,9 +7013,9 @@ var EditSkillsModalComponent = class EditSkillsModalComponent extends AppBaseCom
|
|
|
7009
7013
|
this.selectedSkills = [];
|
|
7010
7014
|
}
|
|
7011
7015
|
getEntitySkills() {
|
|
7012
|
-
this.tagService.getTagsByEntity(this.slug, this.entityEntity, this.entityType).subscribe((
|
|
7016
|
+
this.tagService.getTagsByEntity(this.slug, this.entityEntity, this.entityType).subscribe(({ result }) => {
|
|
7013
7017
|
this.selectedSkills = this.allSkills.filter((item) => {
|
|
7014
|
-
return
|
|
7018
|
+
return result.find((x) => x.id === item.id);
|
|
7015
7019
|
});
|
|
7016
7020
|
this.cdr.markForCheck();
|
|
7017
7021
|
});
|
|
@@ -7549,11 +7553,11 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
|
|
|
7549
7553
|
this.buttonBusy = true;
|
|
7550
7554
|
const data = { ...this.form.value };
|
|
7551
7555
|
data.dob = HelperService.dateFormat(this.form.get("dob").value);
|
|
7552
|
-
this.profileService.updateUserProfile(data).subscribe((
|
|
7553
|
-
if (
|
|
7556
|
+
this.profileService.updateUserProfile(data).subscribe(({ result }) => {
|
|
7557
|
+
if (result?.id) {
|
|
7554
7558
|
this.toast.success(this.translation.translate("User.Profile.ProfileUpdated"));
|
|
7555
7559
|
this.modalService.dismissAll();
|
|
7556
|
-
this.saveEvent.emit(
|
|
7560
|
+
this.saveEvent.emit(result);
|
|
7557
7561
|
}
|
|
7558
7562
|
this.cdr.markForCheck();
|
|
7559
7563
|
}).add(() => {
|
|
@@ -7598,7 +7602,7 @@ var EditUserProfileModalComponent = class EditUserProfileModalComponent extends
|
|
|
7598
7602
|
usesInheritance: true,
|
|
7599
7603
|
ngImport: i0,
|
|
7600
7604
|
template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ 'User.Profile.Intro.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetail()\">\n <div class=\"row\">\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-first-name\"\n [label]=\"'Label.FirstName' | transloco\"\n name=\"first_name\"\n errorMsg=\"User.Account.Details.Validation.FirstName\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n id=\"edit-intro-first-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.FirstName' | transloco\"\n autocomplete=\"given-name\" name=\"input_first_name_1\"\n [attr.aria-label]=\"'Label.FirstName' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-last-name\"\n [label]=\"'Label.LastName' | transloco\"\n name=\"last_name\"\n errorMsg=\"User.Account.Details.Validation.LastName\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n id=\"edit-intro-last-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.LastName' | transloco\"\n autocomplete=\"family-name\" name=\"input_last_name_2\"\n [attr.aria-label]=\"'Label.LastName' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-headline\"\n [label]=\"'User.Profile.Fields.Headline' | transloco\"\n name=\"headline\"\n errorMsg=\"User.Profile.Fields.Validation.Headline\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"headline\"\n id=\"edit-intro-headline\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Headline' | transloco\" name=\"input_headline_3\"\n [attr.aria-label]=\"'User.Profile.Fields.Headline' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-description\"\n [label]=\"'User.Profile.About.AboutMe' | transloco\"\n name=\"description\"\n errorMsg=\"User.Profile.Fields.Validation.Description\">\n <textarea class=\"form-control\"\n id=\"edit-intro-description\"\n name=\"description\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n [attr.aria-label]=\"'User.Profile.About.AboutMe' | transloco\"></textarea>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-gender\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.About.Gender' | transloco\"\n name=\"gender\"\n errorMsg=\"User.Profile.Fields.Validation.Gender\">\n <p-select-button [options]=\"[\n { label: 'Male', value: 'M' },\n { label: 'Female', value: 'F' }\n ]\"\n [attr.aria-labelledby]=\"'edit-intro-gender-label'\"\n formControlName=\"gender\"></p-select-button>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-dob\"\n [label]=\"'User.Account.Details.DateOfBirth' | transloco\"\n name=\"dob\"\n errorMsg=\"User.Account.Details.Validation.DateOfBirth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"edit-intro-dob\"\n name=\"dob\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ year: 1950, month: 1, day: 1 }\"\n [maxDate]=\"{ year: 2018, month: 12, day: 31 }\"\n autocomplete=\"off\"\n [attr.aria-label]=\"'User.Account.Details.DateOfBirth' | transloco\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n [attr.aria-label]=\"'User.Profile.Fields.OpenDatePicker' | transloco\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-phone\"\n [label]=\"'User.Profile.Fields.Phone' | transloco\"\n name=\"phone_number\"\n errorMsg=\"User.Profile.Fields.Validation.Phone\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n id=\"edit-intro-phone\"\n name=\"phone_number\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Phone' | transloco\"\n autocomplete=\"tel\"\n [attr.aria-label]=\"'User.Profile.Fields.Phone' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-postcode\"\n [label]=\"'User.Profile.Fields.Postcode' | transloco\"\n name=\"postcode\"\n errorMsg=\"User.Profile.Fields.Validation.Postcode\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"postcode\"\n id=\"edit-intro-postcode\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Postcode' | transloco\"\n autocomplete=\"postal-code\" name=\"input_postcode_6\"\n [attr.aria-label]=\"'User.Profile.Fields.Postcode' | transloco\"/>\n </pw-input-container>\n\n @if (countries$ | async; as countries) {\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-country\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Subscriptions.Details.Country' | transloco\"\n name=\"country\"\n errorMsg=\"User.Subscriptions.Details.Validation.Country\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n [placeholder]=\"'User.Profile.SelectCountry' | transloco\">\n </p-select>\n </pw-input-container>\n }\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-state\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Account.Details.State' | transloco\"\n name=\"state\"\n errorMsg=\"User.Account.Details.Validation.State\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-state-label'\"\n [options]=\"states\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n\n <!-- Location -->\n <pw-input-container [label]=\"'User.Account.Details.Location' | transloco\"\n class=\"col-12 col-md-6\"\n controlId=\"edit-intro-location\"\n [useAriaLabelledbyOnly]=\"true\"\n name=\"location\">\n <input ngx-gp-autocomplete\n id=\"edit-intro-location\"\n name=\"location\"\n class=\"form-control\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Location' | transloco\"\n [attr.aria-labelledby]=\"'edit-intro-location-label'\"\n (onAddressChange)=\"handleAddressChange($event)\"\n [attr.aria-label]=\"'User.Account.Details.Location' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-website\"\n [label]=\"'User.Profile.About.Website' | transloco\"\n name=\"website_url\"\n errorMsg=\"User.Account.Details.Validation.Website\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"website_url\"\n id=\"edit-intro-website\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Website' | transloco\"\n autocomplete=\"url\" name=\"input_website_url_8\"\n [attr.aria-label]=\"'User.Profile.About.Website' | transloco\"/>\n </pw-input-container>\n </div>\n <div class=\"modal-footer\">\n <input type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"modal.close()\"\n [value]=\"'Button.Cancel' | transloco\" id=\"input_field_9\" name=\"input_field_9\"\n [attr.aria-label]=\"'Button.Cancel' | transloco\"/>\n <input type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n [value]=\"'User.Profile.Fields.SaveChanges' | transloco\" id=\"input_field_10\" name=\"input_field_10\"\n [attr.aria-label]=\"'User.Profile.Fields.SaveChanges' | transloco\"/>\n </div>\n </form>\n </div>\n</ng-template>\n",
|
|
7601
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
7605
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}::ng-deep .p-selectbutton .p-button{margin-right:1rem}::ng-deep body .p-selectbutton .p-button.p-highlight{background-color:var(--first)!important}\n"],
|
|
7602
7606
|
dependencies: [
|
|
7603
7607
|
{
|
|
7604
7608
|
kind: "ngmodule",
|
|
@@ -7859,7 +7863,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7859
7863
|
TranslocoPipe
|
|
7860
7864
|
],
|
|
7861
7865
|
template: "<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\"\n id=\"modal-basic-title\">{{ 'User.Profile.Intro.Title' | transloco }}</h4>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSaveDetail()\">\n <div class=\"row\">\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-first-name\"\n [label]=\"'Label.FirstName' | transloco\"\n name=\"first_name\"\n errorMsg=\"User.Account.Details.Validation.FirstName\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"first_name\"\n id=\"edit-intro-first-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.FirstName' | transloco\"\n autocomplete=\"given-name\" name=\"input_first_name_1\"\n [attr.aria-label]=\"'Label.FirstName' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-last-name\"\n [label]=\"'Label.LastName' | transloco\"\n name=\"last_name\"\n errorMsg=\"User.Account.Details.Validation.LastName\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"last_name\"\n id=\"edit-intro-last-name\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.LastName' | transloco\"\n autocomplete=\"family-name\" name=\"input_last_name_2\"\n [attr.aria-label]=\"'Label.LastName' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-headline\"\n [label]=\"'User.Profile.Fields.Headline' | transloco\"\n name=\"headline\"\n errorMsg=\"User.Profile.Fields.Validation.Headline\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"headline\"\n id=\"edit-intro-headline\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Headline' | transloco\" name=\"input_headline_3\"\n [attr.aria-label]=\"'User.Profile.Fields.Headline' | transloco\"/>\n </pw-input-container>\n\n <pw-input-container class=\"col-12\"\n controlId=\"edit-intro-description\"\n [label]=\"'User.Profile.About.AboutMe' | transloco\"\n name=\"description\"\n errorMsg=\"User.Profile.Fields.Validation.Description\">\n <textarea class=\"form-control\"\n id=\"edit-intro-description\"\n name=\"description\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Description' | transloco\"\n formControlName=\"description\"\n [attr.aria-label]=\"'User.Profile.About.AboutMe' | transloco\"></textarea>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-gender\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Profile.About.Gender' | transloco\"\n name=\"gender\"\n errorMsg=\"User.Profile.Fields.Validation.Gender\">\n <p-select-button [options]=\"[\n { label: 'Male', value: 'M' },\n { label: 'Female', value: 'F' }\n ]\"\n [attr.aria-labelledby]=\"'edit-intro-gender-label'\"\n formControlName=\"gender\"></p-select-button>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-dob\"\n [label]=\"'User.Account.Details.DateOfBirth' | transloco\"\n name=\"dob\"\n errorMsg=\"User.Account.Details.Validation.DateOfBirth\">\n <div class=\"input-group\">\n <input class=\"form-control\"\n id=\"edit-intro-dob\"\n name=\"dob\"\n [placeholder]=\"'User.Profile.Fields.DatePlaceholder' | transloco\"\n formControlName=\"dob\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n [minDate]=\"{ year: 1950, month: 1, day: 1 }\"\n [maxDate]=\"{ year: 2018, month: 12, day: 31 }\"\n autocomplete=\"off\"\n [attr.aria-label]=\"'User.Account.Details.DateOfBirth' | transloco\" />\n <button class=\"btn btn-primary\"\n type=\"button\"\n [attr.aria-label]=\"'User.Profile.Fields.OpenDatePicker' | transloco\"\n (click)=\"d.toggle()\">\n <i class=\"fa fa-calendar\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-phone\"\n [label]=\"'User.Profile.Fields.Phone' | transloco\"\n name=\"phone_number\"\n errorMsg=\"User.Profile.Fields.Validation.Phone\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"phone_number\"\n id=\"edit-intro-phone\"\n name=\"phone_number\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Phone' | transloco\"\n autocomplete=\"tel\"\n [attr.aria-label]=\"'User.Profile.Fields.Phone' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-postcode\"\n [label]=\"'User.Profile.Fields.Postcode' | transloco\"\n name=\"postcode\"\n errorMsg=\"User.Profile.Fields.Validation.Postcode\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"postcode\"\n id=\"edit-intro-postcode\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Postcode' | transloco\"\n autocomplete=\"postal-code\" name=\"input_postcode_6\"\n [attr.aria-label]=\"'User.Profile.Fields.Postcode' | transloco\"/>\n </pw-input-container>\n\n @if (countries$ | async; as countries) {\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-country\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Subscriptions.Details.Country' | transloco\"\n name=\"country\"\n errorMsg=\"User.Subscriptions.Details.Validation.Country\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-country-label'\"\n [options]=\"countries\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"country\"\n (onChange)=\"getRegion($event.value)\"\n [placeholder]=\"'User.Profile.SelectCountry' | transloco\">\n </p-select>\n </pw-input-container>\n }\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-state\"\n [useAriaLabelledbyOnly]=\"true\"\n [label]=\"'User.Account.Details.State' | transloco\"\n name=\"state\"\n errorMsg=\"User.Account.Details.Validation.State\">\n <p-select\n [attr.aria-labelledby]=\"'edit-intro-state-label'\"\n [options]=\"states\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"state\"\n [placeholder]=\"'User.Profile.SelectState' | transloco\">\n </p-select>\n </pw-input-container>\n\n <!-- Location -->\n <pw-input-container [label]=\"'User.Account.Details.Location' | transloco\"\n class=\"col-12 col-md-6\"\n controlId=\"edit-intro-location\"\n [useAriaLabelledbyOnly]=\"true\"\n name=\"location\">\n <input ngx-gp-autocomplete\n id=\"edit-intro-location\"\n name=\"location\"\n class=\"form-control\"\n #places=\"ngx-places\"\n formControlName=\"location\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Location' | transloco\"\n [attr.aria-labelledby]=\"'edit-intro-location-label'\"\n (onAddressChange)=\"handleAddressChange($event)\"\n [attr.aria-label]=\"'User.Account.Details.Location' | transloco\" />\n </pw-input-container>\n\n <pw-input-container class=\"col-12 col-md-6\"\n controlId=\"edit-intro-website\"\n [label]=\"'User.Profile.About.Website' | transloco\"\n name=\"website_url\"\n errorMsg=\"User.Account.Details.Validation.Website\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"website_url\"\n id=\"edit-intro-website\"\n [placeholder]=\"'User.Profile.Intro.Placeholder.Website' | transloco\"\n autocomplete=\"url\" name=\"input_website_url_8\"\n [attr.aria-label]=\"'User.Profile.About.Website' | transloco\"/>\n </pw-input-container>\n </div>\n <div class=\"modal-footer\">\n <input type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"modal.close()\"\n [value]=\"'Button.Cancel' | transloco\" id=\"input_field_9\" name=\"input_field_9\"\n [attr.aria-label]=\"'Button.Cancel' | transloco\"/>\n <input type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\"\n [value]=\"'User.Profile.Fields.SaveChanges' | transloco\" id=\"input_field_10\" name=\"input_field_10\"\n [attr.aria-label]=\"'User.Profile.Fields.SaveChanges' | transloco\"/>\n </div>\n </form>\n </div>\n</ng-template>\n",
|
|
7862
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
7866
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}::ng-deep .p-selectbutton .p-button{margin-right:1rem}::ng-deep body .p-selectbutton .p-button.p-highlight{background-color:var(--first)!important}\n"]
|
|
7863
7867
|
}]
|
|
7864
7868
|
}],
|
|
7865
7869
|
ctorParameters: () => [],
|
|
@@ -7908,12 +7912,12 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
7908
7912
|
user_skills: this.tagService.getGroupedSkills(this.user.slug, TAG_ENTITY.USER, TAG_TYPE.SKILLS)
|
|
7909
7913
|
}).subscribe({
|
|
7910
7914
|
next: (response) => {
|
|
7911
|
-
this.user_profile = response.user_profile;
|
|
7912
|
-
this.user["profile"] =
|
|
7913
|
-
this.qualifications = response.qualifications;
|
|
7914
|
-
this.userLinks = response.user_links || [];
|
|
7915
|
+
this.user_profile = response.user_profile.result;
|
|
7916
|
+
this.user["profile"] = this.user_profile;
|
|
7917
|
+
this.qualifications = response.qualifications.result;
|
|
7918
|
+
this.userLinks = response.user_links.result || [];
|
|
7915
7919
|
this.noUserLinks = Object.values(this.userLinks).some((x) => !!x);
|
|
7916
|
-
this.selectedSkills = response.user_skills;
|
|
7920
|
+
this.selectedSkills = response.user_skills.result;
|
|
7917
7921
|
this.loading = false;
|
|
7918
7922
|
this.cdr.markForCheck();
|
|
7919
7923
|
},
|
|
@@ -7929,8 +7933,8 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
7929
7933
|
});
|
|
7930
7934
|
}
|
|
7931
7935
|
getSkills() {
|
|
7932
|
-
this.tagService.getTagsByType("skills", {}).subscribe((
|
|
7933
|
-
this.allSkills =
|
|
7936
|
+
this.tagService.getTagsByType("skills", {}).subscribe(({ result }) => {
|
|
7937
|
+
this.allSkills = result;
|
|
7934
7938
|
this.cdr.markForCheck();
|
|
7935
7939
|
});
|
|
7936
7940
|
}
|
|
@@ -8024,7 +8028,7 @@ var UserAboutComponent = class UserAboutComponent extends AppBaseComponent {
|
|
|
8024
8028
|
usesInheritance: true,
|
|
8025
8029
|
ngImport: i0,
|
|
8026
8030
|
template: "<div class=\"about\">\n <!-- Personal Information -->\n <section class=\"about-section\" data-cy=\"personal-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.PersonalInfo' | transloco }}</h2>\n @if (user && isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onProfileOpen()\" [attr.aria-label]=\"'User.Profile.About.EditPersonalInfo' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n <div class=\"about-bio\">\n <span class=\"about-field__label\">{{ 'User.Profile.About.AboutMe' | transloco }}</span>\n <p class=\"about-bio__text\" [class.is-empty]=\"!user_profile?.description\">\n {{ user_profile?.description || ('User.Profile.About.NoDescription' | transloco) }}\n </p>\n </div>\n <dl class=\"about-grid\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Birthday' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.dob\">{{ (user_profile?.dob | dateFormat) || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.LivesIn' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.country\">{{ user_profile?.country || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Gender' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.gender\">\n {{\n user_profile?.gender === 'M'\n ? ('User.Profile.About.Male' | transloco)\n : user_profile?.gender === 'F'\n ? ('User.Profile.About.Female' | transloco)\n : '—'\n }}\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Email' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.email\">\n @if (user?.email) {\n <a class=\"about-field__link\" [href]=\"'mailto:' + user.email\">{{ user.email }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.PhoneNumber' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.phone_number\">{{ user_profile?.phone_number || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Website' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.website_url\">\n @if (user_profile?.website_url) {\n <a class=\"about-field__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"user_profile.website_url\">{{ user_profile.website_url }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Joined' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.joined_at\">{{ (user?.joined_at | dateFormat) || '—' }}</dd>\n </div>\n </dl>\n @if (user && isEdit) {\n <pw-edit-user-profile-modal [user]=\"user\" (saveEvent)=\"onProfileSaved($event)\" [slug]=\"user?.slug\"></pw-edit-user-profile-modal>\n }\n </section>\n\n <!-- Skills -->\n <section class=\"about-section\" data-cy=\"skills-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-bolt\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Skills' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"openSkills()\" [attr.aria-label]=\"'User.Profile.About.EditSkills' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (selectedSkills?.length) {\n <div class=\"about-skills\">\n @for (skill of selectedSkills; track skill) {\n <div class=\"about-skills__group\">\n <span class=\"about-skills__category\">{{ skill.category_name }}</span>\n <div class=\"about-tags\">\n @for (item of skill.tags; track item) {\n <span class=\"about-tag\">{{ item.name }}</span>\n }\n </div>\n </div>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ (isEdit ? 'User.Profile.About.NoSkillsEdit' : 'User.Profile.About.NoSkills') | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-skills-modal [userId]=\"user?.id\" [slug]=\"user?.slug\" (saveEvent)=\"getUserDetails()\"></pw-edit-skills-modal>\n }\n </section>\n\n <!-- Educational Information -->\n <section class=\"about-section\" data-cy=\"educational-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-graduation-cap\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Education' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"qualificationModal.onOpen()\" [attr.aria-label]=\"'User.Profile.About.AddEducation' | transloco\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (qualifications?.length) {\n <div class=\"about-edu\">\n @for (item of qualifications; track trackByQualification($index, item)) {\n <article class=\"about-edu__item\">\n <div class=\"about-edu__main\">\n <h4 class=\"about-edu__school\">{{ item?.school }}</h4>\n <dl class=\"about-grid about-grid--compact\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Period' | transloco }}</dt>\n <dd class=\"about-field__value\">{{ item?.started_on }} – {{ item?.ended_on }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Degree' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.degree\">{{ item?.degree || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Course' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.course\">{{ item?.course || '—' }}</dd>\n </div>\n </dl>\n </div>\n @if (isEdit) {\n <div class=\"about-edu__actions\">\n <button type=\"button\" class=\"about-icon-btn\" [attr.aria-label]=\"'User.Profile.About.EditEducation' | transloco\" (click)=\"editQualification(item)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"about-icon-btn about-icon-btn--danger\" data-cy=\"delete-qualification\" [attr.aria-label]=\"'User.Profile.About.DeleteEducation' | transloco\" (click)=\"deleteQualification(item)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n </article>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoEducation' | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-qualifications-modal (saveEvent)=\"getUserDetails()\"></pw-edit-qualifications-modal>\n }\n </section>\n\n <!-- External Portfolio -->\n <section class=\"about-section\" data-cy=\"portfolio-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-link\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Portfolio' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onOpenSocial()\" [attr.aria-label]=\"'User.Profile.About.EditPortfolio' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (noUserLinks) {\n <div class=\"about-social\">\n @for (link of objectKeys(userLinks); track link) {\n @if (userLinks[link]) {\n <a class=\"about-social__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"userLinks[link]\" [attr.aria-label]=\"link\">\n <img src=\"assets/img/icons/social/{{ link }}.svg\" width=\"32\" height=\"32\" [alt]=\"link\" />\n </a>\n }\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoPortfolio' | transloco }}</p>\n }\n @if (user && isEdit) {\n <pw-edit-social-links [userId]=\"user.id\" [links]=\"userLinks\" (saveEvent)=\"onSaveUserLinks()\"></pw-edit-social-links>\n }\n </section>\n\n @if (loading) {\n <div class=\"w-100 text-center p-3\"><p-progress-spinner strokeWidth=\"2\"></p-progress-spinner></div>\n }\n</div>\n",
|
|
8027
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8031
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.about{display:flex;flex-direction:column;gap:16px}.about-section{background:#fff;border:1px solid #e2e5ea;border-radius:8px;padding:20px 24px;float:none}.about-section ::ng-deep .pi-plus-circle{display:none}.about-section__head{display:flex;align-items:center;margin-bottom:18px;float:none}.about-section__icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin-right:12px;border-radius:8px;background:#f7f8fa;color:#5a6473;font-size:.95rem;flex-shrink:0}.about-section__title{margin:0!important;padding:0!important}.about-section__edit{margin-left:auto}.about-field__label,.about-skills__category{margin:0;font-size:1rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:#7c8696}.about-section__edit,.about-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid #e2e5ea;border-radius:7px;background:#fff;color:#5a6473;font-size:.9rem;cursor:pointer;transition:all .12s ease-out}.about-section__edit:hover,.about-icon-btn:hover{background:#f7f8fa;color:#1a1d21;border-color:#cfd4dc}.about-empty{margin:0;color:#7c8696;font-size:1.2rem}.about-bio{margin-bottom:22px}.about-bio__text{margin:6px 0 0;color:#1a1d21;font-size:1.25rem;line-height:1.55}.about-bio__text.is-empty{color:#7c8696;font-size:1.2rem}.about-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px 28px;margin:0}.about-grid--compact{gap:14px 24px}.about-field{display:flex;flex-direction:column;gap:5px;min-width:0}.about-field__value{margin:0;font-size:1.15rem;color:#1a1d21;overflow-wrap:break-word}.about-field__value.is-empty{color:#cfd4dc}.about-field__link{color:var(--first);text-decoration:none}.about-field__link:hover{text-decoration:underline}.about-skills{display:flex;flex-direction:column;gap:16px}.about-skills__group{display:flex;flex-direction:column;gap:8px}.about-tags{display:flex;flex-wrap:wrap;gap:8px}.about-tag{display:inline-flex;align-items:center;padding:5px 13px;border:1px solid #e2e5ea;border-radius:9999px;background:#eef0f3;color:#3d4654;font-size:1.05rem;font-weight:500;line-height:1.4}.about-edu{display:flex;flex-direction:column;gap:14px}.about-edu__item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px;border:1px solid #e2e5ea;border-radius:8px;background:#f7f8fa}.about-edu__main{min-width:0;flex:1}.about-edu__school{margin:0 0 12px}.about-edu__actions{display:flex;gap:6px;flex-shrink:0}.about-icon-btn--danger:hover{color:#c0392b;border-color:#c0392b}.about-social{display:flex;flex-wrap:wrap;gap:14px}.about-social__link{display:inline-flex}\n"],
|
|
8028
8032
|
dependencies: [
|
|
8029
8033
|
{
|
|
8030
8034
|
kind: "component",
|
|
@@ -8112,7 +8116,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8112
8116
|
DateFormatPipe
|
|
8113
8117
|
],
|
|
8114
8118
|
template: "<div class=\"about\">\n <!-- Personal Information -->\n <section class=\"about-section\" data-cy=\"personal-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-user\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.PersonalInfo' | transloco }}</h2>\n @if (user && isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onProfileOpen()\" [attr.aria-label]=\"'User.Profile.About.EditPersonalInfo' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n <div class=\"about-bio\">\n <span class=\"about-field__label\">{{ 'User.Profile.About.AboutMe' | transloco }}</span>\n <p class=\"about-bio__text\" [class.is-empty]=\"!user_profile?.description\">\n {{ user_profile?.description || ('User.Profile.About.NoDescription' | transloco) }}\n </p>\n </div>\n <dl class=\"about-grid\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Birthday' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.dob\">{{ (user_profile?.dob | dateFormat) || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.LivesIn' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.country\">{{ user_profile?.country || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Gender' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.gender\">\n {{\n user_profile?.gender === 'M'\n ? ('User.Profile.About.Male' | transloco)\n : user_profile?.gender === 'F'\n ? ('User.Profile.About.Female' | transloco)\n : '—'\n }}\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Email' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.email\">\n @if (user?.email) {\n <a class=\"about-field__link\" [href]=\"'mailto:' + user.email\">{{ user.email }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.PhoneNumber' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.phone_number\">{{ user_profile?.phone_number || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Website' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user_profile?.website_url\">\n @if (user_profile?.website_url) {\n <a class=\"about-field__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"user_profile.website_url\">{{ user_profile.website_url }}</a>\n } @else {\n —\n }\n </dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Joined' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!user?.joined_at\">{{ (user?.joined_at | dateFormat) || '—' }}</dd>\n </div>\n </dl>\n @if (user && isEdit) {\n <pw-edit-user-profile-modal [user]=\"user\" (saveEvent)=\"onProfileSaved($event)\" [slug]=\"user?.slug\"></pw-edit-user-profile-modal>\n }\n </section>\n\n <!-- Skills -->\n <section class=\"about-section\" data-cy=\"skills-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-bolt\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Skills' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"openSkills()\" [attr.aria-label]=\"'User.Profile.About.EditSkills' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (selectedSkills?.length) {\n <div class=\"about-skills\">\n @for (skill of selectedSkills; track skill) {\n <div class=\"about-skills__group\">\n <span class=\"about-skills__category\">{{ skill.category_name }}</span>\n <div class=\"about-tags\">\n @for (item of skill.tags; track item) {\n <span class=\"about-tag\">{{ item.name }}</span>\n }\n </div>\n </div>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ (isEdit ? 'User.Profile.About.NoSkillsEdit' : 'User.Profile.About.NoSkills') | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-skills-modal [userId]=\"user?.id\" [slug]=\"user?.slug\" (saveEvent)=\"getUserDetails()\"></pw-edit-skills-modal>\n }\n </section>\n\n <!-- Educational Information -->\n <section class=\"about-section\" data-cy=\"educational-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-graduation-cap\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Education' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"qualificationModal.onOpen()\" [attr.aria-label]=\"'User.Profile.About.AddEducation' | transloco\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (qualifications?.length) {\n <div class=\"about-edu\">\n @for (item of qualifications; track trackByQualification($index, item)) {\n <article class=\"about-edu__item\">\n <div class=\"about-edu__main\">\n <h4 class=\"about-edu__school\">{{ item?.school }}</h4>\n <dl class=\"about-grid about-grid--compact\">\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Period' | transloco }}</dt>\n <dd class=\"about-field__value\">{{ item?.started_on }} – {{ item?.ended_on }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Degree' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.degree\">{{ item?.degree || '—' }}</dd>\n </div>\n <div class=\"about-field\">\n <dt class=\"about-field__label\">{{ 'User.Profile.About.Course' | transloco }}</dt>\n <dd class=\"about-field__value\" [class.is-empty]=\"!item?.course\">{{ item?.course || '—' }}</dd>\n </div>\n </dl>\n </div>\n @if (isEdit) {\n <div class=\"about-edu__actions\">\n <button type=\"button\" class=\"about-icon-btn\" [attr.aria-label]=\"'User.Profile.About.EditEducation' | transloco\" (click)=\"editQualification(item)\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"about-icon-btn about-icon-btn--danger\" data-cy=\"delete-qualification\" [attr.aria-label]=\"'User.Profile.About.DeleteEducation' | transloco\" (click)=\"deleteQualification(item)\">\n <i class=\"fa fa-trash\" aria-hidden=\"true\"></i>\n </button>\n </div>\n }\n </article>\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoEducation' | transloco }}</p>\n }\n @if (isEdit) {\n <pw-edit-qualifications-modal (saveEvent)=\"getUserDetails()\"></pw-edit-qualifications-modal>\n }\n </section>\n\n <!-- External Portfolio -->\n <section class=\"about-section\" data-cy=\"portfolio-info\">\n <header class=\"about-section__head\">\n <span class=\"about-section__icon\"><i class=\"fa fa-link\" aria-hidden=\"true\"></i></span>\n <h2 class=\"about-section__title\">{{ 'User.Profile.About.Portfolio' | transloco }}</h2>\n @if (isEdit) {\n <button type=\"button\" class=\"about-section__edit\" (click)=\"onOpenSocial()\" [attr.aria-label]=\"'User.Profile.About.EditPortfolio' | transloco\">\n <i class=\"fa fa-pen\" aria-hidden=\"true\"></i>\n </button>\n }\n </header>\n @if (noUserLinks) {\n <div class=\"about-social\">\n @for (link of objectKeys(userLinks); track link) {\n @if (userLinks[link]) {\n <a class=\"about-social__link\" target=\"_blank\" rel=\"noopener noreferrer\" [href]=\"userLinks[link]\" [attr.aria-label]=\"link\">\n <img src=\"assets/img/icons/social/{{ link }}.svg\" width=\"32\" height=\"32\" [alt]=\"link\" />\n </a>\n }\n }\n </div>\n } @else {\n <p class=\"about-empty\">{{ 'User.Profile.About.NoPortfolio' | transloco }}</p>\n }\n @if (user && isEdit) {\n <pw-edit-social-links [userId]=\"user.id\" [links]=\"userLinks\" (saveEvent)=\"onSaveUserLinks()\"></pw-edit-social-links>\n }\n </section>\n\n @if (loading) {\n <div class=\"w-100 text-center p-3\"><p-progress-spinner strokeWidth=\"2\"></p-progress-spinner></div>\n }\n</div>\n",
|
|
8115
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8119
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.about{display:flex;flex-direction:column;gap:16px}.about-section{background:#fff;border:1px solid #e2e5ea;border-radius:8px;padding:20px 24px;float:none}.about-section ::ng-deep .pi-plus-circle{display:none}.about-section__head{display:flex;align-items:center;margin-bottom:18px;float:none}.about-section__icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;margin-right:12px;border-radius:8px;background:#f7f8fa;color:#5a6473;font-size:.95rem;flex-shrink:0}.about-section__title{margin:0!important;padding:0!important}.about-section__edit{margin-left:auto}.about-field__label,.about-skills__category{margin:0;font-size:1rem;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:#7c8696}.about-section__edit,.about-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid #e2e5ea;border-radius:7px;background:#fff;color:#5a6473;font-size:.9rem;cursor:pointer;transition:all .12s ease-out}.about-section__edit:hover,.about-icon-btn:hover{background:#f7f8fa;color:#1a1d21;border-color:#cfd4dc}.about-empty{margin:0;color:#7c8696;font-size:1.2rem}.about-bio{margin-bottom:22px}.about-bio__text{margin:6px 0 0;color:#1a1d21;font-size:1.25rem;line-height:1.55}.about-bio__text.is-empty{color:#7c8696;font-size:1.2rem}.about-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px 28px;margin:0}.about-grid--compact{gap:14px 24px}.about-field{display:flex;flex-direction:column;gap:5px;min-width:0}.about-field__value{margin:0;font-size:1.15rem;color:#1a1d21;overflow-wrap:break-word}.about-field__value.is-empty{color:#cfd4dc}.about-field__link{color:var(--first);text-decoration:none}.about-field__link:hover{text-decoration:underline}.about-skills{display:flex;flex-direction:column;gap:16px}.about-skills__group{display:flex;flex-direction:column;gap:8px}.about-tags{display:flex;flex-wrap:wrap;gap:8px}.about-tag{display:inline-flex;align-items:center;padding:5px 13px;border:1px solid #e2e5ea;border-radius:9999px;background:#eef0f3;color:#3d4654;font-size:1.05rem;font-weight:500;line-height:1.4}.about-edu{display:flex;flex-direction:column;gap:14px}.about-edu__item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px;border:1px solid #e2e5ea;border-radius:8px;background:#f7f8fa}.about-edu__main{min-width:0;flex:1}.about-edu__school{margin:0 0 12px}.about-edu__actions{display:flex;gap:6px;flex-shrink:0}.about-icon-btn--danger:hover{color:#c0392b;border-color:#c0392b}.about-social{display:flex;flex-wrap:wrap;gap:14px}.about-social__link{display:inline-flex}\n"]
|
|
8116
8120
|
}]
|
|
8117
8121
|
}],
|
|
8118
8122
|
propDecorators: {
|
|
@@ -8150,8 +8154,8 @@ var PortfoliosComponent = class PortfoliosComponent {
|
|
|
8150
8154
|
this.getProjectPictures();
|
|
8151
8155
|
}
|
|
8152
8156
|
getProjectPictures() {
|
|
8153
|
-
this.service.getProjectPictures(this.user.slug).subscribe((
|
|
8154
|
-
if (
|
|
8157
|
+
this.service.getProjectPictures(this.user.slug).subscribe(({ result }) => {
|
|
8158
|
+
if (result.length > 0) this.projectPictures = result.flatMap((x) => x.project_pictures);
|
|
8155
8159
|
this.isLoaded = true;
|
|
8156
8160
|
this.cdr.markForCheck();
|
|
8157
8161
|
});
|
|
@@ -8290,8 +8294,8 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
|
|
|
8290
8294
|
}
|
|
8291
8295
|
getProjects() {
|
|
8292
8296
|
const profileSlug = this.user?.slug || this.slug;
|
|
8293
|
-
this.service.getProjects(profileSlug).subscribe((
|
|
8294
|
-
this.projects =
|
|
8297
|
+
this.service.getProjects(profileSlug).subscribe(({ result }) => {
|
|
8298
|
+
this.projects = result.projects;
|
|
8295
8299
|
this.isLoaded = true;
|
|
8296
8300
|
this.cdr.markForCheck();
|
|
8297
8301
|
});
|
|
@@ -8381,7 +8385,7 @@ var UserProjectsComponent = class UserProjectsComponent extends AppBaseComponent
|
|
|
8381
8385
|
usesInheritance: true,
|
|
8382
8386
|
ngImport: i0,
|
|
8383
8387
|
template: "<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>{{ 'User.Profile.Projects.Title' | transloco }}</h2>\n @if (isEdit) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"content-header\">\n <button class=\"btn btn-primary float-end\"\n (click)=\"onEditProject(null)\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Create Project' | transloco}}\n </button>\n </div>\n </div>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (projects?.length) {\n <div id=\"timeline\"\n class=\"timeline-center timeline-wrapper\"\n >\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n </ul>\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n @for (\n project of projects; track trackByProject(i,\n project); let i = $index; let odd = $odd; let even = $even) {\n <li class=\"timeline-item\"\n [ngClass]=\"{ 'mt-5': odd }\"\n >\n <div class=\"timeline-badge\">\n <span class=\"bg-red bg-lighten-1\"\n [pTooltip]=\"'User.Profile.Projects.PortfolioWork' | transloco\"\n tooltipPosition=\"right\"\n appendTo=\"body\">\n <span class=\"timeline-year\"> {{ project.start_year }} </span>\n </span>\n </div>\n <div class=\"timeline-card card pb-0\">\n <div class=\"card-header\">\n <h4 class=\"mb-0 card-title\">\n <a>{{ project.title }}</a>\n </h4>\n <div class=\"card-subtitle text-muted mt-0\">\n <span class=\"font-small-3\">\n {{ project.start_year }} - {{ project.end_year }}</span>\n </div>\n </div>\n <div class=\"card-body project-card\">\n @if (project.project_pictures?.length) {\n <i\n class=\"fal fa-times\"\n (click)=\"deletePicture(project)\"\n (keydown.enter)=\"deletePicture(project)\"\n aria-hidden=\"true\"\n ></i>\n <img class=\"img-fluid project-picture\"\n [src]=\"project.project_pictures[0].picture.url\"\n [alt]=\"'User.Profile.Projects.CoverAlt' | transloco\" />\n }\n <div class=\"card-body\">\n <div class=\"\">\n <p class=\"card-text\">{{ project.description }}</p>\n <div class=\"list-inline mb-1\">\n <!-- Skills -->\n @if (project.tags?.length) {\n <div>\n <div class=\"my-2\">\n <i class=\"fa fa-user-tag\" aria-hidden=\"true\"></i>\n {{ 'User.Profile.About.Skills' | transloco }}\n </div>\n @for (tag of project.tags; track tag) {\n <span class=\"badge bg-success me-2\">{{\n tag.name\n }}</span>\n }\n </div>\n }\n @if (project.project_recommendations?.length) {\n <div class=\"mt-2\"\n >\n <div class=\"my-2\">\n <i\n class=\"fa fa-clipboard-check me-2\"\n aria-hidden=\"true\"\n ></i>\n {{ 'User.Profile.Projects.Recommendations' | transloco }}\n </div>\n @for (\n recommendation of project.project_recommendations\n ; track\n recommendation) {\n <section class=\"mb-2\"\n >\n <div class=\"me-2\">\n {{ 'User.Profile.Projects.Client' | transloco: { name: recommendation?.client_name } }}\n </div>\n <div class=\"me-2\">\n {{ 'User.Profile.Projects.Message' | transloco: { message: recommendation?.description } }}\n </div>\n <div class=\"row recommendation\">\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Communication' | transloco }}</span>\n <p-rating [(ngModel)]=\"\n recommendation.communication\n \"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Quality' | transloco }}</span>\n <p-rating [(ngModel)]=\"recommendation.quality\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Time' | transloco }}</span>\n <p-rating [(ngModel)]=\"recommendation.time\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n </div>\n </section>\n }\n </div>\n }\n @if (isEdit) {\n <div class=\"text-end mt-3 d-flex justify-content-end project-actions\"\n >\n <!-- Project Edit -->\n <span class=\"btn btn-link pb-0 actions\"\n (keydown.enter)=\"onEditProject(project)\"\n (click)=\"onEditProject(project)\">\n {{ 'Button.Edit' | transloco }}\n </span>\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openSkills(project)\">\n {{ 'User.Profile.About.Skills' | transloco }}\n </button>\n <pw-edit-skills-modal [userId]=\"user?.id\"\n entityEntity=\"Project\"\n entityType=\"skills\"\n (saveEvent)=\"onSkillsSave()\"\n [slug]=\"project?.slug\">\n </pw-edit-skills-modal>\n <!-- Portfolios -->\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openPortfolios(project.id)\">\n {{ 'User.Profile.Projects.Photos' | transloco }}\n </button>\n <pw-edit-portfolios [slug]=\"user?.slug\"\n [id]=\"project.id\"\n (successEvent)=\"getProjects()\">\n </pw-edit-portfolios>\n <span class=\"btn btn-link pb-0 delete-project actions\"\n (keydown.enter)=\"onDeleteProject(project)\"\n (click)=\"onDeleteProject(project)\">\n {{ 'Button.Delete' | transloco }}\n </span>\n </div>\n }\n <!-- Recommendation -->\n @if (!isEdit) {\n <span class=\"pe-1 mt-3\"\n (click)=\"editRecommendation(project)\"\n (keydown.enter)=\"editRecommendation(project)\"\n >\n <a class=\"primary\"><span class=\"fa fa-commenting-o\"></span> {{ 'User.Profile.Projects.Endorse' | transloco }}\n </a></span>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n @if (projects?.length === 0 && isLoaded) {\n<pw-no-data [withImage]=\"true\" [message]=\"\n isEdit\n ? ('User.Profile.Projects.NoProjects' | transloco)\n : ('User.Profile.Projects.NoUserProjects' | transloco)\n \"\n >\n </pw-no-data>\n }\n </div>\n</div>\n<pw-edit-project-modal (saveEvent)=\"onSaveProject($event)\"></pw-edit-project-modal>\n<pw-edit-recommendation-modal [user]=\"user\"></pw-edit-recommendation-modal>\n",
|
|
8384
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8388
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.project-card{position:relative}.project-card i.fa-times{color:#fff;display:none;font-size:20px;position:absolute;right:39px;top:14px}.project-card:hover i.fa-times{display:inline}.timeline-card.card{min-height:auto;border:1px solid #e2e5ea;border-radius:10px;box-shadow:0 1px 2px #1018280f}.timeline-card.card .card-header{padding:14px 16px 6px}.timeline-card.card .badge.bg-success{border-radius:9999px;background-color:#e7f5ee!important;color:#1f7a47!important;border:1px solid #c9e9d6;font-weight:600}.timeline-card.card .card-body.project-card{padding:0 20px 1rem}.timeline-card.card .card-body.project-card .card-body{padding:20px 0 0}@media only screen and (max-width:767px){.timeline-center{margin-top:30px}.timeline-center .project-actions .btn{padding:.375rem .5rem}}.actions{color:var(--first)!important}.timeline-badge .bg-red.bg-lighten-1{background-color:#eef0f3!important}.timeline-badge .bg-red.bg-lighten-1 .timeline-year{color:#3d4654}\n"],
|
|
8385
8389
|
dependencies: [
|
|
8386
8390
|
{
|
|
8387
8391
|
kind: "component",
|
|
@@ -8554,7 +8558,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8554
8558
|
TranslocoPipe
|
|
8555
8559
|
],
|
|
8556
8560
|
template: "<div class=\"row\">\n <div class=\"col-sm-12 mt-2\">\n <h2>{{ 'User.Profile.Projects.Title' | transloco }}</h2>\n @if (isEdit) {\n <div class=\"row\"\n >\n <div class=\"col-12\">\n <div class=\"content-header\">\n <button class=\"btn btn-primary float-end\"\n (click)=\"onEditProject(null)\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Create Project' | transloco}}\n </button>\n </div>\n </div>\n </div>\n }\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (projects?.length) {\n <div id=\"timeline\"\n class=\"timeline-center timeline-wrapper\"\n >\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n </ul>\n <ul class=\"timeline\">\n <li class=\"timeline-line\"></li>\n @for (\n project of projects; track trackByProject(i,\n project); let i = $index; let odd = $odd; let even = $even) {\n <li class=\"timeline-item\"\n [ngClass]=\"{ 'mt-5': odd }\"\n >\n <div class=\"timeline-badge\">\n <span class=\"bg-red bg-lighten-1\"\n [pTooltip]=\"'User.Profile.Projects.PortfolioWork' | transloco\"\n tooltipPosition=\"right\"\n appendTo=\"body\">\n <span class=\"timeline-year\"> {{ project.start_year }} </span>\n </span>\n </div>\n <div class=\"timeline-card card pb-0\">\n <div class=\"card-header\">\n <h4 class=\"mb-0 card-title\">\n <a>{{ project.title }}</a>\n </h4>\n <div class=\"card-subtitle text-muted mt-0\">\n <span class=\"font-small-3\">\n {{ project.start_year }} - {{ project.end_year }}</span>\n </div>\n </div>\n <div class=\"card-body project-card\">\n @if (project.project_pictures?.length) {\n <i\n class=\"fal fa-times\"\n (click)=\"deletePicture(project)\"\n (keydown.enter)=\"deletePicture(project)\"\n aria-hidden=\"true\"\n ></i>\n <img class=\"img-fluid project-picture\"\n [src]=\"project.project_pictures[0].picture.url\"\n [alt]=\"'User.Profile.Projects.CoverAlt' | transloco\" />\n }\n <div class=\"card-body\">\n <div class=\"\">\n <p class=\"card-text\">{{ project.description }}</p>\n <div class=\"list-inline mb-1\">\n <!-- Skills -->\n @if (project.tags?.length) {\n <div>\n <div class=\"my-2\">\n <i class=\"fa fa-user-tag\" aria-hidden=\"true\"></i>\n {{ 'User.Profile.About.Skills' | transloco }}\n </div>\n @for (tag of project.tags; track tag) {\n <span class=\"badge bg-success me-2\">{{\n tag.name\n }}</span>\n }\n </div>\n }\n @if (project.project_recommendations?.length) {\n <div class=\"mt-2\"\n >\n <div class=\"my-2\">\n <i\n class=\"fa fa-clipboard-check me-2\"\n aria-hidden=\"true\"\n ></i>\n {{ 'User.Profile.Projects.Recommendations' | transloco }}\n </div>\n @for (\n recommendation of project.project_recommendations\n ; track\n recommendation) {\n <section class=\"mb-2\"\n >\n <div class=\"me-2\">\n {{ 'User.Profile.Projects.Client' | transloco: { name: recommendation?.client_name } }}\n </div>\n <div class=\"me-2\">\n {{ 'User.Profile.Projects.Message' | transloco: { message: recommendation?.description } }}\n </div>\n <div class=\"row recommendation\">\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Communication' | transloco }}</span>\n <p-rating [(ngModel)]=\"\n recommendation.communication\n \"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Quality' | transloco }}</span>\n <p-rating [(ngModel)]=\"recommendation.quality\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n <div class=\"col-4\">\n <span>{{ 'User.Profile.Recommendations.Field.Time' | transloco }}</span>\n <p-rating [(ngModel)]=\"recommendation.time\"\n [cancel]=\"false\"\n [readonly]=\"true\">\n </p-rating>\n </div>\n </div>\n </section>\n }\n </div>\n }\n @if (isEdit) {\n <div class=\"text-end mt-3 d-flex justify-content-end project-actions\"\n >\n <!-- Project Edit -->\n <span class=\"btn btn-link pb-0 actions\"\n (keydown.enter)=\"onEditProject(project)\"\n (click)=\"onEditProject(project)\">\n {{ 'Button.Edit' | transloco }}\n </span>\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openSkills(project)\">\n {{ 'User.Profile.About.Skills' | transloco }}\n </button>\n <pw-edit-skills-modal [userId]=\"user?.id\"\n entityEntity=\"Project\"\n entityType=\"skills\"\n (saveEvent)=\"onSkillsSave()\"\n [slug]=\"project?.slug\">\n </pw-edit-skills-modal>\n <!-- Portfolios -->\n <button class=\"btn btn-link pb-0 actions\"\n (click)=\"openPortfolios(project.id)\">\n {{ 'User.Profile.Projects.Photos' | transloco }}\n </button>\n <pw-edit-portfolios [slug]=\"user?.slug\"\n [id]=\"project.id\"\n (successEvent)=\"getProjects()\">\n </pw-edit-portfolios>\n <span class=\"btn btn-link pb-0 delete-project actions\"\n (keydown.enter)=\"onDeleteProject(project)\"\n (click)=\"onDeleteProject(project)\">\n {{ 'Button.Delete' | transloco }}\n </span>\n </div>\n }\n <!-- Recommendation -->\n @if (!isEdit) {\n <span class=\"pe-1 mt-3\"\n (click)=\"editRecommendation(project)\"\n (keydown.enter)=\"editRecommendation(project)\"\n >\n <a class=\"primary\"><span class=\"fa fa-commenting-o\"></span> {{ 'User.Profile.Projects.Endorse' | transloco }}\n </a></span>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n @if (projects?.length === 0 && isLoaded) {\n<pw-no-data [withImage]=\"true\" [message]=\"\n isEdit\n ? ('User.Profile.Projects.NoProjects' | transloco)\n : ('User.Profile.Projects.NoUserProjects' | transloco)\n \"\n >\n </pw-no-data>\n }\n </div>\n</div>\n<pw-edit-project-modal (saveEvent)=\"onSaveProject($event)\"></pw-edit-project-modal>\n<pw-edit-recommendation-modal [user]=\"user\"></pw-edit-recommendation-modal>\n",
|
|
8557
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8561
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.project-card{position:relative}.project-card i.fa-times{color:#fff;display:none;font-size:20px;position:absolute;right:39px;top:14px}.project-card:hover i.fa-times{display:inline}.timeline-card.card{min-height:auto;border:1px solid #e2e5ea;border-radius:10px;box-shadow:0 1px 2px #1018280f}.timeline-card.card .card-header{padding:14px 16px 6px}.timeline-card.card .badge.bg-success{border-radius:9999px;background-color:#e7f5ee!important;color:#1f7a47!important;border:1px solid #c9e9d6;font-weight:600}.timeline-card.card .card-body.project-card{padding:0 20px 1rem}.timeline-card.card .card-body.project-card .card-body{padding:20px 0 0}@media only screen and (max-width:767px){.timeline-center{margin-top:30px}.timeline-center .project-actions .btn{padding:.375rem .5rem}}.actions{color:var(--first)!important}.timeline-badge .bg-red.bg-lighten-1{background-color:#eef0f3!important}.timeline-badge .bg-red.bg-lighten-1 .timeline-year{color:#3d4654}\n"]
|
|
8558
8562
|
}]
|
|
8559
8563
|
}],
|
|
8560
8564
|
propDecorators: {
|
|
@@ -8655,7 +8659,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8655
8659
|
const file = new File([blob], filename);
|
|
8656
8660
|
this.userService.addAvatar(file).subscribe((res) => {
|
|
8657
8661
|
this.modalService.dismissAll();
|
|
8658
|
-
this.image = res?.user_avatar[2]?.url;
|
|
8662
|
+
this.image = res?.result?.user_avatar[2]?.url;
|
|
8659
8663
|
this.cdr.markForCheck();
|
|
8660
8664
|
});
|
|
8661
8665
|
}
|
|
@@ -8666,9 +8670,9 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8666
8670
|
avatar: this.profileService.getUserObject("avatar", this.slug)
|
|
8667
8671
|
}).subscribe({
|
|
8668
8672
|
next: (response) => {
|
|
8669
|
-
this.user = response.user;
|
|
8670
|
-
this.userProfile = response.user_profile;
|
|
8671
|
-
if (response.avatar
|
|
8673
|
+
this.user = response.user.result;
|
|
8674
|
+
this.userProfile = response.user_profile.result;
|
|
8675
|
+
if (response.avatar.result?.length > 0) this.image = response.avatar.result[2]?.url;
|
|
8672
8676
|
this.getCurrentUserDetails();
|
|
8673
8677
|
this.isLoaded = true;
|
|
8674
8678
|
this.cdr.markForCheck();
|
|
@@ -8686,8 +8690,8 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8686
8690
|
this.userStore().subscribe((currentUser) => {
|
|
8687
8691
|
if (currentUser) {
|
|
8688
8692
|
this.loggedInUserDetails = currentUser;
|
|
8689
|
-
this.userService.getCurrentUserObject("user_relationships").subscribe((
|
|
8690
|
-
this.isFollowing =
|
|
8693
|
+
this.userService.getCurrentUserObject("user_relationships").subscribe(({ result }) => {
|
|
8694
|
+
this.isFollowing = result.length > 0 ? result.some((x) => x.followed_id === this.user.id && currentUser.id === x.follower_id) : false;
|
|
8691
8695
|
this.cdr.markForCheck();
|
|
8692
8696
|
});
|
|
8693
8697
|
}
|
|
@@ -8698,9 +8702,9 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8698
8702
|
this.router.navigate(["/message"], { fragment: this.slug });
|
|
8699
8703
|
}
|
|
8700
8704
|
followUser() {
|
|
8701
|
-
this.userService.followUser(this.user.id).subscribe((
|
|
8705
|
+
this.userService.followUser(this.user.id).subscribe(({ result }) => {
|
|
8702
8706
|
const name = this.user.first_name || this.user.slug;
|
|
8703
|
-
if (
|
|
8707
|
+
if (result?.id) {
|
|
8704
8708
|
this.isFollowing = true;
|
|
8705
8709
|
this.toast.success(`You're now following ${name}`);
|
|
8706
8710
|
} else {
|
|
@@ -8770,7 +8774,7 @@ var UserProfilePageComponent = class UserProfilePageComponent extends AppBaseCom
|
|
|
8770
8774
|
usesInheritance: true,
|
|
8771
8775
|
ngImport: i0,
|
|
8772
8776
|
template: "<!-- User Profile Starts -->\n<!-- Basic User Details Starts -->\n@if (user) {\n <section id=\"user-profile\"\n >\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"dashboard\">\n <div class=\"media row py-3 align-items-center\">\n <div class=\"col-3 col-sm-2\">\n <div class=\"align-self-center halfway-fab text-center\">\n <!-- User Avatar -->\n <a class=\"profile-image\">\n <img [src]=\"image\"\n width=\"100\"\n height=\"100\"\n class=\"rounded-circle img-border width-100\"\n [alt]=\"'User.Profile.ProfilePicture' | transloco\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\" />\n @if (allowEdit) {\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n >\n <div class=\"overlay-text\">\n <!-- Change Profile Pic -->\n <a [attr.aria-label]=\"'User.Profile.Change' | transloco\">\n {{ 'User.Profile.Change' | transloco }}\n </a>\n </div>\n </div>\n }\n </a>\n </div>\n </div>\n <div class=\"col-9 col-sm-5\">\n <div class=\"align-self-start halfway-fab ps-3 pt-2\">\n <div>\n @if (user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{\n user?.first_name\n ? user?.first_name + ' ' + user?.last_name\n : 'Update Profile'\n }}\n </strong>\n }\n @if (!user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{ user?.first_name ? user?.first_name : 'Update Profile' }}\n </strong>\n }\n <p class=\"font-small-4\">{{ userProfile?.headline }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-5\">\n @if (!allowEdit) {\n <div class=\"profile-cover-buttons\"\n >\n <div class=\"d-flex halfway-fab align-self-end\">\n <div class=\"text-end d-none d-sm-none d-md-none d-lg-block\">\n <button type=\"button\"\n (click)=\"followUser()\"\n class=\"btn btn-outline-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n {{ isFollowing ? 'Following' : 'Follow' }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\"\n (click)=\"sendMessageSlug()\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i> {{ 'User.Profile.SendMessage' | transloco }}\n </button>\n </div>\n <div class=\"text-end d-block d-sm-block d-md-block d-lg-none\">\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n<!-- Basic User Details Ends -->\n<section>\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <p-tabs [value]=\"activeTabValue\" (valueChange)=\"onTabChange($event)\">\n <p-tablist>\n @for (item of items; track item) {\n <p-tab [value]=\"item.id\">\n @if (item.icon) {\n <i [class]=\"item.icon\" aria-hidden=\"true\"></i>\n }\n <span>{{ item['labelKey'] | transloco }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (user && activeItem.id === 'about') {\n <pw-user-about [user]=\"user\"\n [isEdit]=\"allowEdit\"\n (saveEvent)=\"getUserBySlug()\">\n </pw-user-about>\n }\n @if (activeItem.id === 'projects') {\n <pw-user-projects [user]=\"user\"\n [slug]=\"slug\"\n [isEdit]=\"allowEdit\"></pw-user-projects>\n }\n @if (activeItem.id === 'portfolio') {\n <pw-portfolios [user]=\"user\"\n [isEdit]=\"allowEdit\"></pw-portfolios>\n }\n </div>\n </div>\n </div>\n</section>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n [userAvatar]=\"image\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
8773
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8777
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.card-body{padding:10px!important}.py-3{padding-top:4rem!important;padding-bottom:0rem!important}.overlay-text{margin-top:5px;text-align:center}.profile-image img.rounded-circle{max-width:100%;height:auto;box-sizing:border-box}::ng-deep .pw-tab .p-tabs .p-tab.p-highlight,::ng-deep .pw-tab .p-tabs .p-tab[aria-selected=true]{background-color:#1769e1!important;box-shadow:none!important;color:#fff!important}::ng-deep .pw-tab .p-tabs .p-tab.p-highlight:hover,::ng-deep .pw-tab .p-tabs .p-tab[aria-selected=true]:hover{background-color:#1769e1!important;color:#fff!important}\n"],
|
|
8774
8778
|
dependencies: [
|
|
8775
8779
|
{
|
|
8776
8780
|
kind: "directive",
|
|
@@ -8885,7 +8889,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8885
8889
|
TranslocoPipe
|
|
8886
8890
|
],
|
|
8887
8891
|
template: "<!-- User Profile Starts -->\n<!-- Basic User Details Starts -->\n@if (user) {\n <section id=\"user-profile\"\n >\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"dashboard\">\n <div class=\"media row py-3 align-items-center\">\n <div class=\"col-3 col-sm-2\">\n <div class=\"align-self-center halfway-fab text-center\">\n <!-- User Avatar -->\n <a class=\"profile-image\">\n <img [src]=\"image\"\n width=\"100\"\n height=\"100\"\n class=\"rounded-circle img-border width-100\"\n [alt]=\"'User.Profile.ProfilePicture' | transloco\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\" />\n @if (allowEdit) {\n <div class=\"overlay\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n >\n <div class=\"overlay-text\">\n <!-- Change Profile Pic -->\n <a [attr.aria-label]=\"'User.Profile.Change' | transloco\">\n {{ 'User.Profile.Change' | transloco }}\n </a>\n </div>\n </div>\n }\n </a>\n </div>\n </div>\n <div class=\"col-9 col-sm-5\">\n <div class=\"align-self-start halfway-fab ps-3 pt-2\">\n <div>\n @if (user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{\n user?.first_name\n ? user?.first_name + ' ' + user?.last_name\n : 'Update Profile'\n }}\n </strong>\n }\n @if (!user?.last_name) {\n <strong class=\"font-medium-2 text-uppercase\"\n >\n {{ user?.first_name ? user?.first_name : 'Update Profile' }}\n </strong>\n }\n <p class=\"font-small-4\">{{ userProfile?.headline }}</p>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-5\">\n @if (!allowEdit) {\n <div class=\"profile-cover-buttons\"\n >\n <div class=\"d-flex halfway-fab align-self-end\">\n <div class=\"text-end d-none d-sm-none d-md-none d-lg-block\">\n <button type=\"button\"\n (click)=\"followUser()\"\n class=\"btn btn-outline-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n {{ isFollowing ? 'Following' : 'Follow' }}\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\"\n (click)=\"sendMessageSlug()\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i> {{ 'User.Profile.SendMessage' | transloco }}\n </button>\n </div>\n <div class=\"text-end d-block d-sm-block d-md-block d-lg-none\">\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-2\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\"\n class=\"btn btn-primary btn-raised me-3\">\n <i class=\"fa fa-mail-bulk\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n}\n<!-- Basic User Details Ends -->\n<section>\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <p-tabs [value]=\"activeTabValue\" (valueChange)=\"onTabChange($event)\">\n <p-tablist>\n @for (item of items; track item) {\n <p-tab [value]=\"item.id\">\n @if (item.icon) {\n <i [class]=\"item.icon\" aria-hidden=\"true\"></i>\n }\n <span>{{ item['labelKey'] | transloco }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progress-spinner strokeWidth=\"2\"> </p-progress-spinner>\n </div>\n }\n @if (user && activeItem.id === 'about') {\n <pw-user-about [user]=\"user\"\n [isEdit]=\"allowEdit\"\n (saveEvent)=\"getUserBySlug()\">\n </pw-user-about>\n }\n @if (activeItem.id === 'projects') {\n <pw-user-projects [user]=\"user\"\n [slug]=\"slug\"\n [isEdit]=\"allowEdit\"></pw-user-projects>\n }\n @if (activeItem.id === 'portfolio') {\n <pw-portfolios [user]=\"user\"\n [isEdit]=\"allowEdit\"></pw-portfolios>\n }\n </div>\n </div>\n </div>\n</section>\n<ng-template #content\n let-modal>\n <div class=\"card m-0\">\n <div class=\"card-content\">\n <div class=\"card-title\">\n <h3 class=\"modal-title\">{{ 'User.Profile.ProfilePicture' | transloco }}</h3>\n <button type=\"button\"\n class=\"btn-close float-end\"\n [attr.aria-label]=\"'Common.Confirm.Close.Title' | transloco\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"card-header\">\n <small> {{ 'User.Profile.PictureMessage' | transloco }}</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n [userAvatar]=\"image\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n </div>\n </div>\n</ng-template>\n",
|
|
8888
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-
|
|
8892
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--pw-neutral-0: #fff;--pw-neutral-50: #f7f8fa;--pw-neutral-100: #eef0f3;--pw-neutral-200: #e2e5ea;--pw-neutral-300: #cfd4dc;--pw-neutral-400: #a8afbc;--pw-neutral-500: #7c8696;--pw-neutral-600: #5a6473;--pw-neutral-700: #3d4654;--pw-neutral-800: #272e38;--pw-neutral-900: #1a1d21;--pw-hairline: var(--pw-neutral-200);--pw-shadow-color: rgb(16 24 40);--pw-stage-bg: #0d131b;--pw-stage-ink: #f4f6f9;--pw-stage-ink-2: rgb(244 246 249 / 72%);--pw-stage-ink-3: rgb(244 246 249 / 52%);--pw-stage-surface: rgb(255 255 255 / 4%);--pw-stage-surface-hover: rgb(255 255 255 / 7%);--pw-stage-line: rgb(255 255 255 / 9%);--pw-stage-line-strong: rgb(255 255 255 / 18%);--public-btn-radius: 24px}.card-body{padding:10px!important}.py-3{padding-top:4rem!important;padding-bottom:0rem!important}.overlay-text{margin-top:5px;text-align:center}.profile-image img.rounded-circle{max-width:100%;height:auto;box-sizing:border-box}::ng-deep .pw-tab .p-tabs .p-tab.p-highlight,::ng-deep .pw-tab .p-tabs .p-tab[aria-selected=true]{background-color:#1769e1!important;box-shadow:none!important;color:#fff!important}::ng-deep .pw-tab .p-tabs .p-tab.p-highlight:hover,::ng-deep .pw-tab .p-tabs .p-tab[aria-selected=true]:hover{background-color:#1769e1!important;color:#fff!important}\n"]
|
|
8889
8893
|
}]
|
|
8890
8894
|
}],
|
|
8891
8895
|
ctorParameters: () => []
|