index.ts
8.64 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
import type { Chat, ChatContact } from './types'
import { getPublicUrl } from '@/server/utils/getPublicUrl'
interface DB {
profileUser: ChatContact & {
settings: {
isTwoStepAuthVerificationEnabled: boolean
isNotificationsOn: boolean
}
}
contacts: ChatContact[]
chats: Chat[]
}
const previousDay = new Date(new Date().getTime() - 24 * 60 * 60 * 1000)
const dayBeforePreviousDay = new Date(new Date().getTime() - 24 * 60 * 60 * 1000 * 2)
const avatar1 = getPublicUrl('/images/avatars/avatar-1.png')
const avatar2 = getPublicUrl('/images/avatars/avatar-2.png')
const avatar3 = getPublicUrl('/images/avatars/avatar-3.png')
const avatar4 = getPublicUrl('/images/avatars/avatar-4.png')
const avatar5 = getPublicUrl('/images/avatars/avatar-5.png')
const avatar6 = getPublicUrl('/images/avatars/avatar-6.png')
const avatar8 = getPublicUrl('/images/avatars/avatar-8.png')
export const db: DB = {
profileUser: {
id: 11,
avatar: avatar1,
fullName: 'John Doe',
role: 'admin',
about:
'Dessert chocolate cake lemon drops jujubes. Biscuit cupcake ice cream bear claw brownie marshmallow.',
status: 'online',
settings: {
isTwoStepAuthVerificationEnabled: true,
isNotificationsOn: false,
},
},
contacts: [
{
id: 1,
fullName: 'Gavin Griffith',
role: 'Frontend Developer',
about: 'Cake pie jelly jelly beans. Marzipan lemon drops halvah cake. Pudding cookie lemon drops icing',
avatar: avatar5,
status: 'offline',
},
{
id: 2,
fullName: 'Harriet McBride',
role: 'UI/UX Designer',
about:
'Toffee caramels jelly-o tart gummi bears cake I love ice cream lollipop. Sweet liquorice croissant candy danish dessert icing. Cake macaroon gingerbread toffee sweet.',
avatar: avatar2,
status: 'busy',
},
{
id: 3,
fullName: 'Danny Conner',
role: 'Town planner',
about:
'Soufflé soufflé caramels sweet roll. Jelly lollipop sesame snaps bear claw jelly beans sugar plum sugar plum.',
avatar: '',
status: 'busy',
},
{
id: 4,
fullName: 'Janie West',
role: 'Data scientist',
about:
'Chupa chups candy canes chocolate bar marshmallow liquorice muffin. Lemon drops oat cake tart liquorice tart cookie. Jelly-o cookie tootsie roll halvah.',
avatar: '',
status: 'online',
},
{
id: 5,
fullName: 'Bryan Murray',
role: 'Dietitian',
about: 'Cake pie jelly jelly beans. Marzipan lemon drops halvah cake. Pudding cookie lemon drops icing',
avatar: avatar5,
status: 'busy',
},
{
id: 6,
fullName: 'Albert Underwood',
role: 'Marketing executive',
about:
'Toffee caramels jelly-o tart gummi bears cake I love ice cream lollipop. Sweet liquorice croissant candy danish dessert icing. Cake macaroon gingerbread toffee sweet.',
avatar: avatar6,
status: 'online',
},
{
id: 7,
fullName: 'Adele Ross',
role: 'Special educational needs teacher',
about:
'Biscuit powder oat cake donut brownie ice cream I love soufflé. I love tootsie roll I love powder tootsie roll.',
avatar: '',
status: 'online',
},
{
id: 8,
fullName: 'Mark Berry',
role: 'Advertising copywriter',
about:
'Bear claw ice cream lollipop gingerbread carrot cake. Brownie gummi bears chocolate muffin croissant jelly I love marzipan wafer.',
avatar: avatar3,
status: 'away',
},
{
id: 9,
fullName: 'Joseph Evans',
role: 'Designer, television/film set',
about:
'Gummies gummi bears I love candy icing apple pie I love marzipan bear claw. I love tart biscuit I love candy canes pudding chupa chups liquorice croissant.',
avatar: avatar8,
status: 'offline',
},
{
id: 10,
fullName: 'Blake Carter',
role: 'Building surveyor',
about: 'Cake pie jelly jelly beans. Marzipan lemon drops halvah cake. Pudding cookie lemon drops icing',
avatar: avatar4,
status: 'away',
},
],
chats: [
{
id: 1,
userId: 2,
unseenMsgs: 0,
messages: [
{
message: 'Hi',
time: 'Mon Dec 10 2018 07:45:00 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Hello. How can I help You?',
time: 'Mon Dec 11 2018 07:45:15 GMT+0000 (GMT)',
senderId: 2,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Can I get details of my last transaction I made last month? 🤔',
time: 'Mon Dec 11 2018 07:46:10 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'We need to check if we can provide you such information.',
time: 'Mon Dec 11 2018 07:45:15 GMT+0000 (GMT)',
senderId: 2,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'I will inform you as I get update on this.',
time: 'Mon Dec 11 2018 07:46:15 GMT+0000 (GMT)',
senderId: 2,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'If it takes long you can mail me at my mail address.',
time: String(dayBeforePreviousDay),
senderId: 11,
feedback: {
isSent: true,
isDelivered: false,
isSeen: false,
},
},
],
},
{
id: 2,
userId: 1,
unseenMsgs: 1,
messages: [
{
message: 'How can we help? We\'re here for you!',
time: 'Mon Dec 10 2018 07:45:00 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Hey John, I am looking for the best admin template. Could you please help me to find it out?',
time: 'Mon Dec 10 2018 07:45:23 GMT+0000 (GMT)',
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'It should use nice Framework.',
time: 'Mon Dec 10 2018 07:45:55 GMT+0000 (GMT)',
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Absolutely!',
time: 'Mon Dec 10 2018 07:46:00 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Our admin is the responsive admin template.!',
time: 'Mon Dec 10 2018 07:46:05 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Looks clean and fresh UI. 😍',
time: 'Mon Dec 10 2018 07:46:23 GMT+0000 (GMT)',
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'It\'s perfect for my next project.',
time: 'Mon Dec 10 2018 07:46:33 GMT+0000 (GMT)',
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'How can I purchase it?',
time: 'Mon Dec 10 2018 07:46:43 GMT+0000 (GMT)',
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'Thanks, From our official site 😇',
time: 'Mon Dec 10 2018 07:46:53 GMT+0000 (GMT)',
senderId: 11,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
{
message: 'I will purchase it for sure. 👍',
time: String(previousDay),
senderId: 1,
feedback: {
isSent: true,
isDelivered: true,
isSeen: true,
},
},
],
},
],
}