diff --git a/src/app/core/pipes/getById.pipe.ts b/src/app/core/pipes/getById.pipe.ts
index fbbf6895..e2797aad 100644
--- a/src/app/core/pipes/getById.pipe.ts
+++ b/src/app/core/pipes/getById.pipe.ts
@@ -3,10 +3,10 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'getById'})
export class GetByIdPipe implements PipeTransform
{
- transform(value: any[], id: number, property: string ): any
+ transform(value: any[], id: number, property: string): any
{
const foundItem = value.find(item => {
- if ( item.id )
+ if ( item.id !== undefined )
{
return item.id === id;
}
diff --git a/src/app/core/pipes/search.pipe.ts b/src/app/core/pipes/search.pipe.ts
deleted file mode 100644
index afa0e955..00000000
--- a/src/app/core/pipes/search.pipe.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { Pipe, PipeTransform } from '@angular/core';
-
-@Pipe({
- name: 'filter'
-})
-export class SearchPipe implements PipeTransform
-{
- transform(items: any, term: string): any
- {
- if ( term === undefined )
- {
- return items;
- }
-
- return this.filter(items, term);
- }
-
- filter(items: any, term: string)
- {
- return items.filter(item => {
-
- for ( const property in item )
- {
- if ( !item.hasOwnProperty(property) || !item[property] )
- {
- console.log('continueing...');
- continue;
- }
-
- if ( Array.isArray(item[property]) )
- {
- console.log('is Array');
- return this.filter(item[property], term);
- }
-
- if ( item[property].toString().toLowerCase().includes(term.toLowerCase()) )
- {
- console.log('found!');
- return true;
- }
- }
-
- return false;
- }
- );
- }
-}
-
-
diff --git a/src/app/fuse-fake-db/fuse-fake-db.service.ts b/src/app/fuse-fake-db/fuse-fake-db.service.ts
index dc3b15bf..e8b48d5a 100644
--- a/src/app/fuse-fake-db/fuse-fake-db.service.ts
+++ b/src/app/fuse-fake-db/fuse-fake-db.service.ts
@@ -1,5 +1,5 @@
-import {InMemoryDbService} from 'angular-in-memory-web-api';
-import {MailFakeDb} from './mail';
+import { InMemoryDbService } from 'angular-in-memory-web-api';
+import { MailFakeDb } from './mail';
import {ChatFakeDb} from './chat';
export class FuseFakeDbService implements InMemoryDbService
@@ -7,9 +7,10 @@ export class FuseFakeDbService implements InMemoryDbService
createDb()
{
return {
- 'mail-mails' : MailFakeDb.mails,
- 'mail-folders' : MailFakeDb.folders,
- 'mail-labels' : MailFakeDb.labels,
+ 'mail-mails' : MailFakeDb.mails,
+ 'mail-folders': MailFakeDb.folders,
+ 'mail-filters': MailFakeDb.filters,
+ 'mail-labels' : MailFakeDb.labels,
'chat-contacts': ChatFakeDb.contacts,
'chat-chats' : ChatFakeDb.chats,
'chat-user' : ChatFakeDb.user,
diff --git a/src/app/fuse-fake-db/mail.ts b/src/app/fuse-fake-db/mail.ts
index 54e365aa..af387198 100644
--- a/src/app/fuse-fake-db/mail.ts
+++ b/src/app/fuse-fake-db/mail.ts
@@ -47,11 +47,7 @@ export class MailFakeDb
'labels' : [
1
],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '154588a0864d2881124',
@@ -74,11 +70,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '15453ba60d3baa5daaf',
@@ -104,11 +96,7 @@ export class MailFakeDb
3,
2
],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '15453a06c08fb021776',
@@ -134,11 +122,7 @@ export class MailFakeDb
3,
4
],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '154537435d5b32bf11a',
@@ -161,11 +145,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '1544e43dcdae6ebf876',
@@ -190,11 +170,7 @@ export class MailFakeDb
'labels' : [
2
],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '1543ee3a5b43e0f9f45',
@@ -217,11 +193,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '1543cc4515df3146112',
@@ -244,11 +216,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '154398a4770d7aaf9a2',
@@ -271,11 +239,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '15438351f87dcd68567',
@@ -298,11 +262,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '1542d75d929a603125',
@@ -325,11 +285,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '1541ca7af66da284177',
@@ -352,11 +308,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '154297167e781781745',
@@ -379,11 +331,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 0,
- 1,
- 2
- ]
+ 'folder' : 0
},
{
'id' : '15427f4c1b7f3953234',
@@ -406,9 +354,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 3
- ]
+ 'folder' : 3
},
{
'id' : '154204e45a59b168453',
@@ -431,9 +377,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 3
- ]
+ 'folder' : 3
},
{
'id' : '1541dd1e05dfc439216',
@@ -456,9 +400,7 @@ export class MailFakeDb
'important' : false,
'hasAttachments': false,
'labels' : [],
- 'folders' : [
- 3
- ]
+ 'folder' : 3
}
];
@@ -492,15 +434,18 @@ export class MailFakeDb
'handle': 'trash',
'title' : 'Trash',
'icon' : 'delete'
- },
+ }
+ ];
+
+ public static filters = [
{
- 'id' : 5,
+ 'id' : 0,
'handle': 'starred',
'title' : 'Starred',
'icon' : 'star'
},
{
- 'id' : 6,
+ 'id' : 1,
'handle': 'important',
'title' : 'Important',
'icon' : 'label'
diff --git a/src/app/main/apps/mail/mail-details/mail-details.component.html b/src/app/main/apps/mail/mail-details/mail-details.component.html
index 3b7e5a5c..41d2c451 100644
--- a/src/app/main/apps/mail/mail-details/mail-details.component.html
+++ b/src/app/main/apps/mail/mail-details/mail-details.component.html
@@ -60,16 +60,9 @@
-
- Show Details
-
-
-
- Hide Details
+
+ Show Details
+ Hide Details
@@ -88,16 +81,13 @@
-
-