+
+
+
+
+ {{'labels.placeholders.Search Activity' | translate}}
+
+
+
+
+
+ {{activity.activity}}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
diff --git a/src/app/home/dashboard/dashboard.component.scss b/src/app/home/dashboard/dashboard.component.scss
index c71eab6cf..dd7504546 100644
--- a/src/app/home/dashboard/dashboard.component.scss
+++ b/src/app/home/dashboard/dashboard.component.scss
@@ -3,54 +3,56 @@
padding: 2%;
display: flex;
flex-direction: column;
+ overflow-x: hidden;
+
+ .search {
+ width: 100%;
+ padding: 12px;
+ mat-card-content {
+ width: 100%;
+ }
+
+ mat-form-field {
+ width: 100%;
+ }
+ }
.top-card {
- display: flex;
- flex-wrap: wrap;
- flex-direction: row;
- gap: 2px;
+ flex: 1 0 100%;
- .recent-activities,
- .frequent-activities{
- min-width: 18.5rem;
- }
- .recent-activities,
- .frequent-activities,
- .amount-disbursed {
- flex: 1 0 calc(26.33% - 10px);
- padding: 0;
- margin: 10px;
-
- .list {
- padding-top: 0;
- }
+ .trends-bar {
+ width: 100%;
+ flex: 1 0 100%;
}
}
- .bottom-card{
+ .bottom-card {
display: flex;
flex-wrap: wrap;
flex-direction: row;
gap: 2px;
- .trends-bar,
- .amount-collected {
+ .amount-collected,
+ .amount-disbursed {
flex: 1 0 calc(40% - 10px);
padding: 0;
margin: 10px;
}
}
-
- @media screen and (max-width: 768px) {
- .recent-activities,
- .frequent-activities,
- .amount-disbursed,
+}
+
+@media screen and (max-width: 768px) {
+
+ .top-card,
+ .bottom-card {
+ flex-direction: column;
+
.trends-bar,
- .amount-collected {
- box-sizing: border-box;
+ .amount-collected,
+ .amount-disbursed {
+ flex: 1 0 100%;
width: 100%;
- flex: 1 0 calc(80% - 10px);
- margin-bottom: 20px;
+ margin: 10px 0;
}
}
}
diff --git a/src/app/home/dashboard/dashboard.component.ts b/src/app/home/dashboard/dashboard.component.ts
index 6fbec00c8..869ef401e 100644
--- a/src/app/home/dashboard/dashboard.component.ts
+++ b/src/app/home/dashboard/dashboard.component.ts
@@ -1,7 +1,10 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
+import { UntypedFormControl } from '@angular/forms';
import { Router } from '@angular/router';
-
+import { Observable } from 'rxjs';
+import { map } from 'rxjs/operators';
+import { activities } from '../activities';
/**
* Dashboard component.
*/
@@ -18,6 +21,12 @@ export class DashboardComponent implements OnInit {
recentActivities: string[];
/** Array of most frequent user activities */
frequentActivities: string[];
+ /** Search Text. */
+ searchText: UntypedFormControl = new UntypedFormControl();
+ /** Filtered Activities. */
+ filteredActivities: Observable