-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.service.ts
96 lines (90 loc) · 2.13 KB
/
constants.service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { Injectable } from '@angular/core';
@Injectable()
export class ConstantsService {
/**
* Required constants
* If you are overwritting these using your own ConstantsService
* You must make sure to include all of them because they are all used in some way.
*/
API_BASE_URL = 'http://localhost:3000/api';
AWS_S3_BASE_URL = '';
FILE_UPLOAD_DEFAULT_ALLOWED_MIME_TYPES: string[] = [
'image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'text/plain', 'text/csv', 'audio/mpeg', 'video/mp4',
];
FILE_UPLOAD_DEFAULT_MAX_FILE_SIZE: number = 10000000;
IMAGE_MIME_TYPES: string[] = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'];
/**
* Example sidebar items
*/
SIDEBAR_ITEMS: object[] = [
{
title: 'Users',
icon: 'users',
class: 'User',
},
{
title: 'Companies',
icon: 'mobile',
class: 'Company',
},
];
/**
* Example Schema Overwrites
*/
DEFAULT_SCHEMA_OVERWRITES: object = {
Company: {
roles: {
instance: 'MultiSelect',
options: ['admin', 'manager', 'user', 'employee'],
},
singleRole: {
instance: 'SingleSelect',
options: ['admin', 'manager', 'user', 'super admin', 'intern'],
},
overview: {
instance: 'Wysiwyg',
},
__v: {
instance: 'Remove',
},
_id: {
instance: 'Hidden',
},
createdAt: {
instance: 'Disabled',
},
updatedAt: {
instance: 'Disabled',
},
avatar: {
instance: 'Image',
},
images: {
instance: 'ImageArray',
allowedMimeType: ['image/jpeg', 'image/jpg', 'image/png'],
},
file: {
instance: 'File',
},
files: {
instance: 'FileArray',
},
_createdBy: {
searchField: 'firstName',
},
_locations: {
searchField: 'name',
},
_relationship: {
searchField: 'name',
},
},
User: {
avatar: {
instance: 'Image',
allowedMimeType: ['image/jpeg', 'image/jpg', 'image/png'],
},
},
};
ADMIN_WYSIWYG_OPTIONS: object = {};
}