fas-admin 0.0.92 → 0.0.94
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/api/api-services/operator-app-ratings.service.d.ts +14 -0
- package/api/api-services/operator-issue-reports.service.d.ts +14 -0
- package/api/operator-app-rating-vm.model.d.ts +9 -0
- package/api/operator-issue-report-vm.model.d.ts +8 -0
- package/esm2022/api/api-services/operator-app-ratings.service.mjs +34 -0
- package/esm2022/api/api-services/operator-issue-reports.service.mjs +34 -0
- package/esm2022/api/operator-app-rating-vm.model.mjs +2 -0
- package/esm2022/api/operator-issue-report-vm.model.mjs +2 -0
- package/esm2022/lib/components/views/faq/faq.component.mjs +3 -3
- package/esm2022/lib/components/views/ratings/ratings.component.mjs +43 -125
- package/esm2022/lib/components/views/ratings/ratings.module.mjs +5 -5
- package/esm2022/lib/shared/const/fas-default-settings.const.mjs +2 -2
- package/fesm2022/fas-admin.mjs +102 -129
- package/fesm2022/fas-admin.mjs.map +1 -1
- package/lib/components/views/ratings/ratings.component.d.ts +20 -66
- package/lib/components/views/ratings/ratings.module.d.ts +1 -1
- package/package.json +1 -1
package/fesm2022/fas-admin.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, Inject, model, effect, untracked, Component, Input, inject, signal, EventEmitter, Output, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Inject, model, effect, untracked, Component, Input, inject, signal, EventEmitter, Output, NgModule, ViewChild } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, Subject, Subscription, of, map } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { HttpParams, HttpHeaders, HttpClient, HttpClientModule } from '@angular/common/http';
|
|
@@ -3035,138 +3035,111 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
|
|
|
3035
3035
|
args: [{ selector: 'lib-users', template: "<div class=\"font-semibold text-3xl mb-3\">U\u017Cytkownicy</div>\n<lib-users-list></lib-users-list>\n" }]
|
|
3036
3036
|
}] });
|
|
3037
3037
|
|
|
3038
|
+
class OperatorIssueReportsService {
|
|
3039
|
+
constructor(http, apiUrl) {
|
|
3040
|
+
this.http = http;
|
|
3041
|
+
this.apiUrl = apiUrl;
|
|
3042
|
+
this.baseUrl = `${this.apiUrl}/OperatorIssueReports`;
|
|
3043
|
+
}
|
|
3044
|
+
get() {
|
|
3045
|
+
const headers = this.createHeaders();
|
|
3046
|
+
return this.http.get(this.baseUrl, { headers });
|
|
3047
|
+
}
|
|
3048
|
+
createHeaders() {
|
|
3049
|
+
let headers = new HttpHeaders();
|
|
3050
|
+
const token = localStorage.getItem('authToken');
|
|
3051
|
+
if (token) {
|
|
3052
|
+
headers = headers.set('Authorization', `Bearer ${token}`);
|
|
3053
|
+
}
|
|
3054
|
+
return headers;
|
|
3055
|
+
}
|
|
3056
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorIssueReportsService, deps: [{ token: i1.HttpClient }, { token: API_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3057
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorIssueReportsService, providedIn: 'root' }); }
|
|
3058
|
+
}
|
|
3059
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorIssueReportsService, decorators: [{
|
|
3060
|
+
type: Injectable,
|
|
3061
|
+
args: [{ providedIn: 'root' }]
|
|
3062
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
3063
|
+
type: Inject,
|
|
3064
|
+
args: [API_URL]
|
|
3065
|
+
}] }] });
|
|
3066
|
+
|
|
3067
|
+
class OperatorAppRatingsService {
|
|
3068
|
+
constructor(http, apiUrl) {
|
|
3069
|
+
this.http = http;
|
|
3070
|
+
this.apiUrl = apiUrl;
|
|
3071
|
+
this.baseUrl = `${this.apiUrl}/OperatorAppRatings`;
|
|
3072
|
+
}
|
|
3073
|
+
get() {
|
|
3074
|
+
const headers = this.createHeaders();
|
|
3075
|
+
return this.http.get(this.baseUrl, { headers });
|
|
3076
|
+
}
|
|
3077
|
+
createHeaders() {
|
|
3078
|
+
let headers = new HttpHeaders();
|
|
3079
|
+
const token = localStorage.getItem('authToken');
|
|
3080
|
+
if (token) {
|
|
3081
|
+
headers = headers.set('Authorization', `Bearer ${token}`);
|
|
3082
|
+
}
|
|
3083
|
+
return headers;
|
|
3084
|
+
}
|
|
3085
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorAppRatingsService, deps: [{ token: i1.HttpClient }, { token: API_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3086
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorAppRatingsService, providedIn: 'root' }); }
|
|
3087
|
+
}
|
|
3088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: OperatorAppRatingsService, decorators: [{
|
|
3089
|
+
type: Injectable,
|
|
3090
|
+
args: [{ providedIn: 'root' }]
|
|
3091
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
3092
|
+
type: Inject,
|
|
3093
|
+
args: [API_URL]
|
|
3094
|
+
}] }] });
|
|
3095
|
+
|
|
3038
3096
|
class RatingsComponent {
|
|
3039
|
-
constructor() {
|
|
3040
|
-
this.
|
|
3041
|
-
this.
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
buttonClass: 'white-button appear',
|
|
3052
|
-
icoSuffix: 'pi pi-arrow-right',
|
|
3053
|
-
},
|
|
3054
|
-
],
|
|
3055
|
-
},
|
|
3056
|
-
{
|
|
3057
|
-
field: 'userName',
|
|
3058
|
-
header: 'Nazwa',
|
|
3059
|
-
},
|
|
3060
|
-
{
|
|
3061
|
-
field: 'subscriptionType',
|
|
3062
|
-
header: 'Treść',
|
|
3063
|
-
},
|
|
3064
|
-
{
|
|
3065
|
-
field: 'subscriptionType',
|
|
3066
|
-
header: 'Status',
|
|
3067
|
-
},
|
|
3068
|
-
{
|
|
3069
|
-
field: 'subscriptionType',
|
|
3070
|
-
header: 'Częstotliwość',
|
|
3071
|
-
},
|
|
3072
|
-
{
|
|
3073
|
-
field: 'subscriptionType',
|
|
3074
|
-
header: 'Grupa',
|
|
3075
|
-
},
|
|
3076
|
-
{
|
|
3077
|
-
field: 'actions',
|
|
3078
|
-
header: 'Akcje',
|
|
3079
|
-
sortable: false,
|
|
3080
|
-
columnClass: 'flex justify-content-center align-items-center gap-2',
|
|
3081
|
-
actions: [
|
|
3082
|
-
{
|
|
3083
|
-
label: '',
|
|
3084
|
-
tooltip: 'Edytuj',
|
|
3085
|
-
buttonClass: 'pi pi-pencil cursor-pointer text-center appear transparent-button',
|
|
3086
|
-
},
|
|
3087
|
-
{
|
|
3088
|
-
label: '',
|
|
3089
|
-
tooltip: '',
|
|
3090
|
-
buttonClass: 'pi pi-play cursor-pointer text-center appear transparent-button',
|
|
3091
|
-
},
|
|
3092
|
-
{
|
|
3093
|
-
label: '',
|
|
3094
|
-
tooltip: '',
|
|
3095
|
-
buttonClass: 'pi pi-trash cursor-pointer text-center appear transparent-button',
|
|
3096
|
-
},
|
|
3097
|
-
],
|
|
3098
|
-
},
|
|
3097
|
+
constructor(apiUrl) {
|
|
3098
|
+
this.apiUrl = apiUrl;
|
|
3099
|
+
this._issueReportsService = inject(OperatorIssueReportsService);
|
|
3100
|
+
this._appRatingsService = inject(OperatorAppRatingsService);
|
|
3101
|
+
this.attachmentColumnTemplates = {};
|
|
3102
|
+
this.fetchIssueReports = () => this._issueReportsService.get();
|
|
3103
|
+
this.fetchAppRatings = () => this._appRatingsService.get();
|
|
3104
|
+
this.issueColumns = [
|
|
3105
|
+
{ field: 'created', columnHeader: 'Data zgłoszenia', dateField: true, sortable: true },
|
|
3106
|
+
{ field: 'createdByEmail', columnHeader: 'Użytkownik' },
|
|
3107
|
+
{ field: 'description', columnHeader: 'Opis' },
|
|
3108
|
+
{ field: 'attachmentUrl', columnHeader: 'Zdjęcie', columnTemplateKey: 'attachment' },
|
|
3099
3109
|
];
|
|
3100
|
-
this.
|
|
3101
|
-
{
|
|
3102
|
-
|
|
3103
|
-
header: 'Data utworzenia',
|
|
3104
|
-
sortable: true,
|
|
3105
|
-
dateField: true,
|
|
3106
|
-
columnClass: 'flex justify-content-between align-items-center',
|
|
3107
|
-
actions: [
|
|
3108
|
-
{
|
|
3109
|
-
label: 'Szczegóły',
|
|
3110
|
-
buttonClass: 'white-button appear',
|
|
3111
|
-
icoSuffix: 'pi pi-arrow-right',
|
|
3112
|
-
},
|
|
3113
|
-
],
|
|
3114
|
-
},
|
|
3115
|
-
{
|
|
3116
|
-
field: 'userName',
|
|
3117
|
-
header: 'Nazwa',
|
|
3118
|
-
},
|
|
3119
|
-
{
|
|
3120
|
-
field: 'subscriptionType',
|
|
3121
|
-
header: 'Treść',
|
|
3122
|
-
},
|
|
3110
|
+
this.ratingColumns = [
|
|
3111
|
+
{ field: 'created', columnHeader: 'Data oceny', dateField: true, sortable: true },
|
|
3112
|
+
{ field: 'createdByEmail', columnHeader: 'Użytkownik' },
|
|
3123
3113
|
{
|
|
3124
|
-
field: '
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
{
|
|
3128
|
-
field: 'subscriptionType',
|
|
3129
|
-
header: 'Częstotliwość',
|
|
3130
|
-
},
|
|
3131
|
-
{
|
|
3132
|
-
field: 'subscriptionType',
|
|
3133
|
-
header: 'Grupa',
|
|
3134
|
-
},
|
|
3135
|
-
{
|
|
3136
|
-
field: 'actions',
|
|
3137
|
-
header: 'Akcje',
|
|
3138
|
-
sortable: false,
|
|
3139
|
-
columnClass: 'flex justify-content-center align-items-center gap-2',
|
|
3140
|
-
actions: [
|
|
3141
|
-
{
|
|
3142
|
-
label: '',
|
|
3143
|
-
tooltip: 'Edytuj',
|
|
3144
|
-
buttonClass: 'pi pi-pencil cursor-pointer text-center appear transparent-button',
|
|
3145
|
-
},
|
|
3146
|
-
{
|
|
3147
|
-
label: '',
|
|
3148
|
-
tooltip: '',
|
|
3149
|
-
buttonClass: 'pi pi-play cursor-pointer text-center appear transparent-button',
|
|
3150
|
-
},
|
|
3151
|
-
{
|
|
3152
|
-
label: '',
|
|
3153
|
-
tooltip: '',
|
|
3154
|
-
buttonClass: 'pi pi-trash cursor-pointer text-center appear transparent-button',
|
|
3155
|
-
},
|
|
3156
|
-
],
|
|
3114
|
+
field: 'rating',
|
|
3115
|
+
columnHeader: 'Ocena',
|
|
3116
|
+
valueFunction: (data) => '★'.repeat(data.rating) + '☆'.repeat(5 - data.rating),
|
|
3157
3117
|
},
|
|
3118
|
+
{ field: 'feedback', columnHeader: 'Opinia' },
|
|
3119
|
+
{ field: 'attachmentUrl', columnHeader: 'Zdjęcie', columnTemplateKey: 'attachment' },
|
|
3158
3120
|
];
|
|
3159
3121
|
}
|
|
3160
|
-
|
|
3161
|
-
this.
|
|
3122
|
+
ngAfterViewInit() {
|
|
3123
|
+
this.attachmentColumnTemplates = { attachment: this.attachmentTemplate };
|
|
3124
|
+
}
|
|
3125
|
+
resolveUrl(url) {
|
|
3126
|
+
if (!url)
|
|
3127
|
+
return undefined;
|
|
3128
|
+
return url.startsWith('http') ? url : `${this.apiUrl}${url}`;
|
|
3162
3129
|
}
|
|
3163
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: RatingsComponent, selector: "lib-ratings", ngImport: i0, template: "<p-tabView styleClass=\"tabview-lg\">\n <p-tabPanel header=\"
|
|
3130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsComponent, deps: [{ token: API_URL }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3131
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: RatingsComponent, selector: "lib-ratings", viewQueries: [{ propertyName: "attachmentTemplate", first: true, predicate: ["attachmentTemplate"], descendants: true }], ngImport: i0, template: "<ng-template #attachmentTemplate let-rowData>\n <a *ngIf=\"rowData.attachmentUrl\" [href]=\"resolveUrl(rowData.attachmentUrl)\" target=\"_blank\" rel=\"noopener\">\n <img [src]=\"resolveUrl(rowData.attachmentUrl)\" style=\"max-height:60px;max-width:100px;object-fit:contain;border-radius:4px;\" />\n </a>\n</ng-template>\n\n<p-tabView styleClass=\"tabview-lg\">\n <p-tabPanel header=\"Zg\u0142oszenia b\u0142\u0119d\u00F3w\">\n <fas-service-dynamic-table\n [columns]=\"issueColumns\"\n [columnTemplates]=\"attachmentColumnTemplates\"\n [fullDataService]=\"fetchIssueReports\"\n dataMode=\"client\"\n ></fas-service-dynamic-table>\n </p-tabPanel>\n\n <p-tabPanel header=\"Oceny aplikacji\">\n <fas-service-dynamic-table\n [columns]=\"ratingColumns\"\n [columnTemplates]=\"attachmentColumnTemplates\"\n [fullDataService]=\"fetchAppRatings\"\n dataMode=\"client\"\n ></fas-service-dynamic-table>\n </p-tabPanel>\n</p-tabView>\n", styles: [""], dependencies: [{ kind: "component", type: i1$4.FasServiceDynamicTableComponent, selector: "fas-service-dynamic-table", inputs: ["dataMode", "columns", "columnTemplates", "dataService", "fullDataService", "initialPageSize", "showGlobalSearch", "resetTrigger", "refreshCurrentPage", "selectionMode", "rowSelectFunction", "rowUnSelectFunction", "dateFormat", "isTransparentHeader", "showCheckbox", "tableRowClassName", "rowHover", "paginator", "styleClass"], outputs: ["dataLoaded"] }, { kind: "component", type: i2$2.TabView, selector: "p-tabView", inputs: ["style", "styleClass", "controlClose", "scrollable", "activeIndex", "selectOnFocus", "nextButtonAriaLabel", "prevButtonAriaLabel", "autoHideButtons", "tabindex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { kind: "component", type: i2$2.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3165
3132
|
}
|
|
3166
3133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsComponent, decorators: [{
|
|
3167
3134
|
type: Component,
|
|
3168
|
-
args: [{ selector: 'lib-ratings', template: "<p-tabView styleClass=\"tabview-lg\">\n <p-tabPanel header=\"
|
|
3169
|
-
}]
|
|
3135
|
+
args: [{ selector: 'lib-ratings', template: "<ng-template #attachmentTemplate let-rowData>\n <a *ngIf=\"rowData.attachmentUrl\" [href]=\"resolveUrl(rowData.attachmentUrl)\" target=\"_blank\" rel=\"noopener\">\n <img [src]=\"resolveUrl(rowData.attachmentUrl)\" style=\"max-height:60px;max-width:100px;object-fit:contain;border-radius:4px;\" />\n </a>\n</ng-template>\n\n<p-tabView styleClass=\"tabview-lg\">\n <p-tabPanel header=\"Zg\u0142oszenia b\u0142\u0119d\u00F3w\">\n <fas-service-dynamic-table\n [columns]=\"issueColumns\"\n [columnTemplates]=\"attachmentColumnTemplates\"\n [fullDataService]=\"fetchIssueReports\"\n dataMode=\"client\"\n ></fas-service-dynamic-table>\n </p-tabPanel>\n\n <p-tabPanel header=\"Oceny aplikacji\">\n <fas-service-dynamic-table\n [columns]=\"ratingColumns\"\n [columnTemplates]=\"attachmentColumnTemplates\"\n [fullDataService]=\"fetchAppRatings\"\n dataMode=\"client\"\n ></fas-service-dynamic-table>\n </p-tabPanel>\n</p-tabView>\n" }]
|
|
3136
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3137
|
+
type: Inject,
|
|
3138
|
+
args: [API_URL]
|
|
3139
|
+
}] }], propDecorators: { attachmentTemplate: [{
|
|
3140
|
+
type: ViewChild,
|
|
3141
|
+
args: ['attachmentTemplate']
|
|
3142
|
+
}] } });
|
|
3170
3143
|
|
|
3171
3144
|
class OperatorFaqCategoriesService {
|
|
3172
3145
|
constructor(http, apiUrl) {
|
|
@@ -4222,11 +4195,11 @@ class FaqComponent {
|
|
|
4222
4195
|
return text.length > 0;
|
|
4223
4196
|
}
|
|
4224
4197
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FaqComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4225
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: FaqComponent, selector: "lib-faq", inputs: { availableLanguages: "availableLanguages" }, ngImport: i0, template: "<p-toast></p-toast>\n\n<div class=\"main-card p-3\">\n <div class=\"flex justify-content-between align-items-center mb-3\">\n <span class=\"text-3xl font-semibold\">Centrum pomocy</span>\n <p-button label=\"Dodaj kategori\u0119\" icon=\"pi pi-plus\" (onClick)=\"openNewCategory()\"></p-button>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex justify-content-center p-4\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n\n <p-accordion *ngIf=\"!loading\" [multiple]=\"true\">\n <p-accordionTab\n *ngFor=\"let category of categories\"\n (selectedChange)=\"$event && onCategoryTabOpen(category.id)\"\n >\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center justify-content-between w-full pr-3\">\n <span class=\"flex align-items-center gap-2 font-semibold\">\n <i *ngIf=\"category.icon\" [class]=\"category.icon\"></i>\n {{ category.title }}\n <span class=\"text-sm text-color-secondary\">(kolejno\u015B\u0107: {{ category.order }})</span>\n </span>\n <span class=\"flex align-items-center gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"$event.stopPropagation(); openEditCategory(category)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"$event.stopPropagation(); deleteCategory(category)\"\n ></p-button>\n </span>\n </div>\n </ng-template>\n\n <div class=\"flex justify-content-end mb-2\">\n <p-button\n label=\"Dodaj pytanie\"\n icon=\"pi pi-plus\"\n [outlined]=\"true\"\n (onClick)=\"openNewItem(category.id)\"\n ></p-button>\n </div>\n\n <p-table [value]=\"itemsByCategory[category.id] || []\" dataKey=\"id\" styleClass=\"p-datatable-sm\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 3rem\"></th>\n <th style=\"width: 5rem\">#</th>\n <th>Pytanie</th>\n <th style=\"width: 8rem\">Akcje</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-expanded=\"expanded\">\n <tr>\n <td>\n <p-button\n type=\"button\"\n [pRowToggler]=\"item\"\n [text]=\"true\"\n [rounded]=\"true\"\n severity=\"secondary\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n ></p-button>\n </td>\n <td>{{ item.order }}</td>\n <td>{{ item.question }}</td>\n <td>\n <span class=\"flex gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"openEditItem(item)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"deleteItem(item)\"\n ></p-button>\n </span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-item>\n <tr>\n <td colspan=\"4\">\n <div class=\"faq-preview p-3\">\n <div class=\"faq-preview__label\">Odpowied\u017A</div>\n <div class=\"faq-preview__content ql-editor p-0\" [innerHTML]=\"item.answer\"></div>\n\n <div *ngIf=\"item.translations?.length\" class=\"mt-3\">\n <div class=\"faq-preview__label\">T\u0142umaczenia</div>\n <div\n *ngFor=\"let t of item.translations\"\n class=\"faq-preview__translation mt-2 pt-2 border-top-1 border-300\"\n >\n <div class=\"font-semibold\"><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</div>\n <div class=\"faq-preview__content ql-editor p-0 mt-1\" [innerHTML]=\"t.answerOverride\"></div>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"4\" class=\"text-center text-color-secondary\">Brak pyta\u0144 w tej kategorii.</td>\n </tr>\n </ng-template>\n </p-table>\n </p-accordionTab>\n </p-accordion>\n\n <p class=\"text-center text-color-secondary\" *ngIf=\"!loading && !categories.length\">\n Brak kategorii. Dodaj pierwsz\u0105 kategori\u0119.\n </p>\n</div>\n\n<!-- Category dialog -->\n<p-dialog\n [(visible)]=\"categoryDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '600px' }\"\n [header]=\"editingCategory ? 'Edytuj kategori\u0119' : 'Dodaj kategori\u0119'\"\n>\n <form [formGroup]=\"categoryForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Tytu\u0142</label>\n <input pInputText formControlName=\"title\" placeholder=\"np. Pierwsze kroki\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Ikona</label>\n <p-dropdown\n styleClass=\"w-full icon-dropdown\"\n panelStyleClass=\"faq-icon-dropdown-panel\"\n formControlName=\"icon\"\n [options]=\"primeIconOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n filterBy=\"label,value\"\n filterPlaceholder=\"Szukaj ikony\"\n placeholder=\"Wybierz ikone\"\n appendTo=\"body\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"42\"\n >\n <ng-template pTemplate=\"selectedItem\" let-iconOption>\n <div class=\"faq-icon-option\" *ngIf=\"resolvePrimeIconOption(iconOption) as selectedIcon\">\n <i [class]=\"selectedIcon.value\"></i>\n <span>{{ selectedIcon.label }}</span>\n <small>{{ selectedIcon.value }}</small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-iconOption>\n <div class=\"faq-icon-option\">\n <i [class]=\"iconOption.value\"></i>\n <span>{{ iconOption.label }}</span>\n <small>{{ iconOption.value }}</small>\n </div>\n </ng-template>\n </p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingCategory\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingCategory.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingCategoryTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.titleOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editCategoryTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteCategoryTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"categoryTranslationForm\" class=\"flex gap-2 align-items-end\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingCategoryTranslationId\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Tytu\u0142 (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"titleOverride\" />\n </div>\n <p-button\n [icon]=\"editingCategoryTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingCategoryTranslationId ? 'Zapisz zmiany' : 'Dodaj'\"\n [outlined]=\"true\"\n (onClick)=\"saveCategoryTranslation()\"\n ></p-button>\n <p-button\n *ngIf=\"editingCategoryTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelCategoryTranslationEdit()\"\n ></p-button>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"categoryDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveCategory()\"></p-button>\n </ng-template>\n</p-dialog>\n\n<!-- Item dialog -->\n<p-dialog\n [(visible)]=\"itemDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '80vw' }\"\n [header]=\"editingItem ? 'Edytuj pytanie' : 'Dodaj pytanie'\"\n (onShow)=\"onItemDialogShow()\"\n>\n <form [formGroup]=\"itemForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Pytanie</label>\n <input pInputText formControlName=\"question\" placeholder=\"Tre\u015B\u0107 pytania\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A</label>\n <p-editor\n formControlName=\"answer\"\n [style]=\"{ height: '320px' }\"\n (onInit)=\"onEditorInit($event)\"\n ></p-editor>\n </div>\n <div class=\"flex flex-column gap-1\" style=\"max-width: 200px\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingItem\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingItem.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingItemTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editItemTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteItemTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"itemTranslationForm\" class=\"flex flex-column gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingItemTranslationId\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Pytanie (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"questionOverride\" />\n </div>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A (t\u0142umaczenie)</label>\n <p-editor formControlName=\"answerOverride\" [style]=\"{ height: '200px' }\" (onInit)=\"onTranslationEditorInit($event)\"></p-editor>\n </div>\n <div class=\"flex justify-content-end gap-2\">\n <p-button\n *ngIf=\"editingItemTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelItemTranslationEdit()\"\n ></p-button>\n <p-button\n [icon]=\"editingItemTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingItemTranslationId ? 'Zapisz zmiany' : 'Dodaj t\u0142umaczenie'\"\n [outlined]=\"true\"\n (onClick)=\"saveItemTranslation()\"\n ></p-button>\n </div>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"itemDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveItem()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.main-card{background:#fff;border-radius:12px}label{font-weight:600;font-size:.9rem}.faq-icon-option{display:grid;grid-template-columns:1.75rem minmax(0,1fr) auto;align-items:center;gap:.5rem;min-height:2rem;width:100%}.faq-icon-option i{color:#334155;font-size:1.05rem;text-align:center}.faq-icon-option span{overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap}.faq-icon-option small{color:#64748b;font-size:.78rem;max-width:13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .faq-icon-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-bottom:.35rem;padding-top:.35rem}.faq-preview{background:#f8fafc;border-radius:8px}.faq-preview__label{font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#64748b;margin-bottom:.25rem}.faq-preview__content{color:#1e293b}.faq-preview__content ::ng-deep img{max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i7$1.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: i7$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i5.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: i11.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "component", type: i12.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] }); }
|
|
4198
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: FaqComponent, selector: "lib-faq", inputs: { availableLanguages: "availableLanguages" }, ngImport: i0, template: "<p-toast></p-toast>\n\n<div class=\"main-card p-3\">\n <div class=\"flex justify-content-between align-items-center mb-3\">\n <span class=\"text-3xl font-semibold\">Centrum pomocy</span>\n <p-button label=\"Dodaj kategori\u0119\" icon=\"pi pi-plus\" (onClick)=\"openNewCategory()\"></p-button>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex justify-content-center p-4\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n\n <p-accordion *ngIf=\"!loading\" [multiple]=\"true\">\n <p-accordionTab\n *ngFor=\"let category of categories\"\n (selectedChange)=\"$event && onCategoryTabOpen(category.id)\"\n >\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center justify-content-between w-full pr-3\">\n <span class=\"flex align-items-center gap-2 font-semibold\">\n <i *ngIf=\"category.icon\" [class]=\"category.icon\"></i>\n {{ category.title }}\n <span class=\"text-sm text-color-secondary\">(kolejno\u015B\u0107: {{ category.order }})</span>\n </span>\n <span class=\"flex align-items-center gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"$event.stopPropagation(); openEditCategory(category)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"$event.stopPropagation(); deleteCategory(category)\"\n ></p-button>\n </span>\n </div>\n </ng-template>\n\n <div class=\"flex justify-content-end mb-2\">\n <p-button\n label=\"Dodaj pytanie\"\n icon=\"pi pi-plus\"\n [outlined]=\"true\"\n (onClick)=\"openNewItem(category.id)\"\n ></p-button>\n </div>\n\n <p-table [value]=\"itemsByCategory[category.id] || []\" dataKey=\"id\" styleClass=\"p-datatable-sm\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 3rem\"></th>\n <th style=\"width: 5rem\">#</th>\n <th>Pytanie</th>\n <th style=\"width: 8rem\">Akcje</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-expanded=\"expanded\">\n <tr>\n <td>\n <p-button\n type=\"button\"\n [pRowToggler]=\"item\"\n [text]=\"true\"\n [rounded]=\"true\"\n severity=\"secondary\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n ></p-button>\n </td>\n <td>{{ item.order }}</td>\n <td>{{ item.question }}</td>\n <td>\n <span class=\"flex gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"openEditItem(item)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"deleteItem(item)\"\n ></p-button>\n </span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-item>\n <tr>\n <td colspan=\"4\">\n <div class=\"faq-preview p-3\">\n <div class=\"faq-preview__label\">Odpowied\u017A</div>\n <div class=\"faq-preview__content ql-editor p-0\" [innerHTML]=\"item.answer\"></div>\n\n <div *ngIf=\"item.translations?.length\" class=\"mt-3\">\n <div class=\"faq-preview__label\">T\u0142umaczenia</div>\n <div\n *ngFor=\"let t of item.translations\"\n class=\"faq-preview__translation mt-2 pt-2 border-top-1 border-300\"\n >\n <div class=\"font-semibold\"><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</div>\n <div class=\"faq-preview__content ql-editor p-0 mt-1\" [innerHTML]=\"t.answerOverride\"></div>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"4\" class=\"text-center text-color-secondary\">Brak pyta\u0144 w tej kategorii.</td>\n </tr>\n </ng-template>\n </p-table>\n </p-accordionTab>\n </p-accordion>\n\n <p class=\"text-center text-color-secondary\" *ngIf=\"!loading && !categories.length\">\n Brak kategorii. Dodaj pierwsz\u0105 kategori\u0119.\n </p>\n</div>\n\n<!-- Category dialog -->\n<p-dialog\n [(visible)]=\"categoryDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '600px' }\"\n [header]=\"editingCategory ? 'Edytuj kategori\u0119' : 'Dodaj kategori\u0119'\"\n>\n <form [formGroup]=\"categoryForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Tytu\u0142</label>\n <input pInputText formControlName=\"title\" placeholder=\"np. Pierwsze kroki\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Ikona</label>\n <p-dropdown\n styleClass=\"w-full icon-dropdown\"\n panelStyleClass=\"faq-icon-dropdown-panel\"\n formControlName=\"icon\"\n [options]=\"primeIconOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n filterBy=\"label,value\"\n filterPlaceholder=\"Szukaj ikony\"\n placeholder=\"Wybierz ikone\"\n appendTo=\"body\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"42\"\n >\n <ng-template pTemplate=\"selectedItem\" let-iconOption>\n <div class=\"faq-icon-option\" *ngIf=\"resolvePrimeIconOption(iconOption) as selectedIcon\">\n <i [class]=\"selectedIcon.value\"></i>\n <span>{{ selectedIcon.label }}</span>\n <small>{{ selectedIcon.value }}</small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-iconOption>\n <div class=\"faq-icon-option\">\n <i [class]=\"iconOption.value\"></i>\n <span>{{ iconOption.label }}</span>\n <small>{{ iconOption.value }}</small>\n </div>\n </ng-template>\n </p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingCategory\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingCategory.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingCategoryTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.titleOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editCategoryTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteCategoryTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"categoryTranslationForm\" class=\"flex gap-2 align-items-end\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingCategoryTranslationId\"\n appendTo=\"body\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Tytu\u0142 (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"titleOverride\" />\n </div>\n <p-button\n [icon]=\"editingCategoryTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingCategoryTranslationId ? 'Zapisz zmiany' : 'Dodaj'\"\n [outlined]=\"true\"\n (onClick)=\"saveCategoryTranslation()\"\n ></p-button>\n <p-button\n *ngIf=\"editingCategoryTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelCategoryTranslationEdit()\"\n ></p-button>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"categoryDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveCategory()\"></p-button>\n </ng-template>\n</p-dialog>\n\n<!-- Item dialog -->\n<p-dialog\n [(visible)]=\"itemDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '80vw' }\"\n [header]=\"editingItem ? 'Edytuj pytanie' : 'Dodaj pytanie'\"\n (onShow)=\"onItemDialogShow()\"\n>\n <form [formGroup]=\"itemForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Pytanie</label>\n <input pInputText formControlName=\"question\" placeholder=\"Tre\u015B\u0107 pytania\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A</label>\n <p-editor\n formControlName=\"answer\"\n [style]=\"{ height: '320px' }\"\n (onInit)=\"onEditorInit($event)\"\n ></p-editor>\n </div>\n <div class=\"flex flex-column gap-1\" style=\"max-width: 200px\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingItem\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingItem.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingItemTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editItemTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteItemTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"itemTranslationForm\" class=\"flex flex-column gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingItemTranslationId\"\n appendTo=\"body\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Pytanie (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"questionOverride\" />\n </div>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A (t\u0142umaczenie)</label>\n <p-editor formControlName=\"answerOverride\" [style]=\"{ height: '200px' }\" (onInit)=\"onTranslationEditorInit($event)\"></p-editor>\n </div>\n <div class=\"flex justify-content-end gap-2\">\n <p-button\n *ngIf=\"editingItemTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelItemTranslationEdit()\"\n ></p-button>\n <p-button\n [icon]=\"editingItemTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingItemTranslationId ? 'Zapisz zmiany' : 'Dodaj t\u0142umaczenie'\"\n [outlined]=\"true\"\n (onClick)=\"saveItemTranslation()\"\n ></p-button>\n </div>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"itemDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveItem()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.main-card{background:#fff;border-radius:12px}label{font-weight:600;font-size:.9rem}.faq-icon-option{display:grid;grid-template-columns:1.75rem minmax(0,1fr) auto;align-items:center;gap:.5rem;min-height:2rem;width:100%}.faq-icon-option i{color:#334155;font-size:1.05rem;text-align:center}.faq-icon-option span{overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap}.faq-icon-option small{color:#64748b;font-size:.78rem;max-width:13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .faq-icon-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-bottom:.35rem;padding-top:.35rem}.faq-preview{background:#f8fafc;border-radius:8px}.faq-preview__label{font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#64748b;margin-bottom:.25rem}.faq-preview__content{color:#1e293b}.faq-preview__content ::ng-deep img{max-width:100%;height:auto}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i3$2.Accordion, selector: "p-accordion", inputs: ["multiple", "style", "styleClass", "expandIcon", "collapseIcon", "activeIndex", "selectOnFocus", "headerAriaLevel"], outputs: ["onClose", "onOpen", "activeIndexChange"] }, { kind: "component", type: i3$2.AccordionTab, selector: "p-accordionTab", inputs: ["id", "header", "headerStyle", "tabStyle", "contentStyle", "tabStyleClass", "headerStyleClass", "contentStyleClass", "disabled", "cache", "transitionOptions", "iconPos", "selected", "headerAriaLevel"], outputs: ["selectedChange"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4$1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i7$1.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: i7$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i2.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "variant", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i5.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: i11.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "component", type: i12.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] }); }
|
|
4226
4199
|
}
|
|
4227
4200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: FaqComponent, decorators: [{
|
|
4228
4201
|
type: Component,
|
|
4229
|
-
args: [{ selector: 'lib-faq', template: "<p-toast></p-toast>\n\n<div class=\"main-card p-3\">\n <div class=\"flex justify-content-between align-items-center mb-3\">\n <span class=\"text-3xl font-semibold\">Centrum pomocy</span>\n <p-button label=\"Dodaj kategori\u0119\" icon=\"pi pi-plus\" (onClick)=\"openNewCategory()\"></p-button>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex justify-content-center p-4\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n\n <p-accordion *ngIf=\"!loading\" [multiple]=\"true\">\n <p-accordionTab\n *ngFor=\"let category of categories\"\n (selectedChange)=\"$event && onCategoryTabOpen(category.id)\"\n >\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center justify-content-between w-full pr-3\">\n <span class=\"flex align-items-center gap-2 font-semibold\">\n <i *ngIf=\"category.icon\" [class]=\"category.icon\"></i>\n {{ category.title }}\n <span class=\"text-sm text-color-secondary\">(kolejno\u015B\u0107: {{ category.order }})</span>\n </span>\n <span class=\"flex align-items-center gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"$event.stopPropagation(); openEditCategory(category)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"$event.stopPropagation(); deleteCategory(category)\"\n ></p-button>\n </span>\n </div>\n </ng-template>\n\n <div class=\"flex justify-content-end mb-2\">\n <p-button\n label=\"Dodaj pytanie\"\n icon=\"pi pi-plus\"\n [outlined]=\"true\"\n (onClick)=\"openNewItem(category.id)\"\n ></p-button>\n </div>\n\n <p-table [value]=\"itemsByCategory[category.id] || []\" dataKey=\"id\" styleClass=\"p-datatable-sm\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 3rem\"></th>\n <th style=\"width: 5rem\">#</th>\n <th>Pytanie</th>\n <th style=\"width: 8rem\">Akcje</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-expanded=\"expanded\">\n <tr>\n <td>\n <p-button\n type=\"button\"\n [pRowToggler]=\"item\"\n [text]=\"true\"\n [rounded]=\"true\"\n severity=\"secondary\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n ></p-button>\n </td>\n <td>{{ item.order }}</td>\n <td>{{ item.question }}</td>\n <td>\n <span class=\"flex gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"openEditItem(item)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"deleteItem(item)\"\n ></p-button>\n </span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-item>\n <tr>\n <td colspan=\"4\">\n <div class=\"faq-preview p-3\">\n <div class=\"faq-preview__label\">Odpowied\u017A</div>\n <div class=\"faq-preview__content ql-editor p-0\" [innerHTML]=\"item.answer\"></div>\n\n <div *ngIf=\"item.translations?.length\" class=\"mt-3\">\n <div class=\"faq-preview__label\">T\u0142umaczenia</div>\n <div\n *ngFor=\"let t of item.translations\"\n class=\"faq-preview__translation mt-2 pt-2 border-top-1 border-300\"\n >\n <div class=\"font-semibold\"><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</div>\n <div class=\"faq-preview__content ql-editor p-0 mt-1\" [innerHTML]=\"t.answerOverride\"></div>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"4\" class=\"text-center text-color-secondary\">Brak pyta\u0144 w tej kategorii.</td>\n </tr>\n </ng-template>\n </p-table>\n </p-accordionTab>\n </p-accordion>\n\n <p class=\"text-center text-color-secondary\" *ngIf=\"!loading && !categories.length\">\n Brak kategorii. Dodaj pierwsz\u0105 kategori\u0119.\n </p>\n</div>\n\n<!-- Category dialog -->\n<p-dialog\n [(visible)]=\"categoryDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '600px' }\"\n [header]=\"editingCategory ? 'Edytuj kategori\u0119' : 'Dodaj kategori\u0119'\"\n>\n <form [formGroup]=\"categoryForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Tytu\u0142</label>\n <input pInputText formControlName=\"title\" placeholder=\"np. Pierwsze kroki\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Ikona</label>\n <p-dropdown\n styleClass=\"w-full icon-dropdown\"\n panelStyleClass=\"faq-icon-dropdown-panel\"\n formControlName=\"icon\"\n [options]=\"primeIconOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n filterBy=\"label,value\"\n filterPlaceholder=\"Szukaj ikony\"\n placeholder=\"Wybierz ikone\"\n appendTo=\"body\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"42\"\n >\n <ng-template pTemplate=\"selectedItem\" let-iconOption>\n <div class=\"faq-icon-option\" *ngIf=\"resolvePrimeIconOption(iconOption) as selectedIcon\">\n <i [class]=\"selectedIcon.value\"></i>\n <span>{{ selectedIcon.label }}</span>\n <small>{{ selectedIcon.value }}</small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-iconOption>\n <div class=\"faq-icon-option\">\n <i [class]=\"iconOption.value\"></i>\n <span>{{ iconOption.label }}</span>\n <small>{{ iconOption.value }}</small>\n </div>\n </ng-template>\n </p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingCategory\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingCategory.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingCategoryTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.titleOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editCategoryTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteCategoryTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"categoryTranslationForm\" class=\"flex gap-2 align-items-end\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingCategoryTranslationId\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Tytu\u0142 (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"titleOverride\" />\n </div>\n <p-button\n [icon]=\"editingCategoryTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingCategoryTranslationId ? 'Zapisz zmiany' : 'Dodaj'\"\n [outlined]=\"true\"\n (onClick)=\"saveCategoryTranslation()\"\n ></p-button>\n <p-button\n *ngIf=\"editingCategoryTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelCategoryTranslationEdit()\"\n ></p-button>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"categoryDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveCategory()\"></p-button>\n </ng-template>\n</p-dialog>\n\n<!-- Item dialog -->\n<p-dialog\n [(visible)]=\"itemDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '80vw' }\"\n [header]=\"editingItem ? 'Edytuj pytanie' : 'Dodaj pytanie'\"\n (onShow)=\"onItemDialogShow()\"\n>\n <form [formGroup]=\"itemForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Pytanie</label>\n <input pInputText formControlName=\"question\" placeholder=\"Tre\u015B\u0107 pytania\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A</label>\n <p-editor\n formControlName=\"answer\"\n [style]=\"{ height: '320px' }\"\n (onInit)=\"onEditorInit($event)\"\n ></p-editor>\n </div>\n <div class=\"flex flex-column gap-1\" style=\"max-width: 200px\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingItem\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingItem.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingItemTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editItemTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteItemTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"itemTranslationForm\" class=\"flex flex-column gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingItemTranslationId\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Pytanie (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"questionOverride\" />\n </div>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A (t\u0142umaczenie)</label>\n <p-editor formControlName=\"answerOverride\" [style]=\"{ height: '200px' }\" (onInit)=\"onTranslationEditorInit($event)\"></p-editor>\n </div>\n <div class=\"flex justify-content-end gap-2\">\n <p-button\n *ngIf=\"editingItemTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelItemTranslationEdit()\"\n ></p-button>\n <p-button\n [icon]=\"editingItemTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingItemTranslationId ? 'Zapisz zmiany' : 'Dodaj t\u0142umaczenie'\"\n [outlined]=\"true\"\n (onClick)=\"saveItemTranslation()\"\n ></p-button>\n </div>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"itemDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveItem()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.main-card{background:#fff;border-radius:12px}label{font-weight:600;font-size:.9rem}.faq-icon-option{display:grid;grid-template-columns:1.75rem minmax(0,1fr) auto;align-items:center;gap:.5rem;min-height:2rem;width:100%}.faq-icon-option i{color:#334155;font-size:1.05rem;text-align:center}.faq-icon-option span{overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap}.faq-icon-option small{color:#64748b;font-size:.78rem;max-width:13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .faq-icon-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-bottom:.35rem;padding-top:.35rem}.faq-preview{background:#f8fafc;border-radius:8px}.faq-preview__label{font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#64748b;margin-bottom:.25rem}.faq-preview__content{color:#1e293b}.faq-preview__content ::ng-deep img{max-width:100%;height:auto}\n"] }]
|
|
4202
|
+
args: [{ selector: 'lib-faq', template: "<p-toast></p-toast>\n\n<div class=\"main-card p-3\">\n <div class=\"flex justify-content-between align-items-center mb-3\">\n <span class=\"text-3xl font-semibold\">Centrum pomocy</span>\n <p-button label=\"Dodaj kategori\u0119\" icon=\"pi pi-plus\" (onClick)=\"openNewCategory()\"></p-button>\n </div>\n\n <div *ngIf=\"loading\" class=\"flex justify-content-center p-4\">\n <p-progressSpinner></p-progressSpinner>\n </div>\n\n <p-accordion *ngIf=\"!loading\" [multiple]=\"true\">\n <p-accordionTab\n *ngFor=\"let category of categories\"\n (selectedChange)=\"$event && onCategoryTabOpen(category.id)\"\n >\n <ng-template pTemplate=\"header\">\n <div class=\"flex align-items-center justify-content-between w-full pr-3\">\n <span class=\"flex align-items-center gap-2 font-semibold\">\n <i *ngIf=\"category.icon\" [class]=\"category.icon\"></i>\n {{ category.title }}\n <span class=\"text-sm text-color-secondary\">(kolejno\u015B\u0107: {{ category.order }})</span>\n </span>\n <span class=\"flex align-items-center gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"$event.stopPropagation(); openEditCategory(category)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"$event.stopPropagation(); deleteCategory(category)\"\n ></p-button>\n </span>\n </div>\n </ng-template>\n\n <div class=\"flex justify-content-end mb-2\">\n <p-button\n label=\"Dodaj pytanie\"\n icon=\"pi pi-plus\"\n [outlined]=\"true\"\n (onClick)=\"openNewItem(category.id)\"\n ></p-button>\n </div>\n\n <p-table [value]=\"itemsByCategory[category.id] || []\" dataKey=\"id\" styleClass=\"p-datatable-sm\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 3rem\"></th>\n <th style=\"width: 5rem\">#</th>\n <th>Pytanie</th>\n <th style=\"width: 8rem\">Akcje</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item let-expanded=\"expanded\">\n <tr>\n <td>\n <p-button\n type=\"button\"\n [pRowToggler]=\"item\"\n [text]=\"true\"\n [rounded]=\"true\"\n severity=\"secondary\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n ></p-button>\n </td>\n <td>{{ item.order }}</td>\n <td>{{ item.question }}</td>\n <td>\n <span class=\"flex gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"openEditItem(item)\"\n ></p-button>\n <p-button\n icon=\"pi pi-trash\"\n [rounded]=\"true\"\n [text]=\"true\"\n severity=\"danger\"\n (onClick)=\"deleteItem(item)\"\n ></p-button>\n </span>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-item>\n <tr>\n <td colspan=\"4\">\n <div class=\"faq-preview p-3\">\n <div class=\"faq-preview__label\">Odpowied\u017A</div>\n <div class=\"faq-preview__content ql-editor p-0\" [innerHTML]=\"item.answer\"></div>\n\n <div *ngIf=\"item.translations?.length\" class=\"mt-3\">\n <div class=\"faq-preview__label\">T\u0142umaczenia</div>\n <div\n *ngFor=\"let t of item.translations\"\n class=\"faq-preview__translation mt-2 pt-2 border-top-1 border-300\"\n >\n <div class=\"font-semibold\"><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</div>\n <div class=\"faq-preview__content ql-editor p-0 mt-1\" [innerHTML]=\"t.answerOverride\"></div>\n </div>\n </div>\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"4\" class=\"text-center text-color-secondary\">Brak pyta\u0144 w tej kategorii.</td>\n </tr>\n </ng-template>\n </p-table>\n </p-accordionTab>\n </p-accordion>\n\n <p class=\"text-center text-color-secondary\" *ngIf=\"!loading && !categories.length\">\n Brak kategorii. Dodaj pierwsz\u0105 kategori\u0119.\n </p>\n</div>\n\n<!-- Category dialog -->\n<p-dialog\n [(visible)]=\"categoryDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '600px' }\"\n [header]=\"editingCategory ? 'Edytuj kategori\u0119' : 'Dodaj kategori\u0119'\"\n>\n <form [formGroup]=\"categoryForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Tytu\u0142</label>\n <input pInputText formControlName=\"title\" placeholder=\"np. Pierwsze kroki\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Ikona</label>\n <p-dropdown\n styleClass=\"w-full icon-dropdown\"\n panelStyleClass=\"faq-icon-dropdown-panel\"\n formControlName=\"icon\"\n [options]=\"primeIconOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"true\"\n filterBy=\"label,value\"\n filterPlaceholder=\"Szukaj ikony\"\n placeholder=\"Wybierz ikone\"\n appendTo=\"body\"\n [virtualScroll]=\"true\"\n [virtualScrollItemSize]=\"42\"\n >\n <ng-template pTemplate=\"selectedItem\" let-iconOption>\n <div class=\"faq-icon-option\" *ngIf=\"resolvePrimeIconOption(iconOption) as selectedIcon\">\n <i [class]=\"selectedIcon.value\"></i>\n <span>{{ selectedIcon.label }}</span>\n <small>{{ selectedIcon.value }}</small>\n </div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-iconOption>\n <div class=\"faq-icon-option\">\n <i [class]=\"iconOption.value\"></i>\n <span>{{ iconOption.label }}</span>\n <small>{{ iconOption.value }}</small>\n </div>\n </ng-template>\n </p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingCategory\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingCategory.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingCategoryTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.titleOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editCategoryTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteCategoryTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"categoryTranslationForm\" class=\"flex gap-2 align-items-end\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingCategoryTranslationId\"\n appendTo=\"body\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Tytu\u0142 (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"titleOverride\" />\n </div>\n <p-button\n [icon]=\"editingCategoryTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingCategoryTranslationId ? 'Zapisz zmiany' : 'Dodaj'\"\n [outlined]=\"true\"\n (onClick)=\"saveCategoryTranslation()\"\n ></p-button>\n <p-button\n *ngIf=\"editingCategoryTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelCategoryTranslationEdit()\"\n ></p-button>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"categoryDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveCategory()\"></p-button>\n </ng-template>\n</p-dialog>\n\n<!-- Item dialog -->\n<p-dialog\n [(visible)]=\"itemDialogVisible\"\n [modal]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [style]=\"{ width: '80vw' }\"\n [header]=\"editingItem ? 'Edytuj pytanie' : 'Dodaj pytanie'\"\n (onShow)=\"onItemDialogShow()\"\n>\n <form [formGroup]=\"itemForm\" class=\"flex flex-column gap-3 pt-2\">\n <div class=\"flex flex-column gap-1\">\n <label>Pytanie</label>\n <input pInputText formControlName=\"question\" placeholder=\"Tre\u015B\u0107 pytania\" />\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A</label>\n <p-editor\n formControlName=\"answer\"\n [style]=\"{ height: '320px' }\"\n (onInit)=\"onEditorInit($event)\"\n ></p-editor>\n </div>\n <div class=\"flex flex-column gap-1\" style=\"max-width: 200px\">\n <label>Kolejno\u015B\u0107</label>\n <p-inputNumber formControlName=\"order\"></p-inputNumber>\n </div>\n\n <div *ngIf=\"editingItem\" class=\"mt-2\">\n <h4 class=\"mb-2\">T\u0142umaczenia</h4>\n <ul class=\"list-none p-0 m-0 mb-2\">\n <li\n *ngFor=\"let t of editingItem.translations\"\n class=\"flex justify-content-between align-items-center py-1 border-bottom-1 border-300\"\n [class.surface-100]=\"editingItemTranslationId === t.id\"\n >\n <span><b>{{ t.languageCode }}</b>: {{ t.questionOverride }}</span>\n <span class=\"flex gap-1\">\n <p-button icon=\"pi pi-pencil\" [text]=\"true\" severity=\"secondary\" (onClick)=\"editItemTranslation(t)\"></p-button>\n <p-button icon=\"pi pi-trash\" [text]=\"true\" severity=\"danger\" (onClick)=\"deleteItemTranslation(t.id)\"></p-button>\n </span>\n </li>\n </ul>\n <form [formGroup]=\"itemTranslationForm\" class=\"flex flex-column gap-2\">\n <div class=\"flex gap-2\">\n <div class=\"flex flex-column gap-1\">\n <label>J\u0119zyk</label>\n <p-dropdown\n [options]=\"availableLanguages\"\n optionLabel=\"name\"\n optionValue=\"code\"\n formControlName=\"languageCode\"\n [readonly]=\"!!editingItemTranslationId\"\n appendTo=\"body\"\n ></p-dropdown>\n </div>\n <div class=\"flex flex-column gap-1 flex-1\">\n <label>Pytanie (t\u0142umaczenie)</label>\n <input pInputText formControlName=\"questionOverride\" />\n </div>\n </div>\n <div class=\"flex flex-column gap-1\">\n <label>Odpowied\u017A (t\u0142umaczenie)</label>\n <p-editor formControlName=\"answerOverride\" [style]=\"{ height: '200px' }\" (onInit)=\"onTranslationEditorInit($event)\"></p-editor>\n </div>\n <div class=\"flex justify-content-end gap-2\">\n <p-button\n *ngIf=\"editingItemTranslationId\"\n icon=\"pi pi-times\"\n label=\"Anuluj\"\n [text]=\"true\"\n severity=\"secondary\"\n (onClick)=\"cancelItemTranslationEdit()\"\n ></p-button>\n <p-button\n [icon]=\"editingItemTranslationId ? 'pi pi-save' : 'pi pi-plus'\"\n [label]=\"editingItemTranslationId ? 'Zapisz zmiany' : 'Dodaj t\u0142umaczenie'\"\n [outlined]=\"true\"\n (onClick)=\"saveItemTranslation()\"\n ></p-button>\n </div>\n </form>\n </div>\n </form>\n <ng-template pTemplate=\"footer\">\n <p-button label=\"Anuluj\" [text]=\"true\" (onClick)=\"itemDialogVisible = false\"></p-button>\n <p-button label=\"Zapisz\" icon=\"pi pi-save\" (onClick)=\"saveItem()\"></p-button>\n </ng-template>\n</p-dialog>\n", styles: [":host{display:block}.main-card{background:#fff;border-radius:12px}label{font-weight:600;font-size:.9rem}.faq-icon-option{display:grid;grid-template-columns:1.75rem minmax(0,1fr) auto;align-items:center;gap:.5rem;min-height:2rem;width:100%}.faq-icon-option i{color:#334155;font-size:1.05rem;text-align:center}.faq-icon-option span{overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap}.faq-icon-option small{color:#64748b;font-size:.78rem;max-width:13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}::ng-deep .faq-icon-dropdown-panel .p-dropdown-items .p-dropdown-item{padding-bottom:.35rem;padding-top:.35rem}.faq-preview{background:#f8fafc;border-radius:8px}.faq-preview__label{font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.03em;color:#64748b;margin-bottom:.25rem}.faq-preview__content{color:#1e293b}.faq-preview__content ::ng-deep img{max-width:100%;height:auto}\n"] }]
|
|
4230
4203
|
}], propDecorators: { availableLanguages: [{
|
|
4231
4204
|
type: Input
|
|
4232
4205
|
}] } });
|
|
@@ -4243,7 +4216,7 @@ const FAS_DEFAULT_BUTTON_LIST = [
|
|
|
4243
4216
|
{ label: 'Operatorzy', icon: 'pi pi-users', routerUrl: 'operators' },
|
|
4244
4217
|
{ label: 'Użytkownicy', icon: 'pi pi-id-card', routerUrl: 'users' },
|
|
4245
4218
|
{ label: 'Notyfikacje', icon: 'pi pi-bell', routerUrl: 'notifications' },
|
|
4246
|
-
{ label: '
|
|
4219
|
+
{ label: 'Zgłoszenia / Opinie', icon: 'pi pi-flag', routerUrl: 'ratings' },
|
|
4247
4220
|
{ label: 'Centrum pomocy', icon: 'pi pi-question-circle', routerUrl: 'faq' },
|
|
4248
4221
|
];
|
|
4249
4222
|
const FAS_DEFAULT_ROUTING_PATHS = [
|
|
@@ -4809,12 +4782,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
|
|
|
4809
4782
|
|
|
4810
4783
|
class RatingsModule {
|
|
4811
4784
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4812
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: RatingsModule, declarations: [RatingsComponent], imports: [
|
|
4785
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.2", ngImport: i0, type: RatingsModule, declarations: [RatingsComponent], imports: [FasServiceDynamicTableComponent,
|
|
4813
4786
|
DynamicDialogModule,
|
|
4814
4787
|
TabViewModule,
|
|
4815
4788
|
CommonModule,
|
|
4816
4789
|
ButtonModule] }); }
|
|
4817
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsModule, imports: [
|
|
4790
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: RatingsModule, imports: [FasServiceDynamicTableComponent,
|
|
4818
4791
|
DynamicDialogModule,
|
|
4819
4792
|
TabViewModule,
|
|
4820
4793
|
CommonModule,
|
|
@@ -4825,7 +4798,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
|
|
|
4825
4798
|
args: [{
|
|
4826
4799
|
declarations: [RatingsComponent],
|
|
4827
4800
|
imports: [
|
|
4828
|
-
|
|
4801
|
+
FasServiceDynamicTableComponent,
|
|
4829
4802
|
DynamicDialogModule,
|
|
4830
4803
|
TabViewModule,
|
|
4831
4804
|
CommonModule,
|