@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.
- package/.env-example +6 -1
- package/.env-testnet +8 -0
- package/Dockerfile +12 -0
- package/extensions/market/install.ts +78 -0
- package/extensions/market-admin/install.ts +42 -0
- package/extensions/participant/install.ts +125 -0
- package/extensions/powerup/install.ts +20 -0
- package/extensions/soviet/install.ts +83 -0
- package/package.json +6 -5
- package/quasar.config.cjs +5 -12
- package/src/app/App.vue +44 -73
- package/src/app/layouts/default.vue +40 -0
- package/src/app/layouts/useDefaultLayoutLogic.ts +59 -0
- package/src/app/providers/routes/index.ts +19 -34
- package/src/app/styles/style.css +4 -0
- package/src/boot/init.ts +6 -0
- package/src/boot/sentry.ts +1 -2
- package/src/desktops/index.ts +0 -6
- package/src/entities/Account/model/index.ts +1 -1
- package/src/entities/Agenda/api/index.ts +20 -0
- package/src/entities/Agenda/index.ts +2 -0
- package/src/entities/Agenda/model/index.ts +2 -0
- package/src/entities/Agenda/model/store.ts +36 -0
- package/src/entities/Agenda/model/types.ts +4 -0
- package/src/entities/Branch/model/index.ts +1 -1
- package/src/entities/Desktop/api/index.ts +16 -1
- package/src/entities/Desktop/model/store.ts +112 -106
- package/src/entities/Desktop/model/types.ts +14 -1
- package/src/entities/Document/api/index.ts +24 -0
- package/src/entities/Document/index.ts +2 -0
- package/src/entities/Document/model/store.ts +117 -0
- package/src/entities/Document/model/types.ts +18 -0
- package/src/entities/Meet/api/index.ts +58 -0
- package/src/entities/Meet/index.ts +2 -0
- package/src/entities/Meet/model/store.ts +72 -0
- package/src/entities/Meet/types/index.ts +7 -0
- package/src/entities/Payment/api/index.ts +20 -0
- package/src/entities/Payment/model/index.ts +2 -0
- package/src/entities/Payment/model/store.ts +62 -0
- package/src/entities/Payment/model/types.ts +7 -0
- package/src/entities/Session/model/store.ts +3 -3
- package/src/entities/System/model/store.ts +1 -1
- package/src/entities/User/model/stores.ts +3 -1
- package/src/entities/Wallet/api/index.ts +15 -33
- package/src/entities/Wallet/model/stores.ts +3 -23
- package/src/entities/Wallet/model/types.ts +2 -3
- package/src/features/Agreementer/SignAgreementDialog/ui/SignAgreementDialog.vue +1 -1
- package/src/features/Branch/SelectBranch/index.ts +2 -0
- package/src/features/Branch/SelectBranch/ui/SelectBranchOverlay.vue +52 -105
- package/src/features/Decision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +1 -1
- package/src/features/Decision/ParticipantApplication/model/index.ts +38 -0
- package/src/features/FreeDecision/CreateProject/model/index.ts +92 -0
- package/src/features/FreeDecision/CreateProject/ui/CreateProjectFreeDecisionButton.vue +51 -0
- package/src/features/FreeDecision/CreateProject/ui/index.ts +1 -0
- package/src/features/FreeDecision/GenerateDecision/index.ts +1 -0
- package/src/features/FreeDecision/GenerateDecision/model/index.ts +36 -0
- package/src/features/FreeDecision/index.ts +2 -0
- package/src/features/Meet/CloseMeetWithDecision/index.ts +1 -0
- package/src/features/Meet/CloseMeetWithDecision/model/index.ts +92 -0
- package/src/features/Meet/CreateMeet/index.ts +2 -0
- package/src/features/Meet/CreateMeet/model/index.ts +65 -0
- package/src/features/Meet/CreateMeet/ui/CreateMeet.vue +34 -0
- package/src/features/Meet/CreateMeet/ui/CreateMeetForm.vue +136 -0
- package/src/features/Meet/CreateMeet/ui/index.ts +2 -0
- package/src/features/Meet/GenerateAgenda/index.ts +1 -0
- package/src/features/Meet/GenerateAgenda/model/index.ts +18 -0
- package/src/features/Meet/GenerateBallot/index.ts +1 -0
- package/src/features/Meet/GenerateBallot/model/index.ts +18 -0
- package/src/features/Meet/GenerateNotification/index.ts +1 -0
- package/src/features/Meet/GenerateNotification/model/index.ts +18 -0
- package/src/features/Meet/GenerateSovietDecision/index.ts +1 -0
- package/src/features/Meet/GenerateSovietDecision/model/index.ts +48 -0
- package/src/features/Meet/MeetDetailsManagement/index.ts +1 -0
- package/src/features/Meet/MeetDetailsManagement/model/index.ts +121 -0
- package/src/features/Meet/RestartMeet/index.ts +2 -0
- package/src/features/Meet/RestartMeet/model/index.ts +54 -0
- package/src/features/Meet/RestartMeet/ui/RestartMeet.vue +46 -0
- package/src/features/Meet/RestartMeet/ui/RestartMeetForm.vue +92 -0
- package/src/features/Meet/RestartMeet/ui/index.ts +2 -0
- package/src/features/Meet/VoteOnMeet/index.ts +1 -0
- package/src/features/Meet/VoteOnMeet/model/index.ts +18 -0
- package/src/features/Payment/SetStatus/api/index.ts +20 -0
- package/src/features/Payment/SetStatus/index.ts +1 -0
- package/src/features/Payment/SetStatus/model/index.ts +30 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/SetOrderPaidStatusButton.vue +7 -3
- package/src/features/PaymentMethod/AddPaymentMethod/model/index.ts +2 -2
- package/src/features/PaymentMethod/AddPaymentMethod/ui/AddPaymentButton.vue +1 -1
- package/src/features/PaymentMethod/DeletePaymentMethod/model/index.ts +1 -1
- package/src/features/PaymentMethod/DeletePaymentMethod/ui/DeletePaymentMethodButton.vue +3 -1
- package/src/features/Request/CancelRequest/ui/CancelButton.vue +1 -1
- package/src/features/Request/ConfirmRecieveOnRequest/ui/ConfirmRecieveOnRequest.vue +1 -1
- package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue +3 -5
- package/src/features/Request/CreateParentOffer/ui/ImageUploaderWithPreview/ImageUploaderWithPreview.vue +4 -3
- package/src/features/Request/DisputeOnRequest/ui/DisputeOnRequestButton.vue +1 -1
- package/src/features/Request/ModerateRequest/ui/ModerateRequestButton.vue +2 -2
- package/src/features/Request/PublishRequest/ui/PublishRequestButton.vue +1 -1
- package/src/features/Request/RecieveOnRequest/ui/RecieveOnRequestButton.vue +1 -1
- package/src/features/Request/UnpublishRequest/ui/UnpublishRequestButton.vue +1 -1
- package/src/features/Union/AddCooperative/model/index.ts +4 -5
- package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +5 -6
- package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +4 -4
- package/src/features/User/LoginUser/model/index.ts +3 -3
- package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +0 -6
- package/src/features/User/Logout/model/index.ts +2 -0
- package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +8 -7
- package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +6 -7
- package/src/pages/Blank/index.ts +1 -0
- package/src/pages/Contacts/ContactsPage.vue +64 -0
- package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/index.ts +0 -1
- package/src/{widgets/Cooperative/Contributions/ui/ChangeContributions.vue → pages/Cooperative/ChangeRegisterPayments/ui/ChangeRegisterPayments.vue} +10 -11
- package/src/pages/Cooperative/ChangeRegisterPayments/ui/index.ts +1 -0
- package/src/pages/Cooperative/ListOfAgenda/index.ts +1 -0
- package/src/pages/Cooperative/ListOfAgenda/ui/ListOfAgendaQuestions.vue +118 -0
- package/src/pages/Cooperative/ListOfAgenda/ui/index.ts +1 -0
- package/src/pages/Cooperative/ListOfDocuments/ListOfDocumentsPage.vue +24 -0
- package/src/pages/Cooperative/ListOfMeets/model/index.ts +1 -0
- package/src/pages/Cooperative/ListOfMeets/model/model.ts +117 -0
- package/src/pages/Cooperative/ListOfMeets/ui/ListOfMeetsPage.vue +90 -0
- package/src/pages/Cooperative/ListOfMeets/ui/index.ts +1 -0
- package/src/pages/Cooperative/ListOfOrders/index.ts +1 -1
- package/src/pages/Cooperative/ListOfOrders/ui/ListOfOrdersPage.vue +0 -4
- package/src/pages/Cooperative/ListOfParticipants/ui/ListOfParticipantsPage.vue +61 -10
- package/src/pages/Cooperative/ListOfParticipants/ui/index.ts +1 -1
- package/src/pages/Cooperative/MeetDetails/ui/MeetDetailsPage.vue +88 -0
- package/src/pages/Cooperative/MeetDetails/ui/index.ts +1 -0
- package/src/pages/Cooperative/MemberBranchList/ui/index.ts +1 -0
- package/src/pages/Cooperative/Payments/index.ts +1 -0
- package/src/pages/Cooperative/Payments/ui/PaymentsPage.vue +7 -0
- package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/ExtensionPage.vue +35 -20
- package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/ExtensionsShowcase.vue +2 -2
- package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/InstalledExtensions.vue +2 -2
- package/src/pages/Marketplace/OfferPage/ui/OfferPage.vue +1 -1
- package/src/pages/Marketplace/Showcase/ui/ShowcasePage.vue +1 -1
- package/src/pages/Marketplace/SuppliesList/ui/SuppliesListPage.vue +1 -1
- package/src/pages/Marketplace/UserParentOffers/ui/UserParentOffersPage.vue +1 -1
- package/src/pages/Marketplace/UserSuppliesList/ui/UserSuppliesListPage.vue +1 -1
- package/src/pages/PermissionDenied/index.ts +1 -0
- package/src/pages/Registrator/SignUp/EmailInput.vue +2 -3
- package/src/pages/Registrator/SignUp/GenerateAccount.vue +2 -3
- package/src/pages/Registrator/SignUp/PayInitial.vue +1 -1
- package/src/pages/Registrator/SignUp/ReadStatement.vue +2 -2
- package/src/pages/Registrator/SignUp/SelectBranch.vue +2 -2
- package/src/pages/Registrator/SignUp/SignStatement.vue +2 -2
- package/src/pages/Registrator/SignUp/SignUp.vue +5 -12
- package/src/pages/Registrator/SignUp/WaitingRegistration.vue +1 -5
- package/src/pages/Registrator/SignUp/Welcome.vue +4 -3
- package/src/pages/Union/ConnectionAgreement/index.ts +1 -0
- package/src/pages/Union/ListOfCooperatives/ui/UnionPageListOfCooperatives.vue +139 -6
- package/src/pages/User/DocumentsPage/UserDocumentsPage.vue +23 -0
- package/src/pages/User/DocumentsPage/index.ts +1 -0
- package/src/pages/User/PaymentsPage/ui/UserPayments.vue +11 -0
- package/src/pages/User/PaymentsPage/ui/index.ts +1 -0
- package/src/pages/User/ProfilePage/index.ts +1 -0
- package/src/pages/User/ProfilePage/ui/ProfilePage.vue +114 -0
- package/src/pages/User/ProfilePage/ui/index.ts +1 -0
- package/src/pages/User/SettingsPage/ui/index.ts +1 -1
- package/src/pages/User/WalletPage/index.ts +1 -0
- package/src/pages/User/WalletPage/ui/WalletPage.vue +72 -0
- package/src/pages/User/WalletPage/ui/index.ts +1 -0
- package/src/processes/init-app/index.ts +28 -0
- package/src/processes/init-installed-extensions/index.ts +25 -0
- package/src/processes/init-wallet/index.ts +40 -0
- package/src/processes/navigation-guard-setup/index.ts +45 -0
- package/src/processes/process-decisions/index.ts +275 -0
- package/src/processes/select-branch/index.ts +80 -0
- package/src/processes/watch-branch-overlay/index.ts +38 -0
- package/src/processes/watch-desktop-health/index.ts +33 -0
- package/src/shared/api/alerts.ts +2 -6
- package/src/shared/api/axios.ts +4 -5
- package/src/shared/api/client.ts +3 -4
- package/src/shared/api/eosio.ts +1 -2
- package/src/shared/api/utils.ts +1 -3
- package/src/shared/config/index.ts +0 -1
- package/src/shared/hooks/index.ts +2 -0
- package/src/shared/hooks/useAgendaPoints.ts +24 -0
- package/src/shared/hooks/useWindowSize.ts +13 -0
- package/src/shared/lib/composables/useDisplayName.ts +34 -0
- package/src/shared/lib/navigation/index.ts +2 -0
- package/src/shared/lib/navigation/routeUtils.ts +51 -0
- package/src/shared/lib/navigation/useBackButton.ts +63 -0
- package/src/shared/lib/utils/dates/validateDateWithinRange.ts +23 -0
- package/src/shared/ui/BaseDocument/BaseDocument.vue +120 -90
- package/src/{components/menu/blockchainStatus.vue → shared/ui/BlockchainStatusBar/BlockchainStatusBar.vue} +1 -0
- package/src/shared/ui/BlockchainStatusBar/index.ts +1 -0
- package/src/shared/ui/CardStyles/index.scss +61 -0
- package/src/shared/ui/ComplexDocument/ComplexDocument.vue +31 -8
- package/src/shared/ui/CopyableInput/index.ts +1 -0
- package/src/shared/ui/CopyableInput/ui/CopyableInput.vue +62 -0
- package/src/shared/ui/EditableEntrepreneurCard/EditableEntrepreneurCard.vue +9 -8
- package/src/shared/ui/EditableIndividualCard/EditableIndividualCard.vue +10 -10
- package/src/shared/ui/EditableOrganizationCard/EditableOrganizationCard.vue +57 -47
- package/src/shared/ui/Form/Form.vue +3 -1
- package/src/shared/ui/InputStyles/index.scss +29 -0
- package/src/shared/ui/TabStyles/index.scss +53 -0
- package/src/shared/ui/index.ts +1 -0
- package/src/{components/history/AccountEvents.vue → widgets/AccountActions/AccountActionsPage.vue} +2 -2
- package/src/widgets/AccountActions/index.ts +1 -0
- package/src/widgets/BankDetailsCard/ui/BankDetailsCard.vue +2 -2
- package/src/widgets/BranchCard/ui/BranchCard.vue +2 -2
- package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentCard.vue +48 -0
- package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/DocumentsTable.vue +162 -0
- package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/ListOfDocumentsWidget.vue +77 -120
- package/src/widgets/Cooperative/Documents/ListOfDocuments/ui/index.ts +3 -1
- package/src/widgets/Cooperative/Orders/ListOfOrders/ui/ListOfOrdersWidget.vue +135 -128
- package/src/widgets/Cooperative/Orders/ListOfOrders/ui/OrderCard.vue +74 -0
- package/src/widgets/Cooperative/Orders/ListOfOrders/ui/index.ts +2 -1
- package/src/widgets/Cooperative/Payments/ListOfPayments/ui/ListOfPaymentsWidget.vue +216 -0
- package/src/widgets/Cooperative/Payments/ListOfPayments/ui/PaymentCard.vue +73 -0
- package/src/widgets/Cooperative/Payments/ListOfPayments/ui/index.ts +2 -0
- package/src/widgets/Cooperative/Payments/index.ts +1 -0
- package/src/widgets/Desktop/LeftDrawerMenu/LeftDrawerMenu.vue +3 -2
- package/src/widgets/Desktop/SecondLevelMenuList/SecondLevelMenuList.vue +58 -91
- package/src/widgets/Desktop/WorkspaceMenu/WorkspaceMenu.vue +114 -59
- package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/ExtensionCard.vue +12 -7
- package/src/widgets/Header/BackButton/BackButton.vue +25 -0
- package/src/widgets/Header/BackButton/index.ts +1 -0
- package/src/widgets/Header/CommonHeader/CooperativeSettingsHeader.vue +34 -0
- package/src/widgets/Header/CommonHeader/ExtstoreHeader.vue +41 -0
- package/src/widgets/Header/CommonHeader/Header.vue +33 -198
- package/src/widgets/Header/CommonHeader/HeaderStyles.scss +22 -0
- package/src/widgets/Header/CommonHeader/MainHeader.vue +87 -0
- package/src/widgets/Header/CommonHeader/UserSettingsHeader.vue +29 -0
- package/src/widgets/Header/CommonHeader/index.ts +1 -1
- package/src/widgets/Header/SettingsDropdown/SettingsDropdown.vue +0 -6
- package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/Base.vue +1 -2
- package/src/widgets/Meets/MeetDetailsActions/MeetDetailsActions.vue +51 -0
- package/src/widgets/Meets/MeetDetailsActions/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsActions/model.ts +46 -0
- package/src/widgets/Meets/MeetDetailsAgenda/MeetDetailsAgenda.vue +29 -0
- package/src/widgets/Meets/MeetDetailsAgenda/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsHeader/MeetDetailsHeader.vue +40 -0
- package/src/widgets/Meets/MeetDetailsHeader/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsVoting/MeetDetailsVoting.vue +77 -0
- package/src/widgets/Meets/MeetDetailsVoting/index.ts +1 -0
- package/src/widgets/Meets/MeetDetailsVoting/model.ts +117 -0
- package/src/widgets/Meets/MeetInfoCard/ui/MeetInfoCard.vue +38 -0
- package/src/widgets/Meets/MeetInfoCard/ui/index.ts +1 -0
- package/src/widgets/Meets/MeetsTable/ui/MeetsTable.vue +118 -0
- package/src/widgets/Meets/MeetsTable/ui/index.ts +1 -0
- package/src/widgets/Participants/index.ts +1 -0
- package/src/widgets/Participants/ui/ParticipantCard.vue +89 -0
- package/src/widgets/Participants/ui/ParticipantDetails.vue +79 -0
- package/src/widgets/Participants/ui/ParticipantsTable.vue +129 -0
- package/src/widgets/Participants/ui/index.ts +4 -0
- package/src/widgets/Questions/index.ts +3 -0
- package/src/widgets/Questions/ui/QuestionCard/QuestionCard.vue +109 -0
- package/src/widgets/Questions/ui/QuestionCard/index.ts +1 -0
- package/src/widgets/Questions/ui/QuestionsTable/QuestionsTable.vue +177 -0
- package/src/widgets/Questions/ui/QuestionsTable/index.ts +1 -0
- package/src/widgets/Questions/ui/VotingButtons/VotingButtons.vue +75 -0
- package/src/widgets/Questions/ui/VotingButtons/index.ts +1 -0
- package/src/widgets/Questions/ui/index.ts +3 -0
- package/src/widgets/RequireAgreements/index.ts +1 -0
- package/src/widgets/User/PaymentMethods/ui/PaymentMethods.vue +81 -85
- package/tsconfig.json +1 -1
- package/extensions/powerup/boot.ts +0 -17
- package/src/app/providers/card/store.ts +0 -42
- package/src/boot/branch-selector.ts +0 -40
- package/src/boot/init-stores.ts +0 -51
- package/src/boot/navigation-guards.ts +0 -46
- package/src/components/menu/footerMobileMenu.vue +0 -79
- package/src/components/soviet/index.vue +0 -76
- package/src/components/soviet/staff.vue +0 -274
- package/src/desktops/User/index.ts +0 -1
- package/src/desktops/User/model/index.ts +0 -329
- package/src/entities/Menu/model/store.ts +0 -69
- package/src/entities/Menu/model/types.ts +0 -11
- package/src/entities/Menu/ui/index.ts +0 -1
- package/src/entities/Order/api/index.ts +0 -14
- package/src/entities/Order/model/store.ts +0 -87
- package/src/features/Order/SetStatus/api/index.ts +0 -7
- package/src/features/Order/SetStatus/model/index.ts +0 -23
- package/src/pages/Cooperative/Contacts/ui/ContactsPage.vue +0 -7
- package/src/pages/Cooperative/ListOfBranches/ui/index.ts +0 -1
- package/src/pages/Documentor/ListOfDocuments/ListOfDocumentsPage.vue +0 -12
- package/src/pages/Union/Connection/index.ts +0 -1
- package/src/pages/_layouts/blank.vue +0 -24
- package/src/pages/_layouts/default.vue +0 -79
- package/src/types/index.ts +0 -3
- package/src/widgets/Commutator/Commutator.vue +0 -7
- package/src/widgets/Commutator/index.ts +0 -1
- package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/ListOfQuestions.vue +0 -273
- package/src/widgets/Cooperative/Agenda/ListOfQuestions/ui/index.ts +0 -1
- package/src/widgets/Cooperative/Contacts/ui/Contacts.vue +0 -52
- package/src/widgets/Cooperative/Contributions/ui/index.ts +0 -1
- package/src/widgets/Cooperative/Description/ui/SetDescription.vue +0 -4
- package/src/widgets/Cooperative/Description/ui/index.ts +0 -1
- package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/ListOfParticipantsWidget.vue +0 -186
- package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/index.ts +0 -1
- package/src/widgets/Desktop/SecondLevelMenu/SecondLevelMenu.vue +0 -59
- package/src/widgets/Desktop/SecondLevelMenu/index.ts +0 -1
- package/src/widgets/IndividualCard/ui/IndividualCard.vue +0 -170
- package/src/widgets/IndividualCard/ui/index.ts +0 -1
- package/src/widgets/OrganizationCard/ui/OrganizationCard.vue +0 -44
- package/src/widgets/OrganizationCard/ui/index.ts +0 -1
- package/src/widgets/Union/ListOfCooperatives/ui/UnionListOfCooperatives.vue +0 -136
- package/src/widgets/Union/ListOfCooperatives/ui/index.ts +0 -1
- package/src/entities/{Menu → Document}/model/index.ts +0 -0
- package/src/entities/{Order → Meet}/model/index.ts +0 -0
- package/src/entities/{Order → Payment}/index.ts +0 -0
- package/src/features/{Order/SetStatus → Decision/ParticipantApplication}/index.ts +0 -0
- package/src/{widgets/Request/SupplyOrderRequestCard → features/FreeDecision/CreateProject}/index.ts +0 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/SetOrderCompletedStatusButton.vue +0 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderCompletedStatusButton/index.ts +0 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderPaidStatusButton/index.ts +0 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/SetOrderRefundedStatusButton.vue +0 -0
- package/src/features/{Order → Payment}/SetStatus/ui/SetOrderRefundedStatusButton/index.ts +0 -0
- package/src/pages/{blank/blank.vue → Blank/BlankPage.vue} +0 -0
- package/src/pages/{Cooperative/Contacts/ui → Contacts}/index.ts +0 -0
- package/src/pages/Cooperative/{Contacts → ChangeContacts}/index.ts +0 -0
- package/src/{widgets/Cooperative/Contacts → pages/Cooperative/ChangeContacts}/ui/ChangeContacts.vue +0 -0
- package/src/pages/Cooperative/{ListOfBranches → ChangeRegisterPayments}/index.ts +0 -0
- package/src/pages/{Documentor → Cooperative}/ListOfDocuments/index.ts +0 -0
- package/src/pages/{Installer → Cooperative/ListOfMeets}/index.ts +0 -0
- package/src/{widgets/Cooperative/Agenda/ListOfQuestions → pages/Cooperative/MeetDetails}/index.ts +0 -0
- package/src/{widgets/Cooperative/Contacts → pages/Cooperative/MemberBranchList}/index.ts +0 -0
- package/src/pages/Cooperative/{ListOfBranches/ui/ListOfBranchesPage.vue → MemberBranchList/ui/MemberBranchListPage.vue} +0 -0
- package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/ExtensionStoreBase.vue +0 -0
- package/src/pages/{ExtStore → ExtensionStore}/BaseRoute/index.ts +0 -0
- package/src/pages/{ExtStore → ExtensionStore}/ExtensionPage/index.ts +0 -0
- package/src/pages/{ExtStore → ExtensionStore}/ExtensionsShowcase/index.ts +0 -0
- package/src/pages/{ExtStore → ExtensionStore}/InstalledExtensions/index.ts +0 -0
- package/src/pages/{_layouts/permissionDenied.vue → PermissionDenied/PermissionDenied.vue} +0 -0
- package/src/pages/Union/{Connection/ConnectionPage.vue → ConnectionAgreement/ConnectionAgreementPage.vue} +0 -0
- package/src/{widgets/Cooperative/Contributions → pages/Union/InstallCooperative}/index.ts +0 -0
- package/src/pages/{Installer → Union/InstallCooperative}/ui/InstallCooperativePage.vue +0 -0
- package/src/pages/{Installer → Union/InstallCooperative}/ui/index.ts +0 -0
- package/src/{widgets/Cooperative/Participants/ListOfParticipants → pages/User/PaymentsPage}/index.ts +0 -0
- package/src/{components/history → widgets/AccountActions}/AccountLink.vue +0 -0
- package/src/{components/history → widgets/AccountActions}/ActionCell.vue +0 -0
- package/src/{components/history → widgets/AccountActions}/DataCell.vue +0 -0
- package/src/widgets/{IndividualCard → Cooperative/Payments/ListOfPayments}/index.ts +0 -0
- package/src/widgets/{ExtStore/ExtensionCard → ExtensionCard}/index.ts +0 -0
- package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/CreateChildOrderCard.vue +0 -0
- package/src/widgets/{Request → Marketplace}/CreateChildOrderCard/index.ts +0 -0
- package/src/widgets/{Request → Marketplace}/RequestCard/RequestCard.vue +0 -0
- package/src/widgets/{Request → Marketplace}/RequestCard/index.ts +0 -0
- package/src/{entities/Menu → widgets/Marketplace/SupplyOrderRequestCard}/index.ts +1 -1
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/index.ts +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/model/types.ts +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Base/index.ts +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/EightStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FifthStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FirstStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/FourthStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SecondStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SeventhStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/SixthStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/ThirdStep.vue +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/Steps/index.ts +0 -0
- /package/src/widgets/{Request → Marketplace}/SupplyOrderRequestCard/ui/index.ts +0 -0
- /package/src/widgets/{OrganizationCard → Meets/MeetInfoCard}/index.ts +0 -0
- /package/src/widgets/{Union/ListOfCooperatives → Meets/MeetsTable}/index.ts +0 -0
- /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/RequireAgreements.vue +0 -0
- /package/src/widgets/{Agreementer/RequireAgreements → RequireAgreements}/ui/index.ts +0 -0
@@ -1,108 +1,55 @@
|
|
1
1
|
<template lang="pug">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
div.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
2
|
+
q-dialog(v-model="isVisible" persistent :maximized="true")
|
3
|
+
ModalBase(:title="title" :show_close="false")
|
4
|
+
div.row.justify-center
|
5
|
+
div(style="padding-bottom: 100px;").col-md-8.col-col-xs-12
|
6
|
+
|
7
|
+
div(v-if="step === 1")
|
8
|
+
p.q-mt-lg
|
9
|
+
| Кооператив перешёл на двухэтапную систему управления на основании общего собрания уполномоченных председателей кооперативных участков...
|
10
|
+
Form(
|
11
|
+
:handler-submit="next"
|
12
|
+
:is-submitting="isSubmitting"
|
13
|
+
:showSubmit="!isLoading"
|
14
|
+
:showCancel="false"
|
15
|
+
:button-submit-txt="'Продолжить'"
|
16
|
+
).q-pa-md
|
17
|
+
BranchSelector(
|
18
|
+
v-model:selectedBranch="selectedBranch"
|
19
|
+
:branches="branches"
|
20
|
+
).q-mb-md
|
21
|
+
|
22
|
+
div(v-else-if="step === 2")
|
23
|
+
Loader(v-if="isLoading" :text="`Формируем документ...`")
|
24
|
+
|
25
|
+
div(v-else)
|
26
|
+
DocumentHtmlReader(:html="document.html")
|
27
|
+
q-btn(@click="back" flat size="sm") назад
|
28
|
+
q-btn(@click="sign" color="primary" size="sm") подписать
|
24
29
|
</template>
|
25
30
|
|
26
|
-
<script lang="ts"
|
27
|
-
import { ModalBase } from 'src/shared/ui/ModalBase'
|
28
|
-
import { Form } from 'src/shared/ui/Form'
|
29
|
-
import {
|
30
|
-
import {
|
31
|
-
import {
|
32
|
-
|
33
|
-
import {
|
34
|
-
import {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
const branchStore = useBranchStore()
|
52
|
-
const selectedBranch = ref('')
|
53
|
-
|
54
|
-
// Массив используется без изменений
|
55
|
-
const branches = computed(() => branchStore.publicBranches)
|
56
|
-
|
57
|
-
const next = async() => {
|
58
|
-
generate()
|
59
|
-
step.value++
|
60
|
-
}
|
61
|
-
|
62
|
-
const back = () => step.value--
|
63
|
-
|
64
|
-
if (session.isAuth)
|
65
|
-
branchStore.loadPublicBranches({ coopname: system.info.coopname })
|
66
|
-
|
67
|
-
const generate = async () => {
|
68
|
-
isLoading.value = true
|
69
|
-
document.value = await digitalDocument.generate<Cooperative.Registry.SelectBranchStatement.Action>({
|
70
|
-
registry_id: Cooperative.Registry.SelectBranchStatement.registry_id,
|
71
|
-
coopname: system.info.coopname,
|
72
|
-
username: session.username,
|
73
|
-
braname: selectedBranch.value
|
74
|
-
})
|
75
|
-
|
76
|
-
isLoading.value = false
|
77
|
-
}
|
78
|
-
|
79
|
-
const sign = async () => {
|
80
|
-
|
81
|
-
try {
|
82
|
-
isSubmitting.value = true
|
83
|
-
isSubmitting.value = false
|
84
|
-
|
85
|
-
const document = await digitalDocument.sign()
|
86
|
-
const {selectBranch} = useSelectBranch()
|
87
|
-
|
88
|
-
await selectBranch({
|
89
|
-
braname: selectedBranch.value,
|
90
|
-
coopname: system.info.coopname,
|
91
|
-
document,
|
92
|
-
username: session.username,
|
93
|
-
})
|
94
|
-
isVisible.value = false
|
95
|
-
SuccessAlert('Кооперативный участок выбран')
|
96
|
-
} catch(e: any){
|
97
|
-
isSubmitting.value = false
|
98
|
-
console.error(e)
|
99
|
-
failAlert(e)
|
100
|
-
}
|
101
|
-
|
102
|
-
}
|
103
|
-
|
104
|
-
const clear = () => {
|
105
|
-
console.log('clear')
|
106
|
-
}
|
107
|
-
|
108
|
-
</script>
|
31
|
+
<script setup lang="ts">
|
32
|
+
import { ModalBase } from 'src/shared/ui/ModalBase'
|
33
|
+
import { Form } from 'src/shared/ui/Form'
|
34
|
+
import { Loader } from 'src/shared/ui/Loader'
|
35
|
+
import { BranchSelector } from 'src/shared/ui/BranchSelector'
|
36
|
+
import { DocumentHtmlReader } from 'src/shared/ui/DocumentHtmlReader'
|
37
|
+
|
38
|
+
import { useSelectBranch } from '../model'
|
39
|
+
import { useSelectBranchProcess } from 'src/processes/select-branch'
|
40
|
+
|
41
|
+
const { isVisible } = useSelectBranch()
|
42
|
+
const {
|
43
|
+
title,
|
44
|
+
step,
|
45
|
+
selectedBranch,
|
46
|
+
branches,
|
47
|
+
document,
|
48
|
+
isSubmitting,
|
49
|
+
isLoading,
|
50
|
+
next,
|
51
|
+
back,
|
52
|
+
sign
|
53
|
+
} = useSelectBranchProcess()
|
54
|
+
|
55
|
+
</script>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template lang="pug">
|
2
2
|
div
|
3
|
-
q-btn(@click="show = true" color="primary"
|
3
|
+
q-btn(@click="show = true" color="primary" icon="add") предложить повестку
|
4
4
|
q-dialog(v-model="show" persistent :maximized="false" )
|
5
5
|
ModalBase(style="width: 500px; max-width: 100% !important;" :title="'Предложить повестку'" :show_close="true")
|
6
6
|
Form(:handler-submit="create" :is-submitting="isSubmitting" :showSubmit="!isLoading" :showCancel="true" :button-submit-txt="'Создать'" @cancel="clear" ).q-pa-md
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { client } from 'src/shared/api/client'
|
2
|
+
import { Mutations } from '@coopenomics/sdk'
|
3
|
+
import { useSystemStore } from 'src/entities/System/model'
|
4
|
+
|
5
|
+
export type IGenerateParticipantApplicationDecisionData = Mutations.Participants.GenerateParticipantApplicationDecision.IInput['data']
|
6
|
+
export type IGenerateParticipantApplicationDecisionResult = Mutations.Participants.GenerateParticipantApplicationDecision.IOutput[typeof Mutations.Participants.GenerateParticipantApplicationDecision.name]
|
7
|
+
|
8
|
+
export function useGenerateParticipantApplicationDecision() {
|
9
|
+
const { info } = useSystemStore()
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Генерирует документ для решения по заявлению о вступлении в кооператив
|
13
|
+
*/
|
14
|
+
async function generateParticipantApplicationDecision(
|
15
|
+
data: Omit<IGenerateParticipantApplicationDecisionData, 'coopname'>
|
16
|
+
): Promise<IGenerateParticipantApplicationDecisionResult> {
|
17
|
+
const { [Mutations.Participants.GenerateParticipantApplicationDecision.name]: result } = await client.Mutation(
|
18
|
+
Mutations.Participants.GenerateParticipantApplicationDecision.mutation,
|
19
|
+
{
|
20
|
+
variables: {
|
21
|
+
data: {
|
22
|
+
coopname: info.coopname,
|
23
|
+
...data
|
24
|
+
},
|
25
|
+
options: {
|
26
|
+
lang: 'ru'
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
)
|
31
|
+
|
32
|
+
return result
|
33
|
+
}
|
34
|
+
|
35
|
+
return {
|
36
|
+
generateParticipantApplicationDecision
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { client } from 'src/shared/api/client'
|
2
|
+
import { Mutations } from '@coopenomics/sdk'
|
3
|
+
import { ref } from 'vue'
|
4
|
+
import type { Ref } from 'vue'
|
5
|
+
import type { ICreatedProjectDecisionData, IGeneratedProjectDecisionDocument } from 'src/entities/Decision/model'
|
6
|
+
import { useSignDocument } from 'src/shared/lib/document'
|
7
|
+
|
8
|
+
export type ICreateProjectDecisionData = Mutations.FreeDecisions.CreateProjectOfFreeDecision.IInput['data']
|
9
|
+
|
10
|
+
export function useCreateProjectOfFreeDecision() {
|
11
|
+
const createProjectInput: Ref<ICreateProjectDecisionData> = ref({
|
12
|
+
decision: '',
|
13
|
+
question: ''
|
14
|
+
})
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Создает проект свободного решения
|
18
|
+
*/
|
19
|
+
async function createProject(coopname: string, username: string) {
|
20
|
+
const createdProject = await createProjectOfFreeDecision()
|
21
|
+
|
22
|
+
const generatedDocument = await generateProjectDocumentOfFreeDecision({
|
23
|
+
coopname: coopname,
|
24
|
+
project_id: createdProject.id,
|
25
|
+
username: username
|
26
|
+
})
|
27
|
+
|
28
|
+
const { signDocument } = useSignDocument()
|
29
|
+
|
30
|
+
const signedDocument = await signDocument(generatedDocument)
|
31
|
+
|
32
|
+
await publishProjectOfFreeDecision({
|
33
|
+
coopname: coopname,
|
34
|
+
document: signedDocument,
|
35
|
+
meta: '',
|
36
|
+
username: username
|
37
|
+
})
|
38
|
+
}
|
39
|
+
|
40
|
+
async function createProjectOfFreeDecision(): Promise<ICreatedProjectDecisionData> {
|
41
|
+
const { [Mutations.FreeDecisions.CreateProjectOfFreeDecision.name]: project } = await client.Mutation(
|
42
|
+
Mutations.FreeDecisions.CreateProjectOfFreeDecision.mutation,
|
43
|
+
{
|
44
|
+
variables: {
|
45
|
+
data: createProjectInput.value,
|
46
|
+
},
|
47
|
+
}
|
48
|
+
)
|
49
|
+
|
50
|
+
return project
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Генерирует документ проекта свободного решения
|
55
|
+
*/
|
56
|
+
async function generateProjectDocumentOfFreeDecision(data: Mutations.FreeDecisions.GenerateProjectOfFreeDecision.IInput['data']): Promise<IGeneratedProjectDecisionDocument> {
|
57
|
+
const { [Mutations.FreeDecisions.GenerateProjectOfFreeDecision.name]: document } = await client.Mutation(
|
58
|
+
Mutations.FreeDecisions.GenerateProjectOfFreeDecision.mutation,
|
59
|
+
{
|
60
|
+
variables: {
|
61
|
+
data,
|
62
|
+
},
|
63
|
+
}
|
64
|
+
)
|
65
|
+
|
66
|
+
return document
|
67
|
+
}
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Публикует проект свободного решения
|
71
|
+
*/
|
72
|
+
async function publishProjectOfFreeDecision(data: Mutations.FreeDecisions.PublishProjectOfFreeDecision.IInput['data']): Promise<Mutations.FreeDecisions.PublishProjectOfFreeDecision.IOutput[typeof Mutations.FreeDecisions.PublishProjectOfFreeDecision.name]> {
|
73
|
+
const { [Mutations.FreeDecisions.PublishProjectOfFreeDecision.name]: result } = await client.Mutation(
|
74
|
+
Mutations.FreeDecisions.PublishProjectOfFreeDecision.mutation,
|
75
|
+
{
|
76
|
+
variables: {
|
77
|
+
data,
|
78
|
+
},
|
79
|
+
}
|
80
|
+
)
|
81
|
+
|
82
|
+
return result
|
83
|
+
}
|
84
|
+
|
85
|
+
return {
|
86
|
+
createProjectInput,
|
87
|
+
createProject,
|
88
|
+
createProjectOfFreeDecision,
|
89
|
+
generateProjectDocumentOfFreeDecision,
|
90
|
+
publishProjectOfFreeDecision
|
91
|
+
}
|
92
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<template lang="pug">
|
2
|
+
div
|
3
|
+
q-btn(@click="show = true" color="primary" size="sm" icon="add") предложить повестку
|
4
|
+
q-dialog(v-model="show" persistent :maximized="false" )
|
5
|
+
ModalBase(style="width: 500px; max-width: 100% !important;" :title="'Предложить повестку'" :show_close="true")
|
6
|
+
Form(:handler-submit="create" :is-submitting="isSubmitting" :showSubmit="!isLoading" :showCancel="true" :button-submit-txt="'Создать'" @cancel="clear" ).q-pa-md
|
7
|
+
div().q-mb-lg
|
8
|
+
q-input(dense v-model="createProjectInput.question" standout="bg-teal text-white" placeholder="" label="Вопрос на повестку дня" :rules="[val => notEmpty(val)]" autocomplete="off" type="textarea")
|
9
|
+
q-input(dense v-model="createProjectInput.decision" standout="bg-teal text-white" placeholder="" label="Предлагаемое решение вопроса для голосования" :rules="[val => notEmpty(val)]" autocomplete="off" type="textarea")
|
10
|
+
|
11
|
+
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script lang="ts" setup>
|
15
|
+
import { ModalBase } from 'src/shared/ui/ModalBase';
|
16
|
+
import { Form } from 'src/shared/ui/Form';
|
17
|
+
import { ref } from 'vue';
|
18
|
+
import { useCreateProjectOfFreeDecision } from '../model';
|
19
|
+
import { FailAlert, SuccessAlert } from 'src/shared/api';
|
20
|
+
import { notEmpty } from 'src/shared/lib/utils';
|
21
|
+
import { useSessionStore } from 'src/entities/Session';
|
22
|
+
import { useSystemStore } from 'src/entities/System/model';
|
23
|
+
|
24
|
+
const show = ref(false)
|
25
|
+
const isSubmitting = ref(false)
|
26
|
+
const isLoading = ref(false)
|
27
|
+
const {createProjectInput, createProject} = useCreateProjectOfFreeDecision()
|
28
|
+
const session = useSessionStore()
|
29
|
+
const system = useSystemStore()
|
30
|
+
|
31
|
+
const create = async () => {
|
32
|
+
try {
|
33
|
+
isSubmitting.value = true
|
34
|
+
await createProject(system.info.coopname, session.username)
|
35
|
+
isSubmitting.value = false
|
36
|
+
show.value = false
|
37
|
+
SuccessAlert('Вопрос добавлен на повестку для голосования')
|
38
|
+
createProjectInput.value.question = ''
|
39
|
+
createProjectInput.value.decision = ''
|
40
|
+
} catch(e){
|
41
|
+
isSubmitting.value = false
|
42
|
+
FailAlert(e)
|
43
|
+
}
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
const clear = () => {
|
48
|
+
show.value = false
|
49
|
+
}
|
50
|
+
|
51
|
+
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
export {default as CreateProjectFreeDecisionButton} from './CreateProjectFreeDecisionButton.vue'
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './model'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { client } from 'src/shared/api/client'
|
2
|
+
import { Mutations } from '@coopenomics/sdk'
|
3
|
+
import { useSystemStore } from 'src/entities/System/model'
|
4
|
+
|
5
|
+
export type IGenerateFreeDecisionData = Mutations.FreeDecisions.GenerateFreeDecision.IInput['data']
|
6
|
+
export type IGenerateFreeDecisionResult = Mutations.FreeDecisions.GenerateFreeDecision.IOutput[typeof Mutations.FreeDecisions.GenerateFreeDecision.name]
|
7
|
+
|
8
|
+
export function useGenerateFreeDecision() {
|
9
|
+
const { info } = useSystemStore()
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Генерирует документ для свободного решения
|
13
|
+
*/
|
14
|
+
async function generateFreeDecision(data: Omit<IGenerateFreeDecisionData, 'coopname'>): Promise<IGenerateFreeDecisionResult> {
|
15
|
+
const { [Mutations.FreeDecisions.GenerateFreeDecision.name]: result } = await client.Mutation(
|
16
|
+
Mutations.FreeDecisions.GenerateFreeDecision.mutation,
|
17
|
+
{
|
18
|
+
variables: {
|
19
|
+
data: {
|
20
|
+
coopname: info.coopname,
|
21
|
+
...data
|
22
|
+
},
|
23
|
+
options: {
|
24
|
+
lang: 'ru'
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
)
|
29
|
+
|
30
|
+
return result
|
31
|
+
}
|
32
|
+
|
33
|
+
return {
|
34
|
+
generateFreeDecision
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './model'
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { client } from 'src/shared/api/client'
|
2
|
+
import { useSignDocument } from 'src/shared/lib/document/model/entity'
|
3
|
+
import { Mutations } from '@coopenomics/sdk'
|
4
|
+
|
5
|
+
export type ISignBySecretaryResult = Mutations.Meet.SignBySecretaryOnAnnualGeneralMeet.IOutput[typeof Mutations.Meet.SignBySecretaryOnAnnualGeneralMeet.name]
|
6
|
+
export type ISignByPresiderResult = Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.IOutput[typeof Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.name]
|
7
|
+
|
8
|
+
interface ICloseMeetWithDecisionInput {
|
9
|
+
coopname: string
|
10
|
+
hash: string
|
11
|
+
username: string
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
export async function signBySecretaryOnAnnualGeneralMeetWithDecision(data: ICloseMeetWithDecisionInput): Promise<ISignBySecretaryResult> {
|
16
|
+
const { signDocument } = useSignDocument()
|
17
|
+
|
18
|
+
const variables: Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.IInput = {
|
19
|
+
data: {
|
20
|
+
coopname: data.coopname,
|
21
|
+
username: data.username,
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
// Генерируем документ решения
|
26
|
+
const { [Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.name]: generatedDocument } = await client.Mutation(
|
27
|
+
Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.mutation,
|
28
|
+
{
|
29
|
+
variables
|
30
|
+
}
|
31
|
+
)
|
32
|
+
|
33
|
+
// Подписываем документ
|
34
|
+
const signedDocument = await signDocument(generatedDocument)
|
35
|
+
|
36
|
+
const variables2: Mutations.Meet.SignBySecretaryOnAnnualGeneralMeet.IInput = {
|
37
|
+
data: {
|
38
|
+
coopname: data.coopname,
|
39
|
+
hash: data.hash,
|
40
|
+
username: data.username,
|
41
|
+
secretary_decision: signedDocument
|
42
|
+
}
|
43
|
+
}
|
44
|
+
// Закрываем собрание с подписанным решением секретаря
|
45
|
+
const { [Mutations.Meet.SignBySecretaryOnAnnualGeneralMeet.name]: result } = await client.Mutation(
|
46
|
+
Mutations.Meet.SignBySecretaryOnAnnualGeneralMeet.mutation,
|
47
|
+
{
|
48
|
+
variables: variables2
|
49
|
+
}
|
50
|
+
)
|
51
|
+
|
52
|
+
return result
|
53
|
+
}
|
54
|
+
|
55
|
+
export async function signByPresiderOnAnnualGeneralMeetWithDecision(data: ICloseMeetWithDecisionInput): Promise<ISignByPresiderResult> {
|
56
|
+
const { signDocument } = useSignDocument()
|
57
|
+
|
58
|
+
const variables: Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.IInput = {
|
59
|
+
data: {
|
60
|
+
coopname: data.coopname,
|
61
|
+
username: data.username,
|
62
|
+
}
|
63
|
+
}
|
64
|
+
// Генерируем документ решения
|
65
|
+
const { [Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.name]: generatedDocument } = await client.Mutation(
|
66
|
+
Mutations.Meet.GenerateAnnualGeneralMeetDecisionDocument.mutation,
|
67
|
+
{
|
68
|
+
variables
|
69
|
+
}
|
70
|
+
)
|
71
|
+
|
72
|
+
// Подписываем документ
|
73
|
+
const signedDocument = await signDocument(generatedDocument)
|
74
|
+
|
75
|
+
const variables2: Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.IInput = {
|
76
|
+
data: {
|
77
|
+
coopname: data.coopname,
|
78
|
+
hash: data.hash,
|
79
|
+
username: data.username,
|
80
|
+
presider_decision: signedDocument
|
81
|
+
}
|
82
|
+
}
|
83
|
+
// Закрываем собрание с подписанным решением председателя
|
84
|
+
const { [Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.name]: result } = await client.Mutation(
|
85
|
+
Mutations.Meet.SignByPresiderOnAnnualGeneralMeet.mutation,
|
86
|
+
{
|
87
|
+
variables: variables2
|
88
|
+
}
|
89
|
+
)
|
90
|
+
|
91
|
+
return result
|
92
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { client } from 'src/shared/api/client'
|
2
|
+
import { Mutations } from '@coopenomics/sdk'
|
3
|
+
import { generateAgenda } from 'src/features/Meet/GenerateAgenda/model'
|
4
|
+
import { useSignDocument } from 'src/shared/lib/document/model/entity'
|
5
|
+
import { hashSHA256 } from 'src/shared/api/crypto'
|
6
|
+
|
7
|
+
export type ICreateMeetInput = Mutations.Meet.CreateAnnualGeneralMeet.IInput['data']
|
8
|
+
export type ICreateMeetResult = Mutations.Meet.CreateAnnualGeneralMeet.IOutput[typeof Mutations.Meet.CreateAnnualGeneralMeet.name]
|
9
|
+
|
10
|
+
export interface ICreateMeetWithAgendaInput {
|
11
|
+
coopname: string
|
12
|
+
initiator: string
|
13
|
+
presider: string
|
14
|
+
secretary: string
|
15
|
+
open_at: string
|
16
|
+
close_at: string
|
17
|
+
username: string
|
18
|
+
agenda_points: {
|
19
|
+
title: string
|
20
|
+
context: string
|
21
|
+
decision: string
|
22
|
+
}[]
|
23
|
+
}
|
24
|
+
|
25
|
+
export async function createMeet(data: ICreateMeetInput): Promise<ICreateMeetResult> {
|
26
|
+
const { [Mutations.Meet.CreateAnnualGeneralMeet.name]: result } = await client.Mutation(
|
27
|
+
Mutations.Meet.CreateAnnualGeneralMeet.mutation,
|
28
|
+
{
|
29
|
+
variables: {
|
30
|
+
data
|
31
|
+
}
|
32
|
+
}
|
33
|
+
);
|
34
|
+
|
35
|
+
return result;
|
36
|
+
}
|
37
|
+
|
38
|
+
export async function createMeetWithAgenda(data: ICreateMeetWithAgendaInput): Promise<ICreateMeetResult> {
|
39
|
+
const { signDocument } = useSignDocument()
|
40
|
+
// Генерируем документ повестки
|
41
|
+
const generatedDocument = await generateAgenda({
|
42
|
+
coopname: data.coopname,
|
43
|
+
username: data.username
|
44
|
+
})
|
45
|
+
// Подписываем документ
|
46
|
+
const signedDocument = await signDocument(generatedDocument)
|
47
|
+
|
48
|
+
// Создаем собрание
|
49
|
+
const result = await createMeet({
|
50
|
+
coopname: data.coopname,
|
51
|
+
agenda: data.agenda_points,
|
52
|
+
initiator: data.initiator,
|
53
|
+
presider: data.presider,
|
54
|
+
secretary: data.secretary,
|
55
|
+
open_at: data.open_at,
|
56
|
+
close_at: data.close_at,
|
57
|
+
hash: await hashSHA256(JSON.stringify({
|
58
|
+
coopname: data.coopname,
|
59
|
+
initiator: data.initiator,
|
60
|
+
timestamp: Date.now()
|
61
|
+
})),
|
62
|
+
proposal: signedDocument
|
63
|
+
})
|
64
|
+
return result
|
65
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<template lang="pug">
|
2
|
+
div
|
3
|
+
q-btn(
|
4
|
+
color="primary"
|
5
|
+
label="Создать общее собрание"
|
6
|
+
@click="showCreateMeetDialog = true"
|
7
|
+
)
|
8
|
+
CreateMeetForm(
|
9
|
+
v-model="showCreateMeetDialog"
|
10
|
+
:loading="isCreating"
|
11
|
+
@create="handleCreate"
|
12
|
+
)
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script setup lang="ts">
|
16
|
+
import { ref } from 'vue'
|
17
|
+
import { CreateMeetForm } from './index'
|
18
|
+
|
19
|
+
const showCreateMeetDialog = ref(false)
|
20
|
+
const isCreating = ref(false)
|
21
|
+
|
22
|
+
const emit = defineEmits<{
|
23
|
+
(e: 'create', formData: any): void
|
24
|
+
}>()
|
25
|
+
|
26
|
+
const handleCreate = async (formData: any) => {
|
27
|
+
isCreating.value = true
|
28
|
+
try {
|
29
|
+
emit('create', formData)
|
30
|
+
} finally {
|
31
|
+
isCreating.value = false
|
32
|
+
}
|
33
|
+
}
|
34
|
+
</script>
|