@coopenomics/desktop 2.2.10 → 2025.5.2
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/alias-resolver.js +35 -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 +14 -7
- package/quasar.config.cjs +28 -15
- 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/router.ts +4 -3
- 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 +14 -14
- 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 +4 -4
- 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/env.d.ts +2 -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 -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 +4 -5
- package/src/features/Request/CreateParentOffer/ui/ImageUploaderWithPreview/ImageUploaderWithPreview.vue +5 -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 +5 -5
- package/src/features/Union/AddCooperative/ui/AddCooperativeForm.vue +6 -9
- package/src/features/User/AddUser/ui/AddUserDialog/AddUserDialog.vue +4 -4
- package/src/features/User/LoginUser/model/index.ts +3 -7
- package/src/features/User/LoginUser/ui/LoginForm/LoginForm.vue +0 -6
- package/src/features/User/Logout/model/index.ts +2 -1
- package/src/features/Wallet/DepositToWallet/ui/DepositButton/DepositButton.vue +10 -7
- package/src/features/Wallet/WithdrawFromWallet/ui/withdrawButton.vue +7 -6
- 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} +12 -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 +51 -24
- 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 +4 -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 +6 -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 +5 -5
- package/src/shared/api/client.ts +4 -4
- package/src/shared/api/eosio.ts +2 -2
- package/src/shared/api/indexDB.ts +3 -0
- package/src/shared/api/utils.ts +2 -2
- package/src/shared/config/Environment.ts +68 -0
- package/src/shared/config/index.ts +2 -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/proxy/dicebear-collection.cjs +21 -0
- package/src/shared/lib/proxy/dicebear-core.cjs +20 -0
- package/src/shared/lib/proxy/email-regex.cjs +19 -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/ClientOnly/ClientOnly.vue +15 -0
- package/src/shared/ui/ClientOnly/index.ts +1 -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 +88 -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 +2 -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/src-ssr/middlewares/injectEnv.ts +49 -0
- 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
package/src/types/index.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {default as Commutator} from './Commutator.vue'
|
@@ -1,273 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
q-card(flat)
|
3
|
-
q-table(
|
4
|
-
ref="tableRef"
|
5
|
-
flat
|
6
|
-
:rows="decisions"
|
7
|
-
:columns="columns"
|
8
|
-
:table-colspan="9"
|
9
|
-
row-key="table.id"
|
10
|
-
:pagination="pagination"
|
11
|
-
virtual-scroll
|
12
|
-
:virtual-scroll-item-size="48"
|
13
|
-
:rows-per-page-options="[10]"
|
14
|
-
:loading="onLoading"
|
15
|
-
:no-data-label="'У совета нет вопросов на повестке для голосования. Вопросы на повестку добавляются автоматически при участии пайщиков в цифровых целевых потребительских программах кооператива. Также, вопрос на повестку можно добавить вручную, нажав на кнопку `ПРЕДЛОЖИТЬ ПОВЕСТКУ`.'"
|
16
|
-
).full-width
|
17
|
-
|
18
|
-
template(#top)
|
19
|
-
CreateProjectFreeDecisionButton
|
20
|
-
|
21
|
-
template(#header="props")
|
22
|
-
q-tr(:props="props")
|
23
|
-
q-th(auto-width)
|
24
|
-
|
25
|
-
q-th(
|
26
|
-
v-for="col in props.cols"
|
27
|
-
:key="col.name"
|
28
|
-
:props="props"
|
29
|
-
) {{ col.label }}
|
30
|
-
|
31
|
-
template(#body="props")
|
32
|
-
q-tr(:key="`m_${props.row.table.id}`" :props="props")
|
33
|
-
q-td(auto-width)
|
34
|
-
q-btn(size="sm" color="primary" dense :icon="expanded.get(props.row.table.id) ? 'remove' : 'add'" round @click="toggleExpand(props.row.table.id)")
|
35
|
-
|
36
|
-
q-td {{ props.row.table.id }}
|
37
|
-
q-td {{ props.row.table.username }}
|
38
|
-
q-td
|
39
|
-
q-badge {{getTitle(props.row.documents.statement.document.meta.title, props.row.documents.statement.action.user)}}
|
40
|
-
|
41
|
-
//- q-td
|
42
|
-
//- q-checkbox(@click="updateValidation(props.row.id)" :model-value="props.row.validated")
|
43
|
-
q-td {{formatToFromNow(props.row.table.expired_at)}}
|
44
|
-
q-td
|
45
|
-
//- p Проголосовало {{ props.row.table.votes_for.length + props.row.table.votes_against.length}} из {{totalMembers}}
|
46
|
-
|
47
|
-
|
48
|
-
q-btn(v-if="isVotedFor(props.row.table) || !isVotedAny(props.row.table)" :disabled="isVotedAny(props.row.table)" dense flat @click="voteAgainst(props.row.table.id)").text-red
|
49
|
-
q-icon(name="fa-regular fa-thumbs-down")
|
50
|
-
span.q-pl-xs {{props.row.table.votes_against.length}}
|
51
|
-
|
52
|
-
q-btn(v-if="isVotedAgainst(props.row.table)" disabled dense flat).text-red
|
53
|
-
q-icon(name="fas fa-thumbs-down")
|
54
|
-
span.q-pl-xs {{props.row.table.votes_against.length}}
|
55
|
-
|
56
|
-
q-checkbox( v-model="props.row.table.approved" disable :true-value="1" :false-value="0" )
|
57
|
-
|
58
|
-
q-btn(v-if="isVotedAgainst(props.row.table) || !isVotedAny(props.row.table)" :disabled="isVotedAny(props.row.table)" dense flat @click="voteFor(props.row.table.id)").text-green
|
59
|
-
span.q-pr-xs {{props.row.table.votes_for.length}}
|
60
|
-
q-icon(name="fa-regular fa-thumbs-up" style="transform: scaleX(-1)")
|
61
|
-
|
62
|
-
q-btn(v-if="isVotedFor(props.row.table)" disabled dense flat ).text-green
|
63
|
-
span.q-pr-xs {{props.row.table.votes_for.length}}
|
64
|
-
q-icon(name="fas fa-thumbs-up" style="transform: scaleX(-1)")
|
65
|
-
q-td
|
66
|
-
q-btn(size="sm" color="teal" v-if="currentUser.isChairman" :loading="isProcess(props.row.table.id)" @click="updateAuthorized(props.row)") утвердить
|
67
|
-
|
68
|
-
q-tr(v-if="expanded.get(props.row.table.id)" :key="`e_${props.row.table.id}`" :props="props" class="q-virtual-scroll--with-prev")
|
69
|
-
q-td(colspan="100%")
|
70
|
-
ComplexDocument(:documents="props.row.documents")
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
</template>
|
75
|
-
|
76
|
-
<script setup lang="ts">
|
77
|
-
import { ref, onBeforeUnmount, reactive } from 'vue'
|
78
|
-
import { useRoute } from 'vue-router'
|
79
|
-
const route = useRoute()
|
80
|
-
import { Notify } from 'quasar'
|
81
|
-
import { ComplexDocument } from 'src/shared/ui/ComplexDocument';
|
82
|
-
import { sendGET } from 'src/shared/api';
|
83
|
-
import { useSessionStore } from 'src/entities/Session';
|
84
|
-
import { Cooperative, SovietContract } from 'cooptypes'
|
85
|
-
import { useVoteForDecision } from 'src/features/Decision/VoteForDecision';
|
86
|
-
import { useAuthorizeAndExecDecision } from 'src/features/Decision/AuthorizeAndExecDecision';
|
87
|
-
import { useVoteAgainstDecision } from 'src/features/Decision/VoteAgainstDecision';
|
88
|
-
import { useSystemStore } from 'src/entities/System/model';
|
89
|
-
const { info } = useSystemStore()
|
90
|
-
|
91
|
-
import { useCooperativeStore } from 'src/entities/Cooperative/model/stores';
|
92
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
93
|
-
import { CreateProjectFreeDecisionButton } from 'src/features/Decision/CreateProject';
|
94
|
-
import { formatToFromNow } from 'src/shared/lib/utils/dates/formatToFromNow';
|
95
|
-
|
96
|
-
const session = useSessionStore()
|
97
|
-
const onLoading = ref(false)
|
98
|
-
const currentUser = useCurrentUserStore()
|
99
|
-
|
100
|
-
const columns = [
|
101
|
-
{ name: 'id', align: 'left', label: '№', field: 'id', sortable: true },
|
102
|
-
{ name: 'username', align: 'left', label: 'Аккаунт', field: 'username', sortable: true },
|
103
|
-
{ name: 'caption', align: 'left', label: 'Пункт', field: 'caption', sortable: true },
|
104
|
-
{ name: 'expired_at', align: 'left', label: 'Истекает', field: 'expired_at', sortable: false },
|
105
|
-
// { name: 'validated', align: 'left', label: 'Проверено', field: 'validated', sortable: true },
|
106
|
-
{ name: 'approved', align: 'left', label: 'Голосование', field: 'approved', sortable: true },
|
107
|
-
{ name: 'authorized', align: 'left', label: '', field: 'authorized', sortable: true },
|
108
|
-
] as any
|
109
|
-
|
110
|
-
const coop = useCooperativeStore()
|
111
|
-
coop.loadPrivateCooperativeData()
|
112
|
-
|
113
|
-
const expanded = reactive(new Map()) // Используем Map для отслеживания состояния развертывания каждой записи
|
114
|
-
|
115
|
-
// Функция для переключения состояния развертывания
|
116
|
-
const toggleExpand = (id: any) => {
|
117
|
-
expanded.set(id, !expanded.get(id))
|
118
|
-
}
|
119
|
-
|
120
|
-
// const totalMembers = computed(() => coop.privateCooperativeData?.totalMembers)
|
121
|
-
|
122
|
-
const decisions = ref([] as Cooperative.Document.IComplexAgenda[])
|
123
|
-
|
124
|
-
const loadAgenda = async (hidden?: boolean) => {
|
125
|
-
try {
|
126
|
-
onLoading.value = hidden == true ? false : true
|
127
|
-
decisions.value = (await sendGET('/v1/coop/agenda', {
|
128
|
-
coopname: route.params.coopname,
|
129
|
-
}) as Cooperative.Document.IComplexAgenda[])
|
130
|
-
|
131
|
-
onLoading.value = false
|
132
|
-
} catch (e: any) {
|
133
|
-
onLoading.value = false
|
134
|
-
Notify.create({
|
135
|
-
message: e.message,
|
136
|
-
type: 'negative',
|
137
|
-
})
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
loadAgenda()
|
142
|
-
|
143
|
-
const interval = setInterval(() => loadAgenda(true), 10000)
|
144
|
-
|
145
|
-
onBeforeUnmount(() => clearInterval(interval))
|
146
|
-
|
147
|
-
const getTitle = (title: string, user: any) => {
|
148
|
-
let result ='Вопрос на голосование'
|
149
|
-
|
150
|
-
if (user.first_name)
|
151
|
-
result = `${title} от ${user.last_name} ${user.first_name} ${user.middle_name}`
|
152
|
-
else result = `${title} от ${user.short_name}`
|
153
|
-
|
154
|
-
return result
|
155
|
-
}
|
156
|
-
|
157
|
-
|
158
|
-
const authorizeLoading = ref<any>({})
|
159
|
-
|
160
|
-
const isProcess = (decisionId: number) => {
|
161
|
-
return authorizeLoading.value[decisionId] ? true : false
|
162
|
-
}
|
163
|
-
|
164
|
-
const updateAuthorized = async (row: Cooperative.Document.IComplexAgenda) => {
|
165
|
-
|
166
|
-
const decision_id = Number(row.table.id)
|
167
|
-
console.log('decision_id', decision_id)
|
168
|
-
try {
|
169
|
-
const username = row.table.username
|
170
|
-
const type = row.table.type
|
171
|
-
const meta = {} as any
|
172
|
-
console.log('here', row.table.statement.meta)
|
173
|
-
|
174
|
-
//TODO убрать проверку позже (нужно было для теста)
|
175
|
-
const unparsedDocumentMeta = row.table.statement.meta == '' ? '{}' : row.table.statement.meta
|
176
|
-
let parsedDocumentMeta = JSON.parse(unparsedDocumentMeta)
|
177
|
-
|
178
|
-
const registryMap = {
|
179
|
-
'freedecision': Cooperative.Registry.FreeDecision.registry_id,
|
180
|
-
'joincoop': Cooperative.Registry.DecisionOfParticipantApplication.registry_id,
|
181
|
-
}
|
182
|
-
|
183
|
-
const registry_id = registryMap[type]
|
184
|
-
|
185
|
-
if (registry_id === Cooperative.Registry.FreeDecision.registry_id){
|
186
|
-
const m = parsedDocumentMeta as Cooperative.Registry.FreeDecision.Action
|
187
|
-
meta.project_id = m.project_id
|
188
|
-
}
|
189
|
-
|
190
|
-
|
191
|
-
authorizeLoading.value[decision_id] = true
|
192
|
-
const { authorizeAndExecDecision } = useAuthorizeAndExecDecision()
|
193
|
-
|
194
|
-
await authorizeAndExecDecision(username, registry_id, decision_id, meta)
|
195
|
-
|
196
|
-
Notify.create({
|
197
|
-
message: 'Решение принято и исполнено',
|
198
|
-
type: 'positive',
|
199
|
-
})
|
200
|
-
|
201
|
-
authorizeLoading.value[decision_id] = false
|
202
|
-
await loadAgenda()
|
203
|
-
|
204
|
-
} catch (e: any) {
|
205
|
-
authorizeLoading.value[decision_id] = false
|
206
|
-
|
207
|
-
Notify.create({
|
208
|
-
message: e.message,
|
209
|
-
type: 'negative',
|
210
|
-
})
|
211
|
-
}
|
212
|
-
}
|
213
|
-
|
214
|
-
const isVotedFor = (decision: SovietContract.Tables.Decisions.IDecision) => {
|
215
|
-
return decision.votes_for.includes(session.username)
|
216
|
-
}
|
217
|
-
|
218
|
-
const isVotedAgainst = (decision: SovietContract.Tables.Decisions.IDecision) => {
|
219
|
-
return decision.votes_against.includes(session.username)
|
220
|
-
}
|
221
|
-
|
222
|
-
const isVotedAny = (decision: SovietContract.Tables.Decisions.IDecision) => {
|
223
|
-
return isVotedAgainst(decision) || isVotedFor(decision)
|
224
|
-
}
|
225
|
-
|
226
|
-
const voteFor = async (decision_id: number) => {
|
227
|
-
try {
|
228
|
-
const { voteForDecision } = useVoteForDecision()
|
229
|
-
|
230
|
-
await voteForDecision(
|
231
|
-
decision_id
|
232
|
-
)
|
233
|
-
|
234
|
-
Notify.create({
|
235
|
-
message: 'Голос принят',
|
236
|
-
type: 'positive',
|
237
|
-
})
|
238
|
-
|
239
|
-
await loadAgenda()
|
240
|
-
} catch (e: any) {
|
241
|
-
console.log(e)
|
242
|
-
Notify.create({
|
243
|
-
message: e.message,
|
244
|
-
type: 'negative',
|
245
|
-
})
|
246
|
-
}
|
247
|
-
}
|
248
|
-
|
249
|
-
const voteAgainst = async (decision_id: number) => {
|
250
|
-
try {
|
251
|
-
await useVoteAgainstDecision().voteAgainstDecision({
|
252
|
-
coopname: info.coopname,
|
253
|
-
member: session.username,
|
254
|
-
decision_id,
|
255
|
-
})
|
256
|
-
|
257
|
-
Notify.create({
|
258
|
-
message: 'Голос принят',
|
259
|
-
type: 'positive',
|
260
|
-
})
|
261
|
-
|
262
|
-
await loadAgenda()
|
263
|
-
} catch (e: any) {
|
264
|
-
Notify.create({
|
265
|
-
message: e.message,
|
266
|
-
type: 'negative',
|
267
|
-
})
|
268
|
-
}
|
269
|
-
}
|
270
|
-
|
271
|
-
const tableRef = ref(null)
|
272
|
-
const pagination = ref({ rowsPerPage: 10 })
|
273
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as ListOfQuestionsWidget} from './ListOfQuestions.vue'
|
@@ -1,52 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div
|
3
|
-
q-card(v-if="contacts && contacts.details" flat).q-pa-sm
|
4
|
-
//- p.text-h6.text-center Контакты
|
5
|
-
|
6
|
-
q-item
|
7
|
-
q-item-section
|
8
|
-
q-item-label(caption) Наименование организации
|
9
|
-
q-item-label {{ contacts.full_name }}
|
10
|
-
|
11
|
-
q-item
|
12
|
-
q-item-section
|
13
|
-
q-item-label(caption) ИНН
|
14
|
-
q-item-label {{ contacts.details.inn }}
|
15
|
-
|
16
|
-
q-item
|
17
|
-
q-item-section
|
18
|
-
q-item-label(caption) ОГРН
|
19
|
-
q-item-label {{ contacts.details.ogrn }}
|
20
|
-
|
21
|
-
q-item
|
22
|
-
q-item-section
|
23
|
-
q-item-label(caption) Юридический адрес
|
24
|
-
q-item-label {{ contacts.full_address }}
|
25
|
-
|
26
|
-
q-item
|
27
|
-
q-item-section
|
28
|
-
q-item-label(caption) Телефон
|
29
|
-
q-item-label {{ contacts.phone }}
|
30
|
-
|
31
|
-
q-item
|
32
|
-
q-item-section
|
33
|
-
q-item-label(caption) Электронная почта
|
34
|
-
q-item-label {{ contacts.email }}
|
35
|
-
|
36
|
-
q-item
|
37
|
-
q-item-section
|
38
|
-
q-item-label(caption) Председатель
|
39
|
-
q-item-label {{ chairman }}
|
40
|
-
|
41
|
-
</template>
|
42
|
-
|
43
|
-
<script lang="ts" setup>
|
44
|
-
import { useCooperativeStore } from 'src/entities/Cooperative';
|
45
|
-
import { computed } from 'vue';
|
46
|
-
|
47
|
-
const cooperative = useCooperativeStore()
|
48
|
-
cooperative.loadContacts()
|
49
|
-
|
50
|
-
const contacts = computed(() => cooperative.contacts)
|
51
|
-
const chairman = computed(() => `${contacts.value?.chairman?.last_name} ${contacts.value?.chairman?.first_name} ${contacts.value?.chairman?.middle_name}`)
|
52
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as ChangeCooperativeContributions} from './ChangeContributions.vue'
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as SetCooperativeDescription} from './SetDescription.vue'
|
package/src/widgets/Cooperative/Participants/ListOfParticipants/ui/ListOfParticipantsWidget.vue
DELETED
@@ -1,186 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
|
3
|
-
q-table(
|
4
|
-
ref="tableRef"
|
5
|
-
flat
|
6
|
-
:rows="accountStore.accounts.items"
|
7
|
-
:columns="columns"
|
8
|
-
row-key="username"
|
9
|
-
:pagination="pagination"
|
10
|
-
virtual-scroll
|
11
|
-
:virtual-scroll-item-size="48"
|
12
|
-
:rows-per-page-options="[10]"
|
13
|
-
:loading="onLoading"
|
14
|
-
:no-data-label="'У кооператива нет пайщиков'"
|
15
|
-
).full-height
|
16
|
-
template(#top)
|
17
|
-
slot(name="top")
|
18
|
-
|
19
|
-
template(#header="props")
|
20
|
-
q-tr(:props="props")
|
21
|
-
q-th(auto-width)
|
22
|
-
q-th(
|
23
|
-
v-for="col in props.cols"
|
24
|
-
:key="col.name"
|
25
|
-
:props="props"
|
26
|
-
) {{ col.label }}
|
27
|
-
|
28
|
-
template(#body="props")
|
29
|
-
|
30
|
-
q-tr(:key="`m_${props.row.username}`" :props="props")
|
31
|
-
q-td(auto-width)
|
32
|
-
q-btn(
|
33
|
-
size="sm"
|
34
|
-
color="primary"
|
35
|
-
round
|
36
|
-
dense
|
37
|
-
:icon="expanded.get(props.row.username) ? 'remove' : 'add'"
|
38
|
-
@click="toggleExpand(props.row.username)"
|
39
|
-
)
|
40
|
-
|
41
|
-
q-td {{ getName(props.row) }}
|
42
|
-
q-td {{ props.row.private_account.type === AccountTypes.Individual ? 'физ. лицо' : (props.row.private_account.type === AccountTypes.Organization ? 'юр. лицо' : (props.row.private_account.type === AccountTypes.Entrepreneur ? 'инд. предприниматель' : 'неизвестно')) }}
|
43
|
-
q-td {{ props.row.username }}
|
44
|
-
q-td {{ moment(props.row.blockchain_account?.created).format('DD.MM.YY HH:mm:ss') }}
|
45
|
-
|
46
|
-
q-tr(v-if="expanded.get(props.row.username)" :key="`e_${props.row.username}`" :props="props" class="q-virtual-scroll--with-prev")
|
47
|
-
q-td(colspan="100%" style="padding: 0 !important;")
|
48
|
-
q-tabs(
|
49
|
-
v-model="currentTab[props.row.username]"
|
50
|
-
align="justify"
|
51
|
-
stretch
|
52
|
-
dense
|
53
|
-
indicator-color="lime"
|
54
|
-
)
|
55
|
-
q-tab(name="info" label="Данные" class="bg-primary text-white")
|
56
|
-
q-tab(name="document" label="Документы" class="bg-primary text-white")
|
57
|
-
|
58
|
-
q-tab-panels(v-model="currentTab[props.row.username]" animated)
|
59
|
-
q-tab-panel(name="info")
|
60
|
-
component(:is="useComponent(props.row)" :participantData="usePrivateData(props.row)" @update="newData => update(props.row, newData)")
|
61
|
-
|
62
|
-
q-tab-panel(name="document")
|
63
|
-
slot(:expand="expanded.get(props.row.username)" :receiver="props.row.username")
|
64
|
-
|
65
|
-
</template>
|
66
|
-
<script setup lang="ts">
|
67
|
-
import { ref, reactive } from 'vue'
|
68
|
-
import { Notify } from 'quasar'
|
69
|
-
import { EditableEntrepreneurCard } from 'src/shared/ui/EditableEntrepreneurCard';
|
70
|
-
import { EditableIndividualCard } from 'src/shared/ui/EditableIndividualCard';
|
71
|
-
import { EditableOrganizationCard } from 'src/shared/ui/EditableOrganizationCard';
|
72
|
-
import { useAccountStore } from 'src/entities/Account/model';
|
73
|
-
import moment from 'moment-with-locales-es6'
|
74
|
-
import { AccountTypes, type IAccount, type IIndividualData, type IOrganizationData, type IEntrepreneurData } from 'src/entities/Account/types';
|
75
|
-
|
76
|
-
const accountStore = useAccountStore()
|
77
|
-
|
78
|
-
const onLoading = ref(false)
|
79
|
-
|
80
|
-
const update = (
|
81
|
-
account: IAccount,
|
82
|
-
newData: IIndividualData | IOrganizationData | IEntrepreneurData
|
83
|
-
) => {
|
84
|
-
|
85
|
-
if (account.private_account?.type === AccountTypes.Individual) {
|
86
|
-
const individual = newData as IIndividualData;
|
87
|
-
account.private_account.individual_data = {
|
88
|
-
...individual,
|
89
|
-
passport: individual.passport ?? undefined, // заменяет null на undefined
|
90
|
-
};
|
91
|
-
} else if (account.private_account?.type === AccountTypes.Entrepreneur) {
|
92
|
-
account.private_account.entrepreneur_data = newData as IEntrepreneurData
|
93
|
-
} else if (account.private_account?.type === AccountTypes.Organization) {
|
94
|
-
account.private_account.organization_data = newData as IOrganizationData
|
95
|
-
}
|
96
|
-
|
97
|
-
};
|
98
|
-
|
99
|
-
|
100
|
-
// `Map` для отслеживания состояния раскрытых строк и вкладок
|
101
|
-
const expanded = reactive(new Map<string, boolean>())
|
102
|
-
const currentTab = reactive<Record<string, string>>({})
|
103
|
-
|
104
|
-
// Определяем, какой компонент использовать
|
105
|
-
const useComponent = (account: IAccount) => {
|
106
|
-
if (account.private_account)
|
107
|
-
switch (account.private_account.type) {
|
108
|
-
case AccountTypes.Individual:
|
109
|
-
return EditableIndividualCard
|
110
|
-
case AccountTypes.Entrepreneur:
|
111
|
-
return EditableEntrepreneurCard
|
112
|
-
case AccountTypes.Organization:
|
113
|
-
return EditableOrganizationCard
|
114
|
-
}
|
115
|
-
}
|
116
|
-
|
117
|
-
const usePrivateData = (account: IAccount) => {
|
118
|
-
if (account.private_account)
|
119
|
-
switch (account.private_account.type) {
|
120
|
-
case AccountTypes.Individual:
|
121
|
-
return account.private_account?.individual_data
|
122
|
-
case AccountTypes.Entrepreneur:
|
123
|
-
return account.private_account?.entrepreneur_data
|
124
|
-
case AccountTypes.Organization:
|
125
|
-
return account.private_account?.organization_data
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
// Загружаем данные
|
130
|
-
const loadParticipants = async () => {
|
131
|
-
try {
|
132
|
-
onLoading.value = true
|
133
|
-
|
134
|
-
await accountStore.getAccounts({options: {
|
135
|
-
page: 1,
|
136
|
-
limit: 1000,
|
137
|
-
sortOrder: 'DESC'
|
138
|
-
}})
|
139
|
-
|
140
|
-
onLoading.value = false
|
141
|
-
} catch (e: any) {
|
142
|
-
onLoading.value = false
|
143
|
-
Notify.create({
|
144
|
-
message: e.message,
|
145
|
-
type: 'negative',
|
146
|
-
})
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
loadParticipants()
|
151
|
-
|
152
|
-
const columns = [
|
153
|
-
{ name: 'name', align: 'left', label: 'ФИО / Наименование', field: 'name', sortable: true },
|
154
|
-
{ name: 'type', align: 'left', label: 'Тип', field: 'type' },
|
155
|
-
{ name: 'username', align: 'left', label: 'Аккаунт', field: 'username', sortable: true },
|
156
|
-
{
|
157
|
-
name: 'created_at',
|
158
|
-
align: 'left',
|
159
|
-
label: 'Зарегистрирован',
|
160
|
-
field: 'created_at',
|
161
|
-
sortable: true,
|
162
|
-
},
|
163
|
-
] as any
|
164
|
-
|
165
|
-
const tableRef = ref(null)
|
166
|
-
const pagination = ref({ rowsPerPage: 10 })
|
167
|
-
|
168
|
-
// Функция для переключения раскрытия строки
|
169
|
-
const toggleExpand = (id: string) => {
|
170
|
-
expanded.set(id, !expanded.get(id))
|
171
|
-
if (!currentTab[id]) {
|
172
|
-
currentTab[id] = 'info' // Устанавливаем вкладку по умолчанию
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
const getName = (account: IAccount) => {
|
177
|
-
if (account?.private_account?.type === AccountTypes.Individual){
|
178
|
-
return `${account.private_account.individual_data?.last_name} ${account.private_account.individual_data?.first_name} ${account.private_account.individual_data?.middle_name}`
|
179
|
-
} else if (account?.private_account?.type === AccountTypes.Entrepreneur){
|
180
|
-
return `${account.private_account.entrepreneur_data?.last_name} ${account.private_account.entrepreneur_data?.first_name} ${account.private_account.entrepreneur_data?.middle_name}`
|
181
|
-
} else if (account?.private_account?.type === AccountTypes.Organization){
|
182
|
-
return `${account.private_account.organization_data?.short_name}`
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as ListOfParticipantsWidget} from './ListOfParticipantsWidget.vue'
|
@@ -1,59 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
q-tabs(
|
3
|
-
v-if="routes"
|
4
|
-
dense
|
5
|
-
switch-indicator
|
6
|
-
inline-label
|
7
|
-
outside-arrows
|
8
|
-
mobile-arrows
|
9
|
-
align="justify"
|
10
|
-
active-class="bg-teal"
|
11
|
-
active-bg-color="teal"
|
12
|
-
active-color="white"
|
13
|
-
indicator-color="secondary"
|
14
|
-
).second-menu
|
15
|
-
|
16
|
-
q-route-tab(
|
17
|
-
v-for="route in routes"
|
18
|
-
:key="route.name"
|
19
|
-
:name="route.meta.title"
|
20
|
-
:label="route.meta.title"
|
21
|
-
:to="{ name: route.name }"
|
22
|
-
:params="{coopname: info.coopname}"
|
23
|
-
)
|
24
|
-
|
25
|
-
|
26
|
-
</template>
|
27
|
-
<script lang="ts" setup>
|
28
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
29
|
-
import { ref, watch } from 'vue';
|
30
|
-
import { useRoute } from 'vue-router';
|
31
|
-
import { useDesktopStore } from 'src/entities/Desktop/model';
|
32
|
-
import { type IRoute } from 'src/entities/Desktop/model/types';
|
33
|
-
import { useSystemStore } from 'src/entities/System/model';
|
34
|
-
const { info } = useSystemStore()
|
35
|
-
|
36
|
-
const desktop = useDesktopStore()
|
37
|
-
const routes = ref<IRoute[]>([])
|
38
|
-
const route = useRoute()
|
39
|
-
const user = useCurrentUserStore()
|
40
|
-
|
41
|
-
const init = () => {
|
42
|
-
const userRole = user.userAccount?.role || 'user';
|
43
|
-
|
44
|
-
routes.value = (desktop.getSecondLevel(route) as unknown as IRoute[]).filter(
|
45
|
-
(route) => route.meta?.roles?.includes(userRole) || route.meta?.roles?.length === 0
|
46
|
-
);
|
47
|
-
}
|
48
|
-
|
49
|
-
init()
|
50
|
-
|
51
|
-
watch(route, () => init())
|
52
|
-
</script>
|
53
|
-
|
54
|
-
<style>
|
55
|
-
|
56
|
-
.second-menu .q-tab__label {
|
57
|
-
font-size: 12px !important;
|
58
|
-
}
|
59
|
-
</style>
|
@@ -1 +0,0 @@
|
|
1
|
-
export {default as SecondLevelMenu} from './SecondLevelMenu.vue'
|