Skip to content

Commit

Permalink
Feature - Desktop view: Implement ticket overviews (iteration 1)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Scharf <[email protected]>
Co-authored-by: Dominik Klein <[email protected]>
Co-authored-by: Dusan Vuckovic <[email protected]>
Co-authored-by: Florian Liebe <[email protected]>
Co-authored-by: Martin Gruner <[email protected]>
  • Loading branch information
5 people committed Jan 24, 2025
1 parent b5c2fc9 commit d741a73
Show file tree
Hide file tree
Showing 194 changed files with 6,175 additions and 1,684 deletions.
7 changes: 4 additions & 3 deletions app/channels/graphql_channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ def execute(data)

# context must be kept in sync with GraphqlController!
context = {
sid: sid,
current_user: current_user,
sid: sid,
current_user: current_user,
current_user_id: current_user&.id,
# :channel is required for ActionCableSubscriptions and MUST NOT be used otherwise.
channel: self,
channel: self,
}

result = UserInfo.with_user_id(current_user&.id) do
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/graphql_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ def single_query
def context
# context must be kept in sync with GraphqlChannel!
{
sid: session.id,
current_user: current_user,
sid: session.id,
current_user: current_user,
current_user_id: current_user&.id,
# :controller is used by login/logout mutations and MUST NOT be used otherwise.
controller: self,
controller: self,
}
end

Expand Down
2 changes: 2 additions & 0 deletions app/frontend/apps/desktop/AppDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useSessionStore } from '#shared/stores/session.ts'
import emitter from '#shared/utils/emitter.ts'

import { initializeConfirmationDialog } from '#desktop/components/CommonConfirmationDialog/initializeConfirmationDialog.ts'
import { useTicketOverviewsStore } from '#desktop/entities/ticket/stores/ticketOverviews.ts'
import { useUserCurrentTaskbarTabsStore } from '#desktop/entities/user/current/stores/taskbarTabs.ts'

const router = useRouter()
Expand Down Expand Up @@ -71,6 +72,7 @@ watch(
(newValue, oldValue) => {
if (!newValue || oldValue) return

useTicketOverviewsStore()
useUserCurrentTaskbarTabsStore()
initializeDefaultObjectAttributes()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ const sizeClasses = computed(() => {
}}
</h1>

<CommonBadge
v-if="item.count !== undefined"
class="font-bold leading-snug ltr:ml-1.5 rtl:mr-1.5"
size="xs"
rounded
>
{{ item.count }}
</CommonBadge>

<CommonIcon
v-if="idx !== items.length - 1"
:name="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export interface BreadcrumbItem {
noOptionLabelTranslation?: boolean
route?: string
icon?: string
count?: number
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import openExternalLink from '#shared/utils/openExternalLink.ts'

import CommonFlyout from '#desktop/components/CommonFlyout/CommonFlyout.vue'
import CommonLoader from '#desktop/components/CommonLoader/CommonLoader.vue'
import CommonSimpleTable from '#desktop/components/CommonSimpleTable/CommonSimpleTable.vue'
import type { TableHeader } from '#desktop/components/CommonSimpleTable/types.ts'
import CommonSimpleTable from '#desktop/components/CommonTable/CommonSimpleTable.vue'
import type { TableSimpleHeader } from '#desktop/components/CommonTable/types'
import { useCalendarIcsFileEventsQuery } from '#desktop/entities/calendar/ics-file/graphql/queries/events.api.ts'

interface Props {
Expand All @@ -32,7 +32,7 @@ const calendarEventsQuery = new QueryHandler(
const calendarEventsQueryResult = calendarEventsQuery.result()
const calendarEventsQueryLoading = calendarEventsQuery.loading()

const tableHeaders: TableHeader[] = [
const tableHeaders: TableSimpleHeader[] = [
{
key: 'summary',
label: __('Event Summary'),
Expand Down Expand Up @@ -95,6 +95,7 @@ const downloadCalendar = () => {
>
<CommonLoader :loading="calendarEventsQueryLoading">
<CommonSimpleTable
:caption="__('Preview Calendar')"
class="mb-4 w-full"
:headers="tableHeaders"
:items="tableItems"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ defineProps<Props>()
{{ $t(label) }}
</CommonLabel>

<CommonLabel size="medium" class="text-gray-100 dark:text-neutral-400">
<CommonLabel
tag="div"
size="medium"
class="text-gray-100 dark:text-neutral-400"
>
<slot>{{ body }}</slot>
</CommonLabel>
</div>
Expand Down

This file was deleted.

Loading

0 comments on commit d741a73

Please sign in to comment.