@ozdao/prometheus-framework 0.0.97 → 0.0.99
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Feed-0dbe15b9.js +1 -0
- package/dist/Feed-4df9352b.js +1 -0
- package/dist/Feed-5ecd756e.js +1 -0
- package/dist/Feed-6fd26cb4.mjs +367 -0
- package/dist/Feed-e9bddb71.mjs +439 -0
- package/dist/Feed-fb4f7ee6.mjs +368 -0
- package/dist/Image-3fee8409.mjs +477 -0
- package/dist/Image-d5c4d8d9.js +9 -0
- package/dist/Product-89ca1bff.js +7 -0
- package/dist/Product-943b64bb.mjs +838 -0
- package/dist/Product-abf86516.js +7 -0
- package/dist/Product-e825edfc.mjs +838 -0
- package/dist/ProductEdit-590b7a01.js +1 -0
- package/dist/ProductEdit-ba3fef8c.mjs +350 -0
- package/dist/ProductEdit-c08ee26f.mjs +350 -0
- package/dist/ProductEdit-e71dbe52.js +1 -0
- package/dist/ProfileBlogposts-5c0f3b58.js +1 -0
- package/dist/ProfileBlogposts-5c6ab74a.mjs +64 -0
- package/dist/ProfileComments-12b51ae3.js +1 -0
- package/dist/ProfileComments-d6779ee2.mjs +44 -0
- package/dist/ProfileEvents-11dc4034.mjs +56 -0
- package/dist/ProfileEvents-af2536a3.js +1 -0
- package/dist/ProfileEvents-c9aa3d41.mjs +56 -0
- package/dist/ProfileEvents-d0c5e3dc.js +1 -0
- package/dist/ProfileLikes-05911934.mjs +44 -0
- package/dist/ProfileLikes-c068c6c6.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +3 -3
- package/dist/events.client.cjs +2 -1
- package/dist/events.client.js +8646 -408
- package/dist/events.server.js +2 -2
- package/dist/events.server.mjs +2 -2
- package/dist/main.css +1 -1
- package/dist/organizations.client-2e452fee.js +3 -0
- package/dist/organizations.client-48568171.mjs +3017 -0
- package/dist/organizations.client-7e51b4a8.js +3 -0
- package/dist/organizations.client-bf73e73d.mjs +3017 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +3 -3
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +147 -157
- package/package.json +2 -1
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -2
- package/src/modules/events/components/blocks/CardEvent.vue +6 -2
- package/src/modules/events/components/pages/EditEvent.vue +50 -32
- package/src/modules/events/controllers/events.controller.js +1 -1
- package/src/modules/events/routes/events.routes.js +1 -1
- package/src/modules/events/store/events.js +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +3 -3
- package/src/styles/layout.scss +0 -1
@@ -3,6 +3,7 @@
|
|
3
3
|
:class="{
|
4
4
|
'flex-nowrap flex-v-center flex': type === 'short'
|
5
5
|
}"
|
6
|
+
class="pos-relative"
|
6
7
|
>
|
7
8
|
<CardHeader
|
8
9
|
:class="{
|
@@ -21,7 +22,7 @@
|
|
21
22
|
|
22
23
|
<div
|
23
24
|
v-if="event.cover && type !== 'short'"
|
24
|
-
class="o-hidden bg-grey mn-small w-100"
|
25
|
+
class="o-hidden pos-relative bg-grey mn-small w-100"
|
25
26
|
>
|
26
27
|
<img
|
27
28
|
:src="(FILE_SERVER_URL || '') + event.cover"
|
@@ -41,7 +42,7 @@
|
|
41
42
|
</div>
|
42
43
|
|
43
44
|
<section
|
44
|
-
class="w-100"
|
45
|
+
class="pos-relative w-100"
|
45
46
|
:class="{'pd-t-zero pd-medium': type !== 'short'}"
|
46
47
|
>
|
47
48
|
|
@@ -196,6 +197,9 @@
|
|
196
197
|
|
197
198
|
// Computed property for time range
|
198
199
|
const formattedTimeRange = computed(() => {
|
200
|
+
|
201
|
+
console.log(props.event.date.start)
|
202
|
+
console.log(props.event.date.end)
|
199
203
|
const start = new Date(props.event.date.start);
|
200
204
|
const end = new Date(props.event.date.end);
|
201
205
|
|
@@ -22,22 +22,8 @@
|
|
22
22
|
/>
|
23
23
|
|
24
24
|
<h3 class="mn-small">Date</h3>
|
25
|
-
|
26
|
-
<Field
|
27
|
-
v-model:field="event.date.start"
|
28
|
-
label="Start"
|
29
|
-
type="datetime-local"
|
30
|
-
placeholder="Not specified"
|
31
|
-
class="mn-thin w-100 bg-grey pd-medium radius-small"
|
32
|
-
/>
|
25
|
+
<VueDatePicker v-model="date" range />
|
33
26
|
|
34
|
-
<Field
|
35
|
-
v-model:field="event.date.end"
|
36
|
-
label="End"
|
37
|
-
type="datetime-local"
|
38
|
-
placeholder="Not specified"
|
39
|
-
class="mn-thin w-100 bg-grey pd-medium radius-small"
|
40
|
-
/>
|
41
27
|
|
42
28
|
<h3 class="mn-small">Description</h3>
|
43
29
|
<section v-if="event" class="pd-b-extra w-100 bg-grey pd-big radius-big">
|
@@ -99,6 +85,9 @@
|
|
99
85
|
import Textarea from '@pf/src/modules/constructor/components/elements/Textarea.vue';
|
100
86
|
import Constructor from '@pf/src/modules/constructor/components/sections/Constructor.vue';
|
101
87
|
|
88
|
+
import VueDatePicker from '@vuepic/vue-datepicker';
|
89
|
+
import '@vuepic/vue-datepicker/dist/main.css'
|
90
|
+
|
102
91
|
import Popup from '@pf/src/components/Popup/Popup.vue';
|
103
92
|
import Field from '@pf/src/components/Field/Field.vue'
|
104
93
|
import BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';
|
@@ -123,18 +112,28 @@ let publics = ref(null);
|
|
123
112
|
const selectedTags = ref([]);
|
124
113
|
const selectedOrganization = ref(null);
|
125
114
|
|
115
|
+
|
116
|
+
const date = ref();
|
117
|
+
|
118
|
+
|
126
119
|
onMounted(async () =>{
|
127
120
|
|
128
121
|
if (route.params.url) {
|
129
122
|
const data = await events.read({ user: auth.state.user._id, url: route.params.url });
|
130
123
|
event.value = data.pop();
|
131
124
|
|
132
|
-
|
133
|
-
|
125
|
+
const startDate = event.value.date.start;
|
126
|
+
const endDate = event.value.date.end;
|
127
|
+
|
128
|
+
date.value = [startDate, endDate];
|
134
129
|
|
135
130
|
} else {
|
136
131
|
events.clean();
|
137
132
|
event.value = events.state.current;
|
133
|
+
|
134
|
+
const startDate = new Date();
|
135
|
+
const endDate = new Date();
|
136
|
+
date.value = [startDate, endDate];
|
138
137
|
}
|
139
138
|
|
140
139
|
if (!event.value.owner) event.value.owner = {
|
@@ -181,6 +180,11 @@ function onDrafts() {
|
|
181
180
|
if (selectedTags.value.length > 0) selectedTags.value.map(tag => (tag.text))
|
182
181
|
|
183
182
|
event.value.status = "draft"
|
183
|
+
|
184
|
+
event.value.date = {
|
185
|
+
start: date.value.startDate,
|
186
|
+
end: date.value.endDate
|
187
|
+
}
|
184
188
|
|
185
189
|
if (route.params.url) {
|
186
190
|
events.update(event.value)
|
@@ -201,18 +205,6 @@ function onDrafts() {
|
|
201
205
|
}
|
202
206
|
}
|
203
207
|
|
204
|
-
function onDelete() {
|
205
|
-
if (confirm('Are you sure you want to delete this event?')) {
|
206
|
-
events.delete(event.value._id)
|
207
|
-
.then(response => {
|
208
|
-
router.push({ name: 'Drafts' });
|
209
|
-
})
|
210
|
-
.catch(error => {
|
211
|
-
console.error(error);
|
212
|
-
})
|
213
|
-
}
|
214
|
-
}
|
215
|
-
|
216
208
|
function onSubmit() {
|
217
209
|
|
218
210
|
if (selectedOrganization.value) event.value.owner = {
|
@@ -225,11 +217,16 @@ function onSubmit() {
|
|
225
217
|
|
226
218
|
event.value.status = "published"
|
227
219
|
|
228
|
-
|
220
|
+
event.value.date = {
|
221
|
+
start: date.value[0],
|
222
|
+
end: date.value[1]
|
223
|
+
}
|
224
|
+
|
225
|
+
console.log(date.value)
|
229
226
|
if (route.params.url) {
|
230
227
|
events.update(event.value)
|
231
228
|
.then(response => {
|
232
|
-
router.push({ name: '
|
229
|
+
router.push({ name: 'Event', params: { url: response.url } });
|
233
230
|
})
|
234
231
|
.catch(error => {
|
235
232
|
console.log(error);
|
@@ -244,4 +241,25 @@ function onSubmit() {
|
|
244
241
|
});
|
245
242
|
}
|
246
243
|
}
|
247
|
-
|
244
|
+
|
245
|
+
function onDelete() {
|
246
|
+
if (confirm('Are you sure you want to delete this event?')) {
|
247
|
+
events.remove(event.value._id)
|
248
|
+
.then(response => {
|
249
|
+
router.push({ name: 'User Events', params: { _id: event.value.creator.target._id } });
|
250
|
+
})
|
251
|
+
.catch(error => {
|
252
|
+
console.error(error);
|
253
|
+
})
|
254
|
+
}
|
255
|
+
}
|
256
|
+
</script>
|
257
|
+
|
258
|
+
<style lang="scss">
|
259
|
+
.dp__input {
|
260
|
+
border: 0;
|
261
|
+
padding: var(--medium);
|
262
|
+
padding-left: 3rem;
|
263
|
+
background: rgb(var(--grey))
|
264
|
+
}
|
265
|
+
</style>
|
@@ -307,7 +307,7 @@ const middlewareFactory = (db) => {
|
|
307
307
|
|
308
308
|
const deleteMethod = async (req, res) => {
|
309
309
|
try {
|
310
|
-
const event = await Event.findOneAndDelete({
|
310
|
+
const event = await Event.findOneAndDelete({ _id: req.body._id }).exec();
|
311
311
|
if (!event) {
|
312
312
|
return res.status(404).send({ message: "Event is not deleted." });
|
313
313
|
}
|
@@ -141,7 +141,7 @@ async function update(eventData) {
|
|
141
141
|
}
|
142
142
|
|
143
143
|
async function remove(_id) {
|
144
|
-
return await $axios.
|
144
|
+
return await $axios.post(`/api/events/delete`, {_id: _id}).then(
|
145
145
|
response => {
|
146
146
|
const index = state.all.findIndex(p => p._id === _id);
|
147
147
|
if (index !== -1) {
|
@@ -44,12 +44,12 @@
|
|
44
44
|
v-model:field="user.profile.description"
|
45
45
|
label="Description"
|
46
46
|
placeholder="Not specified"
|
47
|
-
class="mn-
|
47
|
+
class="mn-semi bg-grey pd-medium radius-small"
|
48
48
|
disabled="true"
|
49
49
|
:validation="organizationName"
|
50
50
|
/>
|
51
51
|
|
52
|
-
<p class="mn-thin">Select your birthday if you want to receive your birthday gift.</p>
|
52
|
+
<!-- <p class="mn-thin">Select your birthday if you want to receive your birthday gift.</p>
|
53
53
|
|
54
54
|
<Field
|
55
55
|
v-model:field="user.birthday"
|
@@ -58,7 +58,7 @@
|
|
58
58
|
placeholder="Not specified"
|
59
59
|
class="mn-semi bg-grey pd-medium radius-small"
|
60
60
|
:validation="organizationName"
|
61
|
-
/>
|
61
|
+
/> -->
|
62
62
|
<h3 class="mn-small">Socials</h3>
|
63
63
|
<p class="mn-thin">Please provide only the username for social media profiles, without full links.</p>
|
64
64
|
|