@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.
- package/.env-example +6 -1
- package/.env-testnet +8 -0
- package/CHANGELOG.md +11 -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/api/index.ts +11 -2
- package/src/entities/Account/model/index.ts +1 -1
- package/src/entities/Account/model/store.ts +15 -5
- package/src/entities/Account/types/index.ts +9 -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 +5 -6
- 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/Account/UpdateAccount/api/index.ts +14 -0
- package/src/features/Account/UpdateAccount/index.ts +1 -0
- package/src/features/Account/UpdateAccount/model/index.ts +16 -0
- 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 -104
- 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 +7 -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 +5 -3
- 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/{ListOfBranches/ui/ListOfBranchesPage.vue → MemberBranchList/ui/MemberBranchListPage.vue} +2 -4
- 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/composables/useEditableData.ts +1 -1
- 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 +171 -0
- package/src/shared/ui/EditableEntrepreneurCard/index.ts +1 -0
- package/src/{widgets/IndividualCard/ui/IndividualCard.vue → shared/ui/EditableIndividualCard/EditableIndividualCard.vue} +101 -68
- package/src/shared/ui/EditableIndividualCard/index.ts +1 -0
- package/src/shared/ui/EditableOrganizationCard/EditableOrganizationCard.vue +225 -0
- package/src/shared/ui/EditableOrganizationCard/index.ts +1 -0
- 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/UserDataForm/OrganizationDataForm/OrganizationDataForm.vue +1 -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 -45
- 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 -328
- 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 -103
- 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/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/{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
@@ -0,0 +1,121 @@
|
|
1
|
+
import { computed, type Ref } from 'vue'
|
2
|
+
import type { IMeet } from 'src/entities/Meet'
|
3
|
+
import { useMeetStore } from 'src/entities/Meet'
|
4
|
+
import { useSessionStore } from 'src/entities/Session'
|
5
|
+
import { FailAlert, SuccessAlert } from 'src/shared/api'
|
6
|
+
import { signByPresiderOnAnnualGeneralMeetWithDecision } from 'src/features/Meet/CloseMeetWithDecision/model'
|
7
|
+
import { restartMeetWithProposal } from 'src/features/Meet/RestartMeet/model'
|
8
|
+
import moment from 'moment-with-locales-es6'
|
9
|
+
|
10
|
+
moment.locale('ru')
|
11
|
+
|
12
|
+
export const useMeetDetailsManagement = (
|
13
|
+
meet: IMeet,
|
14
|
+
coopname: string,
|
15
|
+
meetHash: string,
|
16
|
+
isProcessing: Ref<boolean>
|
17
|
+
) => {
|
18
|
+
const meetStore = useMeetStore()
|
19
|
+
const sessionStore = useSessionStore()
|
20
|
+
|
21
|
+
const canManageMeet = computed(() => true) // Здесь можно добавить проверку ролей
|
22
|
+
|
23
|
+
const canCloseBySecretary = computed(() => {
|
24
|
+
if (!meet?.processing?.meet) return false
|
25
|
+
|
26
|
+
const now = moment()
|
27
|
+
const closeAt = moment(meet.processing.meet.close_at)
|
28
|
+
|
29
|
+
const isAfterCloseDate = now.isAfter(closeAt)
|
30
|
+
const isQuorumPassed = meet.processing.meet.quorum_passed === true
|
31
|
+
const isAuthorized = meet.processing.meet.status === 'authorized'
|
32
|
+
|
33
|
+
return isAfterCloseDate && isQuorumPassed && isAuthorized
|
34
|
+
})
|
35
|
+
|
36
|
+
const canCloseByPresider = computed(() => {
|
37
|
+
if (!meet?.processing?.meet) return false
|
38
|
+
return meet.processing.meet.status === 'preclose'
|
39
|
+
})
|
40
|
+
|
41
|
+
const canRestartMeet = computed(() => {
|
42
|
+
if (!meet?.processing?.meet) return false
|
43
|
+
|
44
|
+
const now = moment()
|
45
|
+
const closeAt = moment(meet.processing.meet.close_at)
|
46
|
+
|
47
|
+
const isAfterCloseDate = now.isAfter(closeAt)
|
48
|
+
const isQuorumNotPassed = meet.processing.meet.quorum_passed !== true
|
49
|
+
|
50
|
+
return isAfterCloseDate && isQuorumNotPassed && meet.processing.meet.status === 'authorized'
|
51
|
+
})
|
52
|
+
|
53
|
+
const closeMeetBySecretary = async () => {
|
54
|
+
isProcessing.value = true
|
55
|
+
try {
|
56
|
+
await signByPresiderOnAnnualGeneralMeetWithDecision({
|
57
|
+
coopname,
|
58
|
+
hash: meetHash,
|
59
|
+
username: sessionStore.username,
|
60
|
+
})
|
61
|
+
|
62
|
+
await meetStore.loadMeet({ coopname, hash: meetHash })
|
63
|
+
SuccessAlert('Собрание успешно закрыто')
|
64
|
+
} catch (error: any) {
|
65
|
+
FailAlert(error)
|
66
|
+
} finally {
|
67
|
+
isProcessing.value = false
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
const closeMeetByPresider = async () => {
|
72
|
+
isProcessing.value = true
|
73
|
+
try {
|
74
|
+
await signByPresiderOnAnnualGeneralMeetWithDecision({
|
75
|
+
coopname,
|
76
|
+
hash: meetHash,
|
77
|
+
username: sessionStore.username,
|
78
|
+
})
|
79
|
+
|
80
|
+
await meetStore.loadMeet({ coopname, hash: meetHash })
|
81
|
+
SuccessAlert('Собрание успешно закрыто')
|
82
|
+
} catch (error: any) {
|
83
|
+
FailAlert(error)
|
84
|
+
} finally {
|
85
|
+
isProcessing.value = false
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
const handleRestartMeet = async (data: any) => {
|
90
|
+
isProcessing.value = true
|
91
|
+
try {
|
92
|
+
await restartMeetWithProposal({
|
93
|
+
coopname,
|
94
|
+
hash: meetHash,
|
95
|
+
username: sessionStore.username,
|
96
|
+
new_open_at: data.new_open_at,
|
97
|
+
new_close_at: data.new_close_at,
|
98
|
+
agenda_points: data.agenda_points
|
99
|
+
})
|
100
|
+
|
101
|
+
await meetStore.loadMeet({ coopname, hash: meetHash })
|
102
|
+
SuccessAlert('Собрание успешно перезапущено')
|
103
|
+
return true
|
104
|
+
} catch (error: any) {
|
105
|
+
FailAlert(error)
|
106
|
+
return false
|
107
|
+
} finally {
|
108
|
+
isProcessing.value = false
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
return {
|
113
|
+
canManageMeet,
|
114
|
+
canCloseBySecretary,
|
115
|
+
canCloseByPresider,
|
116
|
+
canRestartMeet,
|
117
|
+
closeMeetBySecretary,
|
118
|
+
closeMeetByPresider,
|
119
|
+
handleRestartMeet
|
120
|
+
}
|
121
|
+
}
|
@@ -0,0 +1,54 @@
|
|
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'
|
5
|
+
|
6
|
+
export type IRestartMeetInput = Mutations.Meet.RestartAnnualGeneralMeet.IInput['data'];
|
7
|
+
export type IRestartMeetResult = Mutations.Meet.RestartAnnualGeneralMeet.IOutput[typeof Mutations.Meet.RestartAnnualGeneralMeet.name];
|
8
|
+
|
9
|
+
export interface IRestartMeetWithProposalInput {
|
10
|
+
coopname: string
|
11
|
+
hash: string
|
12
|
+
username: string
|
13
|
+
new_open_at: string
|
14
|
+
new_close_at: string
|
15
|
+
agenda_points: {
|
16
|
+
title: string
|
17
|
+
context: string
|
18
|
+
decision: string
|
19
|
+
}[]
|
20
|
+
}
|
21
|
+
|
22
|
+
export async function restartMeet(data: IRestartMeetInput): Promise<IRestartMeetResult> {
|
23
|
+
const { [Mutations.Meet.RestartAnnualGeneralMeet.name]: result } = await client.Mutation(
|
24
|
+
Mutations.Meet.RestartAnnualGeneralMeet.mutation,
|
25
|
+
{
|
26
|
+
variables: {
|
27
|
+
data
|
28
|
+
}
|
29
|
+
}
|
30
|
+
);
|
31
|
+
|
32
|
+
return result;
|
33
|
+
}
|
34
|
+
|
35
|
+
export async function restartMeetWithProposal(data: IRestartMeetWithProposalInput): Promise<IRestartMeetResult> {
|
36
|
+
const { signDocument } = useSignDocument()
|
37
|
+
// Генерируем документ повестки
|
38
|
+
const generatedDocument = await generateAgenda({
|
39
|
+
coopname: data.coopname,
|
40
|
+
username: data.username
|
41
|
+
})
|
42
|
+
// Подписываем документ
|
43
|
+
const signedDocument = await signDocument(generatedDocument)
|
44
|
+
|
45
|
+
// Перезапускаем собрание
|
46
|
+
const result = await restartMeet({
|
47
|
+
coopname: data.coopname,
|
48
|
+
hash: data.hash,
|
49
|
+
new_open_at: data.new_open_at,
|
50
|
+
new_close_at: data.new_close_at,
|
51
|
+
newproposal: signedDocument
|
52
|
+
})
|
53
|
+
return result
|
54
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<template lang="pug">
|
2
|
+
div
|
3
|
+
q-btn(
|
4
|
+
v-if="showButton"
|
5
|
+
color="primary"
|
6
|
+
icon="fa-solid fa-rotate"
|
7
|
+
label="Перезапустить собрание"
|
8
|
+
@click="showRestartDialog = true"
|
9
|
+
:loading="isProcessing"
|
10
|
+
)
|
11
|
+
|
12
|
+
RestartMeetForm(
|
13
|
+
v-model="showRestartDialog"
|
14
|
+
:meet="meet"
|
15
|
+
:loading="isProcessing"
|
16
|
+
@restart="handleRestart"
|
17
|
+
)
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script setup lang="ts">
|
21
|
+
import { ref } from 'vue'
|
22
|
+
import { RestartMeetForm } from '.';
|
23
|
+
import type { IMeet } from 'src/entities/Meet'
|
24
|
+
|
25
|
+
defineProps<{
|
26
|
+
meet: IMeet
|
27
|
+
showButton?: boolean
|
28
|
+
}>()
|
29
|
+
|
30
|
+
const emit = defineEmits<{
|
31
|
+
(e: 'restart', data: any): void
|
32
|
+
}>()
|
33
|
+
|
34
|
+
const showRestartDialog = ref(false)
|
35
|
+
const isProcessing = ref(false)
|
36
|
+
|
37
|
+
const handleRestart = async (data: any) => {
|
38
|
+
isProcessing.value = true
|
39
|
+
try {
|
40
|
+
await emit('restart', data)
|
41
|
+
showRestartDialog.value = false
|
42
|
+
} finally {
|
43
|
+
isProcessing.value = false
|
44
|
+
}
|
45
|
+
}
|
46
|
+
</script>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<template lang="pug">
|
2
|
+
q-dialog(:model-value="modelValue" @update:model-value="$emit('update:modelValue', $event)" persistent)
|
3
|
+
q-card(style="min-width: 500px")
|
4
|
+
q-card-section.row.items-center
|
5
|
+
div.text-h6 Перезапустить собрание
|
6
|
+
q-space
|
7
|
+
q-btn(icon="close" flat round dense v-close-popup @click="$emit('update:modelValue', false)")
|
8
|
+
q-card-section
|
9
|
+
q-form(@submit="handleSubmit")
|
10
|
+
div.text-subtitle1.q-mb-sm Выберите новые даты для собрания
|
11
|
+
q-input(
|
12
|
+
v-model="formData.new_open_at"
|
13
|
+
label="Новая дата и время открытия, UTC"
|
14
|
+
type="datetime-local"
|
15
|
+
:rules="[val => !!val || 'Обязательное поле']"
|
16
|
+
dense
|
17
|
+
class="q-mb-md"
|
18
|
+
)
|
19
|
+
q-input(
|
20
|
+
v-model="formData.new_close_at"
|
21
|
+
label="Новая дата и время закрытия, UTC"
|
22
|
+
type="datetime-local"
|
23
|
+
:rules="[val => !!val || 'Обязательное поле']"
|
24
|
+
dense
|
25
|
+
class="q-mb-md"
|
26
|
+
)
|
27
|
+
|
28
|
+
div.text-subtitle1.q-mb-sm При перезапуске собрания будут использованы существующие пункты повестки:
|
29
|
+
|
30
|
+
div.q-pa-sm.q-my-sm.bg-grey-2.rounded-borders(v-if="meet?.processing?.questions?.length")
|
31
|
+
div.q-mb-md(v-for="(question, index) in meet.processing.questions" :key="index")
|
32
|
+
div.text-weight-bold {{ question.title }}
|
33
|
+
div.text-caption {{ question.context }}
|
34
|
+
|
35
|
+
div.q-pa-sm.q-my-sm.bg-red-1.text-red-8.rounded-borders(v-else)
|
36
|
+
div.text-center Вопросы повестки не найдены
|
37
|
+
|
38
|
+
q-card-actions(align="right")
|
39
|
+
q-btn(flat label="Отмена" v-close-popup @click="$emit('update:modelValue', false)" :disable="loading")
|
40
|
+
q-btn(
|
41
|
+
color="primary"
|
42
|
+
label="Перезапустить"
|
43
|
+
type="submit"
|
44
|
+
@click="handleSubmit"
|
45
|
+
:loading="loading"
|
46
|
+
:disable="!meet?.processing?.questions?.length"
|
47
|
+
)
|
48
|
+
</template>
|
49
|
+
|
50
|
+
<script setup lang="ts">
|
51
|
+
import { reactive, watch } from 'vue'
|
52
|
+
import type { IMeet } from 'src/entities/Meet'
|
53
|
+
|
54
|
+
const props = defineProps<{
|
55
|
+
modelValue: boolean,
|
56
|
+
meet: IMeet | null,
|
57
|
+
loading?: boolean
|
58
|
+
}>()
|
59
|
+
|
60
|
+
const emit = defineEmits<{
|
61
|
+
(e: 'update:modelValue', value: boolean): void
|
62
|
+
(e: 'restart', data: any): void
|
63
|
+
}>()
|
64
|
+
|
65
|
+
// Форма для перезапуска собрания
|
66
|
+
const formData = reactive({
|
67
|
+
new_open_at: '',
|
68
|
+
new_close_at: ''
|
69
|
+
})
|
70
|
+
|
71
|
+
// Сброс формы при открытии диалога
|
72
|
+
watch(() => props.modelValue, (newVal) => {
|
73
|
+
if (newVal) {
|
74
|
+
formData.new_open_at = ''
|
75
|
+
formData.new_close_at = ''
|
76
|
+
}
|
77
|
+
})
|
78
|
+
|
79
|
+
const handleSubmit = () => {
|
80
|
+
if (!props.meet) return
|
81
|
+
|
82
|
+
// Проверяем наличие вопросов повестки
|
83
|
+
if (!props.meet.processing?.questions || props.meet.processing.questions.length === 0) {
|
84
|
+
return
|
85
|
+
}
|
86
|
+
|
87
|
+
emit('restart', {
|
88
|
+
...formData,
|
89
|
+
hash: props.meet.hash
|
90
|
+
})
|
91
|
+
}
|
92
|
+
</script>
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './model'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { client } from 'src/shared/api/client';
|
2
|
+
import { Mutations } from '@coopenomics/sdk';
|
3
|
+
|
4
|
+
export type IVoteOnMeetInput = Mutations.Meet.VoteOnAnnualGeneralMeet.IInput['data'];
|
5
|
+
export type IVoteOnMeetResult = Mutations.Meet.VoteOnAnnualGeneralMeet.IOutput[typeof Mutations.Meet.VoteOnAnnualGeneralMeet.name];
|
6
|
+
|
7
|
+
export async function voteOnMeet(data: IVoteOnMeetInput): Promise<IVoteOnMeetResult> {
|
8
|
+
const { [Mutations.Meet.VoteOnAnnualGeneralMeet.name]: result } = await client.Mutation(
|
9
|
+
Mutations.Meet.VoteOnAnnualGeneralMeet.mutation,
|
10
|
+
{
|
11
|
+
variables: {
|
12
|
+
data
|
13
|
+
}
|
14
|
+
}
|
15
|
+
);
|
16
|
+
|
17
|
+
return result;
|
18
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { client } from 'src/shared/api/client';
|
2
|
+
import { Mutations } from '@coopenomics/sdk';
|
3
|
+
import type { IPayment } from 'src/entities/Payment/model';
|
4
|
+
|
5
|
+
type ISetPaymentStatusInput = Mutations.Payments.SetPaymentStatus.IInput['data']
|
6
|
+
|
7
|
+
async function setPaymentStatus(data: ISetPaymentStatusInput): Promise<IPayment> {
|
8
|
+
const { [Mutations.Payments.SetPaymentStatus.name]: result } = await client.Mutation(
|
9
|
+
Mutations.Payments.SetPaymentStatus.mutation,
|
10
|
+
{
|
11
|
+
variables: {
|
12
|
+
data
|
13
|
+
}
|
14
|
+
}
|
15
|
+
);
|
16
|
+
|
17
|
+
return result;
|
18
|
+
}
|
19
|
+
|
20
|
+
export const api = { setPaymentStatus };
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './model'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { usePaymentStore } from 'src/entities/Payment/model'
|
2
|
+
import { api } from '../api'
|
3
|
+
import { Zeus } from '@coopenomics/sdk'
|
4
|
+
|
5
|
+
export const useSetStatus = () => {
|
6
|
+
const paymentStore = usePaymentStore()
|
7
|
+
|
8
|
+
const setPaidStatus = async (id: string) => {
|
9
|
+
await api.setPaymentStatus({ id, status: Zeus.PaymentStatus.PAID })
|
10
|
+
setTimeout(async () => {
|
11
|
+
await paymentStore.updatePayments({ id })
|
12
|
+
}, 1000)
|
13
|
+
}
|
14
|
+
|
15
|
+
const setRefundedStatus = async (id: string) => {
|
16
|
+
await api.setPaymentStatus({ id, status: Zeus.PaymentStatus.REFUNDED })
|
17
|
+
setTimeout(async () => {
|
18
|
+
await paymentStore.updatePayments({ id })
|
19
|
+
}, 1000)
|
20
|
+
}
|
21
|
+
|
22
|
+
const setCompletedStatus = async (id: string) => {
|
23
|
+
await api.setPaymentStatus({ id, status: Zeus.PaymentStatus.COMPLETED })
|
24
|
+
setTimeout(async () => {
|
25
|
+
await paymentStore.updatePayments({ id })
|
26
|
+
}, 1000)
|
27
|
+
}
|
28
|
+
|
29
|
+
return { setPaidStatus, setRefundedStatus, setCompletedStatus }
|
30
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template lang="pug">
|
2
|
-
q-
|
3
|
-
div
|
2
|
+
q-btn(color="teal" clickable size="sm" @click="showDialog=true")
|
3
|
+
div
|
4
4
|
q-icon(name="fa-regular fa-square-check").q-mr-xs
|
5
5
|
span отметить оплаченным
|
6
6
|
|
@@ -18,6 +18,7 @@ import { useSetStatus } from '../../model';
|
|
18
18
|
import { ref } from 'vue';
|
19
19
|
import { ModalBase } from 'src/shared/ui/ModalBase';
|
20
20
|
import { Form } from 'src/shared/ui/Form';
|
21
|
+
|
21
22
|
const {setPaidStatus} = useSetStatus()
|
22
23
|
const isSubmitting = ref(false)
|
23
24
|
const showDialog = ref(false)
|
@@ -37,13 +38,16 @@ const close = () => {
|
|
37
38
|
}
|
38
39
|
|
39
40
|
const setPaid = async() => {
|
41
|
+
isSubmitting.value = true
|
40
42
|
try {
|
41
43
|
await setPaidStatus(props.id)
|
42
|
-
SuccessAlert('Статус
|
44
|
+
SuccessAlert('Статус платежа обновлён')
|
43
45
|
close()
|
44
46
|
} catch(e: any) {
|
45
47
|
FailAlert(`Возникла ошибка: ${e.message}`)
|
46
48
|
close()
|
49
|
+
} finally {
|
50
|
+
isSubmitting.value = false
|
47
51
|
}
|
48
52
|
}
|
49
53
|
</script>
|
@@ -34,7 +34,7 @@ export function useAddPaymentMethod() {
|
|
34
34
|
|
35
35
|
async function addPaymentMethod(params: IAddPaymentMethod) {
|
36
36
|
|
37
|
-
await store.
|
37
|
+
await store.loadUserWallet({
|
38
38
|
coopname: info.coopname,
|
39
39
|
username: params.username,
|
40
40
|
})
|
@@ -42,7 +42,7 @@ export function useAddPaymentMethod() {
|
|
42
42
|
|
43
43
|
await sendPOST(`/v1/methods/${params.username}/add`, params)
|
44
44
|
|
45
|
-
await store.
|
45
|
+
await store.loadUserWallet({
|
46
46
|
coopname: info.coopname,
|
47
47
|
username: session.username
|
48
48
|
})
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<template lang="pug">
|
2
2
|
div
|
3
|
-
q-btn(@click="showDialog=true" color="primary"
|
3
|
+
q-btn(@click="showDialog=true" color="primary" icon="add") добавить реквизиты
|
4
4
|
|
5
5
|
//- q-badge(flat rounded color="grey").q-ml-sm
|
6
6
|
//- q-icon(name="far fa-question")
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<template lang="pug">
|
2
2
|
div
|
3
|
-
q-btn(@click="showDialog=true" :size="size" flat dense)
|
3
|
+
q-btn(@click="showDialog=true" :size="size" flat dense)
|
4
4
|
q-icon(name="close")
|
5
|
+
span.q-ml-xs удалить
|
6
|
+
|
5
7
|
q-dialog(v-model="showDialog" @hide="clear")
|
6
8
|
ModalBase(:title='"Удалить метод платежа"' )
|
7
9
|
Form(:handler-submit="handlerSubmit" :is-submitting="isSubmitting" :button-cancel-txt="'Отменить'" :button-submit-txt="'Продолжить'" @cancel="clear").q-pa-sm
|
package/src/features/Request/CreateParentOffer/ui/CreateParentOfferForm/CreateParentOfferForm.vue
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import {
|
2
|
+
import { FailAlert, SuccessAlert } from 'src/shared/api'
|
3
3
|
import { api } from '../../api'
|
4
4
|
import type { ICreateOffer, IFormData } from 'src/features/Request/CreateParentOffer/model'
|
5
5
|
import { computed, ref } from 'vue'
|
6
6
|
import { Form } from 'src/shared/ui/Form'
|
7
7
|
import { useCooperativeStore } from 'src/entities/Cooperative'
|
8
8
|
import { ImageUploaderWithPreview } from '../ImageUploaderWithPreview'
|
9
|
-
import { CURRENCY } from 'src/shared/config'
|
10
|
-
|
11
9
|
|
12
10
|
const props = defineProps({
|
13
11
|
username: {
|
@@ -50,7 +48,7 @@ const handlerSubmit = async () => {
|
|
50
48
|
coopname: props.coopname,
|
51
49
|
program_id: formData.value.program_id,
|
52
50
|
units: formData.value.units,
|
53
|
-
unit_cost: parseFloat(unit_cost.toString()).toFixed(4) + ' ' + CURRENCY,
|
51
|
+
unit_cost: parseFloat(unit_cost.toString()).toFixed(4) + ' ' + process.env.CURRENCY,
|
54
52
|
product_lifecycle_secs: 86400 * formData.value.product_lifecycle_days,
|
55
53
|
data: {
|
56
54
|
title: formData.value.title,
|
@@ -64,7 +62,7 @@ const handlerSubmit = async () => {
|
|
64
62
|
SuccessAlert('Объявление успешно создано')
|
65
63
|
} catch (e: any) {
|
66
64
|
console.log(e)
|
67
|
-
|
65
|
+
FailAlert(e.message)
|
68
66
|
}
|
69
67
|
}
|
70
68
|
</script>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { ref } from 'vue'
|
3
|
-
import { UPLOAD_URL } from 'src/shared/config'
|
2
|
+
import { ref, computed } from 'vue'
|
4
3
|
import { ImagesPreview } from '../ImagesPreview'
|
5
4
|
|
6
5
|
const emit = defineEmits(['updateImages'])
|
@@ -38,11 +37,13 @@ const uploaderRef = ref()
|
|
38
37
|
const triggerUploader = () => {
|
39
38
|
uploaderRef.value.pickFiles()
|
40
39
|
}
|
40
|
+
|
41
|
+
const upload_url = computed(() => process.env.UPLOAD_URL)
|
41
42
|
</script>
|
42
43
|
|
43
44
|
<template lang="pug">
|
44
45
|
div
|
45
46
|
q-btn(icon="add" class="q-ml-md" @click="triggerUploader") Загрузить изображения
|
46
|
-
q-uploader(v-show="false" ref="uploaderRef" color="grey" flat no-thumbnails multiple square auto-upload :url="
|
47
|
+
q-uploader(v-show="false" ref="uploaderRef" color="grey" flat no-thumbnails multiple square auto-upload :url="upload_url" :max-file-size="104857600" @uploaded="uploaded").full-width
|
47
48
|
ImagesPreview(v-if="images.length > 0" :images="images" :show-remove="true" @select-image="select" @remove-image="remove").q-ma-md
|
48
49
|
</template>
|
@@ -3,7 +3,7 @@ q-btn(color="red" @click="moderate") подтвердить модерацию
|
|
3
3
|
</template>
|
4
4
|
|
5
5
|
<script setup lang="ts">
|
6
|
-
import {
|
6
|
+
import { FailAlert, SuccessAlert } from 'src/shared/api'
|
7
7
|
import { ref } from 'vue'
|
8
8
|
import { api } from '../api'
|
9
9
|
|
@@ -34,7 +34,7 @@ q-btn(color="red" @click="moderate") подтвердить модерацию
|
|
34
34
|
})
|
35
35
|
SuccessAlert('Модерация заявки подтверждена')
|
36
36
|
} catch (e: any) {
|
37
|
-
|
37
|
+
FailAlert(e)
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { TransactResult } from '@wharfkit/session';
|
2
2
|
import { RegistratorContract } from 'cooptypes';
|
3
3
|
import { useSessionStore } from 'src/entities/Session';
|
4
|
-
import { CURRENCY } from 'src/shared/config';
|
5
4
|
import { useGlobalStore } from 'src/shared/store';
|
6
5
|
|
7
6
|
export function useAddCooperative() {
|
@@ -10,10 +9,10 @@ export function useAddCooperative() {
|
|
10
9
|
): Promise<TransactResult | undefined> {
|
11
10
|
const session = useSessionStore();
|
12
11
|
|
13
|
-
data.params.initial = `${parseFloat(data.params.initial).toFixed(4)} ${CURRENCY}`
|
14
|
-
data.params.minimum = `${parseFloat(data.params.minimum).toFixed(4)} ${CURRENCY}`
|
15
|
-
data.params.org_initial = `${parseFloat(data.params.org_initial).toFixed(4)} ${CURRENCY}`
|
16
|
-
data.params.org_minimum = `${parseFloat(data.params.org_minimum).toFixed(4)} ${CURRENCY}`
|
12
|
+
data.params.initial = `${parseFloat(data.params.initial).toFixed(4)} ${process.env.CURRENCY}`
|
13
|
+
data.params.minimum = `${parseFloat(data.params.minimum).toFixed(4)} ${process.env.CURRENCY}`
|
14
|
+
data.params.org_initial = `${parseFloat(data.params.org_initial).toFixed(4)} ${process.env.CURRENCY}`
|
15
|
+
data.params.org_minimum = `${parseFloat(data.params.org_minimum).toFixed(4)} ${process.env.CURRENCY}`
|
17
16
|
|
18
17
|
const result = await useGlobalStore().transact({
|
19
18
|
account: RegistratorContract.contractName.production,
|