@coopenomics/desktop 2.2.9 → 2025.4.29

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 (366) hide show
  1. package/.env-example +6 -1
  2. package/.env-testnet +8 -0
  3. package/CHANGELOG.md +11 -0
  4. package/Dockerfile +12 -0
  5. package/extensions/market/install.ts +78 -0
  6. package/extensions/market-admin/install.ts +42 -0
  7. package/extensions/participant/install.ts +125 -0
  8. package/extensions/powerup/install.ts +20 -0
  9. package/extensions/soviet/install.ts +83 -0
  10. package/package.json +6 -5
  11. package/quasar.config.cjs +5 -12
  12. package/src/app/App.vue +44 -73
  13. package/src/app/layouts/default.vue +40 -0
  14. package/src/app/layouts/useDefaultLayoutLogic.ts +59 -0
  15. package/src/app/providers/routes/index.ts +19 -34
  16. package/src/app/styles/style.css +4 -0
  17. package/src/boot/init.ts +6 -0
  18. package/src/boot/sentry.ts +1 -2
  19. package/src/desktops/index.ts +0 -6
  20. package/src/entities/Account/api/index.ts +11 -2
  21. package/src/entities/Account/model/index.ts +1 -1
  22. package/src/entities/Account/model/store.ts +15 -5
  23. package/src/entities/Account/types/index.ts +9 -1
  24. package/src/entities/Agenda/api/index.ts +20 -0
  25. package/src/entities/Agenda/index.ts +2 -0
  26. package/src/entities/Agenda/model/index.ts +2 -0
  27. package/src/entities/Agenda/model/store.ts +36 -0
  28. package/src/entities/Agenda/model/types.ts +4 -0
  29. package/src/entities/Branch/model/index.ts +1 -1
  30. package/src/entities/Desktop/api/index.ts +16 -1
  31. package/src/entities/Desktop/model/store.ts +112 -106
  32. package/src/entities/Desktop/model/types.ts +14 -1
  33. package/src/entities/Document/api/index.ts +24 -0
  34. package/src/entities/Document/index.ts +2 -0
  35. package/src/entities/Document/model/store.ts +117 -0
  36. package/src/entities/Document/model/types.ts +18 -0
  37. package/src/entities/Meet/api/index.ts +58 -0
  38. package/src/entities/Meet/index.ts +2 -0
  39. package/src/entities/Meet/model/store.ts +72 -0
  40. package/src/entities/Meet/types/index.ts +7 -0
  41. package/src/entities/Payment/api/index.ts +20 -0
  42. package/src/entities/Payment/model/index.ts +2 -0
  43. package/src/entities/Payment/model/store.ts +62 -0
  44. package/src/entities/Payment/model/types.ts +7 -0
  45. package/src/entities/Session/model/store.ts +5 -6
  46. package/src/entities/System/model/store.ts +1 -1
  47. package/src/entities/User/model/stores.ts +3 -1
  48. package/src/entities/Wallet/api/index.ts +15 -33
  49. package/src/entities/Wallet/model/stores.ts +3 -23
  50. package/src/entities/Wallet/model/types.ts +2 -3
  51. package/src/features/Account/UpdateAccount/api/index.ts +14 -0
  52. package/src/features/Account/UpdateAccount/index.ts +1 -0
  53. package/src/features/Account/UpdateAccount/model/index.ts +16 -0
  54. package/src/features/Agreementer/SignAgreementDialog/ui/SignAgreementDialog.vue +1 -1
  55. package/src/features/Branch/SelectBranch/index.ts +2 -0
  56. package/src/features/Branch/SelectBranch/ui/SelectBranchOverlay.vue +52 -104
  57. package/src/features/Decision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +1 -1
  58. package/src/features/Decision/ParticipantApplication/model/index.ts +38 -0
  59. package/src/features/FreeDecision/CreateProject/model/index.ts +92 -0
  60. package/src/features/FreeDecision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +51 -0
  61. package/src/features/FreeDecision/CreateProject/ui/index.ts +1 -0
  62. package/src/features/FreeDecision/GenerateDecision/index.ts +1 -0
  63. package/src/features/FreeDecision/GenerateDecision/model/index.ts +36 -0
  64. package/src/features/FreeDecision/index.ts +2 -0
  65. package/src/features/Meet/CloseMeetWithDecision/index.ts +1 -0
  66. package/src/features/Meet/CloseMeetWithDecision/model/index.ts +92 -0
  67. package/src/features/Meet/CreateMeet/index.ts +2 -0
  68. package/src/features/Meet/CreateMeet/model/index.ts +65 -0
  69. package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +34 -0
  70. package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +136 -0
  71. package/src/features/Meet/CreateMeet/ui/index.ts +2 -0
  72. package/src/features/Meet/GenerateAgenda/index.ts +1 -0
  73. package/src/features/Meet/GenerateAgenda/model/index.ts +18 -0
  74. package/src/features/Meet/GenerateBallot/index.ts +1 -0
  75. package/src/features/Meet/GenerateBallot/model/index.ts +18 -0
  76. package/src/features/Meet/GenerateNotification/index.ts +1 -0
  77. package/src/features/Meet/GenerateNotification/model/index.ts +18 -0
  78. package/src/features/Meet/GenerateSovietDecision/index.ts +1 -0
  79. package/src/features/Meet/GenerateSovietDecision/model/index.ts +48 -0
  80. package/src/features/Meet/MeetDetailsManagement/index.ts +1 -0
  81. package/src/features/Meet/MeetDetailsManagement/model/index.ts +121 -0
  82. package/src/features/Meet/RestartMeet/index.ts +2 -0
  83. package/src/features/Meet/RestartMeet/model/index.ts +54 -0
  84. package/src/features/Meet/RestartMeet/ui/RestartMeet.vue +46 -0
  85. package/src/features/Meet/RestartMeet/ui/RestartMeetForm.vue +92 -0
  86. package/src/features/Meet/RestartMeet/ui/index.ts +2 -0
  87. package/src/features/Meet/VoteOnMeet/index.ts +1 -0
  88. package/src/features/Meet/VoteOnMeet/model/index.ts +18 -0
  89. package/src/features/Payment/SetStatus/api/index.ts +20 -0
  90. package/src/features/Payment/SetStatus/index.ts +1 -0
  91. package/src/features/Payment/SetStatus/model/index.ts +30 -0
  92. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/SetOrderPaidStatusButton.vue +7 -3
  93. package/src/features/PaymentMethod/AddPaymentMethod/model/index.ts +2 -2
  94. package/src/features/PaymentMethod/AddPaymentMethod/ui/AddPaymentButton.vue +1 -1
  95. package/src/features/PaymentMethod/DeletePaymentMethod/model/index.ts +1 -1
  96. package/src/features/PaymentMethod/DeletePaymentMethod/ui/DeletePaymentMethodButton.vue +3 -1
  97. package/src/features/Request/CancelRequest/ui/CancelButton.vue +1 -1
  98. package/src/features/Request/ConfirmRecieveOnRequest/ui/ConfirmRecieveOnRequest.vue +1 -1
  99. package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +3 -5
  100. package/src/features/Request/CreateParentOffer/ui/ImageUploaderWithPreview/ImageUploaderWithPreview.vue +4 -3
  101. package/src/features/Request/DisputeOnRequest/ui/DisputeOnRequestButton.vue +1 -1
  102. package/src/features/Request/ModerateRequest/ui/ModerateRequestButton.vue +2 -2
  103. package/src/features/Request/PublishRequest/ui/PublishRequestButton.vue +1 -1
  104. package/src/features/Request/RecieveOnRequest/ui/RecieveOnRequestButton.vue +1 -1
  105. package/src/features/Request/UnpublishRequest/ui/UnpublishRequestButton.vue +1 -1
  106. package/src/features/Union/AddCooperative/model/index.ts +4 -5
  107. package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +5 -6
  108. package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +7 -4
  109. package/src/features/User/LoginUser/model/index.ts +3 -3
  110. package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +0 -6
  111. package/src/features/User/Logout/model/index.ts +5 -3
  112. package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +8 -7
  113. package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +6 -7
  114. package/src/pages/Blank/index.ts +1 -0
  115. package/src/pages/Contacts/ContactsPage.vue +64 -0
  116. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/index.ts +0 -1
  117. package/src/{widgets/Cooperative/Contributions/ui/ChangeContributions.vue → pages/Cooperative/ChangeRegisterPayments/ui/ChangeRegisterPayments.vue} +10 -11
  118. package/src/pages/Cooperative/ChangeRegisterPayments/ui/index.ts +1 -0
  119. package/src/pages/Cooperative/ListOfAgenda/index.ts +1 -0
  120. package/src/pages/Cooperative/ListOfAgenda/ui/ListOfAgendaQuestions.vue +118 -0
  121. package/src/pages/Cooperative/ListOfAgenda/ui/index.ts +1 -0
  122. package/src/pages/Cooperative/ListOfDocuments/ListOfDocumentsPage.vue +24 -0
  123. package/src/pages/Cooperative/ListOfMeets/model/index.ts +1 -0
  124. package/src/pages/Cooperative/ListOfMeets/model/model.ts +117 -0
  125. package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +90 -0
  126. package/src/pages/Cooperative/ListOfMeets/ui/index.ts +1 -0
  127. package/src/pages/Cooperative/ListOfOrders/index.ts +1 -1
  128. package/src/pages/Cooperative/ListOfOrders/ui/ListOfOrdersPage.vue +0 -4
  129. package/src/pages/Cooperative/ListOfParticipants/ui/ListOfParticipantsPage.vue +61 -10
  130. package/src/pages/Cooperative/ListOfParticipants/ui/index.ts +1 -1
  131. package/src/pages/Cooperative/MeetDetails/ui/MeetDetailsPage.vue +88 -0
  132. package/src/pages/Cooperative/MeetDetails/ui/index.ts +1 -0
  133. package/src/pages/Cooperative/{ListOfBranches/ui/ListOfBranchesPage.vue → MemberBranchList/ui/MemberBranchListPage.vue} +2 -4
  134. package/src/pages/Cooperative/MemberBranchList/ui/index.ts +1 -0
  135. package/src/pages/Cooperative/Payments/index.ts +1 -0
  136. package/src/pages/Cooperative/Payments/ui/PaymentsPage.vue +7 -0
  137. package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/ExtensionPage.vue +35 -20
  138. package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/ExtensionsShowcase.vue +2 -2
  139. package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/InstalledExtensions.vue +2 -2
  140. package/src/pages/Marketplace/OfferPage/ui/OfferPage.vue +1 -1
  141. package/src/pages/Marketplace/Showcase/ui/ShowcasePage.vue +1 -1
  142. package/src/pages/Marketplace/SuppliesList/ui/SuppliesListPage.vue +1 -1
  143. package/src/pages/Marketplace/UserParentOffers/ui/UserParentOffersPage.vue +1 -1
  144. package/src/pages/Marketplace/UserSuppliesList/ui/UserSuppliesListPage.vue +1 -1
  145. package/src/pages/PermissionDenied/index.ts +1 -0
  146. package/src/pages/Registrator/SignUp/EmailInput.vue +2 -3
  147. package/src/pages/Registrator/SignUp/GenerateAccount.vue +2 -3
  148. package/src/pages/Registrator/SignUp/PayInitial.vue +1 -1
  149. package/src/pages/Registrator/SignUp/ReadStatement.vue +2 -2
  150. package/src/pages/Registrator/SignUp/SelectBranch.vue +2 -2
  151. package/src/pages/Registrator/SignUp/SignStatement.vue +2 -2
  152. package/src/pages/Registrator/SignUp/SignUp.vue +5 -12
  153. package/src/pages/Registrator/SignUp/WaitingRegistration.vue +1 -5
  154. package/src/pages/Registrator/SignUp/Welcome.vue +4 -3
  155. package/src/pages/Union/ConnectionAgreement/index.ts +1 -0
  156. package/src/pages/Union/ListOfCooperatives/ui/UnionPageListOfCooperatives.vue +139 -6
  157. package/src/pages/User/DocumentsPage/UserDocumentsPage.vue +23 -0
  158. package/src/pages/User/DocumentsPage/index.ts +1 -0
  159. package/src/pages/User/PaymentsPage/ui/UserPayments.vue +11 -0
  160. package/src/pages/User/PaymentsPage/ui/index.ts +1 -0
  161. package/src/pages/User/ProfilePage/index.ts +1 -0
  162. package/src/pages/User/ProfilePage/ui/ProfilePage.vue +114 -0
  163. package/src/pages/User/ProfilePage/ui/index.ts +1 -0
  164. package/src/pages/User/SettingsPage/ui/index.ts +1 -1
  165. package/src/pages/User/WalletPage/index.ts +1 -0
  166. package/src/pages/User/WalletPage/ui/WalletPage.vue +72 -0
  167. package/src/pages/User/WalletPage/ui/index.ts +1 -0
  168. package/src/processes/init-app/index.ts +28 -0
  169. package/src/processes/init-installed-extensions/index.ts +25 -0
  170. package/src/processes/init-wallet/index.ts +40 -0
  171. package/src/processes/navigation-guard-setup/index.ts +45 -0
  172. package/src/processes/process-decisions/index.ts +275 -0
  173. package/src/processes/select-branch/index.ts +80 -0
  174. package/src/processes/watch-branch-overlay/index.ts +38 -0
  175. package/src/processes/watch-desktop-health/index.ts +33 -0
  176. package/src/shared/api/alerts.ts +2 -6
  177. package/src/shared/api/axios.ts +4 -5
  178. package/src/shared/api/client.ts +3 -4
  179. package/src/shared/api/eosio.ts +1 -2
  180. package/src/shared/api/utils.ts +1 -3
  181. package/src/shared/config/index.ts +0 -1
  182. package/src/shared/hooks/index.ts +2 -0
  183. package/src/shared/hooks/useAgendaPoints.ts +24 -0
  184. package/src/shared/hooks/useWindowSize.ts +13 -0
  185. package/src/shared/lib/composables/useDisplayName.ts +34 -0
  186. package/src/shared/lib/composables/useEditableData.ts +1 -1
  187. package/src/shared/lib/navigation/index.ts +2 -0
  188. package/src/shared/lib/navigation/routeUtils.ts +51 -0
  189. package/src/shared/lib/navigation/useBackButton.ts +63 -0
  190. package/src/shared/lib/utils/dates/validateDateWithinRange.ts +23 -0
  191. package/src/shared/ui/BaseDocument/BaseDocument.vue +120 -90
  192. package/src/{components/menu/blockchainStatus.vue → shared/ui/BlockchainStatusBar/BlockchainStatusBar.vue} +1 -0
  193. package/src/shared/ui/BlockchainStatusBar/index.ts +1 -0
  194. package/src/shared/ui/CardStyles/index.scss +61 -0
  195. package/src/shared/ui/ComplexDocument/ComplexDocument.vue +31 -8
  196. package/src/shared/ui/CopyableInput/index.ts +1 -0
  197. package/src/shared/ui/CopyableInput/ui/CopyableInput.vue +62 -0
  198. package/src/shared/ui/EditableEntrepreneurCard/EditableEntrepreneurCard.vue +171 -0
  199. package/src/shared/ui/EditableEntrepreneurCard/index.ts +1 -0
  200. package/src/{widgets/IndividualCard/ui/IndividualCard.vue → shared/ui/EditableIndividualCard/EditableIndividualCard.vue} +101 -68
  201. package/src/shared/ui/EditableIndividualCard/index.ts +1 -0
  202. package/src/shared/ui/EditableOrganizationCard/EditableOrganizationCard.vue +225 -0
  203. package/src/shared/ui/EditableOrganizationCard/index.ts +1 -0
  204. package/src/shared/ui/Form/Form.vue +3 -1
  205. package/src/shared/ui/InputStyles/index.scss +29 -0
  206. package/src/shared/ui/TabStyles/index.scss +53 -0
  207. package/src/shared/ui/UserDataForm/OrganizationDataForm/OrganizationDataForm.vue +1 -0
  208. package/src/shared/ui/index.ts +1 -0
  209. package/src/{components/history/AccountEvents.vue → widgets/AccountActions/AccountActionsPage.vue} +2 -2
  210. package/src/widgets/AccountActions/index.ts +1 -0
  211. package/src/widgets/BankDetailsCard/ui/BankDetailsCard.vue +2 -2
  212. package/src/widgets/BranchCard/ui/BranchCard.vue +2 -2
  213. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentCard.vue +48 -0
  214. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentsTable.vue +162 -0
  215. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/ListOfDocumentsWidget.vue +77 -120
  216. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/index.ts +3 -1
  217. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/ListOfOrdersWidget.vue +135 -128
  218. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/OrderCard.vue +74 -0
  219. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/index.ts +2 -1
  220. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/ListOfPaymentsWidget.vue +216 -0
  221. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/PaymentCard.vue +73 -0
  222. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/index.ts +2 -0
  223. package/src/widgets/Cooperative/Payments/index.ts +1 -0
  224. package/src/widgets/Desktop/LeftDrawerMenu/LeftDrawerMenu.vue +3 -2
  225. package/src/widgets/Desktop/SecondLevelMenuList/SecondLevelMenuList.vue +58 -91
  226. package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +114 -59
  227. package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/ExtensionCard.vue +12 -7
  228. package/src/widgets/Header/BackButton/BackButton.vue +25 -0
  229. package/src/widgets/Header/BackButton/index.ts +1 -0
  230. package/src/widgets/Header/CommonHeader/CooperativeSettingsHeader.vue +34 -0
  231. package/src/widgets/Header/CommonHeader/ExtstoreHeader.vue +41 -0
  232. package/src/widgets/Header/CommonHeader/Header.vue +33 -198
  233. package/src/widgets/Header/CommonHeader/HeaderStyles.scss +22 -0
  234. package/src/widgets/Header/CommonHeader/MainHeader.vue +87 -0
  235. package/src/widgets/Header/CommonHeader/UserSettingsHeader.vue +29 -0
  236. package/src/widgets/Header/CommonHeader/index.ts +1 -1
  237. package/src/widgets/Header/SettingsDropdown/SettingsDropdown.vue +0 -6
  238. package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/Base.vue +1 -2
  239. package/src/widgets/Meets/MeetDetailsActions/MeetDetailsActions.vue +51 -0
  240. package/src/widgets/Meets/MeetDetailsActions/index.ts +1 -0
  241. package/src/widgets/Meets/MeetDetailsActions/model.ts +46 -0
  242. package/src/widgets/Meets/MeetDetailsAgenda/MeetDetailsAgenda.vue +29 -0
  243. package/src/widgets/Meets/MeetDetailsAgenda/index.ts +1 -0
  244. package/src/widgets/Meets/MeetDetailsHeader/MeetDetailsHeader.vue +40 -0
  245. package/src/widgets/Meets/MeetDetailsHeader/index.ts +1 -0
  246. package/src/widgets/Meets/MeetDetailsVoting/MeetDetailsVoting.vue +77 -0
  247. package/src/widgets/Meets/MeetDetailsVoting/index.ts +1 -0
  248. package/src/widgets/Meets/MeetDetailsVoting/model.ts +117 -0
  249. package/src/widgets/Meets/MeetInfoCard/ui/MeetInfoCard.vue +38 -0
  250. package/src/widgets/Meets/MeetInfoCard/ui/index.ts +1 -0
  251. package/src/widgets/Meets/MeetsTable/ui/MeetsTable.vue +118 -0
  252. package/src/widgets/Meets/MeetsTable/ui/index.ts +1 -0
  253. package/src/widgets/Participants/index.ts +1 -0
  254. package/src/widgets/Participants/ui/ParticipantCard.vue +89 -0
  255. package/src/widgets/Participants/ui/ParticipantDetails.vue +79 -0
  256. package/src/widgets/Participants/ui/ParticipantsTable.vue +129 -0
  257. package/src/widgets/Participants/ui/index.ts +4 -0
  258. package/src/widgets/Questions/index.ts +3 -0
  259. package/src/widgets/Questions/ui/QuestionCard/QuestionCard.vue +109 -0
  260. package/src/widgets/Questions/ui/QuestionCard/index.ts +1 -0
  261. package/src/widgets/Questions/ui/QuestionsTable/QuestionsTable.vue +177 -0
  262. package/src/widgets/Questions/ui/QuestionsTable/index.ts +1 -0
  263. package/src/widgets/Questions/ui/VotingButtons/VotingButtons.vue +75 -0
  264. package/src/widgets/Questions/ui/VotingButtons/index.ts +1 -0
  265. package/src/widgets/Questions/ui/index.ts +3 -0
  266. package/src/widgets/RequireAgreements/index.ts +1 -0
  267. package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +81 -85
  268. package/tsconfig.json +1 -1
  269. package/extensions/powerup/boot.ts +0 -17
  270. package/src/app/providers/card/store.ts +0 -42
  271. package/src/boot/branch-selector.ts +0 -40
  272. package/src/boot/init-stores.ts +0 -45
  273. package/src/boot/navigation-guards.ts +0 -46
  274. package/src/components/menu/footerMobileMenu.vue +0 -79
  275. package/src/components/soviet/index.vue +0 -76
  276. package/src/components/soviet/staff.vue +0 -274
  277. package/src/desktops/User/index.ts +0 -1
  278. package/src/desktops/User/model/index.ts +0 -328
  279. package/src/entities/Menu/model/store.ts +0 -69
  280. package/src/entities/Menu/model/types.ts +0 -11
  281. package/src/entities/Menu/ui/index.ts +0 -1
  282. package/src/entities/Order/api/index.ts +0 -14
  283. package/src/entities/Order/model/store.ts +0 -87
  284. package/src/features/Order/SetStatus/api/index.ts +0 -7
  285. package/src/features/Order/SetStatus/model/index.ts +0 -23
  286. package/src/pages/Cooperative/Contacts/ui/ContactsPage.vue +0 -7
  287. package/src/pages/Cooperative/ListOfBranches/ui/index.ts +0 -1
  288. package/src/pages/Documentor/ListOfDocuments/ListOfDocumentsPage.vue +0 -12
  289. package/src/pages/Union/Connection/index.ts +0 -1
  290. package/src/pages/_layouts/blank.vue +0 -24
  291. package/src/pages/_layouts/default.vue +0 -79
  292. package/src/types/index.ts +0 -3
  293. package/src/widgets/Commutator/Commutator.vue +0 -7
  294. package/src/widgets/Commutator/index.ts +0 -1
  295. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/ListOfQuestions.vue +0 -273
  296. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/index.ts +0 -1
  297. package/src/widgets/Cooperative/Contacts/ui/Contacts.vue +0 -52
  298. package/src/widgets/Cooperative/Contributions/ui/index.ts +0 -1
  299. package/src/widgets/Cooperative/Description/ui/SetDescription.vue +0 -4
  300. package/src/widgets/Cooperative/Description/ui/index.ts +0 -1
  301. package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/ListOfParticipantsWidget.vue +0 -103
  302. package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/index.ts +0 -1
  303. package/src/widgets/Desktop/SecondLevelMenu/SecondLevelMenu.vue +0 -59
  304. package/src/widgets/Desktop/SecondLevelMenu/index.ts +0 -1
  305. package/src/widgets/IndividualCard/ui/index.ts +0 -1
  306. package/src/widgets/OrganizationCard/ui/OrganizationCard.vue +0 -44
  307. package/src/widgets/OrganizationCard/ui/index.ts +0 -1
  308. package/src/widgets/Union/ListOfCooperatives/ui/UnionListOfCooperatives.vue +0 -136
  309. package/src/widgets/Union/ListOfCooperatives/ui/index.ts +0 -1
  310. package/src/entities/{Menu → Document}/model/index.ts +0 -0
  311. package/src/entities/{Order → Meet}/model/index.ts +0 -0
  312. package/src/entities/{Order → Payment}/index.ts +0 -0
  313. package/src/features/{Order/SetStatus → Decision/ParticipantApplication}/index.ts +0 -0
  314. package/src/{widgets/Request/SupplyOrderRequestCard → features/FreeDecision/CreateProject}/index.ts +0 -0
  315. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/SetOrderCompletedStatusButton.vue +0 -0
  316. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/index.ts +0 -0
  317. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/index.ts +0 -0
  318. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/SetOrderRefundedStatusButton.vue +0 -0
  319. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/index.ts +0 -0
  320. package/src/pages/{blank/blank.vue → Blank/BlankPage.vue} +0 -0
  321. package/src/pages/{Cooperative/Contacts/ui → Contacts}/index.ts +0 -0
  322. package/src/pages/Cooperative/{Contacts → ChangeContacts}/index.ts +0 -0
  323. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/ChangeContacts.vue +0 -0
  324. package/src/pages/Cooperative/{ListOfBranches → ChangeRegisterPayments}/index.ts +0 -0
  325. package/src/pages/{Documentor → Cooperative}/ListOfDocuments/index.ts +0 -0
  326. package/src/pages/{Installer → Cooperative/ListOfMeets}/index.ts +0 -0
  327. package/src/{widgets/Cooperative/Agenda/ListOfQuestions → pages/Cooperative/MeetDetails}/index.ts +0 -0
  328. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/MemberBranchList}/index.ts +0 -0
  329. package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/ExtensionStoreBase.vue +0 -0
  330. package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/index.ts +0 -0
  331. package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/index.ts +0 -0
  332. package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/index.ts +0 -0
  333. package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/index.ts +0 -0
  334. package/src/pages/{_layouts/permissionDenied.vue → PermissionDenied/PermissionDenied.vue} +0 -0
  335. package/src/pages/Union/{Connection/ConnectionPage.vue → ConnectionAgreement/ConnectionAgreementPage.vue} +0 -0
  336. package/src/{widgets/Cooperative/Contributions → pages/Union/InstallCooperative}/index.ts +0 -0
  337. package/src/pages/{Installer → Union/InstallCooperative}/ui/InstallCooperativePage.vue +0 -0
  338. package/src/pages/{Installer → Union/InstallCooperative}/ui/index.ts +0 -0
  339. package/src/{widgets/Cooperative/Participants/ListOfParticipants → pages/User/PaymentsPage}/index.ts +0 -0
  340. package/src/{components/history → widgets/AccountActions}/AccountLink.vue +0 -0
  341. package/src/{components/history → widgets/AccountActions}/ActionCell.vue +0 -0
  342. package/src/{components/history → widgets/AccountActions}/DataCell.vue +0 -0
  343. package/src/widgets/{IndividualCard → Cooperative/Payments/ListOfPayments}/index.ts +0 -0
  344. package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/index.ts +0 -0
  345. package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/CreateChildOrderCard.vue +0 -0
  346. package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/index.ts +0 -0
  347. package/src/widgets/{Request → Marketplace}/RequestCard/RequestCard.vue +0 -0
  348. package/src/widgets/{Request → Marketplace}/RequestCard/index.ts +0 -0
  349. package/src/{entities/Menu → widgets/Marketplace/SupplyOrderRequestCard}/index.ts +1 -1
  350. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/index.ts +0 -0
  351. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/types.ts +0 -0
  352. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/index.ts +0 -0
  353. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/EightStep.vue +0 -0
  354. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FifthStep.vue +0 -0
  355. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FirstStep.vue +0 -0
  356. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FourthStep.vue +0 -0
  357. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SecondStep.vue +0 -0
  358. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SeventhStep.vue +0 -0
  359. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SixthStep.vue +0 -0
  360. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/ThirdStep.vue +0 -0
  361. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/index.ts +0 -0
  362. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/index.ts +0 -0
  363. /package/src/widgets/{OrganizationCard → Meets/MeetInfoCard}/index.ts +0 -0
  364. /package/src/widgets/{Union/ListOfCooperatives → Meets/MeetsTable}/index.ts +0 -0
  365. /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/RequireAgreements.vue +0 -0
  366. /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/index.ts +0 -0
@@ -5,19 +5,19 @@ Form(:handler-submit="addNow" :is-submitting="isSubmitting" :showCancel="false"
5
5
 
6
6
  q-input(standout="bg-teal text-white" hint="100 RUB" label="Вступительный взнос для физлиц и ИП" v-model="data.params.initial" type="number" :min="0" :rules="[val => notEmpty(val)]")
7
7
  template(#append)
8
- span.text-overline {{CURRENCY}}
8
+ span.text-overline {{currency}}
9
9
 
10
10
  q-input(standout="bg-teal text-white" hint="300 RUB" label="Минимальный паевый взнос для физлиц и ИП" v-model="data.params.minimum" type="number" :min="0" :rules="[val => notEmpty(val)]")
11
11
  template(#append)
12
- span.text-overline {{CURRENCY}}
12
+ span.text-overline {{currency}}
13
13
 
14
14
  q-input(standout="bg-teal text-white" hint="1000 RUB" label="Вступительный взнос для организаций" v-model="data.params.org_initial" type="number" :min="0" :rules="[val => notEmpty(val)]")
15
15
  template(#append)
16
- span.text-overline {{CURRENCY}}
16
+ span.text-overline {{currency}}
17
17
 
18
18
  q-input(standout="bg-teal text-white" hint="3000 RUB" label="Минимальный паевый взнос для организаций" v-model="data.params.org_minimum" type="number" :min="0" :rules="[val => notEmpty(val)]")
19
19
  template(#append)
20
- span.text-overline {{CURRENCY}}
20
+ span.text-overline {{currency}}
21
21
 
22
22
  </template>
23
23
  <script lang="ts" setup>
@@ -27,14 +27,13 @@ import { Form } from 'src/shared/ui/Form';
27
27
  import { notEmpty, isDomain } from 'src/shared/lib/utils';
28
28
  import { useSessionStore } from 'src/entities/Session';
29
29
  import { RegistratorContract } from 'cooptypes';
30
- import { CURRENCY } from 'src/shared/config';
31
30
  import { FailAlert, SuccessAlert } from 'src/shared/api';
32
31
  import type { IObjectedDocument } from 'src/shared/lib/types/document';
33
32
 
34
33
  const emit = defineEmits(['finish'])
35
34
 
36
35
  const {addCooperative} = useAddCooperative()
37
-
36
+ const currency = computed(() => process.env.CURRENCY)
38
37
  const isSubmitting = ref(false)
39
38
 
40
39
  const props = defineProps({
@@ -1,6 +1,6 @@
1
1
  <template lang="pug">
2
2
  div
3
- q-btn(size="sm" @click="showAdd = true" color="primary")
3
+ q-btn(@click="showAdd = true" color="primary")
4
4
  q-icon(name="add")
5
5
  span добавить пайщика
6
6
  q-dialog(v-model="showAdd" persistent :maximized="false" )
@@ -22,14 +22,13 @@ div
22
22
  q-input(@change="changeEmail" v-model="state.email" standout="bg-teal text-white" label="Электронная почта" :rules='[validateEmail, validateExists]').q-mb-md
23
23
 
24
24
  template(#bottom="{userDataForm}")
25
-
26
25
  q-input(
27
26
  standout="bg-teal text-white"
28
27
  v-model="addUserState.created_at"
29
28
  mask="datetime"
30
29
  label="Дата и время подписания заявления"
31
30
  placeholder="год/месяц/день часы:минуты"
32
- :rules="[val => notEmpty(val)]"
31
+ :rules="[val => notEmpty(val), val => validateDateWithinRange(100)(val)]"
33
32
  autocomplete="off"
34
33
  hint="когда пайщик был принят в кооператив"
35
34
  ).q-mt-md
@@ -99,6 +98,8 @@ import { useSystemStore } from 'src/entities/System/model';
99
98
  const { info } = useSystemStore()
100
99
 
101
100
  import { notEmpty } from 'src/shared/lib/utils';
101
+ import { validateDateWithinRange } from 'src/shared/lib/utils/dates/validateDateWithinRange';
102
+ import { useAccountStore } from 'src/entities/Account/model';
102
103
 
103
104
  const { state, addUserState, clearUserData } = useRegistratorStore()
104
105
  const spread_minimum = ref(true) //TODO REPLACE IT!
@@ -204,6 +205,7 @@ const addUserNow = (userDataForm: any) => {
204
205
  userDataForm.validate().then(async (success: boolean) => {
205
206
  if (success) {
206
207
  try {
208
+ const accountStore = useAccountStore()
207
209
  loading.value = true
208
210
  await addUser()
209
211
  SuccessAlert('Пайщик добавлен в реестр, а приглашение отправлено на его email');
@@ -211,9 +213,10 @@ const addUserNow = (userDataForm: any) => {
211
213
  addUserState.created_at = ''
212
214
  clearUserData()
213
215
  loading.value = false
216
+ accountStore.getAccounts()
214
217
  } catch (e: any) {
215
218
  loading.value = false
216
- FailAlert(`Возникла ошибка: ${e.message}`)
219
+ FailAlert(e)
217
220
  }
218
221
 
219
222
  } else {
@@ -3,14 +3,13 @@ import { useGlobalStore } from 'src/shared/store'
3
3
  import { api } from '../api'
4
4
  import {client} from 'src/shared/api/client'
5
5
  import { useCurrentUserStore } from 'src/entities/User'
6
- import { useSystemStore } from 'src/entities/System/model'
7
6
  import { useRegistratorStore } from 'src/entities/Registrator'
8
7
  import type { ITokens } from 'src/shared/lib/types/user'
8
+ import { useInitWalletProcess } from 'src/processes/init-wallet'
9
9
 
10
10
  export function useLoginUser() {
11
11
  const globalStore = useGlobalStore()
12
12
  const currentUser = useCurrentUserStore()
13
- const system = useSystemStore()
14
13
 
15
14
  async function login(email: string, wif: string): Promise<void> {
16
15
  const auth = await api.loginUser(email, wif);
@@ -35,7 +34,8 @@ export function useLoginUser() {
35
34
  await session.init()
36
35
  client.setToken(auth.tokens.access.token)
37
36
 
38
- await currentUser.loadProfile(globalStore.username, system.info.coopname)
37
+ const { run } = useInitWalletProcess()
38
+ await run() //запускаем фоновое обновление кошелька - заменить на подписку потом
39
39
 
40
40
  if (!currentUser.isRegistrationComplete){
41
41
  const {state, steps} = useRegistratorStore()
@@ -39,10 +39,6 @@ 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 { useSystemStore } from 'src/entities/System/model';
43
- const { info } = useSystemStore()
44
-
45
- import { useGlobalStore } from 'src/shared/store';
46
42
  import { ref } from 'vue';
47
43
  import { useRouter } from 'vue-router';
48
44
 
@@ -52,7 +48,6 @@ const email = ref('')
52
48
  const privateKey = ref('')
53
49
  const loading = ref(false)
54
50
  const currentUser = useCurrentUserStore()
55
- const globalStore = useGlobalStore()
56
51
 
57
52
 
58
53
  const submit = async () => {
@@ -60,7 +55,6 @@ const submit = async () => {
60
55
  try {
61
56
  const { login } = useLoginUser()
62
57
  await login(email.value, privateKey.value)
63
- await currentUser.loadProfile(globalStore.username, info.coopname)
64
58
 
65
59
  if (!currentUser.isRegistrationComplete) {
66
60
  router.push({ name: 'signup' })
@@ -1,13 +1,15 @@
1
1
  import { useSessionStore } from 'src/entities/Session'
2
2
  import { useGlobalStore } from 'src/shared/store'
3
- import { api } from '../api'
3
+ // import { api } from '../api'
4
4
  import { useCurrentUserStore } from 'src/entities/User'
5
+ import { useRegistratorStore } from 'src/entities/Registrator'
5
6
 
6
7
  export function useLogoutUser() {
7
8
  async function logout(): Promise<void> {
8
9
  const global = useGlobalStore()
9
-
10
- if (global.tokens?.refresh.token) await api.logoutUser(global.tokens?.refresh.token)
10
+ //TODO: "начать с начала" при регистрации бажит на это - да и в целом пора бы маршруты срезать эти
11
+ // if (global.tokens?.refresh.token) await api.logoutUser(global.tokens?.refresh.token)
12
+ await useRegistratorStore().clearUserData()
11
13
 
12
14
  await global.logout()
13
15
 
@@ -1,5 +1,5 @@
1
1
  <template lang="pug">
2
- q-btn(@click="showDialog=true" color="primary" size="sm")
2
+ q-btn(@click="showDialog=true" color="primary")
3
3
  q-icon(name="fa-solid fa-chevron-up").q-mr-sm
4
4
  span Совершить взнос
5
5
  q-dialog(v-model="showDialog" @hide="clear")
@@ -7,7 +7,7 @@ q-btn(@click="showDialog=true" color="primary" size="sm")
7
7
  Form(:handler-submit="handlerSubmit" :is-submitting="isSubmitting" :button-cancel-txt="'Отменить'" :button-submit-txt="'Продолжить'" @cancel="clear").q-pa-sm
8
8
  q-input(v-model="quantity" standout="bg-teal text-white" type="number" :min="0" :step="1000" :rules="[val => val > 0 || 'Сумма взноса должна быть положительной']")
9
9
  template(#append)
10
- span.text-overline {{ CURRENCY }}
10
+ span.text-overline {{ currency }}
11
11
 
12
12
  ModalBase(v-else :title='"Совершите взнос"' style="min-height: 200px !important;")
13
13
  div(style="max-width:400px").q-pa-md
@@ -21,13 +21,12 @@ q-btn(@click="showDialog=true" color="primary" size="sm")
21
21
  </template>
22
22
 
23
23
  <script setup lang="ts">
24
- import { ref } from 'vue'
24
+ import { ref, computed } from 'vue'
25
25
  import { Form } from 'src/shared/ui/Form'
26
26
  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 { CURRENCY } from 'src/shared/config'
31
30
  import { SuccessAlert, FailAlert } from 'src/shared/api'
32
31
  import { useSessionStore } from 'src/entities/Session'
33
32
  import type { IPaymentOrder } from 'src/shared/lib/types/payments'
@@ -35,7 +34,7 @@ import { formatAssetToReadable } from 'src/shared/lib/utils/formatAssetToReadabl
35
34
  import { useSystemStore } from 'src/entities/System/model';
36
35
  const { info } = useSystemStore()
37
36
 
38
- const { createDeposit, loadUserWalet } = useWalletStore()
37
+ const { createDeposit, loadUserWallet } = useWalletStore()
39
38
 
40
39
  //TODO move username to Session entity
41
40
  const session = useSessionStore()
@@ -55,7 +54,7 @@ const handlerSubmit = async (): Promise<void> => {
55
54
  isSubmitting.value = true
56
55
  try {
57
56
  paymentOrder.value = (await createDeposit({
58
- quantity: `${parseFloat(quantity.value.toString()).toFixed(4)} ${CURRENCY}`
57
+ quantity: `${parseFloat(quantity.value.toString()).toFixed(4)} ${process.env.CURRENCY}`
59
58
  })) as IPaymentOrder
60
59
  isSubmitting.value = false
61
60
  } catch (e: any) {
@@ -65,13 +64,15 @@ const handlerSubmit = async (): Promise<void> => {
65
64
  }
66
65
  }
67
66
 
67
+ const currency = computed(() => process.env.CURRENCY)
68
+
68
69
  const paymentFail = (): void => {
69
70
  clear()
70
71
  FailAlert('Произошла ошибка при приёме платежа')
71
72
  }
72
73
 
73
74
  const paymentSuccess = (): void => {
74
- loadUserWalet({ coopname: info.coopname, username: session.username as string } as ILoadUserWallet)
75
+ loadUserWallet({ coopname: info.coopname, username: session.username as string } as ILoadUserWallet)
75
76
  clear()
76
77
  SuccessAlert('Платеж успешно принят')
77
78
  }
@@ -1,25 +1,24 @@
1
1
  <template lang="pug">
2
- q-btn(@click="showDialog = true" size="sm" color="primary")
2
+ q-btn(@click="showDialog = true" color="primary")
3
3
  q-icon(name="fa-solid fa-chevron-down").q-mr-sm
4
4
  span получить возврат
5
5
 
6
6
  q-dialog(v-model="showDialog" @hide="clear")
7
7
  ModalBase( :title='"Введите сумму"' )
8
- Form(:handler-submit="handlerSubmit" :is-submitting="isSubmitting" :button-cancel-txt="'Отменить'" :button-submit-txt="'Продолжить'" @cancel="clear").q-pa-sm
8
+ Form(:disabled="true" :handler-submit="handlerSubmit" :is-submitting="isSubmitting" :button-cancel-txt="'Отменить'" :button-submit-txt="'Продолжить'" @cancel="clear").q-pa-sm
9
9
  q-input(v-model="quantity" standout="bg-teal text-white" type="number" :min="0" :step="1000" :rules="[val => val > 0 || 'Сумма взноса должна быть положительной']")
10
10
  template(#append)
11
- span.text-overline {{ CURRENCY }}
11
+ span.text-overline {{ currency }}
12
12
  //- template(#hint)
13
13
  //- span комиссия провайдера {{feePercent}}%, к получению {{toRecieve}}
14
14
 
15
15
  </template>
16
16
  <script setup lang="ts">
17
17
 
18
- import { ref } from 'vue';
19
- import { CURRENCY } from 'src/shared/config';
18
+ import { ref, computed } from 'vue';
20
19
  import { ModalBase } from 'src/shared/ui/ModalBase';
21
20
  import { Form } from 'src/shared/ui/Form';
22
-
21
+ const currency = computed(() => process.env.CURRENCY)
23
22
  const showDialog = ref(false)
24
23
  const quantity = ref(1000)
25
24
  const isSubmitting = ref(false)
@@ -34,7 +33,7 @@ const handlerSubmit = async (): Promise<void> => {
34
33
  isSubmitting.value = true
35
34
  try {
36
35
  // paymentOrder.value = (await createDeposit({
37
- // quantity: `${parseFloat(quantity.value.toString()).toFixed(4)} ${CURRENCY}`,
36
+ // quantity: `${parseFloat(quantity.value.toString()).toFixed(4)} ${process.env.CURRENCY}`,
38
37
  // provider: 'yookassa',
39
38
  // })) as IPaymentOrder
40
39
  isSubmitting.value = false
@@ -0,0 +1 @@
1
+ export { default as BlankPage } from './BlankPage.vue'
@@ -0,0 +1,64 @@
1
+ <template lang="pug">
2
+ div.q-pa-md
3
+ div.row
4
+ div.col-md-12.col-xs-12
5
+ q-card(flat class="card-container q-pa-md" v-if="contacts && contacts.details")
6
+ div.row.items-center.q-mb-md
7
+ div.col-12
8
+ div.text-h4.q-mb-xs Контактная информация
9
+ div.text-subtitle1 {{ contacts.full_name }}
10
+
11
+ div.row.q-mb-md
12
+ div.col-12
13
+ div.info-card
14
+ div.card-title Регистрационные данные
15
+ div.row.q-col-gutter-md
16
+ div.col-12.col-md-6
17
+ div.q-my-sm
18
+ div.card-label ИНН
19
+ div.card-value {{ contacts.details.inn }}
20
+ div.col-12.col-md-6
21
+ div.q-my-sm
22
+ div.card-label ОГРН
23
+ div.card-value {{ contacts.details.ogrn }}
24
+
25
+ div.row.q-mb-md
26
+ div.col-12
27
+ div.info-card
28
+ div.card-title Контактные данные
29
+ div.row.q-col-gutter-md
30
+ div.col-12
31
+ div.q-my-sm
32
+ div.card-label Юридический адрес
33
+ div.card-value {{ contacts.full_address }}
34
+
35
+ div.col-12.col-md-6
36
+ div.q-my-sm
37
+ div.card-label Телефон
38
+ div.card-value {{ contacts.phone }}
39
+
40
+ div.col-12.col-md-6
41
+ div.q-my-sm
42
+ div.card-label Электронная почта
43
+ div.card-value {{ contacts.email }}
44
+
45
+ div.row.q-mb-md(v-if="contacts.chairman")
46
+ div.col-12
47
+ div.info-card
48
+ div.card-title Совет
49
+ div.q-my-sm
50
+ div.card-label Председатель
51
+ div.card-value {{ chairman }}
52
+ </template>
53
+
54
+ <script lang="ts" setup>
55
+ import { useCooperativeStore } from 'src/entities/Cooperative';
56
+ import { computed } from 'vue';
57
+ import 'src/shared/ui/CardStyles/index.scss';
58
+
59
+ const cooperative = useCooperativeStore()
60
+ cooperative.loadContacts()
61
+
62
+ const contacts = computed(() => cooperative.contacts)
63
+ const chairman = computed(() => `${contacts.value?.chairman?.last_name} ${contacts.value?.chairman?.first_name} ${contacts.value?.chairman?.middle_name}`)
64
+ </script>
@@ -1,2 +1 @@
1
- export {default as CooperativeContacts} from './Contacts.vue'
2
1
  export {default as ChangeCooperativeContacts} from './ChangeContacts.vue'
@@ -4,12 +4,11 @@ import { useCooperativeStore } from 'src/entities/Cooperative';
4
4
  import { useSessionStore } from 'src/entities/Session';
5
5
  import { useUpdateCoop } from 'src/features/Cooperative/UpdateCoop';
6
6
  import { FailAlert, SuccessAlert } from 'src/shared/api';
7
- import { CURRENCY } from 'src/shared/config';
8
7
  import { formatToAsset } from 'src/shared/lib/utils/formatToAsset';
9
- import { ref, watch } from 'vue';
8
+ import { ref, watch, computed } from 'vue';
10
9
  import { useSystemStore } from 'src/entities/System/model';
11
10
  const { info } = useSystemStore()
12
-
11
+ const currency = computed(() => process.env.CURRENCY)
13
12
  const coop = useCooperativeStore()
14
13
  coop.loadPublicCooperativeData(info.coopname)
15
14
  coop.loadPrivateCooperativeData()
@@ -29,10 +28,10 @@ const save = async () => {
29
28
  await updateCoop({
30
29
  coopname: info.coopname,
31
30
  username: session.username,
32
- initial: formatToAsset(localCoop.value.initial, CURRENCY),
33
- minimum: formatToAsset(localCoop.value.minimum, CURRENCY),
34
- org_initial: formatToAsset(localCoop.value.org_initial, CURRENCY),
35
- org_minimum: formatToAsset(localCoop.value.org_minimum, CURRENCY),
31
+ initial: formatToAsset(localCoop.value.initial, process.env.CURRENCY as string),
32
+ minimum: formatToAsset(localCoop.value.minimum, process.env.CURRENCY as string),
33
+ org_initial: formatToAsset(localCoop.value.org_initial, process.env.CURRENCY as string),
34
+ org_minimum: formatToAsset(localCoop.value.org_minimum, process.env.CURRENCY as string),
36
35
  announce: coop.publicCooperativeData?.announce,
37
36
  description: coop.publicCooperativeData?.description
38
37
  })
@@ -68,20 +67,20 @@ div.q-pa-md
68
67
 
69
68
  q-input(standout="bg-teal text-white" v-model="localCoop.initial" label="Вступительный взнос")
70
69
  template(#append)
71
- span.text-overline {{ CURRENCY }}
70
+ span.text-overline {{ currency }}
72
71
 
73
72
  q-input(standout="bg-teal text-white" v-model="localCoop.minimum" label="Минимальный паевый взнос")
74
73
  template(#append)
75
- span.text-overline {{ CURRENCY }}
74
+ span.text-overline {{ currency }}
76
75
 
77
76
  q-card(flat).q-pa-md.q-gutter-sm
78
77
  p.text-overline ЮРИДИЧЕСКИЕ ЛИЦА
79
78
  q-input(standout="bg-teal text-white" v-model="localCoop.org_initial" label="Вступительный взнос")
80
79
  template(#append)
81
- span.text-overline {{ CURRENCY }}
80
+ span.text-overline {{ currency }}
82
81
  q-input(standout="bg-teal text-white" v-model="localCoop.org_minimum" label="Минимальный паевый взнос")
83
82
  template(#append)
84
- span.text-overline {{ CURRENCY }}
83
+ span.text-overline {{ currency }}
85
84
 
86
85
  q-btn(@click="save" size="sm" color="primary")
87
86
  q-icon(name="save").q-mr-sm
@@ -0,0 +1 @@
1
+ export {default as ChangeRegisterPaymentsPage} from './ChangeRegisterPayments.vue'
@@ -0,0 +1 @@
1
+ export { default as ListOfAgendaQuestions } from './ui/ListOfAgendaQuestions.vue'
@@ -0,0 +1,118 @@
1
+ <template lang="pug">
2
+ q-card(flat)
3
+ QuestionsTable(
4
+ :decisions="decisions"
5
+ :loading="loading"
6
+ :isChairman="currentUser.isChairman"
7
+ :format-decision-title="formatDecisionTitle"
8
+ :is-voted-for="isVotedFor"
9
+ :is-voted-against="isVotedAgainst"
10
+ :is-voted-any="isVotedAny"
11
+ :processing-decisions="processingDecisions"
12
+ @authorize="onAuthorizeDecision"
13
+ @vote-for="onVoteFor"
14
+ @vote-against="onVoteAgainst"
15
+ )
16
+ template(#top)
17
+ CreateProjectFreeDecisionButton
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import { onBeforeUnmount, computed, ref } from 'vue'
22
+ import { useRoute } from 'vue-router'
23
+ import { useCurrentUserStore } from 'src/entities/User'
24
+ import { CreateProjectFreeDecisionButton } from 'src/features/Decision/CreateProject'
25
+ import { useDecisionProcessor } from 'src/processes/process-decisions'
26
+ import { FailAlert, SuccessAlert } from 'src/shared/api'
27
+ import { QuestionsTable } from 'src/widgets/Questions'
28
+
29
+ const route = useRoute()
30
+ const currentUser = useCurrentUserStore()
31
+ const processingDecisions = ref<Record<number, boolean>>({})
32
+
33
+ // Получаем процесс обработки решений
34
+ const decisionProcessor = useDecisionProcessor()
35
+ const {
36
+ loading,
37
+ loadDecisions,
38
+ authorizeAndExecuteDecision,
39
+ voteForDecision,
40
+ voteAgainstDecision,
41
+ isVotedFor,
42
+ isVotedAgainst,
43
+ isVotedAny,
44
+ formatDecisionTitle
45
+ } = decisionProcessor
46
+
47
+ // Данные
48
+ const decisions = computed(() => decisionProcessor.decisions.value)
49
+
50
+ // Обработчики событий
51
+ const onAuthorizeDecision = async (row) => {
52
+ const decision_id = Number(row.table.id)
53
+ processingDecisions.value[decision_id] = true
54
+
55
+ try {
56
+ await authorizeAndExecuteDecision(row)
57
+ SuccessAlert('Решение принято и исполнено')
58
+ await loadDecisions(route.params.coopname as string)
59
+ } catch (e) {
60
+ FailAlert(e)
61
+ } finally {
62
+ // Гарантированно сбрасываем состояние загрузки
63
+ processingDecisions.value[decision_id] = false
64
+
65
+ // Добавляем таймаут для гарантии обновления UI
66
+ setTimeout(() => {
67
+ processingDecisions.value = { ...processingDecisions.value }
68
+ }, 100)
69
+ }
70
+ }
71
+
72
+ const onVoteFor = async (decision_id) => {
73
+ processingDecisions.value[decision_id] = true
74
+
75
+ try {
76
+ await voteForDecision(decision_id)
77
+ SuccessAlert('Голос принят')
78
+ await loadDecisions(route.params.coopname as string)
79
+ } catch (e) {
80
+ FailAlert(e)
81
+ } finally {
82
+ // Гарантированно сбрасываем состояние загрузки
83
+ processingDecisions.value[decision_id] = false
84
+
85
+ // Добавляем таймаут для гарантии обновления UI
86
+ setTimeout(() => {
87
+ processingDecisions.value = { ...processingDecisions.value }
88
+ }, 100)
89
+ }
90
+ }
91
+
92
+ const onVoteAgainst = async (decision_id) => {
93
+ processingDecisions.value[decision_id] = true
94
+
95
+ try {
96
+ await voteAgainstDecision(decision_id)
97
+ SuccessAlert('Голос принят')
98
+ await loadDecisions(route.params.coopname as string)
99
+ } catch (e) {
100
+ FailAlert(e)
101
+ } finally {
102
+ // Гарантированно сбрасываем состояние загрузки
103
+ processingDecisions.value[decision_id] = false
104
+
105
+ // Добавляем таймаут для гарантии обновления UI
106
+ setTimeout(() => {
107
+ processingDecisions.value = { ...processingDecisions.value }
108
+ }, 100)
109
+ }
110
+ }
111
+
112
+ // Инициализация
113
+ loadDecisions(route.params.coopname as string)
114
+
115
+ // Периодическое обновление данных
116
+ const interval = setInterval(() => loadDecisions(route.params.coopname as string, true), 10000)
117
+ onBeforeUnmount(() => clearInterval(interval))
118
+ </script>
@@ -0,0 +1 @@
1
+ export {default as ListOfQuestionsPage} from './ListOfQuestions.vue'
@@ -0,0 +1,24 @@
1
+ <template lang="pug">
2
+ q-page.padding
3
+ ListOfDocumentsWidget(
4
+ :username="coopname"
5
+ :filter="{}"
6
+ :showFilter="true"
7
+ :initialDocumentType="typeForToggle"
8
+ )
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ import { ref, computed } from 'vue'
13
+ import { useSystemStore } from 'src/entities/System/model'
14
+ import { ListOfDocumentsWidget } from 'src/widgets/Cooperative/Documents/ListOfDocuments/ui'
15
+ import type { DocumentType } from 'src/entities/Document/model/types'
16
+
17
+ // Получаем системную информацию
18
+ const { info } = useSystemStore()
19
+ const coopname = computed(() => info.coopname)
20
+
21
+ // Переменная для отслеживания типа в интерфейсе
22
+ const typeForToggle = ref<DocumentType>('newsubmitted')
23
+
24
+ </script>
@@ -0,0 +1 @@
1
+ export * from './model'