@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
@@ -1,42 +0,0 @@
|
|
1
|
-
import { defineStore } from 'pinia'
|
2
|
-
import { useSessionStore } from 'src/entities/Session';
|
3
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
4
|
-
import { useWalletStore } from 'src/entities/Wallet';
|
5
|
-
|
6
|
-
import { useSystemStore } from 'src/entities/System/model';
|
7
|
-
|
8
|
-
const namespace = 'cardstore'
|
9
|
-
|
10
|
-
interface ICardStore {
|
11
|
-
initWallet: () => Promise<void>;
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
export const useCardStore = defineStore(namespace, (): ICardStore => {
|
16
|
-
const currentUser = useCurrentUserStore();
|
17
|
-
const userWallet = useWalletStore()
|
18
|
-
|
19
|
-
const session = useSessionStore();
|
20
|
-
|
21
|
-
async function initWallet(): Promise<void> {
|
22
|
-
const { info } = useSystemStore()
|
23
|
-
|
24
|
-
// if (!session.isAuth && !currentUser.userAccount){
|
25
|
-
await session.init()
|
26
|
-
if (session.isAuth)
|
27
|
-
try{
|
28
|
-
await currentUser.loadProfile(session.username, info.coopname)
|
29
|
-
await userWallet.loadUserWalet({coopname: info.coopname, username: session.username})
|
30
|
-
session.loadComplete = true
|
31
|
-
|
32
|
-
} catch(e: any){
|
33
|
-
console.error(e)
|
34
|
-
}
|
35
|
-
// }
|
36
|
-
setTimeout(() => initWallet(), 10000)
|
37
|
-
}
|
38
|
-
|
39
|
-
return {
|
40
|
-
initWallet
|
41
|
-
}
|
42
|
-
})
|
@@ -1,40 +0,0 @@
|
|
1
|
-
import { watch } from 'vue';
|
2
|
-
import { useAccountStore } from 'src/entities/Account/model';
|
3
|
-
import { useSessionStore } from 'src/entities/Session';
|
4
|
-
import { useSystemStore } from 'src/entities/System/model';
|
5
|
-
import { useSelectBranch } from 'src/features/Branch/SelectBranch/model';
|
6
|
-
|
7
|
-
// boot/overlay.js
|
8
|
-
export default async () => {
|
9
|
-
const session = useSessionStore();
|
10
|
-
const system = useSystemStore();
|
11
|
-
const account = useAccountStore();
|
12
|
-
const { isVisible } = useSelectBranch();
|
13
|
-
|
14
|
-
// Функция для проверки условий
|
15
|
-
const checkConditions = () => {
|
16
|
-
if (
|
17
|
-
session.isAuth && //авторизован
|
18
|
-
system.info?.cooperator_account?.is_branched && //кооператив с участками
|
19
|
-
account?.account?.participant_account && //пользователь - пайщик кооператива
|
20
|
-
account.account.participant_account.braname === ''//у пользователя нет установленного кооперативного участка
|
21
|
-
) {
|
22
|
-
isVisible.value = true;
|
23
|
-
} else {
|
24
|
-
isVisible.value = false;
|
25
|
-
}
|
26
|
-
};
|
27
|
-
|
28
|
-
// Первый запуск проверки
|
29
|
-
checkConditions();
|
30
|
-
|
31
|
-
// Добавляем watcher на реактивные параметры
|
32
|
-
watch(
|
33
|
-
[() => session.isAuth, () => system.info, () => account.account],
|
34
|
-
() => {
|
35
|
-
console.log('Parameters changed');
|
36
|
-
checkConditions(); // Проверяем условия при изменении
|
37
|
-
},
|
38
|
-
{ deep: true } // Следим за вложенными объектами
|
39
|
-
);
|
40
|
-
};
|
package/src/boot/init-stores.ts
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
// src/boot/init-stores.js
|
2
|
-
import { boot } from 'quasar/wrappers';
|
3
|
-
import { useDesktopStore } from 'src/entities/Desktop/model';
|
4
|
-
import { useCardStore } from 'src/app/providers/card/store';
|
5
|
-
import type { RouteRecordRaw } from 'vue-router';
|
6
|
-
import { useSystemStore } from 'src/entities/System/model';
|
7
|
-
import { useAccountStore } from 'src/entities/Account/model';
|
8
|
-
import { useSessionStore } from 'src/entities/Session';
|
9
|
-
|
10
|
-
export default boot(async ({ router }) => {
|
11
|
-
const system = useSystemStore();
|
12
|
-
//Инициализация системного стора
|
13
|
-
await system.loadSystemInfo();
|
14
|
-
|
15
|
-
// инициализация всего остального
|
16
|
-
const desktops = useDesktopStore();
|
17
|
-
const cardStore = useCardStore();
|
18
|
-
const account = useAccountStore();
|
19
|
-
const session = useSessionStore();
|
20
|
-
|
21
|
-
|
22
|
-
// Инициализация стора desktops
|
23
|
-
await desktops.healthCheck();
|
24
|
-
await desktops.loadDesktops();
|
25
|
-
desktops.setActiveDesktop(desktops.defaultDesktopHash);
|
26
|
-
|
27
|
-
// Инициализация сессии
|
28
|
-
await cardStore.initWallet();
|
29
|
-
|
30
|
-
// Загрузка аккаунта
|
31
|
-
if (session.isAuth && session.username){
|
32
|
-
try {
|
33
|
-
await account.getAccount(session.username)
|
34
|
-
} catch(e){
|
35
|
-
session.close()
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
// Добавление динамических маршрутов как дочерних к 'base'
|
41
|
-
const baseRoute = router.getRoutes().find(route => route.name === 'base');
|
42
|
-
|
43
|
-
if (baseRoute) {
|
44
|
-
desktops.currentDesktop?.routes.forEach(route => {
|
45
|
-
// Добавляем маршрут как дочерний к 'base'
|
46
|
-
router.addRoute('base', route as RouteRecordRaw);
|
47
|
-
});
|
48
|
-
} else {
|
49
|
-
console.error('Base route not found');
|
50
|
-
}
|
51
|
-
});
|
@@ -1,46 +0,0 @@
|
|
1
|
-
// src/boot/navigation-guards.js
|
2
|
-
import { boot } from 'quasar/wrappers';
|
3
|
-
import { useSessionStore } from 'src/entities/Session';
|
4
|
-
import { useCurrentUserStore } from 'src/entities/User';
|
5
|
-
import { useDesktopStore } from 'src/entities/Desktop/model';
|
6
|
-
import { useSystemStore } from 'src/entities/System/model';
|
7
|
-
|
8
|
-
// Function to handle access logic
|
9
|
-
function hasAccess(to, userAccount) {
|
10
|
-
if (!to.meta?.roles || to.meta?.roles.length === 0) {
|
11
|
-
return true; // Access is allowed if no roles are defined
|
12
|
-
}
|
13
|
-
return userAccount && to.meta?.roles.includes(userAccount.role); // Check user roles against route roles
|
14
|
-
}
|
15
|
-
|
16
|
-
export default boot(async ({ router }) => {
|
17
|
-
const desktops = useDesktopStore();
|
18
|
-
const session = useSessionStore();
|
19
|
-
const currentUser = useCurrentUserStore();
|
20
|
-
const { info } = useSystemStore()
|
21
|
-
|
22
|
-
router.beforeEach(async (to, from, next) => {
|
23
|
-
await desktops.healthCheck();
|
24
|
-
|
25
|
-
if (desktops.health?.status === 'install' && to.name !== 'install') {
|
26
|
-
next({ name: 'install', params: { coopname: info.coopname } });
|
27
|
-
return;
|
28
|
-
}
|
29
|
-
|
30
|
-
if (to.name === 'index') {
|
31
|
-
const homePage =
|
32
|
-
session.isAuth && currentUser.isRegistrationComplete
|
33
|
-
? desktops.currentDesktop?.authorizedHome
|
34
|
-
: desktops.currentDesktop?.nonAuthorizedHome;
|
35
|
-
|
36
|
-
next({ name: homePage, params: { coopname: info.coopname } });
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
|
40
|
-
if (hasAccess(to, currentUser.userAccount)) {
|
41
|
-
next();
|
42
|
-
} else {
|
43
|
-
next({ name: 'permissionDenied' });
|
44
|
-
}
|
45
|
-
});
|
46
|
-
});
|
@@ -1,79 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div.row.justify-around.full-height
|
3
|
-
div(v-for="route in menuRoutes" :key="route.path")
|
4
|
-
q-btn(
|
5
|
-
v-ripple
|
6
|
-
flat
|
7
|
-
class="cursor-pointer btn-menu"
|
8
|
-
:class="headerClass(route)"
|
9
|
-
@click="open(route)"
|
10
|
-
)
|
11
|
-
q-icon(:name="route.meta.icon").btn-icon.q-pt-xs
|
12
|
-
span.btn-font {{ route.meta.title }}
|
13
|
-
|
14
|
-
q-btn(
|
15
|
-
v-ripple
|
16
|
-
flat
|
17
|
-
class="cursor-pointer btn-menu"
|
18
|
-
@click="emit('toogleMore')"
|
19
|
-
)
|
20
|
-
q-icon(name="menu").btn-icon.q-pt-xs
|
21
|
-
span.btn-font ещё
|
22
|
-
|
23
|
-
</template>
|
24
|
-
|
25
|
-
<script setup lang="ts">
|
26
|
-
import { computed } from 'vue'
|
27
|
-
import { useRouter } from 'vue-router'
|
28
|
-
import { useQuasar } from 'quasar'
|
29
|
-
import { useMenuStore } from 'src/entities/Menu'
|
30
|
-
import type { IMenu } from 'src/entities/Menu'
|
31
|
-
import { useSystemStore } from 'src/entities/System/model';
|
32
|
-
const { info } = useSystemStore()
|
33
|
-
|
34
|
-
import { useCurrentUserStore } from 'src/entities/User'
|
35
|
-
const emit = defineEmits(['toogleMore'])
|
36
|
-
const $q = useQuasar()
|
37
|
-
const isDark = computed(() => $q.dark.isActive)
|
38
|
-
const router = useRouter()
|
39
|
-
const currentUser = useCurrentUserStore()
|
40
|
-
const menuStore = useMenuStore()
|
41
|
-
|
42
|
-
const menuRoutes = computed(() => {
|
43
|
-
return menuStore.getUserDesktopMenu(currentUser?.userAccount?.role)
|
44
|
-
})
|
45
|
-
|
46
|
-
const headerClass = (route: IMenu) => {
|
47
|
-
const isActive = route.name === router.currentRoute.value.name
|
48
|
-
return isActive ? (isDark.value ? 'text-white bg-teal-8' : 'text-black bg-teal-2') : ''
|
49
|
-
}
|
50
|
-
|
51
|
-
const open = (route: IMenu) => {
|
52
|
-
router.push({ name: route.name, params: { coopname: info.coopname } })
|
53
|
-
}
|
54
|
-
</script>
|
55
|
-
|
56
|
-
<style lang="scss" scoped>
|
57
|
-
.btn-menu {
|
58
|
-
height: 60px;
|
59
|
-
width: 60px;
|
60
|
-
}
|
61
|
-
|
62
|
-
.btn-icon {
|
63
|
-
font-size: 20px !important;
|
64
|
-
}
|
65
|
-
|
66
|
-
.btn-font {
|
67
|
-
font-size: 7px !important;
|
68
|
-
}
|
69
|
-
|
70
|
-
.row {
|
71
|
-
display: flex;
|
72
|
-
justify-content: space-around;
|
73
|
-
align-items: center;
|
74
|
-
}
|
75
|
-
|
76
|
-
.full-height {
|
77
|
-
height: 100%;
|
78
|
-
}
|
79
|
-
</style>
|
@@ -1,76 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div
|
3
|
-
q-tabs( v-model="tab" dense switch-indicator inline-label outside-arrows mobile-arrows align="justify" active-bg-color="teal" active-color="white" indicator-color="secondary")
|
4
|
-
// q-tab(name="Дашборд" icon="mail" label="Дашборд")
|
5
|
-
//- q-tab(name="Повестка" label="Повестка")
|
6
|
-
|
7
|
-
//- q-tab(name="Пайщики" label="Пайщики")
|
8
|
-
//- q-tab(name="Документы" label="Документы")
|
9
|
-
|
10
|
-
q-tab(name="Администраторы" label="Администраторы")
|
11
|
-
|
12
|
-
q-tab(name="Члены совета" label="Члены совета")
|
13
|
-
q-tab(name="Кооператив" label="Кооператив")
|
14
|
-
|
15
|
-
// q-tab(name="Участки" icon="people" label="Участки")
|
16
|
-
|
17
|
-
// q-tab(name="Программы" label="Программы")
|
18
|
-
// q-tab(name="Собрания" icon="people" label="Собрания")
|
19
|
-
// q-tab(name="Фонды" label="Фонды")
|
20
|
-
|
21
|
-
q-tab-panels(
|
22
|
-
v-model="tab"
|
23
|
-
animated
|
24
|
-
transition-prev="fade"
|
25
|
-
transition-next="fade"
|
26
|
-
)
|
27
|
-
// q-tab-panel(name="Дашборд")
|
28
|
-
// p Дашборд
|
29
|
-
|
30
|
-
q-tab-panel(name="Кооператив")
|
31
|
-
//- cooperative
|
32
|
-
// boards.col-md-12.col-xs-12.q-pa-md
|
33
|
-
|
34
|
-
q-tab-panel(name="Участки")
|
35
|
-
p Действующие участки
|
36
|
-
p Входящие заявления на создание участка
|
37
|
-
p Связь с участками
|
38
|
-
|
39
|
-
q-tab-panel(name="Администраторы")
|
40
|
-
staff
|
41
|
-
|
42
|
-
q-tab-panel(name="Повестка")
|
43
|
-
//- decisions
|
44
|
-
|
45
|
-
q-tab-panel(name="Пайщики")
|
46
|
-
//- participants
|
47
|
-
|
48
|
-
q-tab-panel(name="Документы")
|
49
|
-
//- documents(:receiver="coopname")
|
50
|
-
|
51
|
-
q-tab-panel(name="Программы")
|
52
|
-
div.text-h6 Программы
|
53
|
-
p Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
54
|
-
|
55
|
-
q-tab-panel(name="Собрания")
|
56
|
-
div.text-h6 Собрания
|
57
|
-
p Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
58
|
-
|
59
|
-
q-tab-panel(name="Фонды")
|
60
|
-
div.text-h6 Фонды
|
61
|
-
p Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
62
|
-
|
63
|
-
|
64
|
-
</template>
|
65
|
-
|
66
|
-
<script setup lang="ts">//
|
67
|
-
import { ref } from 'vue'
|
68
|
-
import staff from './staff.vue'
|
69
|
-
const tab = ref('Повестка')
|
70
|
-
|
71
|
-
</script>
|
72
|
-
<style>
|
73
|
-
.q-tab-panel {
|
74
|
-
padding: 0px !important;
|
75
|
-
}
|
76
|
-
</style>
|
@@ -1,274 +0,0 @@
|
|
1
|
-
<template lang="pug">
|
2
|
-
div
|
3
|
-
div.row.justify-center
|
4
|
-
div(v-if="staff.length > 0").col-md-12
|
5
|
-
q-card(v-if="staff" flat)
|
6
|
-
q-table(
|
7
|
-
ref="tableRef" v-model:expanded="expanded"
|
8
|
-
flat
|
9
|
-
bordered
|
10
|
-
:rows="staff"
|
11
|
-
:columns="columns"
|
12
|
-
:table-colspan="9"
|
13
|
-
row-key="username"
|
14
|
-
:pagination="pagination"
|
15
|
-
virtual-scroll
|
16
|
-
:virtual-scroll-item-size="48"
|
17
|
-
:rows-per-page-options="[10]"
|
18
|
-
|
19
|
-
).full-height
|
20
|
-
|
21
|
-
template(#bottom)
|
22
|
-
q-btn(icon="add" flat @click="showAdd = true") добавить администратора
|
23
|
-
|
24
|
-
|
25
|
-
template(#header="props")
|
26
|
-
q-tr(:props="props")
|
27
|
-
q-th(auto-width)
|
28
|
-
|
29
|
-
q-th(
|
30
|
-
v-for="col in props.cols"
|
31
|
-
:key="col.name"
|
32
|
-
:props="props"
|
33
|
-
) {{ col.label }}
|
34
|
-
|
35
|
-
template(#body="props")
|
36
|
-
q-tr(:key="`m_${props.row.username}`" :props="props")
|
37
|
-
q-td(auto-width)
|
38
|
-
// q-toggle(v-model="props.expand" checked-icon="fas fa-chevron-circle-left" unchecked-icon="fas fa-chevron-circle-right" )
|
39
|
-
q-btn(size="sm" color="primary" round dense :icon="props.expand ? 'remove' : 'add'" @click="props.expand = !props.expand")
|
40
|
-
q-td {{ props.row.username }}
|
41
|
-
q-td {{ props.row.position_title }}
|
42
|
-
|
43
|
-
q-td {{ props.row.data?.user_profile?.last_name }}
|
44
|
-
q-td {{ props.row.data?.user_profile?.first_name }}
|
45
|
-
q-td {{ props.row.data?.user_profile?.middle_name }}
|
46
|
-
q-td {{ props.row.data?.user_profile?.phone }}
|
47
|
-
q-td {{ props.row.data?.email }}
|
48
|
-
q-td {{ moment(props.row.data?.user_profile?.birthday).format('DD.MM.YY') }}
|
49
|
-
|
50
|
-
// q-td
|
51
|
-
// q-badge(v-for="(right, index) of props.row.rights" v-bind:key="index" ).q-pa-xs.q-ma-xs {{right.contract}}::{{right.action_name}}
|
52
|
-
|
53
|
-
q-tr(v-show="props.expand" :key="`e_${props.row.index}`" :props="props" class="q-virtual-scroll--with-prev")
|
54
|
-
q-td(colspan="100%")
|
55
|
-
div.row
|
56
|
-
div.row
|
57
|
-
span.text-grey.full-width Разрешения {{ props.row.username }}
|
58
|
-
div(v-for="(right, index) of props.row.rights" :key="index" ).q-pa-sm
|
59
|
-
q-card
|
60
|
-
q-input(v-model="right.contract" square standout="bg-teal text-white" label="Контракт")
|
61
|
-
q-input(v-model="right.action_name" square standout="bg-teal text-white" label="Действие")
|
62
|
-
q-btn( icon="fas fa-trash" size="xs" flat color="grey" @click="rmRight(index, props.row.username)").full-width
|
63
|
-
|
64
|
-
q-btn(flat color="primary" size="lg" icon="fas fa-plus" @click="addRight(props.row.username)")
|
65
|
-
q-btn(size="md" color="primary" @click="setRights(props.row.username)").full-width.text-center.q-mt-lg Сохранить
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
div(v-else)
|
70
|
-
p.full-width.text-center.text-grey.no-select у кооператива нет пайщиков
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
q-dialog(v-model="showAdd" persistent :maximized="false" )
|
75
|
-
q-card
|
76
|
-
div()
|
77
|
-
q-bar.bg-primary.text-white
|
78
|
-
span Добавить администратора
|
79
|
-
q-space
|
80
|
-
q-btn(v-close-popup dense flat icon="close")
|
81
|
-
q-tooltip Close
|
82
|
-
|
83
|
-
div.q-pa-sm.row.justify-center
|
84
|
-
div.q-pa-md
|
85
|
-
span Внимание! Вы собираетесь добавить администратора в кооператив.
|
86
|
-
div
|
87
|
-
q-input(v-model="newPersona.username" label="Имя аккаунта")
|
88
|
-
q-input(v-model="newPersona.position_title" label="Должность")
|
89
|
-
div.q-mt-lg
|
90
|
-
q-btn(flat @click="showAdd = false") Назад
|
91
|
-
q-btn(color="primary" @click="addStaff") Добавить
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
</template>
|
99
|
-
|
100
|
-
<script setup lang="ts">
|
101
|
-
import { computed, ref } from 'vue'
|
102
|
-
import { Notify } from 'quasar';
|
103
|
-
import { useSessionStore } from 'src/entities/Session'
|
104
|
-
const session = useSessionStore()
|
105
|
-
const username = computed(() => session.username)
|
106
|
-
const showAdd = ref(false);
|
107
|
-
import moment from 'moment-with-locales-es6'
|
108
|
-
import { useAddAdmin } from 'src/features/Cooperative/AddAdmin';
|
109
|
-
import { useSystemStore } from 'src/entities/System/model';
|
110
|
-
const { info } = useSystemStore()
|
111
|
-
|
112
|
-
import { useCooperativeStore } from 'src/entities/Cooperative';
|
113
|
-
import { useSetRights } from 'src/features/Cooperative/SetRights';
|
114
|
-
const cooperativeStore = useCooperativeStore()
|
115
|
-
const staff = computed(() => cooperativeStore.admins)
|
116
|
-
|
117
|
-
const loadStaff = async () => {
|
118
|
-
|
119
|
-
try {
|
120
|
-
await cooperativeStore.loadAdmins(info.coopname)
|
121
|
-
} catch (e: any) {
|
122
|
-
|
123
|
-
Notify.create({
|
124
|
-
message: e.message,
|
125
|
-
type: 'negative',
|
126
|
-
})
|
127
|
-
|
128
|
-
}
|
129
|
-
|
130
|
-
}
|
131
|
-
|
132
|
-
loadStaff()
|
133
|
-
|
134
|
-
const newPersona = ref({
|
135
|
-
username: '',
|
136
|
-
position_title: ''
|
137
|
-
})
|
138
|
-
|
139
|
-
|
140
|
-
const addRight = (newUsername: string) => {
|
141
|
-
const user = staff.value.find(u => u.username === newUsername);
|
142
|
-
|
143
|
-
if (user)
|
144
|
-
user.rights.push({ contract: '', action_name: '' })
|
145
|
-
|
146
|
-
}
|
147
|
-
|
148
|
-
|
149
|
-
const rmRight = (rightIndex: number, username: string) => {
|
150
|
-
// Найти пользователя в массиве staff.
|
151
|
-
const user = staff.value.find(u => u.username === username) as any
|
152
|
-
|
153
|
-
if (user) {
|
154
|
-
// Удалить элемент из массива rights этого пользователя.
|
155
|
-
user.rights.splice(rightIndex, 1);
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
const addStaff = async () => {
|
160
|
-
try {
|
161
|
-
useAddAdmin().addAdmin({
|
162
|
-
coopname: info.coopname,
|
163
|
-
chairman: username.value,
|
164
|
-
username: newPersona.value.username,
|
165
|
-
rights: [],
|
166
|
-
position_title: newPersona.value.position_title,
|
167
|
-
})
|
168
|
-
|
169
|
-
cooperativeStore.loadAdmins(info.coopname)
|
170
|
-
|
171
|
-
newPersona.value = {
|
172
|
-
username: '',
|
173
|
-
position_title: ''
|
174
|
-
}
|
175
|
-
|
176
|
-
showAdd.value = false
|
177
|
-
|
178
|
-
Notify.create({
|
179
|
-
message: 'Администратор добавлен',
|
180
|
-
type: 'positive',
|
181
|
-
})
|
182
|
-
|
183
|
-
} catch (e: any) {
|
184
|
-
|
185
|
-
Notify.create({
|
186
|
-
message: e.message,
|
187
|
-
type: 'negative',
|
188
|
-
})
|
189
|
-
|
190
|
-
}
|
191
|
-
}
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
// const rmStaff = async (username) => {
|
196
|
-
// try {
|
197
|
-
// await useDeleteAdmin().deleteAdmin({
|
198
|
-
// coopname: info.coopname,
|
199
|
-
// chairman: session.username,
|
200
|
-
// username
|
201
|
-
// })
|
202
|
-
|
203
|
-
// cooperativeStore.loadAdmins(info.coopname)
|
204
|
-
|
205
|
-
// Notify.create({
|
206
|
-
// message: 'Администратор уволен',
|
207
|
-
// type: 'positive',
|
208
|
-
// })
|
209
|
-
|
210
|
-
// if (isSelected.valud == username)
|
211
|
-
// selected.value = ''
|
212
|
-
|
213
|
-
// } catch (e) {
|
214
|
-
|
215
|
-
// Notify.create({
|
216
|
-
// message: e.message,
|
217
|
-
// type: 'negative',
|
218
|
-
// })
|
219
|
-
|
220
|
-
// }
|
221
|
-
// }
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
const setRights = async (newUsername: string) => {
|
227
|
-
try {
|
228
|
-
|
229
|
-
const user = staff.value.find(u => u.username === newUsername);
|
230
|
-
|
231
|
-
await useSetRights().setRights({
|
232
|
-
coopname: info.coopname,
|
233
|
-
chairman: username.value,
|
234
|
-
username: newUsername,
|
235
|
-
rights: user?.rights as { contract: string; action_name: string; }[]
|
236
|
-
})
|
237
|
-
|
238
|
-
loadStaff()
|
239
|
-
|
240
|
-
Notify.create({
|
241
|
-
message: 'Права сохранены',
|
242
|
-
type: 'positive',
|
243
|
-
})
|
244
|
-
|
245
|
-
} catch (e: any) {
|
246
|
-
|
247
|
-
Notify.create({
|
248
|
-
message: e.message,
|
249
|
-
type: 'negative',
|
250
|
-
})
|
251
|
-
|
252
|
-
}
|
253
|
-
}
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
const columns = [
|
259
|
-
{ name: 'username', align: 'left', label: 'Аккаунт', field: 'username', sortable: true },
|
260
|
-
{ name: 'position_title', align: 'left', label: 'Должность', field: 'position_title', sortable: true },
|
261
|
-
{ name: 'last_name', align: 'left', label: 'Фамилия', field: 'last_name', sortable: true },
|
262
|
-
{ name: 'first_name', align: 'left', label: 'Имя', field: 'first_name', sortable: true },
|
263
|
-
{ name: 'middle_name', align: 'left', label: 'Отчество', field: 'middle_name', sortable: true },
|
264
|
-
{ name: 'phone', align: 'left', label: 'Телефон', field: 'phone', sortable: false },
|
265
|
-
{ name: 'email', align: 'left', label: 'Е-почта', field: 'email', sortable: false },
|
266
|
-
{ name: 'birthday', align: 'left', label: 'Дата рождения', field: 'birthday', sortable: true },
|
267
|
-
] as any
|
268
|
-
|
269
|
-
|
270
|
-
const expanded = ref([])
|
271
|
-
const tableRef = ref(null)
|
272
|
-
const pagination = ref({ rowsPerPage: 10 })
|
273
|
-
|
274
|
-
</script>
|
@@ -1 +0,0 @@
|
|
1
|
-
export * as UserDesktopModel from './model'
|