@coopenomics/desktop 2.2.10 → 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 (355) hide show
  1. package/.env-example +6 -1
  2. package/.env-testnet +8 -0
  3. package/Dockerfile +12 -0
  4. package/extensions/market/install.ts +78 -0
  5. package/extensions/market-admin/install.ts +42 -0
  6. package/extensions/participant/install.ts +125 -0
  7. package/extensions/powerup/install.ts +20 -0
  8. package/extensions/soviet/install.ts +83 -0
  9. package/package.json +6 -5
  10. package/quasar.config.cjs +5 -12
  11. package/src/app/App.vue +44 -73
  12. package/src/app/layouts/default.vue +40 -0
  13. package/src/app/layouts/useDefaultLayoutLogic.ts +59 -0
  14. package/src/app/providers/routes/index.ts +19 -34
  15. package/src/app/styles/style.css +4 -0
  16. package/src/boot/init.ts +6 -0
  17. package/src/boot/sentry.ts +1 -2
  18. package/src/desktops/index.ts +0 -6
  19. package/src/entities/Account/model/index.ts +1 -1
  20. package/src/entities/Agenda/api/index.ts +20 -0
  21. package/src/entities/Agenda/index.ts +2 -0
  22. package/src/entities/Agenda/model/index.ts +2 -0
  23. package/src/entities/Agenda/model/store.ts +36 -0
  24. package/src/entities/Agenda/model/types.ts +4 -0
  25. package/src/entities/Branch/model/index.ts +1 -1
  26. package/src/entities/Desktop/api/index.ts +16 -1
  27. package/src/entities/Desktop/model/store.ts +112 -106
  28. package/src/entities/Desktop/model/types.ts +14 -1
  29. package/src/entities/Document/api/index.ts +24 -0
  30. package/src/entities/Document/index.ts +2 -0
  31. package/src/entities/Document/model/store.ts +117 -0
  32. package/src/entities/Document/model/types.ts +18 -0
  33. package/src/entities/Meet/api/index.ts +58 -0
  34. package/src/entities/Meet/index.ts +2 -0
  35. package/src/entities/Meet/model/store.ts +72 -0
  36. package/src/entities/Meet/types/index.ts +7 -0
  37. package/src/entities/Payment/api/index.ts +20 -0
  38. package/src/entities/Payment/model/index.ts +2 -0
  39. package/src/entities/Payment/model/store.ts +62 -0
  40. package/src/entities/Payment/model/types.ts +7 -0
  41. package/src/entities/Session/model/store.ts +3 -3
  42. package/src/entities/System/model/store.ts +1 -1
  43. package/src/entities/User/model/stores.ts +3 -1
  44. package/src/entities/Wallet/api/index.ts +15 -33
  45. package/src/entities/Wallet/model/stores.ts +3 -23
  46. package/src/entities/Wallet/model/types.ts +2 -3
  47. package/src/features/Agreementer/SignAgreementDialog/ui/SignAgreementDialog.vue +1 -1
  48. package/src/features/Branch/SelectBranch/index.ts +2 -0
  49. package/src/features/Branch/SelectBranch/ui/SelectBranchOverlay.vue +52 -105
  50. package/src/features/Decision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +1 -1
  51. package/src/features/Decision/ParticipantApplication/model/index.ts +38 -0
  52. package/src/features/FreeDecision/CreateProject/model/index.ts +92 -0
  53. package/src/features/FreeDecision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +51 -0
  54. package/src/features/FreeDecision/CreateProject/ui/index.ts +1 -0
  55. package/src/features/FreeDecision/GenerateDecision/index.ts +1 -0
  56. package/src/features/FreeDecision/GenerateDecision/model/index.ts +36 -0
  57. package/src/features/FreeDecision/index.ts +2 -0
  58. package/src/features/Meet/CloseMeetWithDecision/index.ts +1 -0
  59. package/src/features/Meet/CloseMeetWithDecision/model/index.ts +92 -0
  60. package/src/features/Meet/CreateMeet/index.ts +2 -0
  61. package/src/features/Meet/CreateMeet/model/index.ts +65 -0
  62. package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +34 -0
  63. package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +136 -0
  64. package/src/features/Meet/CreateMeet/ui/index.ts +2 -0
  65. package/src/features/Meet/GenerateAgenda/index.ts +1 -0
  66. package/src/features/Meet/GenerateAgenda/model/index.ts +18 -0
  67. package/src/features/Meet/GenerateBallot/index.ts +1 -0
  68. package/src/features/Meet/GenerateBallot/model/index.ts +18 -0
  69. package/src/features/Meet/GenerateNotification/index.ts +1 -0
  70. package/src/features/Meet/GenerateNotification/model/index.ts +18 -0
  71. package/src/features/Meet/GenerateSovietDecision/index.ts +1 -0
  72. package/src/features/Meet/GenerateSovietDecision/model/index.ts +48 -0
  73. package/src/features/Meet/MeetDetailsManagement/index.ts +1 -0
  74. package/src/features/Meet/MeetDetailsManagement/model/index.ts +121 -0
  75. package/src/features/Meet/RestartMeet/index.ts +2 -0
  76. package/src/features/Meet/RestartMeet/model/index.ts +54 -0
  77. package/src/features/Meet/RestartMeet/ui/RestartMeet.vue +46 -0
  78. package/src/features/Meet/RestartMeet/ui/RestartMeetForm.vue +92 -0
  79. package/src/features/Meet/RestartMeet/ui/index.ts +2 -0
  80. package/src/features/Meet/VoteOnMeet/index.ts +1 -0
  81. package/src/features/Meet/VoteOnMeet/model/index.ts +18 -0
  82. package/src/features/Payment/SetStatus/api/index.ts +20 -0
  83. package/src/features/Payment/SetStatus/index.ts +1 -0
  84. package/src/features/Payment/SetStatus/model/index.ts +30 -0
  85. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/SetOrderPaidStatusButton.vue +7 -3
  86. package/src/features/PaymentMethod/AddPaymentMethod/model/index.ts +2 -2
  87. package/src/features/PaymentMethod/AddPaymentMethod/ui/AddPaymentButton.vue +1 -1
  88. package/src/features/PaymentMethod/DeletePaymentMethod/model/index.ts +1 -1
  89. package/src/features/PaymentMethod/DeletePaymentMethod/ui/DeletePaymentMethodButton.vue +3 -1
  90. package/src/features/Request/CancelRequest/ui/CancelButton.vue +1 -1
  91. package/src/features/Request/ConfirmRecieveOnRequest/ui/ConfirmRecieveOnRequest.vue +1 -1
  92. package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +3 -5
  93. package/src/features/Request/CreateParentOffer/ui/ImageUploaderWithPreview/ImageUploaderWithPreview.vue +4 -3
  94. package/src/features/Request/DisputeOnRequest/ui/DisputeOnRequestButton.vue +1 -1
  95. package/src/features/Request/ModerateRequest/ui/ModerateRequestButton.vue +2 -2
  96. package/src/features/Request/PublishRequest/ui/PublishRequestButton.vue +1 -1
  97. package/src/features/Request/RecieveOnRequest/ui/RecieveOnRequestButton.vue +1 -1
  98. package/src/features/Request/UnpublishRequest/ui/UnpublishRequestButton.vue +1 -1
  99. package/src/features/Union/AddCooperative/model/index.ts +4 -5
  100. package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +5 -6
  101. package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +4 -4
  102. package/src/features/User/LoginUser/model/index.ts +3 -3
  103. package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +0 -6
  104. package/src/features/User/Logout/model/index.ts +2 -0
  105. package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +8 -7
  106. package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +6 -7
  107. package/src/pages/Blank/index.ts +1 -0
  108. package/src/pages/Contacts/ContactsPage.vue +64 -0
  109. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/index.ts +0 -1
  110. package/src/{widgets/Cooperative/Contributions/ui/ChangeContributions.vue → pages/Cooperative/ChangeRegisterPayments/ui/ChangeRegisterPayments.vue} +10 -11
  111. package/src/pages/Cooperative/ChangeRegisterPayments/ui/index.ts +1 -0
  112. package/src/pages/Cooperative/ListOfAgenda/index.ts +1 -0
  113. package/src/pages/Cooperative/ListOfAgenda/ui/ListOfAgendaQuestions.vue +118 -0
  114. package/src/pages/Cooperative/ListOfAgenda/ui/index.ts +1 -0
  115. package/src/pages/Cooperative/ListOfDocuments/ListOfDocumentsPage.vue +24 -0
  116. package/src/pages/Cooperative/ListOfMeets/model/index.ts +1 -0
  117. package/src/pages/Cooperative/ListOfMeets/model/model.ts +117 -0
  118. package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +90 -0
  119. package/src/pages/Cooperative/ListOfMeets/ui/index.ts +1 -0
  120. package/src/pages/Cooperative/ListOfOrders/index.ts +1 -1
  121. package/src/pages/Cooperative/ListOfOrders/ui/ListOfOrdersPage.vue +0 -4
  122. package/src/pages/Cooperative/ListOfParticipants/ui/ListOfParticipantsPage.vue +61 -10
  123. package/src/pages/Cooperative/ListOfParticipants/ui/index.ts +1 -1
  124. package/src/pages/Cooperative/MeetDetails/ui/MeetDetailsPage.vue +88 -0
  125. package/src/pages/Cooperative/MeetDetails/ui/index.ts +1 -0
  126. package/src/pages/Cooperative/MemberBranchList/ui/index.ts +1 -0
  127. package/src/pages/Cooperative/Payments/index.ts +1 -0
  128. package/src/pages/Cooperative/Payments/ui/PaymentsPage.vue +7 -0
  129. package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/ExtensionPage.vue +35 -20
  130. package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/ExtensionsShowcase.vue +2 -2
  131. package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/InstalledExtensions.vue +2 -2
  132. package/src/pages/Marketplace/OfferPage/ui/OfferPage.vue +1 -1
  133. package/src/pages/Marketplace/Showcase/ui/ShowcasePage.vue +1 -1
  134. package/src/pages/Marketplace/SuppliesList/ui/SuppliesListPage.vue +1 -1
  135. package/src/pages/Marketplace/UserParentOffers/ui/UserParentOffersPage.vue +1 -1
  136. package/src/pages/Marketplace/UserSuppliesList/ui/UserSuppliesListPage.vue +1 -1
  137. package/src/pages/PermissionDenied/index.ts +1 -0
  138. package/src/pages/Registrator/SignUp/EmailInput.vue +2 -3
  139. package/src/pages/Registrator/SignUp/GenerateAccount.vue +2 -3
  140. package/src/pages/Registrator/SignUp/PayInitial.vue +1 -1
  141. package/src/pages/Registrator/SignUp/ReadStatement.vue +2 -2
  142. package/src/pages/Registrator/SignUp/SelectBranch.vue +2 -2
  143. package/src/pages/Registrator/SignUp/SignStatement.vue +2 -2
  144. package/src/pages/Registrator/SignUp/SignUp.vue +5 -12
  145. package/src/pages/Registrator/SignUp/WaitingRegistration.vue +1 -5
  146. package/src/pages/Registrator/SignUp/Welcome.vue +4 -3
  147. package/src/pages/Union/ConnectionAgreement/index.ts +1 -0
  148. package/src/pages/Union/ListOfCooperatives/ui/UnionPageListOfCooperatives.vue +139 -6
  149. package/src/pages/User/DocumentsPage/UserDocumentsPage.vue +23 -0
  150. package/src/pages/User/DocumentsPage/index.ts +1 -0
  151. package/src/pages/User/PaymentsPage/ui/UserPayments.vue +11 -0
  152. package/src/pages/User/PaymentsPage/ui/index.ts +1 -0
  153. package/src/pages/User/ProfilePage/index.ts +1 -0
  154. package/src/pages/User/ProfilePage/ui/ProfilePage.vue +114 -0
  155. package/src/pages/User/ProfilePage/ui/index.ts +1 -0
  156. package/src/pages/User/SettingsPage/ui/index.ts +1 -1
  157. package/src/pages/User/WalletPage/index.ts +1 -0
  158. package/src/pages/User/WalletPage/ui/WalletPage.vue +72 -0
  159. package/src/pages/User/WalletPage/ui/index.ts +1 -0
  160. package/src/processes/init-app/index.ts +28 -0
  161. package/src/processes/init-installed-extensions/index.ts +25 -0
  162. package/src/processes/init-wallet/index.ts +40 -0
  163. package/src/processes/navigation-guard-setup/index.ts +45 -0
  164. package/src/processes/process-decisions/index.ts +275 -0
  165. package/src/processes/select-branch/index.ts +80 -0
  166. package/src/processes/watch-branch-overlay/index.ts +38 -0
  167. package/src/processes/watch-desktop-health/index.ts +33 -0
  168. package/src/shared/api/alerts.ts +2 -6
  169. package/src/shared/api/axios.ts +4 -5
  170. package/src/shared/api/client.ts +3 -4
  171. package/src/shared/api/eosio.ts +1 -2
  172. package/src/shared/api/utils.ts +1 -3
  173. package/src/shared/config/index.ts +0 -1
  174. package/src/shared/hooks/index.ts +2 -0
  175. package/src/shared/hooks/useAgendaPoints.ts +24 -0
  176. package/src/shared/hooks/useWindowSize.ts +13 -0
  177. package/src/shared/lib/composables/useDisplayName.ts +34 -0
  178. package/src/shared/lib/navigation/index.ts +2 -0
  179. package/src/shared/lib/navigation/routeUtils.ts +51 -0
  180. package/src/shared/lib/navigation/useBackButton.ts +63 -0
  181. package/src/shared/lib/utils/dates/validateDateWithinRange.ts +23 -0
  182. package/src/shared/ui/BaseDocument/BaseDocument.vue +120 -90
  183. package/src/{components/menu/blockchainStatus.vue → shared/ui/BlockchainStatusBar/BlockchainStatusBar.vue} +1 -0
  184. package/src/shared/ui/BlockchainStatusBar/index.ts +1 -0
  185. package/src/shared/ui/CardStyles/index.scss +61 -0
  186. package/src/shared/ui/ComplexDocument/ComplexDocument.vue +31 -8
  187. package/src/shared/ui/CopyableInput/index.ts +1 -0
  188. package/src/shared/ui/CopyableInput/ui/CopyableInput.vue +62 -0
  189. package/src/shared/ui/EditableEntrepreneurCard/EditableEntrepreneurCard.vue +9 -8
  190. package/src/shared/ui/EditableIndividualCard/EditableIndividualCard.vue +10 -10
  191. package/src/shared/ui/EditableOrganizationCard/EditableOrganizationCard.vue +57 -47
  192. package/src/shared/ui/Form/Form.vue +3 -1
  193. package/src/shared/ui/InputStyles/index.scss +29 -0
  194. package/src/shared/ui/TabStyles/index.scss +53 -0
  195. package/src/shared/ui/index.ts +1 -0
  196. package/src/{components/history/AccountEvents.vue → widgets/AccountActions/AccountActionsPage.vue} +2 -2
  197. package/src/widgets/AccountActions/index.ts +1 -0
  198. package/src/widgets/BankDetailsCard/ui/BankDetailsCard.vue +2 -2
  199. package/src/widgets/BranchCard/ui/BranchCard.vue +2 -2
  200. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentCard.vue +48 -0
  201. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentsTable.vue +162 -0
  202. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/ListOfDocumentsWidget.vue +77 -120
  203. package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/index.ts +3 -1
  204. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/ListOfOrdersWidget.vue +135 -128
  205. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/OrderCard.vue +74 -0
  206. package/src/widgets/Cooperative/Orders/ListOfOrders/ui/index.ts +2 -1
  207. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/ListOfPaymentsWidget.vue +216 -0
  208. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/PaymentCard.vue +73 -0
  209. package/src/widgets/Cooperative/Payments/ListOfPayments/ui/index.ts +2 -0
  210. package/src/widgets/Cooperative/Payments/index.ts +1 -0
  211. package/src/widgets/Desktop/LeftDrawerMenu/LeftDrawerMenu.vue +3 -2
  212. package/src/widgets/Desktop/SecondLevelMenuList/SecondLevelMenuList.vue +58 -91
  213. package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +114 -59
  214. package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/ExtensionCard.vue +12 -7
  215. package/src/widgets/Header/BackButton/BackButton.vue +25 -0
  216. package/src/widgets/Header/BackButton/index.ts +1 -0
  217. package/src/widgets/Header/CommonHeader/CooperativeSettingsHeader.vue +34 -0
  218. package/src/widgets/Header/CommonHeader/ExtstoreHeader.vue +41 -0
  219. package/src/widgets/Header/CommonHeader/Header.vue +33 -198
  220. package/src/widgets/Header/CommonHeader/HeaderStyles.scss +22 -0
  221. package/src/widgets/Header/CommonHeader/MainHeader.vue +87 -0
  222. package/src/widgets/Header/CommonHeader/UserSettingsHeader.vue +29 -0
  223. package/src/widgets/Header/CommonHeader/index.ts +1 -1
  224. package/src/widgets/Header/SettingsDropdown/SettingsDropdown.vue +0 -6
  225. package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/Base.vue +1 -2
  226. package/src/widgets/Meets/MeetDetailsActions/MeetDetailsActions.vue +51 -0
  227. package/src/widgets/Meets/MeetDetailsActions/index.ts +1 -0
  228. package/src/widgets/Meets/MeetDetailsActions/model.ts +46 -0
  229. package/src/widgets/Meets/MeetDetailsAgenda/MeetDetailsAgenda.vue +29 -0
  230. package/src/widgets/Meets/MeetDetailsAgenda/index.ts +1 -0
  231. package/src/widgets/Meets/MeetDetailsHeader/MeetDetailsHeader.vue +40 -0
  232. package/src/widgets/Meets/MeetDetailsHeader/index.ts +1 -0
  233. package/src/widgets/Meets/MeetDetailsVoting/MeetDetailsVoting.vue +77 -0
  234. package/src/widgets/Meets/MeetDetailsVoting/index.ts +1 -0
  235. package/src/widgets/Meets/MeetDetailsVoting/model.ts +117 -0
  236. package/src/widgets/Meets/MeetInfoCard/ui/MeetInfoCard.vue +38 -0
  237. package/src/widgets/Meets/MeetInfoCard/ui/index.ts +1 -0
  238. package/src/widgets/Meets/MeetsTable/ui/MeetsTable.vue +118 -0
  239. package/src/widgets/Meets/MeetsTable/ui/index.ts +1 -0
  240. package/src/widgets/Participants/index.ts +1 -0
  241. package/src/widgets/Participants/ui/ParticipantCard.vue +89 -0
  242. package/src/widgets/Participants/ui/ParticipantDetails.vue +79 -0
  243. package/src/widgets/Participants/ui/ParticipantsTable.vue +129 -0
  244. package/src/widgets/Participants/ui/index.ts +4 -0
  245. package/src/widgets/Questions/index.ts +3 -0
  246. package/src/widgets/Questions/ui/QuestionCard/QuestionCard.vue +109 -0
  247. package/src/widgets/Questions/ui/QuestionCard/index.ts +1 -0
  248. package/src/widgets/Questions/ui/QuestionsTable/QuestionsTable.vue +177 -0
  249. package/src/widgets/Questions/ui/QuestionsTable/index.ts +1 -0
  250. package/src/widgets/Questions/ui/VotingButtons/VotingButtons.vue +75 -0
  251. package/src/widgets/Questions/ui/VotingButtons/index.ts +1 -0
  252. package/src/widgets/Questions/ui/index.ts +3 -0
  253. package/src/widgets/RequireAgreements/index.ts +1 -0
  254. package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +81 -85
  255. package/tsconfig.json +1 -1
  256. package/extensions/powerup/boot.ts +0 -17
  257. package/src/app/providers/card/store.ts +0 -42
  258. package/src/boot/branch-selector.ts +0 -40
  259. package/src/boot/init-stores.ts +0 -51
  260. package/src/boot/navigation-guards.ts +0 -46
  261. package/src/components/menu/footerMobileMenu.vue +0 -79
  262. package/src/components/soviet/index.vue +0 -76
  263. package/src/components/soviet/staff.vue +0 -274
  264. package/src/desktops/User/index.ts +0 -1
  265. package/src/desktops/User/model/index.ts +0 -329
  266. package/src/entities/Menu/model/store.ts +0 -69
  267. package/src/entities/Menu/model/types.ts +0 -11
  268. package/src/entities/Menu/ui/index.ts +0 -1
  269. package/src/entities/Order/api/index.ts +0 -14
  270. package/src/entities/Order/model/store.ts +0 -87
  271. package/src/features/Order/SetStatus/api/index.ts +0 -7
  272. package/src/features/Order/SetStatus/model/index.ts +0 -23
  273. package/src/pages/Cooperative/Contacts/ui/ContactsPage.vue +0 -7
  274. package/src/pages/Cooperative/ListOfBranches/ui/index.ts +0 -1
  275. package/src/pages/Documentor/ListOfDocuments/ListOfDocumentsPage.vue +0 -12
  276. package/src/pages/Union/Connection/index.ts +0 -1
  277. package/src/pages/_layouts/blank.vue +0 -24
  278. package/src/pages/_layouts/default.vue +0 -79
  279. package/src/types/index.ts +0 -3
  280. package/src/widgets/Commutator/Commutator.vue +0 -7
  281. package/src/widgets/Commutator/index.ts +0 -1
  282. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/ListOfQuestions.vue +0 -273
  283. package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/index.ts +0 -1
  284. package/src/widgets/Cooperative/Contacts/ui/Contacts.vue +0 -52
  285. package/src/widgets/Cooperative/Contributions/ui/index.ts +0 -1
  286. package/src/widgets/Cooperative/Description/ui/SetDescription.vue +0 -4
  287. package/src/widgets/Cooperative/Description/ui/index.ts +0 -1
  288. package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/ListOfParticipantsWidget.vue +0 -186
  289. package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/index.ts +0 -1
  290. package/src/widgets/Desktop/SecondLevelMenu/SecondLevelMenu.vue +0 -59
  291. package/src/widgets/Desktop/SecondLevelMenu/index.ts +0 -1
  292. package/src/widgets/IndividualCard/ui/IndividualCard.vue +0 -170
  293. package/src/widgets/IndividualCard/ui/index.ts +0 -1
  294. package/src/widgets/OrganizationCard/ui/OrganizationCard.vue +0 -44
  295. package/src/widgets/OrganizationCard/ui/index.ts +0 -1
  296. package/src/widgets/Union/ListOfCooperatives/ui/UnionListOfCooperatives.vue +0 -136
  297. package/src/widgets/Union/ListOfCooperatives/ui/index.ts +0 -1
  298. package/src/entities/{Menu → Document}/model/index.ts +0 -0
  299. package/src/entities/{Order → Meet}/model/index.ts +0 -0
  300. package/src/entities/{Order → Payment}/index.ts +0 -0
  301. package/src/features/{Order/SetStatus → Decision/ParticipantApplication}/index.ts +0 -0
  302. package/src/{widgets/Request/SupplyOrderRequestCard → features/FreeDecision/CreateProject}/index.ts +0 -0
  303. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/SetOrderCompletedStatusButton.vue +0 -0
  304. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/index.ts +0 -0
  305. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/index.ts +0 -0
  306. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/SetOrderRefundedStatusButton.vue +0 -0
  307. package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/index.ts +0 -0
  308. package/src/pages/{blank/blank.vue → Blank/BlankPage.vue} +0 -0
  309. package/src/pages/{Cooperative/Contacts/ui → Contacts}/index.ts +0 -0
  310. package/src/pages/Cooperative/{Contacts → ChangeContacts}/index.ts +0 -0
  311. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/ChangeContacts.vue +0 -0
  312. package/src/pages/Cooperative/{ListOfBranches → ChangeRegisterPayments}/index.ts +0 -0
  313. package/src/pages/{Documentor → Cooperative}/ListOfDocuments/index.ts +0 -0
  314. package/src/pages/{Installer → Cooperative/ListOfMeets}/index.ts +0 -0
  315. package/src/{widgets/Cooperative/Agenda/ListOfQuestions → pages/Cooperative/MeetDetails}/index.ts +0 -0
  316. package/src/{widgets/Cooperative/Contacts → pages/Cooperative/MemberBranchList}/index.ts +0 -0
  317. package/src/pages/Cooperative/{ListOfBranches/ui/ListOfBranchesPage.vue → MemberBranchList/ui/MemberBranchListPage.vue} +0 -0
  318. package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/ExtensionStoreBase.vue +0 -0
  319. package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/index.ts +0 -0
  320. package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/index.ts +0 -0
  321. package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/index.ts +0 -0
  322. package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/index.ts +0 -0
  323. package/src/pages/{_layouts/permissionDenied.vue → PermissionDenied/PermissionDenied.vue} +0 -0
  324. package/src/pages/Union/{Connection/ConnectionPage.vue → ConnectionAgreement/ConnectionAgreementPage.vue} +0 -0
  325. package/src/{widgets/Cooperative/Contributions → pages/Union/InstallCooperative}/index.ts +0 -0
  326. package/src/pages/{Installer → Union/InstallCooperative}/ui/InstallCooperativePage.vue +0 -0
  327. package/src/pages/{Installer → Union/InstallCooperative}/ui/index.ts +0 -0
  328. package/src/{widgets/Cooperative/Participants/ListOfParticipants → pages/User/PaymentsPage}/index.ts +0 -0
  329. package/src/{components/history → widgets/AccountActions}/AccountLink.vue +0 -0
  330. package/src/{components/history → widgets/AccountActions}/ActionCell.vue +0 -0
  331. package/src/{components/history → widgets/AccountActions}/DataCell.vue +0 -0
  332. package/src/widgets/{IndividualCard → Cooperative/Payments/ListOfPayments}/index.ts +0 -0
  333. package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/index.ts +0 -0
  334. package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/CreateChildOrderCard.vue +0 -0
  335. package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/index.ts +0 -0
  336. package/src/widgets/{Request → Marketplace}/RequestCard/RequestCard.vue +0 -0
  337. package/src/widgets/{Request → Marketplace}/RequestCard/index.ts +0 -0
  338. package/src/{entities/Menu → widgets/Marketplace/SupplyOrderRequestCard}/index.ts +1 -1
  339. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/index.ts +0 -0
  340. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/types.ts +0 -0
  341. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/index.ts +0 -0
  342. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/EightStep.vue +0 -0
  343. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FifthStep.vue +0 -0
  344. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FirstStep.vue +0 -0
  345. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FourthStep.vue +0 -0
  346. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SecondStep.vue +0 -0
  347. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SeventhStep.vue +0 -0
  348. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SixthStep.vue +0 -0
  349. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/ThirdStep.vue +0 -0
  350. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/index.ts +0 -0
  351. /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/index.ts +0 -0
  352. /package/src/widgets/{OrganizationCard → Meets/MeetInfoCard}/index.ts +0 -0
  353. /package/src/widgets/{Union/ListOfCooperatives → Meets/MeetsTable}/index.ts +0 -0
  354. /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/RequireAgreements.vue +0 -0
  355. /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/index.ts +0 -0
@@ -1,5 +1,6 @@
1
1
  <template lang="pug">
2
- q-card(style="word-break: break-all !important; white-space: normal !important;").q-pa-md.dynamic-padding
2
+ q-card(:flat="isMobile" style="word-break: break-all !important; white-space: normal !important;").dynamic-padding
3
+
3
4
  div(v-if="loading").full-width.text-center
4
5
  div(style="margin:auto;").flex.q-pa-sm.full-width.text-center
5
6
  q-spinner
@@ -7,6 +8,7 @@ q-card(style="word-break: break-all !important; white-space: normal !important;"
7
8
  div(v-if="!loading")
8
9
  div(v-html="safeHtml").description.q-pa-xs
9
10
  div.row.q-mt-lg.q-pa-sm.justify-center
11
+
10
12
  q-card(style="word-break: break-all !important; text-wrap: pretty;" flat).col-md-8.col-xs-12.q-pa-sm.verify-card
11
13
  div.q-mr-lg.q-mt-md
12
14
  q-badge(:color="doc.hash == regeneratedHash ? 'teal' : 'red'").text-center.q-pa-xs
@@ -14,51 +16,72 @@ q-card(style="word-break: break-all !important; white-space: normal !important;"
14
16
  span контрольная сумма
15
17
  p.q-mr-lg.q-ml-lg.text-grey {{ doc.hash }}
16
18
 
17
- div.q-mr-lg.q-mt-md
18
- q-badge(:color="signature_verified ? 'teal' : 'red'").text-center.q-pa-xs
19
- q-icon(:name="signature_verified ? 'check_circle' : 'cancel'" ).q-mr-sm
20
- span цифровая подпись
21
- p.q-mr-lg.q-ml-lg.text-grey {{ actionDocumentData?.document?.signature }}
22
-
23
- div.q-mr-lg.q-mt-md
24
- q-badge(:color="signature_verified ? 'teal' : 'red'").text-center.q-pa-xs
25
- q-icon(:name="signature_verified ? 'check_circle' : 'cancel'" ).q-mr-sm
26
- span публичный ключ
27
- p.q-mr-lg.q-ml-lg.text-grey {{ actionDocumentData?.document?.public_key }}
28
-
29
- div.text-center.q-gutter-sm
19
+ // Показываем все подписи (если это агрегат документа)
20
+ template(v-if="documentAggregate && documentAggregate.signatures && documentAggregate.signatures.length > 0")
21
+ div.q-mr-lg.q-mt-md
22
+ q-badge(:color="hasInvalidSignature ? 'red' : 'teal'").text-center.q-pa-xs
23
+ q-icon(:name="hasInvalidSignature ? 'cancel' : 'verified'").q-mr-sm
24
+ span Подписи ({{ documentAggregate.signatures.length }})
25
+
26
+ // Список всех подписей
27
+ q-list(bordered separator dense)
28
+ q-expansion-item(
29
+ v-for="(signature, index) in documentAggregate.signatures"
30
+ :key="index"
31
+ :label="`Подпись ${index + 1}: ${getSignerName(signature.signer)}`"
32
+ header-class="signature-header"
33
+ dense
34
+ )
35
+ q-card(flat)
36
+ q-card-section
37
+ div.q-mb-sm
38
+ q-badge(:color="signatures_verified[index] ? 'teal' : 'red'").text-center.q-pa-xs
39
+ span Подписант
40
+ p.q-mt-sm.q-ml-lg {{ getSignerName(signature.signer) }}
41
+
42
+ div(v-if="signature.public_key").q-mb-sm
43
+ q-badge(:color="signatures_verified[index] ? 'teal' : 'red'").text-center.q-pa-xs
44
+ span Публичный ключ
45
+ p.q-mt-sm.q-ml-lg {{ signature.public_key }}
46
+
47
+ div(v-if="signature.signature").q-mb-sm
48
+ q-badge(:color="signatures_verified[index] ? 'teal' : 'red'").text-center.q-pa-xs
49
+ span Цифровая подпись
50
+ p.q-mt-sm.q-ml-lg {{ signature.signature }}
51
+
52
+ div.q-mt-md
53
+ q-badge(:color="signatures_verified[index] ? 'teal' : 'red'").text-center.q-pa-xs
54
+ q-icon(:name="signatures_verified[index] ? 'check_circle' : 'cancel'").q-mr-sm
55
+ span Статус подписи: {{ signatures_verified[index] ? 'Верифицирована' : 'Не верифицирована' }}
56
+
57
+ div.text-center.q-gutter-sm.q-mt-md
30
58
  q-btn(size="sm" color="primary" icon="download" @click="download") скачать
31
59
  //- q-btn(size="sm" color="primary" icon="download" @click="download2") скачать2
32
-
33
60
  q-btn(size="sm" color="primary" icon="fa-solid fa-check-double" @click="regenerate" :loading="onRegenerate") сверить
34
61
 
35
- </template>
36
62
 
63
+ </template>
37
64
  <script setup lang="ts">
38
- import { ref, computed } from 'vue'
39
- import { Cooperative, SovietContract } from 'cooptypes'
65
+ import { ref, computed, onMounted } from 'vue'
40
66
  import { Signature, PublicKey } from '@wharfkit/antelope';
41
67
  import { useGlobalStore } from 'src/shared/store';
42
68
  import DOMPurify from 'dompurify';
43
69
  import { DigitalDocument } from 'src/shared/lib/document';
44
70
  import { FailAlert, SuccessAlert } from 'src/shared/api';
71
+ import { getNameFromUserData } from 'src/shared/lib/utils/getNameFromUserData';
72
+ import { useWindowSize } from 'src/shared/hooks';
45
73
 
46
74
  const props = defineProps({
47
- action: {
48
- type: Object as () => Cooperative.Blockchain.IExtendedAction,
49
- required: true,
50
- },
51
- doc: {
52
- type: Object as () => Cooperative.Document.IGeneratedDocument,
75
+ documentAggregate: {
76
+ type: Object,
53
77
  required: true
54
78
  }
55
79
  })
56
80
 
57
- const actionDocumentData = ref(props.action.data as SovietContract.Actions.Registry.NewSubmitted.INewSubmitted)
58
- const doc = ref(props.doc)
81
+ const doc = computed(() => props.documentAggregate.rawDocument)
59
82
  const loading = ref(false)
60
- const signature_verified = ref(false)
61
-
83
+ const signatures_verified = ref<boolean[]>([])
84
+ const { isMobile } = useWindowSize()
62
85
  const regeneratedHash = ref()
63
86
  const onRegenerate = ref(false)
64
87
  const regenerated = ref()
@@ -89,79 +112,77 @@ const safeHtml = computed(() => sanitizeHtml(doc.value.html));
89
112
 
90
113
 
91
114
  const hashBuffer = async () => {
92
- // Декодирование из base64
93
- const binaryString = window.atob(doc.value.binary.toString());
94
-
95
- const len = binaryString.length;
96
-
97
- const data = new Uint8Array(len);
98
- for (let i = 0; i < len; i++) {
99
- data[i] = binaryString.charCodeAt(i);
115
+ try {
116
+ // Декодирование из base64
117
+ const binaryString = atob(doc.value.binary);
118
+ const len = binaryString.length;
119
+ const data = new Uint8Array(len);
120
+
121
+ for (let i = 0; i < len; i++) {
122
+ data[i] = binaryString.charCodeAt(i);
123
+ }
124
+
125
+ // Вычисление хэша из декодированных бинарных данных
126
+ regeneratedHash.value = (await useGlobalStore().hashMessage(data)).toUpperCase();
127
+ console.log('Хэш успешно вычислен:', regeneratedHash.value);
128
+ } catch (error) {
129
+ console.error('Ошибка при вычислении хэша:', error);
100
130
  }
101
-
102
- // Вычисление хэша из декодированных бинарных данных
103
- regeneratedHash.value = (await useGlobalStore().hashMessage(data)).toUpperCase();
104
131
  }
105
132
 
106
- hashBuffer()
107
-
108
-
109
- const verifySignature = () => {
110
- const public_key = PublicKey.from(actionDocumentData.value.document.public_key)
111
- const signature = Signature.from(actionDocumentData.value.document.signature)
112
- const hash = actionDocumentData.value.document.hash
113
- signature_verified.value = signature.verifyDigest(hash, public_key)
133
+ // Получение ФИО подписанта
134
+ const getSignerName = (signer: any) => {
135
+ if (!signer) return 'Неизвестный подписант';
136
+ return getNameFromUserData(signer) || signer;
114
137
  }
115
138
 
116
- verifySignature()
117
-
118
- // TODO удалить позже
119
- // использовали для отладки сверки. Позволяет скачать регенерированный документ после нажатия на кнопку сверки.
120
- // async function download2() {
121
- // // Преобразование base64 строки в Blob
122
- // console.log('regenerated: ', regenerated)
123
- // const binaryData = new Uint8Array(Object.values(regenerated.value.binary));
124
- // const blob = new Blob([binaryData], { type: 'application/pdf' });
125
-
126
- // // Создание временной ссылки для скачивания файла
127
- // const link = document.createElement('a');
128
- // link.href = URL.createObjectURL(blob);
129
- // link.download = regenerated.value.full_title ? regenerated.value.full_title : `${regenerated.value.meta.title} - ${regenerated.value.meta.username} - ${regenerated.value.meta.created_at}.pdf`;
130
-
131
- // // Имитация клика по ссылке для начала скачивания
132
- // document.body.appendChild(link);
133
- // link.click();
134
-
135
- // // Очистка после скачивания
136
- // document.body.removeChild(link);
137
- // URL.revokeObjectURL(link.href);
138
- // }
139
+ // Верификация всех подписей из агрегата
140
+ const verifySignatures = () => {
141
+ if (props.documentAggregate?.signatures?.length > 0) {
142
+ signatures_verified.value = props.documentAggregate.signatures.map(signatureData => {
143
+ try {
144
+ if (signatureData.public_key && signatureData.signature) {
145
+ const public_key = PublicKey.from(signatureData.public_key)
146
+ const signature = Signature.from(signatureData.signature)
147
+ const hash = doc.value.hash
148
+ const is_valid = signature.verifyDigest(hash, public_key)
149
+ return is_valid
150
+ } else {
151
+ return signatureData.is_valid
152
+ }
153
+ } catch (error) {
154
+ console.error('Ошибка при верификации подписи:', error)
155
+ return false
156
+ }
157
+ })
158
+ }
159
+ }
139
160
 
161
+ onMounted(() => {
162
+ hashBuffer()
163
+ verifySignatures()
164
+ })
140
165
 
141
166
  async function download() {
142
- // Преобразование base64 строки в Blob
143
- const response = await fetch(`data:application/pdf;base64,${doc.value.binary.toString()}`);
144
- const blob = await response.blob();
145
-
146
- // Создание временной ссылки для скачивания файла
147
- const link = document.createElement('a');
148
- link.href = URL.createObjectURL(blob);
149
- link.download = doc.value.full_title ? doc.value.full_title : `${doc.value.meta.title} - ${doc.value.meta.username} - ${doc.value.meta.created_at}.pdf`;
150
-
151
- // Имитация клика по ссылке для начала скачивания
152
- document.body.appendChild(link);
153
- link.click();
154
-
155
- // Очистка после скачивания
156
- document.body.removeChild(link);
157
- URL.revokeObjectURL(link.href);
167
+ try {
168
+ // PDF теперь в формате base64, можно использовать data URL
169
+ const link = document.createElement('a');
170
+ link.href = `data:application/pdf;base64,${doc.value.binary}`;
171
+ link.download = doc.value.full_title ? doc.value.full_title : `${doc.value.meta.title} - ${doc.value.meta.username} - ${doc.value.meta.created_at}.pdf`;
172
+
173
+ document.body.appendChild(link);
174
+ link.click();
175
+ document.body.removeChild(link);
176
+ } catch (error) {
177
+ console.error('Ошибка при скачивании файла:', error);
178
+ }
158
179
  }
159
180
 
181
+ // Вычисляем, есть ли хотя бы одна невалидная подпись
182
+ const hasInvalidSignature = computed(() => signatures_verified.value.some(v => v === false))
183
+
160
184
  </script>
161
185
  <style>
162
- .description table {
163
-
164
- }
165
186
 
166
187
  .description td {
167
188
  word-break: break-all !important;
@@ -187,6 +208,15 @@ async function download() {
187
208
  font-size: 10px !important;
188
209
  }
189
210
 
211
+ .signature-header {
212
+ font-size: 12px;
213
+ }
214
+
215
+ .signature-text {
216
+ font-size: 10px;
217
+ word-break: break-all;
218
+ }
219
+
190
220
  @media (min-width: 700px) {
191
221
  .dynamic-padding {
192
222
  padding: 50px !important;
@@ -194,7 +224,7 @@ async function download() {
194
224
  }
195
225
  @media (max-width: 700px) {
196
226
  .dynamic-padding {
197
- padding: 20px !important;
227
+ padding: 10px !important;
198
228
  }
199
229
  }
200
230
  </style>
@@ -20,6 +20,7 @@ import { computed, ref, onUnmounted } from 'vue'
20
20
  import config from 'src/app/config'
21
21
  import { useSessionStore } from 'src/entities/Session'
22
22
 
23
+ //TODO delete entity from here and make with props and subscription
23
24
  const session = useSessionStore()
24
25
 
25
26
  const intervalId = ref()
@@ -0,0 +1 @@
1
+ export { default as BlockchainStatusBar } from './BlockchainStatusBar.vue'
@@ -0,0 +1,61 @@
1
+ // Общие стили для карточек
2
+ .card-container {
3
+ border-radius: 16px;
4
+ width: 100%;
5
+ }
6
+
7
+ .info-card {
8
+ background-color: rgba(0, 0, 0, 0.03);
9
+ border-radius: 12px;
10
+ padding: 16px;
11
+ margin-bottom: 12px;
12
+ border: 1px solid rgba(0, 0, 0, 0.05);
13
+
14
+ .q-dark & {
15
+ background-color: rgba(255, 255, 255, 0.05);
16
+ border: 1px solid rgba(255, 255, 255, 0.08);
17
+ }
18
+
19
+ &.hover {
20
+ transition: all 0.2s ease;
21
+
22
+ &:hover {
23
+ background-color: rgba(0, 0, 0, 0.05);
24
+
25
+ .q-dark & {
26
+ background-color: rgba(255, 255, 255, 0.08);
27
+ }
28
+ }
29
+ }
30
+ }
31
+
32
+ .card-title {
33
+ font-size: 16px;
34
+ font-weight: 500;
35
+ color: rgba(0, 0, 0, 0.85);
36
+ margin-bottom: 12px;
37
+
38
+ .q-dark & {
39
+ color: rgba(255, 255, 255, 0.85);
40
+ }
41
+ }
42
+
43
+ .card-label {
44
+ font-size: 14px;
45
+ color: rgba(0, 0, 0, 0.6);
46
+ margin-bottom: 4px;
47
+
48
+ .q-dark & {
49
+ color: rgba(255, 255, 255, 0.6);
50
+ }
51
+ }
52
+
53
+ .card-value {
54
+ font-size: 16px;
55
+ font-weight: 500;
56
+ margin-bottom: 8px;
57
+ }
58
+
59
+ .card-action-btn {
60
+ border-radius: 8px;
61
+ }
@@ -1,25 +1,48 @@
1
1
  <template lang="pug">
2
2
  .row.justify-center
3
- div.documents-gap.col-md-8.col-xs-12
4
- BaseDocument(:doc="complexDocument.statement.document" :action="complexDocument.statement.action")
5
- BaseDocument(v-if="complexDocument.decision && complexDocument.decision.document" :doc="complexDocument.decision.document" :action="complexDocument.decision.action")
3
+ div.documents-gap.col-md-7.col-xs-12
4
+ // Отображение основного документа с агрегатом
5
+ BaseDocument(
6
+ v-if="documentData.statement && documentData.statement.documentAggregate"
7
+ :documentAggregate="documentData.statement.documentAggregate"
8
+ )
6
9
 
7
- BaseDocument(v-for="doc in complexDocument.links" v-bind:key="doc.hash" :doc="doc" :action="complexDocument.statement.action")
10
+ // Отображение связанных документов из агрегата
11
+ div(v-if="documentData.links.length > 0 && documentData.statement")
12
+ div(
13
+ v-for="linkedDoc, index in documentData.links"
14
+ v-bind:key="index"
15
+ ).documents-gap
16
+ BaseDocument(
17
+ :documentAggregate="linkedDoc"
18
+ )
8
19
 
20
+ // Отображение документа решения с агрегатом
21
+ BaseDocument(
22
+ v-if="documentData.decision && documentData.decision.documentAggregate"
23
+ :documentAggregate="documentData.decision.documentAggregate"
24
+ )
9
25
  </template>
10
26
 
11
27
  <script setup lang="ts">
12
28
  import { computed } from 'vue'
13
29
  import { BaseDocument } from '../BaseDocument';
14
- import { Cooperative } from 'cooptypes'
30
+ import type { IDocumentPackageAggregate } from 'src/entities/Document/model/types'
15
31
 
16
32
  const props = defineProps({
17
33
  documents: {
18
- type: Object as () => Cooperative.Document.IComplexDocument,
34
+ type: Object as () => IDocumentPackageAggregate,
19
35
  required: true
20
36
  },
21
37
  })
22
38
 
23
- const complexDocument = computed(() => props.documents)
24
-
39
+ // Просто используем документы как есть
40
+ const documentData = computed(() => props.documents)
25
41
  </script>
42
+
43
+ <style lang="scss" scoped>
44
+ .documents-gap {
45
+ padding-top: 1rem;
46
+ padding-bottom: 1rem;
47
+ }
48
+ </style>
@@ -0,0 +1 @@
1
+ export { default as CopyableInput } from './ui/CopyableInput.vue';
@@ -0,0 +1,62 @@
1
+ <template lang="pug">
2
+ q-input(
3
+ :label="label"
4
+ :model-value="modelValue"
5
+ :readonly="readonly"
6
+ :standout="standout"
7
+ :dense="dense"
8
+ :class="inputClass"
9
+ )
10
+ template(v-slot:append)
11
+ q-btn(
12
+ flat
13
+ round
14
+ dense
15
+ icon="fa fa-copy"
16
+ @click="copyToClipboard"
17
+ )
18
+ q-tooltip Копировать
19
+ </template>
20
+
21
+ <script lang="ts" setup>
22
+ import { copyToClipboard as copy } from 'quasar'
23
+ import { FailAlert, SuccessAlert } from 'src/shared/api'
24
+
25
+ const props = defineProps({
26
+ modelValue: {
27
+ type: [String, Number],
28
+ required: true
29
+ },
30
+ label: {
31
+ type: String,
32
+ default: ''
33
+ },
34
+ readonly: {
35
+ type: Boolean,
36
+ default: true
37
+ },
38
+ standout: {
39
+ type: [Boolean, String],
40
+ default: false
41
+ },
42
+ dense: {
43
+ type: Boolean,
44
+ default: false
45
+ },
46
+ inputClass: {
47
+ type: String,
48
+ default: ''
49
+ }
50
+ })
51
+
52
+ const copyToClipboard = () => {
53
+ copy(String(props.modelValue))
54
+ .then(() => {
55
+ SuccessAlert('Скопировано в буфер обмена')
56
+ })
57
+ .catch((e) => {
58
+ console.error(e)
59
+ FailAlert('Не удалось скопировать')
60
+ })
61
+ }
62
+ </script>
@@ -125,14 +125,15 @@ q-form(ref="form")
125
125
  import { ref } from 'vue';
126
126
  import { useEditableData } from 'src/shared/lib/composables/useEditableData';
127
127
  import { notEmpty, notEmptyPhone, validatePersonalName } from 'src/shared/lib/utils';
128
- import { failAlert, SuccessAlert } from 'src/shared/api';
128
+ import { FailAlert, SuccessAlert } from 'src/shared/api';
129
129
  import { EditableActions } from 'src/shared/ui/EditableActions';
130
130
  import { type IUpdateAccountInput, useUpdateAccount } from 'src/features/Account/UpdateAccount/model';
131
131
  import { type IEntrepreneurData } from 'src/entities/Account/types';
132
-
132
+ import 'src/shared/ui/InputStyles/index.scss';
133
+
133
134
  const emit = defineEmits(['update']);
134
135
  const { updateAccount } = useUpdateAccount();
135
-
136
+
136
137
  const props = defineProps({
137
138
  participantData: {
138
139
  type: Object as () => IEntrepreneurData,
@@ -143,10 +144,10 @@ q-form(ref="form")
143
144
  default: false
144
145
  }
145
146
  });
146
-
147
+
147
148
  const localEntrepreneurData = ref(props.participantData);
148
149
  const form = ref();
149
-
150
+
150
151
  const handleSave = async () => {
151
152
  try {
152
153
  const account_data: IUpdateAccountInput = {
@@ -158,13 +159,13 @@ q-form(ref="form")
158
159
  SuccessAlert('Данные аккаунта обновлены');
159
160
  } catch (e) {
160
161
  console.log(e);
161
- failAlert(e);
162
+ FailAlert(e);
162
163
  }
163
164
  };
164
-
165
+
165
166
  const { editableData: data, isEditing, isDisabled, saveChanges, cancelChanges } = useEditableData(
166
167
  localEntrepreneurData.value,
167
168
  handleSave,
168
169
  form
169
170
  );
170
- </script>
171
+ </script>
@@ -8,7 +8,7 @@ q-form(ref="form" v-if="data")
8
8
  :readonly="readonly"
9
9
  :rules="[val => validEmail(val)]"
10
10
  autocomplete="off"
11
- )
11
+ )
12
12
  q-input(
13
13
  dense
14
14
  v-model="data.first_name"
@@ -152,19 +152,20 @@ q-form(ref="form" v-if="data")
152
152
  @cancel="cancelChanges"
153
153
  )
154
154
  </template>
155
-
155
+
156
156
  <script lang="ts" setup>
157
157
  import { ref } from 'vue';
158
158
  import { useEditableData } from 'src/shared/lib/composables/useEditableData';
159
159
  import { validEmail } from 'src/shared/lib/utils/validEmailRule';
160
160
  import { validatePersonalName, notEmpty } from 'src/shared/lib/utils';
161
- import { failAlert, SuccessAlert } from 'src/shared/api';
161
+ import { FailAlert, SuccessAlert } from 'src/shared/api';
162
162
  import { type IUpdateAccountInput, useUpdateAccount } from 'src/features/Account/UpdateAccount/model';
163
163
  import { EditableActions } from 'src/shared/ui/EditableActions';
164
164
  import { type IIndividualData } from 'src/entities/Account/types';
165
-
165
+ import 'src/shared/ui/InputStyles/index.scss';
166
+
166
167
  const { updateAccount } = useUpdateAccount()
167
-
168
+
168
169
  const props = defineProps({
169
170
  participantData: {
170
171
  type: Object as () => IIndividualData,
@@ -175,11 +176,11 @@ q-form(ref="form" v-if="data")
175
176
  default: false
176
177
  }
177
178
  });
178
-
179
+
179
180
  const localParticipantData = ref(props.participantData);
180
181
  const form = ref();
181
182
  const emit = defineEmits(['update']);
182
-
183
+
183
184
  const handleSave = async () => {
184
185
  try {
185
186
  const account_data: IUpdateAccountInput = {
@@ -190,14 +191,13 @@ q-form(ref="form" v-if="data")
190
191
  emit('update', JSON.parse(JSON.stringify(data.value)))
191
192
  SuccessAlert('Данные аккаунта обновлены')
192
193
  } catch (e: any) {
193
- failAlert(e);
194
+ FailAlert(e);
194
195
  }
195
196
  };
196
-
197
+
197
198
  const { editableData: data, isEditing, isDisabled, saveChanges, cancelChanges } = useEditableData(
198
199
  localParticipantData.value,
199
200
  handleSave,
200
201
  form
201
202
  );
202
203
  </script>
203
-