fas-admin 0.0.74 → 0.0.76
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/views/notifications/api/notification-to-all-active-users-im.model.mjs +2 -0
- package/esm2022/lib/components/views/notifications/api/notifications-to-all-active-users.service.mjs +34 -0
- package/esm2022/lib/components/views/notifications/components/user-notifications/user-notifications.component.mjs +3 -3
- package/esm2022/lib/components/views/notifications/components/users-notifications/users-notifications.component.mjs +62 -4
- package/fesm2022/fas-admin.mjs +81 -4
- package/fesm2022/fas-admin.mjs.map +1 -1
- package/lib/components/views/notifications/api/notification-to-all-active-users-im.model.d.ts +8 -0
- package/lib/components/views/notifications/api/notifications-to-all-active-users.service.d.ts +15 -0
- package/lib/components/views/notifications/components/users-notifications/users-notifications.component.d.ts +10 -0
- package/package.json +1 -1
package/esm2022/lib/components/views/notifications/api/notification-to-all-active-users-im.model.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLXRvLWFsbC1hY3RpdmUtdXNlcnMtaW0ubW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mYXMtYWRtaW4vc3JjL2xpYi9jb21wb25lbnRzL3ZpZXdzL25vdGlmaWNhdGlvbnMvYXBpL25vdGlmaWNhdGlvbi10by1hbGwtYWN0aXZlLXVzZXJzLWltLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIElOb3RpZmljYXRpb25Ub0FsbEFjdGl2ZVVzZXJzSW0ge1xuICAgIGxpbms6IHN0cmluZztcbiAgICBtZXNzYWdlOiBzdHJpbmc7XG4gICAgdGl0bGU6IHN0cmluZztcbiAgICBlbWFpbEJvZHk6IHN0cmluZztcbiAgICBzZW5kQWxzb0VtYWlsOiBib29sZWFuO1xuICAgIGxpbmtPcGVuSW5OZXdXaW5kb3c6IGJvb2xlYW47XG59XG4iXX0=
|
package/esm2022/lib/components/views/notifications/api/notifications-to-all-active-users.service.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Injectable, Inject } from '@angular/core';
|
|
2
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
3
|
+
import { API_URL } from '../../../../../api/models/api-url.token';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common/http";
|
|
6
|
+
export class NotificationsToAllActiveUsersService {
|
|
7
|
+
constructor(http, apiUrl) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
this.apiUrl = apiUrl;
|
|
10
|
+
this.baseUrl = `${this.apiUrl}/NotificationsToAllActiveUsers`;
|
|
11
|
+
}
|
|
12
|
+
post(notification) {
|
|
13
|
+
const headers = this.createHeaders();
|
|
14
|
+
return this.http.post(this.baseUrl, notification, { headers });
|
|
15
|
+
}
|
|
16
|
+
createHeaders() {
|
|
17
|
+
let headers = new HttpHeaders();
|
|
18
|
+
const token = localStorage.getItem('authToken');
|
|
19
|
+
if (token) {
|
|
20
|
+
headers = headers.set('Authorization', `Bearer ${token}`);
|
|
21
|
+
}
|
|
22
|
+
return headers;
|
|
23
|
+
}
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, deps: [{ token: i1.HttpClient }, { token: API_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
25
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, providedIn: 'root' }); }
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, decorators: [{
|
|
28
|
+
type: Injectable,
|
|
29
|
+
args: [{ providedIn: 'root' }]
|
|
30
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
31
|
+
type: Inject,
|
|
32
|
+
args: [API_URL]
|
|
33
|
+
}] }] });
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9ucy10by1hbGwtYWN0aXZlLXVzZXJzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mYXMtYWRtaW4vc3JjL2xpYi9jb21wb25lbnRzL3ZpZXdzL25vdGlmaWNhdGlvbnMvYXBpL25vdGlmaWNhdGlvbnMtdG8tYWxsLWFjdGl2ZS11c2Vycy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBYyxXQUFXLEVBQWMsTUFBTSxzQkFBc0IsQ0FBQztBQUUzRSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0seUNBQXlDLENBQUM7OztBQUlsRSxNQUFNLE9BQU8sb0NBQW9DO0lBRS9DLFlBQW9CLElBQWdCLEVBQTJCLE1BQWM7UUFBekQsU0FBSSxHQUFKLElBQUksQ0FBWTtRQUEyQixXQUFNLEdBQU4sTUFBTSxDQUFRO1FBQzNFLElBQUksQ0FBQyxPQUFPLEdBQUcsR0FBRyxJQUFJLENBQUMsTUFBTSxnQ0FBZ0MsQ0FBQztJQUNoRSxDQUFDO0lBQ0QsSUFBSSxDQUFDLFlBQTZDO1FBQ2hELE1BQU0sT0FBTyxHQUFHLEl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WRlcnMoKTtcbiAgICBjb25zdCB0b2tlbiA9IGxvY2FsU3RvcmFnZS5nZXRJdGVtKCdhdXRoVG9rZW4nKTtcbiAgICBpZiAodG9rZW4pIHtcbiAgICAgIGhlYWRlcnMgPSBoZWFkZXJzLnNldCgnQXV0aG9yaXphdGlvbicsIGBCZWFyZXIgJHt0b2tlbn1gKTtcbiAgICB9XG4gICAgcmV0dXJuIGhlYWRlcnM7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -57,7 +57,7 @@ export class UserNotificationsComponent {
|
|
|
57
57
|
this._dialogRef.close();
|
|
58
58
|
}
|
|
59
59
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UserNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UserNotificationsComponent, isStandalone: true, selector: "lib-user-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"
|
|
60
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UserNotificationsComponent, isStandalone: true, selector: "lib-user-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wybranym u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Email u\u017Cytkownika</div>\n <input\n formControlName=\"email\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Guid u\u017Cytkownika</div>\n <input\n formControlName=\"userAccountGuid\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "ngmodule", type: CalendarModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
61
61
|
}
|
|
62
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UserNotificationsComponent, decorators: [{
|
|
63
63
|
type: Component,
|
|
@@ -69,6 +69,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
|
|
|
69
69
|
CalendarModule,
|
|
70
70
|
InputNumberModule,
|
|
71
71
|
FormsModule
|
|
72
|
-
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"
|
|
72
|
+
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wybranym u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Email u\u017Cytkownika</div>\n <input\n formControlName=\"email\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Guid u\u017Cytkownika</div>\n <input\n formControlName=\"userAccountGuid\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n" }]
|
|
73
73
|
}] });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1ub3RpZmljYXRpb25zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zhcy1hZG1pbi9zcmMvbGliL2NvbXBvbmVudHMvdmlld3Mvbm90aWZpY2F0aW9ucy9jb21wb25lbnRzL3VzZXItbm90aWZpY2F0aW9ucy91c2VyLW5vdGlmaWNhdGlvbnMuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZmFzLWFkbWluL3NyYy9saWIvY29tcG9uZW50cy92aWV3cy9ub3RpZmljYXRpb25zL2NvbXBvbmVudHMvdXNlci1ub3RpZmljYXRpb25zL3VzZXItbm90aWZpY2F0aW9ucy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsR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L2Rpdj5cbiAgICA8ZGl2IGNsYXNzPVwiIGZsZXggZmxleC1jb2x1bW4gZ2FwLTJcIj5cbiAgICAgIDxkaXY+R3VpZCB1xbx5dGtvd25pa2E8L2Rpdj5cbiAgICAgIDxpbnB1dFxuICAgICAgICBmb3JtQ29udHJvbE5hbWU9XCJ1c2VyQWNjb3VudEd1aWRcIlxuICAgICAgICBjbGFzcz1cImlucHV0LW9uXCJcbiAgICAgICAgdHlwZT1cInRleHRcIlxuICAgICAgLz5cbiAgICA8L2Rpdj5cbiAgPGRpdiBjbGFzcz1cImZsZXggZ2FwLTMganVzdGlmeS1jb250ZW50LWVuZCBtdC0zXCI+XG4gICAgPHAtYnV0dG9uIChvbkNsaWNrKT1cImNsb3NlRGlhbG9nKClcIiBbZGlzYWJsZWRdPVwic3VibWl0TG9hZGluZ1wiIFtsaW5rXT1cInRydWVcIiBsYWJlbD1cIkFudWx1alwiPjwvcC1idXR0b24+XG4gICAgPHAtYnV0dG9uIChvbkNsaWNrKT1cInN1Ym1pdCgpXCIgW2xvYWRpbmddPVwic3VibWl0TG9hZGluZ1wiIGxhYmVsPVwiRG9kYWogbm93ZSBub3R5ZmlrYWNqZVwiPjwvcC1idXR0b24+XG4gIDwvZGl2PlxuPC9mb3JtPlxuIl19
|
|
@@ -1,11 +1,69 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactiveFormsModule, FormsModule, FormBuilder, Validators, } from '@angular/forms';
|
|
2
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
+
import { InputNumberModule } from 'primeng/inputnumber';
|
|
4
|
+
import { CalendarModule } from 'primeng/calendar';
|
|
5
|
+
import { DropdownModule } from 'primeng/dropdown';
|
|
6
|
+
import { Component, inject } from '@angular/core';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { ButtonModule } from 'primeng/button';
|
|
9
|
+
import { NotificationsToAllActiveUsersService } from '../../api/notifications-to-all-active-users.service';
|
|
2
10
|
import * as i0 from "@angular/core";
|
|
11
|
+
import * as i1 from "@angular/forms";
|
|
12
|
+
import * as i2 from "primeng/button";
|
|
3
13
|
export class UsersNotificationsComponent {
|
|
14
|
+
constructor() {
|
|
15
|
+
this._notificationsToAllActiveUsersService = inject(NotificationsToAllActiveUsersService);
|
|
16
|
+
this._dialogRef = inject(DynamicDialogRef);
|
|
17
|
+
this._fb = inject(FormBuilder);
|
|
18
|
+
this.submitLoading = false;
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
this.setFormStructure();
|
|
22
|
+
}
|
|
23
|
+
setFormStructure() {
|
|
24
|
+
this.addNewNotificationForm = this._fb.group({
|
|
25
|
+
link: ['', [Validators.required]],
|
|
26
|
+
message: ['', [Validators.required]],
|
|
27
|
+
title: ['', [Validators.required]],
|
|
28
|
+
emailBody: ['', [Validators.required]],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
submit() {
|
|
32
|
+
this.submitLoading = true;
|
|
33
|
+
const dataToPost = {
|
|
34
|
+
link: this.addNewNotificationForm.get('link')?.value,
|
|
35
|
+
message: this.addNewNotificationForm.get('message')?.value,
|
|
36
|
+
title: this.addNewNotificationForm.get('title')?.value,
|
|
37
|
+
emailBody: this.addNewNotificationForm.get('emailBody')?.value,
|
|
38
|
+
sendAlsoEmail: true,
|
|
39
|
+
linkOpenInNewWindow: true,
|
|
40
|
+
};
|
|
41
|
+
this._notificationsToAllActiveUsersService.post(dataToPost).subscribe({
|
|
42
|
+
next: (res) => {
|
|
43
|
+
this.submitLoading = false;
|
|
44
|
+
},
|
|
45
|
+
error: (err) => {
|
|
46
|
+
console.error(err);
|
|
47
|
+
this.submitLoading = false;
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
closeDialog() {
|
|
52
|
+
this._dialogRef.close();
|
|
53
|
+
}
|
|
4
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UsersNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UsersNotificationsComponent, isStandalone: true, selector: "lib-users-notifications", ngImport: i0, template: "<
|
|
55
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UsersNotificationsComponent, isStandalone: true, selector: "lib-users-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wszystkim u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i2.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: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
6
56
|
}
|
|
7
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UsersNotificationsComponent, decorators: [{
|
|
8
58
|
type: Component,
|
|
9
|
-
args: [{ selector: 'lib-users-notifications', standalone: true, imports: [
|
|
59
|
+
args: [{ selector: 'lib-users-notifications', standalone: true, imports: [
|
|
60
|
+
ReactiveFormsModule,
|
|
61
|
+
InputNumberModule,
|
|
62
|
+
DropdownModule,
|
|
63
|
+
CalendarModule,
|
|
64
|
+
CommonModule,
|
|
65
|
+
ButtonModule,
|
|
66
|
+
FormsModule,
|
|
67
|
+
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wszystkim u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n" }]
|
|
10
68
|
}] });
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlcnMtbm90aWZpY2F0aW9ucy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mYXMtYWRtaW4vc3JjL2xpYi9jb21wb25lbnRzL3ZpZXdzL25vdGlmaWNhdGlvbn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-admin.mjs
CHANGED
|
@@ -2725,7 +2725,7 @@ class UserNotificationsComponent {
|
|
|
2725
2725
|
this._dialogRef.close();
|
|
2726
2726
|
}
|
|
2727
2727
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UserNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2728
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UserNotificationsComponent, isStandalone: true, selector: "lib-user-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"
|
|
2728
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UserNotificationsComponent, isStandalone: true, selector: "lib-user-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wybranym u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Email u\u017Cytkownika</div>\n <input\n formControlName=\"email\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Guid u\u017Cytkownika</div>\n <input\n formControlName=\"userAccountGuid\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { 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: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: DropdownModule }, { kind: "ngmodule", type: CalendarModule }, { kind: "ngmodule", type: InputNumberModule }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
2729
2729
|
}
|
|
2730
2730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UserNotificationsComponent, decorators: [{
|
|
2731
2731
|
type: Component,
|
|
@@ -2737,16 +2737,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
|
|
|
2737
2737
|
CalendarModule,
|
|
2738
2738
|
InputNumberModule,
|
|
2739
2739
|
FormsModule
|
|
2740
|
-
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"
|
|
2740
|
+
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wybranym u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Email u\u017Cytkownika</div>\n <input\n formControlName=\"email\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\" flex flex-column gap-2\">\n <div>Guid u\u017Cytkownika</div>\n <input\n formControlName=\"userAccountGuid\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n" }]
|
|
2741
2741
|
}] });
|
|
2742
2742
|
|
|
2743
|
+
class NotificationsToAllActiveUsersService {
|
|
2744
|
+
constructor(http, apiUrl) {
|
|
2745
|
+
this.http = http;
|
|
2746
|
+
this.apiUrl = apiUrl;
|
|
2747
|
+
this.baseUrl = `${this.apiUrl}/NotificationsToAllActiveUsers`;
|
|
2748
|
+
}
|
|
2749
|
+
post(notification) {
|
|
2750
|
+
const headers = this.createHeaders();
|
|
2751
|
+
return this.http.post(this.baseUrl, notification, { headers });
|
|
2752
|
+
}
|
|
2753
|
+
createHeaders() {
|
|
2754
|
+
let headers = new HttpHeaders();
|
|
2755
|
+
const token = localStorage.getItem('authToken');
|
|
2756
|
+
if (token) {
|
|
2757
|
+
headers = headers.set('Authorization', `Bearer ${token}`);
|
|
2758
|
+
}
|
|
2759
|
+
return headers;
|
|
2760
|
+
}
|
|
2761
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, deps: [{ token: i1.HttpClient }, { token: API_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2762
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, providedIn: 'root' }); }
|
|
2763
|
+
}
|
|
2764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: NotificationsToAllActiveUsersService, decorators: [{
|
|
2765
|
+
type: Injectable,
|
|
2766
|
+
args: [{ providedIn: 'root' }]
|
|
2767
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
2768
|
+
type: Inject,
|
|
2769
|
+
args: [API_URL]
|
|
2770
|
+
}] }] });
|
|
2771
|
+
|
|
2743
2772
|
class UsersNotificationsComponent {
|
|
2773
|
+
constructor() {
|
|
2774
|
+
this._notificationsToAllActiveUsersService = inject(NotificationsToAllActiveUsersService);
|
|
2775
|
+
this._dialogRef = inject(DynamicDialogRef);
|
|
2776
|
+
this._fb = inject(FormBuilder);
|
|
2777
|
+
this.submitLoading = false;
|
|
2778
|
+
}
|
|
2779
|
+
ngOnInit() {
|
|
2780
|
+
this.setFormStructure();
|
|
2781
|
+
}
|
|
2782
|
+
setFormStructure() {
|
|
2783
|
+
this.addNewNotificationForm = this._fb.group({
|
|
2784
|
+
link: ['', [Validators.required]],
|
|
2785
|
+
message: ['', [Validators.required]],
|
|
2786
|
+
title: ['', [Validators.required]],
|
|
2787
|
+
emailBody: ['', [Validators.required]],
|
|
2788
|
+
});
|
|
2789
|
+
}
|
|
2790
|
+
submit() {
|
|
2791
|
+
this.submitLoading = true;
|
|
2792
|
+
const dataToPost = {
|
|
2793
|
+
link: this.addNewNotificationForm.get('link')?.value,
|
|
2794
|
+
message: this.addNewNotificationForm.get('message')?.value,
|
|
2795
|
+
title: this.addNewNotificationForm.get('title')?.value,
|
|
2796
|
+
emailBody: this.addNewNotificationForm.get('emailBody')?.value,
|
|
2797
|
+
sendAlsoEmail: true,
|
|
2798
|
+
linkOpenInNewWindow: true,
|
|
2799
|
+
};
|
|
2800
|
+
this._notificationsToAllActiveUsersService.post(dataToPost).subscribe({
|
|
2801
|
+
next: (res) => {
|
|
2802
|
+
this.submitLoading = false;
|
|
2803
|
+
},
|
|
2804
|
+
error: (err) => {
|
|
2805
|
+
console.error(err);
|
|
2806
|
+
this.submitLoading = false;
|
|
2807
|
+
},
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
closeDialog() {
|
|
2811
|
+
this._dialogRef.close();
|
|
2812
|
+
}
|
|
2744
2813
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UsersNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2745
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UsersNotificationsComponent, isStandalone: true, selector: "lib-users-notifications", ngImport: i0, template: "<
|
|
2814
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: UsersNotificationsComponent, isStandalone: true, selector: "lib-users-notifications", ngImport: i0, template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wszystkim u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: InputNumberModule }, { kind: "ngmodule", type: DropdownModule }, { kind: "ngmodule", type: CalendarModule }, { 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: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
2746
2815
|
}
|
|
2747
2816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: UsersNotificationsComponent, decorators: [{
|
|
2748
2817
|
type: Component,
|
|
2749
|
-
args: [{ selector: 'lib-users-notifications', standalone: true, imports: [
|
|
2818
|
+
args: [{ selector: 'lib-users-notifications', standalone: true, imports: [
|
|
2819
|
+
ReactiveFormsModule,
|
|
2820
|
+
InputNumberModule,
|
|
2821
|
+
DropdownModule,
|
|
2822
|
+
CalendarModule,
|
|
2823
|
+
CommonModule,
|
|
2824
|
+
ButtonModule,
|
|
2825
|
+
FormsModule,
|
|
2826
|
+
], template: "<div\n class=\"flex align-items-center justify-content-between decorator-strong py-3 mt-2\"\n>\n <div class=\"font-semibold text-xl\">Dodaj notyfikacj\u0119 wszystkim u\u017Cytkownikom</div>\n <i\n class=\"pi pi-times cursor-pointer\"\n size=\"small\"\n (click)=\"closeDialog()\"\n ></i>\n</div>\n<form [formGroup]=\"addNewNotificationForm\" class=\"flex flex-column gap-2 mt-2\">\n <div class=\"flex flex-column gap-2\">\n <div class=\"flex flex-column gap-2\">\n <div>Tytu\u0142</div>\n <input\n formControlName=\"title\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Wiadomo\u015B\u0107</div>\n <input\n formControlName=\"message\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex flex-column gap-2\">\n <div>Link</div>\n <input\n formControlName=\"link\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n </div>\n <div class=\"mt-2 flex flex-column gap-2\">\n <div>Tre\u015B\u0107 email</div>\n <input\n formControlName=\"emailBody\"\n class=\"input-on\"\n type=\"text\"\n />\n </div>\n <div class=\"flex gap-3 justify-content-end mt-3\">\n <p-button (onClick)=\"closeDialog()\" [disabled]=\"submitLoading\" [link]=\"true\" label=\"Anuluj\"></p-button>\n <p-button (onClick)=\"submit()\" [loading]=\"submitLoading\" label=\"Dodaj nowe notyfikacje\"></p-button>\n </div>\n</form>\n" }]
|
|
2750
2827
|
}] });
|
|
2751
2828
|
|
|
2752
2829
|
const centerDynamicModalConfig = {
|