From 936c870abcb48b632f3a1433130e8701c813fa65 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 30 Jun 2022 18:22:35 +0300 Subject: [PATCH] Make some page alignments in all dashboard pages --- .../displayClaims.component.html | 86 ++++++++++--------- dashboard/divId/divIds.component.html | 71 +++++++-------- .../class-help-content-form.component.html | 16 ++-- .../class-help-content-form.component.ts | 63 ++++++-------- .../class-help-contents.component.html | 46 +++++----- dashboard/entity/entities.component.html | 71 +++++++-------- .../page-help-content-form.component.html | 13 +-- .../page-help-content-form.component.ts | 6 -- .../page-help-contents.component.html | 46 +++++----- dashboard/page/pages.component.html | 31 +++---- dashboard/portal/portals.component.html | 71 +++++++-------- .../role-users/role-users.component.html | 12 ++- .../users/role-users/role-users.module.ts | 3 +- .../subscribers/subscribers.component.html | 64 +++++++------- 14 files changed, 302 insertions(+), 297 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 48898a09..395ff1a0 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -1,6 +1,6 @@
-
+
@@ -43,51 +43,55 @@
- -
-
-
No links found
+
+
+
-
    -
  • -
    -
    -
    -
    - -
    -
    - available - - pending -
    +
    +
    +
    No links found
    +
    +
      +
    • +
      +
      +
      +
      + +
      +
      + available + + pending +
      -
      Claimed by: - {{claim.userMail}} - Claimed date: {{claim.date}}
      -
      - - +
      Claimed by: + {{claim.userMail}} + Claimed date: {{claim.date}}
      +
      + + +
      -
      - -
    • -
    -
    - + +
  • +
+
+ +
diff --git a/dashboard/divId/divIds.component.html b/dashboard/divId/divIds.component.html index bc5f4612..ddf68fda 100644 --- a/dashboard/divId/divIds.component.html +++ b/dashboard/divId/divIds.component.html @@ -12,34 +12,39 @@
-
- -
- -
- -
-
-
- -
+
+ +
+
+
+
-
- + +
+
+ +
+ +
+
No classes found
+
+
@@ -86,18 +91,16 @@ - - +
+ + +
-
-
No classes found
-
-
- + +
-
-
- - +
-
+
Select Status (Enable/ disable) @@ -57,7 +56,6 @@ extraPlugins: 'divarea'}">
-
diff --git a/dashboard/divhelpcontent/class-help-content-form.component.ts b/dashboard/divhelpcontent/class-help-content-form.component.ts index c07ca64c..1fd8dd3e 100644 --- a/dashboard/divhelpcontent/class-help-content-form.component.ts +++ b/dashboard/divhelpcontent/class-help-content-form.component.ts @@ -11,6 +11,7 @@ import {properties} from '../../../../environments/environment'; import {Subscriber, Subscription, zip} from 'rxjs'; import {HelperFunctions} from '../../utils/HelperFunctions.class'; import {DivHelpContent} from '../../utils/entities/adminTool/div-help-content'; +import {NotificationHandler} from "../../utils/notification-handler"; declare var UIkit; @@ -28,8 +29,6 @@ export class ClassContentFormComponent implements OnInit { classOptions = []; public properties: EnvProperties = properties; public showLoading: boolean = true; - public errorMessage: string = ''; - @Input() updateErrorMessage: string = ''; private subs: Subscription[] = []; public pageHelpContent: DivHelpContent; public stickyPageHeader: boolean = false; @@ -133,44 +132,34 @@ export class ClassContentFormComponent implements OnInit { this.myForm.markAsPristine(); } - handleError(message: string, error) { - this.errorMessage = message; - console.error('Server responded: ' + error); - + handleError(message: string, error = null) { + if(error) { + console.error('Server responded: ' + error); + } + NotificationHandler.rise(message, 'danger'); this.showLoading = false; } public saveCustom() { - if (!Session.isLoggedIn()) { - this._router.navigate(['/user-info'], { - queryParams: { - "errorCode": LoginErrorCodes.NOT_VALID, - "redirectUrl": this._router.url - } - }); + if (this.myForm.valid) { + this.showLoading = true; + this.myForm.get('divId').enable(); + let pageHelpContent: DivHelpContent = this.myForm.value; + this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe( + _ => { + this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route}); + UIkit.notification('Page content has been successfully updated', { + status: 'success', + timeout: 6000, + pos: 'bottom-right' + }); + this.showLoading = false; + }, + err => this.handleUpdateError('System error saving page content', err) + )); } else { - - if (this.myForm.valid) { - this.showLoading = true; - this.updateErrorMessage = ""; - this.myForm.get('divId').enable(); - let pageHelpContent: DivHelpContent = this.myForm.value; - this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe( - _ => { - this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route}); - UIkit.notification('Page content has been successfully updated', { - status: 'success', - timeout: 6000, - pos: 'bottom-right' - }); - this.showLoading = false; - }, - err => this.handleUpdateError('System error saving page content', err) - )); - } else { - this.showLoading = false; - this.errorMessage = "Please fill all required fields"; - } + this.showLoading = false; + this.handleError('Please fill all required fields'); } } @@ -181,10 +170,8 @@ export class ClassContentFormComponent implements OnInit { } handleUpdateError(message: string, error) { - - this.updateErrorMessage = message; console.error('Server responded: ' + error); - + NotificationHandler.rise(message, 'danger'); this.showLoading = false; } diff --git a/dashboard/divhelpcontent/class-help-contents.component.html b/dashboard/divhelpcontent/class-help-contents.component.html index 14e579f8..e1b90e91 100644 --- a/dashboard/divhelpcontent/class-help-contents.component.html +++ b/dashboard/divhelpcontent/class-help-contents.component.html @@ -1,35 +1,39 @@
-
- Admin Dashboard - Manage class help texts + Admin Dashboard - Manage class help texts
-

{{page.name}}

+

{{page.name}}

-
- -
-
-
-
-
- +
+
-
+
+ +
+
+
+
+ +
+ +
+
No class help texts found
+
@@ -77,11 +81,7 @@
-
-
No class help texts found
-
-
+
diff --git a/dashboard/entity/entities.component.html b/dashboard/entity/entities.component.html index f2bb141b..2da29d85 100644 --- a/dashboard/entity/entities.component.html +++ b/dashboard/entity/entities.component.html @@ -14,34 +14,39 @@
-
- -
-
-
- -
-
-
- -
+
+ +
+
+
+
-
+
+
+
+ +
+ +
+
No entities found
+
@@ -86,18 +91,16 @@ >
- - +
+ + +
-
-
No entities found
-
-
-
+ +
-
+
-
+
diff --git a/dashboard/helpTexts/page-help-content-form.component.ts b/dashboard/helpTexts/page-help-content-form.component.ts index efee85d6..d28ac68d 100644 --- a/dashboard/helpTexts/page-help-content-form.component.ts +++ b/dashboard/helpTexts/page-help-content-form.component.ts @@ -67,16 +67,10 @@ export class PageContentFormComponent implements OnInit { this._router.navigate(['../'], {relativeTo: this.route}); } let countPageContents = results[1] ? results[1].length : 0; - console.log(results[1]); for (let content of (results[1] as Array)) { - // if(content.page['_id'] == pageId){ - // countPageContents++; if (this.pageContentId && this.pageContentId == content._id) { this.pageHelpContent = content; - // this.pageHelpContent.page = pageId; - // this.pageHelpContent.portal = this.communityPid; } - // } } this.setOptions(this.page, countPageContents + (this.pageHelpContent ? 0 : 1)); if (!this.pageContentId) { diff --git a/dashboard/helpTexts/page-help-contents.component.html b/dashboard/helpTexts/page-help-contents.component.html index d7012096..93f30941 100644 --- a/dashboard/helpTexts/page-help-contents.component.html +++ b/dashboard/helpTexts/page-help-contents.component.html @@ -1,35 +1,39 @@
-
- -
-
-
-
-
-
+
+
-
+
+ +
+
+
+
+ +
+ +
+
No page help texts found
+
@@ -80,11 +84,7 @@
-
-
No page help texts found
-
-
+
diff --git a/dashboard/page/pages.component.html b/dashboard/page/pages.component.html index 8966d8b5..92a751b9 100644 --- a/dashboard/page/pages.component.html +++ b/dashboard/page/pages.component.html @@ -14,11 +14,7 @@
+
+ + + + +
diff --git a/dashboard/users/role-users/role-users.module.ts b/dashboard/users/role-users/role-users.module.ts index 0005deaf..9b5db058 100644 --- a/dashboard/users/role-users/role-users.module.ts +++ b/dashboard/users/role-users/role-users.module.ts @@ -11,9 +11,10 @@ import {SafeHtmlPipeModule} from "../../../utils/pipes/safeHTMLPipe.module"; import {NotifyFormModule} from "../../../notifications/notify-form/notify-form.module"; import {NoLoadPaging} from "../../../searchPages/searchUtils/no-load-paging.module"; import {SearchInputModule} from "../../../sharedComponents/search-input/search-input.module"; +import {PagingModule} from "../../../utils/paging.module"; @NgModule({ - imports: [CommonModule, AlertModalModule, ReactiveFormsModule, LoadingModule, IconsModule, InputModule, PageContentModule, SafeHtmlPipeModule, NotifyFormModule, NoLoadPaging, SearchInputModule], + imports: [CommonModule, AlertModalModule, ReactiveFormsModule, LoadingModule, IconsModule, InputModule, PageContentModule, SafeHtmlPipeModule, NotifyFormModule, NoLoadPaging, SearchInputModule, PagingModule], declarations: [RoleUsersComponent], exports: [RoleUsersComponent] }) diff --git a/dashboard/users/subscribers/subscribers.component.html b/dashboard/users/subscribers/subscribers.component.html index 6d34db62..8eae26fc 100644 --- a/dashboard/users/subscribers/subscribers.component.html +++ b/dashboard/users/subscribers/subscribers.component.html @@ -22,41 +22,43 @@
-
- -
-
-
-
No members found
+
+
+
-
- - -
-
-
-
- {{item.email}} -
-