diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 046c3ff..def2195 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -31,6 +31,9 @@ import { ClosingRemarksComponent } from './pages/investigate-business-entities-a import { PreparePreliminaryLetterComponent } from './pages/investigate-business-entities-and-individuals/prepare-preliminary-letter/prepare-preliminary-letter.component'; import { RespondToPreliminaryLetterComponent } from './pages/investigate-business-entities-and-individuals/respond-to-preliminary-letter/respond-to-preliminary-letter.component'; import { DashboardComponent } from './pages/dashboard/dashboard.component'; +import { FilterViewCardComponent } from './pages/dashboard/filter-view-card/filter-view-card.component'; +import { NavbarComponent } from './layout/navbar/navbar.component'; +import { NotificationsListComponent } from './layout/notifications/notifications-list/notifications-list.component'; @NgModule({ declarations: [ @@ -60,7 +63,10 @@ import { DashboardComponent } from './pages/dashboard/dashboard.component'; ClosingRemarksComponent, PreparePreliminaryLetterComponent, RespondToPreliminaryLetterComponent, - DashboardComponent + DashboardComponent, + FilterViewCardComponent, + NavbarComponent, + NotificationsListComponent ], imports: [ BrowserModule, diff --git a/src/app/layout/navbar/navbar.component.html b/src/app/layout/navbar/navbar.component.html new file mode 100644 index 0000000..94345ce --- /dev/null +++ b/src/app/layout/navbar/navbar.component.html @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/src/app/layout/navbar/navbar.component.scss b/src/app/layout/navbar/navbar.component.scss new file mode 100644 index 0000000..6afd040 --- /dev/null +++ b/src/app/layout/navbar/navbar.component.scss @@ -0,0 +1,200 @@ +$header-height: 10rem; + +.navbar { + display: flex; + width: 100%; + height: $header-height; + align-items: center; + justify-content: flex-start; + + .logo { + width: 12rem; + margin: 0 2rem; + + img { + width: 100%; + height: 100%; + } + } + + nav { + margin: 0 2rem; + + @media print { + display: none; + } + + a { + font-size: 1.6rem; + letter-spacing: 0.5px; + color: var(--dark-grey); + margin-right: 2rem; + + &.active { + text-decoration: underline; + color: var(--highlight); + } + + &:hover { + text-decoration: underline; + } + } + } + + .search-input { + position: relative; + margin-left: auto; + + @media print { + display: none; + } + + input { + display: block; + height: 5rem; + border: 1px solid var(--border-grey); + border-radius: 4rem; + padding: 0 2.5rem; + width: 35rem; + font-size: 1.5rem; + font-weight: 300; + + &::placeholder { + color: var(--dark-grey); + opacity: 0.6; + } + } + + img { + position: absolute; + width: 1.8rem; + top: 1.5rem; + right: 1.8rem; + } + } + + + .notification-button { + width: 5rem; + height: 5rem; + border-radius: 50%; + border: none; + position: relative; + background-color: white; + margin-left: 2rem; + + @media print { + display: none; + } + + &.active { + box-shadow: 0px 0px 10px -3px var(--primary); + + img { + filter: brightness(500%); + } + + .badge { + transform: scale(0); + } + + &::before { + background-color: var(--highlight); + opacity: 1; + filter: none; + } + } + + &:hover { + box-shadow: 0px 0px 10px -3px var(--primary); + } + + .badge { + background-color: var(--highlight); + color: white; + font-size: 1.1rem; + border-radius: 7px; + position: absolute; + right: 0; + top: -0.5rem; + width: 2rem; + height: 2rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-weight: 600; + transition: transform 0.1s; + } + + &::before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: var(--secondary); + opacity: 0.3; + filter: brightness(110%); + border-radius: 50%; + } + + & > * { + position: relative; + } + + img { + width: 40%; + height: 40%; + } + } + + .profile-actions { + margin: 0 2rem; + display: flex; + align-items: center; + justify-content: center; + height: 5rem; + border-radius: 4rem; + padding: 0 2rem; + position: relative; + overflow: hidden; + width: 20rem; + cursor: pointer; + + @media print { + display: none; + } + + &::before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: var(--secondary); + opacity: 0.3; + filter: brightness(110%); + } + + & > * { + position: relative; + } + + img { + width: 1.5rem; + + &.logout-icon { + transform: scale(1.5); + } + } + + span { + margin: 0 auto; + color: var(--primary); + font-size: 1.4rem; + } + } +} \ No newline at end of file diff --git a/src/app/layout/navbar/navbar.component.spec.ts b/src/app/layout/navbar/navbar.component.spec.ts new file mode 100644 index 0000000..f8ccd6f --- /dev/null +++ b/src/app/layout/navbar/navbar.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavbarComponent } from './navbar.component'; + +describe('NavbarComponent', () => { + let component: NavbarComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavbarComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NavbarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/layout/navbar/navbar.component.ts b/src/app/layout/navbar/navbar.component.ts new file mode 100644 index 0000000..517e080 --- /dev/null +++ b/src/app/layout/navbar/navbar.component.ts @@ -0,0 +1,40 @@ +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Subscription } from 'rxjs'; +import { LoginService } from 'src/app/services/login.service'; +import { NotificationService } from 'src/app/services/notification.service'; + +@Component({ + selector: 'app-navbar', + templateUrl: './navbar.component.html', + styleUrls: ['./navbar.component.scss'] +}) +export class NavbarComponent implements OnInit, OnDestroy { + isShowingNotifications = false; + showLogout: boolean = false; + + isShowingNotificationsSubscription: Subscription; + + loginName: string = ''; + notificationsCount: number = 0; + + constructor(loginService: LoginService, private notificationService: NotificationService) { + this.loginName = loginService.getLoginName(); + this.notificationsCount = notificationService.getAllowedNotifications().length; + + this.isShowingNotificationsSubscription = this.notificationService.getIsShowingNotificationsObservable().subscribe(isShowingNotifications => this.isShowingNotifications = isShowingNotifications); + } + + showNotifications() { + this.notificationService.setIsShowingNotifications(true); + } + + ngOnInit(): void { + } + + ngOnDestroy(): void { + if (this.isShowingNotificationsSubscription) { + this.isShowingNotificationsSubscription.unsubscribe(); + } + } + +} diff --git a/src/app/layout/notifications/notifications-list/notifications-list.component.html b/src/app/layout/notifications/notifications-list/notifications-list.component.html new file mode 100644 index 0000000..47b7eea --- /dev/null +++ b/src/app/layout/notifications/notifications-list/notifications-list.component.html @@ -0,0 +1,14 @@ + diff --git a/src/app/layout/notifications/notifications-list/notifications-list.component.scss b/src/app/layout/notifications/notifications-list/notifications-list.component.scss new file mode 100644 index 0000000..266ff16 --- /dev/null +++ b/src/app/layout/notifications/notifications-list/notifications-list.component.scss @@ -0,0 +1,44 @@ +ul { + list-style: none; + height: 100%; + overflow: auto; + min-height: 10rem; + max-height: 40rem; + + li { + display: block; + width: calc(100% - 2rem); + padding: 1.5rem; + cursor: pointer; + position: relative; + margin: 1rem auto; + border: 1px solid var(--border-grey); + border-radius: 1rem; + line-height: 1.5; + + &:hover { + box-shadow: 0px 0px 10px -4px var(--dark-grey); + } + + h5 { + font-size: 1.4rem; + margin: 0 0 0.5rem; + font-weight: 500; + color: var(--highlight); + filter: brightness(80%); + } + + p { + color: var(--dark-grey); + font-size: 1.3rem; + } + + .time-stamp { + display: block; + margin: 1rem 0 0; + font-size: 3rem; + font-size: 1.3rem; + color: var(--dark-grey); + } + } +} \ No newline at end of file diff --git a/src/app/layout/notifications/notifications-list/notifications-list.component.spec.ts b/src/app/layout/notifications/notifications-list/notifications-list.component.spec.ts new file mode 100644 index 0000000..5b79da0 --- /dev/null +++ b/src/app/layout/notifications/notifications-list/notifications-list.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotificationsListComponent } from './notifications-list.component'; + +describe('NotificationsListComponent', () => { + let component: NotificationsListComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NotificationsListComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(NotificationsListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/layout/notifications/notifications-list/notifications-list.component.ts b/src/app/layout/notifications/notifications-list/notifications-list.component.ts new file mode 100644 index 0000000..8fefd77 --- /dev/null +++ b/src/app/layout/notifications/notifications-list/notifications-list.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; +import { Notification, NotificationService } from 'src/app/services/notification.service'; + +@Component({ + selector: 'app-notifications-list', + templateUrl: './notifications-list.component.html', + styleUrls: ['./notifications-list.component.scss'] +}) +export class NotificationsListComponent implements OnInit { + allowedNotifications: Array = []; + + constructor(notificationService: NotificationService) { + this.allowedNotifications = notificationService.getAllowedNotifications(); + } + + ngOnInit(): void { + } + +} diff --git a/src/app/layout/notifications/notifications.component.html b/src/app/layout/notifications/notifications.component.html index cfcf710..4c8a535 100644 --- a/src/app/layout/notifications/notifications.component.html +++ b/src/app/layout/notifications/notifications.component.html @@ -1,14 +1,8 @@ - \ No newline at end of file +
+
+
+

Notifications

+
+ + +
\ No newline at end of file diff --git a/src/app/layout/notifications/notifications.component.scss b/src/app/layout/notifications/notifications.component.scss index 266ff16..6c1052d 100644 --- a/src/app/layout/notifications/notifications.component.scss +++ b/src/app/layout/notifications/notifications.component.scss @@ -1,44 +1,54 @@ -ul { - list-style: none; - height: 100%; - overflow: auto; - min-height: 10rem; - max-height: 40rem; +$header-height: 10rem; - li { - display: block; +.notifications-window { + position: fixed; + top: calc(#{$header-height} - 1rem); + background-color: white; + width: 40rem; + box-shadow: 0px 0px 15px -3px var(--dark-grey); + z-index: 2; + right: 26rem; + border-radius: 1.5rem; + overflow: hidden; + + + header { + height: 5rem; + padding: 0 2rem; + display: flex; + align-items: center; + justify-content: flex-start; width: calc(100% - 2rem); - padding: 1.5rem; - cursor: pointer; - position: relative; - margin: 1rem auto; - border: 1px solid var(--border-grey); border-radius: 1rem; - line-height: 1.5; + margin: 1rem auto 0; + position: relative; + overflow: hidden; - &:hover { - box-shadow: 0px 0px 10px -4px var(--dark-grey); + &::before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: var(--border-grey); + opacity: 0.7; } - - h5 { - font-size: 1.4rem; - margin: 0 0 0.5rem; + + h4{ + position: relative; + font-size: 1.7rem; + color: var(--primary); font-weight: 500; - color: var(--highlight); - filter: brightness(80%); - } - - p { - color: var(--dark-grey); - font-size: 1.3rem; } + } - .time-stamp { - display: block; - margin: 1rem 0 0; - font-size: 3rem; - font-size: 1.3rem; - color: var(--dark-grey); - } + .backdrop { + position: fixed; + left: 0; + top: 0; + width: 100vw; + height: 100vw; + z-index: 0; } } \ No newline at end of file diff --git a/src/app/layout/notifications/notifications.component.ts b/src/app/layout/notifications/notifications.component.ts index 4ab6359..0ba4147 100644 --- a/src/app/layout/notifications/notifications.component.ts +++ b/src/app/layout/notifications/notifications.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Subscription } from 'rxjs'; import { Notification, NotificationService } from 'src/app/services/notification.service'; @Component({ @@ -6,14 +7,25 @@ import { Notification, NotificationService } from 'src/app/services/notification templateUrl: './notifications.component.html', styleUrls: ['./notifications.component.scss'] }) -export class NotificationsComponent implements OnInit { - allowedNotifications: Array = []; +export class NotificationsComponent implements OnInit, OnDestroy { + isShowingNotifications = false; + isShowingNotificationsSubscription: Subscription; - constructor(notificationService: NotificationService) { - this.allowedNotifications = notificationService.getAllowedNotifications(); + constructor(private notificationService: NotificationService) { + this.isShowingNotificationsSubscription = this.notificationService.getIsShowingNotificationsObservable().subscribe(isShowingNotifications => this.isShowingNotifications = isShowingNotifications); + } + + hideNotifications() { + this.notificationService.setIsShowingNotifications(false); } ngOnInit(): void { } + ngOnDestroy(): void { + if (this.isShowingNotificationsSubscription) { + this.isShowingNotificationsSubscription.unsubscribe(); + } + } + } diff --git a/src/app/layout/tabs/tabs.component.html b/src/app/layout/tabs/tabs.component.html index 0af36c1..98e1f48 100644 --- a/src/app/layout/tabs/tabs.component.html +++ b/src/app/layout/tabs/tabs.component.html @@ -1,50 +1,5 @@ - - -
-
-
-

Notifications

-
- - -
+ +
diff --git a/src/app/layout/tabs/tabs.component.scss b/src/app/layout/tabs/tabs.component.scss index d9cff9a..8d54c8d 100644 --- a/src/app/layout/tabs/tabs.component.scss +++ b/src/app/layout/tabs/tabs.component.scss @@ -1,204 +1,5 @@ $header-height: 10rem; -.navbar { - display: flex; - width: 100%; - height: $header-height; - align-items: center; - justify-content: flex-start; - - .logo { - width: 12rem; - margin: 0 2rem; - - img { - width: 100%; - height: 100%; - } - } - - nav { - margin: 0 2rem; - - @media print { - display: none; - } - - a { - font-size: 1.6rem; - letter-spacing: 0.5px; - color: var(--dark-grey); - margin-right: 2rem; - - &.active { - text-decoration: underline; - color: var(--highlight); - } - - &:hover { - text-decoration: underline; - } - } - } - - .search-input { - position: relative; - margin-left: auto; - - @media print { - display: none; - } - - input { - display: block; - height: 5rem; - border: 1px solid var(--border-grey); - border-radius: 4rem; - padding: 0 2.5rem; - width: 35rem; - font-size: 1.5rem; - font-weight: 300; - - &::placeholder { - color: var(--dark-grey); - opacity: 0.6; - } - } - - img { - position: absolute; - width: 1.8rem; - top: 1.5rem; - right: 1.8rem; - } - } - - - .notification-button { - width: 5rem; - height: 5rem; - border-radius: 50%; - border: none; - position: relative; - background-color: white; - margin-left: 2rem; - - @media print { - display: none; - } - - &.active { - box-shadow: 0px 0px 10px -3px var(--primary); - - img { - filter: brightness(500%); - } - - .badge { - transform: scale(0); - } - - &::before { - background-color: var(--highlight); - opacity: 1; - filter: none; - } - } - - &:hover { - box-shadow: 0px 0px 10px -3px var(--primary); - } - - .badge { - background-color: var(--highlight); - color: white; - font-size: 1.1rem; - border-radius: 7px; - position: absolute; - right: 0; - top: -0.5rem; - width: 2rem; - height: 2rem; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - font-weight: 600; - transition: transform 0.1s; - } - - &::before { - content: ''; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: var(--secondary); - opacity: 0.3; - filter: brightness(110%); - border-radius: 50%; - } - - & > * { - position: relative; - } - - img { - width: 40%; - height: 40%; - } - } - - .profile-actions { - margin: 0 2rem; - display: flex; - align-items: center; - justify-content: center; - height: 5rem; - border-radius: 4rem; - padding: 0 2rem; - position: relative; - overflow: hidden; - width: 20rem; - cursor: pointer; - - @media print { - display: none; - } - - &::before { - content: ''; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: var(--secondary); - opacity: 0.3; - filter: brightness(110%); - } - - & > * { - position: relative; - } - - img { - width: 1.5rem; - - &.logout-icon { - transform: scale(1.5); - } - } - - span { - margin: 0 auto; - color: var(--primary); - font-size: 1.4rem; - } - } -} - .notifications-window { position: fixed; top: calc(#{$header-height} - 1rem); diff --git a/src/app/pages/dashboard/dashboard.component.html b/src/app/pages/dashboard/dashboard.component.html index ed4ad39..cc25e2f 100644 --- a/src/app/pages/dashboard/dashboard.component.html +++ b/src/app/pages/dashboard/dashboard.component.html @@ -4,83 +4,164 @@ -
-

Non compliance - COM/LLPs

-

A search module to filter down non compliant entities

-
+
+ +
-
-
-
S/N
-
UEN
-
Compliance ID
-
Entity name
-
Last FYE
-
Enforcment status
-
Actions
+
+

Non compliance - COM/LLPs

+

A search module to filter down non compliant entities

- -
    -
  • -
    1
    -
    001
    -
    20190027N
    -
    ABC PTE.LTD
    -
    01/01/2021
    -
    Closed
    -
    - -
    -
  • - -
  • -
    2
    -
    002
    -
    20190027M
    -
    DEF PTE.LTD
    -
    01/01/2020
    -
    1st EF letter
    -
    - -
    -
  • -
-
-
\ No newline at end of file + +
+
+ + + + + + +
+
+ + +
+ +
+
+
S/N
+
UEN
+
Compliance ID
+
Entity name
+
Last FYE
+
Enforcment status
+
Actions
+
+ +
    +
  • +
    1
    +
    001
    +
    20190027N
    +
    ABC PTE.LTD
    +
    01/01/2021
    +
    Closed
    +
    + +
    +
  • + +
  • +
    2
    +
    002
    +
    20190027M
    +
    DEF PTE.LTD
    +
    01/01/2020
    +
    1st EF letter
    +
    + +
    +
  • +
+
+
+ +
diff --git a/src/app/pages/dashboard/dashboard.component.scss b/src/app/pages/dashboard/dashboard.component.scss index ec4141d..f87e1cd 100644 --- a/src/app/pages/dashboard/dashboard.component.scss +++ b/src/app/pages/dashboard/dashboard.component.scss @@ -1,3 +1,26 @@ +.content-holder { + position: relative; + display: flex; + width: calc(80% - 2rem); + margin: 0 auto; + + .sidebar { + position: sticky; + top: 30px; + flex-basis: 250px; + margin-right: 30px; + height: 80vh; + } + + main { + flex-grow: 1; + } +} + +.filter-card-holder { + margin-bottom: 5px; +} + .page-heading { text-align: center; line-height: 1.5; @@ -21,7 +44,6 @@ } .form-holder { - width: calc(70% - 2rem); padding: 4rem; margin: 0 auto; } diff --git a/src/app/pages/dashboard/dashboard.component.ts b/src/app/pages/dashboard/dashboard.component.ts index e35ccf7..cdda6b5 100644 --- a/src/app/pages/dashboard/dashboard.component.ts +++ b/src/app/pages/dashboard/dashboard.component.ts @@ -15,18 +15,21 @@ export class DashboardComponent implements OnInit { ]; categoryOptions = [ + 'All', 'Green', 'Amber', 'Red', ]; enforcementStatusOptions = [ + 'All', '1st Enforcement Letter', '2nd Enforcement Letter', 'Suppressed', ]; selectedCategory = ''; + selectedEnforcementStatus = ''; constructor() { } @@ -38,6 +41,8 @@ export class DashboardComponent implements OnInit { } resetSearch() { + this.selectedCategory = ''; + this.selectedEnforcementStatus = ''; this.isShowingResults = false; } @@ -45,4 +50,14 @@ export class DashboardComponent implements OnInit { this.selectedCategory = selectedCategory; } + updateSelectedEnforcementStatus(selectedEnforcementStatus: string) { + this.selectedEnforcementStatus = selectedEnforcementStatus; + } + + updateSearchOptions(selectedCategory: string, selectedEnforcementStatus: string) { + this.selectedCategory = selectedCategory; + this.selectedEnforcementStatus = selectedEnforcementStatus; + this.isShowingResults = true; + } + } diff --git a/src/app/pages/dashboard/filter-view-card/filter-view-card.component.html b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.html new file mode 100644 index 0000000..983982e --- /dev/null +++ b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.html @@ -0,0 +1,6 @@ +
+
+
{{ text }}
+
{{ count }}
+
+
\ No newline at end of file diff --git a/src/app/pages/dashboard/filter-view-card/filter-view-card.component.scss b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.scss new file mode 100644 index 0000000..f69dea9 --- /dev/null +++ b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.scss @@ -0,0 +1,52 @@ +$red: hsl(0, 100%, 73%); +$amber: hsl(55, 60%, 73%); +$green: hsl(120, 100%, 73%); + +.card { + padding: 15px; + background-color: #e7e7e7; + + &.green { + background-color: lighten($green, 22%); + + .content { + border-color: $green; + } + } + + &.amber { + background-color: lighten($amber, 22%); + + .content { + border-color: $amber; + } + } + + &.red { + background-color: lighten($red, 22%); + + .content { + border-color: $red; + } + } +} + +.content { + display: flex; + border-left: 3px solid black; + padding: 2px 0 2px 10px; + font-weight: 300; + line-height: 1.4; + align-items: center; + + .text { + font-size: 1.3rem; + flex-grow: 1; + margin-right: 20px; + } + + .count { + font-size: 1.4rem; + font-weight: bold; + } +} \ No newline at end of file diff --git a/src/app/pages/dashboard/filter-view-card/filter-view-card.component.spec.ts b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.spec.ts new file mode 100644 index 0000000..eb60c00 --- /dev/null +++ b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FilterViewCardComponent } from './filter-view-card.component'; + +describe('FilterViewCardComponent', () => { + let component: FilterViewCardComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ FilterViewCardComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(FilterViewCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/dashboard/filter-view-card/filter-view-card.component.ts b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.ts new file mode 100644 index 0000000..78a408c --- /dev/null +++ b/src/app/pages/dashboard/filter-view-card/filter-view-card.component.ts @@ -0,0 +1,18 @@ +import { Component, Input, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-filter-view-card', + templateUrl: './filter-view-card.component.html', + styleUrls: ['./filter-view-card.component.scss'] +}) +export class FilterViewCardComponent implements OnInit { + @Input() type: 'GREEN'|'AMBER'|'RED' = 'GREEN'; + @Input() text = ''; + @Input() count = 0; + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/pages/investigate-business-entities-and-individuals/investigate-business-entities-and-individuals.component.scss b/src/app/pages/investigate-business-entities-and-individuals/investigate-business-entities-and-individuals.component.scss index d419f85..656c085 100644 --- a/src/app/pages/investigate-business-entities-and-individuals/investigate-business-entities-and-individuals.component.scss +++ b/src/app/pages/investigate-business-entities-and-individuals/investigate-business-entities-and-individuals.component.scss @@ -7,323 +7,4 @@ margin-right: 2rem; } } -} - -.form { - display: grid; - grid-template-columns: 1fr 1fr; - width: calc(70% - 2rem); - padding: 4rem; - margin: 0 auto; - - .input-holder { - width: calc(100% - 2rem); - } -} - -.acknowledgement { - width: 100%; - margin: 0 auto; - - h2 { - font-size: 2rem; - color: var(--dark-grey); - filter: brightness(80%); - font-weight: 500; - margin: 2rem 2rem 3rem; - } - - .container { - width: calc(70% - 2rem); - margin: 2rem auto; - - @media print { - width: calc(100% - 2rem); - } - } - - .bill-container { - width: 70%; - box-shadow: 0 0 10px var(--shadow-grey); - border-radius: 1rem; - overflow: hidden; - margin: 0 auto 5rem; - - @media print { - width: 100%; - } - } - - .check-icon { - display: block; - width: 58px; - height: auto; - margin: 3rem auto 2rem; - } - - h3 { - font-size: 3rem; - font-weight: normal; - text-align: center; - color: var(--success); - } - - .bill-breakup { - margin-top: 3rem; - display: grid; - grid-template-columns: 1fr 1fr; - list-style: none; - - li { - margin: 1.8rem; - width: 100%; - } - - label { - display: block; - color: var(--dark-grey); - font-size: 1.6rem; - filter: brightness(80%); - } - - .value { - display: block; - color: var(--dark-grey); - opacity: 0.8; - font-size: 1.6rem; - letter-spacing: 0.5px; - line-height: 1.6; - margin-top: 1rem; - - &.active { - color: var(--highlight); - font-weight: normal; - } - } - } - - .form-action-buttons { - margin: 2rem 1.5rem; - - @media print { - display: none; - } - } - - .total-amount { - text-align: center; - overflow: hidden; - padding: 1rem; - position: relative; - - &::before { - content: ''; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: var(--footer-grey); - opacity: 0.4; - } - - & > * { - position: relative; - } - - label { - font-size: 2rem; - color: var(--dark-grey); - } - - span { - margin-left: 1rem; - font-size: 2.4rem; - color: var(--highlight); - } - } - - .message-board { - padding: 0 2rem; - list-style: none; - - @media print { - display: none; - } - - h5 { - font-size: 1.6rem; - color: var(--dark-grey); - filter: brightness(80%); - font-weight: 500; - } - - li { - margin: 1.5rem 0; - line-height: 1.7; - letter-spacing: 0.5px; - font-size: 1.4rem; - color: var(--dark-grey); - opacity: 0.8; - - a { - color: var(--highlight); - font-weight: 500; - } - } - } -} - -.receipt { - width: calc(100% - 4rem); - margin: 0 auto; - - h2 { - font-size: 2rem; - color: var(--dark-grey); - filter: brightness(80%); - font-weight: 500; - margin: 2rem 0; - } - - .bill-breakup { - display: grid; - grid-template-columns: 1fr 1fr; - list-style: none; - - li { - margin-bottom: 1rem; - width: 100%; - display: flex; - align-items: center; - justify-content: flex-start; - } - - label { - display: block; - color: var(--dark-grey); - font-size: 1.4rem; - } - - .value { - display: block; - color: var(--dark-grey); - opacity: 0.8; - font-size: 1.6rem; - letter-spacing: 0.5px; - line-height: 1.6; - margin-left: 1rem; - } - } - - .table { - margin: 2rem auto; - width: 100%; - border-radius: 1rem; - overflow: auto; - border: 2px solid var(--border-grey); - min-height: 10rem; - - header { - background: linear-gradient(90deg, var(--secondary) 0%, var(--primary)); - color: white; - font-size: 1.6rem; - display: flex; - align-items: center; - justify-content: flex-start; - height: 5.5rem; - font-weight: 300; - letter-spacing: 0.5px; - } - - .cell { - width: calc(100% / 6); - - @media print { - word-break: break-all; - } - - &:nth-child(1) { - text-align: center; - width: 10rem; - } - - &:nth-child(2) { - width: calc(20% + (10% - 10rem)); - } - - &:nth-child(3) { - width: 20%; - } - - &:nth-child(4) { - width: 20%; - } - - &:nth-child(5) { - width: 10%; - } - - &:nth-child(3) { - width: 20%; - } - } - - ul { - list-style: none; - } - - li { - display: flex; - align-items: flex-start; - justify-content: flex-start; - padding: 2rem 0; - - &:nth-child(even) { - background-color: var(--border-grey); - } - - .cell { - font-size: 1.4rem; - color: var(--dark-grey); - line-height: 1.7; - } - } - } - - .message-board { - width: 100%; - margin: 4rem 0; - list-style: none; - - h5 { - font-size: 1.6rem; - color: var(--dark-grey); - filter: brightness(80%); - font-weight: 500; - margin-bottom: 1rem; - } - - li { - margin: 0.5rem 0; - line-height: 1.7; - letter-spacing: 0.5px; - font-size: 1.4rem; - color: var(--dark-grey); - opacity: 0.8; - - a { - color: var(--highlight); - font-weight: 500; - } - } - } - - .form-action-buttons { - text-align: left; - - @media print { - display: none; - } - } } \ No newline at end of file diff --git a/src/app/services/notification.service.ts b/src/app/services/notification.service.ts index 9e08d8d..6779648 100644 --- a/src/app/services/notification.service.ts +++ b/src/app/services/notification.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; import { LoginService, Role } from './login.service'; export interface Notification { @@ -14,6 +15,8 @@ export interface Notification { }) export class NotificationService { + private isShowingNotificationsSubject = new BehaviorSubject(false); + private notifications: Array = [{ text: 'New name application has been submitted', description: 'A new Applicant in the company name Kimao has applied for an appeal', @@ -64,7 +67,7 @@ export class NotificationService { timeStamp: '1 hour ago', redirectionUrl: '/tabs/investigate-business-entities-and-individuals', }]; - + private allowedNotifications: Array = []; constructor(loginService: LoginService) { @@ -75,4 +78,12 @@ export class NotificationService { getAllowedNotifications() { return this.allowedNotifications; } + + getIsShowingNotificationsObservable() { + return this.isShowingNotificationsSubject.asObservable(); + } + + setIsShowingNotifications(isShowingNotifications: boolean) { + this.isShowingNotificationsSubject.next(isShowingNotifications); + } }