@coopenomics/desktop 2.2.6-alpha.0 → 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.
Files changed (88) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/extensions/powerup/boot.ts +1 -1
  3. package/package.json +6 -6
  4. package/src/app/App.vue +4 -2
  5. package/src/app/providers/card/store.ts +6 -3
  6. package/src/boot/branch-selector.ts +0 -2
  7. package/src/boot/init-stores.ts +5 -3
  8. package/src/boot/navigation-guards.ts +5 -7
  9. package/src/components/menu/footerMobileMenu.vue +4 -2
  10. package/src/components/soviet/staff.vue +9 -7
  11. package/src/desktops/User/model/index.ts +89 -87
  12. package/src/entities/Request/api/index.ts +19 -19
  13. package/src/entities/Request/model/stores.ts +1 -0
  14. package/src/entities/System/model/store.ts +1 -1
  15. package/src/entities/User/model/entity.ts +1 -0
  16. package/src/features/Agreementer/GenerateAgreement/ui/AgreementReader.vue +4 -2
  17. package/src/features/Agreementer/SignAgreementDialog/model/index.ts +4 -3
  18. package/src/features/Agreementer/SignAgreementDialog/ui/SignAgreementDialog.vue +4 -2
  19. package/src/features/Branch/CreateBranch/model/index.ts +4 -3
  20. package/src/features/Branch/EditBranch/model/index.ts +3 -2
  21. package/src/features/Branch/SelectBranch/model/index.ts +1 -1
  22. package/src/features/Branch/SelectBranch/ui/SelectBranchOverlay.vue +5 -7
  23. package/src/features/Decision/AuthorizeAndExecDecision/model/index.ts +6 -6
  24. package/src/features/Decision/VoteForDecision/model/index.ts +4 -2
  25. package/src/features/Installer/ui/RequestKeyForm/RequestKeyForm.vue +4 -2
  26. package/src/features/PaymentMethod/AddPaymentMethod/model/index.ts +4 -6
  27. package/src/features/PaymentMethod/DeletePaymentMethod/model/index.ts +3 -2
  28. package/src/features/Request/AcceptRequest/api/index.ts +20 -21
  29. package/src/features/Request/CancelRequest/api/index.ts +13 -17
  30. package/src/features/Request/CompleteOnRequest/api/index.ts +13 -17
  31. package/src/features/Request/ConfirmRecieveOnRequest/api/index.ts +17 -21
  32. package/src/features/Request/ConfirmSupplyOnRequest/api/index.ts +17 -21
  33. package/src/features/Request/CreateChildOrder/api/index.ts +73 -51
  34. package/src/features/Request/CreateChildOrder/model/index.ts +46 -0
  35. package/src/features/Request/CreateChildOrder/model/types.ts +1 -1
  36. package/src/features/Request/CreateChildOrder/ui/CreateChildOrderButton/CreateChildOrderButton.vue +28 -4
  37. package/src/features/Request/CreateParentOffer/api/index.ts +5 -15
  38. package/src/features/Request/CreateParentOffer/model/types.ts +2 -2
  39. package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +8 -5
  40. package/src/features/Request/DeclineRequest/api/index.ts +14 -18
  41. package/src/features/Request/DeliverOnRequest/api/index.ts +13 -17
  42. package/src/features/Request/DisputeOnRequest/api/index.ts +3 -7
  43. package/src/features/Request/ModerateRequest/api/index.ts +14 -18
  44. package/src/features/Request/ModerateRequest/ui/ModerateRequestButton.vue +4 -3
  45. package/src/features/Request/ProhibitRequest/api/index.ts +14 -18
  46. package/src/features/Request/PublishRequest/api/index.ts +13 -17
  47. package/src/features/Request/RecieveOnRequest/api/index.ts +17 -21
  48. package/src/features/Request/SupplyOnRequest/api/index.ts +4 -4
  49. package/src/features/Request/UnpublishRequest/api/index.ts +14 -17
  50. package/src/features/Request/UpdateRequest/api/index.ts +2 -6
  51. package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +4 -2
  52. package/src/features/User/CreateUser/model/index.ts +10 -8
  53. package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +4 -2
  54. package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +4 -2
  55. package/src/pages/Cooperative/ListOfBranches/ui/ListOfBranchesPage.vue +4 -2
  56. package/src/pages/Documentor/ListOfDocuments/ListOfDocumentsPage.vue +4 -2
  57. package/src/pages/Marketplace/CreateParentOffer/ui/CreateParentOfferPage.vue +3 -3
  58. package/src/pages/Marketplace/MainPage/ui/MainPage.vue +13 -13
  59. package/src/pages/Marketplace/Moderation/ui/ModerationPage.vue +7 -3
  60. package/src/pages/Marketplace/OfferPage/ui/OfferPage.vue +4 -2
  61. package/src/pages/Registrator/SignUp/PayInitial.vue +4 -2
  62. package/src/pages/Registrator/SignUp/ReadStatement.vue +7 -1
  63. package/src/pages/Registrator/SignUp/SelectBranch.vue +5 -3
  64. package/src/pages/Registrator/SignUp/SignUp.vue +7 -7
  65. package/src/pages/Registrator/SignUp/WaitingRegistration.vue +4 -2
  66. package/src/pages/Union/Connection/ConnectionPage.vue +1 -1
  67. package/src/pages/_layouts/default.vue +3 -2
  68. package/src/shared/store/index.ts +16 -18
  69. package/src/shared/ui/BaseDocument/BaseDocument.vue +1 -3
  70. package/src/shared/ui/Providers/Bank/Bank.vue +54 -2
  71. package/src/shared/ui/UserDataForm/OrganizationDataForm/OrganizationDataForm.vue +1 -1
  72. package/src/widgets/Agreementer/RequireAgreements/ui/RequireAgreements.vue +5 -3
  73. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/ListOfQuestions.vue +11 -3
  74. package/src/widgets/Cooperative/Contacts/ui/ChangeContacts.vue +5 -3
  75. package/src/widgets/Cooperative/Contributions/ui/ChangeContributions.vue +6 -4
  76. package/src/widgets/Cooperative/Funds/ui/AccumulationFunds.vue +8 -7
  77. package/src/widgets/Cooperative/Funds/ui/AddAccumulationFund.vue +5 -3
  78. package/src/widgets/Cooperative/Funds/ui/AddExpenseFund.vue +5 -3
  79. package/src/widgets/Cooperative/Funds/ui/ExpenseFunds.vue +8 -7
  80. package/src/widgets/Cooperative/Members/ui/Members.vue +4 -2
  81. package/src/widgets/Desktop/SecondLevelMenu/SecondLevelMenu.vue +4 -2
  82. package/src/widgets/Desktop/SecondLevelMenuList/SecondLevelMenuList.vue +61 -62
  83. package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +5 -3
  84. package/src/widgets/Request/CreateChildOrderCard/CreateChildOrderCard.vue +5 -3
  85. package/src/widgets/Request/SupplyOrderRequestCard/ui/Steps/FirstStep.vue +3 -3
  86. package/src/widgets/User/CoopCard/ui/CoopCard.vue +5 -1
  87. package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +4 -2
  88. package/src/shared/api/wif.ts +0 -9
@@ -5,7 +5,7 @@ export interface ICreateChildOrder {
5
5
  coopname: string;
6
6
  parent_id: string | number;
7
7
  program_id: string | number;
8
- pieces: string | number;
8
+ units: string | number;
9
9
  unit_cost: string;
10
10
  }
11
11
 
@@ -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
- pieces: props.units,
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>
@@ -4,22 +4,14 @@ import { transact } from 'src/shared/api';
4
4
  import { ContractsList } from 'src/shared/config';
5
5
  import { useRequestStore } from 'src/entities/Request/model/stores';
6
6
  import { ILoadUserParentOffers } from 'src/entities/Request';
7
- import { IDocument } from 'src/shared/lib/types/document';
8
7
  import { MarketContract } from 'cooptypes';
9
8
 
10
9
  async function createParentOffer(
11
10
  params: ICreateOffer
12
11
  ): Promise<TransactResult | undefined> {
13
- //TODO здесь передаём пустой документ
14
- const document = {
15
- hash: '',
16
- public_key: '',
17
- signature: '',
18
- meta: '',
19
- } as IDocument;
20
12
 
21
- const result = await transact({
22
- actions: [
13
+ // здесь мы не передаём документ
14
+ const result = await transact(
23
15
  {
24
16
  account: ContractsList.Marketplace,
25
17
  name: MarketContract.Actions.CreateOffer.actionName,
@@ -35,17 +27,15 @@ async function createParentOffer(
35
27
  coopname: params.coopname,
36
28
  parent_id: 0,
37
29
  program_id: params.program_id,
38
- pieces: params.pieces,
30
+ units: params.units,
39
31
  unit_cost: params.unit_cost,
40
32
  product_lifecycle_secs: params.product_lifecycle_secs,
41
- document,
33
+ // document,
42
34
  data: JSON.stringify(params.data),
43
35
  meta: '',
44
36
  },
45
37
  } as MarketContract.Actions.CreateOffer.ICreateOffer,
46
- },
47
- ],
48
- });
38
+ });
49
39
 
50
40
  const requestsStore = useRequestStore();
51
41
  requestsStore.loadUserParentOffers({
@@ -4,7 +4,7 @@ export interface ICreateOffer {
4
4
  username: string;
5
5
  coopname: string;
6
6
  program_id: string | number;
7
- pieces: string | number;
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
- pieces: number;
16
+ units: number;
17
17
  unit_cost_number: number;
18
18
  product_lifecycle_days: number;
19
19
  program_id: number;
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { FailAlert, SuccessAlert } from 'src/shared/api'
2
+ import { failAlert, SuccessAlert } from 'src/shared/api'
3
3
  import { api } from '../../api'
4
4
  import type { ICreateOffer, IFormData } from 'src/features/Request/CreateParentOffer/model'
5
5
  import { computed, ref } from 'vue'
@@ -8,6 +8,7 @@ import { useCooperativeStore } from 'src/entities/Cooperative'
8
8
  import { ImageUploaderWithPreview } from '../ImageUploaderWithPreview'
9
9
  import { CURRENCY } from 'src/shared/config'
10
10
 
11
+
11
12
  const props = defineProps({
12
13
  username: {
13
14
  type: String,
@@ -33,7 +34,7 @@ const updateImages = (previewImage: string, images: string[]) => {
33
34
  const formData = ref<IFormData>({
34
35
  title: '',
35
36
  description: '',
36
- pieces: 1,
37
+ units: 1,
37
38
  unit_cost_number: 0,
38
39
  product_lifecycle_days: 3,
39
40
  program_id: 0,
@@ -48,7 +49,7 @@ const handlerSubmit = async () => {
48
49
  username: props.username,
49
50
  coopname: props.coopname,
50
51
  program_id: formData.value.program_id,
51
- pieces: formData.value.pieces,
52
+ units: formData.value.units,
52
53
  unit_cost: parseFloat(unit_cost.toString()).toFixed(4) + ' ' + CURRENCY,
53
54
  product_lifecycle_secs: 86400 * formData.value.product_lifecycle_days,
54
55
  data: {
@@ -58,10 +59,12 @@ const handlerSubmit = async () => {
58
59
  images: formData.value.images,
59
60
  },
60
61
  })
62
+ console.log(offerData)
61
63
  await api.createParentOffer(offerData.value)
62
64
  SuccessAlert('Объявление успешно создано')
63
65
  } catch (e: any) {
64
- FailAlert(e.message)
66
+ console.log(e)
67
+ failAlert(e.message)
65
68
  }
66
69
  }
67
70
  </script>
@@ -70,7 +73,7 @@ q-card(bordered flat)
70
73
  Form(:handler-submit="handlerSubmit" :is-submitting="isSubmitting" :show-cancel="false" :button-cancel-txt="'Отменить'" :button-submit-txt="'Создать объявление'").q-mt-lg
71
74
  q-input(v-model="formData.title" square standout="bg-teal text-white" label="Заголовок").q-ma-md
72
75
  q-input(v-model="formData.description" square standout="bg-teal text-white" label="Описание" type="textarea").q-ma-md
73
- q-input(v-model="formData.pieces" square standout="bg-teal text-white" label="Количество единиц" type="number").q-ma-md
76
+ q-input(v-model="formData.units" square standout="bg-teal text-white" label="Количество единиц" type="number").q-ma-md
74
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
75
78
  q-input(v-model="formData.product_lifecycle_days" square standout="bg-teal text-white" label="Гарантийный срок в днях" ).q-pa-md
76
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
@@ -11,24 +11,20 @@ async function declineRequest(
11
11
  params: IDeclineRequest
12
12
  ): Promise<TransactResult | undefined> {
13
13
  const result = await transact({
14
- actions: [
15
- {
16
- account: ContractsList.Marketplace,
17
- name: MarketContract.Actions.DeclineRequest.actionName,
18
- authorization: [
19
- {
20
- actor: params.username,
21
- permission: 'active',
22
- },
23
- ],
24
- data: {
25
- username: params.username,
26
- coopname: params.coopname,
27
- exchange_id: params.request_id,
28
- meta: '',
29
- } as MarketContract.Actions.DeclineRequest.IDeclineRequest,
30
- },
31
- ],
14
+ account: ContractsList.Marketplace,
15
+ name: MarketContract.Actions.DeclineRequest.actionName,
16
+ authorization: [
17
+ {
18
+ actor: params.username,
19
+ permission: 'active',
20
+ },
21
+ ],
22
+ data: {
23
+ username: params.username,
24
+ coopname: params.coopname,
25
+ exchange_id: params.request_id,
26
+ meta: '',
27
+ } as MarketContract.Actions.DeclineRequest.IDeclineRequest,
32
28
  });
33
29
 
34
30
  const requestsStore = useRequestStore();
@@ -10,23 +10,19 @@ async function deliverOnRequest(
10
10
  params: IDeliverOnRequest
11
11
  ): Promise<TransactResult | undefined> {
12
12
  const result = await transact({
13
- actions: [
14
- {
15
- account: ContractsList.Marketplace,
16
- name: MarketContract.Actions.DeliverOnRequest.actionName,
17
- authorization: [
18
- {
19
- actor: params.username,
20
- permission: 'active',
21
- },
22
- ],
23
- data: {
24
- username: params.username,
25
- coopname: params.coopname,
26
- exchange_id: params.request_id,
27
- } as MarketContract.Actions.DeliverOnRequest.IDeliverOnRequest,
28
- },
29
- ],
13
+ account: ContractsList.Marketplace,
14
+ name: MarketContract.Actions.DeliverOnRequest.actionName,
15
+ authorization: [
16
+ {
17
+ actor: params.username,
18
+ permission: 'active',
19
+ },
20
+ ],
21
+ data: {
22
+ username: params.username,
23
+ coopname: params.coopname,
24
+ exchange_id: params.request_id,
25
+ } as MarketContract.Actions.DeliverOnRequest.IDeliverOnRequest,
30
26
  });
31
27
 
32
28
  const requestsStore = useRequestStore();
@@ -12,15 +12,13 @@ async function dispute(
12
12
  ): Promise<TransactResult | undefined> {
13
13
  //TODO здесь нужно получить подписанный документ (заявление на взнос имуществом) и подставить
14
14
  const document = {
15
- hash: '',
16
- public_key: '',
17
- signature: '',
15
+ hash: '33CBC662E606F23F332B442BAB84F2D05BD498B66EF61BC918740606B05BD565',
16
+ public_key: 'PUB_K1_8YWRWjCdUQubPoHzT5ndvfhGKDf1ZL7v7Ge9iHoLtNp7wnVfG1',
17
+ signature: 'SIG_K1_KWeGQ48n78ybpkuVDf1M7nuGnT8pkPXFbYYMUXtFTFv2dEReMEmwW89r19dKmAVSFZwHTdxdqkB3ZQJeAS9CcQwb92E398',
18
18
  meta: '',
19
19
  } as IDocument;
20
20
 
21
21
  const result = await transact({
22
- actions: [
23
- {
24
22
  account: ContractsList.Marketplace,
25
23
  name: MarketContract.Actions.OpenDispute.actionName,
26
24
  authorization: [
@@ -35,8 +33,6 @@ async function dispute(
35
33
  exchange_id: params.request_id,
36
34
  document,
37
35
  } as MarketContract.Actions.OpenDispute.IOpenDispute,
38
- },
39
- ],
40
36
  });
41
37
 
42
38
  const requestsStore = useRequestStore();
@@ -9,24 +9,20 @@ async function moderateRequest(
9
9
  params: IModerateRequest
10
10
  ): Promise<TransactResult | undefined> {
11
11
  const result = await transact({
12
- actions: [
13
- {
14
- account: ContractsList.Marketplace,
15
- name: MarketContract.Actions.ModerateRequest.actionName,
16
- authorization: [
17
- {
18
- actor: params.username,
19
- permission: 'active',
20
- },
21
- ],
22
- data: {
23
- username: params.username,
24
- coopname: params.coopname,
25
- exchange_id: params.request_id,
26
- cancellation_fee: params.cancellation_fee,
27
- } as MarketContract.Actions.ModerateRequest.IModerateRequest,
28
- },
29
- ],
12
+ account: ContractsList.Marketplace,
13
+ name: MarketContract.Actions.ModerateRequest.actionName,
14
+ authorization: [
15
+ {
16
+ actor: params.username,
17
+ permission: 'active',
18
+ },
19
+ ],
20
+ data: {
21
+ username: params.username,
22
+ coopname: params.coopname,
23
+ exchange_id: params.request_id,
24
+ cancellation_fee: params.cancellation_fee,
25
+ } as MarketContract.Actions.ModerateRequest.IModerateRequest,
30
26
  });
31
27
 
32
28
  const requestsStore = useRequestStore();
@@ -1,9 +1,9 @@
1
1
  <template lang="pug">
2
- q-btn(color="red" @click="moderate") подтвердить модерацию
2
+ q-btn(color="red" @click="moderate") подтвердить модерацию
3
3
  </template>
4
4
 
5
5
  <script setup lang="ts">
6
- import { SuccessAlert } from 'src/shared/api'
6
+ import { failAlert, SuccessAlert } from 'src/shared/api'
7
7
  import { ref } from 'vue'
8
8
  import { api } from '../api'
9
9
 
@@ -34,7 +34,8 @@ q-btn(color="red" @click="moderate") подтвердить модерацию
34
34
  })
35
35
  SuccessAlert('Модерация заявки подтверждена')
36
36
  } catch (e: any) {
37
- SuccessAlert(e.message)
37
+ failAlert(e)
38
38
  }
39
39
  }
40
+
40
41
  </script>
@@ -9,24 +9,20 @@ async function prohibitRequest(
9
9
  params: IProhibitRequest
10
10
  ): Promise<TransactResult | undefined> {
11
11
  const result = await transact({
12
- actions: [
13
- {
14
- account: ContractsList.Marketplace,
15
- name: MarketContract.Actions.ProhibitRequest.actionName,
16
- authorization: [
17
- {
18
- actor: params.username,
19
- permission: 'active',
20
- },
21
- ],
22
- data: {
23
- username: params.username,
24
- coopname: params.coopname,
25
- exchange_id: params.request_id,
26
- meta: '',
27
- } as MarketContract.Actions.ProhibitRequest.IProhibitRequest,
28
- },
29
- ],
12
+ account: ContractsList.Marketplace,
13
+ name: MarketContract.Actions.ProhibitRequest.actionName,
14
+ authorization: [
15
+ {
16
+ actor: params.username,
17
+ permission: 'active',
18
+ },
19
+ ],
20
+ data: {
21
+ username: params.username,
22
+ coopname: params.coopname,
23
+ exchange_id: params.request_id,
24
+ meta: '',
25
+ } as MarketContract.Actions.ProhibitRequest.IProhibitRequest,
30
26
  });
31
27
 
32
28
  const requestsStore = useRequestStore();
@@ -10,23 +10,19 @@ async function publishRequest(
10
10
  params: IPublishRequest
11
11
  ): Promise<TransactResult | undefined> {
12
12
  const result = await transact({
13
- actions: [
14
- {
15
- account: ContractsList.Marketplace,
16
- name: MarketContract.Actions.PublishRequest.actionName,
17
- authorization: [
18
- {
19
- actor: params.username,
20
- permission: 'active',
21
- },
22
- ],
23
- data: {
24
- username: params.username,
25
- coopname: params.coopname,
26
- exchange_id: params.request_id,
27
- } as MarketContract.Actions.PublishRequest.IPublishRequest,
28
- },
29
- ],
13
+ account: ContractsList.Marketplace,
14
+ name: MarketContract.Actions.PublishRequest.actionName,
15
+ authorization: [
16
+ {
17
+ actor: params.username,
18
+ permission: 'active',
19
+ },
20
+ ],
21
+ data: {
22
+ username: params.username,
23
+ coopname: params.coopname,
24
+ exchange_id: params.request_id,
25
+ } as MarketContract.Actions.PublishRequest.IPublishRequest,
30
26
  });
31
27
 
32
28
  const requestsStore = useRequestStore();
@@ -12,31 +12,27 @@ async function recieve(
12
12
  ): Promise<TransactResult | undefined> {
13
13
  //TODO здесь нужно получить подписанный документ (заявление на взнос имуществом) и подставить
14
14
  const document = {
15
- hash: '',
16
- public_key: '',
17
- signature: '',
15
+ hash: '33CBC662E606F23F332B442BAB84F2D05BD498B66EF61BC918740606B05BD565',
16
+ public_key: 'PUB_K1_8YWRWjCdUQubPoHzT5ndvfhGKDf1ZL7v7Ge9iHoLtNp7wnVfG1',
17
+ signature: 'SIG_K1_KWeGQ48n78ybpkuVDf1M7nuGnT8pkPXFbYYMUXtFTFv2dEReMEmwW89r19dKmAVSFZwHTdxdqkB3ZQJeAS9CcQwb92E398',
18
18
  meta: '',
19
19
  } as IDocument;
20
20
 
21
21
  const result = await transact({
22
- actions: [
23
- {
24
- account: ContractsList.Marketplace,
25
- name: MarketContract.Actions.RecieveOnRequest.actionName,
26
- authorization: [
27
- {
28
- actor: params.username,
29
- permission: 'active',
30
- },
31
- ],
32
- data: {
33
- username: params.username,
34
- coopname: params.coopname,
35
- exchange_id: params.request_id,
36
- document,
37
- } as MarketContract.Actions.RecieveOnRequest.IRecieveOnRequest,
38
- },
39
- ],
22
+ account: ContractsList.Marketplace,
23
+ name: MarketContract.Actions.ReceiveOnRequest.actionName,
24
+ authorization: [
25
+ {
26
+ actor: params.username,
27
+ permission: 'active',
28
+ },
29
+ ],
30
+ data: {
31
+ username: params.username,
32
+ coopname: params.coopname,
33
+ exchange_id: params.request_id,
34
+ document,
35
+ } as MarketContract.Actions.ReceiveOnRequest.IReceiveOnRequest,
40
36
  });
41
37
 
42
38
  const requestsStore = useRequestStore();
@@ -10,11 +10,11 @@ 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
- hash: '',
16
- public_key: '',
17
- signature: '',
15
+ hash: '33CBC662E606F23F332B442BAB84F2D05BD498B66EF61BC918740606B05BD565',
16
+ public_key: 'PUB_K1_8YWRWjCdUQubPoHzT5ndvfhGKDf1ZL7v7Ge9iHoLtNp7wnVfG1',
17
+ signature: 'SIG_K1_KWeGQ48n78ybpkuVDf1M7nuGnT8pkPXFbYYMUXtFTFv2dEReMEmwW89r19dKmAVSFZwHTdxdqkB3ZQJeAS9CcQwb92E398',
18
18
  meta: '',
19
19
  } as IDocument;
20
20
 
@@ -10,23 +10,20 @@ async function unpublishRequest(
10
10
  params: IUnpublishRequest
11
11
  ): Promise<TransactResult | undefined> {
12
12
  const result = await transact({
13
- actions: [
14
- {
15
- account: ContractsList.Marketplace,
16
- name: MarketContract.Actions.UnpublishRequest.actionName,
17
- authorization: [
18
- {
19
- actor: params.username,
20
- permission: 'active',
21
- },
22
- ],
23
- data: {
24
- username: params.username,
25
- coopname: params.coopname,
26
- exchange_id: params.request_id,
27
- } as MarketContract.Actions.UnpublishRequest.IUnpublishRequest,
28
- },
29
- ],
13
+ account: ContractsList.Marketplace,
14
+ name: MarketContract.Actions.UnpublishRequest.actionName,
15
+ authorization: [
16
+ {
17
+ actor: params.username,
18
+ permission: 'active',
19
+ },
20
+ ],
21
+ data: {
22
+ username: params.username,
23
+ coopname: params.coopname,
24
+ exchange_id: params.request_id,
25
+ } as MarketContract.Actions.UnpublishRequest.IUnpublishRequest,
26
+
30
27
  });
31
28
 
32
29
  const requestsStore = useRequestStore();
@@ -10,10 +10,8 @@ async function updateRequestData(
10
10
  params: IUpdateRequestData
11
11
  ): Promise<TransactResult | undefined> {
12
12
  const result = await transact({
13
- actions: [
14
- {
15
13
  account: ContractsList.Marketplace,
16
- name: MarketContract.Actions.UpdateRequests.actionName,
14
+ name: MarketContract.Actions.UpdateRequest.actionName,
17
15
  authorization: [
18
16
  {
19
17
  actor: params.username,
@@ -28,9 +26,7 @@ async function updateRequestData(
28
26
  unit_cost: params.unitCost,
29
27
  data: JSON.stringify(params.data),
30
28
  meta: '',
31
- } as MarketContract.Actions.UpdateRequests.IUpdateRequest,
32
- },
33
- ],
29
+ } as MarketContract.Actions.UpdateRequest.IUpdateRequest,
34
30
  });
35
31
 
36
32
  const requestsStore = useRequestStore();
@@ -95,7 +95,9 @@ import { useCooperativeStore } from 'src/entities/Cooperative';
95
95
  import { useRegistratorStore } from 'src/entities/Registrator';
96
96
  import { FailAlert, SuccessAlert } from 'src/shared/api';
97
97
  import { useCreateUser } from 'src/features/User/CreateUser';
98
- import { COOPNAME } from 'src/shared/config';
98
+ import { useSystemStore } from 'src/entities/System/model';
99
+ const { info } = useSystemStore()
100
+
99
101
  import { notEmpty } from 'src/shared/lib/utils';
100
102
 
101
103
  const { state, addUserState, clearUserData } = useRegistratorStore()
@@ -122,7 +124,7 @@ const coop = useCooperativeStore()
122
124
 
123
125
  onMounted(async () => {
124
126
 
125
- await coop.loadPublicCooperativeData(COOPNAME)
127
+ await coop.loadPublicCooperativeData(info.coopname)
126
128
 
127
129
  if (coop.publicCooperativeData) {
128
130
 
@@ -6,7 +6,8 @@ import { IGeneratedAccount, ISendStatement } from 'src/shared/lib/types/user';
6
6
 
7
7
  import { useSessionStore } from 'src/entities/Session';
8
8
  import { useGlobalStore } from 'src/shared/store';
9
- import { COOPNAME } from 'src/shared/config';
9
+ import { useSystemStore } from 'src/entities/System/model';
10
+
10
11
  import { IObjectedDocument } from 'src/shared/lib/types/document';
11
12
  import {
12
13
  ICreatedPayment,
@@ -33,6 +34,7 @@ export interface ICreateUser {
33
34
 
34
35
  export function useCreateUser() {
35
36
  const store = useRegistratorStore().state
37
+ const { info } = useSystemStore()
36
38
 
37
39
  async function createInitialPayment(): Promise<ICreatedPayment> {
38
40
  const result = await api.createInitialPaymentOrder();
@@ -60,7 +62,7 @@ export function useCreateUser() {
60
62
  data: {
61
63
  signature: store.signature,
62
64
  skip_save: false,
63
- coopname: COOPNAME,
65
+ coopname: info.coopname,
64
66
  username: store.account.username,
65
67
  braname: store.selectedBranch,
66
68
  links: [store.walletAgreement.hash, store.privacyAgreement.hash, store.signatureAgreement.hash, store.userAgreement.hash]
@@ -80,7 +82,7 @@ export function useCreateUser() {
80
82
  async function signPrivacyAgreement(): Promise<IObjectedDocument> {
81
83
  const variables: Mutations.Agreements.GeneratePrivacyAgreement.IInput = {
82
84
  data: {
83
- coopname: COOPNAME,
85
+ coopname: info.coopname,
84
86
  username: store.account.username,
85
87
  }
86
88
  }
@@ -98,7 +100,7 @@ export function useCreateUser() {
98
100
  async function signSignatureAgreement(): Promise<IObjectedDocument> {
99
101
  const variables: Mutations.Agreements.GenerateSignatureAgreement.IInput = {
100
102
  data: {
101
- coopname: COOPNAME,
103
+ coopname: info.coopname,
102
104
  username: store.account.username,
103
105
  }
104
106
  }
@@ -118,7 +120,7 @@ export function useCreateUser() {
118
120
  async function signUserAgreement(): Promise<IObjectedDocument> {
119
121
  const variables: Mutations.Agreements.GenerateUserAgreement.IInput = {
120
122
  data: {
121
- coopname: COOPNAME,
123
+ coopname: info.coopname,
122
124
  username: store.account.username,
123
125
  }
124
126
  }
@@ -140,7 +142,7 @@ export function useCreateUser() {
140
142
  async function signWalletAgreement(): Promise<IObjectedDocument> {
141
143
  const variables: Mutations.Agreements.GenerateWalletAgreement.IInput = {
142
144
  data: {
143
- coopname: COOPNAME,
145
+ coopname: info.coopname,
144
146
  username: store.account.username,
145
147
  }
146
148
  }
@@ -161,7 +163,7 @@ export function useCreateUser() {
161
163
  data: {
162
164
  signature: '',
163
165
  skip_save: true,
164
- coopname: COOPNAME,
166
+ coopname: info.coopname,
165
167
  username: store.account.username,
166
168
  braname: store.selectedBranch,
167
169
  }
@@ -210,7 +212,7 @@ export function useCreateUser() {
210
212
  await sessionStore.init();
211
213
 
212
214
  const currentUser = useCurrentUserStore();
213
- await currentUser.loadProfile(user.username, COOPNAME);
215
+ await currentUser.loadProfile(user.username, info.coopname);
214
216
  }
215
217
 
216
218
  function emailIsValid(email: string): boolean {