@ozdao/prometheus-framework 0.2.134 → 0.2.137

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  3. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  5. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +19 -20
  7. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -0
  10. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +44 -0
  11. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  29. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  43. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  51. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +73 -43
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -0
  102. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +64 -0
  103. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotSub.vue.cjs +1 -0
  104. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotSub.vue.js +24 -0
  105. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -0
  106. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +181 -0
  107. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -0
  108. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +478 -0
  109. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -0
  110. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +121 -0
  111. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -0
  112. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +203 -0
  113. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -0
  114. package/dist/prometheus-framework/src/modules/spots/router/spots.js +92 -0
  115. package/dist/prometheus-framework/src/modules/spots/spots.client.cjs +1 -0
  116. package/dist/prometheus-framework/src/modules/spots/spots.client.js +37 -0
  117. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
  119. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  121. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  127. package/dist/spots.server.js +169 -0
  128. package/dist/spots.server.mjs +170 -0
  129. package/dist/style.css +1 -1
  130. package/package.json +9 -9
  131. package/src/modules/globals/components/layouts/Client.vue +10 -8
  132. package/src/modules/globals/components/sections/Walkthrough.vue +4 -4
  133. package/src/modules/globals/globals.client.js +5 -5
  134. package/src/modules/organizations/components/pages/OrganizationEdit.vue +29 -1
  135. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  136. package/src/modules/spots/components/pages/SpotEdit.vue +8 -53
  137. package/src/modules/spots/models/spot.model.js +7 -7
  138. package/src/modules/spots/router/spots.js +65 -61
  139. package/src/modules/spots/spots.client.js +43 -0
  140. package/src/modules/spots/spots.server.js +31 -0
  141. package/src/modules/spots/components/sections/PlaceModify.vue +0 -113
  142. package/src/modules/spots/components/sections/Places.vue +0 -119
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozdao/prometheus-framework",
3
- "version": "0.2.134",
3
+ "version": "0.2.137",
4
4
  "description": "Web3 Framework focused on user experience and ease of development.",
5
5
  "author": "OZ DAO <hello@ozdao.dev>",
6
6
  "license": "GPL-3.0-or-later",
@@ -80,14 +80,6 @@
80
80
  "import": "./dist/organizations.server.mjs",
81
81
  "require": "./dist/organizations.server.js"
82
82
  },
83
- "./modules/products/client": {
84
- "import": "./dist/prometheus-framework/src/modules/products/products.client.js",
85
- "require": "./dist/prometheus-framework/src/modules/products/products.client.cjs"
86
- },
87
- "./modules/products/server": {
88
- "import": "./dist/products.server.mjs",
89
- "require": "./dist/products.server.js"
90
- },
91
83
  "./modules/spots/client": {
92
84
  "import": "./dist/prometheus-framework/src/modules/spots/spots.client.js",
93
85
  "require": "./dist/prometheus-framework/src/modules/spots/spots.client.cjs"
@@ -96,6 +88,14 @@
96
88
  "import": "./dist/spots.server.mjs",
97
89
  "require": "./dist/spots.server.js"
98
90
  },
91
+ "./modules/products/client": {
92
+ "import": "./dist/prometheus-framework/src/modules/products/products.client.js",
93
+ "require": "./dist/prometheus-framework/src/modules/products/products.client.cjs"
94
+ },
95
+ "./modules/products/server": {
96
+ "import": "./dist/products.server.mjs",
97
+ "require": "./dist/products.server.js"
98
+ },
99
99
  "./modules/users/client": {
100
100
  "import": "./dist/prometheus-framework/src/modules/users/users.client.js",
101
101
  "require": "./dist/prometheus-framework/src/modules/users/users.client.cjs"
@@ -9,12 +9,14 @@
9
9
  mode="out-in"
10
10
  >
11
11
  <section
12
- v-if="MOBILE_APP && FirstUse"
12
+ v-if="MOBILE_APP && FirstUse"
13
13
  class="w-100"
14
14
  >
15
- <Walkthrough
16
- @updateFirstUse="updateFirstUse"
17
- :slides="[1,2,3]"
15
+ <component
16
+ :is="Walkthrough"
17
+ @updateFirstUse="updateFirstUse"
18
+ :slides="[1,2,3]"
19
+ class="tab"
18
20
  />
19
21
  </section>
20
22
  </transition>
@@ -112,7 +114,7 @@
112
114
 
113
115
 
114
116
  <script setup>
115
- import { computed, ref, onMounted, provide, inject, onUnmounted } from 'vue'
117
+ import { computed, ref, onMounted, provide, inject, onUnmounted, defineAsyncComponent } from 'vue'
116
118
  // Router
117
119
  import { useRoute, useRouter } from 'vue-router'
118
120
  // Store
@@ -135,9 +137,9 @@
135
137
  let Walkthrough;
136
138
 
137
139
  if (__MOBILE_APP__) {
138
- Walkthrough = () => defineAsyncComponent(() =>
139
- import('@pf/src/modules/globals/components/sections/Walkthrough.vue')
140
- );
140
+ Walkthrough = defineAsyncComponent(() =>
141
+ import('@pf/src/modules/globals/components/sections/Walkthrough.vue').then(_ => _.default)
142
+ );
141
143
  } else {
142
144
  Walkthrough = null;
143
145
  }
@@ -31,10 +31,10 @@
31
31
 
32
32
  </div>
33
33
 
34
- <WavesBackground
34
+ <!-- <WavesBackground
35
35
  :style="{ transform: tweenValues[0] ? `translateX(${tweenValues[0]}%)` : '' }"
36
36
  class="pos-fixed pos-t-0 pos-l-0 z-index-0"
37
- />
37
+ /> -->
38
38
  <!-- <ColorsBackground
39
39
  :style="{ transform: tweenValues[0] ? `translateX(${tweenValues[0]}%)` : '' }"
40
40
  class="pos-fixed pos-t-0 pos-l-0 z-index-0"
@@ -67,8 +67,8 @@
67
67
 
68
68
  import emblaCarouselVue from 'embla-carousel-vue'; // Assuming a Vue version exists
69
69
 
70
- import WavesBackground from '@/components/icons/backgrounds/WavesBackground.vue'
71
- import ColorsBackground from '@/components/icons/backgrounds/ColorsBackground.vue'
70
+ // import WavesBackground from '@/components/icons/backgrounds/WavesBackground.vue'
71
+ // import ColorsBackground from '@/components/icons/backgrounds/ColorsBackground.vue'
72
72
 
73
73
  const props = defineProps(['slides', 'options']);
74
74
  const emits = defineEmits(['updateFirstUse'])
@@ -1,13 +1,13 @@
1
- // Importing Localization
1
+ // Components
2
+ // import Client from "./components/layouts/Client.vue"
3
+
2
4
  import getBrowserLocale from './localization/methods/get-browser-locale.js';
3
5
  import VueI18n from './localization/vue-i18n.js';
4
- // Importing Vuex store modules
5
- import * as globalStore from './store/globals.js';
6
6
 
7
- // Since you didn't specify routes for the client, assuming there are none at this time
7
+ import * as globalStore from './store/globals.js';
8
8
 
9
- // Exporting localization methods, Vuex store
10
9
  export {
10
+ // Client,
11
11
  getBrowserLocale,
12
12
  VueI18n,
13
13
  globalStore
@@ -39,6 +39,33 @@
39
39
  <BlockTags
40
40
  @tags-changed="newTags => organization.state.current.profile.tags = newTags"
41
41
  :tags="organization.state.current.profile.tags"
42
+ class="mn-b-small"
43
+ />
44
+
45
+ <h3 class="mn-b-small">Contacts</h3>
46
+ <Field
47
+ v-model:field="organization.state.current.contacts.email"
48
+ label="Email"
49
+ placeholder=""
50
+ class="mn-b-thin bg-light pd-medium radius-small"
51
+ />
52
+ <Field
53
+ v-model:field="organization.state.current.contacts.website"
54
+ label="Website"
55
+ placeholder=""
56
+ class="mn-b-thin bg-light pd-medium radius-small"
57
+ />
58
+ <Field
59
+ v-model:field="organization.state.current.contacts.phone"
60
+ label="Phone"
61
+ placeholder=""
62
+ class="mn-b-thin bg-light pd-medium radius-small"
63
+ />
64
+ <Field
65
+ v-model:field="organization.state.current.contacts.address"
66
+ label="Address"
67
+ placeholder=""
68
+ class="mn-b-thin bg-light pd-medium radius-small"
42
69
  />
43
70
 
44
71
  <h3 class="mn-b-small">Socials</h3>
@@ -70,11 +97,12 @@
70
97
  />
71
98
  <Field
72
99
  v-model:field="organization.state.current.socials.youtube"
73
- label="Telegram"
100
+ label="Youtube"
74
101
  placeholder=""
75
102
  class="mn-b-thin bg-light pd-medium radius-small"
76
103
  />
77
104
 
105
+
78
106
  <Button :submit="onSubmit" :callback="redirectTo" class="bg-main w-100 mn-b-thin">Save</Button>
79
107
  <!-- <Button :submit="onDelete" :callback="redirectDash" class="mn-b-thin bg-fourth">Delete</Button> -->
80
108
 
@@ -56,7 +56,7 @@
56
56
  import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'
57
57
  import Dropdown from "@pf/src/components/Dropdown/Dropdown.vue";
58
58
 
59
- import Filters from '@pf/src/modules/marketplace/components/sections/Filters.vue'
59
+ // import Filters from '@pf/src/modules/marketplace/components/sections/Filters.vue'
60
60
 
61
61
 
62
62
  import * as globals from '@pf/src/modules/globals/store/globals';
@@ -155,7 +155,6 @@ import { useRoute, useRouter } from "vue-router";
155
155
  import Block from '@pf/src/components/Block/Block.vue';
156
156
  import UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';
157
157
 
158
-
159
158
  import Tab from "@pf/src/components/Tab/Tab.vue";
160
159
  import Field from "@pf/src/components/Field/Field.vue";
161
160
  import Select from "@pf/src/components/Select/Select.vue";
@@ -165,72 +164,28 @@ import LocationMarker from "@pf/src/components/LocationMarker/LocationMarker.vue
165
164
  import Button from "@pf/src/components/Button/Button.vue";
166
165
  import Popup from "@pf/src/components/Popup/Popup.vue";
167
166
 
168
- import EditArray from "@pf/src/modules/organizations/components/blocks/EditArray.vue";
169
- import SpotSub from "@pf/src/modules/spots/components/blocks/SpotSub.vue";
170
- import SpotMemberModify from "@pf/src/modules/spots/components/blocks/SpotMemberModify.vue";
171
- // import SpotSubSpotModify from "@pf/src/modules/spots/components/blocks/SpotSubSpotModify.vue";
172
- import User from '@pf/src/modules/users/components/blocks/CardUser.vue';
173
-
174
167
  import * as spots from "@pf/src/modules/spots/store/spots";
175
- import * as memberships from "@pf/src/modules/organizations/store/memberships";
176
168
 
177
169
  const router = useRouter();
178
170
  const route = useRoute();
179
171
  const tabOrganization = ref("details");
180
172
  const showAddNew = ref(false);
181
173
 
182
- onMounted(() => {
183
- // spots.state.spot.location = spots.state.spot.location
174
+ onMounted(async () => {
175
+ await fetchData();
184
176
  })
185
177
 
186
178
  async function fetchData() {
187
- if (route.params.spot) {
188
- await memberships.actions.read(route.params.spot);
189
- }
190
- const users = ref(memberships.state.memberships);
191
179
 
192
180
  if (route.params.spot) await spots.actions.readOne(route.params.spot);
193
181
 
194
- }
195
-
196
- await fetchData();
197
-
198
- // const [ lng, lat ] = spots.state.spot.location?.coordinates
199
-
200
- const lng = spots.state.spot.location?.coordinates[0]
201
- const lat = spots.state.spot.location?.coordinates[1]
202
-
203
- spots.state.spot.location = {
204
- lat: lat || 1,
205
- lng: lng || 1
206
- }
207
-
208
- const members = ref(spots.state.spot.members);
182
+ const lng = spots.state.spot.location?.coordinates[0]
183
+ const lat = spots.state.spot.location?.coordinates[1]
209
184
 
210
- const isOpenAddMemberPopup = ref(false);
211
- const selectedMember = ref(null);
212
-
213
- function openMemberPopup(member) {
214
- isOpenAddMemberPopup.value = true;
215
- if (typeof member === "number") selectedMember.value = member;
216
- }
217
-
218
- function closeMemberPopup() {
219
- isOpenAddMemberPopup.value = false;
220
- selectedMember.value = null;
221
- }
222
-
223
- const isOpenSpotPopup = ref(false);
224
- const selectedSpot = ref(null);
225
-
226
- function openSpotPopup(spot) {
227
- isOpenSpotPopup.value = true;
228
- if (typeof spot === "number") selectedSpot.value = spot;
229
- }
230
-
231
- function closeSpotPopup() {
232
- isOpenSpotPopup.value = false;
233
- selectedSpot.value = null;
185
+ spots.state.spot.location = {
186
+ lat: lat || 1,
187
+ lng: lng || 1
188
+ }
234
189
  }
235
190
 
236
191
  async function onSubmit() {
@@ -1,12 +1,12 @@
1
- module.exports = (mongoose) => {
1
+ module.exports = (db) => {
2
2
  // Схема отдела
3
- const spotSchema = new mongoose.Schema({
3
+ const spotSchema = new db.mongoose.Schema({
4
4
  owner: {
5
- type: mongoose.Schema.Types.ObjectId,
5
+ type: db.mongoose.Schema.Types.ObjectId,
6
6
  ref: 'User',
7
7
  },
8
8
  organization: {
9
- type: mongoose.Schema.Types.ObjectId,
9
+ type: db.mongoose.Schema.Types.ObjectId,
10
10
  ref: 'Organization',
11
11
  },
12
12
  profile: {
@@ -47,7 +47,7 @@ module.exports = (mongoose) => {
47
47
  members: [
48
48
  {
49
49
  user: {
50
- type: mongoose.Schema.Types.ObjectId,
50
+ type: db.mongoose.Schema.Types.ObjectId,
51
51
  ref: 'User',
52
52
  },
53
53
  position: {
@@ -58,7 +58,7 @@ module.exports = (mongoose) => {
58
58
  ],
59
59
  subspots: [
60
60
  {
61
- type: mongoose.Schema.Types.ObjectId,
61
+ type: db.mongoose.Schema.Types.ObjectId,
62
62
  ref: 'Spot',
63
63
  },
64
64
  ],
@@ -69,7 +69,7 @@ module.exports = (mongoose) => {
69
69
  spotSchema.index({ location: '2dsphere' });
70
70
 
71
71
 
72
- const Spot = mongoose.model('Spot', spotSchema);
72
+ const Spot = db.mongoose.model('Spot', spotSchema);
73
73
 
74
74
  return Spot
75
75
  }
@@ -3,70 +3,74 @@ import layoutSpots from '../components/layouts/Spots.vue'
3
3
 
4
4
  import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
5
5
 
6
- const spots = [
7
- {
8
- path: 'spots',
9
- component: layoutEmpty,
10
- meta: {
11
- title: {
12
- en: 'Spots',
13
- ru: 'Места'
6
+ const spots = {
7
+ path: 'spots',
8
+ component: layoutEmpty,
9
+ meta: {
10
+ title: {
11
+ en: 'Spots',
12
+ ru: 'Места'
13
+ },
14
+ },
15
+ children: [
16
+ {
17
+ path: ':country?',
18
+ component: layoutSpots,
19
+ meta: {
20
+ title: {
21
+ en: 'Spots',
22
+ ru: 'Места'
23
+ },
24
+ header_theme: 'dark',
25
+ footer_theme: 'dark'
14
26
  },
15
- header_theme: 'dark',
16
- footer_theme: 'dark'
27
+ children: [
28
+ {
29
+ path: ':state?',
30
+ name: 'Spots tate',
31
+ component: () => import(/* webpackChunkName: 'Deliveries' */ '../components/pages/Map.vue'),
32
+ children: [
33
+ {
34
+ path: ':city?',
35
+ name: 'Spots City',
36
+ component: () => import(/* webpackChunkName: 'Deliveries' */ '../components/pages/Map.vue'),
37
+ }
38
+ ]
39
+ }
40
+ ]
17
41
  },
18
- children: [
19
- {
20
- path: ':country?',
21
- component: layoutSpots,
22
- children: [
23
- {
24
- path: ':state?',
25
- name: 'Spots tate',
26
- component: () => import(/* webpackChunkName: 'Deliveries' */ '../components/pages/Map.vue'),
27
- children: [
28
- {
29
- path: ':city?',
30
- name: 'Spots City',
31
- component: () => import(/* webpackChunkName: 'Deliveries' */ '../components/pages/Map.vue'),
32
- }
33
- ]
34
- }
35
- ]
42
+ {
43
+ path: ':_id/spots/create',
44
+ name: 'Spot Creation',
45
+ meta: {
46
+ title: 'Создание точки',
36
47
  },
37
- {
38
- path: ':_id/spots/create',
39
- name: 'Spot Creation',
40
- meta: {
41
- title: 'Создание отдела',
42
- },
43
- beforeEnter: [
44
- validationAuth.requiresAuth,
45
- ],
46
- component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
47
- }, {
48
- path: ':_id/spots/:deparment',
49
- name: 'Spot',
50
- meta: {
51
- title: 'Отдел',
52
- },
53
- beforeEnter: [
54
- validationAuth.requiresAuth,
55
- ],
56
- component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/Spot.vue'),
57
- }, {
58
- path: ':_id/spots/:spot/edit',
59
- name: 'Spot Edit',
60
- meta: {
61
- title: 'Редактирование отдела',
62
- },
63
- beforeEnter: [
64
- validationAuth.requiresAuth,
65
- ],
66
- component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
48
+ beforeEnter: [
49
+ validationAuth.requiresAuth,
50
+ ],
51
+ component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
52
+ }, {
53
+ path: ':_id/spots/:deparment',
54
+ name: 'Spot',
55
+ meta: {
56
+ title: 'Точка',
57
+ },
58
+ beforeEnter: [
59
+ validationAuth.requiresAuth,
60
+ ],
61
+ component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/Spot.vue'),
62
+ }, {
63
+ path: ':_id/spots/:spot/edit',
64
+ name: 'Spot Edit',
65
+ meta: {
66
+ title: 'Редактирование точки',
67
67
  },
68
- ]
69
- }
70
- ];
68
+ beforeEnter: [
69
+ validationAuth.requiresAuth,
70
+ ],
71
+ component: () => import(/* webpackChunkName: "spot" */ '@pf/src/modules/spots/components/pages/SpotEdit.vue'),
72
+ },
73
+ ]
74
+ }
71
75
 
72
76
  export default spots;
@@ -0,0 +1,43 @@
1
+ // Store
2
+ import * as storeSpots from './store/spots.js';
3
+ // Router
4
+ import routerSpots from './router/spots.js';
5
+ // Views
6
+ import Spots from './components/layouts/Spots.vue';
7
+ import Spot from './components/pages/Spot.vue';
8
+ import SpotEdit from './components/pages/SpotEdit.vue';
9
+ import Map from './components/pages/Map.vue';
10
+ // Importing blocks components
11
+ import CardSpot from './components/blocks/CardSpot.vue';
12
+ import SpotMemberModify from './components/blocks/SpotMemberModify.vue';
13
+ import SpotSub from './components/blocks/SpotSub.vue';
14
+
15
+ function initializeSpots(app, store, router) {
16
+ router.addRoute('Home', routerSpots);
17
+ store.addStore('spots', storeSpots);
18
+ }
19
+
20
+ const ModuleSpot = {
21
+ initialize: initializeSpots,
22
+ views: {
23
+ store: {
24
+ storeSpots
25
+ },
26
+ router: {
27
+ routerSpots
28
+ },
29
+ components: {
30
+ // Pages
31
+ Spots,
32
+ Spot,
33
+ SpotEdit,
34
+ Map,
35
+ // Blocks
36
+ CardSpot,
37
+ SpotMemberModify,
38
+ SpotSub,
39
+ }
40
+ }
41
+ }
42
+
43
+ export default ModuleSpot;
@@ -0,0 +1,31 @@
1
+ const ModelSpot = require('./models/spot.model.js');
2
+
3
+ const RoutesSpot = require('./routes/spots.routes.js');
4
+
5
+ const FactorySpot = require('./controllers/spots.controller.js');
6
+
7
+ const CRUD = require('@pf/src/modules/globals/services/globals.crud');
8
+
9
+ function initializeSpots(app, db, origins, publicPath) {
10
+ // Setup models in the database object
11
+ db.spot = ModelSpot(db);
12
+
13
+ // Setup routes if the app object is provided
14
+ if (app) {
15
+ RoutesSpot(app, db, origins, publicPath);
16
+ }
17
+ }
18
+
19
+ // Exporting controllers, routes, and models
20
+ module.exports = {
21
+ initialize: initializeSpots,
22
+ models: {
23
+ ModelSpot,
24
+ },
25
+ routes: {
26
+ RoutesSpot,
27
+ },
28
+ controllers: {
29
+ FactorySpot
30
+ }
31
+ };
@@ -1,113 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="br-grey-transp-25 radius-small mn-b-small">
4
- <Select
5
- :options="[
6
- {name: 'Кафе', value: 'cafe'},
7
- {name: 'Бар', value: 'bar'},
8
- {name: 'Ресторан', value: 'restaraunt'},
9
- {name: 'Пиццерия', value: 'pizzeria'},
10
- {name: 'Ночной клуб', value: 'night-club'},
11
- {name: 'Шаверма', value: 'shaverma'},
12
- {name: 'Кофейня', value: 'coffee'}
13
- ]"
14
- :prop="placeForm"
15
- content="type"
16
- label="Тип"
17
- placeholder="Тип заведения"
18
- size="small"
19
- />
20
-
21
- <Field
22
- v-model:field="placeForm.name"
23
- label="Название"
24
- :validation="placeValidation"
25
- placeholder="Введите название места"
26
- />
27
-
28
- <Field
29
- v-model:field="placeForm.address"
30
- label="Адрес"
31
- :validation="placeValidation"
32
- placeholder="Введите адрес места"
33
- />
34
-
35
- <Field
36
- v-model:field="placeForm.phone"
37
- label="Телефон"
38
- :validation="placeValidation"
39
- placeholder="Введите телефон места"
40
- />
41
- </div>
42
-
43
- <button @click="submitForm" class="w-100 button bg-second t-white">
44
- {{ props.place !== null ? "Редактировать заведение" : "Добавить заведение" }}
45
- </button>
46
- </div>
47
- </template>
48
- <script setup>
49
- import { ref } from 'vue';
50
- import Field from '@pf/src/components/Field/Field.vue';
51
- import Select from '@pf/src/components/Select/Select.vue';
52
- import * as inputsValidation from '@pf/src/modules/validations/client/inputs.validation';
53
-
54
- const props = defineProps({
55
- isPopupOpen: Boolean,
56
- place: Number,
57
- places: Array,
58
- });
59
-
60
- const emits = defineEmits(['callback']);
61
-
62
- const placeForm = ref({
63
- logo: '',
64
- name: '',
65
- address: '',
66
- });
67
-
68
- const placeValidation = ref(null);
69
-
70
- if (props.place !== null) {
71
- placeForm.value = props.places[props.place];
72
- }
73
-
74
- async function submitForm() {
75
- try {
76
- await inputsValidation.validateInputs(
77
- placeValidation,
78
- inputsValidation.validateLength,
79
- placeForm.value.name,
80
- 'Некорректное название'
81
- );
82
- } catch (error) {
83
- throw new Error();
84
- }
85
-
86
- if (props.place !== null) {
87
- props.places[props.place] = placeForm.value;
88
- emits('callback');
89
- } else {
90
- props.places.push(placeForm.value);
91
- emits('callback');
92
- }
93
- }
94
- </script>
95
-
96
-
97
- <style scoped>
98
- .form-group {
99
- margin-bottom: 1rem;
100
- }
101
-
102
- label {
103
- display: block;
104
- margin-bottom: 0.5rem;
105
- }
106
-
107
- input {
108
- width: 100%;
109
- padding: 0.5rem;
110
- border: 1px solid #ccc;
111
- border-radius: 5px;
112
- }
113
- </style>