@ozdao/prometheus-framework 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs +1945 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js +1 -0
- package/dist/ButtonFollow-23c4d9fc.mjs +132 -0
- package/dist/ButtonFollow-bf5e6d42.js +1 -0
- package/dist/CardOrganization-63dcc83b.js +1 -0
- package/dist/CardOrganization-e530c9d5.mjs +230 -0
- package/dist/Chips-3dac276c.js +1 -0
- package/dist/Feed-4d9001aa.mjs +368 -0
- package/dist/Feed-51eef23f.js +1 -0
- package/dist/Feed-d78d4b91.mjs +439 -0
- package/dist/Feed-f4e9769e.js +1 -0
- package/dist/Gallery-1f82841a.mjs +357 -0
- package/dist/Gallery-dd29c7f6.js +1 -0
- package/dist/Image-a2c2ab9c.js +9 -0
- package/dist/Image-ad6d4f0f.mjs +477 -0
- package/dist/Popup-383abb2e.js +1 -0
- package/dist/Popup-f7a5e86b.mjs +76 -0
- package/dist/Product-b32fb0e1.js +7 -0
- package/dist/Product-d01e3a0d.mjs +839 -0
- package/dist/ProductEdit-2b4d1d88.js +1 -0
- package/dist/ProductEdit-5e479343.mjs +300 -0
- package/dist/ProfileBlogposts-070cb7e9.mjs +65 -0
- package/dist/ProfileBlogposts-b6bf0c42.js +1 -0
- package/dist/ProfileComments-8a0c489c.mjs +44 -0
- package/dist/ProfileComments-f0000ea6.js +1 -0
- package/dist/ProfileEvents-8b88287a.js +1 -0
- package/dist/ProfileEvents-d978617d.mjs +57 -0
- package/dist/ProfileLikes-d5f9f058.js +1 -0
- package/dist/ProfileLikes-f5ad4497.mjs +44 -0
- package/dist/ProfileOrganizations-422d1fa5.js +1 -0
- package/dist/ProfileOrganizations-6b1bc5b2.mjs +213 -0
- package/dist/Publics-640d32fc.mjs +123 -0
- package/dist/Publics-8595ab7e.js +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Tab-dcd62005.js +1 -0
- package/dist/UploadImage-dfb36cdb.js +1 -0
- package/dist/UploadImage-e4418b43.mjs +83 -0
- package/dist/UploadImageMultiple-c9a7b54f.js +1 -0
- package/dist/UploadImageMultiple-d2d48f39.mjs +58 -0
- package/dist/auth-45a454f2.js +7 -0
- package/dist/auth-5cd34aae.mjs +905 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +16 -15
- package/dist/auth.validation-4b016fa5.js +1 -0
- package/dist/auth.validation-a52304cf.mjs +20 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +69 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +23 -22
- package/dist/components/EditImages/EditImages.vue.d.ts +7 -0
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +17 -16
- package/dist/files.server.js +149 -112
- package/dist/files.server.mjs +149 -112
- package/dist/gallery.server.js +127 -0
- package/dist/gallery.server.mjs +128 -0
- package/dist/index-2059e444.js +2 -0
- package/dist/index-4e469a71.mjs +941 -0
- package/dist/landing.client.cjs +1 -1
- package/dist/modules/gallery/components/sections/Gallery.vue.d.ts +2 -0
- package/dist/modules/icons/navigation/IconChevronRight.vue.d.ts +13 -1
- package/dist/modules/mobile/components/Menu/MenuItem.vue.d.ts +14 -2
- package/dist/organizations-81e762e7.mjs +122 -0
- package/dist/organizations-cf1ab766.js +1 -0
- package/dist/organizations.client-b692a78a.mjs +3018 -0
- package/dist/organizations.client-bdc9b044.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +44 -43
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +224 -184
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +10 -1
- package/src/components/EditImages/EditImages.vue +55 -0
- package/src/configurator/components/layouts/layoutConfigurator.vue +0 -40
- package/src/modules/backoffice/backoffice.client.js +15 -0
- package/src/modules/backoffice/components/layouts/Account.vue +48 -58
- package/src/modules/backoffice/router/backoffice.js +20 -0
- package/src/modules/files/controllers/files.controller.js +27 -131
- package/src/modules/files/middlewares/server/index.js +10 -0
- package/src/modules/files/middlewares/server/md.js +151 -0
- package/src/modules/files/middlewares/server/middlewareMulter.js +121 -0
- package/src/modules/files/routes/files.routes.js +20 -6
- package/src/modules/gallery/components/sections/Gallery.vue +414 -0
- package/src/modules/gallery/controllers/gallery.controller.js +87 -73
- package/src/modules/gallery/gallery.client.js +17 -0
- package/src/modules/gallery/gallery.server.js +13 -0
- package/src/modules/gallery/models/photo.model.js +20 -14
- package/src/modules/gallery/routes/gallery.routes.js +18 -9
- package/src/modules/gallery/store/gallery.js +25 -19
- package/src/modules/icons/navigation/IconChevronRight.vue +14 -2
- package/src/modules/mobile/components/Menu/Menu.vue +1 -1
- package/src/modules/mobile/components/Menu/MenuItem.vue +8 -2
- package/src/modules/users/components/pages/Profile.vue +22 -1
- package/src/modules/backoffice/components/pages/Profile.vue +0 -109
- package/src/modules/backoffice/components/pages/profile/ProfileEdit.vue +0 -132
@@ -1,14 +1,23 @@
|
|
1
|
-
|
1
|
+
// Factories
|
2
|
+
const controllerFactory = require("../controllers/gallery.controller");
|
3
|
+
// Middlewares
|
4
|
+
const middlewareFactoryGlobal = require('@pf/src/modules/middlewares/server');
|
2
5
|
|
3
|
-
|
6
|
+
module.exports = function(app, db, origins) {
|
7
|
+
const controller = controllerFactory(db);
|
8
|
+
|
9
|
+
const { authJwt } = middlewareFactoryGlobal(db);
|
4
10
|
|
5
|
-
module.exports = function(app) {
|
6
11
|
app.use(function(req, res, next) {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
+
|
13
|
+
const origin = req.headers.origin;
|
14
|
+
|
15
|
+
if (origins.includes(origin)) {
|
16
|
+
res.setHeader('Access-Control-Allow-Origin', origin);
|
17
|
+
}
|
18
|
+
|
19
|
+
res.header("Access-Control-Allow-Headers", "x-access-token, Origin, Content-Type, Accept");
|
20
|
+
|
12
21
|
next();
|
13
22
|
});
|
14
23
|
|
@@ -29,7 +38,7 @@ module.exports = function(app) {
|
|
29
38
|
controller.update
|
30
39
|
);
|
31
40
|
|
32
|
-
app.
|
41
|
+
app.post(
|
33
42
|
"/api/gallery/delete/:_id",
|
34
43
|
[authJwt.verifyToken],
|
35
44
|
controller.delete
|
@@ -2,7 +2,9 @@
|
|
2
2
|
import axios from 'axios';
|
3
3
|
import { reactive } from "vue";
|
4
4
|
|
5
|
-
const
|
5
|
+
const clientUrl = process.env.API_URL;
|
6
|
+
|
7
|
+
const $axios = axios.create({baseURL: clientUrl, withCredentials: true})
|
6
8
|
|
7
9
|
// State
|
8
10
|
const state = reactive({
|
@@ -10,29 +12,32 @@ const state = reactive({
|
|
10
12
|
});
|
11
13
|
|
12
14
|
const actions = {
|
13
|
-
async fetchGallery
|
15
|
+
async fetchGallery(page, limit) {
|
16
|
+
const params = [];
|
17
|
+
if (page) params.push(`page=${page}`);
|
18
|
+
if (limit) params.push(`limit=${limit}`);
|
19
|
+
const url = `/api/gallery${params.length ? `?${params.join('&')}` : ''}`;
|
20
|
+
|
14
21
|
try {
|
15
|
-
const response = await axios.get(
|
16
|
-
|
22
|
+
const response = await $axios.get(url);
|
23
|
+
|
24
|
+
console.log(response)
|
25
|
+
|
26
|
+
if (response && response.data) {
|
27
|
+
state.gallery = [...state.gallery, ...response.data];
|
28
|
+
return response.data; // Optionally return the fetched data
|
29
|
+
}
|
17
30
|
} catch (error) {
|
18
|
-
console.error(error);
|
31
|
+
console.error('Error fetching gallery:', error);
|
32
|
+
throw error; // Re-throwing the error allows the caller to handle it, if needed
|
19
33
|
}
|
20
34
|
},
|
21
35
|
|
22
|
-
async createPhoto
|
36
|
+
async createPhoto(photos) {
|
23
37
|
try {
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
formData.append('size', JSON.stringify(photo.size));
|
28
|
-
|
29
|
-
const response = await $axios.post('/api/gallery/create', formData, {
|
30
|
-
headers: {
|
31
|
-
'Content-Type': 'multipart/form-data'
|
32
|
-
}
|
33
|
-
});
|
34
|
-
|
35
|
-
state.gallery.push(response.data);
|
38
|
+
const response = await $axios.post('/api/gallery/create', photos)
|
39
|
+
console.log(response.data)
|
40
|
+
state.gallery = [...response.data, ...state.gallery];
|
36
41
|
} catch (error) {
|
37
42
|
console.error(error);
|
38
43
|
}
|
@@ -57,7 +62,8 @@ const actions = {
|
|
57
62
|
|
58
63
|
async deletePhoto (photoId) {
|
59
64
|
try {
|
60
|
-
|
65
|
+
|
66
|
+
const response = await $axios.post(`/api/gallery/delete/${photoId}`);
|
61
67
|
const index = state.gallery.findIndex(p => p._id === photoId);
|
62
68
|
if (index !== -1) {
|
63
69
|
state.gallery.splice(index, 1);
|
@@ -1,5 +1,17 @@
|
|
1
1
|
<template>
|
2
2
|
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
|
-
<path fill="
|
3
|
+
<path :fill="theme" d="M16.25 9.375L20 5.9375C21.5625 4.53125 23.9062 4.6875 25.3125 6.25L54.2188 37.8125C55.3125 39.0625 55.3125 40.9375 54.2188 42.1875L25.3125 73.75C23.9062 75.3125 21.5625 75.4688 20 74.0625L16.25 70.625C14.6875 69.375 14.5312 66.875 15.9375 65.4688L39.375 40L15.9375 14.5312C14.5312 13.125 14.6875 10.625 16.25 9.375Z"/>
|
4
4
|
</svg>
|
5
|
-
</template>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
|
8
|
+
<script>
|
9
|
+
export default {
|
10
|
+
props: {
|
11
|
+
theme: {
|
12
|
+
type: String,
|
13
|
+
default: 'black'
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
</script>
|
@@ -3,7 +3,13 @@
|
|
3
3
|
import IconChevronRight from '@pf/src/modules/icons/navigation/IconChevronRight.vue'; // Importing the IconChevronRight component
|
4
4
|
|
5
5
|
export default defineComponent({
|
6
|
-
|
6
|
+
props: {
|
7
|
+
theme: {
|
8
|
+
type: String,
|
9
|
+
default: 'black' // Значение по умолчанию
|
10
|
+
}
|
11
|
+
},
|
12
|
+
setup(props, { slots }) {
|
7
13
|
return () => {
|
8
14
|
const defaultSlotContent = slots.default ? slots.default() : [];
|
9
15
|
|
@@ -59,7 +65,7 @@
|
|
59
65
|
)
|
60
66
|
]
|
61
67
|
),
|
62
|
-
h(IconChevronRight, { class: "i-medium mn-r-medium", type: "chevron" })
|
68
|
+
h(IconChevronRight, { class: "i-medium mn-r-medium", type: "chevron", theme: props.theme })
|
63
69
|
]
|
64
70
|
);
|
65
71
|
};
|
@@ -108,8 +108,28 @@
|
|
108
108
|
/>
|
109
109
|
|
110
110
|
</section>
|
111
|
+
|
112
|
+
<Menu
|
113
|
+
v-if="(auth.state.user._id === route.params._id) && (auth.state.access.roles.includes('ROLE_MODERATOR') || auth.state.access.roles.includes('ROLE_ADMIN'))"
|
114
|
+
class="bg-black t-white"
|
115
|
+
>
|
116
|
+
<MenuItem
|
117
|
+
@click="router.push({
|
118
|
+
name: 'Backoffice',
|
119
|
+
params: {
|
120
|
+
_id: route.params._id
|
121
|
+
}
|
122
|
+
})"
|
123
|
+
class="cursor-pointer"
|
124
|
+
theme="white"
|
125
|
+
>
|
126
|
+
<span>
|
127
|
+
Backoffice
|
128
|
+
</span>
|
129
|
+
</MenuItem>
|
130
|
+
</Menu>
|
111
131
|
|
112
|
-
<Menu>
|
132
|
+
<Menu class="bg-grey">
|
113
133
|
<MenuItem @click="router.push({name: 'User Events', params: {_id: route.params._id}})" class="cursor-pointer">
|
114
134
|
<IconEvents class="i-semi" :icon="true"/>
|
115
135
|
<span>Events</span>
|
@@ -135,6 +155,7 @@
|
|
135
155
|
|
136
156
|
<Menu
|
137
157
|
v-if="auth.state.user._id === route.params._id"
|
158
|
+
class="bg-grey"
|
138
159
|
>
|
139
160
|
<MenuItem
|
140
161
|
@click="router.push({
|
@@ -1,109 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="for-transition w-100">
|
3
|
-
<div id="dash" class="w-100">
|
4
|
-
<!--
|
5
|
-
<section class="w-100 mn-big radius-medium pd-medium bg-second t-white">
|
6
|
-
<h3 class="mn-regular">Заполните профиль</h3>
|
7
|
-
|
8
|
-
<router-link to="/app/profile/edit" class="t-white br-white bg-transp w-100 button">Заполнить</router-link>
|
9
|
-
</section> -->
|
10
|
-
|
11
|
-
<section class="t-center w-100 mn-thin radius-medium pd-medium br-grey br-1px br-solid">
|
12
|
-
<svg v-if="!route.params._id" @click="$router.push({name: 'Edit Profile'})" class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp" width="652" height="652" viewBox="0 0 652 652" fill="none" xmlns="http://www.w3.org/2000/svg">
|
13
|
-
<path fill="black" d="M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z"/>
|
14
|
-
</svg>
|
15
|
-
|
16
|
-
<img v-if="users.state.current.photo" :src="'/' + users.state.current.photo" class="radius-medium mn-small i-extra" />
|
17
|
-
<img v-else class="radius-medium mn-small i-extra" src="@/assets/images/avatar.svg">
|
18
|
-
<h3 class="">{{users.state.current.name ? users.state.current.name : 'Не указан' }}</h3>
|
19
|
-
<p class="t-main t-semi">@magicofoz</p>
|
20
|
-
<p>2 324 subscribers</p>
|
21
|
-
<div class="flex-center flex-nowrap flex">
|
22
|
-
<div class="pd-thin bg-grey">
|
23
|
-
🎵 DJ
|
24
|
-
</div>
|
25
|
-
<div class="pd-thin bg-grey">
|
26
|
-
👷 Builder
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<Contacts
|
31
|
-
:website="users.state.current.name"
|
32
|
-
:phone="users.state.current.phone ? users.state.current.phone : 'Не указан'"
|
33
|
-
:email="users.state.current.email ? users.state.current.email : 'Не указан'"
|
34
|
-
:address="users.state.current.name"
|
35
|
-
class="cols-4 radius-medium mn-auto gap-thin"
|
36
|
-
/>
|
37
|
-
|
38
|
-
</section>
|
39
|
-
|
40
|
-
<Activity
|
41
|
-
likes="3212"
|
42
|
-
comments="342"
|
43
|
-
subscriptions="235"
|
44
|
-
/>
|
45
|
-
|
46
|
-
<Tab
|
47
|
-
v-model:selected="tabOrganization"
|
48
|
-
:tabs="[
|
49
|
-
{ name: 'Posts', value: 'spots' },
|
50
|
-
{ name: 'Hubs', value: 'products' },
|
51
|
-
{ name: 'Hubs', value: 'products' },
|
52
|
-
{ name: 'Spots', value: 'members' }
|
53
|
-
]"
|
54
|
-
class="o-hidden h5 radius-big bg-grey"
|
55
|
-
/>
|
56
|
-
|
57
|
-
<Feed
|
58
|
-
:user="users.state.current._id"
|
59
|
-
:owner="users.state.current._id"
|
60
|
-
/>
|
61
|
-
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
</template>
|
65
|
-
|
66
|
-
<script setup>
|
67
|
-
import { watch } from 'vue'
|
68
|
-
import Cookies from 'js-cookie'
|
69
|
-
// Import components
|
70
|
-
import Tab from '@pf/src/components/Tab/Tab.vue'
|
71
|
-
import Field from '@pf/src/components/Field/Field.vue'
|
72
|
-
import Button from '@pf/src/components/Button/Button.vue'
|
73
|
-
// Org Module
|
74
|
-
import Contacts from '@pf/src/modules/organizations/components/blocks/Contacts.vue'
|
75
|
-
// Community Module
|
76
|
-
import Feed from '@pf/src/modules/community/components/sections/Feed.vue';
|
77
|
-
import Activity from '@pf/src/modules/community/components/blocks/Activity.vue';
|
78
|
-
// Import libs
|
79
|
-
import { computed, onMounted, ref, onBeforeMount } from 'vue'
|
80
|
-
import { useRoute, useRouter } from 'vue-router'
|
81
|
-
// Import state
|
82
|
-
import * as auth from '@pf/src/modules/auth/store/auth'
|
83
|
-
import * as users from '@/modules/users/store'
|
84
|
-
// Import validation
|
85
|
-
import * as inputsValidation from '@pf/src/modules/middlewares/client/inputs.validation'
|
86
|
-
const passswordValidation = ref(null)
|
87
|
-
// Accessing router
|
88
|
-
const route = useRoute()
|
89
|
-
const router = useRouter()
|
90
|
-
// Get organization _id from cookie
|
91
|
-
if (!route.params._id) await users.actions.fetch({ _id: auth.state.user._id });
|
92
|
-
if (route.params._id) await users.actions.fetch({ _id: route.params._id });
|
93
|
-
// State
|
94
|
-
let tab = route.query.tab ? route.query.tab : 'spots';
|
95
|
-
|
96
|
-
const tabOrganization = ref(tab)
|
97
|
-
|
98
|
-
route.query.tab = tabOrganization.value
|
99
|
-
|
100
|
-
watch(tabOrganization, (newValue) => {
|
101
|
-
router.push({ query: { ...route.query, tab: newValue } });
|
102
|
-
});
|
103
|
-
</script>
|
104
|
-
|
105
|
-
<style lang="scss">
|
106
|
-
#header {
|
107
|
-
// height: 3rem;
|
108
|
-
}
|
109
|
-
</style>
|
@@ -1,132 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="for-transition w-100">
|
3
|
-
<div id="dash" class="w-100 pd-medium bg-grey">
|
4
|
-
|
5
|
-
<section class="w-100 mn-medium radius-medium o-hidden">
|
6
|
-
<Field
|
7
|
-
v-model:field="user.phone"
|
8
|
-
label="Телефон"
|
9
|
-
placeholder="Не указан"
|
10
|
-
class="bg-white "
|
11
|
-
disabled="true"
|
12
|
-
:validation="organizationName"
|
13
|
-
/>
|
14
|
-
|
15
|
-
<Field
|
16
|
-
v-model:field="user.email"
|
17
|
-
label="Email"
|
18
|
-
placeholder="Не указан"
|
19
|
-
class="bg-white"
|
20
|
-
disabled="true"
|
21
|
-
:validation="organizationName"
|
22
|
-
/>
|
23
|
-
</section>
|
24
|
-
|
25
|
-
<section class="w-100 mn-medium radius-medium o-hidden">
|
26
|
-
<Field
|
27
|
-
v-model:field="user.name"
|
28
|
-
label="ФИО"
|
29
|
-
placeholder="Не указан"
|
30
|
-
class="bg-white "
|
31
|
-
:validation="organizationName"
|
32
|
-
/>
|
33
|
-
<Field
|
34
|
-
v-model:field="user.dateOfBirth"
|
35
|
-
label="Дата рождения"
|
36
|
-
type="date"
|
37
|
-
placeholder="Не указан"
|
38
|
-
class="bg-white "
|
39
|
-
:validation="organizationName"
|
40
|
-
/>
|
41
|
-
|
42
|
-
<Field
|
43
|
-
v-model:field="user.address"
|
44
|
-
label="Адрес регистрации"
|
45
|
-
placeholder="Не указан"
|
46
|
-
class="bg-white "
|
47
|
-
:validation="organizationName"
|
48
|
-
/>
|
49
|
-
</section>
|
50
|
-
|
51
|
-
|
52
|
-
<section class="w-100 mn-medium radius-medium pd-medium bg-white" >
|
53
|
-
<span class="t-transp mn-small d-block">Хобби</span>
|
54
|
-
<Field
|
55
|
-
v-model:field="user.hobbies"
|
56
|
-
label="Хобби"
|
57
|
-
placeholder="Не указаны"
|
58
|
-
class="bg-white "
|
59
|
-
:validation="organizationName"
|
60
|
-
/>
|
61
|
-
<span class="t-transp mn-small d-block">Питомцы</span>
|
62
|
-
<Field
|
63
|
-
v-model:field="user.pets"
|
64
|
-
label="Питомцы"
|
65
|
-
placeholder="Не указаны"
|
66
|
-
class="bg-white "
|
67
|
-
:validation="organizationName"
|
68
|
-
/>
|
69
|
-
<span class="t-transp mn-small d-block">Сведения о детях</span>
|
70
|
-
<div v-for="(child, index) in user.childrenInfo" :key="index">
|
71
|
-
<Field
|
72
|
-
v-model:field="child.name"
|
73
|
-
label="Имя"
|
74
|
-
placeholder="Не указано"
|
75
|
-
class="bg-white "
|
76
|
-
:validation="organizationName"
|
77
|
-
/>
|
78
|
-
<Field
|
79
|
-
v-model:field="child.dateOfBirth"
|
80
|
-
label="Дата рождения"
|
81
|
-
type="date"
|
82
|
-
placeholder="Не указана"
|
83
|
-
class="bg-white "
|
84
|
-
:validation="organizationName"
|
85
|
-
/>
|
86
|
-
</div>
|
87
|
-
</section>
|
88
|
-
|
89
|
-
<Button :submit="onSubmit" :callback="redirectTo" class="mn-thin">Сохранить</Button>
|
90
|
-
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
</template>
|
94
|
-
|
95
|
-
<script setup>
|
96
|
-
import Cookies from 'js-cookie'
|
97
|
-
// Import components
|
98
|
-
import Tab from '@pf/src/components/Tab/Tab.vue'
|
99
|
-
import Field from '@pf/src/components/Field/Field.vue'
|
100
|
-
import Button from '@pf/src/components/Button/Button.vue'
|
101
|
-
// Import libs
|
102
|
-
import { computed, onMounted, ref, onBeforeMount } from 'vue'
|
103
|
-
import { useRoute, useRouter } from 'vue-router'
|
104
|
-
// Import state
|
105
|
-
import * as auth from '@pf/src/modules/auth/store/auth'
|
106
|
-
import * as users from '@/modules/users/store'
|
107
|
-
// Import validation
|
108
|
-
import * as inputsValidation from '@pf/src/modules/middlewares/client/inputs.validation'
|
109
|
-
const passswordValidation = ref(null)
|
110
|
-
// Accessing router
|
111
|
-
const route = useRoute()
|
112
|
-
const router = useRouter()
|
113
|
-
// Async requests
|
114
|
-
await users.actions.fetch({ _id: auth.state.user._id });
|
115
|
-
// State
|
116
|
-
const user = ref(users.state.current);
|
117
|
-
// Methods
|
118
|
-
async function onSubmit() {
|
119
|
-
await users.actions.update(users.state.current)
|
120
|
-
}
|
121
|
-
|
122
|
-
function redirectTo () {
|
123
|
-
router.replace({ name: 'My Profile'});
|
124
|
-
}
|
125
|
-
|
126
|
-
</script>
|
127
|
-
|
128
|
-
<style lang="scss">
|
129
|
-
#header {
|
130
|
-
// height: 3rem;
|
131
|
-
}
|
132
|
-
</style>
|