@ozdao/prometheus-framework 0.2.67 → 0.2.69

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/dist/products.server.js +1 -0
  2. package/dist/products.server.mjs +1 -0
  3. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -1
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -225
  7. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  9. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  11. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  13. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -1
  15. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -72
  17. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Select/Select.vue.js +97 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -97
  21. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
  23. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
  25. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  39. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  43. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
  45. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  53. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  65. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  67. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  69. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +4 -4
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  85. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  99. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  113. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
  117. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/store/leftovers.js +9 -8
  127. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  129. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  135. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
  139. package/dist/style.css +1 -1
  140. package/package.json +1 -1
  141. package/src/components/ButtonSegmented/ButtonSegmented.vue +78 -0
  142. package/src/components/Completion/Completion.vue +76 -0
  143. package/src/components/Feed/Feed.vue +46 -18
  144. package/src/components/Tab/Tab.vue +11 -30
  145. package/src/modules/auth/components/pages/Invite.vue +1 -1
  146. package/src/modules/auth/controllers/auth.controller.js +10 -21
  147. package/src/modules/backoffice/router/backoffice.js +3 -3
  148. package/src/modules/events/components/elements/ButtonCheck.vue +15 -15
  149. package/src/modules/events/components/pages/EditEventTickets.vue +39 -13
  150. package/src/modules/events/components/pages/Event.vue +1 -2
  151. package/src/modules/events/controllers/tickets.controller.js +151 -98
  152. package/src/modules/events/controllers/utils/templateEmail.js +14 -0
  153. package/src/modules/events/controllers/utils/templateTicket.js +194 -0
  154. package/src/modules/events/router/events.js +3 -0
  155. package/src/modules/events/store/tickets.js +2 -2
  156. package/src/modules/globals/controllers/utils/queryProcessor.js +31 -6
  157. package/src/modules/globals/utils/mailing.js +19 -12
  158. package/src/modules/icons/entities/IconEvents.vue +7 -2
  159. package/src/modules/landing/components/pages/Home.vue +1 -1
  160. package/src/modules/orders/components/blocks/CardOrder.vue +1 -1
  161. package/src/modules/orders/components/blocks/CardOrderVar1.vue +97 -0
  162. package/src/modules/orders/components/pages/{FormOrder.vue → OrderCreate.vue} +20 -11
  163. package/src/modules/orders/components/pages/{EditOrder.vue → OrderCreateBackoffice.vue} +74 -17
  164. package/src/modules/orders/components/pages/Orders.vue +181 -70
  165. package/src/modules/orders/components/pages/Orders_refact.vue +2 -2
  166. package/src/modules/orders/components/sections/FormClientDetails.vue +24 -26
  167. package/src/modules/{applications → orders}/components/sections/SubscribeNewsletter.vue +1 -1
  168. package/src/modules/orders/controllers/orders.controller.js +46 -7
  169. package/src/modules/orders/models/customer.model.js +31 -0
  170. package/src/modules/orders/models/order.model.js +8 -13
  171. package/src/modules/orders/orders.client.js +67 -0
  172. package/src/modules/orders/orders.server.js +15 -0
  173. package/src/modules/orders/router/orders.router.js +1 -1
  174. package/src/modules/orders/store/orders.js +17 -2
  175. package/src/modules/products/controllers/leftovers.controller.js +1 -0
  176. package/src/modules/products/store/leftovers.js +3 -2
  177. package/src/modules/users/components/pages/Profile.vue +6 -4
  178. package/src/modules/users/components/sections/ProfileCompletion.vue +30 -15
  179. package/src/modules/users/controllers/users.controller.js +0 -2
  180. package/src/modules/users/models/user.model.js +6 -5
  181. package/src/modules/users/users.server.js +1 -0
  182. package/src/styles/base/borders.scss +5 -2
  183. package/src/styles/config.scss +3 -4
  184. package/src/modules/applications/applications.client.js +0 -1
  185. package/src/modules/orders/components/blocks/Positions.vue +0 -177
  186. package/src/modules/users/models/client.model.js +0 -60
  187. /package/src/modules/{applications → orders}/controllers/applications.controller.js +0 -0
  188. /package/src/modules/{testimonials → orders}/controllers/testimonials.controller.js +0 -0
  189. /package/src/modules/{applications → orders}/models/application.model.js +0 -0
  190. /package/src/modules/{testimonials → orders}/models/testimonial.model.js +0 -0
  191. /package/src/modules/{applications → orders}/routes/applications.routes.js +0 -0
  192. /package/src/modules/{testimonials → orders}/routes/testimonials.routes.js +0 -0
  193. /package/src/modules/{applications → orders}/store/applications.js +0 -0
  194. /package/src/modules/{testimonials → orders}/store/testimonials.js +0 -0
  195. /package/src/modules/{payments → wallet}/components/pages/Payments.vue +0 -0
  196. /package/src/modules/{payments → wallet}/controllers/payments.controller.js +0 -0
  197. /package/src/modules/{payments → wallet}/controllers/payments.tinkoff.controller.js +0 -0
  198. /package/src/modules/{payments → wallet}/models/payment.model.js +0 -0
  199. /package/src/modules/{payments → wallet}/models/payment.tinkoff.model.js +0 -0
  200. /package/src/modules/{payments → wallet}/routes/payments.routes.js +0 -0
  201. /package/src/modules/{payments → wallet}/routes/payments.tinkoff.routes.js +0 -0
  202. /package/src/modules/{payments → wallet}/store/payments.js +0 -0
@@ -0,0 +1,67 @@
1
+ // Importing Vue components from the components directory
2
+
3
+ import Orders from './components/pages/Orders.vue';
4
+ import Order from './components/pages/Order.vue';
5
+ import EditOrder from './components/pages/EditOrder.vue';
6
+
7
+ // import Favorites from './components/pages/Favorites.vue';
8
+
9
+ // Importing blocks components
10
+ import CardOrderItem from './components/blocks/CardOrderItem.vue';
11
+ import CardOrder from './components/blocks/CardOrder.vue';
12
+
13
+ import StatusHistory from './components/blocks/StatusHistory.vue';
14
+
15
+ import FormOrder from './components/pages/FormOrder.vue';
16
+
17
+ // Importing sections components
18
+ import FormClientDetails from './components/sections/FormClientDetails.vue';
19
+ import FormPayment from './components/sections/FormPayment.vue';
20
+ import FormDelivery from './components/sections/FormDelivery.vue';
21
+
22
+ import EmptyState from './components/sections/EmptyState.vue';
23
+ import AskToLogin from './components/sections/AskToLogin.vue';
24
+ import Succes from './components/sections/Succes.vue';
25
+
26
+ // Importing partials components
27
+ import ShopCart from './components/partials/ShopCart.vue';
28
+
29
+ // Importing Vuex store modules from the store directory
30
+ import * as ordersStore from './store/orders.js';
31
+ import * as shopcartStore from './store/shopcart.js';
32
+
33
+ // Importing Vue Router routes from the router directory
34
+ import ordersRoutes from './router/orders.router.js';
35
+
36
+ // Exporting components, store modules, and routes
37
+ export {
38
+ // Pages
39
+ FormOrder,
40
+ Order,
41
+ Orders,
42
+ EditOrder,
43
+ // Favorites,
44
+
45
+ // Blocks
46
+ CardOrderItem,
47
+ CardOrder,
48
+ StatusHistory,
49
+
50
+ // Sections
51
+ FormClientDetails,
52
+ AskToLogin,
53
+ FormDelivery,
54
+ EmptyState,
55
+ Succes,
56
+ FormPayment,
57
+
58
+ // Partials
59
+ ShopCart,
60
+
61
+ // Store
62
+ ordersStore,
63
+ shopcartStore,
64
+
65
+ // Router
66
+ ordersRoutes
67
+ };
@@ -0,0 +1,15 @@
1
+ // Importing controllers from the controllers directory
2
+ const ordersController = require('./controllers/orders.controller.js');
3
+ // Importing routes from the routes directory
4
+ const ordersRoutes = require('./routes/orders.routes.js');
5
+ // Models
6
+ const OrderModel = require('./models/order.model.js');
7
+ const CustomerModel = require('./models/customer.model.js');
8
+
9
+ // Exporting controllers, routes, and models
10
+ module.exports = {
11
+ ordersController,
12
+ ordersRoutes,
13
+ UserModel,
14
+ CustomerModel
15
+ };
@@ -19,7 +19,7 @@ const orders = [
19
19
  ru: 'Заказ'
20
20
  }
21
21
  },
22
- component: () => import(/* webpackChunkName: 'Order' */ '@pf/src/modules/orders/components/pages/FormOrder.vue')
22
+ component: () => import(/* webpackChunkName: 'Order' */ '@pf/src/modules/orders/components/pages/OrderCreate.vue')
23
23
  },{
24
24
  path: ':order',
25
25
  name: 'Order Status',
@@ -22,11 +22,11 @@ const state = reactive({
22
22
  },
23
23
 
24
24
  creator: {
25
- type: 'client',
25
+ type: 'customer',
26
26
  target: null,
27
27
  },
28
28
 
29
- client: {
29
+ customer: {
30
30
  name: null,
31
31
  phone: null,
32
32
  messenger: {
@@ -122,6 +122,20 @@ const actions = {
122
122
  },
123
123
  }
124
124
 
125
+ // const getters = {
126
+ // getTotal(positions) {
127
+ //
128
+ // }
129
+ // }
130
+
131
+ const getters = {
132
+ getTotal(positions) {
133
+ return positions.reduce((total, product) => {
134
+ return total + product.price * product.quantity;
135
+ }, 0)
136
+ },
137
+ }
138
+
125
139
  function set(eventData, property) {
126
140
  state[property] = eventData
127
141
  }
@@ -137,4 +151,5 @@ watch(state, (newState, oldState) => {
137
151
  export {
138
152
  state,
139
153
  actions,
154
+ getters
140
155
  }
@@ -77,6 +77,7 @@ const controllerFactory = (db) => {
77
77
  organization: req.body.organization,
78
78
  type: req.body.type,
79
79
  order: req.body.order,
80
+ comment: req.body.comment,
80
81
  positions: req.body.positions,
81
82
  creator: req.body.creator,
82
83
  owner: req.body.owner
@@ -13,6 +13,7 @@ const state = reactive({
13
13
  current: {
14
14
  organization: "",
15
15
  type: "",
16
+ comment: null,
16
17
  order: null,
17
18
  positions: [],
18
19
  },
@@ -41,9 +42,9 @@ const actions = {
41
42
  }
42
43
  },
43
44
 
44
- async create({ organization, type, order, positions, creator, owner }) {
45
+ async create({ organization, type, order, positions, creator, owner, comment }) {
45
46
  try {
46
- const response = await $axios.post('/leftovers', { organization, type, order, positions, creator, owner });
47
+ const response = await $axios.post('/leftovers', { organization, type, order, positions, creator, owner, comment });
47
48
  state.all.push(response.data);
48
49
  return response.data;
49
50
  } catch (error) {
@@ -15,11 +15,14 @@
15
15
  _id="dash"
16
16
  class="pd-b-extra pd-thin w-100"
17
17
  >
18
- <ProfileCompletion
18
+ <Completion
19
19
  v-if="route.params._id === auth.state.user._id && show"
20
20
  :user="auth.state.user._id"
21
21
  :target="users.state.current"
22
22
  :cta="true"
23
+ text_cta="Fill Profile"
24
+ text="Profile completed at"
25
+ class="mn-b-medium"
23
26
  />
24
27
 
25
28
  <section
@@ -157,7 +160,7 @@
157
160
  <Menu class="mn-b-regular bg-grey">
158
161
 
159
162
  <MenuItem @click="router.push({name: 'User Events', params: {_id: route.params._id}})" class="cursor-pointer">
160
- <IconEvents class="i-semi" :icon="true"/>
163
+ <IconEvents class="i-semi" :icon="true" :fill="'rgb(var(--white))'"/>
161
164
  <span>Events</span>
162
165
  </MenuItem>
163
166
 
@@ -237,6 +240,7 @@
237
240
  import Field from '@pf/src/components/Field/Field.vue'
238
241
  import Button from '@pf/src/components/Button/Button.vue'
239
242
  import Dropdown from "@pf/src/components/Dropdown/Dropdown.vue";
243
+ import Completion from '@pf/src/components/Completion/Completion.vue'
240
244
  // Mobile Module
241
245
  import Menu from '@pf/src/modules/mobile/components/Menu/Menu.vue'
242
246
  import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
@@ -247,8 +251,6 @@ import FormReport from '@pf/src/modules/reports/components/sections/FormReport.v
247
251
  // Community Module
248
252
  import Activity from '@pf/src/modules/community/components/blocks/Activity.vue';
249
253
  import Socials from '@pf/src/modules/organizations/components/blocks/Socials.vue'
250
- // Users Module
251
- import ProfileCompletion from '@pf/src/modules/users/components/sections/ProfileCompletion.vue'
252
254
  // Icons Module
253
255
  import IconEvents from '@pf/src/modules/icons/entities/IconEvents.vue'
254
256
  import IconGroups from '@pf/src/modules/icons/entities/IconGroups.vue'
@@ -1,19 +1,31 @@
1
1
  <template>
2
2
  <section class="w-100 mn-b-semi radius-medium pd-medium bg-main t-black">
3
- <h3>
4
- Profile completed at {{ completionPercentage }}%
5
- </h3>
6
-
7
- <router-link
8
- v-if="cta"
9
- :to="{
10
- name: 'User Edit Profile',
11
- params: { _id: user }
12
- }"
13
- class="mn-t-regular t-black bg-white w-100 button"
14
- >
15
- Fill Profile
16
- </router-link>
3
+ <div class="mn-b-thin flex-v-center flex-nowrap flex">
4
+ <h4>
5
+ {{text}}
6
+ </h4>
7
+
8
+ <h4 class="mn-l-thin uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin">
9
+ {{ percentage || completionPercentage }}%
10
+ </h4>
11
+
12
+ <router-link
13
+ v-if="cta"
14
+ :to="{
15
+ name: 'User Edit Profile',
16
+ params: { _id: user }
17
+ }"
18
+ class="mn-l-auto uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"
19
+ >
20
+ {{text_cta}}
21
+ </router-link>
22
+ </div>
23
+
24
+ <div class=" w-100 h-2r pos-relative pd-nano bg-black radius-big">
25
+ <div :style="`width: ${completionPercentage}%`"class="h-100 bg-main mn-b-thin radius-big">
26
+ </div>
27
+ </div>
28
+
17
29
  </section>
18
30
  </template>
19
31
 
@@ -23,7 +35,10 @@ import { ref, onMounted } from 'vue'
23
35
  const { user, cta, target} = defineProps({
24
36
  user: Object,
25
37
  target: Object,
26
- cta: Boolean
38
+ cta: Boolean,
39
+ percentage: Number,
40
+ text: String,
41
+ text_cta: String,
27
42
  })
28
43
 
29
44
  const completionPercentage = ref(0)
@@ -67,8 +67,6 @@ const controllerFactory = (db) => {
67
67
  console.log(query)
68
68
  console.log(req.body)
69
69
 
70
-
71
-
72
70
  try {
73
71
  const users = await User.aggregate(query);
74
72
  if (!users || users.length === 0) {
@@ -1,16 +1,17 @@
1
- module.exports = (mongoose) => {
1
+ module.exports = (db) => {
2
2
 
3
- const UserSchema = new mongoose.Schema({
3
+ const UserSchema = new db.mongoose.Schema({
4
4
  username: String,
5
5
 
6
6
  phone: String,
7
7
  email: String,
8
+
8
9
  apple_id: String,
9
10
  password: String,
10
11
 
11
12
  status: {
12
13
  type: String,
13
- enum: ['active','banned','removed'],
14
+ enum: ['active','banned','removed','inactive'],
14
15
  default: 'active',
15
16
  required: true,
16
17
  },
@@ -54,7 +55,7 @@ module.exports = (mongoose) => {
54
55
 
55
56
  roles: [
56
57
  {
57
- type: mongoose.Schema.Types.ObjectId,
58
+ type: db.mongoose.Schema.Types.ObjectId,
58
59
  ref: "Role"
59
60
  }
60
61
  ]
@@ -65,7 +66,7 @@ module.exports = (mongoose) => {
65
66
 
66
67
  });
67
68
 
68
- const User = mongoose.model("User", UserSchema);
69
+ const User = db.mongoose.model("User", UserSchema);
69
70
 
70
71
  return User;
71
72
  }
@@ -4,6 +4,7 @@ const usersController = require('./controllers/users.controller.js');
4
4
  const usersRoutes = require('./routes/users.routes.js');
5
5
  // Models
6
6
  const UserModel = require('./models/user.model.js');
7
+ const ClientModel = require('./models/client.model.js');
7
8
 
8
9
  // Exporting controllers, routes, and models
9
10
  module.exports = {
@@ -1,5 +1,7 @@
1
1
  body {
2
- // Border Clasess
2
+
3
+
4
+ // Border Clasess
3
5
  .br-1px { border-width: 1px; }
4
6
  .br-2px { border-width: 2px; }
5
7
  /* Border style */
@@ -9,6 +11,8 @@ body {
9
11
  .br-t { border-top-width: 1px; }
10
12
  .br-r { border-right-width: 1px; }
11
13
  .br-b { border-bottom-width: 1px; }
14
+ .br-b-2px { border-bottom-width: 2px; }
15
+ .br-b-3px { border-bottom-width: 3px; }
12
16
  .br-l { border-left-width: 1px; }
13
17
  /* Border colors */
14
18
  .br-black { border-color: rgba(var(--black), 1.00); }
@@ -63,7 +67,6 @@ body {
63
67
  .br-white-transp-90 { border-color: rgba(var(--white), 0.90); }
64
68
  .br-white-transp-95 { border-color: rgba(var(--white), 0.95); }
65
69
  .br-white-transp-100 { border-color: rgba(var(--white), 1.00); }
66
-
67
70
  /* Social media brand borders */
68
71
  .br-youtube { border-color: rgba(var(--youtube), 1);; }
69
72
  .br-telegram { border-color: rgba(var(--telegram), 1);; }
@@ -52,8 +52,7 @@
52
52
  }
53
53
  // Генерация отрицательных классов с модификаторами
54
54
  .#{$class-name}-#{$modifier}-#{$value-key}-negative {
55
- #{$css-property}-#{$css-modifier}: -$value;
56
- // #{$css-property}-#{$css-modifier}: calc(#{$value} * -1);
55
+ #{$css-property}-#{$css-modifier}: calc(#{$value} * -1);
57
56
  }
58
57
  }
59
58
  }
@@ -67,7 +66,7 @@
67
66
  ////////////////////////////////////////
68
67
  // 1.COLORS VARIABLES
69
68
  ///////////////////////////////////////
70
- --main: 0,255,136;
69
+ --main: 10,250,125;;
71
70
  @include generate-vars-color('main');
72
71
  --second: 34,102,255;
73
72
  @include generate-vars-color('second');
@@ -78,7 +77,7 @@
78
77
  --fifth: 255,216,10;
79
78
  @include generate-vars-color('fifth');
80
79
  // Black and white colors
81
- --black: 10,10,10;
80
+ --black: 0,0,0;
82
81
  @include generate-vars-color('black');
83
82
  --dark: 36,36,36;
84
83
  @include generate-vars-color('dark');
@@ -1 +0,0 @@
1
- import SubscribeNewsletter from './components/sections/SubscribeNewsletter.vue';
@@ -1,177 +0,0 @@
1
- <template>
2
- <div class="order-list">
3
- <div class="flex">
4
- <h5 class="mn-b-small">
5
- Состав заказа
6
-
7
- </h5>
8
- <div>
9
-
10
- <a v-if="showAddNew === false" class="t-main h5" @click="changeAdd()">Добавить</a>
11
- <a v-else class="t-main h5" @click="changeAdd()">Закрыть</a>
12
- <a v-if="showAddNew === false" class="mn-l-small t-main h5" @click="reserOrderList()">Сбросить</a>
13
- <a v-if="showAddNew === false" class="mn-l-small t-main h5" @click="saveItemList()">Сохранить</a>
14
-
15
- </div>
16
-
17
- </div>
18
-
19
- <div v-if="showAddNew !== false" class="mn-b-small w-100 block">
20
- <vue-select :options="products" v-model="techStack" :label-by="'name'" searchable clear-on-close :close-on-select="true"> </vue-select>
21
- <button @click="addProductToOrder()" class="w-25 button">Добавить в заказ</button>
22
- </div>
23
-
24
- <ul class="mn-b-semi">
25
- <li v-for="(product, index) in orderProducts" :key="product._id" class="shop-cart-item mn-b-small ">
26
- <!-- <img v-if="product.images" :src="(FILE_SERVER_URL || '') + require( `@/assets/images/products/${product.images.links[0]}`)"> -->
27
- <!-- <img v-if="!product.images" :src="(FILE_SERVER_URL || '') + require( `@/assets/icons/photo.svg`)"> -->
28
- <div class="text-left">
29
- <p class="name">{{ product.name }}</p>
30
-
31
- <div class="mn-b-small flex">
32
- <div class="small-underline variant">
33
- <span v-if="!product.size && !product.color" class="">One-size</span>
34
- <span v-if="product.size" class="">{{ product.size}}</span>
35
- <span v-if="product.color && product.size" class="">, </span>
36
- <span v-if="product.color" class="">{{ product.color}}</span>
37
- <div v-if="product.edit">{{product.edit}}</div>
38
- </div>
39
-
40
- <p class="t-demi">{{product.quantity}} x $ {{product.price}}</p>
41
- </div>
42
-
43
- <div v-if="data[index]" class="flex-nowrap flex w-100">
44
- <select
45
- v-if="product.size"
46
- @input="updateInputText('orders', 'current.positions[' + index + '].size', $event)"
47
- :value="product.size"
48
- placeholder="hello@example.com"
49
- class="mn-r-small mn-b-small input-text input"
50
- >
51
- <option v-for="size in productSizes(product)" :value="size" >{{size}}</option>
52
- </select>
53
-
54
- <select
55
- v-if="product.color"
56
-
57
- @input="updateInputText('orders', 'current.positions[' + index + '].color', $event)"
58
- placeholder="hello@example.com"
59
- class="mn-r-small mn-b-small input-text input"
60
- >
61
-
62
- <option :value="product.color" selected disabled>{{product.color}}</option>
63
- <option v-for="(color, index) in productColors(product)" :value="color" >{{color}}</option>
64
- </select>
65
-
66
-
67
- <input
68
- @input="updateInputText('orders', 'current.positions[' + index + '].quantity', $event)"
69
- :value="product.quantity"
70
- placeholder="Маргарита"
71
- class="mn-b-small input-text input"
72
- />
73
- </div>
74
- <a v-if="!data[index]" @click="changeEdit(index)">Редактировать</a>
75
- <a v-if="data[index]" @click="deleteItem(product)">Удалить</a>
76
- <a v-if="data[index]" @click="changeEdit(index)">Закрыть</a>
77
- </div>
78
- </li>
79
- </ul>
80
-
81
-
82
- <div class=" w-100 flex-center flex block">
83
- <p class="p-big">Сумма к оплате:<br>
84
- <span v-if="order.info.delivery === 'Самовывоз'" class="p-big t-semi">$ {{ orderTotalPrice }}</span>
85
- <span v-if="order.info.delivery === 'Курьером'" class="p-big t-semi">$ {{ orderTotalPrice + 10 }}</span>
86
- <span v-if="order.info.delivery === 'Почтой'" class="p-big t-semi">$ {{ orderTotalPrice + 20 }}</span>
87
- (Заказ $ {{orderTotalPrice}} + доставка
88
- <span v-if="order.info.delivery === 'Самовывоз'" >0</span>
89
- <span v-if="order.info.delivery === 'Курьером'" >10</span>
90
- <span v-if="order.info.delivery === 'Почтой'">20</span>
91
- ₽)
92
- </p>
93
- </div>
94
- </div>
95
- </template>
96
-
97
-
98
- <script setup="props">
99
- // GLOBAL
100
- import InputText from '@/components/elements/InputText.vue'
101
- import InputSelect from '@/components/elements/InputSelect.vue'
102
-
103
- import {ref,computed,reactive,toRefs } from 'vue'
104
-
105
- import { useRouter,useRoute } from 'vue-router'
106
-
107
- const store = useStore()
108
- const router = useRouter()
109
- const route = useRoute()
110
-
111
- const props = defineProps({
112
- order: Object,
113
- products: Array,
114
- });
115
-
116
- const orderTotalPrice = computed(() => store.getters['orders/orderTotalPrice'])
117
- const orderProducts = computed(() => store.getters['orders/orderProducts'])
118
-
119
- let data = reactive([])
120
- let reactiveData = toRefs(data)
121
-
122
- const techStack = ref(null)
123
-
124
- function test () {
125
- console.log(techStack)
126
- }
127
-
128
- function addProductToOrder () {
129
- store.dispatch('orders/addProductToOrder', techStack)
130
- showAddNew.value = !showAddNew.value;
131
- }
132
-
133
- function deleteItem (item) {
134
- store.commit('orders/deleteItemFromOrder', item)
135
- }
136
-
137
- function saveItemList () {
138
- store.dispatch('orders/updateOrderpositions', route.params._id)
139
- }
140
-
141
-
142
- function changeEdit (index) {
143
- data[index] = !data[index];
144
- }
145
-
146
- var showAddNew = ref(false)
147
- // const reactshowAddNew = toRefs(showAddNew)
148
-
149
- function reserOrderList () {
150
- store.dispatch('orders/fetchOrder', route.params._id)
151
- }
152
-
153
- function changeAdd () {
154
- showAddNew.value = !showAddNew.value;
155
- }
156
-
157
- function productSizes (product) {
158
- const productData = store.state.products.all.find(p => p._id === product._id)
159
- var computedProduct = computed(() => store.getters['orders/getProductSizes'](productData))
160
- return computedProduct.value
161
- }
162
- function productColors (product) {
163
- const productData = store.state.products.all.find(p => p._id === product._id)
164
- var computedProduct = computed(() => store.getters['orders/getProductColors']({product, productData}))
165
- return computedProduct.value
166
- }
167
-
168
- </script>
169
-
170
- <style lang="scss" scoped>
171
- .shop-cart-item {
172
- &:first-of-type { padding-top: 0;}
173
- }
174
-
175
- </style>
176
-
177
-
@@ -1,60 +0,0 @@
1
- module.exports = (mongoose) => {
2
-
3
- const ClientSchema = new mongoose.Schema({
4
- phone: String,
5
- email: String,
6
-
7
- status: {
8
- type: String,
9
- enum: ['new','lost','converted'],
10
- default: 'new',
11
- required: true,
12
- },
13
-
14
- profile: {
15
- photo: {
16
- type: String,
17
- default: ''
18
- },
19
- name: {
20
- type: String,
21
- default: ''
22
- },
23
- description: {
24
- type: String,
25
- default: ''
26
- },
27
- birthday: {
28
- type: Date,
29
- }
30
- },
31
-
32
- socials: {
33
- telegram: {
34
- type: String,
35
- default: ''
36
- },
37
- twitter: {
38
- type: String,
39
- default: ''
40
- },
41
- facebook: {
42
- type: String,
43
- default: ''
44
- },
45
- instagram: {
46
- type: String,
47
- default: ''
48
- }
49
- },
50
- },{
51
- // Creation Date
52
- timestamps: { currentTime: () => Date.now()
53
- }
54
-
55
- });
56
-
57
- const Client = mongoose.model("Client", ClientSchema);
58
-
59
- return Client;
60
- }