-
Notifications
You must be signed in to change notification settings - Fork 0
/
task.txt
166 lines (161 loc) · 5.28 KB
/
task.txt
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
- сайт
- доступ
- firebase backend
- новини
- коментарі
- +/- оцінка новин
- сторінка з товарами
- кошик (localstorage)
- список товарів
- ціна
- сортування: ціна, назва, к-ть на складі, дата / date pipe
- дата - коли товар додано
- moment.js - опціонально
- можливість купувати товари + в користувача має зберігатись список товарів
- оцінка товарів
- різні способи доставки + випадковий час доставки
- GoogleMap - рахує маршрут для доставки
- категорії користувачів:
- default user - купити :)
- premium - скидки, анонімні коментарі поставщикам, рейтинг поставщиків
- provider - додати товари, дивитись оборот товарів (+ статистику) chart.js - по можливості
- administrator - може видаляти всіх користувачів, товари - додає і видаляє, блокує аккаунти
- facebook, google auth
- angular 2 firebase - див. бібліотеку
- адмінка
- bootstrap
//////////////////////////////////////////////////////////////////////////////////////
- APP module
- APP routing module
- CORE module
> home component
- latest news (to news service)
- random products
> header component
- navigation
- NEWS module
- NEWS routing
> all news component
> single news component
- comments
- rating
- sharing with FB / GOOGLE
> edit news component (route guard - only admins and providers)
+ news service
- get all news
- get single news
- change rating
- add, update, delete news (admin, provider)
- PRODUCTS module
- PRODUCTS route
+ products service
- add to cart (localstorage)
- delete from cart (localstorage)
- rating +/-
- book products (array of products, optional: user gmap coordinates)
- updating products count on server
- return delivery time (random / gmap)
* admin:
- add products
- update products
- delete products
* provider: same as admin, but only his own products (checking "provider" property of product)
> products list component
- sorting
> products details component
> products edit component (route guard - only admins and providers)
> products cart (only authorized)
- list of booked products
- getting delivery type
- delivering time
- PROVIDERS module
- PROVIDERS route
+ providers service
- get providers
- update provider rating
- update provider comments
- products - get from products service
> providers list component
> providers details component
- only for premium users: change rating, add comments
- USERS module
+ users service
- get single user
- get all users
- new user (registration / admin)
- update user
- delete user
> dashboard component
* user:
- list of booked products
- list of comments
- list of rated products
- list of rated news
* provider:
- list of products
- list of news
* admin
- list of users
- add / edit / delete user
- AUTH module
- AUTH route
+ auth service
- registration
- login
* admin:
- delete user
- update user
- create user
> login component
> registration component
- ADMIN module
- ADMIN route
> admin page
- users count
- providers count
- statistics
- etc. - optional
MODELS:
- news:
- id - string
- title - string
- content - string
- rating - number
- author - string (id)
- date - date (string?)
- product:
- id - string
- name - string
- price - number
- rating - number
- provider - string (provider id)
- count - number
- date - date (string?)
- rated by - array (string users' id's)
- user:
- id - string
- name - string
- email - string
- age - number
- gender - string
- category - string | user, premium, provider, administrator, banned
- avatar (url) - string
- list of booked products - id string array
- location (gmap) - object
- rated products - id string array
- rated news - id string array
- provider:
- id - string
- name - string
- statistic: array: [ [product_name, date] ]
- rating
( no products list: it will available from products service )
- comment:
- id - string
- authorId - string
- content - string
- scroll from top
//////////////////////
known bugs:
- logout - access data doesn't refresh;
- login - dash profile open before user data is loaded;