@posiwise/admin-module 0.0.161 → 0.0.163
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 +154 -105
- 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 +291 -241
- 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,14 +1279,16 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1233
1279
|
}
|
|
1234
1280
|
const abTestsArray = this.abTests;
|
|
1235
1281
|
abTestsArray.clear();
|
|
1236
|
-
(res.config?.ab_tests
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1282
|
+
if (Array.isArray(res.config?.ab_tests)) {
|
|
1283
|
+
(res.config?.ab_tests ?? []).forEach(test => {
|
|
1284
|
+
abTestsArray.push(this.fb.group({
|
|
1285
|
+
description: [test?.description ?? ''],
|
|
1286
|
+
experiment_name: [test?.experiment_name ?? ''],
|
|
1287
|
+
db_shard: [test?.db_shard ?? ''],
|
|
1288
|
+
microservice_name: [test?.microservice_name ?? '']
|
|
1289
|
+
}));
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1244
1292
|
})
|
|
1245
1293
|
.add(() => {
|
|
1246
1294
|
this.isLoading = false;
|
|
@@ -1264,7 +1312,7 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1264
1312
|
}
|
|
1265
1313
|
searchProduct(event) {
|
|
1266
1314
|
this.productService
|
|
1267
|
-
.getProductList({ search: event?.query
|
|
1315
|
+
.getProductList({ search: event?.query ?? '' }, this.subscriptionId)
|
|
1268
1316
|
.subscribe(response => {
|
|
1269
1317
|
this.productsList = this.groupProducts(response.products);
|
|
1270
1318
|
});
|
|
@@ -1355,10 +1403,10 @@ class DomainConfigBuildComponent extends AppBaseComponent {
|
|
|
1355
1403
|
subscription_id: this.subscriptionId,
|
|
1356
1404
|
...this.form.value
|
|
1357
1405
|
};
|
|
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
|
|
1406
|
+
data.cs_product_id = this.form.get('cs_product_id').value?.id ?? null;
|
|
1407
|
+
data.trial_product_id = this.form.get('trial_product_id').value?.id ?? null;
|
|
1408
|
+
data['cs_cta_iframe'] = this.form.value?.cs_cta_iframe ?? '';
|
|
1409
|
+
data['trial_cta_iframe'] = this.form.value?.trial_cta_iframe ?? '';
|
|
1362
1410
|
const sub$ = this.id
|
|
1363
1411
|
? this.adminService.updateDomainConfig(this.id, data)
|
|
1364
1412
|
: this.adminService.createDomainConfig(data);
|
|
@@ -1536,7 +1584,7 @@ class DomainConfigOrganizationComponent extends AppBaseComponent {
|
|
|
1536
1584
|
getDomainConfigDetails() {
|
|
1537
1585
|
this.isLoading = true;
|
|
1538
1586
|
this.adminService
|
|
1539
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1587
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1540
1588
|
.subscribe((response) => {
|
|
1541
1589
|
this.data = response;
|
|
1542
1590
|
this.form.patchValue(this.data);
|
|
@@ -1611,7 +1659,7 @@ class DomainConfigSecurityComponent extends AppBaseComponent {
|
|
|
1611
1659
|
getDomainConfigDetails() {
|
|
1612
1660
|
this.isLoading = true;
|
|
1613
1661
|
this.adminService
|
|
1614
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1662
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1615
1663
|
.subscribe((response) => {
|
|
1616
1664
|
this.data = response;
|
|
1617
1665
|
this.form.patchValue(this.data);
|
|
@@ -1686,7 +1734,7 @@ class DomainConfigSocialComponent extends AppBaseComponent {
|
|
|
1686
1734
|
getDomainConfigDetails() {
|
|
1687
1735
|
this.isLoading = true;
|
|
1688
1736
|
this.adminService
|
|
1689
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1737
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1690
1738
|
.subscribe(response => {
|
|
1691
1739
|
this.data = response;
|
|
1692
1740
|
this.form.patchValue(this.data);
|
|
@@ -1761,7 +1809,7 @@ class DomainConfigIntegrationsComponent extends AppBaseComponent {
|
|
|
1761
1809
|
getDomainConfigDetails() {
|
|
1762
1810
|
this.isLoading = true;
|
|
1763
1811
|
this.adminService
|
|
1764
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1812
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1765
1813
|
.subscribe((response) => {
|
|
1766
1814
|
this.data = response;
|
|
1767
1815
|
this.form.patchValue(this.data);
|
|
@@ -1853,7 +1901,7 @@ class DomainConfigInterfaceComponent extends AppBaseComponent {
|
|
|
1853
1901
|
getDomainConfigDetails() {
|
|
1854
1902
|
this.isLoading = true;
|
|
1855
1903
|
this.adminService
|
|
1856
|
-
.getDomainConfigById(this.duplicateConfigId
|
|
1904
|
+
.getDomainConfigById(HelperService.effectiveConfigId(this.duplicateConfigId, this.id), this.subscriptionId)
|
|
1857
1905
|
.subscribe((response) => {
|
|
1858
1906
|
this.data = response;
|
|
1859
1907
|
this.form.patchValue(this.data);
|
|
@@ -1954,7 +2002,7 @@ class DomainConfigDetailsComponent extends AppBaseComponent {
|
|
|
1954
2002
|
}
|
|
1955
2003
|
});
|
|
1956
2004
|
this.route.queryParams.subscribe(res => {
|
|
1957
|
-
this.activeTab = res['tabId']
|
|
2005
|
+
this.activeTab = res['tabId'] ?? 'Core';
|
|
1958
2006
|
});
|
|
1959
2007
|
}
|
|
1960
2008
|
onTabChange(event) {
|
|
@@ -2147,7 +2195,7 @@ class AddFaqComponent extends AppBaseComponent {
|
|
|
2147
2195
|
});
|
|
2148
2196
|
this.categoryForBadges = response.available_category.map(x => x.key);
|
|
2149
2197
|
this.categories = response.available_category.map(element => {
|
|
2150
|
-
return { label: element.name
|
|
2198
|
+
return { label: element.name ?? '', value: element.key };
|
|
2151
2199
|
});
|
|
2152
2200
|
this.allFaqs = this.faqs;
|
|
2153
2201
|
this.faqList = this.faqs;
|
|
@@ -2188,7 +2236,7 @@ class AddFaqComponent extends AppBaseComponent {
|
|
|
2188
2236
|
this.featureKeysList = featureKeys.map(element => {
|
|
2189
2237
|
return {
|
|
2190
2238
|
value: element,
|
|
2191
|
-
label: element
|
|
2239
|
+
label: element ?? ''
|
|
2192
2240
|
};
|
|
2193
2241
|
});
|
|
2194
2242
|
}
|
|
@@ -2331,7 +2379,7 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
2331
2379
|
this.categories = [];
|
|
2332
2380
|
this.commonService.getFaqCategories(this.subscriptionId).subscribe(response => {
|
|
2333
2381
|
this.categories = response.map(element => {
|
|
2334
|
-
return { label: element.name
|
|
2382
|
+
return { label: element.name ?? '', value: element.key };
|
|
2335
2383
|
});
|
|
2336
2384
|
});
|
|
2337
2385
|
}
|
|
@@ -2384,7 +2432,7 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
2384
2432
|
this.featureKeysList = featureKeys.map(element => {
|
|
2385
2433
|
return {
|
|
2386
2434
|
value: element,
|
|
2387
|
-
label: element
|
|
2435
|
+
label: element ?? ''
|
|
2388
2436
|
};
|
|
2389
2437
|
});
|
|
2390
2438
|
}
|
|
@@ -2535,7 +2583,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2535
2583
|
this.categoryForBadges = response.available_category.map(x => x.key);
|
|
2536
2584
|
categories.forEach(element => {
|
|
2537
2585
|
this.categories.push({
|
|
2538
|
-
label: element.name
|
|
2586
|
+
label: element.name ?? '',
|
|
2539
2587
|
value: element.key
|
|
2540
2588
|
});
|
|
2541
2589
|
});
|
|
@@ -2546,7 +2594,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2546
2594
|
/** Function to filter faq list */
|
|
2547
2595
|
filterFaq() {
|
|
2548
2596
|
if (this.searchText) {
|
|
2549
|
-
const searchedList = this.faqList.filter(faq => faq['question'].toLowerCase().includes(this.searchText.toLowerCase())
|
|
2597
|
+
const searchedList = this.faqList.filter(faq => faq['question'].toLowerCase().includes(this.searchText.toLowerCase()) ??
|
|
2550
2598
|
faq['answer'].toLowerCase().includes(this.searchText.toLowerCase()));
|
|
2551
2599
|
this.faqs = searchedList;
|
|
2552
2600
|
}
|
|
@@ -2574,7 +2622,7 @@ class FaqListComponent extends AppBaseComponent {
|
|
|
2574
2622
|
this.featureKeysList = featureKeys.map(element => {
|
|
2575
2623
|
return {
|
|
2576
2624
|
value: element,
|
|
2577
|
-
label: element
|
|
2625
|
+
label: element ?? ''
|
|
2578
2626
|
};
|
|
2579
2627
|
});
|
|
2580
2628
|
}
|
|
@@ -3314,7 +3362,7 @@ class LoginNotificationDetailsComponent extends AppBaseComponent {
|
|
|
3314
3362
|
this.form.patchValue({
|
|
3315
3363
|
visible_until: data?.visible_until ? new Date(data?.visible_until) : '',
|
|
3316
3364
|
visible_from: data?.visible_from ? new Date(data?.visible_from) : '',
|
|
3317
|
-
feature_keys: data?.feature_keys
|
|
3365
|
+
feature_keys: data?.feature_keys ?? [],
|
|
3318
3366
|
notification_type: data?.notification_type,
|
|
3319
3367
|
is_permanent: data?.is_permanent,
|
|
3320
3368
|
body: data?.body
|
|
@@ -4868,7 +4916,7 @@ class ProductDetailsComponent extends AppBaseComponent {
|
|
|
4868
4916
|
this.productsList = resp.products.map(element => {
|
|
4869
4917
|
return {
|
|
4870
4918
|
value: element.id,
|
|
4871
|
-
label: element.name
|
|
4919
|
+
label: element.name ?? ''
|
|
4872
4920
|
};
|
|
4873
4921
|
});
|
|
4874
4922
|
}
|
|
@@ -4918,7 +4966,7 @@ class ProductDetailsComponent extends AppBaseComponent {
|
|
|
4918
4966
|
if (response?.categories) {
|
|
4919
4967
|
response.categories.forEach(element => {
|
|
4920
4968
|
const item = {
|
|
4921
|
-
label: element
|
|
4969
|
+
label: element ?? '',
|
|
4922
4970
|
value: element
|
|
4923
4971
|
};
|
|
4924
4972
|
this.categories.push(item);
|
|
@@ -5221,7 +5269,7 @@ class ProductsListComponent extends AppBaseComponent {
|
|
|
5221
5269
|
this.featureKeysList = response.products.map(element => {
|
|
5222
5270
|
return {
|
|
5223
5271
|
value: element.feature_key,
|
|
5224
|
-
label: element.feature_key
|
|
5272
|
+
label: element.feature_key ?? ''
|
|
5225
5273
|
};
|
|
5226
5274
|
});
|
|
5227
5275
|
this.featureKeysList = uniqBy(this.featureKeysList, 'label');
|
|
@@ -5258,7 +5306,7 @@ class ProductsListComponent extends AppBaseComponent {
|
|
|
5258
5306
|
getCategories() {
|
|
5259
5307
|
this.productService.getProductCategories().subscribe(response => {
|
|
5260
5308
|
if (response?.categories) {
|
|
5261
|
-
this.categories = response?.categories
|
|
5309
|
+
this.categories = response?.categories ?? [];
|
|
5262
5310
|
}
|
|
5263
5311
|
});
|
|
5264
5312
|
}
|
|
@@ -5389,7 +5437,7 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5389
5437
|
}
|
|
5390
5438
|
this.route.params.subscribe(params => {
|
|
5391
5439
|
console.log(params['slug']);
|
|
5392
|
-
this.slug = params['slug']
|
|
5440
|
+
this.slug = params['slug'] ?? '';
|
|
5393
5441
|
if (this.slug !== 'create') {
|
|
5394
5442
|
this.getBlogItem(this.slug);
|
|
5395
5443
|
}
|
|
@@ -5511,53 +5559,65 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5511
5559
|
}
|
|
5512
5560
|
onUpdate() {
|
|
5513
5561
|
const data = { ...this.form.value };
|
|
5514
|
-
|
|
5562
|
+
this.handleRectangularPicture(data);
|
|
5563
|
+
this.handlePicture(data);
|
|
5564
|
+
this.handlePublishedAt(data);
|
|
5565
|
+
this.handleAcceptedAt(data);
|
|
5566
|
+
this.handleOptionalFields(data);
|
|
5567
|
+
this.handleRemovals(data);
|
|
5568
|
+
this.updatePost(data);
|
|
5569
|
+
}
|
|
5570
|
+
handleRectangularPicture(data) {
|
|
5515
5571
|
if (this.rectangularFile) {
|
|
5516
5572
|
data.rectangular_picture = this.rectangularFile;
|
|
5517
5573
|
}
|
|
5518
5574
|
else {
|
|
5519
5575
|
delete data.rectangular_picture;
|
|
5520
5576
|
}
|
|
5577
|
+
}
|
|
5578
|
+
handlePicture(data) {
|
|
5521
5579
|
if (this.file) {
|
|
5522
5580
|
data.picture = this.file;
|
|
5523
5581
|
}
|
|
5524
5582
|
else {
|
|
5525
5583
|
delete data.picture;
|
|
5526
5584
|
}
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
data.published_at = '';
|
|
5533
|
-
}
|
|
5585
|
+
}
|
|
5586
|
+
handlePublishedAt(data) {
|
|
5587
|
+
const control = this.form.get('published_at');
|
|
5588
|
+
if (control?.dirty) {
|
|
5589
|
+
data.published_at = control.value ? moment().format('DD-MMM-YYYY') : '';
|
|
5534
5590
|
}
|
|
5535
5591
|
else {
|
|
5536
5592
|
delete data.published_at;
|
|
5537
5593
|
}
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
data.accepted_at = '';
|
|
5544
|
-
}
|
|
5594
|
+
}
|
|
5595
|
+
handleAcceptedAt(data) {
|
|
5596
|
+
const control = this.form.get('accepted_at');
|
|
5597
|
+
if (control?.dirty) {
|
|
5598
|
+
data.accepted_at = control.value ? moment().format('DD-MMM-YYYY') : '';
|
|
5545
5599
|
}
|
|
5546
5600
|
else {
|
|
5547
5601
|
delete data.accepted_at;
|
|
5548
5602
|
}
|
|
5549
|
-
|
|
5603
|
+
}
|
|
5604
|
+
handleOptionalFields(data) {
|
|
5605
|
+
if (!this.form.get('when')?.value) {
|
|
5550
5606
|
data.when = '';
|
|
5551
5607
|
}
|
|
5552
|
-
if (!this.form.get('showcase')
|
|
5608
|
+
if (!this.form.get('showcase')?.value) {
|
|
5553
5609
|
data.showcase = '';
|
|
5554
5610
|
}
|
|
5611
|
+
}
|
|
5612
|
+
handleRemovals(data) {
|
|
5555
5613
|
if (!this.file && !this.image) {
|
|
5556
5614
|
data.remove_picture = true;
|
|
5557
5615
|
}
|
|
5558
5616
|
if (!this.rectangularFile && !this.rectangularImage) {
|
|
5559
5617
|
data.remove_rectangular_picture = true;
|
|
5560
5618
|
}
|
|
5619
|
+
}
|
|
5620
|
+
updatePost(data) {
|
|
5561
5621
|
this.postTags(this.blog.id);
|
|
5562
5622
|
this.adminService
|
|
5563
5623
|
.updatePost(data, this.id)
|
|
@@ -5621,7 +5681,7 @@ class ResourceAdminDetailsComponent extends AppBaseComponent {
|
|
|
5621
5681
|
super.ngOnDestroy();
|
|
5622
5682
|
}
|
|
5623
5683
|
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 }); }
|
|
5684
|
+
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
5685
|
}
|
|
5626
5686
|
__decorate([
|
|
5627
5687
|
ValidateForm('form'),
|
|
@@ -5631,7 +5691,7 @@ __decorate([
|
|
|
5631
5691
|
], ResourceAdminDetailsComponent.prototype, "onSave", null);
|
|
5632
5692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourceAdminDetailsComponent, decorators: [{
|
|
5633
5693
|
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"] }]
|
|
5694
|
+
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
5695
|
}], ctorParameters: () => [{ type: i1$1.NgbModal }, { type: i1.AdminService }, { type: i0.Injector }, { type: i1$2.TagService }], propDecorators: { onSave: [] } });
|
|
5636
5696
|
|
|
5637
5697
|
class ResourcesAdminIndexComponent extends AppBaseComponent {
|
|
@@ -5787,11 +5847,11 @@ class ResourcesIndexComponent extends AppBaseComponent {
|
|
|
5787
5847
|
super.ngOnDestroy();
|
|
5788
5848
|
}
|
|
5789
5849
|
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" }] }); }
|
|
5850
|
+
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
5851
|
}
|
|
5792
5852
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ResourcesIndexComponent, decorators: [{
|
|
5793
5853
|
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" }]
|
|
5854
|
+
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
5855
|
}], ctorParameters: () => [{ type: i1.AdminService }, { type: i1$2.TagService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }] });
|
|
5796
5856
|
|
|
5797
5857
|
class ResourcesInsightComponent extends AppBaseComponent {
|
|
@@ -5918,7 +5978,7 @@ class AgentDetailsComponent extends AppBaseComponent {
|
|
|
5918
5978
|
month: Number(endDate.substring(5, 7)),
|
|
5919
5979
|
day: Number(endDate.substring(8, 10))
|
|
5920
5980
|
};
|
|
5921
|
-
response.subscription_agent.user.displayName = `${res?.user?.first_name} ${res?.user?.last_name
|
|
5981
|
+
response.subscription_agent.user.displayName = `${res?.user?.first_name} ${res?.user?.last_name ?? ''} ${res?.user?.email}`.trim();
|
|
5922
5982
|
this.agentDetails = response.subscription_agent;
|
|
5923
5983
|
this.form.patchValue(response.subscription_agent);
|
|
5924
5984
|
this.form.patchValue({ end_date: dobObject });
|
|
@@ -5949,8 +6009,8 @@ class AgentDetailsComponent extends AppBaseComponent {
|
|
|
5949
6009
|
.subscribe(response => {
|
|
5950
6010
|
this.allUsers = response.users;
|
|
5951
6011
|
this.allUsers.forEach(member => {
|
|
5952
|
-
const firstName = member.first_name
|
|
5953
|
-
const lastName = member.last_name
|
|
6012
|
+
const firstName = member.first_name ?? '';
|
|
6013
|
+
const lastName = member.last_name ?? '';
|
|
5954
6014
|
member.displayName = `${firstName} ${lastName} ${member.email}`.trim();
|
|
5955
6015
|
});
|
|
5956
6016
|
});
|
|
@@ -6017,7 +6077,7 @@ class SubscriptionProductsComponent extends AppBaseComponent {
|
|
|
6017
6077
|
this.subscriptionService
|
|
6018
6078
|
.getById(this.id)
|
|
6019
6079
|
.subscribe(response => {
|
|
6020
|
-
this.subscriptionProducts = response?.products
|
|
6080
|
+
this.subscriptionProducts = response?.products ?? [];
|
|
6021
6081
|
this.totalRecords = response?.products?.length;
|
|
6022
6082
|
this.totalRecordsUnFiltered = response.unfiltered_count;
|
|
6023
6083
|
})
|
|
@@ -6207,6 +6267,7 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6207
6267
|
this.totalUnfilteredCount = 0;
|
|
6208
6268
|
this.hasAccess = false;
|
|
6209
6269
|
this.isAddEnabled = false;
|
|
6270
|
+
this.isUserSubscriptionSuperAdmin = this.permissionService.isUserSubscriptionSuperAdmin();
|
|
6210
6271
|
}
|
|
6211
6272
|
ngOnInit() {
|
|
6212
6273
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
@@ -6339,15 +6400,15 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6339
6400
|
this.subscriptionService
|
|
6340
6401
|
.getEnrolledSubscription(this.id, paging)
|
|
6341
6402
|
.subscribe(response => {
|
|
6342
|
-
this.subscriptionMembers = response?.members
|
|
6343
|
-
this.subscriptionAdmins = response?.admins
|
|
6403
|
+
this.subscriptionMembers = response?.members ?? [];
|
|
6404
|
+
this.subscriptionAdmins = response?.admins ?? [];
|
|
6344
6405
|
this.subscriptionOwnerUserId = response?.owner_id;
|
|
6345
6406
|
this.totalRecords = response?.members.length;
|
|
6346
6407
|
this.totalUnfilteredCount = response.unfiltered_count;
|
|
6347
|
-
this.
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6408
|
+
const isAdmin = response?.admins?.includes(this.user?.id) ?? false;
|
|
6409
|
+
const isOwner = this.user?.id === this.subscriptionOwnerUserId;
|
|
6410
|
+
const isSuperAdmin = this.permissionService.isSuperAdmin();
|
|
6411
|
+
this.hasAccess = [isAdmin, isOwner, isSuperAdmin].some(Boolean);
|
|
6351
6412
|
})
|
|
6352
6413
|
.add(() => {
|
|
6353
6414
|
this.isLoaded = true;
|
|
@@ -6355,11 +6416,11 @@ class SubscriptionUsersComponent extends AppBaseComponent {
|
|
|
6355
6416
|
});
|
|
6356
6417
|
}
|
|
6357
6418
|
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" }] }); }
|
|
6419
|
+
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
6420
|
}
|
|
6360
6421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionUsersComponent, decorators: [{
|
|
6361
6422
|
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"] }]
|
|
6423
|
+
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
6424
|
}], 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
6425
|
type: ViewChild,
|
|
6365
6426
|
args: ['passwordValidationModalForImpersonate', { static: false }]
|
|
@@ -6402,7 +6463,7 @@ class SubscriptionAgentsListComponent extends AppBaseComponent {
|
|
|
6402
6463
|
.subscribe(response => {
|
|
6403
6464
|
this.allAgents = response.subscription_agents;
|
|
6404
6465
|
this.totalRecords = this.allAgents?.length;
|
|
6405
|
-
this.totalUnfilteredCount = response.unfiltered_count
|
|
6466
|
+
this.totalUnfilteredCount = response.unfiltered_count ?? 0;
|
|
6406
6467
|
})
|
|
6407
6468
|
.add(() => {
|
|
6408
6469
|
this.isLoaded = true;
|
|
@@ -6505,7 +6566,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6505
6566
|
return {
|
|
6506
6567
|
organization_industries: [
|
|
6507
6568
|
{ id: null, name: 'Select Organization Industry' },
|
|
6508
|
-
...(res?.organization_industries
|
|
6569
|
+
...(res?.organization_industries ?? [])
|
|
6509
6570
|
]
|
|
6510
6571
|
};
|
|
6511
6572
|
}));
|
|
@@ -6513,7 +6574,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6513
6574
|
return {
|
|
6514
6575
|
organization_types: [
|
|
6515
6576
|
{ id: null, name: 'Select Organization Type' },
|
|
6516
|
-
...(res?.organization_types
|
|
6577
|
+
...(res?.organization_types ?? [])
|
|
6517
6578
|
]
|
|
6518
6579
|
};
|
|
6519
6580
|
}));
|
|
@@ -6521,7 +6582,7 @@ class SubscriptionDetailsComponent extends AppBaseComponent {
|
|
|
6521
6582
|
return {
|
|
6522
6583
|
organization_sizes: [
|
|
6523
6584
|
{ id: null, name: 'Select Organization Size' },
|
|
6524
|
-
...(res?.organization_sizes
|
|
6585
|
+
...(res?.organization_sizes ?? [])
|
|
6525
6586
|
]
|
|
6526
6587
|
};
|
|
6527
6588
|
}));
|
|
@@ -6735,7 +6796,7 @@ class SubscriptionProductDetailsComponent extends AppBaseComponent {
|
|
|
6735
6796
|
this.form.get('expires_at').disable();
|
|
6736
6797
|
this.disableExpiresAt = true;
|
|
6737
6798
|
}
|
|
6738
|
-
const externalPayment = this.permissionService.isSuperAdmin()
|
|
6799
|
+
const externalPayment = this.permissionService.isSuperAdmin() ?? !response?.stripe_subscription_id;
|
|
6739
6800
|
if (externalPayment) {
|
|
6740
6801
|
this.form.get('external_payment').enable();
|
|
6741
6802
|
}
|
|
@@ -6811,7 +6872,7 @@ class SubscriptionProductDetailsComponent extends AppBaseComponent {
|
|
|
6811
6872
|
min_units: this.form.value.min_units
|
|
6812
6873
|
};
|
|
6813
6874
|
if (this.form.value?.new_product_id) {
|
|
6814
|
-
data['new_product_id'] = this.form.value?.new_product_id?.id
|
|
6875
|
+
data['new_product_id'] = this.form.value?.new_product_id?.id ?? null;
|
|
6815
6876
|
}
|
|
6816
6877
|
if (this.form.value.purchased_units) {
|
|
6817
6878
|
data['purchased_units'] = this.form.value.purchased_units;
|
|
@@ -6970,12 +7031,7 @@ class SubscriptionInsightNpsComponent extends AppBaseComponent {
|
|
|
6970
7031
|
/** Function to get the data for the graph */
|
|
6971
7032
|
getChartData() {
|
|
6972
7033
|
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
|
-
: '')
|
|
7034
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.NPS, this.subscriptionId, this.selectedDateRange)
|
|
6979
7035
|
.subscribe(response => {
|
|
6980
7036
|
this.graph = response;
|
|
6981
7037
|
})
|
|
@@ -7026,12 +7082,7 @@ class SubscriptionInsightAveragePriceComponent extends AppBaseComponent {
|
|
|
7026
7082
|
/** Function to get the data for the graph */
|
|
7027
7083
|
getChartData() {
|
|
7028
7084
|
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
|
-
: '')
|
|
7085
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_PRICE, this.subscriptionId, this.selectedDateRange)
|
|
7035
7086
|
.subscribe(response => {
|
|
7036
7087
|
this.graph = response;
|
|
7037
7088
|
})
|
|
@@ -7082,12 +7133,7 @@ class SubscriptionInsightProcuctSessionComponent extends AppBaseComponent {
|
|
|
7082
7133
|
/** Function to get the data for the graph */
|
|
7083
7134
|
getChartData() {
|
|
7084
7135
|
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
|
-
: '')
|
|
7136
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.SESSION_COUNT, this.subscriptionId, this.selectedDateRange)
|
|
7091
7137
|
.subscribe(response => {
|
|
7092
7138
|
this.graph = response;
|
|
7093
7139
|
})
|
|
@@ -7137,12 +7183,7 @@ class SubscriptionInsightUserSessionComponent extends AppBaseComponent {
|
|
|
7137
7183
|
}
|
|
7138
7184
|
getChartData() {
|
|
7139
7185
|
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
|
-
: '')
|
|
7186
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.USER_SESSION_COUNT, this.subscriptionId, this.selectedDateRange)
|
|
7146
7187
|
.subscribe(response => {
|
|
7147
7188
|
this.graph = response;
|
|
7148
7189
|
})
|
|
@@ -7193,12 +7234,7 @@ class SubscriptionInsightAverageUserComponent extends AppBaseComponent {
|
|
|
7193
7234
|
/** Function to get the data for the graph */
|
|
7194
7235
|
getChartData() {
|
|
7195
7236
|
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
|
-
: '')
|
|
7237
|
+
HelperService.fetchSubscriptionChartData(this.adminService, SUBSCRIPTION_ANALYTICS_TYPES.AVERAGE_USERS, this.subscriptionId, this.selectedDateRange)
|
|
7202
7238
|
.subscribe(response => {
|
|
7203
7239
|
this.graph = response;
|
|
7204
7240
|
})
|
|
@@ -7374,9 +7410,9 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7374
7410
|
this.localStorage.getItem$('subscription-list-state').subscribe(res => {
|
|
7375
7411
|
if (res) {
|
|
7376
7412
|
const result = JSON.parse(res);
|
|
7377
|
-
this.searchText = result?.searchText
|
|
7378
|
-
this.status = result?.status
|
|
7379
|
-
this.selectedFeatureKeys = result?.featureKeys
|
|
7413
|
+
this.searchText = result?.searchText ?? '';
|
|
7414
|
+
this.status = result?.status ?? '';
|
|
7415
|
+
this.selectedFeatureKeys = result?.featureKeys ?? [];
|
|
7380
7416
|
this.filterByFeatureKeys = this.selectedFeatureKeys;
|
|
7381
7417
|
}
|
|
7382
7418
|
});
|
|
@@ -7395,7 +7431,7 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7395
7431
|
}
|
|
7396
7432
|
getMinMaxUnits() {
|
|
7397
7433
|
this.form.get('product_id').valueChanges.subscribe(x => {
|
|
7398
|
-
this.unitsText = x?.unitsText
|
|
7434
|
+
this.unitsText = x?.unitsText ?? '';
|
|
7399
7435
|
});
|
|
7400
7436
|
}
|
|
7401
7437
|
onSave() {
|
|
@@ -7437,7 +7473,7 @@ class InviteUsersComponent extends AppBaseComponent {
|
|
|
7437
7473
|
this.searchOptions = featureKeys.map(element => {
|
|
7438
7474
|
return {
|
|
7439
7475
|
id: element,
|
|
7440
|
-
label: element
|
|
7476
|
+
label: element ?? ''
|
|
7441
7477
|
};
|
|
7442
7478
|
});
|
|
7443
7479
|
});
|
|
@@ -7584,7 +7620,8 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7584
7620
|
}
|
|
7585
7621
|
openRecoverSubscriptionModal(item) {
|
|
7586
7622
|
this.recoveringItem = item;
|
|
7587
|
-
|
|
7623
|
+
// false positive: not a password, it's a translation key
|
|
7624
|
+
this.recoverSubscriptionPasswordModal.confirmMessage = 'Admin.Subscriptions.ConfirmRecover'; // NOSONAR
|
|
7588
7625
|
this.recoverSubscriptionPasswordModal.open();
|
|
7589
7626
|
}
|
|
7590
7627
|
onRecoverConfirmed() {
|
|
@@ -7608,9 +7645,9 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7608
7645
|
this.localStorage.getItem$('subscription-list-state').subscribe(res => {
|
|
7609
7646
|
if (res) {
|
|
7610
7647
|
const result = JSON.parse(res);
|
|
7611
|
-
this.searchText = result?.searchText
|
|
7612
|
-
this.status = result?.status
|
|
7613
|
-
this.selectedFeatureKeys = result?.featureKeys
|
|
7648
|
+
this.searchText = result?.searchText ?? '';
|
|
7649
|
+
this.status = result?.status ?? '';
|
|
7650
|
+
this.selectedFeatureKeys = result?.featureKeys ?? [];
|
|
7614
7651
|
this.filterByFeatureKeys = this.selectedFeatureKeys;
|
|
7615
7652
|
}
|
|
7616
7653
|
});
|
|
@@ -7636,7 +7673,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7636
7673
|
}
|
|
7637
7674
|
getMinMaxUnits() {
|
|
7638
7675
|
this.form.get('product_id').valueChanges.subscribe(x => {
|
|
7639
|
-
this.unitsText = x?.unitsText
|
|
7676
|
+
this.unitsText = x?.unitsText ?? '';
|
|
7640
7677
|
});
|
|
7641
7678
|
}
|
|
7642
7679
|
getData(paging) {
|
|
@@ -7660,7 +7697,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7660
7697
|
this.subscriptions = uniqBy(this.subscriptions, 'id');
|
|
7661
7698
|
}
|
|
7662
7699
|
this.subscriptionInsights = response?.subscription_insights;
|
|
7663
|
-
this.totalRecords = response.object_count
|
|
7700
|
+
this.totalRecords = response.object_count ?? 0;
|
|
7664
7701
|
this.totalRecordsUnFiltered = response?.unfiltered_count;
|
|
7665
7702
|
})
|
|
7666
7703
|
.add(() => {
|
|
@@ -7694,7 +7731,7 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7694
7731
|
this.searchOptions = featureKeys.map(element => {
|
|
7695
7732
|
return {
|
|
7696
7733
|
id: element,
|
|
7697
|
-
label: element
|
|
7734
|
+
label: element ?? ''
|
|
7698
7735
|
};
|
|
7699
7736
|
});
|
|
7700
7737
|
});
|
|
@@ -7794,11 +7831,11 @@ class SubscriptionsListComponent extends AppBaseComponent {
|
|
|
7794
7831
|
super.ngOnDestroy();
|
|
7795
7832
|
}
|
|
7796
7833
|
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" }] }); }
|
|
7834
|
+
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
7835
|
}
|
|
7799
7836
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SubscriptionsListComponent, decorators: [{
|
|
7800
7837
|
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"] }]
|
|
7838
|
+
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
7839
|
}], 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
7840
|
type: ViewChild,
|
|
7804
7841
|
args: ['refProduct']
|
|
@@ -8014,7 +8051,7 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8014
8051
|
}
|
|
8015
8052
|
dataURLtoBlob(dataUrl) {
|
|
8016
8053
|
const arr = dataUrl.split(',');
|
|
8017
|
-
const mime =
|
|
8054
|
+
const mime = /^[A-Z]*[a-z]*:(.*?);[A-Z]*/.exec(arr[0])?.[1];
|
|
8018
8055
|
const bstr = atob(arr[1]);
|
|
8019
8056
|
let n = bstr.length;
|
|
8020
8057
|
const u8arr = new Uint8Array(n);
|
|
@@ -8026,8 +8063,17 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8026
8063
|
handleImageError(event, fallbackPath) {
|
|
8027
8064
|
HelperService.handleImageFallbackPath(event, fallbackPath);
|
|
8028
8065
|
}
|
|
8066
|
+
deleteTagImage() {
|
|
8067
|
+
this.image = null;
|
|
8068
|
+
this.file = null;
|
|
8069
|
+
}
|
|
8070
|
+
handleRemovals(data) {
|
|
8071
|
+
if (!this.file && !this.image) {
|
|
8072
|
+
data.remove_image = true;
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
8029
8075
|
patchForm(data) {
|
|
8030
|
-
this.form.patchValue(data
|
|
8076
|
+
this.form.patchValue(data ?? {});
|
|
8031
8077
|
}
|
|
8032
8078
|
onSave() {
|
|
8033
8079
|
if (this.form.invalid)
|
|
@@ -8056,6 +8102,7 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8056
8102
|
}
|
|
8057
8103
|
});
|
|
8058
8104
|
}
|
|
8105
|
+
this.handleRemovals(data);
|
|
8059
8106
|
data.subscription_id = this.subscriptionId;
|
|
8060
8107
|
const save$ = id
|
|
8061
8108
|
? this.tagService.updateTagById(id, data)
|
|
@@ -8084,11 +8131,11 @@ class TagDetailsComponent extends AppBaseComponent {
|
|
|
8084
8131
|
});
|
|
8085
8132
|
}
|
|
8086
8133
|
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 }); }
|
|
8134
|
+
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
8135
|
}
|
|
8089
8136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagDetailsComponent, decorators: [{
|
|
8090
8137
|
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
|
|
8138
|
+
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
8139
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$2.TagService }, { type: i0.ChangeDetectorRef }, { type: i1$1.NgbModal }] });
|
|
8093
8140
|
|
|
8094
8141
|
class TagsListComponent extends AppBaseComponent {
|
|
@@ -8167,7 +8214,7 @@ class TagsListComponent extends AppBaseComponent {
|
|
|
8167
8214
|
this.tagService.getAvailableTagType(this.subscriptionId).subscribe(response => {
|
|
8168
8215
|
response.available_tag_types.forEach(element => {
|
|
8169
8216
|
this.tagTypes.push({
|
|
8170
|
-
label: element
|
|
8217
|
+
label: element ?? '',
|
|
8171
8218
|
value: element
|
|
8172
8219
|
});
|
|
8173
8220
|
});
|
|
@@ -8206,11 +8253,11 @@ class TagsListComponent extends AppBaseComponent {
|
|
|
8206
8253
|
super.ngOnDestroy();
|
|
8207
8254
|
}
|
|
8208
8255
|
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" }] }); }
|
|
8256
|
+
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
8257
|
}
|
|
8211
8258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: TagsListComponent, decorators: [{
|
|
8212
8259
|
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"] }]
|
|
8260
|
+
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
8261
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.NgbModal }, { type: i1$2.TagService }, { type: i0.ChangeDetectorRef }] });
|
|
8215
8262
|
|
|
8216
8263
|
class TagsTabsComponent {
|
|
@@ -8635,10 +8682,8 @@ class AhoyEventsComponent extends AppBaseComponent {
|
|
|
8635
8682
|
}
|
|
8636
8683
|
getAhoyEvents(paging) {
|
|
8637
8684
|
this.isLoaded = false;
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
service = this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8641
|
-
}
|
|
8685
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
8686
|
+
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8642
8687
|
const obj = {
|
|
8643
8688
|
...paging,
|
|
8644
8689
|
...(this.startDate && this.endDate
|
|
@@ -8648,7 +8693,8 @@ class AhoyEventsComponent extends AppBaseComponent {
|
|
|
8648
8693
|
}
|
|
8649
8694
|
: {}),
|
|
8650
8695
|
search: this.searchText || '',
|
|
8651
|
-
user_ids: this.selectedOption
|
|
8696
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
8697
|
+
// NOSONAR
|
|
8652
8698
|
};
|
|
8653
8699
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
8654
8700
|
this.ahoyService
|
|
@@ -8776,10 +8822,8 @@ class AhoyMessagesComponent extends AppBaseComponent {
|
|
|
8776
8822
|
}
|
|
8777
8823
|
getAhoyMessages(paging) {
|
|
8778
8824
|
this.isLoaded = false;
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
service = this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8782
|
-
}
|
|
8825
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
8826
|
+
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
8783
8827
|
const obj = {
|
|
8784
8828
|
...paging,
|
|
8785
8829
|
...(this.startDate && this.endDate
|
|
@@ -8789,7 +8833,8 @@ class AhoyMessagesComponent extends AppBaseComponent {
|
|
|
8789
8833
|
}
|
|
8790
8834
|
: {}),
|
|
8791
8835
|
search: this.searchText || '',
|
|
8792
|
-
user_ids: this.selectedOption
|
|
8836
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
8837
|
+
// NOSONAR
|
|
8793
8838
|
};
|
|
8794
8839
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
8795
8840
|
this.ahoyService
|
|
@@ -8999,7 +9044,7 @@ class AhoyVisitsComponent extends AppBaseComponent {
|
|
|
8999
9044
|
}
|
|
9000
9045
|
getAhoyVisits(paging) {
|
|
9001
9046
|
this.isLoaded = false;
|
|
9002
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9047
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9003
9048
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9004
9049
|
const obj = {
|
|
9005
9050
|
...paging,
|
|
@@ -9010,7 +9055,8 @@ class AhoyVisitsComponent extends AppBaseComponent {
|
|
|
9010
9055
|
}
|
|
9011
9056
|
: {}),
|
|
9012
9057
|
search: this.searchText || '',
|
|
9013
|
-
user_ids: this.selectedOption
|
|
9058
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9059
|
+
// NOSONAR
|
|
9014
9060
|
};
|
|
9015
9061
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9016
9062
|
this.ahoyService
|
|
@@ -9173,7 +9219,7 @@ class EventsComponent extends AppBaseComponent {
|
|
|
9173
9219
|
}
|
|
9174
9220
|
getEvents(paging) {
|
|
9175
9221
|
this.isLoaded = false;
|
|
9176
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9222
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9177
9223
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9178
9224
|
const obj = {
|
|
9179
9225
|
...paging,
|
|
@@ -9184,7 +9230,8 @@ class EventsComponent extends AppBaseComponent {
|
|
|
9184
9230
|
}
|
|
9185
9231
|
: {}),
|
|
9186
9232
|
search: this.searchText || '',
|
|
9187
|
-
user_ids: this.selectedOption
|
|
9233
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9234
|
+
// NOSONAR
|
|
9188
9235
|
};
|
|
9189
9236
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9190
9237
|
this.ahoyService
|
|
@@ -9353,7 +9400,7 @@ class VersionsComponent extends AppBaseComponent {
|
|
|
9353
9400
|
}
|
|
9354
9401
|
getVersions(paging) {
|
|
9355
9402
|
this.isLoaded = false;
|
|
9356
|
-
const service = this.microServices.find(x => x.name === this.selectedMicroService)
|
|
9403
|
+
const service = this.microServices.find(x => x.name === this.selectedMicroService) ??
|
|
9357
9404
|
this.microServices.find(x => x.value === this.appConfig.links?.main_api);
|
|
9358
9405
|
const obj = {
|
|
9359
9406
|
...paging,
|
|
@@ -9364,7 +9411,7 @@ class VersionsComponent extends AppBaseComponent {
|
|
|
9364
9411
|
}
|
|
9365
9412
|
: {}),
|
|
9366
9413
|
search: this.searchText || '',
|
|
9367
|
-
user_ids: this.selectedOption
|
|
9414
|
+
user_ids: this.selectedOption?.join(',') || undefined
|
|
9368
9415
|
};
|
|
9369
9416
|
Object.keys(obj).forEach(key => obj[key] === undefined && delete obj[key]);
|
|
9370
9417
|
this.ahoyService
|
|
@@ -9516,7 +9563,7 @@ class UserDetailsComponent extends AppBaseComponent {
|
|
|
9516
9563
|
.getUserById(this.id, this.subscriptionId)
|
|
9517
9564
|
.subscribe(user => {
|
|
9518
9565
|
this.user = user;
|
|
9519
|
-
this.user.send_marketing_emails = user.send_marketing_emails
|
|
9566
|
+
this.user.send_marketing_emails = user.send_marketing_emails ?? false;
|
|
9520
9567
|
this.form.patchValue(user);
|
|
9521
9568
|
})
|
|
9522
9569
|
.add(() => {
|
|
@@ -9557,7 +9604,10 @@ class UserDetailsComponent extends AppBaseComponent {
|
|
|
9557
9604
|
.createUser(this.form.value)
|
|
9558
9605
|
.subscribe(response => {
|
|
9559
9606
|
if (response.error) {
|
|
9560
|
-
this.toast.error(`${Object.keys(response.error.message)[0]} ${Object.values(response.error.message)
|
|
9607
|
+
this.toast.error(`${Object.keys(response.error.message)[0]} ${Object.values(response.error.message)
|
|
9608
|
+
.flat()
|
|
9609
|
+
.map(value => typeof value === 'string' ? value : JSON.stringify(value))
|
|
9610
|
+
.join('')}`);
|
|
9561
9611
|
}
|
|
9562
9612
|
else {
|
|
9563
9613
|
this.toast.success(this.translation.translate('Admin.Users.AddedMessage'));
|
|
@@ -9736,7 +9786,7 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9736
9786
|
});
|
|
9737
9787
|
}
|
|
9738
9788
|
initializeSearchText(res) {
|
|
9739
|
-
this.searchText = res?.searchText
|
|
9789
|
+
this.searchText = res?.searchText ?? '';
|
|
9740
9790
|
}
|
|
9741
9791
|
initializeSelectedOption(res) {
|
|
9742
9792
|
if (res?.selectedOption?.value) {
|
|
@@ -9746,24 +9796,24 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9746
9796
|
}
|
|
9747
9797
|
initializeSearchDataSource(res) {
|
|
9748
9798
|
if (res?.searchDataSource?.length) {
|
|
9749
|
-
this.searchDataSource = res?.searchDataSource
|
|
9799
|
+
this.searchDataSource = res?.searchDataSource ?? [];
|
|
9750
9800
|
}
|
|
9751
9801
|
}
|
|
9752
9802
|
initializeCriteria(res) {
|
|
9753
9803
|
if (res?.selectedOption?.value === 'feature_key') {
|
|
9754
|
-
this.criteria = res?.filterByFeatureKeys
|
|
9804
|
+
this.criteria = res?.filterByFeatureKeys ?? [];
|
|
9755
9805
|
}
|
|
9756
9806
|
if (res?.selectedOption?.value === 'product') {
|
|
9757
|
-
this.criteria = res?.filterByProducts
|
|
9807
|
+
this.criteria = res?.filterByProducts ?? [];
|
|
9758
9808
|
}
|
|
9759
9809
|
if (res?.selectedOption?.value === 'role') {
|
|
9760
|
-
this.criteria = res?.filterByRoles
|
|
9810
|
+
this.criteria = res?.filterByRoles ?? [];
|
|
9761
9811
|
}
|
|
9762
9812
|
}
|
|
9763
9813
|
initializeFilters(res) {
|
|
9764
|
-
this.filterByFeatureKeys = res?.filterByFeatureKeys
|
|
9765
|
-
this.filterByProducts = res?.filterByProducts
|
|
9766
|
-
this.filterByRoles = res?.filterByRoles
|
|
9814
|
+
this.filterByFeatureKeys = res?.filterByFeatureKeys ?? [];
|
|
9815
|
+
this.filterByProducts = res?.filterByProducts ?? [];
|
|
9816
|
+
this.filterByRoles = res?.filterByRoles ?? [];
|
|
9767
9817
|
}
|
|
9768
9818
|
ngAfterViewChecked() {
|
|
9769
9819
|
this.cdr.detectChanges();
|
|
@@ -9800,13 +9850,13 @@ class UserListComponent extends AppBaseComponent {
|
|
|
9800
9850
|
this.productList = resp.products.map(element => {
|
|
9801
9851
|
return {
|
|
9802
9852
|
value: element.id,
|
|
9803
|
-
label: element.name
|
|
9853
|
+
label: element.name ?? ''
|
|
9804
9854
|
};
|
|
9805
9855
|
});
|
|
9806
9856
|
this.featureKeysList = resp.products.map(element => {
|
|
9807
9857
|
return {
|
|
9808
9858
|
value: element.feature_key,
|
|
9809
|
-
label: element.feature_key
|
|
9859
|
+
label: element.feature_key ?? ''
|
|
9810
9860
|
};
|
|
9811
9861
|
});
|
|
9812
9862
|
this.productList.unshift({
|