@solidstarters/solid-core-ui 0.1.26
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/dist/components/CustomFooter/CustomFooter.d.ts +2 -0
- package/dist/components/CustomFooter/CustomFooter.d.ts.map +1 -0
- package/dist/components/CustomFooter/FooterForm.d.ts +2 -0
- package/dist/components/CustomFooter/FooterForm.d.ts.map +1 -0
- package/dist/components/CustomHeader/CallIcon.d.ts +2 -0
- package/dist/components/CustomHeader/CallIcon.d.ts.map +1 -0
- package/dist/components/CustomHeader/CustomDropdown.d.ts +21 -0
- package/dist/components/CustomHeader/CustomDropdown.d.ts.map +1 -0
- package/dist/components/CustomHeader/CustomHeader.d.ts +2 -0
- package/dist/components/CustomHeader/CustomHeader.d.ts.map +1 -0
- package/dist/components/CustomHeader/EmailIcon.d.ts +2 -0
- package/dist/components/CustomHeader/EmailIcon.d.ts.map +1 -0
- package/dist/components/CustomHeader/HeaderCart.d.ts +2 -0
- package/dist/components/CustomHeader/HeaderCart.d.ts.map +1 -0
- package/dist/components/CustomHeader/productNavData.d.ts +3 -0
- package/dist/components/CustomHeader/productNavData.d.ts.map +1 -0
- package/dist/components/FormView/DetailsViews.d.ts +2 -0
- package/dist/components/FormView/DetailsViews.d.ts.map +1 -0
- package/dist/components/FormView/OrderAddressDetails.d.ts +2 -0
- package/dist/components/FormView/OrderAddressDetails.d.ts.map +1 -0
- package/dist/components/FormView/OrderPaymentDetails.d.ts +2 -0
- package/dist/components/FormView/OrderPaymentDetails.d.ts.map +1 -0
- package/dist/components/FormView/OrderTableDetails.d.ts +2 -0
- package/dist/components/FormView/OrderTableDetails.d.ts.map +1 -0
- package/dist/components/FormView/OrderedProductDetail.d.ts +2 -0
- package/dist/components/FormView/OrderedProductDetail.d.ts.map +1 -0
- package/dist/components/Tag/CustomTag.d.ts +8 -0
- package/dist/components/Tag/CustomTag.d.ts.map +1 -0
- package/dist/components/auth/Login.d.ts +3 -0
- package/dist/components/auth/Login.d.ts.map +1 -0
- package/dist/components/auth/Register.d.ts +3 -0
- package/dist/components/auth/Register.d.ts.map +1 -0
- package/dist/components/common/AuthBanner.d.ts +3 -0
- package/dist/components/common/AuthBanner.d.ts.map +1 -0
- package/dist/components/common/AutoCompleteField.d.ts +2 -0
- package/dist/components/common/AutoCompleteField.d.ts.map +1 -0
- package/dist/components/common/CancelButton.d.ts +3 -0
- package/dist/components/common/CancelButton.d.ts.map +1 -0
- package/dist/components/common/CodeEditor.d.ts +3 -0
- package/dist/components/common/CodeEditor.d.ts.map +1 -0
- package/dist/components/common/CreateButton.d.ts +2 -0
- package/dist/components/common/CreateButton.d.ts.map +1 -0
- package/dist/components/common/DropzonePlaceholder.d.ts +2 -0
- package/dist/components/common/DropzonePlaceholder.d.ts.map +1 -0
- package/dist/components/common/DropzoneUpload.d.ts +2 -0
- package/dist/components/common/DropzoneUpload.d.ts.map +1 -0
- package/dist/components/common/FilterComponent.d.ts +3 -0
- package/dist/components/common/FilterComponent.d.ts.map +1 -0
- package/dist/components/common/HeaderDynamicTitles.d.ts +2 -0
- package/dist/components/common/HeaderDynamicTitles.d.ts.map +1 -0
- package/dist/components/common/MarkdownViewer.d.ts +3 -0
- package/dist/components/common/MarkdownViewer.d.ts.map +1 -0
- package/dist/components/common/MultipleSelectAutoCompleteField.d.ts +2 -0
- package/dist/components/common/MultipleSelectAutoCompleteField.d.ts.map +1 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts +2 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +1 -0
- package/dist/components/common/SocialMediaLogin.d.ts +2 -0
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts +2 -0
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -0
- package/dist/components/core/common/SolidCreateButton.d.ts +2 -0
- package/dist/components/core/common/SolidCreateButton.d.ts.map +1 -0
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts +2 -0
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -0
- package/dist/components/core/common/SolidSearchBox.d.ts +2 -0
- package/dist/components/core/common/SolidSearchBox.d.ts.map +1 -0
- package/dist/components/core/field/FieldListViewData.d.ts +7 -0
- package/dist/components/core/field/FieldListViewData.d.ts.map +1 -0
- package/dist/components/core/form/SolidFormView.d.ts +14 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -0
- package/dist/components/core/form/fields/ISolidField.d.ts +63 -0
- package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidBooleanField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidDecimalField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidIntegerField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidJsonField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidLongTextField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidRelationField.d.ts +13 -0
- package/dist/components/core/form/fields/SolidRelationField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidRichTextField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidShortTextField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -0
- package/dist/components/core/form/fields/SolidTimeField.d.ts +11 -0
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +14 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +11 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +12 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -0
- package/dist/components/core/kanban/KanbanBoard.d.ts +3 -0
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -0
- package/dist/components/core/kanban/KanbanCard.d.ts +14 -0
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -0
- package/dist/components/core/kanban/KanbanColumn.d.ts +20 -0
- package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts +2 -0
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts +8 -0
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts +10 -0
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +2 -0
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +12 -0
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts +9 -0
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts.map +1 -0
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts +4 -0
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -0
- package/dist/components/core/list/SolidListView.d.ts +12 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -0
- package/dist/components/core/list/SolidListViewColumn.d.ts +8 -0
- package/dist/components/core/list/SolidListViewColumn.d.ts.map +1 -0
- package/dist/components/core/list/SolidListingHeader.d.ts +3 -0
- package/dist/components/core/list/SolidListingHeader.d.ts.map +1 -0
- package/dist/components/core/list/SolidManyToOneFilterElement.d.ts +2 -0
- package/dist/components/core/list/SolidManyToOneFilterElement.d.ts.map +1 -0
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.d.ts +2 -0
- package/dist/components/core/list/SolidSelectionDynamicFilterElement.d.ts.map +1 -0
- package/dist/components/core/list/SolidSelectionStaticFilterElement.d.ts +2 -0
- package/dist/components/core/list/SolidSelectionStaticFilterElement.d.ts.map +1 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts +12 -0
- package/dist/components/core/list/SolidVarInputsFilterElement.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidBigintColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidBigintColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidComputedColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidComputedColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidDateColumn.d.ts +9 -0
- package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidDecimalColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidDecimalColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidExternalIdColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidFloatColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidFloatColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidIdColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidIdColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidIntColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidIntColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidLongTextColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidLongTextColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidRelationColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidRichTextColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidRichTextColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidSelectionDynamicColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidTimeColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidTimeColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/SolidUuidColumn.d.ts +4 -0
- package/dist/components/core/list/columns/SolidUuidColumn.d.ts.map +1 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts +4 -0
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -0
- package/dist/components/core/model/CreateModel.d.ts +3 -0
- package/dist/components/core/model/CreateModel.d.ts.map +1 -0
- package/dist/components/core/model/FieldMetaData.d.ts +3 -0
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -0
- package/dist/components/core/model/FieldMetaDataForm.d.ts +3 -0
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -0
- package/dist/components/core/model/FieldSelector.d.ts +3 -0
- package/dist/components/core/model/FieldSelector.d.ts.map +1 -0
- package/dist/components/core/model/ModelListViewData.d.ts +8 -0
- package/dist/components/core/model/ModelListViewData.d.ts.map +1 -0
- package/dist/components/core/model/ModelMetaData.d.ts +4 -0
- package/dist/components/core/model/ModelMetaData.d.ts.map +1 -0
- package/dist/components/core/module/CreateModule.d.ts +3 -0
- package/dist/components/core/module/CreateModule.d.ts.map +1 -0
- package/dist/components/core/module/ModuleListViewData.d.ts +7 -0
- package/dist/components/core/module/ModuleListViewData.d.ts.map +1 -0
- package/dist/components/core/users/CreateUser.d.ts +3 -0
- package/dist/components/core/users/CreateUser.d.ts.map +1 -0
- package/dist/components/core/users/CreateUserRole.d.ts +3 -0
- package/dist/components/core/users/CreateUserRole.d.ts.map +1 -0
- package/dist/components/core/users/UserListView.d.ts +2 -0
- package/dist/components/core/users/UserListView.d.ts.map +1 -0
- package/dist/components/layout/AdminSidebar.d.ts +3 -0
- package/dist/components/layout/AdminSidebar.d.ts.map +1 -0
- package/dist/components/layout/ButtonLoader.d.ts +3 -0
- package/dist/components/layout/ButtonLoader.d.ts.map +1 -0
- package/dist/components/layout/CustomPagination.d.ts +7 -0
- package/dist/components/layout/CustomPagination.d.ts.map +1 -0
- package/dist/components/layout/DashboardHeader.d.ts +3 -0
- package/dist/components/layout/DashboardHeader.d.ts.map +1 -0
- package/dist/components/layout/FilterMenu.d.ts +3 -0
- package/dist/components/layout/FilterMenu.d.ts.map +1 -0
- package/dist/components/layout/Footer.d.ts +3 -0
- package/dist/components/layout/Footer.d.ts.map +1 -0
- package/dist/components/layout/GlobalSearch.d.ts +2 -0
- package/dist/components/layout/GlobalSearch.d.ts.map +1 -0
- package/dist/components/layout/Header.d.ts +3 -0
- package/dist/components/layout/Header.d.ts.map +1 -0
- package/dist/components/layout/ListingHeader.d.ts +3 -0
- package/dist/components/layout/ListingHeader.d.ts.map +1 -0
- package/dist/components/layout/Loader.d.ts +3 -0
- package/dist/components/layout/Loader.d.ts.map +1 -0
- package/dist/components/layout/UserSidebar.d.ts +3 -0
- package/dist/components/layout/UserSidebar.d.ts.map +1 -0
- package/dist/components/layout/navbar-one.d.ts +3 -0
- package/dist/components/layout/navbar-one.d.ts.map +1 -0
- package/dist/components/layout/navbar-two-menu.d.ts +3 -0
- package/dist/components/layout/navbar-two-menu.d.ts.map +1 -0
- package/dist/components/layout/navbar-two.d.ts +3 -0
- package/dist/components/layout/navbar-two.d.ts.map +1 -0
- package/dist/components/layout/user-profile-menu.d.ts +3 -0
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -0
- package/dist/components/layout/user-profile.d.ts +3 -0
- package/dist/components/layout/user-profile.d.ts.map +1 -0
- package/dist/components/modelsComponents/filterIcon.d.ts +2 -0
- package/dist/components/modelsComponents/filterIcon.d.ts.map +1 -0
- package/dist/components/tables/DemoData.d.ts +23 -0
- package/dist/components/tables/DemoData.d.ts.map +1 -0
- package/dist/components/tables/DynamicTable.d.ts +6 -0
- package/dist/components/tables/DynamicTable.d.ts.map +1 -0
- package/dist/components/tables/ListViewTable.d.ts +12 -0
- package/dist/components/tables/ListViewTable.d.ts.map +1 -0
- package/dist/helpers/ToastContainer.d.ts +4 -0
- package/dist/helpers/ToastContainer.d.ts.map +1 -0
- package/dist/helpers/authHeader.d.ts +7 -0
- package/dist/helpers/authHeader.d.ts.map +1 -0
- package/dist/helpers/countries.d.ts +6 -0
- package/dist/helpers/countries.d.ts.map +1 -0
- package/dist/helpers/helpers.d.ts +10 -0
- package/dist/helpers/helpers.d.ts.map +1 -0
- package/dist/helpers/menu.d.ts +35 -0
- package/dist/helpers/menu.d.ts.map +1 -0
- package/dist/helpers/permissions.d.ts +4 -0
- package/dist/helpers/permissions.d.ts.map +1 -0
- package/dist/helpers/revalidate.d.ts +2 -0
- package/dist/helpers/revalidate.d.ts.map +1 -0
- package/dist/index.d.ts +182 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45552 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/api/articleApi.d.ts +19 -0
- package/dist/redux/api/articleApi.d.ts.map +1 -0
- package/dist/redux/api/authApi.d.ts +9 -0
- package/dist/redux/api/authApi.d.ts.map +1 -0
- package/dist/redux/api/automationApi.d.ts +19 -0
- package/dist/redux/api/automationApi.d.ts.map +1 -0
- package/dist/redux/api/categoryApi.d.ts +10 -0
- package/dist/redux/api/categoryApi.d.ts.map +1 -0
- package/dist/redux/api/cityApi.d.ts +36 -0
- package/dist/redux/api/cityApi.d.ts.map +1 -0
- package/dist/redux/api/cmsBannerImageApi.d.ts +19 -0
- package/dist/redux/api/cmsBannerImageApi.d.ts.map +1 -0
- package/dist/redux/api/countryApi.d.ts +39 -0
- package/dist/redux/api/countryApi.d.ts.map +1 -0
- package/dist/redux/api/fetchBaseQuery.d.ts +2 -0
- package/dist/redux/api/fetchBaseQuery.d.ts.map +1 -0
- package/dist/redux/api/fieldApi.d.ts +20 -0
- package/dist/redux/api/fieldApi.d.ts.map +1 -0
- package/dist/redux/api/mediaApi.d.ts +19 -0
- package/dist/redux/api/mediaApi.d.ts.map +1 -0
- package/dist/redux/api/mediaStorageProviderApi.d.ts +19 -0
- package/dist/redux/api/mediaStorageProviderApi.d.ts.map +1 -0
- package/dist/redux/api/menuApi.d.ts +19 -0
- package/dist/redux/api/menuApi.d.ts.map +1 -0
- package/dist/redux/api/menuItemsApi.d.ts +19 -0
- package/dist/redux/api/menuItemsApi.d.ts.map +1 -0
- package/dist/redux/api/modelApi.d.ts +20 -0
- package/dist/redux/api/modelApi.d.ts.map +1 -0
- package/dist/redux/api/moduleApi.d.ts +22 -0
- package/dist/redux/api/moduleApi.d.ts.map +1 -0
- package/dist/redux/api/orderAttributeApi.d.ts +8 -0
- package/dist/redux/api/orderAttributeApi.d.ts.map +1 -0
- package/dist/redux/api/permissionApi.d.ts +15 -0
- package/dist/redux/api/permissionApi.d.ts.map +1 -0
- package/dist/redux/api/pincodeApi.d.ts +36 -0
- package/dist/redux/api/pincodeApi.d.ts.map +1 -0
- package/dist/redux/api/productData.d.ts +51 -0
- package/dist/redux/api/productData.d.ts.map +1 -0
- package/dist/redux/api/radixExtraModelAttributeApi.d.ts +8 -0
- package/dist/redux/api/radixExtraModelAttributeApi.d.ts.map +1 -0
- package/dist/redux/api/radixModelMetadataApi.d.ts +20 -0
- package/dist/redux/api/radixModelMetadataApi.d.ts.map +1 -0
- package/dist/redux/api/radixModelsApi.d.ts +13 -0
- package/dist/redux/api/radixModelsApi.d.ts.map +1 -0
- package/dist/redux/api/ratingApi.d.ts +19 -0
- package/dist/redux/api/ratingApi.d.ts.map +1 -0
- package/dist/redux/api/reviewApi.d.ts +19 -0
- package/dist/redux/api/reviewApi.d.ts.map +1 -0
- package/dist/redux/api/roleApi.d.ts +10 -0
- package/dist/redux/api/roleApi.d.ts.map +1 -0
- package/dist/redux/api/solidActionApi.d.ts +19 -0
- package/dist/redux/api/solidActionApi.d.ts.map +1 -0
- package/dist/redux/api/solidEntityApi.d.ts +18 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -0
- package/dist/redux/api/solidMenuApi.d.ts +20 -0
- package/dist/redux/api/solidMenuApi.d.ts.map +1 -0
- package/dist/redux/api/solidViewApi.d.ts +20 -0
- package/dist/redux/api/solidViewApi.d.ts.map +1 -0
- package/dist/redux/api/stateApi.d.ts +36 -0
- package/dist/redux/api/stateApi.d.ts.map +1 -0
- package/dist/redux/api/tagApi.d.ts +19 -0
- package/dist/redux/api/tagApi.d.ts.map +1 -0
- package/dist/redux/api/tagGroupApi.d.ts +19 -0
- package/dist/redux/api/tagGroupApi.d.ts.map +1 -0
- package/dist/redux/api/userApi.d.ts +17 -0
- package/dist/redux/api/userApi.d.ts.map +1 -0
- package/dist/redux/features/authSlice.d.ts +6 -0
- package/dist/redux/features/authSlice.d.ts.map +1 -0
- package/dist/redux/features/dataViewSlice.d.ts +7 -0
- package/dist/redux/features/dataViewSlice.d.ts.map +1 -0
- package/dist/redux/features/navbarSlice.d.ts +6 -0
- package/dist/redux/features/navbarSlice.d.ts.map +1 -0
- package/dist/redux/features/popupSlice.d.ts +7 -0
- package/dist/redux/features/popupSlice.d.ts.map +1 -0
- package/dist/redux/features/themeSlice.d.ts +6 -0
- package/dist/redux/features/themeSlice.d.ts.map +1 -0
- package/dist/redux/features/userSlice.d.ts +13 -0
- package/dist/redux/features/userSlice.d.ts.map +1 -0
- package/dist/redux/hooks.d.ts +2 -0
- package/dist/redux/hooks.d.ts.map +1 -0
- package/dist/redux/store.d.ts +375 -0
- package/dist/redux/store.d.ts.map +1 -0
- package/package.json +114 -0
- package/rollup.config.mjs +45 -0
- package/solidstarters-solid-core-ui-0.1.24.tgz +0 -0
- package/src/components/CustomFooter/CustomFooter.tsx +263 -0
- package/src/components/CustomFooter/FooterForm.tsx +18 -0
- package/src/components/CustomHeader/CallIcon.tsx +19 -0
- package/src/components/CustomHeader/CustomDropdown.tsx +175 -0
- package/src/components/CustomHeader/CustomHeader.tsx +64 -0
- package/src/components/CustomHeader/EmailIcon.tsx +11 -0
- package/src/components/CustomHeader/HeaderCart.tsx +14 -0
- package/src/components/CustomHeader/productNavData.tsx +179 -0
- package/src/components/FormView/DetailsViews.tsx +46 -0
- package/src/components/FormView/OrderAddressDetails.tsx +69 -0
- package/src/components/FormView/OrderPaymentDetails.tsx +17 -0
- package/src/components/FormView/OrderTableDetails.tsx +35 -0
- package/src/components/FormView/OrderedProductDetail.tsx +21 -0
- package/src/components/Tag/CustomTag.tsx +49 -0
- package/src/components/auth/Login.tsx +155 -0
- package/src/components/auth/Register.tsx +239 -0
- package/src/components/common/AuthBanner.tsx +40 -0
- package/src/components/common/AutoCompleteField.tsx +74 -0
- package/src/components/common/CancelButton.tsx +42 -0
- package/src/components/common/CodeEditor.tsx +24 -0
- package/src/components/common/CreateButton.tsx +16 -0
- package/src/components/common/DropzonePlaceholder.tsx +9 -0
- package/src/components/common/DropzoneUpload.tsx +9 -0
- package/src/components/common/FilterComponent.tsx +427 -0
- package/src/components/common/HeaderDynamicTitles.tsx +11 -0
- package/src/components/common/MarkdownViewer.tsx +14 -0
- package/src/components/common/MultipleSelectAutoCompleteField.tsx +61 -0
- package/src/components/common/SingleSelectAutoCompleteField.tsx +64 -0
- package/src/components/common/SocialMediaLogin.tsx +44 -0
- package/src/components/core/common/SolidConfigureLayoutElement.tsx +24 -0
- package/src/components/core/common/SolidCreateButton.tsx +19 -0
- package/src/components/core/common/SolidGlobalSearchElement.tsx +37 -0
- package/src/components/core/common/SolidSearchBox.tsx +17 -0
- package/src/components/core/field/FieldListViewData.tsx +312 -0
- package/src/components/core/form/SolidFormView.tsx +821 -0
- package/src/components/core/form/fields/ISolidField.tsx +64 -0
- package/src/components/core/form/fields/SolidBooleanField.tsx +112 -0
- package/src/components/core/form/fields/SolidDateField.tsx +89 -0
- package/src/components/core/form/fields/SolidDateTimeField.tsx +87 -0
- package/src/components/core/form/fields/SolidDecimalField.tsx +85 -0
- package/src/components/core/form/fields/SolidIntegerField.tsx +85 -0
- package/src/components/core/form/fields/SolidJsonField.tsx +79 -0
- package/src/components/core/form/fields/SolidLongTextField.tsx +99 -0
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +246 -0
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +227 -0
- package/src/components/core/form/fields/SolidRelationField.tsx +53 -0
- package/src/components/core/form/fields/SolidRichTextField.tsx +97 -0
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +122 -0
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +117 -0
- package/src/components/core/form/fields/SolidShortTextField.tsx +99 -0
- package/src/components/core/form/fields/SolidTimeField.tsx +87 -0
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +435 -0
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +137 -0
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +184 -0
- package/src/components/core/kanban/KanbanBoard.tsx +116 -0
- package/src/components/core/kanban/KanbanCard.tsx +159 -0
- package/src/components/core/kanban/KanbanColumn.tsx +124 -0
- package/src/components/core/kanban/SolidKanbanFilter.tsx +104 -0
- package/src/components/core/kanban/SolidKanbanView.tsx +660 -0
- package/src/components/core/kanban/SolidKanbanViewSearchColumn.tsx +131 -0
- package/src/components/core/kanban/SolidManyToOneFilterElement.tsx +56 -0
- package/src/components/core/kanban/SolidSelectionDynamicFilterElement.tsx +49 -0
- package/src/components/core/kanban/SolidSelectionStaticFilterElement.tsx +31 -0
- package/src/components/core/kanban/SolidVarInputsFilterElement.tsx +183 -0
- package/src/components/core/kanban/columns/SolidBigintColumn.tsx +8 -0
- package/src/components/core/kanban/columns/SolidBooleanColumn.tsx +49 -0
- package/src/components/core/kanban/columns/SolidComputedColumn.tsx +22 -0
- package/src/components/core/kanban/columns/SolidDateColumn.tsx +58 -0
- package/src/components/core/kanban/columns/SolidDatetimeColumn.tsx +45 -0
- package/src/components/core/kanban/columns/SolidDecimalColumn.tsx +8 -0
- package/src/components/core/kanban/columns/SolidExternalIdColumn.tsx +46 -0
- package/src/components/core/kanban/columns/SolidFloatColumn.tsx +8 -0
- package/src/components/core/kanban/columns/SolidIdColumn.tsx +46 -0
- package/src/components/core/kanban/columns/SolidIntColumn.tsx +56 -0
- package/src/components/core/kanban/columns/SolidLongTextColumn.tsx +8 -0
- package/src/components/core/kanban/columns/SolidMediaMultipleColumn.tsx +54 -0
- package/src/components/core/kanban/columns/SolidMediaSingleColumn.tsx +56 -0
- package/src/components/core/kanban/columns/SolidRelationColumn.tsx +12 -0
- package/src/components/core/kanban/columns/SolidRichTextColumn.tsx +8 -0
- package/src/components/core/kanban/columns/SolidSelectionDynamicColumn.tsx +46 -0
- package/src/components/core/kanban/columns/SolidSelectionStaticColumn.tsx +47 -0
- package/src/components/core/kanban/columns/SolidShortTextColumn.tsx +53 -0
- package/src/components/core/kanban/columns/SolidTimeColumn.tsx +42 -0
- package/src/components/core/kanban/columns/SolidUuidColumn.tsx +44 -0
- package/src/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.tsx +79 -0
- package/src/components/core/list/SolidListView.tsx +569 -0
- package/src/components/core/list/SolidListViewColumn.tsx +161 -0
- package/src/components/core/list/SolidListingHeader.tsx +41 -0
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +56 -0
- package/src/components/core/list/SolidSelectionDynamicFilterElement.tsx +49 -0
- package/src/components/core/list/SolidSelectionStaticFilterElement.tsx +31 -0
- package/src/components/core/list/SolidVarInputsFilterElement.tsx +183 -0
- package/src/components/core/list/columns/SolidBigintColumn.tsx +8 -0
- package/src/components/core/list/columns/SolidBooleanColumn.tsx +60 -0
- package/src/components/core/list/columns/SolidComputedColumn.tsx +22 -0
- package/src/components/core/list/columns/SolidDateColumn.tsx +63 -0
- package/src/components/core/list/columns/SolidDatetimeColumn.tsx +51 -0
- package/src/components/core/list/columns/SolidDecimalColumn.tsx +8 -0
- package/src/components/core/list/columns/SolidExternalIdColumn.tsx +51 -0
- package/src/components/core/list/columns/SolidFloatColumn.tsx +8 -0
- package/src/components/core/list/columns/SolidIdColumn.tsx +52 -0
- package/src/components/core/list/columns/SolidIntColumn.tsx +60 -0
- package/src/components/core/list/columns/SolidLongTextColumn.tsx +8 -0
- package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +29 -0
- package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +29 -0
- package/src/components/core/list/columns/SolidRelationColumn.tsx +12 -0
- package/src/components/core/list/columns/SolidRichTextColumn.tsx +8 -0
- package/src/components/core/list/columns/SolidSelectionDynamicColumn.tsx +52 -0
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +53 -0
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +60 -0
- package/src/components/core/list/columns/SolidTimeColumn.tsx +51 -0
- package/src/components/core/list/columns/SolidUuidColumn.tsx +51 -0
- package/src/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +70 -0
- package/src/components/core/model/CreateModel.tsx +340 -0
- package/src/components/core/model/FieldMetaData.tsx +148 -0
- package/src/components/core/model/FieldMetaDataForm.tsx +2877 -0
- package/src/components/core/model/FieldSelector.tsx +67 -0
- package/src/components/core/model/ModelListViewData.tsx +383 -0
- package/src/components/core/model/ModelMetaData.tsx +777 -0
- package/src/components/core/module/CreateModule.tsx +577 -0
- package/src/components/core/module/ModuleListViewData.tsx +429 -0
- package/src/components/core/users/CreateUser.tsx +415 -0
- package/src/components/core/users/CreateUserRole.tsx +209 -0
- package/src/components/core/users/UserListView.tsx +374 -0
- package/src/components/layout/AdminSidebar.tsx +65 -0
- package/src/components/layout/ButtonLoader.tsx +7 -0
- package/src/components/layout/CustomPagination.tsx +55 -0
- package/src/components/layout/DashboardHeader.tsx +88 -0
- package/src/components/layout/FilterMenu.tsx +122 -0
- package/src/components/layout/Footer.tsx +12 -0
- package/src/components/layout/GlobalSearch.tsx +36 -0
- package/src/components/layout/Header.tsx +8 -0
- package/src/components/layout/ListingHeader.tsx +203 -0
- package/src/components/layout/Loader.tsx +15 -0
- package/src/components/layout/UserSidebar.tsx +53 -0
- package/src/components/layout/navbar-one.tsx +258 -0
- package/src/components/layout/navbar-two-menu.tsx +64 -0
- package/src/components/layout/navbar-two.tsx +36 -0
- package/src/components/layout/user-profile-menu.tsx +214 -0
- package/src/components/layout/user-profile.tsx +6 -0
- package/src/components/modelsComponents/filterIcon.tsx +9 -0
- package/src/components/tables/DemoData.tsx +317 -0
- package/src/components/tables/DynamicTable.tsx +56 -0
- package/src/components/tables/ListViewTable.tsx +155 -0
- package/src/helpers/ToastContainer.tsx +92 -0
- package/src/helpers/authHeader.ts +19 -0
- package/src/helpers/countries.tsx +259 -0
- package/src/helpers/helpers.ts +39 -0
- package/src/helpers/menu.tsx +670 -0
- package/src/helpers/permissions.ts +15 -0
- package/src/helpers/revalidate.ts +6 -0
- package/src/index.ts +630 -0
- package/src/redux/api/articleApi.ts +55 -0
- package/src/redux/api/authApi.ts +60 -0
- package/src/redux/api/automationApi.ts +55 -0
- package/src/redux/api/categoryApi.tsx +46 -0
- package/src/redux/api/cityApi.tsx +56 -0
- package/src/redux/api/cmsBannerImageApi.tsx +55 -0
- package/src/redux/api/countryApi.tsx +56 -0
- package/src/redux/api/fetchBaseQuery.tsx +15 -0
- package/src/redux/api/fieldApi.ts +78 -0
- package/src/redux/api/mediaApi.ts +55 -0
- package/src/redux/api/mediaStorageProviderApi.ts +55 -0
- package/src/redux/api/menuApi.tsx +55 -0
- package/src/redux/api/menuItemsApi.tsx +56 -0
- package/src/redux/api/modelApi.ts +70 -0
- package/src/redux/api/moduleApi.ts +72 -0
- package/src/redux/api/orderAttributeApi.tsx +37 -0
- package/src/redux/api/permissionApi.ts +32 -0
- package/src/redux/api/pincodeApi.tsx +56 -0
- package/src/redux/api/productData.tsx +87 -0
- package/src/redux/api/radixExtraModelAttributeApi.tsx +37 -0
- package/src/redux/api/radixModelMetadataApi.tsx +62 -0
- package/src/redux/api/radixModelsApi.tsx +64 -0
- package/src/redux/api/ratingApi.ts +55 -0
- package/src/redux/api/reviewApi.ts +55 -0
- package/src/redux/api/roleApi.ts +58 -0
- package/src/redux/api/solidActionApi.ts +66 -0
- package/src/redux/api/solidEntityApi.tsx +86 -0
- package/src/redux/api/solidMenuApi.ts +71 -0
- package/src/redux/api/solidViewApi.ts +72 -0
- package/src/redux/api/stateApi.tsx +56 -0
- package/src/redux/api/tagApi.ts +55 -0
- package/src/redux/api/tagGroupApi.tsx +55 -0
- package/src/redux/api/userApi.ts +120 -0
- package/src/redux/features/authSlice.ts +19 -0
- package/src/redux/features/dataViewSlice.ts +26 -0
- package/src/redux/features/navbarSlice.ts +21 -0
- package/src/redux/features/popupSlice.ts +27 -0
- package/src/redux/features/themeSlice.ts +17 -0
- package/src/redux/features/userSlice.ts +28 -0
- package/src/types/index.d.ts +7 -0
- package/src/types/next.d.ts +46 -0
- package/tsconfig.json +37 -0
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { InputText } from "primereact/inputtext";
|
|
3
|
+
import { useFormik } from "formik";
|
|
4
|
+
import { classNames } from "primereact/utils";
|
|
5
|
+
import { Button } from "primereact/button";
|
|
6
|
+
import { useGetrolesQuery } from "@/redux/api/roleApi";
|
|
7
|
+
import { CancelButton } from "@/components/common/CancelButton";
|
|
8
|
+
import * as Yup from "yup";
|
|
9
|
+
import { usePathname, useRouter } from "next/navigation";
|
|
10
|
+
import { useRegisterPrivateMutation, useUpdateUserMutation } from "@/redux/api/authApi";
|
|
11
|
+
import { Panel } from "primereact/panel";
|
|
12
|
+
import { Checkbox } from "primereact/checkbox";
|
|
13
|
+
import { Password } from "primereact/password";
|
|
14
|
+
import { Message } from "primereact/message";
|
|
15
|
+
import { Toast } from "primereact/toast";
|
|
16
|
+
import { FetchBaseQueryError } from "@reduxjs/toolkit/dist/query";
|
|
17
|
+
import { useDeleteUserMutation } from "@/redux/api/userApi";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
interface ErrorResponseData {
|
|
21
|
+
message: string;
|
|
22
|
+
statusCode: number;
|
|
23
|
+
error: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const CreateUser = ({ data,params }: any) => {
|
|
27
|
+
|
|
28
|
+
const toast = useRef<Toast>(null);
|
|
29
|
+
const pathname = usePathname();
|
|
30
|
+
const router = useRouter();
|
|
31
|
+
const [selectedRoles, setSelectedRoles] = useState<string[]>([]);
|
|
32
|
+
|
|
33
|
+
const [registerPrivate, { isLoading, error: userCreateError, isSuccess, data: user }] = useRegisterPrivateMutation();
|
|
34
|
+
const [
|
|
35
|
+
updateUser,
|
|
36
|
+
{
|
|
37
|
+
isLoading: isuserUpdating,
|
|
38
|
+
isSuccess: isUpdateuserSuceess,
|
|
39
|
+
isError: isuserUpdateError,
|
|
40
|
+
error: userUpdateError,
|
|
41
|
+
data: updateduser,
|
|
42
|
+
},
|
|
43
|
+
] = useUpdateUserMutation();
|
|
44
|
+
|
|
45
|
+
console.log("isUpdateuserSuceess", isUpdateuserSuceess);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
const [deleteUser, {
|
|
49
|
+
isLoading: isUserDeleted,
|
|
50
|
+
isSuccess: isDeleteUserSuceess,
|
|
51
|
+
isError: isUserDeleteError,
|
|
52
|
+
error: UserDeleteError,
|
|
53
|
+
data: DeletedUser,
|
|
54
|
+
},] = useDeleteUserMutation();
|
|
55
|
+
|
|
56
|
+
const { data: rolesData } = useGetrolesQuery("");
|
|
57
|
+
// const [
|
|
58
|
+
// createrolebulk,
|
|
59
|
+
// { isLoading, isSuccess, isError, error, data: roles },
|
|
60
|
+
// ] = useCreateuserrolebulkMutation();
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (data && data.roles) {
|
|
64
|
+
const userRoles = data.roles.map((role: any) => role.name);
|
|
65
|
+
setSelectedRoles(userRoles);
|
|
66
|
+
}
|
|
67
|
+
}, [data]);
|
|
68
|
+
|
|
69
|
+
const handleCheckboxChange = (roleName: string) => {
|
|
70
|
+
if (selectedRoles.includes(roleName)) {
|
|
71
|
+
setSelectedRoles(selectedRoles.filter((name) => name !== roleName));
|
|
72
|
+
} else {
|
|
73
|
+
setSelectedRoles([...selectedRoles, roleName]);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const initialValues = {
|
|
78
|
+
fullName: data ? data.fullName : "",
|
|
79
|
+
username: data ? data.username : "",
|
|
80
|
+
email: data ? data.email : "",
|
|
81
|
+
mobile: data ? data.mobile : "",
|
|
82
|
+
password: "",
|
|
83
|
+
passwordConfirm: "",
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const validationSchema = Yup.object({
|
|
87
|
+
fullName: Yup.string().required(),
|
|
88
|
+
username: Yup.string()
|
|
89
|
+
.required('Username is required.') // Must be provided
|
|
90
|
+
.min(3, 'Username must be at least 3 characters long.') // Minimum length
|
|
91
|
+
.max(20, 'Username cannot be longer than 20 characters.') // Maximum length
|
|
92
|
+
.matches(
|
|
93
|
+
/^[a-zA-Z0-9_.-]*$/,
|
|
94
|
+
'Username can only contain letters, numbers, underscores, periods, and hyphens.'
|
|
95
|
+
) // Allowed characters
|
|
96
|
+
.matches(
|
|
97
|
+
/^[a-zA-Z]/,
|
|
98
|
+
'Username must start with a letter.'
|
|
99
|
+
),
|
|
100
|
+
email: Yup
|
|
101
|
+
.string()
|
|
102
|
+
.email("Invalid email address")
|
|
103
|
+
.required("Email is required."),
|
|
104
|
+
password: Yup.string(),
|
|
105
|
+
mobile: Yup.number().required("Mobile is required."),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
const isFormFieldValid = (formik: any, fieldName: string) => {
|
|
110
|
+
return formik.touched[fieldName] && formik.errors[fieldName];
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
const showError = async (submit?: boolean) => {
|
|
115
|
+
const errors = await formik.validateForm();
|
|
116
|
+
const errorMessages = Object.values(errors);
|
|
117
|
+
|
|
118
|
+
if (errorMessages.length > 0 && toast.current) {
|
|
119
|
+
toast.current.show({
|
|
120
|
+
severity: "error",
|
|
121
|
+
summary: "Can you send me the report?",
|
|
122
|
+
// sticky: true,
|
|
123
|
+
life: 3000,
|
|
124
|
+
//@ts-ignore
|
|
125
|
+
content: (props) => (
|
|
126
|
+
<div
|
|
127
|
+
className="flex flex-column align-items-left"
|
|
128
|
+
style={{ flex: "1" }}
|
|
129
|
+
>
|
|
130
|
+
{errorMessages.map((m: any, index: number) => (
|
|
131
|
+
<div className="flex align-items-center gap-2" key={index}>
|
|
132
|
+
<span className="font-bold text-900">{m}</span>
|
|
133
|
+
</div>
|
|
134
|
+
))}
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function isFetchBaseQueryErrorWithErrorResponse(error: any): error is FetchBaseQueryError & { data: ErrorResponseData } {
|
|
142
|
+
return error && typeof error === 'object' && 'data' in error && 'message' in error.data;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
const handleError = (errorToast: any) => {
|
|
147
|
+
let errorMessage: any = ['An error occurred'];
|
|
148
|
+
|
|
149
|
+
if (isFetchBaseQueryErrorWithErrorResponse(errorToast)) {
|
|
150
|
+
errorMessage = errorToast.data.message;
|
|
151
|
+
} else {
|
|
152
|
+
errorMessage = ['Something went wrong'];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
toast.current?.show({
|
|
156
|
+
severity: 'error',
|
|
157
|
+
summary: 'Error',
|
|
158
|
+
detail: errorMessage,
|
|
159
|
+
life: 3000,
|
|
160
|
+
//@ts-ignore
|
|
161
|
+
content: (props) => (
|
|
162
|
+
<div className="flex flex-column align-items-left" style={{ flex: "1" }}>
|
|
163
|
+
{Array.isArray(errorMessage) ? (
|
|
164
|
+
errorMessage.map((message, index) => (
|
|
165
|
+
<div className="flex align-items-center gap-2" key={index}>
|
|
166
|
+
<span className="font-bold text-900">{message.trim()}</span>
|
|
167
|
+
</div>
|
|
168
|
+
))
|
|
169
|
+
) : (
|
|
170
|
+
<div className="flex align-items-center gap-2">
|
|
171
|
+
<span className="font-bold text-900">{errorMessage?.trim()}</span>
|
|
172
|
+
</div>
|
|
173
|
+
)}
|
|
174
|
+
</div>
|
|
175
|
+
),
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Check and handle errors from each API operation
|
|
180
|
+
if (userCreateError) {
|
|
181
|
+
handleError(userCreateError)
|
|
182
|
+
}
|
|
183
|
+
if (userUpdateError) {
|
|
184
|
+
handleError(userUpdateError)
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
}, [
|
|
188
|
+
userCreateError, userUpdateError
|
|
189
|
+
]);
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
const formik = useFormik({
|
|
193
|
+
initialValues,
|
|
194
|
+
validationSchema,
|
|
195
|
+
enableReinitialize: true,
|
|
196
|
+
onSubmit: async (values) => {
|
|
197
|
+
if (data) {
|
|
198
|
+
const userData: any = {
|
|
199
|
+
fullName: values.fullName,
|
|
200
|
+
username: values.username,
|
|
201
|
+
email: values.email,
|
|
202
|
+
mobile: values.mobile,
|
|
203
|
+
roles: selectedRoles,
|
|
204
|
+
};
|
|
205
|
+
if (values.password) {
|
|
206
|
+
userData.password = values.password;
|
|
207
|
+
userData.passwordConfirm = values.password;
|
|
208
|
+
}
|
|
209
|
+
updateUser({ id: data.id, data: userData });
|
|
210
|
+
|
|
211
|
+
} else {
|
|
212
|
+
const userData = {
|
|
213
|
+
fullName: values.fullName,
|
|
214
|
+
username: values.username,
|
|
215
|
+
email: values.email,
|
|
216
|
+
mobile: values.mobile,
|
|
217
|
+
password: values.password,
|
|
218
|
+
roles: selectedRoles,
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
registerPrivate(userData)
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
useEffect(() => {
|
|
227
|
+
if (isSuccess == true || isDeleteUserSuceess === true || isUpdateuserSuceess === true) {
|
|
228
|
+
router.back();
|
|
229
|
+
}
|
|
230
|
+
}, [isSuccess, isDeleteUserSuceess, isUpdateuserSuceess])
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<div className="p-grid p-fluid">
|
|
234
|
+
<Toast ref={toast} />
|
|
235
|
+
|
|
236
|
+
<form onSubmit={formik.handleSubmit}>
|
|
237
|
+
{params.id === "new" ? (
|
|
238
|
+
<div className="flex gap-3 justify-content-between mb-5">
|
|
239
|
+
<div className="form-wrapper-title">Create User</div>
|
|
240
|
+
<div className="gap-3 flex">
|
|
241
|
+
<Button label="Save" size="small" type="submit" className="small-button" />
|
|
242
|
+
<CancelButton />
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
) : (
|
|
246
|
+
<div className="flex gap-3 justify-content-between mb-5">
|
|
247
|
+
<h1 className="m-0">Update User</h1>
|
|
248
|
+
<div className="gap-3 flex">
|
|
249
|
+
<Button label="Save" size="small" type="submit" className="small-button" />
|
|
250
|
+
{data &&
|
|
251
|
+
<Button outlined label="Delete" size="small" severity="danger" type="button" onClick={() => deleteUser(data.id)} className="small-button" />
|
|
252
|
+
}
|
|
253
|
+
<CancelButton />
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
)}
|
|
257
|
+
<div className="form-wrapper">
|
|
258
|
+
<div className="grid formgrid">
|
|
259
|
+
<div className="md:col-6 sm:col-12">
|
|
260
|
+
<div className="field">
|
|
261
|
+
<label htmlFor="fullName" className="form-label form-field-label">
|
|
262
|
+
Full Name
|
|
263
|
+
</label>
|
|
264
|
+
<InputText
|
|
265
|
+
type="text"
|
|
266
|
+
id="fullName"
|
|
267
|
+
name="fullName"
|
|
268
|
+
autoComplete={"off"}
|
|
269
|
+
onChange={formik.handleChange}
|
|
270
|
+
value={formik.values.fullName}
|
|
271
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
272
|
+
"p-invalid": formik.touched.fullName && formik.errors.fullName,
|
|
273
|
+
})}
|
|
274
|
+
/>
|
|
275
|
+
{isFormFieldValid(formik, "fullName") && (
|
|
276
|
+
<Message
|
|
277
|
+
severity="error"
|
|
278
|
+
text={formik?.errors?.fullName?.toString()}
|
|
279
|
+
/>
|
|
280
|
+
)}
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
<div className="md:col-6 sm:col-12">
|
|
284
|
+
<div className="field">
|
|
285
|
+
<label htmlFor="username" className="form-label form-field-label">
|
|
286
|
+
Username
|
|
287
|
+
</label>
|
|
288
|
+
<InputText
|
|
289
|
+
type="text"
|
|
290
|
+
id="username"
|
|
291
|
+
name="username"
|
|
292
|
+
autoComplete={"off"}
|
|
293
|
+
disabled={data ? true : false}
|
|
294
|
+
onChange={formik.handleChange}
|
|
295
|
+
value={formik.values.username}
|
|
296
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
297
|
+
"p-invalid": formik.touched.username && formik.errors.username,
|
|
298
|
+
})}
|
|
299
|
+
/>
|
|
300
|
+
{isFormFieldValid(formik, "username") && (
|
|
301
|
+
<Message
|
|
302
|
+
severity="error"
|
|
303
|
+
text={formik?.errors?.username?.toString()}
|
|
304
|
+
/>
|
|
305
|
+
)}
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
<div className="md:col-6 sm:col-12">
|
|
309
|
+
<div className="field">
|
|
310
|
+
<label htmlFor="email" className="form-label form-field-label">
|
|
311
|
+
Email
|
|
312
|
+
</label>
|
|
313
|
+
<InputText
|
|
314
|
+
type="text"
|
|
315
|
+
id="email"
|
|
316
|
+
name="email"
|
|
317
|
+
autoComplete={"off"}
|
|
318
|
+
disabled={data ? true : false}
|
|
319
|
+
onChange={formik.handleChange}
|
|
320
|
+
value={formik.values.email}
|
|
321
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
322
|
+
"p-invalid": formik.touched.email && formik.errors.email,
|
|
323
|
+
})}
|
|
324
|
+
/>
|
|
325
|
+
{isFormFieldValid(formik, "email") && (
|
|
326
|
+
<Message
|
|
327
|
+
severity="error"
|
|
328
|
+
text={formik?.errors?.email?.toString()}
|
|
329
|
+
/>
|
|
330
|
+
)}
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
<div className="md:col-6 sm:col-12">
|
|
334
|
+
<div className="field">
|
|
335
|
+
<label htmlFor="mobile" className="form-label form-field-label">
|
|
336
|
+
Mobile
|
|
337
|
+
</label>
|
|
338
|
+
<InputText
|
|
339
|
+
type="text"
|
|
340
|
+
id="mobile"
|
|
341
|
+
name="mobile"
|
|
342
|
+
autoComplete={"off"}
|
|
343
|
+
onChange={formik.handleChange}
|
|
344
|
+
value={formik.values.mobile}
|
|
345
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
346
|
+
"p-invalid": formik.touched.mobile && formik.errors.mobile,
|
|
347
|
+
})}
|
|
348
|
+
/>
|
|
349
|
+
{isFormFieldValid(formik, "mobile ") && (
|
|
350
|
+
<Message
|
|
351
|
+
severity="error"
|
|
352
|
+
text={formik?.errors?.mobile?.toString()}
|
|
353
|
+
/>
|
|
354
|
+
)}
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
|
+
<div className="md:col-6 sm:col-12">
|
|
358
|
+
<div className="field">
|
|
359
|
+
<label htmlFor="Password" className="form-label form-field-label">
|
|
360
|
+
Password
|
|
361
|
+
</label>
|
|
362
|
+
<Password
|
|
363
|
+
id="password"
|
|
364
|
+
autoComplete="off"
|
|
365
|
+
aria-autocomplete="none"
|
|
366
|
+
value={formik.values.password}
|
|
367
|
+
onChange={(e) => {
|
|
368
|
+
formik.setFieldValue("password", e.target.value);
|
|
369
|
+
}}
|
|
370
|
+
toggleMask
|
|
371
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
372
|
+
"p-invalid": isFormFieldValid(formik, "name"),
|
|
373
|
+
})}
|
|
374
|
+
|
|
375
|
+
inputClassName="w-full"
|
|
376
|
+
feedback={false}
|
|
377
|
+
/>
|
|
378
|
+
{isFormFieldValid(formik, "password") && (
|
|
379
|
+
<Message
|
|
380
|
+
severity="error"
|
|
381
|
+
text={formik?.errors?.password?.toString()}
|
|
382
|
+
/>
|
|
383
|
+
)}
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<div className="form-wrapper">
|
|
391
|
+
<div className="p-col-12 p-md-6">
|
|
392
|
+
<h2>Roles</h2>
|
|
393
|
+
<Panel toggleable header="Roles" style={{ marginBottom: "30px" }}>
|
|
394
|
+
<div style={{ display: "grid", gridTemplateColumns: "auto auto" }}>
|
|
395
|
+
{rolesData?.data?.records && rolesData?.data?.records.map((role: any) => (
|
|
396
|
+
<div key={role.name} className="p-field-checkbox md:col-6 sm:col-12">
|
|
397
|
+
<Checkbox
|
|
398
|
+
inputId={role.name}
|
|
399
|
+
checked={selectedRoles.includes(role.name)}
|
|
400
|
+
onChange={() => handleCheckboxChange(role.name)}
|
|
401
|
+
disabled={data ? true : false}
|
|
402
|
+
/>
|
|
403
|
+
<label htmlFor={role.name}> {role.name}</label>
|
|
404
|
+
</div>
|
|
405
|
+
))}
|
|
406
|
+
</div>
|
|
407
|
+
</Panel>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
</form>
|
|
411
|
+
</div>
|
|
412
|
+
);
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
export default CreateUser;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { AutoCompleteField } from "@/components/common/AutoCompleteField";
|
|
2
|
+
import { CancelButton } from "@/components/common/CancelButton";
|
|
3
|
+
import { useLazyGetrolesQuery } from "@/redux/api/roleApi";
|
|
4
|
+
import { useCreateuserroleMutation } from "@/redux/api/userApi";
|
|
5
|
+
import { useFormik } from "formik";
|
|
6
|
+
import { usePathname, useRouter } from "next/navigation";
|
|
7
|
+
import { Button } from "primereact/button";
|
|
8
|
+
import { InputText } from "primereact/inputtext";
|
|
9
|
+
import { Message } from "primereact/message";
|
|
10
|
+
import { Toast } from "primereact/toast";
|
|
11
|
+
import { classNames } from "primereact/utils";
|
|
12
|
+
import qs from "qs";
|
|
13
|
+
import { useEffect, useRef } from "react";
|
|
14
|
+
import * as Yup from "yup";
|
|
15
|
+
|
|
16
|
+
const CreateUserRole = ({ data }: any) => {
|
|
17
|
+
const toast = useRef<Toast>(null);
|
|
18
|
+
|
|
19
|
+
const [triggerGetRoles, { data: roleLazy, isFetching: isRoleLazyFetching, error: roleLazyError }] = useLazyGetrolesQuery();
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
|
|
22
|
+
const [
|
|
23
|
+
createMenuItem,
|
|
24
|
+
{ isLoading, isSuccess, isError, error, data: newInvoice },
|
|
25
|
+
] = useCreateuserroleMutation();
|
|
26
|
+
|
|
27
|
+
const initialValues = {
|
|
28
|
+
username: data ? data.username : "",
|
|
29
|
+
roleName: data ? data.roleName : ""
|
|
30
|
+
};
|
|
31
|
+
const validationSchema = Yup.object({
|
|
32
|
+
username: Yup.string().required("Username is required."),
|
|
33
|
+
roleName: Yup.lazy((value) => {
|
|
34
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
35
|
+
return Yup.object().required("Role Name is required.");
|
|
36
|
+
} else if (typeof value === 'string') {
|
|
37
|
+
return Yup.string().required("Role Name is required.");
|
|
38
|
+
} else {
|
|
39
|
+
return Yup.mixed().required("Role Name is required.");
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const isFormFieldValid = (formik: any, fieldName: string) =>
|
|
45
|
+
formik.touched[fieldName] && formik.errors[fieldName];
|
|
46
|
+
|
|
47
|
+
const pathname = usePathname();
|
|
48
|
+
|
|
49
|
+
const formik = useFormik({
|
|
50
|
+
initialValues,
|
|
51
|
+
validationSchema,
|
|
52
|
+
enableReinitialize: true,
|
|
53
|
+
onSubmit: async (values) => {
|
|
54
|
+
try {
|
|
55
|
+
let obj = {
|
|
56
|
+
username: values.username,
|
|
57
|
+
roleName: values.roleName.label
|
|
58
|
+
}
|
|
59
|
+
createMenuItem(obj);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
console.error("Failed to create Invoice:", err);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const showError = async () => {
|
|
67
|
+
const errors = await formik.validateForm();
|
|
68
|
+
const errorMessages = Object.values(errors);
|
|
69
|
+
|
|
70
|
+
if (errorMessages.length > 0) {
|
|
71
|
+
toast?.current?.show({
|
|
72
|
+
severity: "success",
|
|
73
|
+
summary: "Can you send me the report?",
|
|
74
|
+
// sticky: true,
|
|
75
|
+
life: 3000,
|
|
76
|
+
//@ts-ignore
|
|
77
|
+
content: (props) => (
|
|
78
|
+
<div
|
|
79
|
+
className="flex flex-column align-items-left"
|
|
80
|
+
style={{ flex: "1" }}
|
|
81
|
+
>
|
|
82
|
+
{errorMessages.map((m, index) => (
|
|
83
|
+
<div className="flex align-items-center gap-2" key={index}>
|
|
84
|
+
<span className="font-bold text-900">{String(m)}</span>
|
|
85
|
+
</div>
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
88
|
+
),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const searchRole = async (event: any) => {
|
|
94
|
+
const query = event.query;
|
|
95
|
+
let queryData = {};
|
|
96
|
+
if (query) {
|
|
97
|
+
queryData = {
|
|
98
|
+
roleName: query
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const queryString = qs.stringify(queryData, {
|
|
103
|
+
encodeValuesOnly: true
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Trigger the API call manually
|
|
107
|
+
const result = await triggerGetRoles(queryString).unwrap();
|
|
108
|
+
|
|
109
|
+
// Map the API response to AutoComplete format
|
|
110
|
+
if (result && result.data) {
|
|
111
|
+
const filteredMenu = result.data.map((m: any) => ({ label: m.name, value: m.id }));
|
|
112
|
+
|
|
113
|
+
// Update the suggestions in state
|
|
114
|
+
return filteredMenu
|
|
115
|
+
} else {
|
|
116
|
+
// Handle the case where no data is returned
|
|
117
|
+
return []
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (isSuccess == true) {
|
|
123
|
+
router.push(`/admin/iam/users/all`);
|
|
124
|
+
}
|
|
125
|
+
}, [isSuccess])
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<div className="grid">
|
|
129
|
+
<div className="col-12 xl:col-10 mx-auto">
|
|
130
|
+
<div>
|
|
131
|
+
{/* <Toast ref={toast} /> */}
|
|
132
|
+
|
|
133
|
+
<form onSubmit={formik.handleSubmit}>
|
|
134
|
+
{pathname.includes('create') ? <div className="flex gap-3 justify-content-between mb-5">
|
|
135
|
+
<div className="form-wrapper-title"> Create User Role</div>
|
|
136
|
+
<div className="gap-3 flex">
|
|
137
|
+
<div>
|
|
138
|
+
<Button label="Save" size="small" onClick={() => showError()} type="submit" className='small-button'/>
|
|
139
|
+
</div>
|
|
140
|
+
<CancelButton />
|
|
141
|
+
</div>
|
|
142
|
+
</div> :
|
|
143
|
+
<div className="flex gap-3 justify-content-between mb-5">
|
|
144
|
+
<h1 className="m-0"> Edit User</h1>
|
|
145
|
+
<div className="gap-3 flex">
|
|
146
|
+
<div>
|
|
147
|
+
<Button label="Save" onClick={() => showError()} type="submit" size="small" className='small-button'/>
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
{/* <Button label="Delete" severity="danger" type="button" /> */}
|
|
151
|
+
</div>
|
|
152
|
+
<CancelButton />
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
}
|
|
156
|
+
<div className="form-wrapper">
|
|
157
|
+
<div className="grid formgrid">
|
|
158
|
+
<div className="md:col-6 sm:col-12">
|
|
159
|
+
<div className="field">
|
|
160
|
+
<label htmlFor="username" className="form-label form-field-label">
|
|
161
|
+
User Name
|
|
162
|
+
</label>
|
|
163
|
+
<InputText
|
|
164
|
+
type="text"
|
|
165
|
+
id="username"
|
|
166
|
+
name="username"
|
|
167
|
+
onChange={formik.handleChange}
|
|
168
|
+
value={formik.values.username}
|
|
169
|
+
className={classNames("p-inputtext-sm w-full small-input", {
|
|
170
|
+
"p-invalid": isFormFieldValid(formik, "username"),
|
|
171
|
+
})}
|
|
172
|
+
/>
|
|
173
|
+
{isFormFieldValid(formik, "username") && (
|
|
174
|
+
<Message severity="error" text={formik.errors.username?.toString()} />
|
|
175
|
+
)}
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div className="md:col-6 sm:col-12">
|
|
179
|
+
<div className="field">
|
|
180
|
+
<label htmlFor="type" className="form-label form-field-label">
|
|
181
|
+
Role Name
|
|
182
|
+
</label>
|
|
183
|
+
<div>
|
|
184
|
+
<AutoCompleteField
|
|
185
|
+
multiple={false}
|
|
186
|
+
isFormFieldValid={isFormFieldValid}
|
|
187
|
+
formik={formik}
|
|
188
|
+
fieldName="roleName"
|
|
189
|
+
searchData={searchRole}
|
|
190
|
+
existingData={{ label: data?.parentCategory?.title, value: data?.parentCategory?.id }}
|
|
191
|
+
existingDataTitle={data?.parentCategory?.title}
|
|
192
|
+
existingDataId={data?.parentCategory?.id}
|
|
193
|
+
></AutoCompleteField>
|
|
194
|
+
{isFormFieldValid(formik, "roleName") && (
|
|
195
|
+
<Message severity="error" text={formik?.errors?.roleName?.toString()} />
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</form>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export default CreateUserRole;
|