@posiwise/admin-module 0.0.127 → 0.0.129
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/TOS/terms-of-service-details/terms-of-service-details.component.mjs +3 -2
- package/esm2022/lib/components/faqs/add-faq/add-faq.component.mjs +3 -2
- package/esm2022/lib/components/faqs/edit-faq/edit-faq.component.mjs +10 -3
- package/esm2022/lib/components/incidents/add-edit-incident/add-edit-incident.component.mjs +12 -7
- package/esm2022/lib/components/newsletters/newsletter-item-details/newsletter-item-details.component.mjs +3 -2
- package/esm2022/lib/components/permissions/permissions-details/permissions-details.component.mjs +10 -2
- package/esm2022/lib/components/products/product-details/product-details.component.mjs +3 -2
- package/fesm2022/posiwise-admin-module.mjs +37 -13
- package/fesm2022/posiwise-admin-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -72,8 +72,9 @@ class TermsOfServiceDetailsComponent extends AppBaseComponent {
|
|
|
72
72
|
this.adminService = adminService;
|
|
73
73
|
this.isLoading = true;
|
|
74
74
|
this.submitted = false;
|
|
75
|
-
|
|
75
|
+
QuillHelper.init();
|
|
76
76
|
this.editorConfig = QuillHelper.getEditorConfig();
|
|
77
|
+
this.form = AppAdmin.getTosForm();
|
|
77
78
|
}
|
|
78
79
|
ngOnInit() {
|
|
79
80
|
this.route.params.subscribe(params => {
|
|
@@ -2485,8 +2486,9 @@ class NewsletterItemDetailsComponent extends AppBaseComponent {
|
|
|
2485
2486
|
this.page = 1;
|
|
2486
2487
|
this.featureKeys = [];
|
|
2487
2488
|
this.userNameSyntax = '{{ @user.share_name }}';
|
|
2488
|
-
|
|
2489
|
+
QuillHelper.init();
|
|
2489
2490
|
this.editorConfig = QuillHelper.getEditorConfig();
|
|
2491
|
+
this.form = AppAdmin.getNewsletterItemForm();
|
|
2490
2492
|
}
|
|
2491
2493
|
ngAfterViewInit() {
|
|
2492
2494
|
HelperService.subscribeToEditorChanges(this.form, 'body');
|
|
@@ -3087,6 +3089,9 @@ class PermissionsDetailsComponent extends AppBaseComponent {
|
|
|
3087
3089
|
if (this.permissions) {
|
|
3088
3090
|
this.form.patchValue(this.permissions);
|
|
3089
3091
|
}
|
|
3092
|
+
else if (this.id) {
|
|
3093
|
+
this.toast.error('Record Not Found');
|
|
3094
|
+
}
|
|
3090
3095
|
}
|
|
3091
3096
|
});
|
|
3092
3097
|
}
|
|
@@ -3103,7 +3108,7 @@ class PermissionsDetailsComponent extends AppBaseComponent {
|
|
|
3103
3108
|
this.buttonBusy = false;
|
|
3104
3109
|
});
|
|
3105
3110
|
}
|
|
3106
|
-
else {
|
|
3111
|
+
else if (!this.id) {
|
|
3107
3112
|
this.adminService
|
|
3108
3113
|
.addPermission(this.form.value)
|
|
3109
3114
|
.subscribe(() => {
|
|
@@ -3114,6 +3119,11 @@ class PermissionsDetailsComponent extends AppBaseComponent {
|
|
|
3114
3119
|
this.buttonBusy = false;
|
|
3115
3120
|
});
|
|
3116
3121
|
}
|
|
3122
|
+
else {
|
|
3123
|
+
this.buttonBusy = true;
|
|
3124
|
+
this.toast.error('Something went wrong. Please contact support if the problem persists.');
|
|
3125
|
+
this.buttonBusy = false;
|
|
3126
|
+
}
|
|
3117
3127
|
}
|
|
3118
3128
|
onDiscard() {
|
|
3119
3129
|
this.form.reset();
|
|
@@ -3462,8 +3472,9 @@ class ProductDetailsComponent extends AppBaseComponent {
|
|
|
3462
3472
|
];
|
|
3463
3473
|
this.categories = [];
|
|
3464
3474
|
this.fullLogo = '';
|
|
3465
|
-
|
|
3475
|
+
QuillHelper.init();
|
|
3466
3476
|
this.editorConfig = QuillHelper.getEditorConfig();
|
|
3477
|
+
this.form = AppAdmin.getProductsForm();
|
|
3467
3478
|
}
|
|
3468
3479
|
ngAfterViewInit() {
|
|
3469
3480
|
HelperService.subscribeToEditorChanges(this.form, 'description');
|
|
@@ -7186,9 +7197,10 @@ class AddEditIncidentComponent extends AppBaseComponent {
|
|
|
7186
7197
|
this.isSuperAdmin = this.permissionService.isSuperAdmin();
|
|
7187
7198
|
this.submitted = false;
|
|
7188
7199
|
this.buttonBusy = false;
|
|
7200
|
+
QuillHelper.init();
|
|
7201
|
+
this.editorConfig = QuillHelper.getEditorConfig();
|
|
7189
7202
|
this.subscriptionId = PermissionService.selectedSubscription?.id;
|
|
7190
7203
|
this.form = AppAdmin.getIncidentForm();
|
|
7191
|
-
this.editorConfig = QuillHelper.getEditorConfig();
|
|
7192
7204
|
}
|
|
7193
7205
|
ngAfterViewInit() {
|
|
7194
7206
|
HelperService.subscribeToEditorChanges(this.form, 'description');
|
|
@@ -7199,7 +7211,7 @@ class AddEditIncidentComponent extends AppBaseComponent {
|
|
|
7199
7211
|
this.id = +params['id'] || 0;
|
|
7200
7212
|
});
|
|
7201
7213
|
this.currentIncident = history.state?.data;
|
|
7202
|
-
if (this.currentIncident) {
|
|
7214
|
+
if (this.currentIncident || this.id) {
|
|
7203
7215
|
this.getIncidentById();
|
|
7204
7216
|
}
|
|
7205
7217
|
else {
|
|
@@ -7224,8 +7236,9 @@ class AddEditIncidentComponent extends AppBaseComponent {
|
|
|
7224
7236
|
}
|
|
7225
7237
|
}
|
|
7226
7238
|
getIncidentById() {
|
|
7227
|
-
this.commonService
|
|
7228
|
-
this.
|
|
7239
|
+
this.commonService
|
|
7240
|
+
.getIncidentById(this.id, this.subscriptionId)
|
|
7241
|
+
.subscribe(response => {
|
|
7229
7242
|
this.form.setValue({
|
|
7230
7243
|
id: response.id,
|
|
7231
7244
|
description: response?.description,
|
|
@@ -7235,6 +7248,9 @@ class AddEditIncidentComponent extends AppBaseComponent {
|
|
|
7235
7248
|
started_at: response?.started_at ? new Date(response?.started_at) : '',
|
|
7236
7249
|
last_check_at: response?.last_check_at ? new Date(response?.last_check_at) : ''
|
|
7237
7250
|
});
|
|
7251
|
+
})
|
|
7252
|
+
.add(() => {
|
|
7253
|
+
this.isLoading = false;
|
|
7238
7254
|
});
|
|
7239
7255
|
}
|
|
7240
7256
|
onAdd() {
|
|
@@ -7285,11 +7301,11 @@ class AddEditIncidentComponent extends AppBaseComponent {
|
|
|
7285
7301
|
this.router.navigate([`${this.routers.incidentConfig}`]);
|
|
7286
7302
|
}
|
|
7287
7303
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AddEditIncidentComponent, deps: [{ token: i0.Injector }, { token: i1$1.CommonService }, { token: i3$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7288
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: AddEditIncidentComponent, selector: "pw-admin-add-edit-incident", viewQueries: [{ propertyName: "editForm", first: true, predicate: ["editForm"], descendants: true }], 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 href=\"javascript:void(0)\" routerLink=\"/admin/incident/list\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ id ? 'Edit' : 'Add New' }} Incident</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 <div class=\"p-2 mt-3\">\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\" *ngIf=\"!isLoading\">\n <div class=\"row\">\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.UrlImpacted' | transloco\"\n name=\"url_impacted\" [errorMsg]=\"'Admin.Incident.Validation.UrlImpacted' | transloco\">\n <input type=\"text\" formControlName=\"url_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['url_impacted'].errors }\" />\n </pw-input-container>\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.ServiceImpacted' | transloco\"\n name=\"service_impacted\"\n [errorMsg]=\"'Admin.Incident.Validation.ServiceImpacted' | transloco\">\n <input type=\"text\" formControlName=\"service_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['service_impacted'].errors }\" />\n </pw-input-container>\n <div class=\"col-lg-12\">\n <pw-input-container class=\"col-12 quill-editor\"\n [label]=\"'Admin.Incident.Description' | transloco\" name=\"description\"\n [errorMsg]=\"'Admin.Incident.Validation.Description' | transloco\">\n <quill-editor [styles]=\"{ height: '200px'}\" formControlName=\"description\" [modules]=\"editorConfig\"\n class=\"quillEditor d-block\"\n [ngClass]=\"{ 'is-invalid': submitted && f['description'].errors, 'w-100': true }\">\n </quill-editor>\n </pw-input-container>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.StartedAt' | transloco\" name=\"started_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"started_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.ResolvedAt' | transloco\" name=\"resolved_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"resolved_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.LastCheckedAt' | transloco\"\n name=\"last_check_at\" [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"last_check_at\"[placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showIcon]=\"true\" [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <div class=\"mb-3 text-end\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" data-bs-toggle=\"collapse\"\n (click)=\"onCancel()\" role=\"button\" aria-expanded=\"false\"\n aria-controls=\"incidentCollapse\"> {{ 'Button.Cancel' | transloco }} </button>\n <button class=\"btn btn-primary\" [
|
|
7304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: AddEditIncidentComponent, selector: "pw-admin-add-edit-incident", viewQueries: [{ propertyName: "editForm", first: true, predicate: ["editForm"], descendants: true }], 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 href=\"javascript:void(0)\" routerLink=\"/admin/incident/list\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ id ? 'Edit' : 'Add New' }} Incident</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 <div class=\"p-2 mt-3\">\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\" *ngIf=\"!isLoading\">\n <div class=\"row\">\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.UrlImpacted' | transloco\"\n name=\"url_impacted\" [errorMsg]=\"'Admin.Incident.Validation.UrlImpacted' | transloco\">\n <input type=\"text\" formControlName=\"url_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['url_impacted'].errors }\" />\n </pw-input-container>\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.ServiceImpacted' | transloco\"\n name=\"service_impacted\"\n [errorMsg]=\"'Admin.Incident.Validation.ServiceImpacted' | transloco\">\n <input type=\"text\" formControlName=\"service_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['service_impacted'].errors }\" />\n </pw-input-container>\n <div class=\"col-lg-12\">\n <pw-input-container class=\"col-12 quill-editor\"\n [label]=\"'Admin.Incident.Description' | transloco\" name=\"description\"\n [errorMsg]=\"'Admin.Incident.Validation.Description' | transloco\">\n <quill-editor [styles]=\"{ height: '200px'}\" formControlName=\"description\" [modules]=\"editorConfig\"\n class=\"quillEditor d-block\"\n [ngClass]=\"{ 'is-invalid': submitted && f['description'].errors, 'w-100': true }\">\n </quill-editor>\n </pw-input-container>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.StartedAt' | transloco\" name=\"started_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"started_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.ResolvedAt' | transloco\" name=\"resolved_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"resolved_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.LastCheckedAt' | transloco\"\n name=\"last_check_at\" [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"last_check_at\"[placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showIcon]=\"true\" [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <div class=\"mb-3 text-end\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" data-bs-toggle=\"collapse\"\n (click)=\"onCancel()\" role=\"button\" aria-expanded=\"false\"\n aria-controls=\"incidentCollapse\"> {{ 'Button.Cancel' | transloco }} </button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\">{{\n 'Button.Save' | transloco }}</button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\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_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"], dependencies: [{ kind: "component", type: i7$2.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: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i7.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i8.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"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7$1.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i12.TranslocoPipe, name: "transloco" }] }); }
|
|
7289
7305
|
}
|
|
7290
7306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AddEditIncidentComponent, decorators: [{
|
|
7291
7307
|
type: Component,
|
|
7292
|
-
args: [{ selector: 'pw-admin-add-edit-incident', 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 href=\"javascript:void(0)\" routerLink=\"/admin/incident/list\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ id ? 'Edit' : 'Add New' }} Incident</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 <div class=\"p-2 mt-3\">\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\" *ngIf=\"!isLoading\">\n <div class=\"row\">\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.UrlImpacted' | transloco\"\n name=\"url_impacted\" [errorMsg]=\"'Admin.Incident.Validation.UrlImpacted' | transloco\">\n <input type=\"text\" formControlName=\"url_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['url_impacted'].errors }\" />\n </pw-input-container>\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.ServiceImpacted' | transloco\"\n name=\"service_impacted\"\n [errorMsg]=\"'Admin.Incident.Validation.ServiceImpacted' | transloco\">\n <input type=\"text\" formControlName=\"service_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['service_impacted'].errors }\" />\n </pw-input-container>\n <div class=\"col-lg-12\">\n <pw-input-container class=\"col-12 quill-editor\"\n [label]=\"'Admin.Incident.Description' | transloco\" name=\"description\"\n [errorMsg]=\"'Admin.Incident.Validation.Description' | transloco\">\n <quill-editor [styles]=\"{ height: '200px'}\" formControlName=\"description\" [modules]=\"editorConfig\"\n class=\"quillEditor d-block\"\n [ngClass]=\"{ 'is-invalid': submitted && f['description'].errors, 'w-100': true }\">\n </quill-editor>\n </pw-input-container>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.StartedAt' | transloco\" name=\"started_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"started_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.ResolvedAt' | transloco\" name=\"resolved_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"resolved_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.LastCheckedAt' | transloco\"\n name=\"last_check_at\" [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"last_check_at\"[placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showIcon]=\"true\" [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <div class=\"mb-3 text-end\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" data-bs-toggle=\"collapse\"\n (click)=\"onCancel()\" role=\"button\" aria-expanded=\"false\"\n aria-controls=\"incidentCollapse\"> {{ 'Button.Cancel' | transloco }} </button>\n <button class=\"btn btn-primary\" [
|
|
7308
|
+
args: [{ selector: 'pw-admin-add-edit-incident', 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 href=\"javascript:void(0)\" routerLink=\"/admin/incident/list\" class=\"previous\"><i\n class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h3 class=\"mt-3\">{{ id ? 'Edit' : 'Add New' }} Incident</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 <div class=\"p-2 mt-3\">\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\" *ngIf=\"!isLoading\">\n <div class=\"row\">\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.UrlImpacted' | transloco\"\n name=\"url_impacted\" [errorMsg]=\"'Admin.Incident.Validation.UrlImpacted' | transloco\">\n <input type=\"text\" formControlName=\"url_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['url_impacted'].errors }\" />\n </pw-input-container>\n <pw-input-container class=\"col-lg-6\" [label]=\"'Admin.Incident.ServiceImpacted' | transloco\"\n name=\"service_impacted\"\n [errorMsg]=\"'Admin.Incident.Validation.ServiceImpacted' | transloco\">\n <input type=\"text\" formControlName=\"service_impacted\" class=\"form-control\"\n [ngClass]=\"{ 'is-invalid': submitted && f['service_impacted'].errors }\" />\n </pw-input-container>\n <div class=\"col-lg-12\">\n <pw-input-container class=\"col-12 quill-editor\"\n [label]=\"'Admin.Incident.Description' | transloco\" name=\"description\"\n [errorMsg]=\"'Admin.Incident.Validation.Description' | transloco\">\n <quill-editor [styles]=\"{ height: '200px'}\" formControlName=\"description\" [modules]=\"editorConfig\"\n class=\"quillEditor d-block\"\n [ngClass]=\"{ 'is-invalid': submitted && f['description'].errors, 'w-100': true }\">\n </quill-editor>\n </pw-input-container>\n </div>\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.StartedAt' | transloco\" name=\"started_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"started_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.ResolvedAt' | transloco\" name=\"resolved_at\"\n [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"resolved_at\" [showIcon]=\"true\" [placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n <div class=\"col-xs-12 col-sm-4 col-md-4 col-lg-4\">\n <pw-input-container [label]=\"'Admin.Incident.LastCheckedAt' | transloco\"\n name=\"last_check_at\" [errorMsg]=\"'Admin.Incident.Validation.Date' | transloco\">\n <p-calendar class=\"addEditincident\" formControlName=\"last_check_at\"[placeholder]=\"'Admin.Incident.calender.placeholder' | transloco\"\n [showIcon]=\"true\" [showTime]=\"true\" [appendTo]=\"'body'\" dateFormat=\"dd-M-yy\">\n </p-calendar>\n </pw-input-container>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <div class=\"mb-3 text-end\">\n <button type=\"button\" class=\"btn btn-outline-default me-2\" data-bs-toggle=\"collapse\"\n (click)=\"onCancel()\" role=\"button\" aria-expanded=\"false\"\n aria-controls=\"incidentCollapse\"> {{ 'Button.Cancel' | transloco }} </button>\n <button class=\"btn btn-primary\" [buttonBusy]=\"buttonBusy\">{{\n 'Button.Save' | transloco }}</button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n</div>\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_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"] }]
|
|
7293
7309
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.CommonService }, { type: i3$2.DomSanitizer }], propDecorators: { editForm: [{
|
|
7294
7310
|
type: ViewChild,
|
|
7295
7311
|
args: ['editForm', { static: false }]
|
|
@@ -7325,8 +7341,9 @@ class AddFaqComponent extends AppBaseComponent {
|
|
|
7325
7341
|
this.categoryForBadges = [];
|
|
7326
7342
|
this.faqHashMap = {};
|
|
7327
7343
|
this.page = 1;
|
|
7328
|
-
|
|
7344
|
+
QuillHelper.init();
|
|
7329
7345
|
this.editorConfig = QuillHelper.getEditorConfig();
|
|
7346
|
+
this.form = AppAdmin.getFaqForm();
|
|
7330
7347
|
}
|
|
7331
7348
|
ngOnInit() {
|
|
7332
7349
|
this.slug = PermissionService.selectedSubscription?.slug;
|
|
@@ -7733,8 +7750,9 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
7733
7750
|
this.faqHashMap = {};
|
|
7734
7751
|
this.page = 1;
|
|
7735
7752
|
this.activeItem = null;
|
|
7736
|
-
|
|
7753
|
+
QuillHelper.init();
|
|
7737
7754
|
this.editorConfig = QuillHelper.getEditorConfig();
|
|
7755
|
+
this.form = AppAdmin.getFaqForm();
|
|
7738
7756
|
}
|
|
7739
7757
|
ngAfterViewInit() {
|
|
7740
7758
|
HelperService.subscribeToEditorChanges(this.form, 'answer');
|
|
@@ -7764,7 +7782,13 @@ class EditFaqComponent extends AppBaseComponent {
|
|
|
7764
7782
|
getCurrentFaq() {
|
|
7765
7783
|
this.commonService.getFaqById(this.id, this.subscriptionId).subscribe(data => {
|
|
7766
7784
|
this.isLoaded = false;
|
|
7767
|
-
|
|
7785
|
+
if (data) {
|
|
7786
|
+
this.form.patchValue({ ...data, id: this.id });
|
|
7787
|
+
}
|
|
7788
|
+
else {
|
|
7789
|
+
this.toast.error('Record Not Found');
|
|
7790
|
+
this.toast.error('Something went wrong. Please contact support if the problem persists.');
|
|
7791
|
+
}
|
|
7768
7792
|
});
|
|
7769
7793
|
}
|
|
7770
7794
|
onSubmit() {
|