@ozdao/prometheus-framework 0.2.50 → 0.2.52
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main-482dc398.mjs +13626 -0
- package/dist/main-b2JI9sFg.js +91 -0
- package/dist/main-c56d4c09.js +91 -0
- package/dist/main-x-9D8zvb.mjs +13604 -0
- package/dist/main.css +1 -1
- package/dist/organizations.server.js +22 -16
- package/dist/organizations.server.mjs +22 -16
- package/dist/products.server.js +32 -16
- package/dist/products.server.mjs +32 -16
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +223 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +19 -19
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
- package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -47
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +134 -129
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +128 -158
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +44 -44
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +64 -51
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +22 -23
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-6dcbb74b.mjs +55 -0
- package/dist/web-caJAdsxy.js +1 -0
- package/dist/web-ee302c1d.js +1 -0
- package/dist/web-i08OVMw9.mjs +55 -0
- package/package.json +1 -1
- package/src/components/Button/Button.vue +3 -3
- package/src/components/Feed/Feed.vue +2 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -0
- package/src/modules/applications/applications.client.js +0 -1
- package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
- package/src/modules/icons/entities/IconProfile.vue +10 -1
- package/src/modules/icons/entities/IconShopcart.vue +12 -2
- package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
- package/src/modules/mobile/components/BottomNavigation/BottomNavigation.vue +86 -0
- package/src/modules/mobile/components/BottomSheet/BottomSheet.vue +86 -0
- package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +152 -0
- package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +195 -0
- package/src/modules/orders/components/partials/ShopCart.vue +4 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
- package/src/modules/organizations/components/blocks/User.vue +19 -10
- package/src/modules/organizations/components/pages/Department.vue +19 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
- package/src/modules/organizations/components/pages/Organization.vue +38 -72
- package/src/modules/organizations/components/sections/Feed.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +27 -24
- package/src/modules/organizations/controllers/organizations.controller.js +0 -1
- package/src/modules/products/components/pages/EditLeftover.vue +6 -4
- package/src/modules/products/components/pages/Products.vue +58 -38
- package/src/modules/products/components/sections/FilterProducts.vue +5 -5
- package/src/modules/products/controllers/leftovers.controller.js +12 -5
- package/src/modules/products/controllers/products.controller.js +30 -9
- package/src/modules/products/store/products.js +4 -0
- package/src/styles/layout.scss +1 -1
@@ -1,77 +1,45 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="radius-big o-hidden cols-2-1_3">
|
3
|
-
<!-- <Map :location="{lat: department.location.coordinates[1] ,lng: department.location.coordinates[0]}" class=""/> -->
|
4
3
|
|
5
4
|
<div class="pd-medium w-100">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
|
6
|
+
<router-link
|
7
|
+
:to="{
|
8
|
+
name: 'Department Edit',
|
9
|
+
params: {
|
10
|
+
_id: props.organization,
|
11
|
+
department: department._id
|
12
|
+
}
|
13
|
+
}"
|
14
|
+
class="
|
15
|
+
cursor-pointer
|
16
|
+
pos-absolute pos-t-regular pos-r-regular
|
17
|
+
radius-extra pd-thin bg-second
|
18
|
+
"
|
19
|
+
>
|
20
|
+
<IconEdit
|
21
|
+
class="i-regular"
|
22
|
+
classes="fill-white"
|
23
|
+
/>
|
24
|
+
</router-link>
|
25
|
+
|
10
26
|
<h3
|
11
27
|
@click="$router.push(`/organizations/${props.organization}/departments/${department._id}`)"
|
12
28
|
class="mn-b-small w-100"
|
13
29
|
v-html="department.profile.name"
|
14
30
|
/>
|
15
31
|
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<p class="mn-r-small">{{department.members.length}} человек</p>
|
28
|
-
<svg width="14" height="9" viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
29
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z" fill="#8A8A8A"/>
|
30
|
-
</svg>
|
31
|
-
|
32
|
-
</div>
|
33
|
-
</template>
|
34
|
-
<template #content>
|
35
|
-
<ul>
|
36
|
-
<li v-if="department.members.length < 1">В отделе еще нет участников</li>
|
37
|
-
<User
|
38
|
-
class="br-b br-solid br-grey"
|
39
|
-
v-for="(member, index) in department.members"
|
40
|
-
:key="index"
|
41
|
-
:user="member.user"
|
42
|
-
:position="member.position"
|
43
|
-
@click="$router.push(`/app/profile/${member.user._id}`)"
|
44
|
-
/>
|
45
|
-
</ul>
|
46
|
-
</template>
|
47
|
-
</Spoiler>
|
48
|
-
|
49
|
-
<Spoiler
|
50
|
-
class="
|
51
|
-
radius-small
|
52
|
-
o-hidden
|
53
|
-
br-1px br-solid br-grey
|
54
|
-
mn-b-thin
|
55
|
-
"
|
56
|
-
>
|
57
|
-
<template #header>
|
58
|
-
<div class="pd-small flex-v-center flex-nowrap flex">
|
59
|
-
<h5 class="w-100" >Working Hours </h5>
|
60
|
-
<p class="mn-r-small">{{department.subdepartments ? department.subdepartments.length : 0}} отделов</p>
|
61
|
-
<svg width="14" height="9" viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
62
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z" fill="#8A8A8A"/>
|
63
|
-
</svg>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
</template>
|
67
|
-
<template #content>
|
68
|
-
<ul>
|
69
|
-
<li v-if="department.subdepartments.length < 1">В отделе еще нет подотделов</li>
|
70
|
-
<DepartmentSub v-for="(subdepartmentsartment, index) in department.subdepartments" @click="$router.push(`/organization/departments/${subdepartmentsartment._id}`)" :key="index" class="br-b br-solid br-grey" :department="subdepartmentsartment" />
|
71
|
-
</ul>
|
72
|
-
</template>
|
73
|
-
</Spoiler>
|
74
|
-
|
32
|
+
<ul>
|
33
|
+
<li v-if="department.members.length < 1">В отделе еще нет участников</li>
|
34
|
+
<User
|
35
|
+
class="br-b br-solid br-grey"
|
36
|
+
v-for="(member, index) in department.members"
|
37
|
+
:key="index"
|
38
|
+
:user="member.user"
|
39
|
+
:position="member.position"
|
40
|
+
@click="$router.push(`/app/profile/${member.user._id}`)"
|
41
|
+
/>
|
42
|
+
</ul>
|
75
43
|
</div>
|
76
44
|
</div>
|
77
45
|
</template>
|
@@ -79,9 +47,9 @@
|
|
79
47
|
<script setup>
|
80
48
|
import { ref } from 'vue';
|
81
49
|
|
82
|
-
import
|
83
|
-
import Map from '@pf/src/components/Map/Map.vue';
|
50
|
+
import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
|
84
51
|
|
52
|
+
import Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';
|
85
53
|
import DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';
|
86
54
|
import User from '@pf/src/modules/organizations/components/blocks/User.vue';
|
87
55
|
|
@@ -2,10 +2,43 @@
|
|
2
2
|
<div>
|
3
3
|
|
4
4
|
<div class="br-grey radius-small mn-small">
|
5
|
-
|
5
|
+
<h3 class="mn-b-semi">Add to deparment</h3>
|
6
|
+
|
7
|
+
<div class="bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big">
|
8
|
+
<Feed
|
9
|
+
:states="{
|
10
|
+
empty: {
|
11
|
+
title: 'No Members Found',
|
12
|
+
description: 'Currently, there are no members available.'
|
13
|
+
}
|
14
|
+
}"
|
15
|
+
:store="{
|
16
|
+
read: (options) => memberships.actions.read(options),
|
17
|
+
state: null
|
18
|
+
}"
|
19
|
+
:options="{
|
20
|
+
target: $route.params._id
|
21
|
+
}"
|
22
|
+
v-slot="{
|
23
|
+
items
|
24
|
+
}"
|
25
|
+
>
|
26
|
+
<User
|
27
|
+
v-for="(item, index) in items"
|
28
|
+
:key="index"
|
29
|
+
:photo="item.user.profile.photo"
|
30
|
+
:name="item.user.profile.name || item.user.phone || item.user.email || item.user._id"
|
31
|
+
:user="item"
|
32
|
+
:position="item.position"
|
33
|
+
@click="$router.push(`/app/profile/${user._id}`)"
|
34
|
+
class="mn-b-thin"
|
35
|
+
/>
|
36
|
+
</Feed>
|
37
|
+
</div>
|
38
|
+
|
6
39
|
<SelectMulti
|
7
40
|
v-if="props.member === null"
|
8
|
-
v-model="
|
41
|
+
v-model="userInput"
|
9
42
|
:options="users"
|
10
43
|
:multiple="false"
|
11
44
|
:taggable="false"
|
@@ -13,11 +46,11 @@
|
|
13
46
|
class="mn-b-semi bg-grey pd-medium radius-small"
|
14
47
|
/>
|
15
48
|
|
16
|
-
|
49
|
+
<!-- <div v-else class="pd-small br-grey br-1px br-solid">
|
17
50
|
{{ memberForm.user.name ? memberForm.user.name : 'Безымянный' }}, {{memberForm.user.id}}
|
18
|
-
</div>
|
51
|
+
</div> -->
|
19
52
|
<Field
|
20
|
-
v-model:field="
|
53
|
+
v-model:field="roleInput"
|
21
54
|
label="Должность"
|
22
55
|
placeholder="Название должности"
|
23
56
|
class="bg-white "
|
@@ -25,7 +58,7 @@
|
|
25
58
|
/>
|
26
59
|
</div>
|
27
60
|
|
28
|
-
<button :disabled="!
|
61
|
+
<button :disabled="!userInput || !roleInput" @click="submitForm" class="w-100 button bg-blue t-white">
|
29
62
|
{{ props.member !== null ? "Редактировать участника" : "Добавить участника" }}
|
30
63
|
</button>
|
31
64
|
|
@@ -42,6 +75,11 @@ import SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue'
|
|
42
75
|
import Field from "@pf/src/components/Field/Field.vue";
|
43
76
|
import Select from "@pf/src/components/Select/Select.vue";
|
44
77
|
|
78
|
+
import Feed from '@pf/src/components/Feed/Feed.vue'
|
79
|
+
import User from '@pf/src/modules/organizations/components/blocks/User.vue';
|
80
|
+
|
81
|
+
import * as memberships from '@pf/src/modules/organizations/store/memberships'
|
82
|
+
|
45
83
|
const props = defineProps({
|
46
84
|
isPopupOpen: Boolean,
|
47
85
|
member: Number,
|
@@ -51,13 +89,11 @@ const props = defineProps({
|
|
51
89
|
|
52
90
|
const emits = defineEmits(['callback','remove'])
|
53
91
|
|
54
|
-
const
|
55
|
-
|
56
|
-
position: "",
|
57
|
-
});
|
92
|
+
const userInput = ref(null);
|
93
|
+
const roleInput = ref(null);
|
58
94
|
|
59
95
|
if (props.member !== null) {
|
60
|
-
|
96
|
+
userInput.value = props.members[props.member]
|
61
97
|
}
|
62
98
|
|
63
99
|
import * as inputsValidation from '@pf/src/modules/middlewares/client/inputs.validation'
|
@@ -66,10 +102,11 @@ const placeValidation = ref(null)
|
|
66
102
|
|
67
103
|
async function submitForm() {
|
68
104
|
if (props.member !== null) {
|
69
|
-
props.members[props.member] =
|
105
|
+
props.members[props.member] = userInput
|
106
|
+
props.members[props.member].role = roleInput.value
|
70
107
|
emits("callback");
|
71
108
|
} else {
|
72
|
-
props.members.push(
|
109
|
+
props.members.push({...userInput.value, role: roleInput.value});
|
73
110
|
emits("callback");
|
74
111
|
}
|
75
112
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="">
|
2
|
+
<div class="flex-v-center flex-nowrap flex">
|
3
3
|
<img
|
4
|
-
v-if="
|
5
|
-
:src="(FILE_SERVER_URL || '') +
|
4
|
+
v-if="photo"
|
5
|
+
:src="(FILE_SERVER_URL || '') + photo"
|
6
6
|
class="radius-medium object-fit-cover mn-r-thin i-thin"
|
7
7
|
|
8
8
|
@click.stop="$router.push({
|
@@ -12,22 +12,23 @@
|
|
12
12
|
}
|
13
13
|
})"
|
14
14
|
/>
|
15
|
-
|
15
|
+
<!-- <pre>{{user}}</pre> -->
|
16
16
|
<PlaceholderUserpic
|
17
|
-
v-if="!
|
17
|
+
v-if="!photo"
|
18
18
|
class="radius-medium mn-r-thin i-thin"
|
19
19
|
|
20
20
|
@click.stop="$router.push({
|
21
|
-
name:
|
21
|
+
name: 'User Profile',
|
22
22
|
params: {
|
23
23
|
_id: user._id
|
24
24
|
}
|
25
25
|
})"
|
26
26
|
/>
|
27
|
-
|
28
|
-
|
27
|
+
|
28
|
+
<p>{{ name }}</p>
|
29
|
+
|
29
30
|
<!-- </div> -->
|
30
|
-
<div class="mn-r-auto">
|
31
|
+
<!-- <div class="mn-r-auto">
|
31
32
|
<span class=" mn-r-small">{{user.profile?.email}} {{user.profile?.phone}}</span>
|
32
33
|
<span class="t-transp">{{user.role}}</span>
|
33
34
|
<br>
|
@@ -36,7 +37,7 @@
|
|
36
37
|
|
37
38
|
<div v-if="user.position !== 'Основатель'" class="mn-l-medium flex-v-center flex">
|
38
39
|
<button @click="removeMember(user)" class="button-small button">×</button>
|
39
|
-
</div>
|
40
|
+
</div> -->
|
40
41
|
|
41
42
|
</div>
|
42
43
|
</template>
|
@@ -50,6 +51,14 @@
|
|
50
51
|
user: {
|
51
52
|
type: Object,
|
52
53
|
required: true
|
54
|
+
},
|
55
|
+
photo: {
|
56
|
+
type: String,
|
57
|
+
default: null
|
58
|
+
},
|
59
|
+
name: {
|
60
|
+
type: String,
|
61
|
+
default: 'Anonymous'
|
53
62
|
}
|
54
63
|
// Define other props here
|
55
64
|
});
|
@@ -7,9 +7,25 @@
|
|
7
7
|
|
8
8
|
<h2 class="w-100">{{ departments.state.department.profile.name }}</h2>
|
9
9
|
|
10
|
-
<
|
11
|
-
|
12
|
-
|
10
|
+
<router-link
|
11
|
+
:to="{
|
12
|
+
name: 'Department Edit',
|
13
|
+
params: {
|
14
|
+
_id: route.params._id,
|
15
|
+
department: route.params.department
|
16
|
+
}
|
17
|
+
}"
|
18
|
+
class="
|
19
|
+
cursor-pointer
|
20
|
+
pos-absolute pos-t-regular pos-r-regular
|
21
|
+
radius-extra pd-thin bg-second
|
22
|
+
"
|
23
|
+
>
|
24
|
+
<IconEdit
|
25
|
+
class="i-regular"
|
26
|
+
classes="fill-white"
|
27
|
+
/>
|
28
|
+
</router-link>
|
13
29
|
|
14
30
|
</div>
|
15
31
|
<p class="t-transp p-big" v-html="departments.state.department.description"></p>
|
@@ -10,11 +10,15 @@
|
|
10
10
|
</section>
|
11
11
|
|
12
12
|
</header>
|
13
|
-
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
|
14
|
+
<Block
|
15
|
+
title="Profile"
|
16
|
+
v-if="departments.state.department.profile"
|
17
|
+
class="mn-b-thin"
|
18
|
+
>
|
19
|
+
<div
|
20
|
+
class="cols-2-fit-content"
|
21
|
+
>
|
18
22
|
<UploadImage
|
19
23
|
v-model:photo="departments.state.department.profile.photo"
|
20
24
|
:uploadPath="'organizations/' + departments.state.department.name + '/avatars'"
|
@@ -37,7 +41,7 @@
|
|
37
41
|
/>
|
38
42
|
</div>
|
39
43
|
</div>
|
40
|
-
</
|
44
|
+
</Block>
|
41
45
|
|
42
46
|
<Block
|
43
47
|
title="Team"
|
@@ -48,11 +52,14 @@
|
|
48
52
|
}]"
|
49
53
|
class="cols-1 gap-thin mn-b-thin"
|
50
54
|
>
|
55
|
+
<!-- {{departments.state.department.members[0]}} -->
|
51
56
|
<User
|
52
57
|
class="bg-grey o-hidden radius-small mn-b-thin"
|
53
58
|
v-for="(member, index) in departments.state.department.members"
|
54
59
|
:key="index"
|
55
60
|
:user="member.user"
|
61
|
+
:photo="member.user.profile.photo"
|
62
|
+
:name="member.user.profile.name || member.user.phone || member.user.email || member.user._id"
|
56
63
|
:position="member.position"
|
57
64
|
@click="openMemberPopup(index)"
|
58
65
|
/>
|
@@ -62,6 +69,7 @@
|
|
62
69
|
title="Добавить участника"
|
63
70
|
@close-popup="closeMemberPopup"
|
64
71
|
:isPopupOpen="isOpenAddMemberPopup"
|
72
|
+
class="bg-white w-max-30r radius-big pd-big"
|
65
73
|
>
|
66
74
|
<DepartmentMemberModify
|
67
75
|
:members="departments.state.department.members"
|
@@ -212,12 +220,8 @@ import User from '@pf/src/modules/organizations/components/blocks/User.vue';
|
|
212
220
|
import * as departments from "@pf/src/modules/organizations/store/departments";
|
213
221
|
import * as memberships from "@pf/src/modules/organizations/store/memberships";
|
214
222
|
|
215
|
-
|
216
|
-
|
217
223
|
const router = useRouter();
|
218
224
|
const route = useRoute();
|
219
|
-
const tabOrganization = ref("details");
|
220
|
-
const showAddNew = ref(false);
|
221
225
|
|
222
226
|
async function fetchData() {
|
223
227
|
if (route.params.department) {
|
@@ -10,77 +10,43 @@
|
|
10
10
|
class="mn-b-semi"
|
11
11
|
/>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
read: (options) => departments.actions.read(route.params._id),
|
51
|
-
state: null
|
52
|
-
}"
|
53
|
-
:options="{
|
54
|
-
user: auth.state.user._id,
|
55
|
-
sort: 'numberOfMemberships',
|
56
|
-
limit: 10
|
57
|
-
}"
|
58
|
-
v-slot="{
|
59
|
-
items
|
60
|
-
}"
|
61
|
-
>
|
62
|
-
<CardDepartment
|
63
|
-
v-for="(department, index) in items"
|
64
|
-
:key="index"
|
65
|
-
:department="department"
|
66
|
-
:organization="route.params._id"
|
67
|
-
class="radius-big bg-white pos-relative mn-b-thin"
|
68
|
-
/>
|
69
|
-
</Feed>
|
70
|
-
</Block>
|
71
|
-
<div>
|
72
|
-
<User
|
73
|
-
v-for="(member, index) in organization.state.current.memberships"
|
74
|
-
:key="index"
|
75
|
-
:user="member"
|
76
|
-
:position="member.position"
|
77
|
-
@click="$router.push(`/app/profile/${member.user._id}`)"
|
78
|
-
class="bg-grey radius-small flex-nowrap flex pd-medium"
|
79
|
-
/>
|
80
|
-
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
|
13
|
+
<Block
|
14
|
+
:title="`${organization.state.current.numberOfMembers} members`"
|
15
|
+
:actions="[{
|
16
|
+
label: '>',
|
17
|
+
function: () => $router.push(`/organizations/${route.params._id}/departments/create`)
|
18
|
+
}]"
|
19
|
+
class="mn-b-semi"
|
20
|
+
>
|
21
|
+
<Feed
|
22
|
+
:states="{
|
23
|
+
empty: {
|
24
|
+
title: 'No Departments Found',
|
25
|
+
description: 'Currently, there are no departments available.'
|
26
|
+
}
|
27
|
+
}"
|
28
|
+
:store="{
|
29
|
+
read: (options) => departments.actions.read(route.params._id),
|
30
|
+
state: null
|
31
|
+
}"
|
32
|
+
:options="{
|
33
|
+
user: auth.state.user._id,
|
34
|
+
sort: 'numberOfMemberships',
|
35
|
+
limit: 10
|
36
|
+
}"
|
37
|
+
v-slot="{
|
38
|
+
items
|
39
|
+
}"
|
40
|
+
>
|
41
|
+
<CardDepartment
|
42
|
+
v-for="(department, index) in items"
|
43
|
+
:key="index"
|
44
|
+
:department="department"
|
45
|
+
:organization="route.params._id"
|
46
|
+
class="radius-big bg-white pos-relative mn-b-thin"
|
47
|
+
/>
|
48
|
+
</Feed>
|
49
|
+
</Block>
|
84
50
|
|
85
51
|
<Tab
|
86
52
|
v-model:selected="tabOrganization"
|
@@ -266,7 +232,7 @@
|
|
266
232
|
route.query.tab = tabOrganization.value
|
267
233
|
|
268
234
|
watch(tabOrganization, (newValue) => {
|
269
|
-
router.replace({ query:
|
235
|
+
router.replace({ query: null});
|
270
236
|
});
|
271
237
|
</script>
|
272
238
|
|
@@ -4,34 +4,37 @@ const controllerFactory = (db) => {
|
|
4
4
|
const Membership = db.membership;
|
5
5
|
|
6
6
|
const read = async (req, res) => {
|
7
|
-
let query = {};
|
8
|
-
let options = {};
|
9
|
-
|
10
|
-
if (req.query.user) {
|
11
|
-
query.user = req.query.user;
|
12
|
-
}
|
13
|
-
|
14
|
-
if (req.query.type) {
|
15
|
-
query.type = req.query.type;
|
16
|
-
}
|
17
|
-
|
18
|
-
if (req.query.target) {
|
19
|
-
query.target = req.query.target;
|
20
|
-
}
|
21
|
-
|
22
|
-
if (req.query.role) {
|
23
|
-
query.role = req.query.role;
|
24
|
-
}
|
25
|
-
|
26
7
|
try {
|
27
|
-
const memberships = await Membership.
|
28
|
-
|
29
|
-
|
8
|
+
const memberships = await Membership.aggregate([
|
9
|
+
{
|
10
|
+
$match: {
|
11
|
+
...(req.query.user && { user: new ObjectId(req.query.user) }),
|
12
|
+
...(req.query.type && { type: req.query.type }),
|
13
|
+
...(req.query.target && { target: new ObjectId(req.query.target) }),
|
14
|
+
...(req.query.role && { role: req.query.role }),
|
15
|
+
},
|
16
|
+
},
|
17
|
+
{
|
18
|
+
$lookup: {
|
19
|
+
from: 'users',
|
20
|
+
localField: 'user',
|
21
|
+
foreignField: '_id',
|
22
|
+
as: 'user',
|
23
|
+
},
|
24
|
+
},
|
25
|
+
{
|
26
|
+
$unwind: '$user',
|
27
|
+
},
|
28
|
+
]);
|
29
|
+
|
30
|
+
if (!memberships || memberships.length === 0) {
|
31
|
+
return res.status(404).send({ errorCode: 'MEMBERSHIPS_NOT_FOUND' });
|
30
32
|
}
|
33
|
+
|
31
34
|
res.send(memberships);
|
32
35
|
} catch (err) {
|
33
|
-
console.log(err)
|
34
|
-
res.status(500).send({ errorCode:
|
36
|
+
console.log(err);
|
37
|
+
res.status(500).send({ errorCode: 'SERVER_ERROR' });
|
35
38
|
}
|
36
39
|
};
|
37
40
|
|
@@ -112,7 +112,7 @@
|
|
112
112
|
|
113
113
|
const totalPrice = computed(() => {
|
114
114
|
return leftovers.state.current.positions.reduce((sum, position) => {
|
115
|
-
return sum +
|
115
|
+
return sum + position.price;
|
116
116
|
}, 0);
|
117
117
|
});
|
118
118
|
|
@@ -147,14 +147,16 @@
|
|
147
147
|
}
|
148
148
|
|
149
149
|
function onSubmit() {
|
150
|
+
leftovers.state.current.organization = route.params._id;
|
151
|
+
|
150
152
|
if (route.params.leftover) {
|
151
153
|
leftovers.actions.update(leftovers.state.current).then(
|
152
|
-
() => router.push({ name: '
|
154
|
+
() => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
|
153
155
|
(error) => console.error('error')
|
154
156
|
);
|
155
157
|
} else {
|
156
158
|
leftovers.actions.create(leftovers.state.current).then(
|
157
|
-
() => router.push({ name: '
|
159
|
+
() => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
|
158
160
|
(error) => console.error('error')
|
159
161
|
);
|
160
162
|
}
|
@@ -162,7 +164,7 @@
|
|
162
164
|
|
163
165
|
function onDelete() {
|
164
166
|
leftovers.actions.delete(route.params.leftover).then(
|
165
|
-
() => router.push({ name: '
|
167
|
+
() => router.push({ name: 'Leftovers', params: {_id: route.params._id} }),
|
166
168
|
(error) => console.error('error')
|
167
169
|
);
|
168
170
|
}
|