@coopenomics/desktop 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/package.json +5 -5
- package/src/boot/init-stores.ts +5 -3
- package/src/desktops/User/model/index.ts +7 -12
- package/src/entities/System/model/store.ts +1 -1
- package/src/features/Branch/SelectBranch/model/index.ts +1 -1
- package/src/features/Branch/SelectBranch/ui/SelectBranchOverlay.vue +5 -7
- package/src/features/Request/ConfirmRecieveOnRequest/api/index.ts +2 -2
- package/src/features/Request/CreateChildOrder/api/index.ts +73 -48
- package/src/features/Request/CreateChildOrder/model/index.ts +46 -0
- package/src/features/Request/CreateChildOrder/model/types.ts +1 -1
- package/src/features/Request/CreateChildOrder/ui/CreateChildOrderButton/CreateChildOrderButton.vue +28 -4
- package/src/features/Request/CreateParentOffer/api/index.ts +1 -1
- package/src/features/Request/CreateParentOffer/model/types.ts +2 -2
- package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +3 -3
- package/src/features/Request/RecieveOnRequest/api/index.ts +2 -2
- package/src/features/Request/SupplyOnRequest/api/index.ts +1 -1
- package/src/features/Request/UpdateRequest/api/index.ts +2 -2
- package/src/pages/Registrator/SignUp/SelectBranch.vue +1 -1
- package/src/shared/ui/UserDataForm/OrganizationDataForm/OrganizationDataForm.vue +1 -1
- package/src/widgets/User/CoopCard/ui/CoopCard.vue +5 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.2.7](https://github.com/coopenomics/monocoop/compare/v2.2.6...v2.2.7) (2025-02-07)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @coopenomics/desktop
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
6
14
|
## [2.2.6](https://github.com/coopenomics/monocoop/compare/v2.2.6-alpha.0...v2.2.6) (2025-01-27)
|
7
15
|
|
8
16
|
**Note:** Version bump only for package @coopenomics/desktop
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@coopenomics/desktop",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.7",
|
4
4
|
"description": "A Desktop Project",
|
5
5
|
"productName": "Desktop App",
|
6
6
|
"author": "Alex Ant <dacom.dark.sun@gmail.com>",
|
@@ -20,8 +20,8 @@
|
|
20
20
|
"prepublishOnly": "npm run build:lib"
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
|
-
"@coopenomics/controller": "2.2.
|
24
|
-
"@coopenomics/sdk": "2.2.
|
23
|
+
"@coopenomics/controller": "2.2.7",
|
24
|
+
"@coopenomics/sdk": "2.2.7",
|
25
25
|
"@dicebear/collection": "^9.0.1",
|
26
26
|
"@dicebear/core": "^9.0.1",
|
27
27
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
|
46
46
|
"axios": "^1.2.1",
|
47
47
|
"compression": "^1.7.4",
|
48
|
-
"cooptypes": "2.2.
|
48
|
+
"cooptypes": "2.2.7",
|
49
49
|
"dompurify": "^3.1.7",
|
50
50
|
"dotenv": "^16.4.5",
|
51
51
|
"email-regex": "^5.0.0",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"npm": ">= 6.13.4",
|
95
95
|
"yarn": ">= 1.21.1"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "3be56ba462561e4dd9e7225bb95b254b20f89042"
|
98
98
|
}
|
package/src/boot/init-stores.ts
CHANGED
@@ -8,14 +8,16 @@ import { useAccountStore } from 'src/entities/Account/model';
|
|
8
8
|
import { useSessionStore } from 'src/entities/Session';
|
9
9
|
|
10
10
|
export default boot(async ({ router }) => {
|
11
|
+
const system = useSystemStore();
|
12
|
+
//Инициализация системного стора
|
13
|
+
await system.loadSystemInfo();
|
14
|
+
|
15
|
+
// инициализация всего остального
|
11
16
|
const desktops = useDesktopStore();
|
12
17
|
const cardStore = useCardStore();
|
13
|
-
const system = useSystemStore();
|
14
18
|
const account = useAccountStore();
|
15
19
|
const session = useSessionStore();
|
16
20
|
|
17
|
-
//Инициализация системного стора
|
18
|
-
await system.loadSystemInfo();
|
19
21
|
|
20
22
|
// Инициализация стора desktops
|
21
23
|
await desktops.healthCheck();
|
@@ -8,13 +8,13 @@ import { agreementsBase } from 'src/shared/lib/consts/workspaces';
|
|
8
8
|
import { ConnectionPage } from 'src/pages/Union/Connection';
|
9
9
|
import { ListOfDocumentsPage } from 'src/pages/Documentor/ListOfDocuments';
|
10
10
|
import { CoopCardPage } from 'src/pages/User/CardPage';
|
11
|
-
import { MainMarketplacePage } from 'src/pages/Marketplace/MainPage';
|
12
|
-
import { ModerationPage } from 'src/pages/Marketplace/Moderation';
|
13
|
-
import { CreateParentOfferPage } from 'src/pages/Marketplace/CreateParentOffer';
|
14
|
-
import { ShowcasePage } from 'src/pages/Marketplace/Showcase';
|
15
|
-
import { UserParentOffersPage } from 'src/pages/Marketplace/UserParentOffers';
|
16
|
-
import { UserSuppliesListPage } from 'src/pages/Marketplace/UserSuppliesList';
|
17
|
-
import { SuppliesListPage } from 'src/pages/Marketplace/SuppliesList';
|
11
|
+
// import { MainMarketplacePage } from 'src/pages/Marketplace/MainPage';
|
12
|
+
// import { ModerationPage } from 'src/pages/Marketplace/Moderation';
|
13
|
+
// import { CreateParentOfferPage } from 'src/pages/Marketplace/CreateParentOffer';
|
14
|
+
// import { ShowcasePage } from 'src/pages/Marketplace/Showcase';
|
15
|
+
// import { UserParentOffersPage } from 'src/pages/Marketplace/UserParentOffers';
|
16
|
+
// import { UserSuppliesListPage } from 'src/pages/Marketplace/UserSuppliesList';
|
17
|
+
// import { SuppliesListPage } from 'src/pages/Marketplace/SuppliesList';
|
18
18
|
|
19
19
|
export const manifest = {
|
20
20
|
'name': 'UserDesktop',
|
@@ -171,11 +171,6 @@ export const manifest = {
|
|
171
171
|
},
|
172
172
|
},
|
173
173
|
// {
|
174
|
-
// meta: {
|
175
|
-
// title: 'Маркетплейс',
|
176
|
-
// icon: 'fa-solid fa-cog',
|
177
|
-
// roles: [],
|
178
|
-
// },
|
179
174
|
// path: '/:coopname/marketplace',
|
180
175
|
// name: 'marketplace',
|
181
176
|
// component: markRaw(MainMarketplacePage),
|
@@ -12,7 +12,7 @@ interface ISystemStore {
|
|
12
12
|
|
13
13
|
export const useSystemStore = defineStore(namespace, (): ISystemStore => {
|
14
14
|
const info = ref<ISystemInfo>({} as ISystemInfo)
|
15
|
-
|
15
|
+
console.log('system: ', info)
|
16
16
|
const loadSystemInfo = async () => {
|
17
17
|
info.value = await api.loadSystemInfo();
|
18
18
|
};
|
@@ -2,7 +2,7 @@ import type { Mutations } from '@coopenomics/sdk';
|
|
2
2
|
import { ref } from 'vue';
|
3
3
|
import { api } from '../api';
|
4
4
|
|
5
|
-
export type ISelectBranchInput = Mutations.Branches.SelectBranch.IInput
|
5
|
+
export type ISelectBranchInput = Mutations.Branches.SelectBranch.IInput['data']
|
6
6
|
|
7
7
|
const isVisible = ref(false);
|
8
8
|
|
@@ -85,19 +85,17 @@ div
|
|
85
85
|
const {selectBranch} = useSelectBranch()
|
86
86
|
|
87
87
|
await selectBranch({
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
username: session.username,
|
93
|
-
}
|
88
|
+
braname: selectedBranch.value,
|
89
|
+
coopname: system.info.coopname,
|
90
|
+
document,
|
91
|
+
username: session.username,
|
94
92
|
})
|
95
93
|
isVisible.value = false
|
96
94
|
SuccessAlert('Кооперативный участок выбран')
|
97
95
|
} catch(e: any){
|
98
96
|
isSubmitting.value = false
|
99
97
|
console.error(e)
|
100
|
-
failAlert(
|
98
|
+
failAlert(e)
|
101
99
|
}
|
102
100
|
|
103
101
|
}
|
@@ -20,7 +20,7 @@ async function confirmRecieve(
|
|
20
20
|
|
21
21
|
const result = await transact({
|
22
22
|
account: ContractsList.Marketplace,
|
23
|
-
name: MarketContract.Actions.
|
23
|
+
name: MarketContract.Actions.ConfirmReceive.actionName,
|
24
24
|
authorization: [
|
25
25
|
{
|
26
26
|
actor: params.username,
|
@@ -32,7 +32,7 @@ async function confirmRecieve(
|
|
32
32
|
coopname: params.coopname,
|
33
33
|
exchange_id: params.request_id,
|
34
34
|
document,
|
35
|
-
} as MarketContract.Actions.
|
35
|
+
} as MarketContract.Actions.ConfirmReceive.IConfirmReceive,
|
36
36
|
});
|
37
37
|
|
38
38
|
const requestsStore = useRequestStore();
|
@@ -1,57 +1,82 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { transact } from 'src/shared/api';
|
4
|
-
import { ContractsList } from 'src/shared/config';
|
5
|
-
import { useRequestStore } from 'src/entities/Request/model/stores';
|
6
|
-
import { IDocument } from 'src/shared/lib/types/document';
|
7
|
-
import { MarketContract } from 'cooptypes';
|
1
|
+
import { Mutations } from '@coopenomics/sdk';
|
2
|
+
import { client } from 'src/shared/api/client';
|
8
3
|
|
9
4
|
async function createChildOrder(
|
10
|
-
|
11
|
-
): Promise<
|
12
|
-
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
const result = await transact({
|
21
|
-
account: ContractsList.Marketplace,
|
22
|
-
name: MarketContract.Actions.CreateOrder.actionName,
|
23
|
-
authorization: [
|
24
|
-
{
|
25
|
-
actor: params.username,
|
26
|
-
permission: 'active',
|
27
|
-
},
|
28
|
-
],
|
29
|
-
data: {
|
30
|
-
params: {
|
31
|
-
username: params.username,
|
32
|
-
coopname: params.coopname,
|
33
|
-
parent_id: params.parent_id,
|
34
|
-
program_id: params.program_id,
|
35
|
-
pieces: params.pieces,
|
36
|
-
unit_cost: params.unit_cost,
|
37
|
-
product_lifecycle_secs: 0,
|
38
|
-
document,
|
39
|
-
data: '',
|
40
|
-
meta: '',
|
41
|
-
},
|
42
|
-
} as MarketContract.Actions.CreateOrder.ICreateOrder,
|
43
|
-
|
44
|
-
});
|
45
|
-
|
46
|
-
const requestsStore = useRequestStore();
|
47
|
-
requestsStore.loadUserChildOrders({
|
48
|
-
coopname: params.coopname,
|
49
|
-
username: params.username,
|
50
|
-
});
|
5
|
+
data: Mutations.Cooplace.CreateChildOrder.IInput['data']
|
6
|
+
): Promise<Mutations.Cooplace.CreateChildOrder.IOutput[typeof Mutations.Cooplace.CreateChildOrder.name]> {
|
7
|
+
|
8
|
+
const {[Mutations.Cooplace.CreateChildOrder.name]: result} = await client.Mutation(Mutations.Cooplace.CreateChildOrder.mutation, {
|
9
|
+
variables: {
|
10
|
+
data
|
11
|
+
}
|
12
|
+
})
|
13
|
+
|
51
14
|
|
52
15
|
return result;
|
53
16
|
}
|
54
17
|
|
18
|
+
async function generateReturnByAssetStatement(
|
19
|
+
data: Mutations.Cooplace.GenerateReturnByAssetStatement.IInput['data']
|
20
|
+
): Promise<Mutations.Cooplace.GenerateReturnByAssetStatement.IOutput[typeof Mutations.Cooplace.GenerateReturnByAssetStatement.name]> {
|
21
|
+
const {[Mutations.Cooplace.GenerateReturnByAssetStatement.name]: result} = await client.Mutation(Mutations.Cooplace.GenerateReturnByAssetStatement.mutation, {
|
22
|
+
variables: {
|
23
|
+
data
|
24
|
+
}
|
25
|
+
})
|
26
|
+
|
27
|
+
return result;
|
28
|
+
}
|
29
|
+
|
30
|
+
// async function createChildOrder(
|
31
|
+
// params: ICreateChildOrder
|
32
|
+
// ): Promise<TransactResult | undefined> {
|
33
|
+
// //TODO здесь передаём документ заявления на возврат имуществом (?)
|
34
|
+
// const document = {
|
35
|
+
// hash: '33CBC662E606F23F332B442BAB84F2D05BD498B66EF61BC918740606B05BD565',
|
36
|
+
// public_key: 'PUB_K1_8YWRWjCdUQubPoHzT5ndvfhGKDf1ZL7v7Ge9iHoLtNp7wnVfG1',
|
37
|
+
// signature: 'SIG_K1_KWeGQ48n78ybpkuVDf1M7nuGnT8pkPXFbYYMUXtFTFv2dEReMEmwW89r19dKmAVSFZwHTdxdqkB3ZQJeAS9CcQwb92E398',
|
38
|
+
// meta: '',
|
39
|
+
// } as IDocument;
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
// const result = await transact({
|
45
|
+
// account: ContractsList.Marketplace,
|
46
|
+
// name: MarketContract.Actions.CreateOrder.actionName,
|
47
|
+
// authorization: [
|
48
|
+
// {
|
49
|
+
// actor: params.username,
|
50
|
+
// permission: 'active',
|
51
|
+
// },
|
52
|
+
// ],
|
53
|
+
// data: {
|
54
|
+
// params: {
|
55
|
+
// username: params.username,
|
56
|
+
// coopname: params.coopname,
|
57
|
+
// parent_id: params.parent_id,
|
58
|
+
// program_id: params.program_id,
|
59
|
+
// units: params.units,
|
60
|
+
// unit_cost: params.unit_cost,
|
61
|
+
// product_lifecycle_secs: 0,
|
62
|
+
// document,
|
63
|
+
// data: '',
|
64
|
+
// meta: '',
|
65
|
+
// },
|
66
|
+
// } as MarketContract.Actions.CreateOrder.ICreateOrder,
|
67
|
+
|
68
|
+
// });
|
69
|
+
|
70
|
+
// const requestsStore = useRequestStore();
|
71
|
+
// requestsStore.loadUserChildOrders({
|
72
|
+
// coopname: params.coopname,
|
73
|
+
// username: params.username,
|
74
|
+
// });
|
75
|
+
|
76
|
+
// return result;
|
77
|
+
// }
|
78
|
+
|
55
79
|
export const api = {
|
56
80
|
createChildOrder,
|
81
|
+
generateReturnByAssetStatement
|
57
82
|
};
|
@@ -1 +1,47 @@
|
|
1
|
+
import { Mutations } from '@coopenomics/sdk';
|
2
|
+
import { useRequestStore } from 'src/entities/Request/model/stores';
|
3
|
+
import { api } from '../api';
|
4
|
+
import { client } from 'src/shared/api/client';
|
5
|
+
|
1
6
|
export * from './types'
|
7
|
+
|
8
|
+
export function useCreateChildOrder() {
|
9
|
+
async function createChildOrder(
|
10
|
+
//TODO перевести id на хэши
|
11
|
+
data: Mutations.Cooplace.GenerateReturnByAssetStatement.IInput['data'] & {parent_id: number}
|
12
|
+
): Promise<Mutations.Cooplace.CreateChildOrder.IOutput[typeof Mutations.Cooplace.CreateChildOrder.name]> {
|
13
|
+
|
14
|
+
const returnByAssetStatement = await api.generateReturnByAssetStatement({
|
15
|
+
coopname: data.coopname,
|
16
|
+
username: data.username,
|
17
|
+
request: data.request,
|
18
|
+
})
|
19
|
+
|
20
|
+
const document = await client.Document.signDocument(returnByAssetStatement)
|
21
|
+
|
22
|
+
//TODO здесь же нужно передать распоряжение на использование средств цифрового кошелька
|
23
|
+
|
24
|
+
const result = await api.createChildOrder({
|
25
|
+
coopname: data.coopname,
|
26
|
+
data: '',
|
27
|
+
meta: '',
|
28
|
+
parent_id: data.parent_id,
|
29
|
+
product_lifecycle_secs: 0,
|
30
|
+
program_id: data.request.program_id,
|
31
|
+
unit_cost: data.request.unit_cost,
|
32
|
+
units: data.request.units,
|
33
|
+
username: data.username,
|
34
|
+
document
|
35
|
+
})
|
36
|
+
|
37
|
+
const requestsStore = useRequestStore();
|
38
|
+
requestsStore.loadUserChildOrders({
|
39
|
+
coopname: data.coopname,
|
40
|
+
username: data.username,
|
41
|
+
});
|
42
|
+
|
43
|
+
|
44
|
+
return result;
|
45
|
+
}
|
46
|
+
return { createChildOrder };
|
47
|
+
}
|
package/src/features/Request/CreateChildOrder/ui/CreateChildOrderButton/CreateChildOrderButton.vue
CHANGED
@@ -4,19 +4,43 @@
|
|
4
4
|
import type { ICreateChildOrderProps } from '../../model'
|
5
5
|
import { withDefaults } from 'vue'
|
6
6
|
import { useRouter } from 'vue-router'
|
7
|
+
import { client } from 'src/shared/api/client'
|
7
8
|
|
8
9
|
const router = useRouter()
|
9
10
|
const props = withDefaults(defineProps<ICreateChildOrderProps>(), {})
|
10
11
|
|
11
12
|
const createOrder = async () => {
|
12
13
|
try {
|
14
|
+
|
15
|
+
const document = await api.generateReturnByAssetStatement({
|
16
|
+
coopname: props.coopname,
|
17
|
+
request: {
|
18
|
+
currency: 'RUB',
|
19
|
+
hash: 'hash',
|
20
|
+
program_id: 1,
|
21
|
+
title: 'test',
|
22
|
+
total_cost: '10.0000 RUB',
|
23
|
+
type: '',
|
24
|
+
unit_cost: props.offer.unit_cost,
|
25
|
+
unit_of_measurement: '',
|
26
|
+
units: props.units
|
27
|
+
},
|
28
|
+
username: props.username
|
29
|
+
})
|
30
|
+
|
31
|
+
const signedDocument = await client.Document.signDocument(document)
|
32
|
+
|
13
33
|
await api.createChildOrder({
|
14
34
|
coopname: props.coopname,
|
15
35
|
username: props.username,
|
16
|
-
parent_id: props.offer.id,
|
17
|
-
program_id: props.offer.program_id,
|
18
|
-
|
36
|
+
parent_id: Number(props.offer.id),
|
37
|
+
program_id: Number(props.offer.program_id),
|
38
|
+
units: props.units,
|
19
39
|
unit_cost: props.offer.unit_cost,
|
40
|
+
data: '',
|
41
|
+
document: signedDocument,
|
42
|
+
meta: '',
|
43
|
+
product_lifecycle_secs: 100
|
20
44
|
})
|
21
45
|
SuccessAlert('Заказ создан')
|
22
46
|
router.push({ name: 'marketplace-user-supplies' }) //TODO роутинг
|
@@ -26,5 +50,5 @@
|
|
26
50
|
}
|
27
51
|
</script>
|
28
52
|
<template lang="pug">
|
29
|
-
q-btn(size="lg" @click="createOrder") оплатить
|
53
|
+
q-btn(size="lg" @click="createOrder") оплатить
|
30
54
|
</template>
|
@@ -27,7 +27,7 @@ async function createParentOffer(
|
|
27
27
|
coopname: params.coopname,
|
28
28
|
parent_id: 0,
|
29
29
|
program_id: params.program_id,
|
30
|
-
|
30
|
+
units: params.units,
|
31
31
|
unit_cost: params.unit_cost,
|
32
32
|
product_lifecycle_secs: params.product_lifecycle_secs,
|
33
33
|
// document,
|
@@ -4,7 +4,7 @@ export interface ICreateOffer {
|
|
4
4
|
username: string;
|
5
5
|
coopname: string;
|
6
6
|
program_id: string | number;
|
7
|
-
|
7
|
+
units: string | number;
|
8
8
|
unit_cost: string;
|
9
9
|
product_lifecycle_secs: string | number;
|
10
10
|
data: IRequestObjectData;
|
@@ -13,7 +13,7 @@ export interface ICreateOffer {
|
|
13
13
|
export interface IFormData {
|
14
14
|
title: string;
|
15
15
|
description: string;
|
16
|
-
|
16
|
+
units: number;
|
17
17
|
unit_cost_number: number;
|
18
18
|
product_lifecycle_days: number;
|
19
19
|
program_id: number;
|
package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue
CHANGED
@@ -34,7 +34,7 @@ const updateImages = (previewImage: string, images: string[]) => {
|
|
34
34
|
const formData = ref<IFormData>({
|
35
35
|
title: '',
|
36
36
|
description: '',
|
37
|
-
|
37
|
+
units: 1,
|
38
38
|
unit_cost_number: 0,
|
39
39
|
product_lifecycle_days: 3,
|
40
40
|
program_id: 0,
|
@@ -49,7 +49,7 @@ const handlerSubmit = async () => {
|
|
49
49
|
username: props.username,
|
50
50
|
coopname: props.coopname,
|
51
51
|
program_id: formData.value.program_id,
|
52
|
-
|
52
|
+
units: formData.value.units,
|
53
53
|
unit_cost: parseFloat(unit_cost.toString()).toFixed(4) + ' ' + CURRENCY,
|
54
54
|
product_lifecycle_secs: 86400 * formData.value.product_lifecycle_days,
|
55
55
|
data: {
|
@@ -73,7 +73,7 @@ q-card(bordered flat)
|
|
73
73
|
Form(:handler-submit="handlerSubmit" :is-submitting="isSubmitting" :show-cancel="false" :button-cancel-txt="'Отменить'" :button-submit-txt="'Создать объявление'").q-mt-lg
|
74
74
|
q-input(v-model="formData.title" square standout="bg-teal text-white" label="Заголовок").q-ma-md
|
75
75
|
q-input(v-model="formData.description" square standout="bg-teal text-white" label="Описание" type="textarea").q-ma-md
|
76
|
-
q-input(v-model="formData.
|
76
|
+
q-input(v-model="formData.units" square standout="bg-teal text-white" label="Количество единиц" type="number").q-ma-md
|
77
77
|
q-input(v-model="formData.unit_cost_number" square standout="bg-teal text-white" type="number" controls-position="right" :precision="4" :step="1.0000" :min="0" label="Введите сумму:").q-ma-md
|
78
78
|
q-input(v-model="formData.product_lifecycle_days" square standout="bg-teal text-white" label="Гарантийный срок в днях" ).q-pa-md
|
79
79
|
q-select(v-model="formData.program_id" square standout="bg-teal text-white" :options="programs" map-options emit-value option-label="title" option-value="id" label="Целевая программа").q-ma-md
|
@@ -20,7 +20,7 @@ async function recieve(
|
|
20
20
|
|
21
21
|
const result = await transact({
|
22
22
|
account: ContractsList.Marketplace,
|
23
|
-
name: MarketContract.Actions.
|
23
|
+
name: MarketContract.Actions.ReceiveOnRequest.actionName,
|
24
24
|
authorization: [
|
25
25
|
{
|
26
26
|
actor: params.username,
|
@@ -32,7 +32,7 @@ async function recieve(
|
|
32
32
|
coopname: params.coopname,
|
33
33
|
exchange_id: params.request_id,
|
34
34
|
document,
|
35
|
-
} as MarketContract.Actions.
|
35
|
+
} as MarketContract.Actions.ReceiveOnRequest.IReceiveOnRequest,
|
36
36
|
});
|
37
37
|
|
38
38
|
const requestsStore = useRequestStore();
|
@@ -10,7 +10,7 @@ import { TransactResult } from '@wharfkit/session';
|
|
10
10
|
async function supplyOnRequest(
|
11
11
|
params: ISupplyOnRequest
|
12
12
|
): Promise<TransactResult | undefined> {
|
13
|
-
//TODO получить
|
13
|
+
//TODO получить подписанный акт приёма-передачи имущества
|
14
14
|
const document = {
|
15
15
|
hash: '33CBC662E606F23F332B442BAB84F2D05BD498B66EF61BC918740606B05BD565',
|
16
16
|
public_key: 'PUB_K1_8YWRWjCdUQubPoHzT5ndvfhGKDf1ZL7v7Ge9iHoLtNp7wnVfG1',
|
@@ -11,7 +11,7 @@ async function updateRequestData(
|
|
11
11
|
): Promise<TransactResult | undefined> {
|
12
12
|
const result = await transact({
|
13
13
|
account: ContractsList.Marketplace,
|
14
|
-
name: MarketContract.Actions.
|
14
|
+
name: MarketContract.Actions.UpdateRequest.actionName,
|
15
15
|
authorization: [
|
16
16
|
{
|
17
17
|
actor: params.username,
|
@@ -26,7 +26,7 @@ async function updateRequestData(
|
|
26
26
|
unit_cost: params.unitCost,
|
27
27
|
data: JSON.stringify(params.data),
|
28
28
|
meta: '',
|
29
|
-
} as MarketContract.Actions.
|
29
|
+
} as MarketContract.Actions.UpdateRequest.IUpdateRequest,
|
30
30
|
});
|
31
31
|
|
32
32
|
const requestsStore = useRequestStore();
|
@@ -4,7 +4,7 @@ div(v-if="userData.organization_data").q-gutter-sm.q-mt-md
|
|
4
4
|
v-model="userData.organization_data.type"
|
5
5
|
label="Выберите тип организации"
|
6
6
|
standout="bg-teal text-white"
|
7
|
-
:options="[{ label: 'Потребительский Кооператив', value: 'coop' }, { label: 'ООО', value: 'ooo' }]"
|
7
|
+
:options="[{ label: 'Потребительский Кооператив', value: 'coop' }, { label: 'Производственный Кооператив', value: 'prodcoop' }, { label: 'ООО', value: 'ooo' }]"
|
8
8
|
emit-value
|
9
9
|
map-options).q-mb-md
|
10
10
|
q-input(v-model="userData.organization_data.short_name" standout="bg-teal text-white" hint="ПК Ромашка" label="Краткое наименование организации" :rules="[val => notEmpty(val)]" autocomplete="off")
|
@@ -8,7 +8,9 @@ div.q-pa-md
|
|
8
8
|
AutoAvatar(style="width: 60px; border-radius: 50%;" :username="currentUser.username")
|
9
9
|
div.col-12.col-md-9.q-mt-sm.q-mt-md-0
|
10
10
|
q-badge(color="primary" style="font-size: 12px; margin-bottom: 4px;") {{role}}
|
11
|
-
div.text-h6
|
11
|
+
div.text-h6
|
12
|
+
span(v-if="isIP").q-mr-sm ИП
|
13
|
+
| {{displayName}}
|
12
14
|
div.row
|
13
15
|
DepositButton.col-6.border-left-radius-buttons
|
14
16
|
WithdrawButton.col-6.border-right-radius-buttons
|
@@ -34,6 +36,8 @@ const currentUser = useCurrentUserStore()
|
|
34
36
|
|
35
37
|
const userType = computed(() => currentUser.userAccount?.type)
|
36
38
|
|
39
|
+
const isIP = computed(() => currentUser.userAccount?.type === 'entrepreneur')
|
40
|
+
|
37
41
|
const role = computed(() => {
|
38
42
|
if (currentUser.userAccount?.role === 'user')
|
39
43
|
return 'Пайщик'
|