@posiwise/admin-module 0.0.161 → 0.0.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-build/domain-config-build.component.mjs +149 -102
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-details.component.mjs +2 -2
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-integrations/domain-config-integrations.component.mjs +3 -2
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-interface/domain-config-interface.component.mjs +3 -2
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-organization/domain-config-organization.component.mjs +3 -2
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-security/domain-config-security.component.mjs +3 -2
- package/esm2022/lib/components/domain-config/domain-config-details/domain-config-social/domain-config-social.component.mjs +3 -2
- package/esm2022/lib/components/faqs/add-faq/add-faq.component.mjs +3 -3
- package/esm2022/lib/components/faqs/edit-faq/edit-faq.component.mjs +3 -3
- package/esm2022/lib/components/faqs/faqs-list/faqs-list.component.mjs +4 -4
- package/esm2022/lib/components/login-notifications/login-notification-details/login-notification-details.component.mjs +2 -2
- package/esm2022/lib/components/products/product-details/product-details.component.mjs +3 -3
- package/esm2022/lib/components/products/products-list/products-list.component.mjs +3 -3
- package/esm2022/lib/components/resources/resources-admin-details/resources-admin-details.component.mjs +33 -21
- package/esm2022/lib/components/resources/resources-admin-tabs/resources-index/resources-index.component.mjs +3 -3
- package/esm2022/lib/components/subscriptions/subscription-agents/subscription-agents.component.mjs +4 -4
- package/esm2022/lib/components/subscriptions/subscription-agents-list/subscription-agents-list.component.mjs +2 -2
- package/esm2022/lib/components/subscriptions/subscription-details/subscription-details.component.mjs +4 -4
- package/esm2022/lib/components/subscriptions/subscription-product-details/subscription-product-details.component.mjs +3 -3
- package/esm2022/lib/components/subscriptions/subscription-products/subscription-products.component.mjs +2 -2
- package/esm2022/lib/components/subscriptions/subscription-users/add-members/add-members.component.mjs +1 -1
- package/esm2022/lib/components/subscriptions/subscription-users/subscription-users.component.mjs +10 -9
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-price/subscription-insight-average-price.component.mjs +2 -7
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-average-user/subscription-insight-average-user.component.mjs +2 -7
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-nps/subscription-insight-nps.component.mjs +2 -7
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-product-session/subscription-insight-product-session.component.mjs +2 -7
- package/esm2022/lib/components/subscriptions/subscriptions-insight/subscription-insight-user-session/subscription-insight-user-session.component.mjs +2 -7
- package/esm2022/lib/components/subscriptions/subscriptions-list/invite-users/invite-users.component.mjs +6 -6
- package/esm2022/lib/components/subscriptions/subscriptions-list/subscriptions-list.component.mjs +11 -10
- package/esm2022/lib/components/tags/tags-details/tags-details.component.mjs +15 -5
- package/esm2022/lib/components/tags/tags-list/tags-list.component.mjs +4 -4
- package/esm2022/lib/components/tracking/ahoy-events/ahoy-events.component.mjs +5 -6
- package/esm2022/lib/components/tracking/ahoy-messages/ahoy-messages.component.mjs +5 -6
- package/esm2022/lib/components/tracking/ahoy-visits/ahoy-visits.component.mjs +4 -3
- package/esm2022/lib/components/tracking/events/events.component.mjs +4 -3
- package/esm2022/lib/components/tracking/versions/versions.component.mjs +3 -3
- package/esm2022/lib/components/users/user-details/user-details.component.mjs +6 -3
- package/esm2022/lib/components/users/users-list/users-list.component.mjs +11 -11
- package/fesm2022/posiwise-admin-module.mjs +286 -238
- package/fesm2022/posiwise-admin-module.mjs.map +1 -1
- package/lib/components/resources/resources-admin-details/resources-admin-details.component.d.ts +7 -0
- package/lib/components/subscriptions/subscription-users/add-members/add-members.component.d.ts +1 -1
- package/lib/components/subscriptions/subscription-users/subscription-users.component.d.ts +1 -0
- package/lib/components/tags/tags-details/tags-details.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -996,17 +996,17 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
996
996
|
forkJoin({
|
|
997
997
|
options: this.adminService.getAvailableDomainOptions(this.subscriptionId),
|
|
998
998
|
getProduct: this.productService.getProductList({}, this.subscriptionId),
|
|
999
|
-
config: this.adminService.getDomainConfigById(this.duplicateConfigId
|
|
999
|
+
config: this.adminService.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1000
1000
|
})
|
|
1001
1001
|
.subscribe(res => {
|
|
1002
1002
|
// options
|
|
1003
1003
|
this.masterSubscriptionProductList = [
|
|
1004
1004
|
{ id: null, name: 'Select Master Product' },
|
|
1005
|
-
...(res?.options?.master_subscription?.products
|
|
1005
|
+
...(res?.options?.master_subscription?.products ?? [])
|
|
1006
1006
|
];
|
|
1007
1007
|
this.masterSubscriptionsList = [
|
|
1008
1008
|
{ label: 'Select Master Subscription', value: null },
|
|
1009
|
-
...(res?.options?.master_subscription?.subscriptions
|
|
1009
|
+
...(res?.options?.master_subscription?.subscriptions ?? []).map(sub => ({
|
|
1010
1010
|
label: sub.organisation
|
|
1011
1011
|
? `${sub.organisation} - ${sub.contact_name}`
|
|
1012
1012
|
: sub.contact_name,
|
|
@@ -1015,19 +1015,19 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1015
1015
|
];
|
|
1016
1016
|
this.subscriptionTosList = [
|
|
1017
1017
|
{ id: null, title: 'Select Main TOS' },
|
|
1018
|
-
...(res?.options?.master_subscription?.subscription_tos
|
|
1018
|
+
...(res?.options?.master_subscription?.subscription_tos ?? [])
|
|
1019
1019
|
];
|
|
1020
1020
|
this.crmSubscriptionsList = [
|
|
1021
1021
|
{ id: null, organisation: null, contact_name: 'Select CRM Subscription' },
|
|
1022
|
-
...(res?.options?.master_crm?.subscriptions
|
|
1022
|
+
...(res?.options?.master_crm?.subscriptions ?? [])
|
|
1023
1023
|
];
|
|
1024
1024
|
this.crmSourcesList = [
|
|
1025
1025
|
{ id: null, name: 'Select CRM Source' },
|
|
1026
|
-
...(res?.options?.master_crm?.sources
|
|
1026
|
+
...(res?.options?.master_crm?.sources ?? [])
|
|
1027
1027
|
];
|
|
1028
1028
|
this.crmProductList = [
|
|
1029
1029
|
{ id: null, name: 'Select CRM Product', subscription_id: null },
|
|
1030
|
-
...(res?.options?.master_crm?.products
|
|
1030
|
+
...(res?.options?.master_crm?.products ?? [])
|
|
1031
1031
|
];
|
|
1032
1032
|
// end options
|
|
1033
1033
|
this.productsList = this.groupProducts(res?.getProduct?.products);
|
|
@@ -1037,160 +1037,206 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1037
1037
|
const demoGroup = this.form.get('book_demo');
|
|
1038
1038
|
const itemsArray = demoGroup.get('items');
|
|
1039
1039
|
demoGroup.patchValue({
|
|
1040
|
-
title: demo?.title
|
|
1041
|
-
description: demo?.description
|
|
1040
|
+
title: demo?.title ?? '',
|
|
1041
|
+
description: demo?.description ?? ''
|
|
1042
1042
|
});
|
|
1043
1043
|
const uspsGroup = this.form.get('usps');
|
|
1044
1044
|
const uspItemsArray = uspsGroup.get('items');
|
|
1045
1045
|
uspsGroup.patchValue({
|
|
1046
|
-
title: res.config?.usps?.title
|
|
1047
|
-
description: res.config?.usps?.description
|
|
1046
|
+
title: res.config?.usps?.title ?? '',
|
|
1047
|
+
description: res.config?.usps?.description ?? ''
|
|
1048
1048
|
});
|
|
1049
1049
|
uspItemsArray.clear();
|
|
1050
|
-
(res.config?.usps?.items
|
|
1050
|
+
(res.config?.usps?.items ?? []).forEach(item => {
|
|
1051
1051
|
uspItemsArray.push(this.fb.group({
|
|
1052
|
-
description: [item.description
|
|
1052
|
+
description: [item.description ?? '']
|
|
1053
1053
|
}));
|
|
1054
1054
|
});
|
|
1055
1055
|
const headerGroup = this.form.get('header');
|
|
1056
1056
|
const subHeadingsArray = headerGroup.get('sub_headings');
|
|
1057
1057
|
headerGroup.patchValue({
|
|
1058
|
-
headline: res.config?.header?.headline
|
|
1059
|
-
description: res.config?.header?.description
|
|
1060
|
-
video_url: res.config?.header?.video_url
|
|
1061
|
-
bg_image_url: res.config?.header?.bg_image_url
|
|
1058
|
+
headline: res.config?.header?.headline ?? '',
|
|
1059
|
+
description: res.config?.header?.description ?? '',
|
|
1060
|
+
video_url: res.config?.header?.video_url ?? '',
|
|
1061
|
+
bg_image_url: res.config?.header?.bg_image_url ?? ''
|
|
1062
1062
|
});
|
|
1063
1063
|
subHeadingsArray.clear();
|
|
1064
|
-
(res.config?.header?.sub_headings
|
|
1064
|
+
(res.config?.header?.sub_headings ?? []).forEach(sh => {
|
|
1065
1065
|
subHeadingsArray.push(this.fb.group({
|
|
1066
|
-
description: [sh.description
|
|
1066
|
+
description: [sh.description ?? '']
|
|
1067
1067
|
}));
|
|
1068
1068
|
});
|
|
1069
1069
|
const testimonialsGroup = this.form.get('testimonials');
|
|
1070
1070
|
const testimonialItems = testimonialsGroup.get('items');
|
|
1071
1071
|
testimonialsGroup.patchValue({
|
|
1072
|
-
title: res.config?.testimonials?.title
|
|
1073
|
-
description: res.config?.testimonials?.description
|
|
1072
|
+
title: res.config?.testimonials?.title ?? '',
|
|
1073
|
+
description: res.config?.testimonials?.description ?? ''
|
|
1074
1074
|
});
|
|
1075
1075
|
testimonialItems.clear();
|
|
1076
|
-
(res.config?.testimonials?.items
|
|
1076
|
+
(res.config?.testimonials?.items ?? []).forEach(item => {
|
|
1077
1077
|
testimonialItems.push(this.fb.group({
|
|
1078
|
-
testimonial: [item?.testimonial
|
|
1079
|
-
name: [item?.name
|
|
1080
|
-
blog_url: [item?.blog_url
|
|
1081
|
-
image_url: [item?.image_url
|
|
1082
|
-
video_url: [item?.video_url
|
|
1078
|
+
testimonial: [item?.testimonial ?? ''],
|
|
1079
|
+
name: [item?.name ?? ''],
|
|
1080
|
+
blog_url: [item?.blog_url ?? ''],
|
|
1081
|
+
image_url: [item?.image_url ?? ''],
|
|
1082
|
+
video_url: [item?.video_url ?? '']
|
|
1083
1083
|
}));
|
|
1084
1084
|
});
|
|
1085
1085
|
const ctasGroup = this.form.get('ctas');
|
|
1086
1086
|
const ctasItems = ctasGroup.get('items');
|
|
1087
1087
|
ctasGroup.patchValue({
|
|
1088
|
-
title: res.config?.ctas?.title
|
|
1089
|
-
description: res.config?.ctas?.description
|
|
1090
|
-
image_url: res.config?.ctas?.image_url
|
|
1088
|
+
title: res.config?.ctas?.title ?? '',
|
|
1089
|
+
description: res.config?.ctas?.description ?? '',
|
|
1090
|
+
image_url: res.config?.ctas?.image_url ?? ''
|
|
1091
1091
|
});
|
|
1092
1092
|
ctasItems.clear();
|
|
1093
|
-
(res.config?.ctas?.items
|
|
1093
|
+
(res.config?.ctas?.items ?? []).forEach(item => {
|
|
1094
1094
|
ctasItems.push(this.fb.group({
|
|
1095
|
-
title: [item?.title
|
|
1096
|
-
description: [item?.description
|
|
1097
|
-
button_text: [item?.button_text
|
|
1098
|
-
image_url: [item?.image_url
|
|
1099
|
-
cta_url: [item?.cta_url
|
|
1100
|
-
video_url: [item?.video_url
|
|
1095
|
+
title: [item?.title ?? ''],
|
|
1096
|
+
description: [item?.description ?? ''],
|
|
1097
|
+
button_text: [item?.button_text ?? ''],
|
|
1098
|
+
image_url: [item?.image_url ?? ''],
|
|
1099
|
+
cta_url: [item?.cta_url ?? ''],
|
|
1100
|
+
video_url: [item?.video_url ?? '']
|
|
1101
1101
|
}));
|
|
1102
1102
|
});
|
|
1103
1103
|
const guidesGroup = this.form.get('guides');
|
|
1104
1104
|
const guidesItems = guidesGroup.get('items');
|
|
1105
1105
|
guidesItems.clear();
|
|
1106
|
-
(res.config?.guides?.items
|
|
1106
|
+
(res.config?.guides?.items ?? []).forEach(item => {
|
|
1107
1107
|
guidesItems.push(this.fb.group({
|
|
1108
|
-
title: [item?.title
|
|
1109
|
-
description: [item?.description
|
|
1110
|
-
button_text: [item?.button_text
|
|
1111
|
-
image_url: [item?.image_url
|
|
1112
|
-
guide_url: [item?.guide_url
|
|
1108
|
+
title: [item?.title ?? ''],
|
|
1109
|
+
description: [item?.description ?? ''],
|
|
1110
|
+
button_text: [item?.button_text ?? ''],
|
|
1111
|
+
image_url: [item?.image_url ?? ''],
|
|
1112
|
+
guide_url: [item?.guide_url ?? '']
|
|
1113
1113
|
}));
|
|
1114
1114
|
});
|
|
1115
1115
|
const partnersGroup = this.form.get('partners');
|
|
1116
1116
|
const partnersItems = partnersGroup.get('items');
|
|
1117
1117
|
partnersGroup.patchValue({
|
|
1118
|
-
description: this.data?.partners?.description
|
|
1118
|
+
description: this.data?.partners?.description ?? ''
|
|
1119
1119
|
});
|
|
1120
1120
|
partnersItems.clear();
|
|
1121
|
-
(this.data?.partners?.items
|
|
1121
|
+
(this.data?.partners?.items ?? []).forEach(item => {
|
|
1122
1122
|
partnersItems.push(this.fb.group({
|
|
1123
|
-
image_url: [item?.image_url
|
|
1124
|
-
name: [item?.name
|
|
1125
|
-
description: [item?.description
|
|
1126
|
-
blog_url: [item?.blog_url
|
|
1127
|
-
video_url: [item?.video_url
|
|
1123
|
+
image_url: [item?.image_url ?? ''],
|
|
1124
|
+
name: [item?.name ?? ''],
|
|
1125
|
+
description: [item?.description ?? ''],
|
|
1126
|
+
blog_url: [item?.blog_url ?? ''],
|
|
1127
|
+
video_url: [item?.video_url ?? '']
|
|
1128
1128
|
}));
|
|
1129
1129
|
});
|
|
1130
1130
|
itemsArray.clear();
|
|
1131
|
-
(demo?.items
|
|
1131
|
+
(demo?.items ?? []).forEach(link => {
|
|
1132
1132
|
itemsArray.push(this.fb.group({
|
|
1133
|
-
title: [link.title
|
|
1134
|
-
url: [link.url
|
|
1133
|
+
title: [link.title ?? ''],
|
|
1134
|
+
url: [link.url ?? '']
|
|
1135
1135
|
}));
|
|
1136
1136
|
});
|
|
1137
1137
|
const contactUsGroup = this.form.get('contact_us');
|
|
1138
1138
|
const questionsArray = contactUsGroup.get('questions');
|
|
1139
1139
|
const hubspotArray = contactUsGroup.get('hubspot');
|
|
1140
1140
|
contactUsGroup.patchValue({
|
|
1141
|
-
description: res.config?.contact_us?.description
|
|
1141
|
+
description: res.config?.contact_us?.description ?? ''
|
|
1142
1142
|
});
|
|
1143
1143
|
questionsArray.clear();
|
|
1144
1144
|
hubspotArray.clear();
|
|
1145
|
-
(res.config?.contact_us?.questions
|
|
1145
|
+
(res.config?.contact_us?.questions ?? []).forEach(q => {
|
|
1146
1146
|
questionsArray.push(this.fb.group({
|
|
1147
|
-
question: [q?.question
|
|
1148
|
-
options: this.fb.array((q?.options
|
|
1149
|
-
option: [o?.option
|
|
1147
|
+
question: [q?.question ?? ''],
|
|
1148
|
+
options: this.fb.array((q?.options ?? []).map(o => this.fb.group({
|
|
1149
|
+
option: [o?.option ?? '']
|
|
1150
1150
|
})))
|
|
1151
1151
|
}));
|
|
1152
1152
|
});
|
|
1153
|
-
(res.config?.contact_us?.hubspot
|
|
1153
|
+
(res.config?.contact_us?.hubspot ?? []).forEach(h => {
|
|
1154
1154
|
hubspotArray.push(this.fb.group({
|
|
1155
|
-
id: [h?.id
|
|
1156
|
-
position: [h?.position
|
|
1157
|
-
div: [h?.div
|
|
1155
|
+
id: [h?.id ?? ''],
|
|
1156
|
+
position: [h?.position ?? ''],
|
|
1157
|
+
div: [h?.div ?? '']
|
|
1158
1158
|
}));
|
|
1159
1159
|
});
|
|
1160
1160
|
const videosGroup = this.form.get('videos');
|
|
1161
1161
|
const videosItems = videosGroup.get('items');
|
|
1162
1162
|
videosGroup.patchValue({
|
|
1163
|
-
title: res.config?.videos?.title
|
|
1164
|
-
description: res.config?.videos?.description
|
|
1163
|
+
title: res.config?.videos?.title ?? '',
|
|
1164
|
+
description: res.config?.videos?.description ?? ''
|
|
1165
1165
|
});
|
|
1166
1166
|
videosItems.clear();
|
|
1167
|
-
(res.config?.videos?.items
|
|
1167
|
+
(res.config?.videos?.items ?? []).forEach(item => {
|
|
1168
1168
|
videosItems.push(this.fb.group({
|
|
1169
|
-
title: [item?.title
|
|
1170
|
-
description: [item?.description
|
|
1171
|
-
blog_url: [item?.blog_url
|
|
1172
|
-
image_url: [item?.image_url
|
|
1173
|
-
video_url: [item?.video_url
|
|
1169
|
+
title: [item?.title ?? ''],
|
|
1170
|
+
description: [item?.description ?? ''],
|
|
1171
|
+
blog_url: [item?.blog_url ?? ''],
|
|
1172
|
+
image_url: [item?.image_url ?? ''],
|
|
1173
|
+
video_url: [item?.video_url ?? '']
|
|
1174
1174
|
}));
|
|
1175
1175
|
});
|
|
1176
1176
|
const integrationsGroup = this.form.get('integrations');
|
|
1177
1177
|
const integrationsItems = integrationsGroup.get('items');
|
|
1178
1178
|
integrationsGroup.patchValue({
|
|
1179
|
-
title: res.config?.integrations?.title
|
|
1180
|
-
description: res.config?.integrations?.description
|
|
1179
|
+
title: res.config?.integrations?.title ?? '',
|
|
1180
|
+
description: res.config?.integrations?.description ?? ''
|
|
1181
1181
|
});
|
|
1182
1182
|
integrationsItems.clear();
|
|
1183
|
-
(res.config?.integrations?.items
|
|
1183
|
+
(res.config?.integrations?.items ?? []).forEach(item => {
|
|
1184
1184
|
integrationsItems.push(this.fb.group({
|
|
1185
|
-
title: [item?.title
|
|
1186
|
-
description: [item?.description
|
|
1187
|
-
blog_url: [item?.blog_url
|
|
1188
|
-
image_url: [item?.image_url
|
|
1189
|
-
video_url: [item?.video_url
|
|
1185
|
+
title: [item?.title ?? ''],
|
|
1186
|
+
description: [item?.description ?? ''],
|
|
1187
|
+
blog_url: [item?.blog_url ?? ''],
|
|
1188
|
+
image_url: [item?.image_url ?? ''],
|
|
1189
|
+
video_url: [item?.video_url ?? '']
|
|
1190
1190
|
}));
|
|
1191
1191
|
});
|
|
1192
1192
|
this.shardUrl = res?.config?.shard_url;
|
|
1193
|
-
this.
|
|
1193
|
+
const fixedData = { ...this.data };
|
|
1194
|
+
if (!fixedData.header || typeof fixedData.header !== 'object' || !Array.isArray(fixedData.header.sub_headings)) {
|
|
1195
|
+
fixedData.header = { ...fixedData.header, sub_headings: [] };
|
|
1196
|
+
}
|
|
1197
|
+
if (!fixedData.testimonials || typeof fixedData.testimonials !== 'object' || !Array.isArray(fixedData.testimonials.items)) {
|
|
1198
|
+
fixedData.testimonials = { ...fixedData.testimonials, items: [] };
|
|
1199
|
+
}
|
|
1200
|
+
if (!fixedData.book_demo || typeof fixedData.book_demo !== 'object' || !Array.isArray(fixedData.book_demo.items)) {
|
|
1201
|
+
fixedData.book_demo = { ...fixedData.book_demo, items: [] };
|
|
1202
|
+
}
|
|
1203
|
+
if (!fixedData.partners || typeof fixedData.partners !== 'object' || !Array.isArray(fixedData.partners.items)) {
|
|
1204
|
+
fixedData.partners = { ...fixedData.partners, items: [] };
|
|
1205
|
+
}
|
|
1206
|
+
if (!fixedData.videos || typeof fixedData.videos !== 'object' || !Array.isArray(fixedData.videos.items)) {
|
|
1207
|
+
fixedData.videos = { ...fixedData.videos, items: [] };
|
|
1208
|
+
}
|
|
1209
|
+
if (!fixedData.integrations || typeof fixedData.integrations !== 'object' || !Array.isArray(fixedData.integrations.items)) {
|
|
1210
|
+
fixedData.integrations = { ...fixedData.integrations, items: [] };
|
|
1211
|
+
}
|
|
1212
|
+
if (!fixedData.usps || typeof fixedData.usps !== 'object' || !Array.isArray(fixedData.usps.items)) {
|
|
1213
|
+
fixedData.usps = { ...fixedData.usps, items: [] };
|
|
1214
|
+
}
|
|
1215
|
+
if (!fixedData.ctas || typeof fixedData.ctas !== 'object' || !Array.isArray(fixedData.ctas.items)) {
|
|
1216
|
+
fixedData.ctas = { ...fixedData.ctas, items: [] };
|
|
1217
|
+
}
|
|
1218
|
+
if (!fixedData.ab_tests || !Array.isArray(fixedData.ab_tests)) {
|
|
1219
|
+
fixedData.ab_tests = [];
|
|
1220
|
+
}
|
|
1221
|
+
if (!fixedData.guides || typeof fixedData.guides !== 'object' || !Array.isArray(fixedData.guides.items)) {
|
|
1222
|
+
fixedData.guides = { ...fixedData.guides, items: [] };
|
|
1223
|
+
}
|
|
1224
|
+
if (!fixedData.navbar || typeof fixedData.navbar !== 'object' || !Array.isArray(fixedData.navbar.items)) {
|
|
1225
|
+
fixedData.navbar = { ...fixedData.navbar, items: [] };
|
|
1226
|
+
}
|
|
1227
|
+
if (!fixedData.footer_links || typeof fixedData.footer_links !== 'object' || !Array.isArray(fixedData.footer_links.items)) {
|
|
1228
|
+
fixedData.footer_links = { ...fixedData.footer_links, items: [] };
|
|
1229
|
+
}
|
|
1230
|
+
if (!fixedData.contact_us || typeof fixedData.contact_us !== 'object') {
|
|
1231
|
+
fixedData.contact_us = { ...fixedData.contact_us };
|
|
1232
|
+
}
|
|
1233
|
+
if (!fixedData.contact_us.questions || !Array.isArray(fixedData.contact_us.questions)) {
|
|
1234
|
+
fixedData.contact_us.questions = [];
|
|
1235
|
+
}
|
|
1236
|
+
if (!fixedData.contact_us.hubspot || !Array.isArray(fixedData.contact_us.hubspot)) {
|
|
1237
|
+
fixedData.contact_us.hubspot = [];
|
|
1238
|
+
}
|
|
1239
|
+
this.form.patchValue(fixedData);
|
|
1194
1240
|
this.form.patchValue({
|
|
1195
1241
|
cs_product_id: this.productsList.find(x => x.id === this.data?.cs_product_id),
|
|
1196
1242
|
trial_product_id: this.productsList.find(x => x.id === this.data?.trial_product_id)
|
|
@@ -1198,26 +1244,26 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1198
1244
|
const navbarGroup = this.form.get('navbar');
|
|
1199
1245
|
const navbarItems = navbarGroup.get('items');
|
|
1200
1246
|
navbarItems.clear();
|
|
1201
|
-
(res.config?.navbar?.items
|
|
1247
|
+
(res.config?.navbar?.items ?? []).forEach(nav => {
|
|
1202
1248
|
navbarItems.push(this.fb.group({
|
|
1203
|
-
title: [nav.title
|
|
1204
|
-
path: [nav.path
|
|
1205
|
-
subtitles: this.fb.array((nav.subtitles
|
|
1206
|
-
title: [sub.title
|
|
1207
|
-
path: [sub.path
|
|
1249
|
+
title: [nav.title ?? ''],
|
|
1250
|
+
path: [nav.path ?? ''],
|
|
1251
|
+
subtitles: this.fb.array((nav.subtitles ?? []).map(sub => this.fb.group({
|
|
1252
|
+
title: [sub.title ?? ''],
|
|
1253
|
+
path: [sub.path ?? '']
|
|
1208
1254
|
})))
|
|
1209
1255
|
}));
|
|
1210
1256
|
});
|
|
1211
1257
|
const footerLinksGroup = this.form.get('footer_links');
|
|
1212
1258
|
const footerLinksItems = footerLinksGroup.get('items');
|
|
1213
1259
|
footerLinksItems.clear();
|
|
1214
|
-
(res.config?.footer_links?.items
|
|
1260
|
+
(res.config?.footer_links?.items ?? []).forEach(link => {
|
|
1215
1261
|
footerLinksItems.push(this.fb.group({
|
|
1216
|
-
title: [link?.title
|
|
1217
|
-
path: [link?.path
|
|
1218
|
-
subtitles: this.fb.array((link?.subtitles
|
|
1219
|
-
title: [sub?.title
|
|
1220
|
-
path: [sub?.path
|
|
1262
|
+
title: [link?.title ?? ''],
|
|
1263
|
+
path: [link?.path ?? ''],
|
|
1264
|
+
subtitles: this.fb.array((link?.subtitles ?? []).map(sub => this.fb.group({
|
|
1265
|
+
title: [sub?.title ?? ''],
|
|
1266
|
+
path: [sub?.path ?? '']
|
|
1221
1267
|
})))
|
|
1222
1268
|
}));
|
|
1223
1269
|
});
|
|
@@ -1233,12 +1279,12 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1233
1279
|
}
|
|
1234
1280
|
const abTestsArray = this.abTests;
|
|
1235
1281
|
abTestsArray.clear();
|
|
1236
|
-
(res.config?.ab_tests
|
|
1282
|
+
(res.config?.ab_tests ?? []).forEach(test => {
|
|
1237
1283
|
abTestsArray.push(this.fb.group({
|
|
1238
|
-
description: [test?.description
|
|
1239
|
-
experiment_name: [test?.experiment_name
|
|
1240
|
-
db_shard: [test?.db_shard
|
|
1241
|
-
microservice_name: [test?.microservice_name
|
|
1284
|
+
description: [test?.description ?? ''],
|
|
1285
|
+
experiment_name: [test?.experiment_name ?? ''],
|
|
1286
|
+
db_shard: [test?.db_shard ?? ''],
|
|
1287
|
+
microservice_name: [test?.microservice_name ?? '']
|
|
1242
1288
|
}));
|
|
1243
1289
|
});
|
|
1244
1290
|
})
|
|
@@ -1264,7 +1310,7 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1264
1310
|
}
|
|
1265
1311
|
searchProduct(event) {
|
|
1266
1312
|
this.productService
|
|
1267
|
-
.getProductList({ search: event?.query
|
|
1313
|
+
.getProductList({ search: event?.query ?? '' }, this.subscriptionId)
|
|
1268
1314
|
.subscribe(response => {
|
|
1269
1315
|
this.productsList = this.groupProducts(response.products);
|
|
1270
1316
|
});
|
|
@@ -1355,10 +1401,10 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1355
1401
|
subscription_id: this.subscriptionId,
|
|
1356
1402
|
...this.form.value
|
|
1357
1403
|
};
|
|
1358
|
-
data.cs_product_id = this.form.get('cs_product_id').value?.id
|
|
1359
|
-
data.trial_product_id = this.form.get('trial_product_id').value?.id
|
|
1360
|
-
data['cs_cta_iframe'] = this.form.value?.cs_cta_iframe
|
|
1361
|
-
data['trial_cta_iframe'] = this.form.value?.trial_cta_iframe
|
|
1404
|
+
data.cs_product_id = this.form.get('cs_product_id').value?.id ?? null;
|
|
1405
|
+
data.trial_product_id = this.form.get('trial_product_id').value?.id ?? null;
|
|
1406
|
+
data['cs_cta_iframe'] = this.form.value?.cs_cta_iframe ?? '';
|
|
1407
|
+
data['trial_cta_iframe'] = this.form.value?.trial_cta_iframe ?? '';
|
|
1362
1408
|
const sub$ = this.id
|
|
1363
1409
|
? this.adminService.updateDomainConfig(this.id, data)
|
|
1364
1410
|
: this.adminService.createDomainConfig(data);
|
|
@@ -1536,7 +1582,7 @@ class DomainConfigOrganizationComponent extends AppBaseComponent {
|
|
|
1536
1582
|
getDomainConfigDetails() {
|
|
1537
1583
|
this.isLoading = true;
|
|
1538
1584
|
this.adminService
|
|
1539
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1585
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1540
1586
|
.subscribe((response) => {
|
|
1541
1587
|
this.data = response;
|
|
1542
1588
|
this.form.patchValue(this.data);
|
|
@@ -1611,7 +1657,7 @@ class DomainConfigSecurityComponent extends AppBaseComponent {
|
|
|
1611
1657
|
getDomainConfigDetails() {
|
|
1612
1658
|
this.isLoading = true;
|
|
1613
1659
|
this.adminService
|
|
1614
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1660
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1615
1661
|
.subscribe((response) => {
|
|
1616
1662
|
this.data = response;
|
|
1617
1663
|
this.form.patchValue(this.data);
|
|
@@ -1686,7 +1732,7 @@ class DomainConfigSocialComponent extends AppBaseComponent {
|
|
|
1686
1732
|
getDomainConfigDetails() {
|
|
1687
1733
|
this.isLoading = true;
|
|
1688
1734
|
this.adminService
|
|
1689
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1735
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1690
1736
|
.subscribe(response => {
|
|
1691
1737
|
this.data = response;
|
|
1692
1738
|
this.form.patchValue(this.data);
|
|
@@ -1761,7 +1807,7 @@ class DomainConfigIntegrationsComponent extends AppBaseComponent {
|
|
|
1761
1807
|
getDomainConfigDetails() {
|
|
1762
1808
|
this.isLoading = true;
|
|
1763
1809
|
this.adminService
|
|
1764
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1810
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1765
1811
|
.subscribe((response) => {
|
|
1766
1812
|
this.data = response;
|
|
1767
1813
|
this.form.patchValue(this.data);
|
|
@@ -1853,7 +1899,7 @@ class DomainConfigInterfaceComponent extends AppBaseComponent {
|
|
|
1853
1899
|
getDomainConfigDetails() {
|
|
1854
1900
|
this.isLoading = true;
|
|
1855
1901
|
this.adminService
|
|
1856
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1902
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1857
1903
|
.subscribe((response) => {
|
|
1858
1904
|
this.data = response;
|
|
1859
1905
|
this.form.patchValue(this.data);
|
|
@@ -1954,7 +2000,7 @@ class DomainConfigDetailsComponent extends AppBaseComponent {
|
|
|
1954
2000
|
}
|
|
1955
2001
|
});
|
|
1956
2002
|
this.route.queryParams.subscribe(res => {
|
|
1957
|
-
this.activeTab = res['tabId']
|
|
2003
|
+
this.activeTab = res['tabId'] ?? 'Core';
|
|
1958
2004
|
});
|
|
1959
2005
|
}
|
|
1960
2006
|
onTabChange(event) {
|
|
@@ -2147,7 +2193,7 @@ class AddFaqComponent extends AppBaseComponent {
|
|
|
2147
2193
|
});
|
|
2148
2194
|
this.categoryForBadges = response.available_category.map(x => x.key);
|
|
2149
2195
|
this.categories = response.available_category.map(element => {
|
|
2150
|
-
return { label: element.name
|
|
2196
|
+
return { label: element.name ?? '', value: element.key };
|
|
2151
2197
|
});
|
|
2152
2198
|
this.allFaqs = this.faqs;
|
|
2153
2199
|
this.faqList = this.faqs;
|
|
@@ -2188,7 +2234,7 @@ class AddFaqComponent extends AppBaseComponent {
|
|
|
2188
2234
|
this.featureKeysList = featureKeys.map(element => {
|
|
2189
2235
|
return {
|
|
2190
2236
|
value: element,
|
|
2191
|
-
label: element
|
|
2237
|
+
label: element ?? ''
|
|
2192
2238
|
};
|
|
2193
2239
|
});
|
|
2194
2240
|
}
|
|
@@ -2331,7 +2377,7 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
2331
2377
|
this.categories = [];
|
|
2332
2378
|
this.commonService.getFaqCategories(this.subscriptionId).subscribe(response => {
|
|
2333
2379
|
this.categories = response.map(element => {
|
|
2334
|
-
return { label: element.name
|
|
2380
|
+
return { label: element.name ?? '', value: element.key };
|
|
2335
2381
|
});
|
|
2336
2382
|
});
|
|
2337
2383
|
}
|
|
@@ -2384,7 +2430,7 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
2384
2430
|
this.featureKeysList = featureKeys.map(element => {
|
|
2385
2431
|
return {
|
|
2386
2432
|
value: element,
|
|
2387
|
-
label: element
|
|
2433
|
+
label: element ?? ''
|
|
2388
2434
|
};
|
|
2389
2435
|
});
|
|
2390
2436
|
}
|
|
@@ -2535,7 +2581,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2535
2581
|
this.categoryForBadges = response.available_category.map(x => x.key);
|
|
2536
2582
|
categories.forEach(element => {
|
|
2537
2583
|
this.categories.push({
|
|
2538
|
-
label: element.name
|
|
2584
|
+
label: element.name ?? '',
|
|
2539
2585
|
value: element.key
|
|
2540
2586
|
});
|
|
2541
2587
|
});
|
|
@@ -2546,7 +2592,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2546
2592
|
/** Function to filter faq list */
|
|
2547
2593
|
filterFaq() {
|
|
2548
2594
|
if (this.searchText) {
|
|
2549
|
-
const searchedList = this.faqList.filter(faq => faq['question'].toLowerCase().includes(this.searchText.toLowerCase())
|
|
2595
|
+
const searchedList = this.faqList.filter(faq => faq['question'].toLowerCase().includes(this.searchText.toLowerCase()) ??
|
|
2550
2596
|
faq['answer'].toLowerCase().includes(this.searchText.toLowerCase()));
|
|
2551
2597
|
this.faqs = searchedList;
|
|
2552
2598
|
}
|
|
@@ -2574,7 +2620,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2574
2620
|
this.featureKeysList = featureKeys.map(element => {
|
|
2575
2621
|
return {
|
|
2576
2622
|
value: element,
|
|
2577
|
-
label: element
|
|
2623
|
+
label: element ?? ''
|
|
2578
2624
|
};
|
|
2579
2625
|
});
|
|
2580
2626
|
}
|
|
@@ -3314,7 +3360,7 @@ class LoginNotificationDetailsComponent extends AppBaseComponent {
|
|
|
3314
3360
|
this.form.patchValue({
|
|
3315
3361
|
visible_until: data?.visible_until ? new Date(data?.visible_until) : '',
|
|
3316
3362
|
visible_from: data?.visible_from ? new Date(data?.visible_from) : '',
|
|
3317
|
-
feature_keys: data?.feature_keys
|
|
3363
|
+
feature_keys: data?.feature_keys ?? [],
|
|
3318
3364
|
notification_type: data?.notification_type,
|
|
3319
3365
|
is_permanent: data?.is_permanent,
|
|
3320
3366
|
body: data?.body
|
|
@@ -4868,7 +4914,7 @@ class ProductDetailsComponent extends AppBaseComponent {
|
|
|
4868
4914
|
this.productsList = resp.products.map(element => {
|
|
4869
4915
|
return {
|
|
4870
4916
|
value: element.id,
|
|
4871
|
-
label: element.name
|
|
4917
|
+
label: element.name ?? ''
|
|
4872
4918
|
};
|
|
4873
4919
|
});
|
|
4874
4920
|
}
|
|
@@ -4918,7 +4964,7 @@ class ProductDetailsComponent extends AppBaseComponent {
|
|
|
4918
4964
|
if (response?.categories) {
|
|
4919
4965
|
response.categories.forEach(element => {
|
|
4920
4966
|
const item = {
|
|
4921
|
-
label: element
|
|
4967
|
+
label: element ?? '',
|
|
4922
4968
|
value: element
|
|
4923
4969
|
};
|
|
4924
4970
|
this.categories.push(item);
|
|
@@ -5221,7 +5267,7 @@ class ProductsListComponent extends AppBaseComponent {
|
|
|
5221
5267
|
this.featureKeysList = response.products.map(element => {
|
|
5222
5268
|
return {
|
|
5223
5269
|
value: element.feature_key,
|
|
5224
|
-
label: element.feature_key
|
|
5270
|
+
label: element.feature_key ?? ''
|
|
5225
5271
|
};
|
|
5226
5272
|
});
|
|
5227
5273
|
this.featureKeysList = uniqBy(this.featureKeysList, 'label');
|
|
@@ -5258,7 +5304,7 @@ class ProductsListComponent extends AppBaseComponent {
|
|
|
5258
5304
|
getCategories() {
|
|
5259
5305
|
this.productService.getProductCategories().subscribe(response => {
|
|
5260
5306
|
if (response?.categories) {
|
|
5261
|
-
this.categories = response?.categories
|
|
5307
|
+
this.categories = response?.categories ?? [];
|
|
5262
5308
|
}
|
|
5263
5309
|
});
|
|
5264
5310
|
}
|
|
@@ -5389,7 +5435,7 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5389
5435
|
}
|
|
5390
5436
|
this.route.params.subscribe(params => {
|
|
5391
5437
|
console.log(params['slug']);
|
|
5392
|
-
this.slug = params['slug']
|
|
5438
|
+
this.slug = params['slug'] ?? '';
|
|
5393
5439
|
if (this.slug !== 'create') {
|
|
5394
5440
|
this.getBlogItem(this.slug);
|
|
5395
5441
|
}
|
|
@@ -5511,53 +5557,65 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5511
5557
|
}
|
|
5512
5558
|
onUpdate() {
|
|
5513
5559
|
const data = { ...this.form.value };
|
|
5514
|
-
|
|
5560
|
+
this.handleRectangularPicture(data);
|
|
5561
|
+
this.handlePicture(data);
|
|
5562
|
+
this.handlePublishedAt(data);
|
|
5563
|
+
this.handleAcceptedAt(data);
|
|
5564
|
+
this.handleOptionalFields(data);
|
|
5565
|
+
this.handleRemovals(data);
|
|
5566
|
+
this.updatePost(data);
|
|
5567
|
+
}
|
|
5568
|
+
handleRectangularPicture(data) {
|
|
5515
5569
|
if (this.rectangularFile) {
|
|
5516
5570
|
data.rectangular_picture = this.rectangularFile;
|
|
5517
5571
|
}
|
|
5518
5572
|
else {
|
|
5519
5573
|
delete data.rectangular_picture;
|
|
5520
5574
|
}
|
|
5575
|
+
}
|
|
5576
|
+
handlePicture(data) {
|
|
5521
5577
|
if (this.file) {
|
|
5522
5578
|
data.picture = this.file;
|
|
5523
5579
|
}
|
|
5524
5580
|
else {
|
|
5525
5581
|
delete data.picture;
|
|
5526
5582
|
}
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
data.published_at = '';
|
|
5533
|
-
}
|
|
5583
|
+
}
|
|
5584
|
+
handlePublishedAt(data) {
|
|
5585
|
+
const control = this.form.get('published_at');
|
|
5586
|
+
if (control?.dirty) {
|
|
5587
|
+
data.published_at = control.value ? moment().format('DD-MMM-YYYY') : '';
|
|
5534
5588
|
}
|
|
5535
5589
|
else {
|
|
5536
5590
|
delete data.published_at;
|
|
5537
5591
|
}
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
data.accepted_at = '';
|
|
5544
|
-
}
|
|
5592
|
+
}
|
|
5593
|
+
handleAcceptedAt(data) {
|
|
5594
|
+
const control = this.form.get('accepted_at');
|
|
5595
|
+
if (control?.dirty) {
|
|
5596
|
+
data.accepted_at = control.value ? moment().format('DD-MMM-YYYY') : '';
|
|
5545
5597
|
}
|
|
5546
5598
|
else {
|
|
5547
5599
|
delete data.accepted_at;
|
|
5548
5600
|
}
|
|
5549
|
-
|
|
5601
|
+
}
|
|
5602
|
+
handleOptionalFields(data) {
|
|
5603
|
+
if (!this.form.get('when')?.value) {
|
|
5550
5604
|
data.when = '';
|
|
5551
5605
|
}
|
|
5552
|
-
if (!this.form.get('showcase')
|
|
5606
|
+
if (!this.form.get('showcase')?.value) {
|
|
5553
5607
|
data.showcase = '';
|
|
5554
5608
|
}
|
|
5609
|
+
}
|
|
5610
|
+
handleRemovals(data) {
|
|
5555
5611
|
if (!this.file && !this.image) {
|
|
5556
5612
|
data.remove_picture = true;
|
|
5557
5613
|
}
|
|
5558
5614
|
if (!this.rectangularFile && !this.rectangularImage) {
|
|
5559
5615
|
data.remove_rectangular_picture = true;
|
|
5560
5616
|
}
|
|
5617
|
+
}
|
|
5618
|
+
updatePost(data) {
|
|
5561
5619
|
this.postTags(this.blog.id);
|
|
5562
5620
|
this.adminService
|
|
5563
5621
|
.updatePost(data, this.id)
|
|
@@ -5621,7 +5679,7 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5621
5679
|
super.ngOnDestroy();
|
|
5622
5680
|
}
|
|
5623
5681
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourceAdminDetailsComponent, deps: [{ token: i1$1.NgbModal }, { token: i1.AdminService }, { token: i0.Injector }, { token: i1$2.TagService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5624
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourceAdminDetailsComponent, selector: "pw-resources-details-index", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"navigateToResourceList()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n Add or edit resource\n </h3>\n </div>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n *ngIf=\"!isLoading\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Title -->\n <pw-input-container [label]=\"'Label.Title' | transloco\"\n class=\"col-12\"\n name=\"title\"\n [errorMsg]=\"'Resource.Posts.Validation.Title' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"title\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <!-- Rich Text Editor -->\n <pw-input-container [label]=\"'Resource.Posts.Body' | transloco\"\n class=\"col-9 col-md-9 col-sm-12\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '500px' }\"\n class=\"quillEditor\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-3 col-sm-4 my-4\">\n <div class=\"text-center mb-4\">\n <label for=\"coverPicture\">{{ 'Resource.Posts.CoverPicture' | transloco }}</label>\n <div class=\"text-center text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image !== null && !image?.includes('default-photo.jpg') )? image : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n class=\"image w-100\" alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openModal(content)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteCoverImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Rectangular Picture -->\n <div class=\"text-center d-flex flex-column align-items-center\">\n <label for=\"rectangularPicture\">Rectangular Picture</label>\n <img\n [src]=\"(rectangularImage !== null && !rectangularImage?.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n (click)=\"openRectModal(rectContent)\"\n class=\"image rec-img\"\n [ngClass]=\"{ 'w-100': rectangularImage === null || rectangularImage?.includes('default-photo.jpg') }\"\n alt=\"Rectangular Picture\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"rectangularImage && !rectangularImage.includes('default-photo.jpg')\">\n </i>\n </div>\n\n </div>\n\n </div>\n <pw-input-container [label]=\"'Resource.Posts.CtaText' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"cta_text\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.ExternalUrl' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\"\n name=\"external_url\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"external_url\"\n [ngClass]=\"{ 'is-invalid': submitted && f['external_url'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.Tags' | transloco \" class=\"ui-fluid skills-modal col-12 col-md-4 col-sm-12 tags\"\n [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\" name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\" class=\"body-bg\" [suggestions]=\"tagsSuggestion\" dataKey=\"id\" field=\"name\"\n (completeMethod)=\"search($event)\" styleClass=\"w-100\" [minLength]=\"1\" [maxlength]=\"10\" [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\" placeholder=\"Tags\" [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <div>\n <p-calendar formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{'is-invalid': submitted && f['when'].errors}\">\n </p-calendar>\n </div>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.ShowCase' | transloco\"\n [label]=\"'Resource.Posts.ShowCase' | transloco\" name=\"showcase\">\n <ui-switch class=\"d-block\" formControlName=\"showcase\" name=\"showcase\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Published At -->\n <div class=\"col-12 col-md-2 col-sm-6\">\n\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.Published' | transloco\"\n [label]=\"'Resource.Posts.Published' | transloco\"\n name=\"published_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"published_at\"\n name=\"published_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Accepted At -->\n\n <div class=\"col-12 col-md-2 col-sm-6 accept-icon\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.AcceptedByAdmin' | transloco\"\n [label]=\"'Resource.Posts.AcceptedByAdmin' | transloco\"\n name=\"accepted_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"accepted_at\"\n name=\"accepted_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n </div>\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"navigateToResourceList()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"submitted\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n\n <div class=\"modal-body\">\n <small>\n You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)\n </small>\n\n\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n [dynamicData]=\"getAspectRatio()\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".col-md-6.display-grid{display:grid}body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container{width:100%}body .ui-inputtext{padding:0}.comment{border:1px solid rgb(238,238,238)}.is-invalid .ql-container.ql-snow,.is-invalid .ql-toolbar.ql-snow{border-color:#dc3545}.rec-img{max-width:100%;max-height:400px!important}.body-bg span .ui-autocomplete-multiple-container{background-color:#f5f7fa}.p-autocomplete .p-autocomplete-multiple-container .p-autocomplete-token{color:var(--tabs_text)}.tags .info-circle .tooltiptext:after{left:25px!important}.tags .info-circle .tooltiptext{left:-30px!important}.accept-icon .info-circle .tooltiptext:after{left:110px!important}.accept-icon .info-circle .tooltiptext{right:-85px!important}\n"], dependencies: [{ kind: "component", type: i4$3.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i8.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i9.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9$1.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
5682
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourceAdminDetailsComponent, selector: "pw-resources-details-index", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"navigateToResourceList()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n Add or edit resource\n </h3>\n </div>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n *ngIf=\"!isLoading\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Title -->\n <pw-input-container [label]=\"'Label.Title' | transloco\"\n class=\"col-12\"\n name=\"title\"\n [errorMsg]=\"'Resource.Posts.Validation.Title' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"title\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <!-- Rich Text Editor -->\n <pw-input-container [label]=\"'Resource.Posts.Body' | transloco\"\n class=\"col-9 col-md-9 col-sm-12\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '500px' }\"\n class=\"quillEditor\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-3 col-sm-4 my-4\">\n <div class=\"text-center mb-4\">\n <label for=\"coverPicture\">{{ 'Resource.Posts.CoverPicture' | transloco }}</label>\n <div class=\"text-center text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image !== null && !image?.includes('default-photo.jpg') )? image : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n class=\"image w-100\" alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openModal(content)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteCoverImage()\"\n (keydown.enter)=\"deleteCoverImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Rectangular Picture -->\n <div class=\"text-center d-flex flex-column align-items-center\">\n <label for=\"rectangularPicture\">Rectangular Picture</label>\n <img\n [src]=\"(rectangularImage !== null && !rectangularImage?.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n (click)=\"openRectModal(rectContent)\"\n class=\"image rec-img\"\n [ngClass]=\"{ 'w-100': rectangularImage === null || rectangularImage?.includes('default-photo.jpg') }\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"rectangularImage && !rectangularImage.includes('default-photo.jpg')\">\n </i>\n </div>\n\n </div>\n\n </div>\n <pw-input-container [label]=\"'Resource.Posts.CtaText' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"cta_text\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.ExternalUrl' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\"\n name=\"external_url\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"external_url\"\n [ngClass]=\"{ 'is-invalid': submitted && f['external_url'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.Tags' | transloco \" class=\"ui-fluid skills-modal col-12 col-md-4 col-sm-12 tags\"\n [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\" name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\" class=\"body-bg\" [suggestions]=\"tagsSuggestion\" dataKey=\"id\" field=\"name\"\n (completeMethod)=\"search($event)\" styleClass=\"w-100\" [minLength]=\"1\" [maxlength]=\"10\" [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\" placeholder=\"Tags\" [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <div>\n <p-calendar formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{'is-invalid': submitted && f['when'].errors}\">\n </p-calendar>\n </div>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.ShowCase' | transloco\"\n [label]=\"'Resource.Posts.ShowCase' | transloco\" name=\"showcase\">\n <ui-switch class=\"d-block\" formControlName=\"showcase\" name=\"showcase\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Published At -->\n <div class=\"col-12 col-md-2 col-sm-6\">\n\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.Published' | transloco\"\n [label]=\"'Resource.Posts.Published' | transloco\"\n name=\"published_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"published_at\"\n name=\"published_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Accepted At -->\n\n <div class=\"col-12 col-md-2 col-sm-6 accept-icon\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.AcceptedByAdmin' | transloco\"\n [label]=\"'Resource.Posts.AcceptedByAdmin' | transloco\"\n name=\"accepted_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"accepted_at\"\n name=\"accepted_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n </div>\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"navigateToResourceList()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"submitted\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n\n <div class=\"modal-body\">\n <small>\n You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)\n </small>\n\n\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n [dynamicData]=\"getAspectRatio()\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".col-md-6.display-grid{display:grid}body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container{width:100%}body .ui-inputtext{padding:0}.comment{border:1px solid rgb(238,238,238)}.is-invalid .ql-container.ql-snow,.is-invalid .ql-toolbar.ql-snow{border-color:#dc3545}.rec-img{max-width:100%;max-height:400px!important}.body-bg span .ui-autocomplete-multiple-container{background-color:#f5f7fa}.p-autocomplete .p-autocomplete-multiple-container .p-autocomplete-token{color:var(--tabs_text)}.tags .info-circle .tooltiptext:after{left:25px!important}.tags .info-circle .tooltiptext{left:-30px!important}.accept-icon .info-circle .tooltiptext:after{left:110px!important}.accept-icon .info-circle .tooltiptext{right:-85px!important}\n"], dependencies: [{ kind: "component", type: i4$3.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "variant"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i8.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepYearPicker", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "variant", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i9.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i9$1.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
5625
5683
|
}
|
|
5626
5684
|
__decorate([
|
|
5627
5685
|
ValidateForm('form'),
|
|
@@ -5631,7 +5689,7 @@ __decorate([
|
|
|
5631
5689
|
], ResourceAdminDetailsComponent.prototype, "onSave", null);
|
|
5632
5690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourceAdminDetailsComponent, decorators: [{
|
|
5633
5691
|
type: Component,
|
|
5634
|
-
args: [{ selector: 'pw-resources-details-index', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"navigateToResourceList()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n Add or edit resource\n </h3>\n </div>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n *ngIf=\"!isLoading\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Title -->\n <pw-input-container [label]=\"'Label.Title' | transloco\"\n class=\"col-12\"\n name=\"title\"\n [errorMsg]=\"'Resource.Posts.Validation.Title' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"title\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <!-- Rich Text Editor -->\n <pw-input-container [label]=\"'Resource.Posts.Body' | transloco\"\n class=\"col-9 col-md-9 col-sm-12\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '500px' }\"\n class=\"quillEditor\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-3 col-sm-4 my-4\">\n <div class=\"text-center mb-4\">\n <label for=\"coverPicture\">{{ 'Resource.Posts.CoverPicture' | transloco }}</label>\n <div class=\"text-center text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image !== null && !image?.includes('default-photo.jpg') )? image : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n class=\"image w-100\" alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openModal(content)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteCoverImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Rectangular Picture -->\n <div class=\"text-center d-flex flex-column align-items-center\">\n <label for=\"rectangularPicture\">Rectangular Picture</label>\n <img\n [src]=\"(rectangularImage !== null && !rectangularImage?.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n (click)=\"openRectModal(rectContent)\"\n class=\"image rec-img\"\n [ngClass]=\"{ 'w-100': rectangularImage === null || rectangularImage?.includes('default-photo.jpg') }\"\n alt=\"Rectangular Picture\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"rectangularImage && !rectangularImage.includes('default-photo.jpg')\">\n </i>\n </div>\n\n </div>\n\n </div>\n <pw-input-container [label]=\"'Resource.Posts.CtaText' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"cta_text\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.ExternalUrl' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\"\n name=\"external_url\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"external_url\"\n [ngClass]=\"{ 'is-invalid': submitted && f['external_url'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.Tags' | transloco \" class=\"ui-fluid skills-modal col-12 col-md-4 col-sm-12 tags\"\n [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\" name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\" class=\"body-bg\" [suggestions]=\"tagsSuggestion\" dataKey=\"id\" field=\"name\"\n (completeMethod)=\"search($event)\" styleClass=\"w-100\" [minLength]=\"1\" [maxlength]=\"10\" [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\" placeholder=\"Tags\" [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <div>\n <p-calendar formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{'is-invalid': submitted && f['when'].errors}\">\n </p-calendar>\n </div>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.ShowCase' | transloco\"\n [label]=\"'Resource.Posts.ShowCase' | transloco\" name=\"showcase\">\n <ui-switch class=\"d-block\" formControlName=\"showcase\" name=\"showcase\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Published At -->\n <div class=\"col-12 col-md-2 col-sm-6\">\n\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.Published' | transloco\"\n [label]=\"'Resource.Posts.Published' | transloco\"\n name=\"published_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"published_at\"\n name=\"published_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Accepted At -->\n\n <div class=\"col-12 col-md-2 col-sm-6 accept-icon\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.AcceptedByAdmin' | transloco\"\n [label]=\"'Resource.Posts.AcceptedByAdmin' | transloco\"\n name=\"accepted_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"accepted_at\"\n name=\"accepted_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n </div>\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"navigateToResourceList()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"submitted\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n\n <div class=\"modal-body\">\n <small>\n You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)\n </small>\n\n\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n [dynamicData]=\"getAspectRatio()\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".col-md-6.display-grid{display:grid}body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container{width:100%}body .ui-inputtext{padding:0}.comment{border:1px solid rgb(238,238,238)}.is-invalid .ql-container.ql-snow,.is-invalid .ql-toolbar.ql-snow{border-color:#dc3545}.rec-img{max-width:100%;max-height:400px!important}.body-bg span .ui-autocomplete-multiple-container{background-color:#f5f7fa}.p-autocomplete .p-autocomplete-multiple-container .p-autocomplete-token{color:var(--tabs_text)}.tags .info-circle .tooltiptext:after{left:25px!important}.tags .info-circle .tooltiptext{left:-30px!important}.accept-icon .info-circle .tooltiptext:after{left:110px!important}.accept-icon .info-circle .tooltiptext{right:-85px!important}\n"] }]
|
|
5692
|
+
args: [{ selector: 'pw-resources-details-index', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"navigateToResourceList()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n Add or edit resource\n </h3>\n </div>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"isLoading\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\"\n *ngIf=\"!isLoading\"\n (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Title -->\n <pw-input-container [label]=\"'Label.Title' | transloco\"\n class=\"col-12\"\n name=\"title\"\n [errorMsg]=\"'Resource.Posts.Validation.Title' | transloco\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"title\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <!-- Rich Text Editor -->\n <pw-input-container [label]=\"'Resource.Posts.Body' | transloco\"\n class=\"col-9 col-md-9 col-sm-12\"\n name=\"body\"\n [errorMsg]=\"'Resource.Posts.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '500px' }\"\n class=\"quillEditor\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{\n 'w-100': true,\n 'quill-container': true,\n 'is-invalid': submitted && f['body'].errors\n }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-3 col-sm-4 my-4\">\n <div class=\"text-center mb-4\">\n <label for=\"coverPicture\">{{ 'Resource.Posts.CoverPicture' | transloco }}</label>\n <div class=\"text-center text-center d-flex flex-column align-items-center\">\n <img [src]=\"(image !== null && !image?.includes('default-photo.jpg') )? image : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openModal(content)\"\n (click)=\"openModal(content)\"\n class=\"image w-100\" alt=\"Modal\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openModal(content)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteCoverImage()\"\n (keydown.enter)=\"deleteCoverImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Rectangular Picture -->\n <div class=\"text-center d-flex flex-column align-items-center\">\n <label for=\"rectangularPicture\">Rectangular Picture</label>\n <img\n [src]=\"(rectangularImage !== null && !rectangularImage?.includes('default-photo.jpg')) ? rectangularImage : 'assets/img/resource/blog.png'\"\n (keydown.enter)=\"openRectModal(rectContent)\"\n (click)=\"openRectModal(rectContent)\"\n class=\"image rec-img\"\n [ngClass]=\"{ 'w-100': rectangularImage === null || rectangularImage?.includes('default-photo.jpg') }\"\n alt=\"Uploaded rectangular media preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a class=\"d-inline-block\" (click)=\"openRectModal(rectContent)\">\n {{ slug !== 'create' ? 'Edit' : 'Add' }} Picture\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteRectangularImage()\"\n (keydown.enter)=\"deleteRectangularImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"rectangularImage && !rectangularImage.includes('default-photo.jpg')\">\n </i>\n </div>\n\n </div>\n\n </div>\n <pw-input-container [label]=\"'Resource.Posts.CtaText' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\"\n name=\"cta_text\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"cta_text\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.ExternalUrl' | transloco\"\n class=\"col-12 col-md-6\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.ExternalUrl' | transloco\"\n name=\"external_url\">\n <input type=\"text\"\n class=\"form-control\"\n formControlName=\"external_url\"\n [ngClass]=\"{ 'is-invalid': submitted && f['external_url'].errors }\" />\n </pw-input-container>\n\n <pw-input-container [label]=\"'Resource.Posts.Tags' | transloco \" class=\"ui-fluid skills-modal col-12 col-md-4 col-sm-12 tags\"\n [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.CtaText' | transloco\" name=\"cta_text\">\n <p-autoComplete [(ngModel)]=\"selectedTags\" class=\"body-bg\" [suggestions]=\"tagsSuggestion\" dataKey=\"id\" field=\"name\"\n (completeMethod)=\"search($event)\" styleClass=\"w-100\" [minLength]=\"1\" [maxlength]=\"10\" [dropdown]=\"true\"\n [ngModelOptions]=\"{ standalone: true }\" placeholder=\"Tags\" [multiple]=\"true\">\n </p-autoComplete>\n </pw-input-container>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [label]=\"'Resource.Posts.When' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.When' | transloco\"\n name=\"when\">\n <div>\n <p-calendar formControlName=\"when\"\n [showIcon]=\"true\"\n dateFormat=\"dd-M-yy\"\n [placeholder]=\"'Select Date'\"\n [ngClass]=\"{'is-invalid': submitted && f['when'].errors}\">\n </p-calendar>\n </div>\n </pw-input-container>\n </div>\n </div>\n\n <div class=\"col-12 col-md-2 col-sm-6\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\" [tooltipText]=\"'Resource.Posts.Tooltip.ShowCase' | transloco\"\n [label]=\"'Resource.Posts.ShowCase' | transloco\" name=\"showcase\">\n <ui-switch class=\"d-block\" formControlName=\"showcase\" name=\"showcase\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Published At -->\n <div class=\"col-12 col-md-2 col-sm-6\">\n\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.Published' | transloco\"\n [label]=\"'Resource.Posts.Published' | transloco\"\n name=\"published_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"published_at\"\n name=\"published_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <!--Accepted At -->\n\n <div class=\"col-12 col-md-2 col-sm-6 accept-icon\">\n <div class=\"mb-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Resource.Posts.Tooltip.AcceptedByAdmin' | transloco\"\n [label]=\"'Resource.Posts.AcceptedByAdmin' | transloco\"\n name=\"accepted_at\">\n <ui-switch class=\"d-block\"\n formControlName=\"accepted_at\"\n name=\"accepted_at\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n </div>\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"navigateToResourceList()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"submitted\"\n class=\"btn btn-primary\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #content\n let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n\n </button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)</small>\n <pw-image-cropper #profile\n aspectRatio=\"auto\"\n (imageSelectionEvent)=\"onImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n\n<ng-template #rectContent let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Picture</h5>\n <button type=\"button\"\n class=\"btn-close float-end\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss()\">\n </button>\n </div>\n\n <div class=\"modal-body\">\n <small>\n You can upload a JPG, GIF, or PNG file. (Do not upload pictures containing celebrities,\n nudity, artwork or copyrighted images.)\n </small>\n\n\n <pw-image-cropper\n #profile\n [aspectRatio]=\"'dynamic'\"\n [dynamicData]=\"getAspectRatio()\"\n (imageSelectionEvent)=\"onRectangularImageSelection($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: [".col-md-6.display-grid{display:grid}body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container{width:100%}body .ui-inputtext{padding:0}.comment{border:1px solid rgb(238,238,238)}.is-invalid .ql-container.ql-snow,.is-invalid .ql-toolbar.ql-snow{border-color:#dc3545}.rec-img{max-width:100%;max-height:400px!important}.body-bg span .ui-autocomplete-multiple-container{background-color:#f5f7fa}.p-autocomplete .p-autocomplete-multiple-container .p-autocomplete-token{color:var(--tabs_text)}.tags .info-circle .tooltiptext:after{left:25px!important}.tags .info-circle .tooltiptext{left:-30px!important}.accept-icon .info-circle .tooltiptext:after{left:110px!important}.accept-icon .info-circle .tooltiptext{right:-85px!important}\n"] }]
|
|
5635
5693
|
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i1.AdminService }, { type: i0.Injector }, { type: i1$2.TagService }], propDecorators: { onSave: [] } });
|
|
5636
5694
|
|
|
5637
5695
|
class ResourcesAdminIndexComponent extends AppBaseComponent {
|
|
@@ -5787,11 +5845,11 @@ class ResourcesIndexComponent extends AppBaseComponent {
|
|
|
5787
5845
|
super.ngOnDestroy();
|
|
5788
5846
|
}
|
|
5789
5847
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcesIndexComponent, deps: [{ token: i1.AdminService }, { token: i1$2.TagService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5790
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcesIndexComponent, selector: "pw-resources-index", usesInheritance: true, ngImport: i0, template: "\n<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">{{'Resource.Posts.Title' | transloco}}</h2>\n <button *rbacAllow=\"blogPermission\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createResource]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Resource.Add' | transloco}}\n </button>\n </div>\n </div>\n <div class=\"col-12 mb-3\">\n <p [innerHTML]=\"'Resource.Description' | transloco\"></p>\n </div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.posts\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-filter\">\n <div class=\"col-sm-4\">\n <p-multiSelect\n [showToggleAll]=\"true\"\n [options]=\"tagOptions\"\n [(ngModel)]=\"selectedTags\"\n (onChange)=\"onTagChange($event)\"\n placeholder=\"Search by Tags\"\n [showHeader]=\"true\"\n maxSelectedLabels=\"2\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchTextItems\"\n pInputText\n size=\"50\"\n placeholder=\"Search Resources...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n style=\"max-width: 90%\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Resource.Posts.Author' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Label.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\">\n {{ 'Resource.Posts.Tags' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"showcase\">\n {{ 'Resource.Posts.Showcase' | transloco }}\n <p-sortIcon field=\"showcase\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"when\">\n {{ 'Resource.Posts.When' | transloco }}\n <p-sortIcon field=\"when\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"published_at\">\n {{ 'Resource.Posts.PublishedAt' | transloco }}\n <p-sortIcon field=\"published_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"accepted_at\">\n {{ 'Resource.Posts.AcceptedAt' | transloco }}\n <p-sortIcon field=\"accepted_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"view\">\n {{ 'Resource.Posts.View' | transloco }}\n <p-sortIcon field=\"view\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/members', item.author?.slug]\"\n class=\"d-flex align-items-center\">\n <img *ngIf=\"item.author?.avatar\"\n [src]=\"item.author?.avatar[0].url\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <img *ngIf=\"!item.author?.avatar\"\n src=\"assets/img/icons/male.png\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <span class=\"ms-2\">{{ item.author | ifNameNullShowEmail }}</span>\n </a>\n </td>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/resources/view', item?.slug]\"\n target=\"_blank\">{{ item.title }}</a>\n </td>\n <td data-head=\"tags\">\n <span *ngFor=\"let tag of item?.tags?.slice(0, 3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\">{{ tag.name }}</span>\n\n <span *ngIf=\"item.expandedTags\">\n <span *ngFor=\"let tag of item?.tags?.slice(3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\" >{{ tag.name }}</span>\n </span>\n\n <span *ngIf=\"item?.tags?.length > 3\" class=\"fw-bold\">\n <a (click)=\"item.expandedTags = !item.expandedTags\">\n <span>...</span>\n </a>\n </span>\n </td>\n\n <td data-head=\"showcase\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.showcase }\"\n [ngClass]=\"item?.showcase ? 'bg-success' : 'bg-secondary'\"\n class=\"badge\">{{ !!item?.showcase }}</span>\n </td>\n <td data-head=\"when\">{{ item.when | dateFormat }}</td>\n <td data-head=\"Published At\">{{ item.published_at | dateFormat }}</td>\n <td data-head=\"Accepted At\">{{ item.accepted_at | dateFormat }}</td>\n <td data-head=\"View\">{{ item.view }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (click)=\"navigateToResourceDetails(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"onDeletePost(item)\"\n (click)=\"onDeletePost(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Insight\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"isBlogAdmin\"\n [routerLink]=\"[\n '/' + routers.resourcesList + item.id + '/insight'\n ]\"\n [queryParams]=\"{ insight_name: item?.title }\">\n <i class=\"fa fa-fw fa-list fa-lg\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span *ngIf=\"data.object_count !== 0\" class=\"total-records-count\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n <div *ngIf=\"data.object_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n</div>\n<div class=\"col-12 text-center\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.Posts.NoDataMessage' | transloco\"\n *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n </pw-no-data>\n</div>\n", dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$4.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
5848
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ResourcesIndexComponent, selector: "pw-resources-index", usesInheritance: true, ngImport: i0, template: "\n<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">{{'Resource.Posts.Title' | transloco}}</h2>\n <button *rbacAllow=\"blogPermission\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createResource]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Resource.Add' | transloco}}\n </button>\n </div>\n </div>\n <div class=\"col-12 mb-3\">\n <p [innerHTML]=\"'Resource.Description' | transloco\"></p>\n </div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.posts\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-filter\">\n <div class=\"col-sm-4\">\n <p-multiSelect\n [showToggleAll]=\"true\"\n [options]=\"tagOptions\"\n [(ngModel)]=\"selectedTags\"\n (onChange)=\"onTagChange($event)\"\n placeholder=\"Search by Tags\"\n [showHeader]=\"true\"\n maxSelectedLabels=\"2\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchTextItems\"\n pInputText\n size=\"50\"\n placeholder=\"Search Resources...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n style=\"max-width: 90%\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Resource.Posts.Author' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Label.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\">\n {{ 'Resource.Posts.Tags' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"showcase\">\n {{ 'Resource.Posts.Showcase' | transloco }}\n <p-sortIcon field=\"showcase\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"when\">\n {{ 'Resource.Posts.When' | transloco }}\n <p-sortIcon field=\"when\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"published_at\">\n {{ 'Resource.Posts.PublishedAt' | transloco }}\n <p-sortIcon field=\"published_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"accepted_at\">\n {{ 'Resource.Posts.AcceptedAt' | transloco }}\n <p-sortIcon field=\"accepted_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"view\">\n {{ 'Resource.Posts.View' | transloco }}\n <p-sortIcon field=\"view\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/members', item.author?.slug]\"\n class=\"d-flex align-items-center\">\n <img *ngIf=\"item.author?.avatar\"\n [src]=\"item.author?.avatar[0].url\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <img *ngIf=\"!item.author?.avatar\"\n src=\"assets/img/icons/male.png\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <span class=\"ms-2\">{{ item.author | ifNameNullShowEmail }}</span>\n </a>\n </td>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/resources/view', item?.slug]\"\n target=\"_blank\">{{ item.title }}</a>\n </td>\n <td data-head=\"tags\">\n <span *ngFor=\"let tag of item?.tags?.slice(0, 3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\">{{ tag.name }}</span>\n\n <span *ngIf=\"item.expandedTags\">\n <span *ngFor=\"let tag of item?.tags?.slice(3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\" >{{ tag.name }}</span>\n </span>\n\n <span *ngIf=\"item?.tags?.length > 3\" class=\"fw-bold\">\n <a (click)=\"item.expandedTags = !item.expandedTags\">\n <span>...</span>\n </a>\n </span>\n </td>\n\n <td data-head=\"showcase\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.showcase }\"\n [ngClass]=\"item?.showcase ? 'bg-success' : 'bg-secondary'\"\n class=\"badge\">{{ !!item?.showcase }}</span>\n </td>\n <td data-head=\"when\">{{ item.when | dateFormat }}</td>\n <td data-head=\"Published At\">{{ item.published_at | dateFormat }}</td>\n <td data-head=\"Accepted At\">{{ item.accepted_at | dateFormat }}</td>\n <td data-head=\"View\">{{ item.view }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"navigateToResourceDetails(item)\"\n (click)=\"navigateToResourceDetails(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"onDeletePost(item)\"\n (click)=\"onDeletePost(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Insight\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"isBlogAdmin\"\n [routerLink]=\"[\n '/' + routers.resourcesList + item.id + '/insight'\n ]\"\n [queryParams]=\"{ insight_name: item?.title }\">\n <i class=\"fa fa-fw fa-list fa-lg\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span *ngIf=\"data.object_count !== 0\" class=\"total-records-count\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n <div *ngIf=\"data.object_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n</div>\n<div class=\"col-12 text-center\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.Posts.NoDataMessage' | transloco\"\n *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n </pw-no-data>\n</div>\n", dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i4$4.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
5791
5849
|
}
|
|
5792
5850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcesIndexComponent, decorators: [{
|
|
5793
5851
|
type: Component,
|
|
5794
|
-
args: [{ selector: 'pw-resources-index', template: "\n<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">{{'Resource.Posts.Title' | transloco}}</h2>\n <button *rbacAllow=\"blogPermission\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createResource]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Resource.Add' | transloco}}\n </button>\n </div>\n </div>\n <div class=\"col-12 mb-3\">\n <p [innerHTML]=\"'Resource.Description' | transloco\"></p>\n </div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.posts\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-filter\">\n <div class=\"col-sm-4\">\n <p-multiSelect\n [showToggleAll]=\"true\"\n [options]=\"tagOptions\"\n [(ngModel)]=\"selectedTags\"\n (onChange)=\"onTagChange($event)\"\n placeholder=\"Search by Tags\"\n [showHeader]=\"true\"\n maxSelectedLabels=\"2\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchTextItems\"\n pInputText\n size=\"50\"\n placeholder=\"Search Resources...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n style=\"max-width: 90%\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Resource.Posts.Author' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Label.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\">\n {{ 'Resource.Posts.Tags' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"showcase\">\n {{ 'Resource.Posts.Showcase' | transloco }}\n <p-sortIcon field=\"showcase\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"when\">\n {{ 'Resource.Posts.When' | transloco }}\n <p-sortIcon field=\"when\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"published_at\">\n {{ 'Resource.Posts.PublishedAt' | transloco }}\n <p-sortIcon field=\"published_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"accepted_at\">\n {{ 'Resource.Posts.AcceptedAt' | transloco }}\n <p-sortIcon field=\"accepted_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"view\">\n {{ 'Resource.Posts.View' | transloco }}\n <p-sortIcon field=\"view\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/members', item.author?.slug]\"\n class=\"d-flex align-items-center\">\n <img *ngIf=\"item.author?.avatar\"\n [src]=\"item.author?.avatar[0].url\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <img *ngIf=\"!item.author?.avatar\"\n src=\"assets/img/icons/male.png\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <span class=\"ms-2\">{{ item.author | ifNameNullShowEmail }}</span>\n </a>\n </td>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/resources/view', item?.slug]\"\n target=\"_blank\">{{ item.title }}</a>\n </td>\n <td data-head=\"tags\">\n <span *ngFor=\"let tag of item?.tags?.slice(0, 3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\">{{ tag.name }}</span>\n\n <span *ngIf=\"item.expandedTags\">\n <span *ngFor=\"let tag of item?.tags?.slice(3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\" >{{ tag.name }}</span>\n </span>\n\n <span *ngIf=\"item?.tags?.length > 3\" class=\"fw-bold\">\n <a (click)=\"item.expandedTags = !item.expandedTags\">\n <span>...</span>\n </a>\n </span>\n </td>\n\n <td data-head=\"showcase\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.showcase }\"\n [ngClass]=\"item?.showcase ? 'bg-success' : 'bg-secondary'\"\n class=\"badge\">{{ !!item?.showcase }}</span>\n </td>\n <td data-head=\"when\">{{ item.when | dateFormat }}</td>\n <td data-head=\"Published At\">{{ item.published_at | dateFormat }}</td>\n <td data-head=\"Accepted At\">{{ item.accepted_at | dateFormat }}</td>\n <td data-head=\"View\">{{ item.view }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (click)=\"navigateToResourceDetails(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"onDeletePost(item)\"\n (click)=\"onDeletePost(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Insight\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"isBlogAdmin\"\n [routerLink]=\"[\n '/' + routers.resourcesList + item.id + '/insight'\n ]\"\n [queryParams]=\"{ insight_name: item?.title }\">\n <i class=\"fa fa-fw fa-list fa-lg\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span *ngIf=\"data.object_count !== 0\" class=\"total-records-count\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n <div *ngIf=\"data.object_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n</div>\n<div class=\"col-12 text-center\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.Posts.NoDataMessage' | transloco\"\n *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n </pw-no-data>\n</div>\n" }]
|
|
5852
|
+
args: [{ selector: 'pw-resources-index', template: "\n<div class=\"row\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">{{'Resource.Posts.Title' | transloco}}</h2>\n <button *rbacAllow=\"blogPermission\"\n class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createResource]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{'Resource.Add' | transloco}}\n </button>\n </div>\n </div>\n <div class=\"col-12 mb-3\">\n <p [innerHTML]=\"'Resource.Description' | transloco\"></p>\n </div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.posts\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-filter\">\n <div class=\"col-sm-4\">\n <p-multiSelect\n [showToggleAll]=\"true\"\n [options]=\"tagOptions\"\n [(ngModel)]=\"selectedTags\"\n (onChange)=\"onTagChange($event)\"\n placeholder=\"Search by Tags\"\n [showHeader]=\"true\"\n maxSelectedLabels=\"2\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchTextItems\"\n pInputText\n size=\"50\"\n placeholder=\"Search Resources...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n style=\"max-width: 90%\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Resource.Posts.Author' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Label.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\">\n {{ 'Resource.Posts.Tags' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"showcase\">\n {{ 'Resource.Posts.Showcase' | transloco }}\n <p-sortIcon field=\"showcase\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"when\">\n {{ 'Resource.Posts.When' | transloco }}\n <p-sortIcon field=\"when\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"published_at\">\n {{ 'Resource.Posts.PublishedAt' | transloco }}\n <p-sortIcon field=\"published_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"accepted_at\">\n {{ 'Resource.Posts.AcceptedAt' | transloco }}\n <p-sortIcon field=\"accepted_at\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"view\">\n {{ 'Resource.Posts.View' | transloco }}\n <p-sortIcon field=\"view\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/members', item.author?.slug]\"\n class=\"d-flex align-items-center\">\n <img *ngIf=\"item.author?.avatar\"\n [src]=\"item.author?.avatar[0].url\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <img *ngIf=\"!item.author?.avatar\"\n src=\"assets/img/icons/male.png\"\n alt=\"author\"\n width=\"25\"\n class=\"img-fluid\" />\n <span class=\"ms-2\">{{ item.author | ifNameNullShowEmail }}</span>\n </a>\n </td>\n <td data-head=\"Title\">\n <a [routerLink]=\"['/resources/view', item?.slug]\"\n target=\"_blank\">{{ item.title }}</a>\n </td>\n <td data-head=\"tags\">\n <span *ngFor=\"let tag of item?.tags?.slice(0, 3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\">{{ tag.name }}</span>\n\n <span *ngIf=\"item.expandedTags\">\n <span *ngFor=\"let tag of item?.tags?.slice(3)\"\n class=\"badge m-1\"\n [appDynamicBadge]=\"{ itemsArray: item?.tags, item: tag }\"\n [colorByName]=\"true\"\n [dataName]=\"tag.name\"\n color=\"cyan\" >{{ tag.name }}</span>\n </span>\n\n <span *ngIf=\"item?.tags?.length > 3\" class=\"fw-bold\">\n <a (click)=\"item.expandedTags = !item.expandedTags\">\n <span>...</span>\n </a>\n </span>\n </td>\n\n <td data-head=\"showcase\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.showcase }\"\n [ngClass]=\"item?.showcase ? 'bg-success' : 'bg-secondary'\"\n class=\"badge\">{{ !!item?.showcase }}</span>\n </td>\n <td data-head=\"when\">{{ item.when | dateFormat }}</td>\n <td data-head=\"Published At\">{{ item.published_at | dateFormat }}</td>\n <td data-head=\"Accepted At\">{{ item.accepted_at | dateFormat }}</td>\n <td data-head=\"View\">{{ item.view }}</td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"navigateToResourceDetails(item)\"\n (click)=\"navigateToResourceDetails(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"blogPermission\"\n (keydown.enter)=\"onDeletePost(item)\"\n (click)=\"onDeletePost(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Insight\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"isBlogAdmin\"\n [routerLink]=\"[\n '/' + routers.resourcesList + item.id + '/insight'\n ]\"\n [queryParams]=\"{ insight_name: item?.title }\">\n <i class=\"fa fa-fw fa-list fa-lg\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span *ngIf=\"data.object_count !== 0\" class=\"total-records-count\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n <div *ngIf=\"data.object_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n</div>\n<div class=\"col-12 text-center\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Resource.Posts.NoDataMessage' | transloco\"\n *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n </pw-no-data>\n</div>\n" }]
|
|
5795
5853
|
}], ctorParameters: () => [{ type: i1.AdminService }, { type: i1$2.TagService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }] });
|
|
5796
5854
|
|
|
5797
5855
|
class ResourcesInsightComponent extends AppBaseComponent {
|
|
@@ -5918,7 +5976,7 @@ class AgentDetailsComponent extends AppBaseComponent {
|
|
|
5918
5976
|
month: Number(endDate.substring(5, 7)),
|
|
5919
5977
|
day: Number(endDate.substring(8, 10))
|
|
5920
5978
|
};
|
|
5921
|
-
response.subscription_agent.user.displayName = `${res?.user?.first_name} ${res?.user?.last_name
|
|
5979
|
+
response.subscription_agent.user.displayName = `${res?.user?.first_name} ${res?.user?.last_name ?? ''} ${res?.user?.email}`.trim();
|
|
5922
5980
|
this.agentDetails = response.subscription_agent;
|
|
5923
5981
|
this.form.patchValue(response.subscription_agent);
|
|
5924
5982
|
this.form.patchValue({ end_date: dobObject });
|
|
@@ -5949,8 +6007,8 @@ class AgentDetailsComponent extends AppBaseComponent {
|
|
|
5949
6007
|
.subscribe(response => {
|
|
5950
6008
|
this.allUsers = response.users;
|
|
5951
6009
|
this.allUsers.forEach(member => {
|
|
5952
|
-
const firstName = member.first_name
|
|
5953
|
-
const lastName = member.last_name
|
|
6010
|
+
const firstName = member.first_name ?? '';
|
|
6011
|
+
const lastName = member.last_name ?? '';
|
|
5954
6012
|
member.displayName = `${firstName} ${lastName} ${member.email}`.trim();
|
|
5955
6013
|
});
|
|
5956
6014
|
});
|
|
@@ -6017,7 +6075,7 @@ class SubscriptionProductsComponent extends AppBaseComponent {
|
|
|
6017
6075
|
this.subscriptionService
|
|
6018
6076
|
.getById(this.id)
|
|
6019
6077
|
.subscribe(response => {
|
|
6020
|
-
this.subscriptionProducts = response?.products
|
|
6078
|
+
this.subscriptionProducts = response?.products ?? [];
|
|
6021
6079
|
this.totalRecords = response?.products?.length;
|
|
6022
6080
|
this.totalRecordsUnFiltered = response.unfiltered_count;
|
|
6023
6081
|
})
|
|
@@ -6207,6 +6265,7 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6207
6265
|
this.totalUnfilteredCount = 0;
|
|
6208
6266
|
this.hasAccess = false;
|
|
6209
6267
|
this.isAddEnabled = false;
|
|
6268
|
+
this.isUserSubscriptionSuperAdmin = this.permissionService.isUserSubscriptionSuperAdmin();
|
|
6210
6269
|
}
|
|
6211
6270
|
ngOnInit() {
|
|
6212
6271
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
@@ -6339,15 +6398,15 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6339
6398
|
this.subscriptionService
|
|
6340
6399
|
.getEnrolledSubscription(this.id, paging)
|
|
6341
6400
|
.subscribe(response => {
|
|
6342
|
-
this.subscriptionMembers = response?.members
|
|
6343
|
-
this.subscriptionAdmins = response?.admins
|
|
6401
|
+
this.subscriptionMembers = response?.members ?? [];
|
|
6402
|
+
this.subscriptionAdmins = response?.admins ?? [];
|
|
6344
6403
|
this.subscriptionOwnerUserId = response?.owner_id;
|
|
6345
6404
|
this.totalRecords = response?.members.length;
|
|
6346
6405
|
this.totalUnfilteredCount = response.unfiltered_count;
|
|
6347
|
-
this.
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6406
|
+
const isAdmin = response?.admins?.includes(this.user?.id) ?? false;
|
|
6407
|
+
const isOwner = this.user?.id === this.subscriptionOwnerUserId;
|
|
6408
|
+
const isSuperAdmin = this.permissionService.isSuperAdmin();
|
|
6409
|
+
this.hasAccess = [isAdmin, isOwner, isSuperAdmin].some(Boolean);
|
|
6351
6410
|
})
|
|
6352
6411
|
.add(() => {
|
|
6353
6412
|
this.isLoaded = true;
|
|
@@ -6355,11 +6414,11 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6355
6414
|
});
|
|
6356
6415
|
}
|
|
6357
6416
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionUsersComponent, deps: [{ token: i1$2.SubscriptionService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i1$2.AuthService }, { token: i1$2.WindowService }, { token: i1.AdminService }, { token: i1$2.CustomToastService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionUsersComponent, selector: "pw-subscription-users", viewQueries: [{ propertyName: "passwordValidationModalForImpersonate", first: true, predicate: ["passwordValidationModalForImpersonate"], descendants: true }, { propertyName: "passwordValidationModalForUserDelete", first: true, predicate: ["passwordValidationModalForUserDelete"], descendants: true }, { propertyName: "passwordValidationModalForRemove2fa", first: true, predicate: ["passwordValidationModalForRemove2fa"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"w-100 text-center mt-3\">\n\t<ng-template [ngIf]=\"!isLoaded\">\n\t\t<p-progressSpinner></p-progressSpinner>\n\t</ng-template>\n</div>\n<div class=\"text-end mb-2\" *ngIf=\"hasAccess && !isAddEnabled\">\n\t<button class=\"btn btn-sm btn-outline-primary\" (click)=\"isAddEnabled = true\">\n\t <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n\t</button>\n </div>\n <section id=\"members\"\n *ngIf=\"!isAddEnabled\">\n<div [class.hideTable]=\"totalUnfilteredCount === 0\"\n\tclass=\"primeng-datatable-container table-responsive mt-0\">\n\t<p-table #dt\n\t\t[value]=\"subscriptionMembers\"\n\t\t[paginator]=\"totalRecords !== 0\"\n\t\t[rows]=\"PAGE_SIZE\"\n\t\t[lazy]=\"true\"\n\t\t[totalRecords]=\"totalRecords\"\n\t\t[loading]=\"loading\"\n\t\t[filterDelay]=\"1000\"\n\t\t[customSort]=\"true\"\n\t\t(onLazyLoad)=\"onLazyLoad($event)\">\n\t\t<ng-template pTemplate=\"caption\">\n\t\t\t<div class=\"text-end\">\n\t\t\t\t<i class=\"fa fa-search mt-2 me-2\"\n\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t<input [(ngModel)]=\"searchText\"\n\t\t\t\t\t(input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tpInputText\n\t\t\t\t\tsize=\"50\"\n\t\t\t\t\tplaceholder=\"Search subscription users...\"\n\t\t\t\t\tclass=\"mw-90\">\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"id\">\n\t\t\t\t\t{{ 'Admin.Users.Id' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"id\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"first_name\">\n\t\t\t\t\t{{ 'Label.FirstName' | transloco }}\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_name\">\n\t\t\t\t\t{{ 'Label.LastName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_name\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"email\">\n\t\t\t\t\t{{ 'Label.Email' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"email\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"slug\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.NickName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"slug\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"has_password\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.EmailConfirmed' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"has_password\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_sign_in_at\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.LastLogin' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_sign_in_at\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\">\n\t\t\t\t\t{{ 'Label.Actions' | transloco }}\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"body\"\n\t\t\tlet-user>\n\t\t\t<tr>\n\t\t\t\t<td data-head=\"Id\">{{ user.id }}</td>\n\t\t\t\t<td data-head=\"First Name\">\n\t\t\t\t\t<span class=\"first-name\">{{ user.first_name }}</span>\n\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId === user.id\">\n\t\t\t\t\t\t<span *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Subscription Owner\">\n\t\t\t\t\t\t\t<i class=\"info-icon fas fa-user-tie success\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<span class=\"badge bg-success mx-1 admin-badge\" *ngIf=\"subscriptionAdmins?.includes(user?.id)\"> Admin </span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Name\">\n\t\t\t\t\t{{ user.last_name }}\n\t\t\t\t\t<span *ngIf=\"user?.alpha\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.AlphaIcon'|transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-a alpha-beta text-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.beta\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.BetaIcon'|transloco\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-b alpha-beta text-primary\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.cognito_sso_activated\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.Cognito' | transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa fa-cloud success\" ></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email\">{{ user.email }}</td>\n\t\t\t\t<td data-head=\"Nick Name\">\n\t\t\t\t\t<a [routerLink]=\"['/members', user.slug]\">{{ user.slug }}</a>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email Confirm\">\n\t\t\t\t\t<span [appDynamicBadge]=\"{ itemsArray: [true, false], item: user?.has_password }\"\n\t\t\t\t\t\tcolor=\"success-danger\"\n\t\t\t\t\t\tclass=\"badge\">\n\t\t\t\t\t\t{{ user?.has_password ? 'Yes' : 'No' }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.blocked\"\n\t\t\t\t\t\t[pTooltip]=\"'This user has been blocked'\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-solid fa-hexagon-exclamation text-danger hexa-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Login\">\n\t\t\t\t\t<span *ngIf=\"user?.current_sign_in_at; else lastSignin\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{{ user.current_sign_in_at | dateFormat }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span *ngIf=\"user.current_sign_in_at\">\n\t\t\t\t\t\t\t ({{ user.current_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<ng-template #lastSignin>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t{{ user.last_sign_in_at | dateFormat }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span *ngIf=\"user.last_sign_in_at\">\n\t\t\t\t\t\t\t\t ({{ user.last_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Action\">\n\t\t\t\t\t<ul class=\"list-unstyled list-inline list-action\">\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Impersonate this user\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t<i (click)=\"onImpersonate(user)\" (keydown.enter)=\"onImpersonate(user)\" class=\"fas fa-people-arrows fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId !== user.id\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Set this user as new owner\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t\t<i (click)=\"onChangeOwner(user)\" (keydown.enter)=\"onChangeOwner(user)\" class=\"fa fa-user-crown warning fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"user?.enable_two_factor_authenticator\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\"\n\t\t\t\t\t\t\t\t(click)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\tngbTooltip=\"Disable 2FA\"\n\t\t\t\t\t\t\t\tclass=\"me-2 me-sm-3 success\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-lock\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"hasAccess && user.id !== subscriptionOwner\"\n\t\t\t\t\t\t[ngIfElse]=\"empty\">\n\t\t\t\t\t\t<!-- Make Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Make Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"!subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-user-crown fa-lg success\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(users, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li></li>\n\t\t\t\t\t\t<!-- Remove Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Remove Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-ban warning fa-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template #empty>\n\t\t\t\t\t\t\t<li class=\"mx-3\"></li>\n\t\t\t\t\t\t </ng-template>\n\t\t\t\t\t </ng-template>\n\t\t\t\t\t\t<li [routerLink]=\"[routers.usersDetails + user.id]\"\n\t\t\t\t\t\t\tngbTooltip=\"Edit\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i class=\"fa fa-edit edit-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Admin.Users.Delete'\"\n\t\t\t\t\t\t\tngbTooltip=\"Delete\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i (click)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\tclass=\"fa fa-trash delete-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n\t<div *ngIf=\"totalRecords === 0 && totalUnfilteredCount !== 0\">\n\t\t<pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n\t\t</pw-no-data>\n\t</div>\n\t<span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">\n\t\t{{ 'Label.Total' | transloco }}: {{ totalRecords }}\n\t</span>\n</div>\n<div *ngIf=\"totalUnfilteredCount === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionUsersMessage' | transloco\">\n </pw-no-data>\n</div>\n\n</section>\n\n\n<section id=\"manage-members\"\n *ngIf=\"isAddEnabled\">\n <pw-add-members (membersAdded)=\"onMembersAdded()\"\n ></pw-add-members>\n</section>\n\n<!-- password validation modal for impersonate -->\n<pw-password-validation #passwordValidationModalForImpersonate\n\t(successEvent)=\"onUserImpersonation($event)\">\n</pw-password-validation>\n<!-- password validation modal for delete user -->\n<pw-password-validation #passwordValidationModalForUserDelete\n\t(successEvent)=\"deleteUser($event)\">\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ActionCanNotUndone' | transloco }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ConfirmPassword' | transloco }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</pw-password-validation>\n<!-- password validation modal for remove2fa -->\n<pw-password-validation #passwordValidationModalForRemove2fa\n\t(successEvent)=\"remove2fa($event)\">\n</pw-password-validation>\n", styles: [".hexa-warning{font-size:18px;vertical-align:middle}.alpha-beta{font-size:14px}.info-icon{vertical-align:middle;margin-left:5px}.first-name{margin-right:5px}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.PasswordValidationComponent, selector: "pw-password-validation", inputs: ["confirmMessage"], outputs: ["successEvent"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: AddMembersComponent, selector: "pw-add-members", outputs: ["membersAdded"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
6417
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionUsersComponent, selector: "pw-subscription-users", viewQueries: [{ propertyName: "passwordValidationModalForImpersonate", first: true, predicate: ["passwordValidationModalForImpersonate"], descendants: true }, { propertyName: "passwordValidationModalForUserDelete", first: true, predicate: ["passwordValidationModalForUserDelete"], descendants: true }, { propertyName: "passwordValidationModalForRemove2fa", first: true, predicate: ["passwordValidationModalForRemove2fa"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"w-100 text-center mt-3\">\n\t<ng-template [ngIf]=\"!isLoaded\">\n\t\t<p-progressSpinner></p-progressSpinner>\n\t</ng-template>\n</div>\n<div class=\"text-end mb-2\" *ngIf=\"!isAddEnabled && isUserSubscriptionSuperAdmin\">\n\t<button class=\"btn btn-sm btn-outline-primary\" (click)=\"isAddEnabled = true\">\n\t <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n\t</button>\n </div>\n <section id=\"members\"\n *ngIf=\"!isAddEnabled\">\n<div [class.hideTable]=\"totalUnfilteredCount === 0\"\n\tclass=\"primeng-datatable-container table-responsive mt-0\">\n\t<p-table #dt\n\t\t[value]=\"subscriptionMembers\"\n\t\t[paginator]=\"totalRecords !== 0\"\n\t\t[rows]=\"PAGE_SIZE\"\n\t\t[lazy]=\"true\"\n\t\t[totalRecords]=\"totalRecords\"\n\t\t[loading]=\"loading\"\n\t\t[filterDelay]=\"1000\"\n\t\t[customSort]=\"true\"\n\t\t(onLazyLoad)=\"onLazyLoad($event)\">\n\t\t<ng-template pTemplate=\"caption\">\n\t\t\t<div class=\"text-end\">\n\t\t\t\t<i class=\"fa fa-search mt-2 me-2\"\n\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t<input [(ngModel)]=\"searchText\"\n\t\t\t\t\t(input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tpInputText\n\t\t\t\t\tsize=\"50\"\n\t\t\t\t\tplaceholder=\"Search subscription users...\"\n\t\t\t\t\tclass=\"mw-90\">\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"id\">\n\t\t\t\t\t{{ 'Admin.Users.Id' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"id\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"first_name\">\n\t\t\t\t\t{{ 'Label.FirstName' | transloco }}\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_name\">\n\t\t\t\t\t{{ 'Label.LastName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_name\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"email\">\n\t\t\t\t\t{{ 'Label.Email' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"email\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"slug\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.NickName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"slug\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"has_password\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.EmailConfirmed' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"has_password\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_sign_in_at\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.LastLogin' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_sign_in_at\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\">\n\t\t\t\t\t{{ 'Label.Actions' | transloco }}\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"body\"\n\t\t\tlet-user>\n\t\t\t<tr>\n\t\t\t\t<td data-head=\"Id\">{{ user.id }}</td>\n\t\t\t\t<td data-head=\"First Name\">\n\t\t\t\t\t<span class=\"first-name\">{{ user.first_name }}</span>\n\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId === user.id\">\n\t\t\t\t\t\t<span *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Subscription Owner\">\n\t\t\t\t\t\t\t<i class=\"info-icon fas fa-user-tie success\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<span class=\"badge bg-success mx-1 admin-badge\" *ngIf=\"subscriptionAdmins?.includes(user?.id)\"> Admin </span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Name\">\n\t\t\t\t\t{{ user.last_name }}\n\t\t\t\t\t<span *ngIf=\"user?.alpha\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.AlphaIcon'|transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-a alpha-beta text-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.beta\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.BetaIcon'|transloco\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-b alpha-beta text-primary\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.cognito_sso_activated\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.Cognito' | transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa fa-cloud success\" ></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email\">{{ user.email }}</td>\n\t\t\t\t<td data-head=\"Nick Name\">\n\t\t\t\t\t<a [routerLink]=\"['/members', user.slug]\">{{ user.slug }}</a>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email Confirm\">\n\t\t\t\t\t<span [appDynamicBadge]=\"{ itemsArray: [true, false], item: user?.has_password }\"\n\t\t\t\t\t\tcolor=\"success-danger\"\n\t\t\t\t\t\tclass=\"badge\">\n\t\t\t\t\t\t{{ user?.has_password ? 'Yes' : 'No' }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.blocked\"\n\t\t\t\t\t\t[pTooltip]=\"'This user has been blocked'\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-solid fa-hexagon-exclamation text-danger hexa-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Login\">\n\t\t\t\t\t<span *ngIf=\"user?.current_sign_in_at; else lastSignin\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{{ user.current_sign_in_at | dateFormat }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span *ngIf=\"user.current_sign_in_at\">\n\t\t\t\t\t\t\t ({{ user.current_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<ng-template #lastSignin>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t{{ user.last_sign_in_at | dateFormat }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span *ngIf=\"user.last_sign_in_at\">\n\t\t\t\t\t\t\t\t ({{ user.last_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Action\">\n\t\t\t\t\t<ul class=\"list-unstyled list-inline list-action\">\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Impersonate this user\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t<i (click)=\"onImpersonate(user)\" (keydown.enter)=\"onImpersonate(user)\" class=\"fas fa-people-arrows fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId !== user.id\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Set this user as new owner\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t\t<i (click)=\"onChangeOwner(user)\" (keydown.enter)=\"onChangeOwner(user)\" class=\"fa fa-user-crown warning fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"user?.enable_two_factor_authenticator\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\"\n\t\t\t\t\t\t\t\t(click)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\tngbTooltip=\"Disable 2FA\"\n\t\t\t\t\t\t\t\tclass=\"me-2 me-sm-3 success\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-lock\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"isUserSubscriptionSuperAdmin\"\n\t\t\t\t\t\t[ngIfElse]=\"empty\">\n\t\t\t\t\t\t<!-- Make Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Make Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"!subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-user-crown fa-lg success\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(users, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li></li>\n\t\t\t\t\t\t<!-- Remove Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Remove Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-ban warning fa-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template #empty>\n\t\t\t\t\t\t\t<li class=\"mx-3\"></li>\n\t\t\t\t\t\t </ng-template>\n\t\t\t\t\t </ng-template>\n\t\t\t\t\t\t<li [routerLink]=\"[routers.usersDetails + user.id]\"\n\t\t\t\t\t\t\tngbTooltip=\"Edit\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i class=\"fa fa-edit edit-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Admin.Users.Delete'\"\n\t\t\t\t\t\t\tngbTooltip=\"Delete\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i (click)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\tclass=\"fa fa-trash delete-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n\t<div *ngIf=\"totalRecords === 0 && totalUnfilteredCount !== 0\">\n\t\t<pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n\t\t</pw-no-data>\n\t</div>\n\t<span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">\n\t\t{{ 'Label.Total' | transloco }}: {{ totalRecords }}\n\t</span>\n</div>\n<div *ngIf=\"totalUnfilteredCount === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionUsersMessage' | transloco\">\n </pw-no-data>\n</div>\n\n</section>\n\n\n<section id=\"manage-members\"\n *ngIf=\"isAddEnabled\">\n <pw-add-members (membersAdded)=\"onMembersAdded()\"\n ></pw-add-members>\n</section>\n\n<!-- password validation modal for impersonate -->\n<pw-password-validation #passwordValidationModalForImpersonate\n\t(successEvent)=\"onUserImpersonation($event)\">\n</pw-password-validation>\n<!-- password validation modal for delete user -->\n<pw-password-validation #passwordValidationModalForUserDelete\n\t(successEvent)=\"deleteUser($event)\">\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ActionCanNotUndone' | transloco }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ConfirmPassword' | transloco }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</pw-password-validation>\n<!-- password validation modal for remove2fa -->\n<pw-password-validation #passwordValidationModalForRemove2fa\n\t(successEvent)=\"remove2fa($event)\">\n</pw-password-validation>\n", styles: [".hexa-warning{font-size:18px;vertical-align:middle}.alpha-beta{font-size:14px}.info-icon{vertical-align:middle;margin-left:5px}.first-name{margin-right:5px}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.PasswordValidationComponent, selector: "pw-password-validation", inputs: ["confirmMessage"], outputs: ["successEvent"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: AddMembersComponent, selector: "pw-add-members", outputs: ["membersAdded"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.SinceAgoPipe, name: "sinceAgo" }] }); }
|
|
6359
6418
|
}
|
|
6360
6419
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionUsersComponent, decorators: [{
|
|
6361
6420
|
type: Component,
|
|
6362
|
-
args: [{ selector: 'pw-subscription-users', template: "<div class=\"w-100 text-center mt-3\">\n\t<ng-template [ngIf]=\"!isLoaded\">\n\t\t<p-progressSpinner></p-progressSpinner>\n\t</ng-template>\n</div>\n<div class=\"text-end mb-2\" *ngIf=\"hasAccess && !isAddEnabled\">\n\t<button class=\"btn btn-sm btn-outline-primary\" (click)=\"isAddEnabled = true\">\n\t <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n\t</button>\n </div>\n <section id=\"members\"\n *ngIf=\"!isAddEnabled\">\n<div [class.hideTable]=\"totalUnfilteredCount === 0\"\n\tclass=\"primeng-datatable-container table-responsive mt-0\">\n\t<p-table #dt\n\t\t[value]=\"subscriptionMembers\"\n\t\t[paginator]=\"totalRecords !== 0\"\n\t\t[rows]=\"PAGE_SIZE\"\n\t\t[lazy]=\"true\"\n\t\t[totalRecords]=\"totalRecords\"\n\t\t[loading]=\"loading\"\n\t\t[filterDelay]=\"1000\"\n\t\t[customSort]=\"true\"\n\t\t(onLazyLoad)=\"onLazyLoad($event)\">\n\t\t<ng-template pTemplate=\"caption\">\n\t\t\t<div class=\"text-end\">\n\t\t\t\t<i class=\"fa fa-search mt-2 me-2\"\n\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t<input [(ngModel)]=\"searchText\"\n\t\t\t\t\t(input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tpInputText\n\t\t\t\t\tsize=\"50\"\n\t\t\t\t\tplaceholder=\"Search subscription users...\"\n\t\t\t\t\tclass=\"mw-90\">\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"id\">\n\t\t\t\t\t{{ 'Admin.Users.Id' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"id\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"first_name\">\n\t\t\t\t\t{{ 'Label.FirstName' | transloco }}\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_name\">\n\t\t\t\t\t{{ 'Label.LastName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_name\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"email\">\n\t\t\t\t\t{{ 'Label.Email' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"email\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"slug\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.NickName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"slug\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"has_password\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.EmailConfirmed' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"has_password\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_sign_in_at\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.LastLogin' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_sign_in_at\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\">\n\t\t\t\t\t{{ 'Label.Actions' | transloco }}\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"body\"\n\t\t\tlet-user>\n\t\t\t<tr>\n\t\t\t\t<td data-head=\"Id\">{{ user.id }}</td>\n\t\t\t\t<td data-head=\"First Name\">\n\t\t\t\t\t<span class=\"first-name\">{{ user.first_name }}</span>\n\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId === user.id\">\n\t\t\t\t\t\t<span *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Subscription Owner\">\n\t\t\t\t\t\t\t<i class=\"info-icon fas fa-user-tie success\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<span class=\"badge bg-success mx-1 admin-badge\" *ngIf=\"subscriptionAdmins?.includes(user?.id)\"> Admin </span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Name\">\n\t\t\t\t\t{{ user.last_name }}\n\t\t\t\t\t<span *ngIf=\"user?.alpha\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.AlphaIcon'|transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-a alpha-beta text-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.beta\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.BetaIcon'|transloco\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-b alpha-beta text-primary\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.cognito_sso_activated\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.Cognito' | transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa fa-cloud success\" ></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email\">{{ user.email }}</td>\n\t\t\t\t<td data-head=\"Nick Name\">\n\t\t\t\t\t<a [routerLink]=\"['/members', user.slug]\">{{ user.slug }}</a>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email Confirm\">\n\t\t\t\t\t<span [appDynamicBadge]=\"{ itemsArray: [true, false], item: user?.has_password }\"\n\t\t\t\t\t\tcolor=\"success-danger\"\n\t\t\t\t\t\tclass=\"badge\">\n\t\t\t\t\t\t{{ user?.has_password ? 'Yes' : 'No' }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.blocked\"\n\t\t\t\t\t\t[pTooltip]=\"'This user has been blocked'\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-solid fa-hexagon-exclamation text-danger hexa-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Login\">\n\t\t\t\t\t<span *ngIf=\"user?.current_sign_in_at; else lastSignin\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{{ user.current_sign_in_at | dateFormat }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span *ngIf=\"user.current_sign_in_at\">\n\t\t\t\t\t\t\t ({{ user.current_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<ng-template #lastSignin>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t{{ user.last_sign_in_at | dateFormat }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span *ngIf=\"user.last_sign_in_at\">\n\t\t\t\t\t\t\t\t ({{ user.last_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Action\">\n\t\t\t\t\t<ul class=\"list-unstyled list-inline list-action\">\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Impersonate this user\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t<i (click)=\"onImpersonate(user)\" (keydown.enter)=\"onImpersonate(user)\" class=\"fas fa-people-arrows fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId !== user.id\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Set this user as new owner\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t\t<i (click)=\"onChangeOwner(user)\" (keydown.enter)=\"onChangeOwner(user)\" class=\"fa fa-user-crown warning fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"user?.enable_two_factor_authenticator\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\"\n\t\t\t\t\t\t\t\t(click)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\tngbTooltip=\"Disable 2FA\"\n\t\t\t\t\t\t\t\tclass=\"me-2 me-sm-3 success\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-lock\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"hasAccess && user.id !== subscriptionOwner\"\n\t\t\t\t\t\t[ngIfElse]=\"empty\">\n\t\t\t\t\t\t<!-- Make Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Make Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"!subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-user-crown fa-lg success\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(users, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li></li>\n\t\t\t\t\t\t<!-- Remove Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Remove Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-ban warning fa-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template #empty>\n\t\t\t\t\t\t\t<li class=\"mx-3\"></li>\n\t\t\t\t\t\t </ng-template>\n\t\t\t\t\t </ng-template>\n\t\t\t\t\t\t<li [routerLink]=\"[routers.usersDetails + user.id]\"\n\t\t\t\t\t\t\tngbTooltip=\"Edit\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i class=\"fa fa-edit edit-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Admin.Users.Delete'\"\n\t\t\t\t\t\t\tngbTooltip=\"Delete\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i (click)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\tclass=\"fa fa-trash delete-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n\t<div *ngIf=\"totalRecords === 0 && totalUnfilteredCount !== 0\">\n\t\t<pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n\t\t</pw-no-data>\n\t</div>\n\t<span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">\n\t\t{{ 'Label.Total' | transloco }}: {{ totalRecords }}\n\t</span>\n</div>\n<div *ngIf=\"totalUnfilteredCount === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionUsersMessage' | transloco\">\n </pw-no-data>\n</div>\n\n</section>\n\n\n<section id=\"manage-members\"\n *ngIf=\"isAddEnabled\">\n <pw-add-members (membersAdded)=\"onMembersAdded()\"\n ></pw-add-members>\n</section>\n\n<!-- password validation modal for impersonate -->\n<pw-password-validation #passwordValidationModalForImpersonate\n\t(successEvent)=\"onUserImpersonation($event)\">\n</pw-password-validation>\n<!-- password validation modal for delete user -->\n<pw-password-validation #passwordValidationModalForUserDelete\n\t(successEvent)=\"deleteUser($event)\">\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ActionCanNotUndone' | transloco }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ConfirmPassword' | transloco }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</pw-password-validation>\n<!-- password validation modal for remove2fa -->\n<pw-password-validation #passwordValidationModalForRemove2fa\n\t(successEvent)=\"remove2fa($event)\">\n</pw-password-validation>\n", styles: [".hexa-warning{font-size:18px;vertical-align:middle}.alpha-beta{font-size:14px}.info-icon{vertical-align:middle;margin-left:5px}.first-name{margin-right:5px}\n"] }]
|
|
6421
|
+
args: [{ selector: 'pw-subscription-users', template: "<div class=\"w-100 text-center mt-3\">\n\t<ng-template [ngIf]=\"!isLoaded\">\n\t\t<p-progressSpinner></p-progressSpinner>\n\t</ng-template>\n</div>\n<div class=\"text-end mb-2\" *ngIf=\"!isAddEnabled && isUserSubscriptionSuperAdmin\">\n\t<button class=\"btn btn-sm btn-outline-primary\" (click)=\"isAddEnabled = true\">\n\t <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n\t</button>\n </div>\n <section id=\"members\"\n *ngIf=\"!isAddEnabled\">\n<div [class.hideTable]=\"totalUnfilteredCount === 0\"\n\tclass=\"primeng-datatable-container table-responsive mt-0\">\n\t<p-table #dt\n\t\t[value]=\"subscriptionMembers\"\n\t\t[paginator]=\"totalRecords !== 0\"\n\t\t[rows]=\"PAGE_SIZE\"\n\t\t[lazy]=\"true\"\n\t\t[totalRecords]=\"totalRecords\"\n\t\t[loading]=\"loading\"\n\t\t[filterDelay]=\"1000\"\n\t\t[customSort]=\"true\"\n\t\t(onLazyLoad)=\"onLazyLoad($event)\">\n\t\t<ng-template pTemplate=\"caption\">\n\t\t\t<div class=\"text-end\">\n\t\t\t\t<i class=\"fa fa-search mt-2 me-2\"\n\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t<input [(ngModel)]=\"searchText\"\n\t\t\t\t\t(input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tpInputText\n\t\t\t\t\tsize=\"50\"\n\t\t\t\t\tplaceholder=\"Search subscription users...\"\n\t\t\t\t\tclass=\"mw-90\">\n\t\t\t</div>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"header\">\n\t\t\t<tr>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"id\">\n\t\t\t\t\t{{ 'Admin.Users.Id' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"id\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"first_name\">\n\t\t\t\t\t{{ 'Label.FirstName' | transloco }}\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_name\">\n\t\t\t\t\t{{ 'Label.LastName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_name\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"email\">\n\t\t\t\t\t{{ 'Label.Email' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"email\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"slug\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.NickName' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"slug\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"has_password\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.EmailConfirmed' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"has_password\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\"\n\t\t\t\t\tpSortableColumn=\"last_sign_in_at\">\n\t\t\t\t\t{{ 'Admin.Subscriptions.LastLogin' | transloco }}\n\t\t\t\t\t<p-sortIcon field=\"last_sign_in_at\"></p-sortIcon>\n\t\t\t\t</th>\n\t\t\t\t<th scope=\"true\">\n\t\t\t\t\t{{ 'Label.Actions' | transloco }}\n\t\t\t\t</th>\n\t\t\t</tr>\n\t\t</ng-template>\n\t\t<ng-template pTemplate=\"body\"\n\t\t\tlet-user>\n\t\t\t<tr>\n\t\t\t\t<td data-head=\"Id\">{{ user.id }}</td>\n\t\t\t\t<td data-head=\"First Name\">\n\t\t\t\t\t<span class=\"first-name\">{{ user.first_name }}</span>\n\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId === user.id\">\n\t\t\t\t\t\t<span *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Subscription Owner\">\n\t\t\t\t\t\t\t<i class=\"info-icon fas fa-user-tie success\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<span class=\"badge bg-success mx-1 admin-badge\" *ngIf=\"subscriptionAdmins?.includes(user?.id)\"> Admin </span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Name\">\n\t\t\t\t\t{{ user.last_name }}\n\t\t\t\t\t<span *ngIf=\"user?.alpha\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.AlphaIcon'|transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-a alpha-beta text-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.beta\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.BetaIcon'|transloco\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-regular fa-square-b alpha-beta text-primary\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.cognito_sso_activated\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\t[pTooltip]=\"'Admin.Users.Tooltip.Cognito' | transloco\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa fa-cloud success\" ></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email\">{{ user.email }}</td>\n\t\t\t\t<td data-head=\"Nick Name\">\n\t\t\t\t\t<a [routerLink]=\"['/members', user.slug]\">{{ user.slug }}</a>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Email Confirm\">\n\t\t\t\t\t<span [appDynamicBadge]=\"{ itemsArray: [true, false], item: user?.has_password }\"\n\t\t\t\t\t\tcolor=\"success-danger\"\n\t\t\t\t\t\tclass=\"badge\">\n\t\t\t\t\t\t{{ user?.has_password ? 'Yes' : 'No' }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span *ngIf=\"user?.blocked\"\n\t\t\t\t\t\t[pTooltip]=\"'This user has been blocked'\"\n\t\t\t\t\t\tclass=\"ms-2\"\n\t\t\t\t\t\ttooltipPosition=\"top\">\n\t\t\t\t\t\t<i class=\"fa-solid fa-hexagon-exclamation text-danger hexa-warning\"></i>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Last Login\">\n\t\t\t\t\t<span *ngIf=\"user?.current_sign_in_at; else lastSignin\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{{ user.current_sign_in_at | dateFormat }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span *ngIf=\"user.current_sign_in_at\">\n\t\t\t\t\t\t\t ({{ user.current_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<ng-template #lastSignin>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t{{ user.last_sign_in_at | dateFormat }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span *ngIf=\"user.last_sign_in_at\">\n\t\t\t\t\t\t\t\t ({{ user.last_sign_in_at | sinceAgo }})\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</ng-template>\n\t\t\t\t</td>\n\t\t\t\t<td data-head=\"Action\">\n\t\t\t\t\t<ul class=\"list-unstyled list-inline list-action\">\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Impersonate this user\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t<i (click)=\"onImpersonate(user)\" (keydown.enter)=\"onImpersonate(user)\" class=\"fas fa-people-arrows fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template [ngIf]=\"subscriptionOwnerUserId !== user.id\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\" ngbTooltip=\"Set this user as new owner\" class=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t\t<i (click)=\"onChangeOwner(user)\" (keydown.enter)=\"onChangeOwner(user)\" class=\"fa fa-user-crown warning fa-lg\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"user?.enable_two_factor_authenticator\">\n\t\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Alpha'\"\n\t\t\t\t\t\t\t\t(click)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"disable2fa(user?.id)\"\n\t\t\t\t\t\t\t\tngbTooltip=\"Disable 2FA\"\n\t\t\t\t\t\t\t\tclass=\"me-2 me-sm-3 success\">\n\t\t\t\t\t\t\t\t<i class=\"fa fa-lock\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t<ng-template [ngIf]=\"isUserSubscriptionSuperAdmin\"\n\t\t\t\t\t\t[ngIfElse]=\"empty\">\n\t\t\t\t\t\t<!-- Make Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Make Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"!subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-user-crown fa-lg success\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(users, true)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li></li>\n\t\t\t\t\t\t<!-- Remove Admin -->\n\t\t\t\t\t\t<li ngbTooltip=\"Remove Admin\"\n\t\t\t\t\t\t class=\"me-2 me-sm-3 mx-2\"\n\t\t\t\t\t\t *ngIf=\"subscriptionAdmins?.includes(user.id)\">\n\t\t\t\t\t\t <i\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa fa-ban warning fa-lg\"\n\t\t\t\t\t\t\t\t\t\t\t\t(keydown.enter)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\t(click)=\"makeAdmin(user, false)\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<ng-template #empty>\n\t\t\t\t\t\t\t<li class=\"mx-3\"></li>\n\t\t\t\t\t\t </ng-template>\n\t\t\t\t\t </ng-template>\n\t\t\t\t\t\t<li [routerLink]=\"[routers.usersDetails + user.id]\"\n\t\t\t\t\t\t\tngbTooltip=\"Edit\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i class=\"fa fa-edit edit-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li *rbacAllow=\"'Pages.Admin.Users.Delete'\"\n\t\t\t\t\t\t\tngbTooltip=\"Delete\"\n\t\t\t\t\t\t\tclass=\"me-2 me-sm-3\">\n\t\t\t\t\t\t\t<i (click)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\t(keydown.enter)=\"onDelete(user)\"\n\t\t\t\t\t\t\t\tclass=\"fa fa-trash delete-icon\"\n\t\t\t\t\t\t\t\taria-hidden=\"true\"></i>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</ng-template>\n\t</p-table>\n\t<div *ngIf=\"totalRecords === 0 && totalUnfilteredCount !== 0\">\n\t\t<pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n\t\t</pw-no-data>\n\t</div>\n\t<span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">\n\t\t{{ 'Label.Total' | transloco }}: {{ totalRecords }}\n\t</span>\n</div>\n<div *ngIf=\"totalUnfilteredCount === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionUsersMessage' | transloco\">\n </pw-no-data>\n</div>\n\n</section>\n\n\n<section id=\"manage-members\"\n *ngIf=\"isAddEnabled\">\n <pw-add-members (membersAdded)=\"onMembersAdded()\"\n ></pw-add-members>\n</section>\n\n<!-- password validation modal for impersonate -->\n<pw-password-validation #passwordValidationModalForImpersonate\n\t(successEvent)=\"onUserImpersonation($event)\">\n</pw-password-validation>\n<!-- password validation modal for delete user -->\n<pw-password-validation #passwordValidationModalForUserDelete\n\t(successEvent)=\"deleteUser($event)\">\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ActionCanNotUndone' | transloco }}\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t{{ 'User.Account.Message.ConfirmPassword' | transloco }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</pw-password-validation>\n<!-- password validation modal for remove2fa -->\n<pw-password-validation #passwordValidationModalForRemove2fa\n\t(successEvent)=\"remove2fa($event)\">\n</pw-password-validation>\n", styles: [".hexa-warning{font-size:18px;vertical-align:middle}.alpha-beta{font-size:14px}.info-icon{vertical-align:middle;margin-left:5px}.first-name{margin-right:5px}\n"] }]
|
|
6363
6422
|
}], ctorParameters: () => [{ type: i1$2.SubscriptionService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i1$2.AuthService }, { type: i1$2.WindowService }, { type: i1.AdminService }, { type: i1$2.CustomToastService }], propDecorators: { passwordValidationModalForImpersonate: [{
|
|
6364
6423
|
type: ViewChild,
|
|
6365
6424
|
args: ['passwordValidationModalForImpersonate', { static: false }]
|
|
@@ -6402,7 +6461,7 @@ class SubscriptionAgentsListComponent extends AppBaseComponent {
|
|
|
6402
6461
|
.subscribe(response => {
|
|
6403
6462
|
this.allAgents = response.subscription_agents;
|
|
6404
6463
|
this.totalRecords = this.allAgents?.length;
|
|
6405
|
-
this.totalUnfilteredCount = response.unfiltered_count
|
|
6464
|
+
this.totalUnfilteredCount = response.unfiltered_count ?? 0;
|
|
6406
6465
|
})
|
|
6407
6466
|
.add(() => {
|
|
6408
6467
|
this.isLoaded = true;
|
|
@@ -6505,7 +6564,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6505
6564
|
return {
|
|
6506
6565
|
organization_industries: [
|
|
6507
6566
|
{ id: null, name: 'Select Organization Industry' },
|
|
6508
|
-
...(res?.organization_industries
|
|
6567
|
+
...(res?.organization_industries ?? [])
|
|
6509
6568
|
]
|
|
6510
6569
|
};
|
|
6511
6570
|
}));
|
|
@@ -6513,7 +6572,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6513
6572
|
return {
|
|
6514
6573
|
organization_types: [
|
|
6515
6574
|
{ id: null, name: 'Select Organization Type' },
|
|
6516
|
-
...(res?.organization_types
|
|
6575
|
+
...(res?.organization_types ?? [])
|
|
6517
6576
|
]
|
|
6518
6577
|
};
|
|
6519
6578
|
}));
|
|
@@ -6521,7 +6580,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6521
6580
|
return {
|
|
6522
6581
|
organization_sizes: [
|
|
6523
6582
|
{ id: null, name: 'Select Organization Size' },
|
|
6524
|
-
...(res?.organization_sizes
|
|
6583
|
+
...(res?.organization_sizes ?? [])
|
|
6525
6584
|
]
|
|
6526
6585
|
};
|
|
6527
6586
|
}));
|
|
@@ -6735,7 +6794,7 @@ class SubscriptionProductDetailsComponent extends AppBaseComponent {
|
|
|
6735
6794
|
this.form.get('expires_at').disable();
|
|
6736
6795
|
this.disableExpiresAt = true;
|
|
6737
6796
|
}
|
|
6738
|
-
const externalPayment = this.permissionService.isSuperAdmin()
|
|
6797
|
+
const externalPayment = this.permissionService.isSuperAdmin() ?? !response?.stripe_subscription_id;
|
|
6739
6798
|
if (externalPayment) {
|
|
6740
6799
|
this.form.get('external_payment').enable();
|
|
6741
6800
|
}
|
|
@@ -6811,7 +6870,7 @@ class SubscriptionProductDetailsComponent extends AppBaseComponent {
|
|
|
6811
6870
|
min_units: this.form.value.min_units
|
|
6812
6871
|
};
|
|
6813
6872
|
if (this.form.value?.new_product_id) {
|
|
6814
|
-
data['new_product_id'] = this.form.value?.new_product_id?.id
|
|
6873
|
+
data['new_product_id'] = this.form.value?.new_product_id?.id ?? null;
|
|
6815
6874
|
}
|
|
6816
6875
|
if (this.form.value.purchased_units) {
|
|
6817
6876
|
data['purchased_units'] = this.form.value.purchased_units;
|
|
@@ -6970,12 +7029,7 @@ class SubscriptionInsightNpsComponent extends AppBaseComponent {
|
|
|
6970
7029
|
/** Function to get the data for the graph */
|
|
6971
7030
|
getChartData() {
|
|
6972
7031
|
this.graphLoading = true;
|
|
6973
|
-
this.adminService
|
|
6974
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.NPS, this.subscriptionId, this.selectedDateRange?.startDate
|
|
6975
|
-
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
6976
|
-
: '', this.selectedDateRange?.endDate
|
|
6977
|
-
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
6978
|
-
: '')
|
|
7032
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.NPS, this.subscriptionId, this.selectedDateRange)
|
|
6979
7033
|
.subscribe(response => {
|
|
6980
7034
|
this.graph = response;
|
|
6981
7035
|
})
|
|
@@ -7026,12 +7080,7 @@ class SubscriptionInsightAveragePriceComponent extends AppBaseComponent {
|
|
|
7026
7080
|
/** Function to get the data for the graph */
|
|
7027
7081
|
getChartData() {
|
|
7028
7082
|
this.graphLoading = true;
|
|
7029
|
-
this.adminService
|
|
7030
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_PRICE, this.subscriptionId, this.selectedDateRange?.startDate
|
|
7031
|
-
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
7032
|
-
: '', this.selectedDateRange?.endDate
|
|
7033
|
-
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
7034
|
-
: '')
|
|
7083
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_PRICE, this.subscriptionId, this.selectedDateRange)
|
|
7035
7084
|
.subscribe(response => {
|
|
7036
7085
|
this.graph = response;
|
|
7037
7086
|
})
|
|
@@ -7082,12 +7131,7 @@ class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent {
|
|
|
7082
7131
|
/** Function to get the data for the graph */
|
|
7083
7132
|
getChartData() {
|
|
7084
7133
|
this.graphLoading = true;
|
|
7085
|
-
this.adminService
|
|
7086
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.SESSION_COUNT, this.subscriptionId, this.selectedDateRange?.startDate
|
|
7087
|
-
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
7088
|
-
: '', this.selectedDateRange?.endDate
|
|
7089
|
-
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
7090
|
-
: '')
|
|
7134
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.SESSION_COUNT, this.subscriptionId, this.selectedDateRange)
|
|
7091
7135
|
.subscribe(response => {
|
|
7092
7136
|
this.graph = response;
|
|
7093
7137
|
})
|
|
@@ -7137,12 +7181,7 @@ class SubscriptionInsightUserSessionComponent extends AppBaseComponent {
|
|
|
7137
7181
|
}
|
|
7138
7182
|
getChartData() {
|
|
7139
7183
|
this.graphLoading = true;
|
|
7140
|
-
this.adminService
|
|
7141
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.USER_SESSION_COUNT, this.subscriptionId, this.selectedDateRange?.startDate
|
|
7142
|
-
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
7143
|
-
: '', this.selectedDateRange?.endDate
|
|
7144
|
-
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
7145
|
-
: '')
|
|
7184
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.USER_SESSION_COUNT, this.subscriptionId, this.selectedDateRange)
|
|
7146
7185
|
.subscribe(response => {
|
|
7147
7186
|
this.graph = response;
|
|
7148
7187
|
})
|
|
@@ -7193,12 +7232,7 @@ class SubscriptionInsightAverageUserComponent extends AppBaseComponent {
|
|
|
7193
7232
|
/** Function to get the data for the graph */
|
|
7194
7233
|
getChartData() {
|
|
7195
7234
|
this.graphLoading = true;
|
|
7196
|
-
this.adminService
|
|
7197
|
-
.getSubscriptionAnalytics(SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_USERS, this.subscriptionId, this.selectedDateRange?.startDate
|
|
7198
|
-
? this.selectedDateRange.startDate.format('YYYY-MM-DD')
|
|
7199
|
-
: '', this.selectedDateRange?.endDate
|
|
7200
|
-
? this.selectedDateRange.endDate.format('YYYY-MM-DD')
|
|
7201
|
-
: '')
|
|
7235
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_USERS, this.subscriptionId, this.selectedDateRange)
|
|
7202
7236
|
.subscribe(response => {
|
|
7203
7237
|
this.graph = response;
|
|
7204
7238
|
})
|
|
@@ -7374,9 +7408,9 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7374
7408
|
this.localStorage.getItem$('subscription-list-state').subscribe(res => {
|
|
7375
7409
|
if (res) {
|
|
7376
7410
|
const result = JSON.parse(res);
|
|
7377
|
-
this.searchText = result?.searchText
|
|
7378
|
-
this.status = result?.status
|
|
7379
|
-
this.selectedFeatureKeys = result?.featureKeys
|
|
7411
|
+
this.searchText = result?.searchText ?? '';
|
|
7412
|
+
this.status = result?.status ?? '';
|
|
7413
|
+
this.selectedFeatureKeys = result?.featureKeys ?? [];
|
|
7380
7414
|
this.filterByFeatureKeys = this.selectedFeatureKeys;
|
|
7381
7415
|
}
|
|
7382
7416
|
});
|
|
@@ -7395,7 +7429,7 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7395
7429
|
}
|
|
7396
7430
|
getMinMaxUnits() {
|
|
7397
7431
|
this.form.get('product_id').valueChanges.subscribe(x => {
|
|
7398
|
-
this.unitsText = x?.unitsText
|
|
7432
|
+
this.unitsText = x?.unitsText ?? '';
|
|
7399
7433
|
});
|
|
7400
7434
|
}
|
|
7401
7435
|
onSave() {
|
|
@@ -7437,7 +7471,7 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7437
7471
|
this.searchOptions = featureKeys.map(element => {
|
|
7438
7472
|
return {
|
|
7439
7473
|
id: element,
|
|
7440
|
-
label: element
|
|
7474
|
+
label: element ?? ''
|
|
7441
7475
|
};
|
|
7442
7476
|
});
|
|
7443
7477
|
});
|
|
@@ -7584,7 +7618,8 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7584
7618
|
}
|
|
7585
7619
|
openRecoverSubscriptionModal(item) {
|
|
7586
7620
|
this.recoveringItem = item;
|
|
7587
|
-
|
|
7621
|
+
// false positive: not a password, it's a translation key
|
|
7622
|
+
this.recoverSubscriptionPasswordModal.confirmMessage = 'Admin.Subscriptions.ConfirmRecover'; // NOSONAR
|
|
7588
7623
|
this.recoverSubscriptionPasswordModal.open();
|
|
7589
7624
|
}
|
|
7590
7625
|
onRecoverConfirmed() {
|
|
@@ -7608,9 +7643,9 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7608
7643
|
this.localStorage.getItem$('subscription-list-state').subscribe(res => {
|
|
7609
7644
|
if (res) {
|
|
7610
7645
|
const result = JSON.parse(res);
|
|
7611
|
-
this.searchText = result?.searchText
|
|
7612
|
-
this.status = result?.status
|
|
7613
|
-
this.selectedFeatureKeys = result?.featureKeys
|
|
7646
|
+
this.searchText = result?.searchText ?? '';
|
|
7647
|
+
this.status = result?.status ?? '';
|
|
7648
|
+
this.selectedFeatureKeys = result?.featureKeys ?? [];
|
|
7614
7649
|
this.filterByFeatureKeys = this.selectedFeatureKeys;
|
|
7615
7650
|
}
|
|
7616
7651
|
});
|
|
@@ -7636,7 +7671,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7636
7671
|
}
|
|
7637
7672
|
getMinMaxUnits() {
|
|
7638
7673
|
this.form.get('product_id').valueChanges.subscribe(x => {
|
|
7639
|
-
this.unitsText = x?.unitsText
|
|
7674
|
+
this.unitsText = x?.unitsText ?? '';
|
|
7640
7675
|
});
|
|
7641
7676
|
}
|
|
7642
7677
|
getData(paging) {
|
|
@@ -7660,7 +7695,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7660
7695
|
this.subscriptions = uniqBy(this.subscriptions, 'id');
|
|
7661
7696
|
}
|
|
7662
7697
|
this.subscriptionInsights = response?.subscription_insights;
|
|
7663
|
-
this.totalRecords = response.object_count
|
|
7698
|
+
this.totalRecords = response.object_count ?? 0;
|
|
7664
7699
|
this.totalRecordsUnFiltered = response?.unfiltered_count;
|
|
7665
7700
|
})
|
|
7666
7701
|
.add(() => {
|
|
@@ -7694,7 +7729,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7694
7729
|
this.searchOptions = featureKeys.map(element => {
|
|
7695
7730
|
return {
|
|
7696
7731
|
id: element,
|
|
7697
|
-
label: element
|
|
7732
|
+
label: element ?? ''
|
|
7698
7733
|
};
|
|
7699
7734
|
});
|
|
7700
7735
|
});
|
|
@@ -7794,11 +7829,11 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7794
7829
|
super.ngOnDestroy();
|
|
7795
7830
|
}
|
|
7796
7831
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionsListComponent, deps: [{ token: i1$2.ProductService }, { token: i1.AdminService }, { token: i3$2.UntypedFormBuilder }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i1$2.CommonService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7797
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionsListComponent, selector: "pw-subscriptions-list", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }, { propertyName: "recoverSubscriptionPasswordModal", first: true, predicate: ["recoverSubscriptionPasswordModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div\n class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Subscriptions</h2>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n id=\"btn-create\"\n [routerLink]=\"[routers.inviteUsers]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Invite a User to a Trial\n </a>\n </div>\n</div>\n<div class=\"p-2 mt-3\">\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!isLoaded\">\n <p-progressSpinner> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptions\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <ng-container *ngIf=\"subscriptionInsights\">\n <div class=\"row mb-4\">\n <ng-container *ngFor=\"let temp of objectKeys(subscriptionInsights)\">\n <div class=\"col-12 col-lg-3 mt-2 summary\">\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of subscriptionInsights[temp]\">\n <div>\n <p class=\"mb-0 px-2\">{{ item?.title }}\n <span *ngIf=\"item?.info\"\n [pTooltip]=\"item?.info\">\n <i class=\"fas fa-info-circle\"></i>\n </span>\n </p>\n <h4 class=\"fw-bold mt-2 mb-2\">\n {{ item?.value }}\n </h4>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-multiSelect placeholder=\"Select Feature Keys\"\n [showToggleAll]=\"true\"\n [showHeader]=\"true\"\n [(ngModel)]=\"selectedFeatureKeys\"\n [options]=\"searchOptions\"\n (onChange)=\"onSearchOptionChange($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-12 col-sm-4\">\n <p-dropdown\n [options]=\"subscriptionStatus\"\n [placeholder]=\"'Select status'\"\n (onChange)=\"filterByStatus($event.value)\"\n [(ngModel)]=\"status\">\n </p-dropdown>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2 d-none\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"30\"\n placeholder=\"Search Subscription...\"\n class=\"mw-90\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"id\">\n {{ 'Admin.Subscriptions.Id' | transloco }}\n <p-sortIcon field=\"id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"organisation\">\n {{ 'Admin.Subscriptions.Organization' | transloco }}\n <p-sortIcon field=\"organisation\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_name\">\n {{ 'Admin.Subscriptions.ContactName' | transloco }}\n <p-sortIcon field=\"contact_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_email\">\n {{ 'Admin.Subscriptions.ContactEmail' | transloco }}\n <p-sortIcon field=\"contact_email\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Product' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Currency' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.PricePerMonth' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"stripe_customer_id\">\n {{ 'Admin.Subscriptions.Paid' | transloco }}\n <p-sortIcon field=\"stripe_customer_id\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Billing' | transloco }}</th>\n <th scope=\"true\"\n class=\"expires-at-width\">\n {{ 'Admin.Subscriptions.ExpiresAt' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_total\">\n {{ 'Admin.Subscriptions.SessionsTotal' | transloco }}\n <p-sortIcon field=\"sessions_total\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_last_month\">\n {{ 'Admin.Subscriptions.SessionsTotalLastMonth' | transloco }}\n <p-sortIcon field=\"sessions_last_month\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"deleted_at\">\n {{ 'Admin.Subscriptions.Deleted' | transloco }}\n <p-sortIcon field=\"deleted_at\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"id\">{{ item.id }}</td>\n <td data-head=\"Organization\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.organisation\"\n tooltipPosition=\"top\">{{ item.organisation | textTruncate: 20 }}</span>\n </td>\n <td data-head=\"ContactName\"\n class=\"custom-break-word\">\n {{ item.contact_name }}\n </td>\n <td data-head=\"ContactEmail\">{{ item.contact_email }}</td>\n <td data-head=\"Name\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.productName\"\n tooltipPosition=\"top\">{{ item.productName }}</span>\n </td>\n <td data-head=\"Currency\">\n <span [appDynamicBadge]=\"{ itemsArray: currency, item: item.currency }\"\n color=\"blue-grey\"\n class=\"badge\">{{ item.currency }}</span>\n </td>\n <td data-head=\"Price/M\">\n <span>{{ (item.price / 100).toFixed(2) | currency:item.currency }}\n <i\n class=\"fa fa-info-circle\"\n *ngIf=\"item?.discount && objectKeys(item?.discount)?.length\"\n aria-hidden=\"true\"\n [pTooltip]=\"item?.discount | json\"\n tooltipPosition=\"top\"\n ></i>\n </span>\n </td>\n <td data-head=\"Paid\">\n <ng-container *ngIf=\"item?.unsubscribed_at\">\n <span class=\"badge bg-warning\">Unsub</span>\n </ng-container>\n <ng-container *ngIf=\"!item?.unsubscribed_at\">\n <ng-template [ngIf]=\"item?.stripe_customer_id || item?.external_payment\"\n [ngIfElse]=\"noBlock\">\n <span class=\"badge bg-success\">Yes</span>\n </ng-template>\n <ng-template #noBlock>\n <span class=\"badge bg-blue-grey\">No</span>\n </ng-template>\n </ng-container>\n <span *ngIf=\"item?.pause_collection && objectKeys(item?.pause_collection)?.length\"\n class=\"ms-2\"\n [pTooltip]=\"item?.pause_collection | json\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n </td>\n <td data-head=\"Billing\">\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: billingFrequency,\n item: item?.billingFrequency\n }\"\n color=\"blue-grey\">{{ item.billingFrequency }}</span>\n </td>\n <td data-head=\"Expires\">\n <span [ngClass]=\"getExpiresAtColor(item)\">{{item?.expires_at | dateFormat}}</span><br />\n <span>{{item?.created_at | sinceAgo}}</span>\n </td>\n <td data-head=\"S#\">{{ item?.sessions_total }}</td>\n <td data-head=\"S/m #\">\n <span [ngClass]=\"{\n 'text-danger fw-bold': item?.sessions_last_month < 3\n }\">{{ item?.sessions_last_month }}</span>\n </td>\n <td data-head=\"Deleted\">\n <span *ngIf=\"item?.deleted_at\"\n class=\"badge bg-danger\">Yes</span>\n <span *ngIf=\"!item?.deleted_at\"\n class=\"badge bg-blue-grey\">No</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[routers.subscriptionDetails, item.id]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <ng-container *ngIf=\"item.deleted; else showDelete\">\n <li ngbTooltip=\"Reactivate subscription\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Alpha'\"\n (click)=\"openRecoverSubscriptionModal(item)\">\n <i class=\"fa fa-trash delete-icon text-success\" aria-hidden=\"true\"></i>\n </li>\n </ng-container>\n <ng-template #showDelete>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Subscription.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ng-template>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalRecords === 0 && totalRecordsUnFiltered !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">{{ 'Label.Total' | transloco }}: {{ totalRecords }}</span>\n </div>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionMessage' | transloco\" *ngIf=\"totalRecordsUnFiltered === 0 && isLoaded\">\n</pw-no-data>\n<pw-password-validation\n #recoverSubscriptionPasswordModal\n (successEvent)=\"onRecoverConfirmed()\">\n</pw-password-validation>\n\n", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}@media (min-width: 767px){.table-responsive td,.table-responsive th{font-size:11px!important}}.expires-at-width{width:8%}.custom-break-word{word-break:break-word!important}.summary .card{padding-bottom:0}.summary .card .card-body{padding-top:20px;text-align:center}.summary .card .card-body p,.summary .card .card-body h4{font-size:14px}@media (min-width: 320px) and (max-width: 720px){.primeng-datatable-container .search-filter{display:flex;flex-direction:column;gap:.5rem;justify-content:space-between}}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i3.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i4$4.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.PasswordValidationComponent, selector: "pw-password-validation", inputs: ["confirmMessage"], outputs: ["successEvent"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i3$1.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.SinceAgoPipe, name: "sinceAgo" }, { kind: "pipe", type: i13.TextTruncatePipe, name: "textTruncate" }] }); }
|
|
7832
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SubscriptionsListComponent, selector: "pw-subscriptions-list", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }, { propertyName: "recoverSubscriptionPasswordModal", first: true, predicate: ["recoverSubscriptionPasswordModal"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div\n class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Subscriptions</h2>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n id=\"btn-create\"\n [routerLink]=\"[routers.inviteUsers]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Invite a User to a Trial\n </a>\n </div>\n</div>\n<div class=\"p-2 mt-3\">\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!isLoaded\">\n <p-progressSpinner> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptions\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <ng-container *ngIf=\"subscriptionInsights\">\n <div class=\"row mb-4\">\n <ng-container *ngFor=\"let temp of objectKeys(subscriptionInsights)\">\n <div class=\"col-12 col-lg-3 mt-2 summary\">\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of subscriptionInsights[temp]\">\n <div>\n <p class=\"mb-0 px-2\">{{ item?.title }}\n <span *ngIf=\"item?.info\"\n [pTooltip]=\"item?.info\">\n <i class=\"fas fa-info-circle\"></i>\n </span>\n </p>\n <h4 class=\"fw-bold mt-2 mb-2\">\n {{ item?.value }}\n </h4>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-multiSelect placeholder=\"Select Feature Keys\"\n [showToggleAll]=\"true\"\n [showHeader]=\"true\"\n [(ngModel)]=\"selectedFeatureKeys\"\n [options]=\"searchOptions\"\n (onChange)=\"onSearchOptionChange($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-12 col-sm-4\">\n <p-dropdown\n [options]=\"subscriptionStatus\"\n [placeholder]=\"'Select status'\"\n (onChange)=\"filterByStatus($event.value)\"\n [(ngModel)]=\"status\">\n </p-dropdown>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2 d-none\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"30\"\n placeholder=\"Search Subscription...\"\n class=\"mw-90\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"id\">\n {{ 'Admin.Subscriptions.Id' | transloco }}\n <p-sortIcon field=\"id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"organisation\">\n {{ 'Admin.Subscriptions.Organization' | transloco }}\n <p-sortIcon field=\"organisation\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_name\">\n {{ 'Admin.Subscriptions.ContactName' | transloco }}\n <p-sortIcon field=\"contact_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_email\">\n {{ 'Admin.Subscriptions.ContactEmail' | transloco }}\n <p-sortIcon field=\"contact_email\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Product' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Currency' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.PricePerMonth' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"stripe_customer_id\">\n {{ 'Admin.Subscriptions.Paid' | transloco }}\n <p-sortIcon field=\"stripe_customer_id\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Billing' | transloco }}</th>\n <th scope=\"true\"\n class=\"expires-at-width\">\n {{ 'Admin.Subscriptions.ExpiresAt' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_total\">\n {{ 'Admin.Subscriptions.SessionsTotal' | transloco }}\n <p-sortIcon field=\"sessions_total\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_last_month\">\n {{ 'Admin.Subscriptions.SessionsTotalLastMonth' | transloco }}\n <p-sortIcon field=\"sessions_last_month\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"deleted_at\">\n {{ 'Admin.Subscriptions.Deleted' | transloco }}\n <p-sortIcon field=\"deleted_at\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"id\">{{ item.id }}</td>\n <td data-head=\"Organization\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.organisation\"\n tooltipPosition=\"top\">{{ item.organisation | textTruncate: 20 }}</span>\n </td>\n <td data-head=\"ContactName\"\n class=\"custom-break-word\">\n {{ item.contact_name }}\n </td>\n <td data-head=\"ContactEmail\">{{ item.contact_email }}</td>\n <td data-head=\"Name\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.productName\"\n tooltipPosition=\"top\">{{ item.productName }}</span>\n </td>\n <td data-head=\"Currency\">\n <span [appDynamicBadge]=\"{ itemsArray: currency, item: item.currency }\"\n color=\"blue-grey\"\n class=\"badge\">{{ item.currency }}</span>\n </td>\n <td data-head=\"Price/M\">\n <span>{{ (item.price / 100).toFixed(2) | currency:item.currency }}\n <i\n class=\"fa fa-info-circle\"\n *ngIf=\"item?.discount && objectKeys(item?.discount)?.length\"\n aria-hidden=\"true\"\n [pTooltip]=\"item?.discount | json\"\n tooltipPosition=\"top\"\n ></i>\n </span>\n </td>\n <td data-head=\"Paid\">\n <ng-container *ngIf=\"item?.unsubscribed_at\">\n <span class=\"badge bg-warning\">Unsub</span>\n </ng-container>\n <ng-container *ngIf=\"!item?.unsubscribed_at\">\n <ng-template [ngIf]=\"item?.stripe_customer_id || item?.external_payment\"\n [ngIfElse]=\"noBlock\">\n <span class=\"badge bg-success\">Yes</span>\n </ng-template>\n <ng-template #noBlock>\n <span class=\"badge bg-blue-grey\">No</span>\n </ng-template>\n </ng-container>\n <span *ngIf=\"item?.pause_collection && objectKeys(item?.pause_collection)?.length\"\n class=\"ms-2\"\n [pTooltip]=\"item?.pause_collection | json\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n </td>\n <td data-head=\"Billing\">\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: billingFrequency,\n item: item?.billingFrequency\n }\"\n color=\"blue-grey\">{{ item.billingFrequency }}</span>\n </td>\n <td data-head=\"Expires\">\n <span [ngClass]=\"getExpiresAtColor(item)\">{{item?.expires_at | dateFormat}}</span><br />\n <span>{{item?.created_at | sinceAgo}}</span>\n </td>\n <td data-head=\"S#\">{{ item?.sessions_total }}</td>\n <td data-head=\"S/m #\">\n <span [ngClass]=\"{\n 'text-danger fw-bold': item?.sessions_last_month < 3\n }\">{{ item?.sessions_last_month }}</span>\n </td>\n <td data-head=\"Deleted\">\n <span *ngIf=\"item?.deleted_at\"\n class=\"badge bg-danger\">Yes</span>\n <span *ngIf=\"!item?.deleted_at\"\n class=\"badge bg-blue-grey\">No</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[routers.subscriptionDetails, item.id]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <ng-container *ngIf=\"item.deleted; else showDelete\">\n <li ngbTooltip=\"Reactivate subscription\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Alpha'\"\n (keydown.enter)=\"openRecoverSubscriptionModal(item)\"\n (click)=\"openRecoverSubscriptionModal(item)\">\n <i class=\"fa fa-trash delete-icon text-success\" aria-hidden=\"true\"></i>\n </li>\n </ng-container>\n <ng-template #showDelete>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Subscription.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ng-template>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalRecords === 0 && totalRecordsUnFiltered !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">{{ 'Label.Total' | transloco }}: {{ totalRecords }}</span>\n </div>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionMessage' | transloco\" *ngIf=\"totalRecordsUnFiltered === 0 && isLoaded\">\n</pw-no-data>\n<pw-password-validation\n #recoverSubscriptionPasswordModal\n (successEvent)=\"onRecoverConfirmed()\">\n</pw-password-validation>\n\n", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}@media (min-width: 767px){.table-responsive td,.table-responsive th{font-size:11px!important}}.expires-at-width{width:8%}.custom-break-word{word-break:break-word!important}.summary .card{padding-bottom:0}.summary .card .card-body{padding-top:20px;text-align:center}.summary .card .card-body p,.summary .card .card-body h4{font-size:14px}@media (min-width: 320px) and (max-width: 720px){.primeng-datatable-container .search-filter{display:flex;flex-direction:column;gap:.5rem;justify-content:space-between}}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i3.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i4$4.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.PasswordValidationComponent, selector: "pw-password-validation", inputs: ["confirmMessage"], outputs: ["successEvent"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i3$1.JsonPipe, name: "json" }, { kind: "pipe", type: i3$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i13.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i13.SinceAgoPipe, name: "sinceAgo" }, { kind: "pipe", type: i13.TextTruncatePipe, name: "textTruncate" }] }); }
|
|
7798
7833
|
}
|
|
7799
7834
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionsListComponent, decorators: [{
|
|
7800
7835
|
type: Component,
|
|
7801
|
-
args: [{ selector: 'pw-subscriptions-list', template: "<div class=\"row\">\n <div\n class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Subscriptions</h2>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n id=\"btn-create\"\n [routerLink]=\"[routers.inviteUsers]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Invite a User to a Trial\n </a>\n </div>\n</div>\n<div class=\"p-2 mt-3\">\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!isLoaded\">\n <p-progressSpinner> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptions\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <ng-container *ngIf=\"subscriptionInsights\">\n <div class=\"row mb-4\">\n <ng-container *ngFor=\"let temp of objectKeys(subscriptionInsights)\">\n <div class=\"col-12 col-lg-3 mt-2 summary\">\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of subscriptionInsights[temp]\">\n <div>\n <p class=\"mb-0 px-2\">{{ item?.title }}\n <span *ngIf=\"item?.info\"\n [pTooltip]=\"item?.info\">\n <i class=\"fas fa-info-circle\"></i>\n </span>\n </p>\n <h4 class=\"fw-bold mt-2 mb-2\">\n {{ item?.value }}\n </h4>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-multiSelect placeholder=\"Select Feature Keys\"\n [showToggleAll]=\"true\"\n [showHeader]=\"true\"\n [(ngModel)]=\"selectedFeatureKeys\"\n [options]=\"searchOptions\"\n (onChange)=\"onSearchOptionChange($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-12 col-sm-4\">\n <p-dropdown\n [options]=\"subscriptionStatus\"\n [placeholder]=\"'Select status'\"\n (onChange)=\"filterByStatus($event.value)\"\n [(ngModel)]=\"status\">\n </p-dropdown>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2 d-none\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"30\"\n placeholder=\"Search Subscription...\"\n class=\"mw-90\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"id\">\n {{ 'Admin.Subscriptions.Id' | transloco }}\n <p-sortIcon field=\"id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"organisation\">\n {{ 'Admin.Subscriptions.Organization' | transloco }}\n <p-sortIcon field=\"organisation\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_name\">\n {{ 'Admin.Subscriptions.ContactName' | transloco }}\n <p-sortIcon field=\"contact_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_email\">\n {{ 'Admin.Subscriptions.ContactEmail' | transloco }}\n <p-sortIcon field=\"contact_email\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Product' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Currency' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.PricePerMonth' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"stripe_customer_id\">\n {{ 'Admin.Subscriptions.Paid' | transloco }}\n <p-sortIcon field=\"stripe_customer_id\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Billing' | transloco }}</th>\n <th scope=\"true\"\n class=\"expires-at-width\">\n {{ 'Admin.Subscriptions.ExpiresAt' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_total\">\n {{ 'Admin.Subscriptions.SessionsTotal' | transloco }}\n <p-sortIcon field=\"sessions_total\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_last_month\">\n {{ 'Admin.Subscriptions.SessionsTotalLastMonth' | transloco }}\n <p-sortIcon field=\"sessions_last_month\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"deleted_at\">\n {{ 'Admin.Subscriptions.Deleted' | transloco }}\n <p-sortIcon field=\"deleted_at\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"id\">{{ item.id }}</td>\n <td data-head=\"Organization\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.organisation\"\n tooltipPosition=\"top\">{{ item.organisation | textTruncate: 20 }}</span>\n </td>\n <td data-head=\"ContactName\"\n class=\"custom-break-word\">\n {{ item.contact_name }}\n </td>\n <td data-head=\"ContactEmail\">{{ item.contact_email }}</td>\n <td data-head=\"Name\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.productName\"\n tooltipPosition=\"top\">{{ item.productName }}</span>\n </td>\n <td data-head=\"Currency\">\n <span [appDynamicBadge]=\"{ itemsArray: currency, item: item.currency }\"\n color=\"blue-grey\"\n class=\"badge\">{{ item.currency }}</span>\n </td>\n <td data-head=\"Price/M\">\n <span>{{ (item.price / 100).toFixed(2) | currency:item.currency }}\n <i\n class=\"fa fa-info-circle\"\n *ngIf=\"item?.discount && objectKeys(item?.discount)?.length\"\n aria-hidden=\"true\"\n [pTooltip]=\"item?.discount | json\"\n tooltipPosition=\"top\"\n ></i>\n </span>\n </td>\n <td data-head=\"Paid\">\n <ng-container *ngIf=\"item?.unsubscribed_at\">\n <span class=\"badge bg-warning\">Unsub</span>\n </ng-container>\n <ng-container *ngIf=\"!item?.unsubscribed_at\">\n <ng-template [ngIf]=\"item?.stripe_customer_id || item?.external_payment\"\n [ngIfElse]=\"noBlock\">\n <span class=\"badge bg-success\">Yes</span>\n </ng-template>\n <ng-template #noBlock>\n <span class=\"badge bg-blue-grey\">No</span>\n </ng-template>\n </ng-container>\n <span *ngIf=\"item?.pause_collection && objectKeys(item?.pause_collection)?.length\"\n class=\"ms-2\"\n [pTooltip]=\"item?.pause_collection | json\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n </td>\n <td data-head=\"Billing\">\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: billingFrequency,\n item: item?.billingFrequency\n }\"\n color=\"blue-grey\">{{ item.billingFrequency }}</span>\n </td>\n <td data-head=\"Expires\">\n <span [ngClass]=\"getExpiresAtColor(item)\">{{item?.expires_at | dateFormat}}</span><br />\n <span>{{item?.created_at | sinceAgo}}</span>\n </td>\n <td data-head=\"S#\">{{ item?.sessions_total }}</td>\n <td data-head=\"S/m #\">\n <span [ngClass]=\"{\n 'text-danger fw-bold': item?.sessions_last_month < 3\n }\">{{ item?.sessions_last_month }}</span>\n </td>\n <td data-head=\"Deleted\">\n <span *ngIf=\"item?.deleted_at\"\n class=\"badge bg-danger\">Yes</span>\n <span *ngIf=\"!item?.deleted_at\"\n class=\"badge bg-blue-grey\">No</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[routers.subscriptionDetails, item.id]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <ng-container *ngIf=\"item.deleted; else showDelete\">\n <li ngbTooltip=\"Reactivate subscription\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Alpha'\"\n (click)=\"openRecoverSubscriptionModal(item)\">\n <i class=\"fa fa-trash delete-icon text-success\" aria-hidden=\"true\"></i>\n </li>\n </ng-container>\n <ng-template #showDelete>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Subscription.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ng-template>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalRecords === 0 && totalRecordsUnFiltered !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">{{ 'Label.Total' | transloco }}: {{ totalRecords }}</span>\n </div>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionMessage' | transloco\" *ngIf=\"totalRecordsUnFiltered === 0 && isLoaded\">\n</pw-no-data>\n<pw-password-validation\n #recoverSubscriptionPasswordModal\n (successEvent)=\"onRecoverConfirmed()\">\n</pw-password-validation>\n\n", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}@media (min-width: 767px){.table-responsive td,.table-responsive th{font-size:11px!important}}.expires-at-width{width:8%}.custom-break-word{word-break:break-word!important}.summary .card{padding-bottom:0}.summary .card .card-body{padding-top:20px;text-align:center}.summary .card .card-body p,.summary .card .card-body h4{font-size:14px}@media (min-width: 320px) and (max-width: 720px){.primeng-datatable-container .search-filter{display:flex;flex-direction:column;gap:.5rem;justify-content:space-between}}\n"] }]
|
|
7836
|
+
args: [{ selector: 'pw-subscriptions-list', template: "<div class=\"row\">\n <div\n class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Subscriptions</h2>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n id=\"btn-create\"\n [routerLink]=\"[routers.inviteUsers]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Invite a User to a Trial\n </a>\n </div>\n</div>\n<div class=\"p-2 mt-3\">\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!isLoaded\">\n <p-progressSpinner> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptions\"\n [paginator]=\"totalRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n [lazy]=\"true\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <ng-container *ngIf=\"subscriptionInsights\">\n <div class=\"row mb-4\">\n <ng-container *ngFor=\"let temp of objectKeys(subscriptionInsights)\">\n <div class=\"col-12 col-lg-3 mt-2 summary\">\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngFor=\"let item of subscriptionInsights[temp]\">\n <div>\n <p class=\"mb-0 px-2\">{{ item?.title }}\n <span *ngIf=\"item?.info\"\n [pTooltip]=\"item?.info\">\n <i class=\"fas fa-info-circle\"></i>\n </span>\n </p>\n <h4 class=\"fw-bold mt-2 mb-2\">\n {{ item?.value }}\n </h4>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <div class=\"search-filter\">\n <div class=\"col-12 col-sm-4\">\n <p-multiSelect placeholder=\"Select Feature Keys\"\n [showToggleAll]=\"true\"\n [showHeader]=\"true\"\n [(ngModel)]=\"selectedFeatureKeys\"\n [options]=\"searchOptions\"\n (onChange)=\"onSearchOptionChange($event)\"\n appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-12 col-sm-4\">\n <p-dropdown\n [options]=\"subscriptionStatus\"\n [placeholder]=\"'Select status'\"\n (onChange)=\"filterByStatus($event.value)\"\n [(ngModel)]=\"status\">\n </p-dropdown>\n </div>\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2 d-none\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"30\"\n placeholder=\"Search Subscription...\"\n class=\"mw-90\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"id\">\n {{ 'Admin.Subscriptions.Id' | transloco }}\n <p-sortIcon field=\"id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"organisation\">\n {{ 'Admin.Subscriptions.Organization' | transloco }}\n <p-sortIcon field=\"organisation\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_name\">\n {{ 'Admin.Subscriptions.ContactName' | transloco }}\n <p-sortIcon field=\"contact_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"contact_email\">\n {{ 'Admin.Subscriptions.ContactEmail' | transloco }}\n <p-sortIcon field=\"contact_email\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Product' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Currency' | transloco }}</th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.PricePerMonth' | transloco }}</th>\n <th scope=\"true\"\n pSortableColumn=\"stripe_customer_id\">\n {{ 'Admin.Subscriptions.Paid' | transloco }}\n <p-sortIcon field=\"stripe_customer_id\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Admin.Subscriptions.Billing' | transloco }}</th>\n <th scope=\"true\"\n class=\"expires-at-width\">\n {{ 'Admin.Subscriptions.ExpiresAt' | transloco }}\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_total\">\n {{ 'Admin.Subscriptions.SessionsTotal' | transloco }}\n <p-sortIcon field=\"sessions_total\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"sessions_last_month\">\n {{ 'Admin.Subscriptions.SessionsTotalLastMonth' | transloco }}\n <p-sortIcon field=\"sessions_last_month\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"deleted_at\">\n {{ 'Admin.Subscriptions.Deleted' | transloco }}\n <p-sortIcon field=\"deleted_at\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"id\">{{ item.id }}</td>\n <td data-head=\"Organization\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.organisation\"\n tooltipPosition=\"top\">{{ item.organisation | textTruncate: 20 }}</span>\n </td>\n <td data-head=\"ContactName\"\n class=\"custom-break-word\">\n {{ item.contact_name }}\n </td>\n <td data-head=\"ContactEmail\">{{ item.contact_email }}</td>\n <td data-head=\"Name\">\n <span class=\"cursor-pointer custom-break-word\"\n [pTooltip]=\"item.productName\"\n tooltipPosition=\"top\">{{ item.productName }}</span>\n </td>\n <td data-head=\"Currency\">\n <span [appDynamicBadge]=\"{ itemsArray: currency, item: item.currency }\"\n color=\"blue-grey\"\n class=\"badge\">{{ item.currency }}</span>\n </td>\n <td data-head=\"Price/M\">\n <span>{{ (item.price / 100).toFixed(2) | currency:item.currency }}\n <i\n class=\"fa fa-info-circle\"\n *ngIf=\"item?.discount && objectKeys(item?.discount)?.length\"\n aria-hidden=\"true\"\n [pTooltip]=\"item?.discount | json\"\n tooltipPosition=\"top\"\n ></i>\n </span>\n </td>\n <td data-head=\"Paid\">\n <ng-container *ngIf=\"item?.unsubscribed_at\">\n <span class=\"badge bg-warning\">Unsub</span>\n </ng-container>\n <ng-container *ngIf=\"!item?.unsubscribed_at\">\n <ng-template [ngIf]=\"item?.stripe_customer_id || item?.external_payment\"\n [ngIfElse]=\"noBlock\">\n <span class=\"badge bg-success\">Yes</span>\n </ng-template>\n <ng-template #noBlock>\n <span class=\"badge bg-blue-grey\">No</span>\n </ng-template>\n </ng-container>\n <span *ngIf=\"item?.pause_collection && objectKeys(item?.pause_collection)?.length\"\n class=\"ms-2\"\n [pTooltip]=\"item?.pause_collection | json\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n </td>\n <td data-head=\"Billing\">\n <span class=\"badge\"\n [appDynamicBadge]=\"{\n itemsArray: billingFrequency,\n item: item?.billingFrequency\n }\"\n color=\"blue-grey\">{{ item.billingFrequency }}</span>\n </td>\n <td data-head=\"Expires\">\n <span [ngClass]=\"getExpiresAtColor(item)\">{{item?.expires_at | dateFormat}}</span><br />\n <span>{{item?.created_at | sinceAgo}}</span>\n </td>\n <td data-head=\"S#\">{{ item?.sessions_total }}</td>\n <td data-head=\"S/m #\">\n <span [ngClass]=\"{\n 'text-danger fw-bold': item?.sessions_last_month < 3\n }\">{{ item?.sessions_last_month }}</span>\n </td>\n <td data-head=\"Deleted\">\n <span *ngIf=\"item?.deleted_at\"\n class=\"badge bg-danger\">Yes</span>\n <span *ngIf=\"!item?.deleted_at\"\n class=\"badge bg-blue-grey\">No</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[routers.subscriptionDetails, item.id]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <ng-container *ngIf=\"item.deleted; else showDelete\">\n <li ngbTooltip=\"Reactivate subscription\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Alpha'\"\n (keydown.enter)=\"openRecoverSubscriptionModal(item)\"\n (click)=\"openRecoverSubscriptionModal(item)\">\n <i class=\"fa fa-trash delete-icon text-success\" aria-hidden=\"true\"></i>\n </li>\n </ng-container>\n <ng-template #showDelete>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Subscription.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ng-template>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalRecords === 0 && totalRecordsUnFiltered !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalRecords !== 0\">{{ 'Label.Total' | transloco }}: {{ totalRecords }}</span>\n </div>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Subscriptions.NoSubscriptionMessage' | transloco\" *ngIf=\"totalRecordsUnFiltered === 0 && isLoaded\">\n</pw-no-data>\n<pw-password-validation\n #recoverSubscriptionPasswordModal\n (successEvent)=\"onRecoverConfirmed()\">\n</pw-password-validation>\n\n", styles: [":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: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}@media (min-width: 767px){.table-responsive td,.table-responsive th{font-size:11px!important}}.expires-at-width{width:8%}.custom-break-word{word-break:break-word!important}.summary .card{padding-bottom:0}.summary .card .card-body{padding-top:20px;text-align:center}.summary .card .card-body p,.summary .card .card-body h4{font-size:14px}@media (min-width: 320px) and (max-width: 720px){.primeng-datatable-container .search-filter{display:flex;flex-direction:column;gap:.5rem;justify-content:space-between}}\n"] }]
|
|
7802
7837
|
}], ctorParameters: () => [{ type: i1$2.ProductService }, { type: i1.AdminService }, { type: i3$2.UntypedFormBuilder }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i1$2.CommonService }], propDecorators: { refProduct: [{
|
|
7803
7838
|
type: ViewChild,
|
|
7804
7839
|
args: ['refProduct']
|
|
@@ -8014,7 +8049,7 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8014
8049
|
}
|
|
8015
8050
|
dataURLtoBlob(dataUrl) {
|
|
8016
8051
|
const arr = dataUrl.split(',');
|
|
8017
|
-
const mime =
|
|
8052
|
+
const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];
|
|
8018
8053
|
const bstr = atob(arr[1]);
|
|
8019
8054
|
let n = bstr.length;
|
|
8020
8055
|
const u8arr = new Uint8Array(n);
|
|
@@ -8026,8 +8061,17 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8026
8061
|
handleImageError(event, fallbackPath) {
|
|
8027
8062
|
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
8028
8063
|
}
|
|
8064
|
+
deleteTagImage() {
|
|
8065
|
+
this.image = null;
|
|
8066
|
+
this.file = null;
|
|
8067
|
+
}
|
|
8068
|
+
handleRemovals(data) {
|
|
8069
|
+
if (!this.file && !this.image) {
|
|
8070
|
+
data.remove_image = true;
|
|
8071
|
+
}
|
|
8072
|
+
}
|
|
8029
8073
|
patchForm(data) {
|
|
8030
|
-
this.form.patchValue(data
|
|
8074
|
+
this.form.patchValue(data ?? {});
|
|
8031
8075
|
}
|
|
8032
8076
|
onSave() {
|
|
8033
8077
|
if (this.form.invalid)
|
|
@@ -8056,6 +8100,7 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8056
8100
|
}
|
|
8057
8101
|
});
|
|
8058
8102
|
}
|
|
8103
|
+
this.handleRemovals(data);
|
|
8059
8104
|
data.subscription_id = this.subscriptionId;
|
|
8060
8105
|
const save$ = id
|
|
8061
8106
|
? this.tagService.updateTagById(id, data)
|
|
@@ -8084,11 +8129,11 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8084
8129
|
});
|
|
8085
8130
|
}
|
|
8086
8131
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagDetailsComponent, deps: [{ token: i0.Injector }, { token: i1$2.TagService }, { token: i0.ChangeDetectorRef }, { token: i1$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8087
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TagDetailsComponent, selector: "pw-tag-details", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n {{ currentTag ? 'Edit Tag' : 'Create Tag' }}\n </h3>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Tag Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagName' | transloco\"\n errorMsg=\"This field is required.\" name=\"name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"Tag Name\" />\n </pw-input-container>\n </div>\n\n <!-- Tag Type -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagType' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_type\">\n <p-dropdown [options]=\"tagTypes\" formControlName=\"tag_type\"\n placeholder=\"Tag Types\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Category -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.Category' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_category_id\">\n <p-dropdown [options]=\"tagCategories\" formControlName=\"tag_category_id\"\n placeholder=\"Category\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Icon Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.IconName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.IconName' | transloco\"\n name=\"icon_name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"icon_name\" placeholder=\"Icon Name\" />\n </pw-input-container>\n </div>\n\n <!-- Visible In Resources -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Label.Title' | transloco\" name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" placeholder=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.VisibleInResources' | transloco\"\n [label]=\"'Admin.Tags.VisibleInResources' | transloco\"\n name=\"visible_in_resources\">\n <ui-switch class=\"d-block\" formControlName=\"visible_in_resources\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container [label]=\"'Admin.Tags.Description' | transloco\" name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea class=\"form-control\" rows=\"3\" formControlName=\"description\" placeholder=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-4 display-grid mt-2 text-center\">\n <label for=\"tagImage\">{{ 'Admin.Tags.Image' | transloco }}</label>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"image !== null ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openModal(imageModal)\"\n class=\"image cropped-img\"\n [ngClass]=\"{ 'w-100': image === null }\"\n alt=\"Tag Image\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n\n <a aria-label=\"Open image cropper\"\n class=\"d-inline-block mt-2\"\n (click)=\"openModal(imageModal)\">\n {{ currentTag ? 'Edit' : 'Add' }} Image\n </a>\n </div>\n </div>\n\n <!-- Image Upload -->\n </div>\n\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"!form.valid\"\n class=\"btn btn-primary\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #imageModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"], dependencies: [{ kind: "component", type: i3.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i9.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i9.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
8132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TagDetailsComponent, selector: "pw-tag-details", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n {{ currentTag ? 'Edit Tag' : 'Create Tag' }}\n </h3>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Tag Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagName' | transloco\"\n errorMsg=\"This field is required.\" name=\"name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"Tag Name\" />\n </pw-input-container>\n </div>\n\n <!-- Tag Type -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagType' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_type\">\n <p-dropdown [options]=\"tagTypes\" formControlName=\"tag_type\"\n placeholder=\"Tag Types\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Category -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.Category' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_category_id\">\n <p-dropdown [options]=\"tagCategories\" formControlName=\"tag_category_id\"\n placeholder=\"Category\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Icon Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.IconName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.IconName' | transloco\"\n name=\"icon_name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"icon_name\" placeholder=\"Icon Name\" />\n </pw-input-container>\n </div>\n\n <!-- Visible In Resources -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Label.Title' | transloco\" name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" placeholder=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.VisibleInResources' | transloco\"\n [label]=\"'Admin.Tags.VisibleInResources' | transloco\"\n name=\"visible_in_resources\">\n <ui-switch class=\"d-block\" formControlName=\"visible_in_resources\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container [label]=\"'Admin.Tags.Description' | transloco\" name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea class=\"form-control\" rows=\"3\" formControlName=\"description\" placeholder=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-4 display-grid mt-2 text-center\">\n <label for=\"tagImage\">{{ 'Admin.Tags.Image' | transloco }}</label>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"image !== null ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openModal(imageModal)\"\n (keydown.enter)=\"openModal(imageModal)\"\n class=\"image cropped-img\"\n [ngClass]=\"{ 'w-100': image === null }\"\n alt=\"Tag preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a aria-label=\"Open image cropper\"\n class=\"d-inline-block mt-2\"\n (click)=\"openModal(imageModal)\">\n {{ currentTag ? 'Update' : 'Add' }} Image\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteTagImage()\"\n (keydown.enter)=\"deleteTagImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg') && !image.includes('no_image_uploaded_squared.png')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Image Upload -->\n </div>\n\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"!form.valid\"\n class=\"btn btn-primary\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #imageModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"], dependencies: [{ kind: "component", type: i3.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i9.ProfileImageCropperComponent, selector: "pw-image-cropper", inputs: ["aspectRatio", "dynamicData"], outputs: ["imageSelectionEvent", "closeEvent", "fileChangeEvent"] }, { kind: "component", type: i9.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i10.LazyImgDirective, selector: "img" }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
8088
8133
|
}
|
|
8089
8134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagDetailsComponent, decorators: [{
|
|
8090
8135
|
type: Component,
|
|
8091
|
-
args: [{ selector: 'pw-tag-details', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n {{ currentTag ? 'Edit Tag' : 'Create Tag' }}\n </h3>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Tag Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagName' | transloco\"\n errorMsg=\"This field is required.\" name=\"name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"Tag Name\" />\n </pw-input-container>\n </div>\n\n <!-- Tag Type -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagType' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_type\">\n <p-dropdown [options]=\"tagTypes\" formControlName=\"tag_type\"\n placeholder=\"Tag Types\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Category -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.Category' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_category_id\">\n <p-dropdown [options]=\"tagCategories\" formControlName=\"tag_category_id\"\n placeholder=\"Category\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Icon Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.IconName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.IconName' | transloco\"\n name=\"icon_name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"icon_name\" placeholder=\"Icon Name\" />\n </pw-input-container>\n </div>\n\n <!-- Visible In Resources -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Label.Title' | transloco\" name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" placeholder=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.VisibleInResources' | transloco\"\n [label]=\"'Admin.Tags.VisibleInResources' | transloco\"\n name=\"visible_in_resources\">\n <ui-switch class=\"d-block\" formControlName=\"visible_in_resources\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container [label]=\"'Admin.Tags.Description' | transloco\" name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea class=\"form-control\" rows=\"3\" formControlName=\"description\" placeholder=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-4 display-grid mt-2 text-center\">\n <label for=\"tagImage\">{{ 'Admin.Tags.Image' | transloco }}</label>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"image !== null ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openModal(imageModal)\"\n class=\"image cropped-img\"\n [ngClass]=\"{ 'w-100': image === null }\"\n alt=\"Tag
|
|
8136
|
+
args: [{ selector: 'pw-tag-details', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"dashboard\">\n <div class=\"dashboard-body\">\n <div class=\"me-auto col-xs-6 mt-4\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\">\n <i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i>\n </a>\n <h3 class=\"m-subheader__title m-subheader__title--separator\">\n {{ currentTag ? 'Edit Tag' : 'Create Tag' }}\n </h3>\n </div>\n\n <div class=\"p-2 mt-3\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSave()\">\n <div class=\"row\">\n <!-- Tag Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagName' | transloco\"\n errorMsg=\"This field is required.\" name=\"name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"Tag Name\" />\n </pw-input-container>\n </div>\n\n <!-- Tag Type -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.TagType' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_type\">\n <p-dropdown [options]=\"tagTypes\" formControlName=\"tag_type\"\n placeholder=\"Tag Types\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Category -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.Category' | transloco\"\n errorMsg=\"This field is required.\" name=\"tag_category_id\">\n <p-dropdown [options]=\"tagCategories\" formControlName=\"tag_category_id\"\n placeholder=\"Category\" [style]=\"{ width: '100%' }\">\n </p-dropdown>\n </pw-input-container>\n </div>\n\n <!-- Icon Name -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Admin.Tags.IconName' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.IconName' | transloco\"\n name=\"icon_name\">\n <input type=\"text\" class=\"form-control\" formControlName=\"icon_name\" placeholder=\"Icon Name\" />\n </pw-input-container>\n </div>\n\n <!-- Visible In Resources -->\n <div class=\"col-12 col-md-6\">\n <pw-input-container [label]=\"'Label.Title' | transloco\" name=\"title\"\n errorMsg=\"This field is required.\">\n <input type=\"text\" class=\"form-control\" formControlName=\"title\" placeholder=\"Title\" />\n </pw-input-container>\n </div>\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Tags.Tooltip.VisibleInResources' | transloco\"\n [label]=\"'Admin.Tags.VisibleInResources' | transloco\"\n name=\"visible_in_resources\">\n <ui-switch class=\"d-block\" formControlName=\"visible_in_resources\"></ui-switch>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-8\">\n <pw-input-container [label]=\"'Admin.Tags.Description' | transloco\" name=\"description\"\n errorMsg=\"This field is required.\">\n <textarea class=\"form-control\" rows=\"3\" formControlName=\"description\" placeholder=\"Description\"></textarea>\n </pw-input-container>\n </div>\n\n <div class=\"col-12 col-md-4 display-grid mt-2 text-center\">\n <label for=\"tagImage\">{{ 'Admin.Tags.Image' | transloco }}</label>\n <div class=\"text-center d-flex flex-column align-items-center\">\n <img [src]=\"image !== null ? image : 'assets/img/resource/blog.png'\"\n (click)=\"openModal(imageModal)\"\n (keydown.enter)=\"openModal(imageModal)\"\n class=\"image cropped-img\"\n [ngClass]=\"{ 'w-100': image === null }\"\n alt=\"Tag preview\"\n (error)=\"handleImageError($event, 'assets/img/resource/blog.png')\" />\n <div class=\"d-flex justify-content-between align-items-center mt-2\">\n <a aria-label=\"Open image cropper\"\n class=\"d-inline-block mt-2\"\n (click)=\"openModal(imageModal)\">\n {{ currentTag ? 'Update' : 'Add' }} Image\n </a>\n <i\n class=\"fa fa-trash delete-icon text-danger ms-2\"\n title=\"Remove Image\"\n (click)=\"deleteTagImage()\"\n (keydown.enter)=\"deleteTagImage()\"\n style=\"cursor: pointer;\"\n *ngIf=\"image && !image.includes('default-photo.jpg') && !image.includes('no_image_uploaded_squared.png')\">\n </i>\n </div>\n </div>\n </div>\n\n <!-- Image Upload -->\n </div>\n\n <div class=\"row text-end mt-4\">\n <div class=\"col-12\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"back()\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"!form.valid\"\n class=\"btn btn-primary\">\n {{ 'Button.Save' | transloco }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\n<ng-template #imageModal let-modal>\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">Upload Image</h5>\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"Close\" (click)=\"modal.dismiss()\"></button>\n </div>\n <div class=\"modal-body\">\n <small>You can upload a JPG, GIF, or PNG file. Avoid artwork, celebrities, or copyrighted images.</small>\n <pw-image-cropper\n #cropper\n aspectRatio=\"dynamic\"\n (imageSelectionEvent)=\"onImageSelected($event)\"\n (closeEvent)=\"onClose()\">\n </pw-image-cropper>\n </div>\n</ng-template>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"] }]
|
|
8092
8137
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$2.TagService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }] });
|
|
8093
8138
|
|
|
8094
8139
|
class TagsListComponent extends AppBaseComponent {
|
|
@@ -8167,7 +8212,7 @@ class TagsListComponent extends AppBaseComponent {
|
|
|
8167
8212
|
this.tagService.getAvailableTagType(this.subscriptionId).subscribe(response => {
|
|
8168
8213
|
response.available_tag_types.forEach(element => {
|
|
8169
8214
|
this.tagTypes.push({
|
|
8170
|
-
label: element
|
|
8215
|
+
label: element ?? '',
|
|
8171
8216
|
value: element
|
|
8172
8217
|
});
|
|
8173
8218
|
});
|
|
@@ -8206,11 +8251,11 @@ class TagsListComponent extends AppBaseComponent {
|
|
|
8206
8251
|
super.ngOnDestroy();
|
|
8207
8252
|
}
|
|
8208
8253
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagsListComponent, deps: [{ token: i0.Injector }, { token: i1$1.NgbModal }, { token: i1$2.TagService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8209
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TagsListComponent, selector: "pw-admin-tags-list", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Tags</h2>\n <button *rbacAllow=\"'Pages.Admin.Roles.Create'\" data-cy=\"create-tag\" class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createTag]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Create Tag </button>\n </div>\n</div>\n\n<div class=\"p-2\">\n <p>\n Here you can define the tags to be used site-wide.<br /> Tags need to be associated to categories (definable in the\n \"category\" tab).<br /> Tags also need to be associated to a \"tag_type\", which is the entity you want to associate the\n tag to, for example \"user\".\n </p>\n</div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n\n<div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalTagRecordsUnFilter === 0\">\n <p-table #dt\n [value]=\"tags\"\n [paginator]=\"totalTagRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [totalRecords]=\"totalTagRecords\"\n [filterDelay]=\"1000\"\n [customSort]=\"true\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search Tag...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"name\">\n {{ 'Label.Name' | transloco }}\n <p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"tag_category_id\">\n {{ 'Admin.Tags.Category' | transloco }}\n <p-sortIcon field=\"tag_category_id\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Name\">{{ item?.name }}</td>\n <td data-head=\"Category\">\n <span [appDynamicBadge]=\"{\n itemsArray: tagCategoryNames,\n item: item?.category_name\n }\"\n color=\"cyan\"\n class=\"badge\">{{ item?.category_name }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Edit'\"\n (click)=\"navigateToEdit(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalTagRecords === 0 && totalTagRecordsUnFilter !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalTagRecords !== 0\" >{{ 'Label.Total' | transloco }}: {{ totalTagRecords }}</span>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Tags.Category' | transloco\"\n *ngIf=\"totalTagRecordsUnFilter === 0 && !loading\">\n</pw-no-data>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }] }); }
|
|
8254
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: TagsListComponent, selector: "pw-admin-tags-list", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Tags</h2>\n <button *rbacAllow=\"'Pages.Admin.Roles.Create'\" data-cy=\"create-tag\" class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createTag]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Create Tag </button>\n </div>\n</div>\n\n<div class=\"p-2\">\n <p>\n Here you can define the tags to be used site-wide.<br /> Tags need to be associated to categories (definable in the\n \"category\" tab).<br /> Tags also need to be associated to a \"tag_type\", which is the entity you want to associate the\n tag to, for example \"user\".\n </p>\n</div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n\n<div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalTagRecordsUnFilter === 0\">\n <p-table #dt\n [value]=\"tags\"\n [paginator]=\"totalTagRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [totalRecords]=\"totalTagRecords\"\n [filterDelay]=\"1000\"\n [customSort]=\"true\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search Tag...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"name\">\n {{ 'Label.Name' | transloco }}\n <p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"tag_category_id\">\n {{ 'Admin.Tags.Category' | transloco }}\n <p-sortIcon field=\"tag_category_id\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Name\">{{ item?.name }}</td>\n <td data-head=\"Category\">\n <span [appDynamicBadge]=\"{\n itemsArray: tagCategoryNames,\n item: item?.category_name\n }\"\n color=\"cyan\"\n class=\"badge\">{{ item?.category_name }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Edit'\"\n (keydown.enter)=\"navigateToEdit(item)\"\n (click)=\"navigateToEdit(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalTagRecords === 0 && totalTagRecordsUnFilter !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalTagRecords !== 0\" >{{ 'Label.Total' | transloco }}: {{ totalTagRecords }}</span>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Tags.Category' | transloco\"\n *ngIf=\"totalTagRecordsUnFilter === 0 && !loading\">\n</pw-no-data>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"], dependencies: [{ kind: "component", type: i2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "directive", type: i4$1.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i9.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i10.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color", "colorByName", "dataName"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i1$1.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }] }); }
|
|
8210
8255
|
}
|
|
8211
8256
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagsListComponent, decorators: [{
|
|
8212
8257
|
type: Component,
|
|
8213
|
-
args: [{ selector: 'pw-admin-tags-list', template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Tags</h2>\n <button *rbacAllow=\"'Pages.Admin.Roles.Create'\" data-cy=\"create-tag\" class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createTag]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Create Tag </button>\n </div>\n</div>\n\n<div class=\"p-2\">\n <p>\n Here you can define the tags to be used site-wide.<br /> Tags need to be associated to categories (definable in the\n \"category\" tab).<br /> Tags also need to be associated to a \"tag_type\", which is the entity you want to associate the\n tag to, for example \"user\".\n </p>\n</div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n\n<div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalTagRecordsUnFilter === 0\">\n <p-table #dt\n [value]=\"tags\"\n [paginator]=\"totalTagRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [totalRecords]=\"totalTagRecords\"\n [filterDelay]=\"1000\"\n [customSort]=\"true\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search Tag...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"name\">\n {{ 'Label.Name' | transloco }}\n <p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"tag_category_id\">\n {{ 'Admin.Tags.Category' | transloco }}\n <p-sortIcon field=\"tag_category_id\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Name\">{{ item?.name }}</td>\n <td data-head=\"Category\">\n <span [appDynamicBadge]=\"{\n itemsArray: tagCategoryNames,\n item: item?.category_name\n }\"\n color=\"cyan\"\n class=\"badge\">{{ item?.category_name }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Edit'\"\n (click)=\"navigateToEdit(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalTagRecords === 0 && totalTagRecordsUnFilter !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalTagRecords !== 0\" >{{ 'Label.Total' | transloco }}: {{ totalTagRecords }}</span>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Tags.Category' | transloco\"\n *ngIf=\"totalTagRecordsUnFilter === 0 && !loading\">\n</pw-no-data>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"] }]
|
|
8258
|
+
args: [{ selector: 'pw-admin-tags-list', template: "<div class=\"row\">\n <div class=\"col-12 d-flex justify-content-between align-items-center\">\n <h2 class=\"card-title p-0 float-start\">Tags</h2>\n <button *rbacAllow=\"'Pages.Admin.Roles.Create'\" data-cy=\"create-tag\" class=\"btn btn-sm btn-outline-primary float-end\"\n [routerLink]=\"['/' + routers.createTag]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Create Tag </button>\n </div>\n</div>\n\n<div class=\"p-2\">\n <p>\n Here you can define the tags to be used site-wide.<br /> Tags need to be associated to categories (definable in the\n \"category\" tab).<br /> Tags also need to be associated to a \"tag_type\", which is the entity you want to associate the\n tag to, for example \"user\".\n </p>\n</div>\n\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n\n\n<div class=\"primeng-datatable-container table-responsive mt-0\"\n [class.hideTable]=\"totalTagRecordsUnFilter === 0\">\n <p-table #dt\n [value]=\"tags\"\n [paginator]=\"totalTagRecords !== 0\"\n [rows]=\"PAGE_SIZE\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [lazy]=\"true\"\n [totalRecords]=\"totalTagRecords\"\n [filterDelay]=\"1000\"\n [customSort]=\"true\"\n [loading]=\"loading\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search Tag...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"name\">\n {{ 'Label.Name' | transloco }}\n <p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"tag_category_id\">\n {{ 'Admin.Tags.Category' | transloco }}\n <p-sortIcon field=\"tag_category_id\"></p-sortIcon>\n </th>\n <th class=\"actions-list-two\"\n scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr>\n <td data-head=\"Name\">{{ item?.name }}</td>\n <td data-head=\"Category\">\n <span [appDynamicBadge]=\"{\n itemsArray: tagCategoryNames,\n item: item?.category_name\n }\"\n color=\"cyan\"\n class=\"badge\">{{ item?.category_name }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Edit'\"\n (keydown.enter)=\"navigateToEdit(item)\"\n (click)=\"navigateToEdit(item)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\"\n *rbacAllow=\"'Pages.Admin.Roles.Delete'\"\n (keydown.enter)=\"onDelete(item)\"\n (click)=\"onDelete(item)\">\n <i class=\"fa fa-trash delete-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"totalTagRecords === 0 && totalTagRecordsUnFilter !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n <span class=\"total-records-count\" *ngIf=\"totalTagRecords !== 0\" >{{ 'Label.Total' | transloco }}: {{ totalTagRecords }}</span>\n</div>\n<pw-no-data [withImage]=\"true\" [message]=\"'Admin.Tags.Category' | transloco\"\n *ngIf=\"totalTagRecordsUnFilter === 0 && !loading\">\n</pw-no-data>\n", styles: ["::ng-deep .icon-name-input .info-circle .tooltiptext:after{left:76px!important}::ng-deep .icon-name-input .info-circle .tooltiptext{left:-81px!important}.cropped-img{max-width:100%!important;max-height:400px!important}\n"] }]
|
|
8214
8259
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.NgbModal }, { type: i1$2.TagService }, { type: i0.ChangeDetectorRef }] });
|
|
8215
8260
|
|
|
8216
8261
|
class TagsTabsComponent {
|
|
@@ -8635,10 +8680,8 @@ class AhoyEventsComponent extends AppBaseComponent {
|
|
|
8635
8680
|
}
|
|
8636
8681
|
getAhoyEvents(paging) {
|
|
8637
8682
|
this.isLoaded = false;
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
service = this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8641
|
-
}
|
|
8683
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
8684
|
+
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8642
8685
|
const obj = {
|
|
8643
8686
|
...paging,
|
|
8644
8687
|
...(this.startDate && this.endDate
|
|
@@ -8648,7 +8691,8 @@ class AhoyEventsComponent extends AppBaseComponent {
|
|
|
8648
8691
|
}
|
|
8649
8692
|
: {}),
|
|
8650
8693
|
search: this.searchText || '',
|
|
8651
|
-
user_ids: this.selectedOption
|
|
8694
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
8695
|
+
// NOSONAR
|
|
8652
8696
|
};
|
|
8653
8697
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
8654
8698
|
this.ahoyService
|
|
@@ -8776,10 +8820,8 @@ class AhoyMessagesComponent extends AppBaseComponent {
|
|
|
8776
8820
|
}
|
|
8777
8821
|
getAhoyMessages(paging) {
|
|
8778
8822
|
this.isLoaded = false;
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
service = this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8782
|
-
}
|
|
8823
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
8824
|
+
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8783
8825
|
const obj = {
|
|
8784
8826
|
...paging,
|
|
8785
8827
|
...(this.startDate && this.endDate
|
|
@@ -8789,7 +8831,8 @@ class AhoyMessagesComponent extends AppBaseComponent {
|
|
|
8789
8831
|
}
|
|
8790
8832
|
: {}),
|
|
8791
8833
|
search: this.searchText || '',
|
|
8792
|
-
user_ids: this.selectedOption
|
|
8834
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
8835
|
+
// NOSONAR
|
|
8793
8836
|
};
|
|
8794
8837
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
8795
8838
|
this.ahoyService
|
|
@@ -8999,7 +9042,7 @@ class AhoyVisitsComponent extends AppBaseComponent {
|
|
|
8999
9042
|
}
|
|
9000
9043
|
getAhoyVisits(paging) {
|
|
9001
9044
|
this.isLoaded = false;
|
|
9002
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9045
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9003
9046
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9004
9047
|
const obj = {
|
|
9005
9048
|
...paging,
|
|
@@ -9010,7 +9053,8 @@ class AhoyVisitsComponent extends AppBaseComponent {
|
|
|
9010
9053
|
}
|
|
9011
9054
|
: {}),
|
|
9012
9055
|
search: this.searchText || '',
|
|
9013
|
-
user_ids: this.selectedOption
|
|
9056
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9057
|
+
// NOSONAR
|
|
9014
9058
|
};
|
|
9015
9059
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9016
9060
|
this.ahoyService
|
|
@@ -9173,7 +9217,7 @@ class EventsComponent extends AppBaseComponent {
|
|
|
9173
9217
|
}
|
|
9174
9218
|
getEvents(paging) {
|
|
9175
9219
|
this.isLoaded = false;
|
|
9176
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9220
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9177
9221
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9178
9222
|
const obj = {
|
|
9179
9223
|
...paging,
|
|
@@ -9184,7 +9228,8 @@ class EventsComponent extends AppBaseComponent {
|
|
|
9184
9228
|
}
|
|
9185
9229
|
: {}),
|
|
9186
9230
|
search: this.searchText || '',
|
|
9187
|
-
user_ids: this.selectedOption
|
|
9231
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9232
|
+
// NOSONAR
|
|
9188
9233
|
};
|
|
9189
9234
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9190
9235
|
this.ahoyService
|
|
@@ -9353,7 +9398,7 @@ class VersionsComponent extends AppBaseComponent {
|
|
|
9353
9398
|
}
|
|
9354
9399
|
getVersions(paging) {
|
|
9355
9400
|
this.isLoaded = false;
|
|
9356
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9401
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9357
9402
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9358
9403
|
const obj = {
|
|
9359
9404
|
...paging,
|
|
@@ -9364,7 +9409,7 @@ class VersionsComponent extends AppBaseComponent {
|
|
|
9364
9409
|
}
|
|
9365
9410
|
: {}),
|
|
9366
9411
|
search: this.searchText || '',
|
|
9367
|
-
user_ids: this.selectedOption
|
|
9412
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9368
9413
|
};
|
|
9369
9414
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9370
9415
|
this.ahoyService
|
|
@@ -9516,7 +9561,7 @@ class UserDetailsComponent extends AppBaseComponent {
|
|
|
9516
9561
|
.getUserById(this.id, this.subscriptionId)
|
|
9517
9562
|
.subscribe(user => {
|
|
9518
9563
|
this.user = user;
|
|
9519
|
-
this.user.send_marketing_emails = user.send_marketing_emails
|
|
9564
|
+
this.user.send_marketing_emails = user.send_marketing_emails ?? false;
|
|
9520
9565
|
this.form.patchValue(user);
|
|
9521
9566
|
})
|
|
9522
9567
|
.add(() => {
|
|
@@ -9557,7 +9602,10 @@ class UserDetailsComponent extends AppBaseComponent {
|
|
|
9557
9602
|
.createUser(this.form.value)
|
|
9558
9603
|
.subscribe(response => {
|
|
9559
9604
|
if (response.error) {
|
|
9560
|
-
this.toast.error(`${Object.keys(response.error.message)[0]} ${Object.values(response.error.message)
|
|
9605
|
+
this.toast.error(`${Object.keys(response.error.message)[0]} ${Object.values(response.error.message)
|
|
9606
|
+
.flat()
|
|
9607
|
+
.map(value => typeof value === 'string' ? value : JSON.stringify(value))
|
|
9608
|
+
.join('')}`);
|
|
9561
9609
|
}
|
|
9562
9610
|
else {
|
|
9563
9611
|
this.toast.success(this.translation.translate('Admin.Users.AddedMessage'));
|
|
@@ -9736,7 +9784,7 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9736
9784
|
});
|
|
9737
9785
|
}
|
|
9738
9786
|
initializeSearchText(res) {
|
|
9739
|
-
this.searchText = res?.searchText
|
|
9787
|
+
this.searchText = res?.searchText ?? '';
|
|
9740
9788
|
}
|
|
9741
9789
|
initializeSelectedOption(res) {
|
|
9742
9790
|
if (res?.selectedOption?.value) {
|
|
@@ -9746,24 +9794,24 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9746
9794
|
}
|
|
9747
9795
|
initializeSearchDataSource(res) {
|
|
9748
9796
|
if (res?.searchDataSource?.length) {
|
|
9749
|
-
this.searchDataSource = res?.searchDataSource
|
|
9797
|
+
this.searchDataSource = res?.searchDataSource ?? [];
|
|
9750
9798
|
}
|
|
9751
9799
|
}
|
|
9752
9800
|
initializeCriteria(res) {
|
|
9753
9801
|
if (res?.selectedOption?.value === 'feature_key') {
|
|
9754
|
-
this.criteria = res?.filterByFeatureKeys
|
|
9802
|
+
this.criteria = res?.filterByFeatureKeys ?? [];
|
|
9755
9803
|
}
|
|
9756
9804
|
if (res?.selectedOption?.value === 'product') {
|
|
9757
|
-
this.criteria = res?.filterByProducts
|
|
9805
|
+
this.criteria = res?.filterByProducts ?? [];
|
|
9758
9806
|
}
|
|
9759
9807
|
if (res?.selectedOption?.value === 'role') {
|
|
9760
|
-
this.criteria = res?.filterByRoles
|
|
9808
|
+
this.criteria = res?.filterByRoles ?? [];
|
|
9761
9809
|
}
|
|
9762
9810
|
}
|
|
9763
9811
|
initializeFilters(res) {
|
|
9764
|
-
this.filterByFeatureKeys = res?.filterByFeatureKeys
|
|
9765
|
-
this.filterByProducts = res?.filterByProducts
|
|
9766
|
-
this.filterByRoles = res?.filterByRoles
|
|
9812
|
+
this.filterByFeatureKeys = res?.filterByFeatureKeys ?? [];
|
|
9813
|
+
this.filterByProducts = res?.filterByProducts ?? [];
|
|
9814
|
+
this.filterByRoles = res?.filterByRoles ?? [];
|
|
9767
9815
|
}
|
|
9768
9816
|
ngAfterViewChecked() {
|
|
9769
9817
|
this.cdr.detectChanges();
|
|
@@ -9800,13 +9848,13 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9800
9848
|
this.productList = resp.products.map(element => {
|
|
9801
9849
|
return {
|
|
9802
9850
|
value: element.id,
|
|
9803
|
-
label: element.name
|
|
9851
|
+
label: element.name ?? ''
|
|
9804
9852
|
};
|
|
9805
9853
|
});
|
|
9806
9854
|
this.featureKeysList = resp.products.map(element => {
|
|
9807
9855
|
return {
|
|
9808
9856
|
value: element.feature_key,
|
|
9809
|
-
label: element.feature_key
|
|
9857
|
+
label: element.feature_key ?? ''
|
|
9810
9858
|
};
|
|
9811
9859
|
});
|
|
9812
9860
|
this.productList.unshift({
|