From ecd8b265bc8d820dde07824ec48253e4cc5af8a0 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Fri, 8 Nov 2024 01:27:51 +0530 Subject: [PATCH] feat: Contact sort --- .../Contacts/ContactHeader/ContactActions.vue | 51 +++++++ .../ContactHeader/ContactSortMenu.vue | 128 ++++++++++++++++++ .../Contacts/ContactsLayout.vue | 38 +++--- .../dashboard/components-next/input/Input.vue | 24 +++- .../selectmenu/SelectMenu.story.vue | 46 +++++++ .../components-next/selectmenu/SelectMenu.vue | 69 ++++++++++ .../dashboard/i18n/locale/en/contact.json | 22 +++ .../contact/pages/ContactsPageRouteView.vue | 68 ++++++++-- app/javascript/histoire.setup.ts | 2 + 9 files changed, 419 insertions(+), 29 deletions(-) create mode 100644 app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactActions.vue create mode 100644 app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactSortMenu.vue create mode 100644 app/javascript/dashboard/components-next/selectmenu/SelectMenu.story.vue create mode 100644 app/javascript/dashboard/components-next/selectmenu/SelectMenu.vue diff --git a/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactActions.vue b/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactActions.vue new file mode 100644 index 000000000..b79f4783e --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactActions.vue @@ -0,0 +1,51 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactSortMenu.vue b/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactSortMenu.vue new file mode 100644 index 000000000..45d1bee0b --- /dev/null +++ b/app/javascript/dashboard/components-next/Contacts/ContactHeader/ContactSortMenu.vue @@ -0,0 +1,128 @@ + + + diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsLayout.vue b/app/javascript/dashboard/components-next/Contacts/ContactsLayout.vue index 2c4eca902..568eab6d7 100644 --- a/app/javascript/dashboard/components-next/Contacts/ContactsLayout.vue +++ b/app/javascript/dashboard/components-next/Contacts/ContactsLayout.vue @@ -2,11 +2,11 @@ import { computed, useSlots } from 'vue'; import { useI18n } from 'vue-i18n'; -import Button from 'dashboard/components-next/button/Button.vue'; import Input from 'dashboard/components-next/input/Input.vue'; import Icon from 'dashboard/components-next/icon/Icon.vue'; import PaginationFooter from 'dashboard/components-next/pagination/PaginationFooter.vue'; import Breadcrumb from 'dashboard/components-next/breadcrumb/Breadcrumb.vue'; +import ContactActions from 'dashboard/components-next/Contacts/ContactHeader/ContactActions.vue'; const props = defineProps({ headerTitle: { @@ -41,6 +41,14 @@ const props = defineProps({ type: Object, default: () => ({}), }, + activeSort: { + type: String, + default: '', + }, + activeOrdering: { + type: String, + default: '', + }, }); const emit = defineEmits([ @@ -50,6 +58,7 @@ const emit = defineEmits([ 'update:currentPage', 'goToContactsList', 'search', + 'sort', ]); const { t } = useI18n(); @@ -116,7 +125,9 @@ const updateCurrentPage = page => {
-