@coopenomics/desktop 2.2.5 → 2.2.6

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 (78) hide show
  1. package/CHANGELOG.md +8 -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/navigation-guards.ts +5 -7
  8. package/src/components/menu/footerMobileMenu.vue +4 -2
  9. package/src/components/soviet/staff.vue +9 -7
  10. package/src/desktops/User/model/index.ts +94 -87
  11. package/src/entities/Request/api/index.ts +19 -19
  12. package/src/entities/Request/model/stores.ts +1 -0
  13. package/src/entities/User/model/entity.ts +1 -0
  14. package/src/features/Agreementer/GenerateAgreement/ui/AgreementReader.vue +4 -2
  15. package/src/features/Agreementer/SignAgreementDialog/model/index.ts +4 -3
  16. package/src/features/Agreementer/SignAgreementDialog/ui/SignAgreementDialog.vue +4 -2
  17. package/src/features/Branch/CreateBranch/model/index.ts +4 -3
  18. package/src/features/Branch/EditBranch/model/index.ts +3 -2
  19. package/src/features/Decision/AuthorizeAndExecDecision/model/index.ts +6 -6
  20. package/src/features/Decision/VoteForDecision/model/index.ts +4 -2
  21. package/src/features/Installer/ui/RequestKeyForm/RequestKeyForm.vue +4 -2
  22. package/src/features/PaymentMethod/AddPaymentMethod/model/index.ts +4 -6
  23. package/src/features/PaymentMethod/DeletePaymentMethod/model/index.ts +3 -2
  24. package/src/features/Request/AcceptRequest/api/index.ts +20 -21
  25. package/src/features/Request/CancelRequest/api/index.ts +13 -17
  26. package/src/features/Request/CompleteOnRequest/api/index.ts +13 -17
  27. package/src/features/Request/ConfirmRecieveOnRequest/api/index.ts +17 -21
  28. package/src/features/Request/ConfirmSupplyOnRequest/api/index.ts +17 -21
  29. package/src/features/Request/CreateChildOrder/api/index.ts +27 -30
  30. package/src/features/Request/CreateParentOffer/api/index.ts +4 -14
  31. package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +5 -2
  32. package/src/features/Request/DeclineRequest/api/index.ts +14 -18
  33. package/src/features/Request/DeliverOnRequest/api/index.ts +13 -17
  34. package/src/features/Request/DisputeOnRequest/api/index.ts +3 -7
  35. package/src/features/Request/ModerateRequest/api/index.ts +14 -18
  36. package/src/features/Request/ModerateRequest/ui/ModerateRequestButton.vue +4 -3
  37. package/src/features/Request/ProhibitRequest/api/index.ts +14 -18
  38. package/src/features/Request/PublishRequest/api/index.ts +13 -17
  39. package/src/features/Request/RecieveOnRequest/api/index.ts +17 -21
  40. package/src/features/Request/SupplyOnRequest/api/index.ts +3 -3
  41. package/src/features/Request/UnpublishRequest/api/index.ts +14 -17
  42. package/src/features/Request/UpdateRequest/api/index.ts +0 -4
  43. package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +4 -2
  44. package/src/features/User/CreateUser/model/index.ts +10 -8
  45. package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +4 -2
  46. package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +4 -2
  47. package/src/pages/Cooperative/ListOfBranches/ui/ListOfBranchesPage.vue +4 -2
  48. package/src/pages/Documentor/ListOfDocuments/ListOfDocumentsPage.vue +4 -2
  49. package/src/pages/Marketplace/CreateParentOffer/ui/CreateParentOfferPage.vue +3 -3
  50. package/src/pages/Marketplace/MainPage/ui/MainPage.vue +13 -13
  51. package/src/pages/Marketplace/Moderation/ui/ModerationPage.vue +7 -3
  52. package/src/pages/Marketplace/OfferPage/ui/OfferPage.vue +4 -2
  53. package/src/pages/Registrator/SignUp/PayInitial.vue +4 -2
  54. package/src/pages/Registrator/SignUp/ReadStatement.vue +7 -1
  55. package/src/pages/Registrator/SignUp/SelectBranch.vue +4 -2
  56. package/src/pages/Registrator/SignUp/SignUp.vue +7 -7
  57. package/src/pages/Registrator/SignUp/WaitingRegistration.vue +4 -2
  58. package/src/pages/Union/Connection/ConnectionPage.vue +1 -1
  59. package/src/pages/_layouts/default.vue +3 -2
  60. package/src/shared/store/index.ts +16 -18
  61. package/src/shared/ui/BaseDocument/BaseDocument.vue +1 -3
  62. package/src/shared/ui/Providers/Bank/Bank.vue +54 -2
  63. package/src/widgets/Agreementer/RequireAgreements/ui/RequireAgreements.vue +5 -3
  64. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/ListOfQuestions.vue +11 -3
  65. package/src/widgets/Cooperative/Contacts/ui/ChangeContacts.vue +5 -3
  66. package/src/widgets/Cooperative/Contributions/ui/ChangeContributions.vue +6 -4
  67. package/src/widgets/Cooperative/Funds/ui/AccumulationFunds.vue +8 -7
  68. package/src/widgets/Cooperative/Funds/ui/AddAccumulationFund.vue +5 -3
  69. package/src/widgets/Cooperative/Funds/ui/AddExpenseFund.vue +5 -3
  70. package/src/widgets/Cooperative/Funds/ui/ExpenseFunds.vue +8 -7
  71. package/src/widgets/Cooperative/Members/ui/Members.vue +4 -2
  72. package/src/widgets/Desktop/SecondLevelMenu/SecondLevelMenu.vue +4 -2
  73. package/src/widgets/Desktop/SecondLevelMenuList/SecondLevelMenuList.vue +61 -62
  74. package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +5 -3
  75. package/src/widgets/Request/CreateChildOrderCard/CreateChildOrderCard.vue +5 -3
  76. package/src/widgets/Request/SupplyOrderRequestCard/ui/Steps/FirstStep.vue +3 -3
  77. package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +4 -2
  78. package/src/shared/api/wif.ts +0 -9
@@ -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.RecieveOnRequest.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.RecieveOnRequest.IRecieveOnRequest,
40
36
  });
41
37
 
42
38
  const requestsStore = useRequestStore();
@@ -12,9 +12,9 @@ async function supplyOnRequest(
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
 
@@ -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,8 +10,6 @@ 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
14
  name: MarketContract.Actions.UpdateRequests.actionName,
17
15
  authorization: [
@@ -29,8 +27,6 @@ async function updateRequestData(
29
27
  data: JSON.stringify(params.data),
30
28
  meta: '',
31
29
  } as MarketContract.Actions.UpdateRequests.IUpdateRequest,
32
- },
33
- ],
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 {
@@ -39,7 +39,9 @@ form(@submit.prevent="submit").full-width
39
39
  import { useCurrentUserStore } from 'src/entities/User';
40
40
  import { useLoginUser } from 'src/features/User/LoginUser';
41
41
  import { FailAlert } from 'src/shared/api';
42
- import { COOPNAME } from 'src/shared/config';
42
+ import { useSystemStore } from 'src/entities/System/model';
43
+ const { info } = useSystemStore()
44
+
43
45
  import { useGlobalStore } from 'src/shared/store';
44
46
  import { ref } from 'vue';
45
47
  import { useRouter } from 'vue-router';
@@ -58,7 +60,7 @@ const submit = async () => {
58
60
  try {
59
61
  const { login } = useLoginUser()
60
62
  await login(email.value, privateKey.value)
61
- await currentUser.loadProfile(globalStore.username, COOPNAME)
63
+ await currentUser.loadProfile(globalStore.username, info.coopname)
62
64
 
63
65
  if (!currentUser.isRegistrationComplete) {
64
66
  router.push({ name: 'signup' })
@@ -27,11 +27,13 @@ import { ModalBase } from 'src/shared/ui/ModalBase'
27
27
  import { useWalletStore } from 'src/entities/Wallet'
28
28
  import type { ILoadUserWallet } from 'src/entities/Wallet/model'
29
29
  import { PayWithProvider } from 'src/shared/ui/PayWithProvider'
30
- import { COOPNAME, CURRENCY } from 'src/shared/config'
30
+ import { CURRENCY } from 'src/shared/config'
31
31
  import { SuccessAlert, FailAlert } from 'src/shared/api'
32
32
  import { useSessionStore } from 'src/entities/Session'
33
33
  import type { IPaymentOrder } from 'src/shared/lib/types/payments'
34
34
  import { formatAssetToReadable } from 'src/shared/lib/utils/formatAssetToReadable'
35
+ import { useSystemStore } from 'src/entities/System/model';
36
+ const { info } = useSystemStore()
35
37
 
36
38
  const { createDeposit, loadUserWalet } = useWalletStore()
37
39
 
@@ -69,7 +71,7 @@ const paymentFail = (): void => {
69
71
  }
70
72
 
71
73
  const paymentSuccess = (): void => {
72
- loadUserWalet({ coopname: COOPNAME, username: session.username as string } as ILoadUserWallet)
74
+ loadUserWalet({ coopname: info.coopname, username: session.username as string } as ILoadUserWallet)
73
75
  clear()
74
76
  SuccessAlert('Платеж успешно принят')
75
77
  }
@@ -69,12 +69,14 @@ import { getNameFromUserData } from 'src/shared/lib/utils/getNameFromUserData';
69
69
  import { BranchCard } from 'src/widgets/BranchCard';
70
70
  import { IndividualCard } from 'src/widgets/IndividualCard';
71
71
  import { BankDetailsCard } from 'src/widgets/BankDetailsCard';
72
- import { COOPNAME } from 'src/shared/config';
72
+ import { useSystemStore } from 'src/entities/System/model';
73
+ const { info } = useSystemStore()
74
+
73
75
 
74
76
  const branchStore = useBranchStore();
75
77
 
76
78
  branchStore.loadBranches({
77
- coopname: COOPNAME
79
+ coopname: info.coopname
78
80
  })
79
81
 
80
82
  const onLoading = ref(false);
@@ -3,8 +3,10 @@ ListOfDocumentsWidget(:showFilter="true" :filter="{receiver: coopname}")
3
3
  </template>
4
4
  <script setup lang="ts">
5
5
  import { ListOfDocumentsWidget } from 'src/widgets/Cooperative/Documents/ListOfDocuments';
6
- import { COOPNAME } from 'src/shared/config';
6
+ import { useSystemStore } from 'src/entities/System/model';
7
+ const { info } = useSystemStore()
8
+
7
9
  import { computed } from 'vue';
8
10
 
9
- const coopname = computed(() => COOPNAME)
11
+ const coopname = computed(() => info.coopname)
10
12
  </script>
@@ -2,12 +2,12 @@
2
2
  import { computed } from 'vue'
3
3
  import { CreateParentOfferForm } from 'src/features/Request/CreateParentOffer'
4
4
  import { useSessionStore } from 'src/entities/Session'
5
+ import { useSystemStore } from 'src/entities/System/model'
5
6
  const session = useSessionStore()
6
7
  const username = computed(() => session.username)
7
- import { COOPNAME } from 'src/shared/config';
8
-
8
+ const { info } = useSystemStore()
9
9
  </script>
10
10
  <template lang="pug">
11
11
  div.row.justify-center
12
- CreateParentOfferForm(:username="username" :coopname="COOPNAME").col-md-4.col-xs-12.q-mt-md.q-mb-lg
12
+ CreateParentOfferForm(:username="username" :coopname="info.coopname").col-md-4.col-xs-12.q-mt-md.q-mb-lg
13
13
  </template>
@@ -1,25 +1,25 @@
1
1
  <template lang="pug">
2
2
  div
3
- q-tabs(v-if="loggedIn" dense switch-indicator inline-label outside-arrows mobile-arrows align="justify" active-class="bg-teal-2" )
4
- q-route-tab(name="Витрина" label="Витрина" :to="{name: 'marketplace-showcase'}" )
5
- q-route-tab(name="Мои объявления" label="Мои объявления" :to="{name: 'marketplace-user-offers'}" )
6
- q-route-tab(name="Мои заказы" label="Мои заказы" :to="{name: 'marketplace-user-supplies'}" )
7
- q-route-tab(name="Создать объявление" label="Создать объявление" :to="{name: 'marketplace-create-offer'}" )
8
- q-route-tab(name="Все объявления" label="Все объявления" :to="{name: 'marketplace-moderation'}" )
9
- q-route-tab(name="Все заказы" label="Все заказы" :to="{name: 'marketplace-supplies'}" )
3
+ //- q-tabs(v-if="loggedIn" dense switch-indicator inline-label outside-arrows mobile-arrows align="justify" active-class="bg-teal-2" )
4
+ //- q-route-tab(name="Витрина" label="Витрина" :to="{name: 'marketplace-showcase'}" )
5
+ //- q-route-tab(name="Мои объявления" label="Мои объявления" :to="{name: 'marketplace-user-offers'}" )
6
+ //- q-route-tab(name="Мои заказы" label="Мои заказы" :to="{name: 'marketplace-user-supplies'}" )
7
+ //- q-route-tab(name="Создать объявление" label="Создать объявление" :to="{name: 'marketplace-create-offer'}" )
8
+ //- q-route-tab(name="Все объявления" label="Все объявления" :to="{name: 'marketplace-moderation'}" )
9
+ //- q-route-tab(name="Все заказы" label="Все заказы" :to="{name: 'marketplace-supplies'}" )
10
10
 
11
11
  router-view
12
12
 
13
13
  </template>
14
14
 
15
15
  <script setup lang="ts">
16
- import { computed } from 'vue'
17
- import { useSessionStore } from 'src/entities/Session'
18
- const session = useSessionStore()
16
+ // import { computed } from 'vue'
17
+ // import { useSessionStore } from 'src/entities/Session'
18
+ // const session = useSessionStore()
19
19
 
20
- const loggedIn = computed(() => {
21
- return session.isAuth
22
- })
20
+ // const loggedIn = computed(() => {
21
+ // return session.isAuth
22
+ // })
23
23
  </script>
24
24
 
25
25
  <style>
@@ -30,7 +30,7 @@ div
30
30
 
31
31
  </template>
32
32
  <script setup lang="ts">
33
- import { computed } from 'vue'
33
+ import { computed, onMounted } from 'vue'
34
34
  import { ImageCarousel } from 'src/shared/ui/ImageCarousel'
35
35
 
36
36
  import { useRouter } from 'vue-router'
@@ -40,13 +40,15 @@ import { UnpublishRequestButton } from 'src/features/Request/UnpublishRequest'
40
40
  import { ModerateRequestButton } from 'src/features/Request/ModerateRequest'
41
41
  import { ProhibitRequestButton } from 'src/features/Request/ProhibitRequest'
42
42
  import { useSessionStore } from 'src/entities/Session'
43
- import { COOPNAME } from 'src/shared/config'
43
+
44
+ import { useSystemStore } from 'src/entities/System/model'
44
45
  const session = useSessionStore()
45
46
  const username = computed(() => session.username)
47
+ const { info } = useSystemStore()
46
48
 
47
49
  const router = useRouter()
48
50
 
49
- const coopname = computed(() => COOPNAME)
51
+ const coopname = computed(() => info.coopname)
50
52
  const requstsStore = useRequestStore()
51
53
 
52
54
  const objects = computed(() => requstsStore.allParentOffers)
@@ -56,4 +58,6 @@ const currentObjectId = computed(() => router.currentRoute.value.params.id)
56
58
  const currentObject = computed(() =>
57
59
  objects.value.find((obj) => obj.id == Number(currentObjectId.value))
58
60
  )
61
+
62
+ onMounted(() => requstsStore.loadAllParentOffers({coopname: coopname.value}))
59
63
  </script>
@@ -70,7 +70,9 @@ import { UnpublishRequestButton } from 'src/features/Request/UnpublishRequest'
70
70
  import { UpdateRequestButton } from 'src/features/Request/UpdateRequest'
71
71
  import { useRequestStore } from 'src/entities/Request/model/stores'
72
72
  import { useSessionStore } from 'src/entities/Session'
73
- import { COOPNAME } from 'src/shared/config'
73
+ import { useSystemStore } from 'src/entities/System/model';
74
+ const { info } = useSystemStore()
75
+
74
76
  import type { IRequestData } from 'src/entities/Request'
75
77
  const session = useSessionStore()
76
78
  const username = computed(() => session.username)
@@ -95,7 +97,7 @@ watch(
95
97
  { deep: true }
96
98
  )
97
99
  const iAmOwner = computed(() => localRequest.value.username == username.value)
98
- const coopname = computed(() => COOPNAME)
100
+ const coopname = computed(() => info.coopname)
99
101
 
100
102
  let [temp_price, temp_symbol] = localRequest.value.unit_cost.split(' ')
101
103
  temp_price = parseFloat(temp_price).toFixed(0)
@@ -14,7 +14,9 @@ div(v-if="store?.state?.payment?.details?.amount_without_fee")
14
14
  import { computed, watch, onMounted } from 'vue'
15
15
  import { useCreateUser } from 'src/features/User/CreateUser'
16
16
  import { FailAlert } from 'src/shared/api';
17
- import { COOPNAME } from 'src/shared/config';
17
+ import { useSystemStore } from 'src/entities/System/model';
18
+ const { info } = useSystemStore()
19
+
18
20
  import { useCooperativeStore } from 'src/entities/Cooperative';
19
21
  import { useRegistratorStore } from 'src/entities/Registrator'
20
22
  import { PayWithProvider } from 'src/shared/ui/PayWithProvider';
@@ -29,7 +31,7 @@ const coop = useCooperativeStore()
29
31
  const currentStep = store.steps.PayInitial
30
32
 
31
33
  onMounted(async () => {
32
- await coop.loadPublicCooperativeData(COOPNAME)
34
+ await coop.loadPublicCooperativeData(info.coopname)
33
35
 
34
36
  if (step.value === currentStep)
35
37
  createInitialPayment()
@@ -34,7 +34,7 @@ div
34
34
  a(@click.stop='(event) => event.stopPropagation()' href='/documents/ustav.pdf' target='_blank').q-ml-xs Устав кооператива
35
35
 
36
36
  div(v-if="!isLoading").q-mt-lg
37
- q-btn.col-md-6.col-xs-12(flat, @click='store.prev()')
37
+ q-btn.col-md-6.col-xs-12(flat @click='back')
38
38
  i.fa.fa-arrow-left
39
39
  span.q-ml-md назад
40
40
 
@@ -73,7 +73,13 @@ const loadStatement = async (): Promise<void> => {
73
73
  failAlert(e.message)
74
74
  }
75
75
  }
76
+ const back = () => {
77
+ if (store.isBranched)
78
+ store.goTo('SelectBranch')
79
+ else
80
+ store.goTo('GenerateAccount')
76
81
 
82
+ }
77
83
  onMounted(() => {
78
84
  if (store.state.step === store.steps.ReadStatement) {
79
85
  loadStatement()
@@ -22,7 +22,9 @@ div(v-if="store")
22
22
  import { useBranchStore } from 'src/entities/Branch/model'
23
23
  import { useRegistratorStore } from 'src/entities/Registrator'
24
24
  import { failAlert } from 'src/shared/api';
25
- import { COOPNAME } from 'src/shared/config'
25
+ import { useSystemStore } from 'src/entities/System/model';
26
+ const { info } = useSystemStore()
27
+
26
28
  import { computed, onMounted, watch } from 'vue'
27
29
  import { BranchSelector } from 'src/shared/ui/BranchSelector';
28
30
 
@@ -32,7 +34,7 @@ const branchStore = useBranchStore()
32
34
  const load = async () => {
33
35
  if (store.isStep('SelectBranch'))
34
36
  try{
35
- await branchStore.loadPublicBranches({ coopname: COOPNAME })
37
+ await branchStore.loadPublicBranches({ coopname: info.coopname })
36
38
  } catch(e: any){
37
39
  failAlert(e)
38
40
  }