Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store showactivity, re-add search #1838

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions desk/src/components/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}"
>
{{ label }}
<slot name="right" />
</div>
</div>
</template>
Expand Down
16 changes: 9 additions & 7 deletions desk/src/components/desk/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}"
>
<UserMenu class="mb-2 ml-0.5" :options="profileSettings" />
<!-- <SidebarLink
<SidebarLink
label="Search"
class="mb-1"
:icon="LucideSearch"
Expand All @@ -20,7 +20,7 @@
<span>K</span>
</span>
</template>
</SidebarLink> -->
</SidebarLink>
<span class="mb-4">
<div
v-if="notificationStore.unread"
Expand Down Expand Up @@ -94,13 +94,15 @@ import LucideTicket from "~icons/lucide/ticket";
import LucideUser from "~icons/lucide/user";
import LucideUserCircle2 from "~icons/lucide/user-circle-2";
import LucideUsers from "~icons/lucide/users";
import LucideSearch from "~icons/lucide/search";

const route = useRoute();
const router = useRouter();
const authStore = useAuthStore();
const keymapStore = useKeymapStore();
const notificationStore = useNotificationStore();
const { isExpanded, width } = storeToRefs(useSidebarStore());
const device = useDevice();

const menuOptions = computed(() => [
{
Expand Down Expand Up @@ -161,9 +163,9 @@ const profileSettings = [
},
];

// function openCommandPalette() {
// window.dispatchEvent(
// new KeyboardEvent("keydown", { key: "k", metaKey: true })
// );
// }
function openCommandPalette() {
window.dispatchEvent(
new KeyboardEvent("keydown", { key: "k", metaKey: true })
);
}
</script>
16 changes: 14 additions & 2 deletions desk/src/pages/TicketAgent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
</template>

<script setup lang="ts">
import { computed, ref, h } from "vue";
import { computed, ref, h, watch } from "vue";
import { useStorage } from "@vueuse/core";
import {
Breadcrumbs,
Dropdown,
Expand Down Expand Up @@ -171,7 +172,11 @@ const props = defineProps({
},
});

const showFullActivity = ref(true);
let storage = useStorage("ticket_agent", {
showAllActivity: true,
});

const showFullActivity = ref(storage.value.showAllActivity);
const showAssignmentModal = ref(false);
const showSubjectDialog = ref(false);

Expand Down Expand Up @@ -213,6 +218,13 @@ const breadcrumbs = computed(() => {
return items;
});

watch(
() => showFullActivity.value,
(value) => {
storage.value.showAllActivity = value;
}
);

const dropdownOptions = computed(() =>
ticketStatusStore.options.map((o) => ({
label: o,
Expand Down