app-ticket-overview

Information

Folder
src/components/apps/cloud/ticket-overview/app-ticket-overview

Files

Schema
// src/components/apps/cloud/ticket-overview/app-ticket-overview/schema.yaml

$schema: http://json-schema.org/draft-07/schema
$id: https://finstral.com/apps/cloud/ticket-overview/app-ticket-overview
$def:
  status_tag:
    $anchor: StatusTagSchema
    type: object
    required:
      - status
      - color
    additionalProperties: false
    properties:
      status:
        type: string
      color:
        type: string
  tickets:
    $anchor: TicketSchema
    type: array
    items:
      type: object
      required:
        - subject
        - id
        - name
        - service
        - status_tags
        - date
        - url
      additionalProperties: false
      properties:
        date:
          type: string
        id:
          type: string
        name:
          type: string
        service:
          type: string
        status_tags:
          type: array
          items:
            $ref: '#StatusTagSchema'
        subject:
          type: string
        url:
          type: string
          format: uri-reference
type: object
required:
  - is_employee
additionalProperties: false
properties:
  completed_tickets:
    $ref: '#TicketSchema'
  is_employee:
    type: boolean
  open_tickets:
    $ref: '#TicketSchema'
  org_name:
    type: string
Mocks
// src/components/apps/cloud/ticket-overview/app-ticket-overview/mocks.yaml

completed_tickets:
  - subject: Test von Factorial
    id: CompINC-142231
    name: Tiziana Sicurcasa
    service: Contacts
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Success
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Critical
    date: 26.03.2024
    url: /
  - subject: Richiesta disattivazione
    id: CompINC-142232
    name: Tiziana Sicurcasa
    service: Webmonitor
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Success
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Critical
    date: 26.03.2024
    url: /
is_employee: false
open_tickets:
  - subject: Test von Factorial has a very long subject title
    id: CompINC-142231
    name: Tiziana Sicurcasa
    service: Contacts
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Success
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Critical
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Activity
    date: 26.03.2024
    url: /
  - subject: Richiesta disattivazione
    id: CompINC-142232
    name: Tiziana Sicurcasa
    service: Webmonitor
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Success
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Activity
    date: 26.03.2024
    url: /
  - subject: Anfrage Deaktivierung
    id: CompINC-142233
    name: Tiziana Sicurcasa
    service: Cloud
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Success
        status: In Auto Abschluss
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Critical
        status: Abgelehnt
    date: 26.03.2024
    url: /
  - subject: Anfrage Änderung Cloud
    id: CompINC-142234
    name: Tiziana Sicurcasa
    service: Composer
    status_tags:
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Activity
        status: Wiedereröffnet
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Neutral
        status: 2nd Level
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Warning
      - $ref: /apps/cloud/ticket-overview/app-ticket-overview/status-tag#Critical
    date: 26.03.2024
    url: /
org_name: 2SRA SICURCASA SAS di
$variants:
  - $name: Employee
    is_employee: true
Template
// src/components/apps/cloud/ticket-overview/app-ticket-overview/app-ticket-overview.twig

{{ attach_library('finstral_global/apps-app-ticket-overview') }}

<article class="TicketOverview u-container">
	<h1 class="TicketOverview-title u-typo-HeadlineM">{{ "ticket_overview.title"|tc }}</h1>

	{% if is_employee %}
		<div class="TicketOverview-general">
			<p>{{ "ticket_overview.is_employee"|tc({"@portal": "https://servicedesk.finstral.com/"}) }}</p>
		</div>
	{% else %}
		<section class="TicketOverview-openTickets">
			{% include "@apps/cloud/ticket-overview/app-ticket-overview/ticket-status/ticket-status.twig" with {
				is_open: true,
				status: "open",
				title: "ticket_status.title.open"|tc,
				tickets: open_tickets,
				org_name: org_name,
			} only %}
		</section>

		<section class="TicketOverview-closedTickets">
			{% include "@apps/cloud/ticket-overview/app-ticket-overview/ticket-status/ticket-status.twig" with {
				is_open: false,
				status: "completed",
				title: "ticket_status.title.closed"|tc,
				tickets: completed_tickets,
			} only %}
		</section>
	{% endif %}
</article>

Variants

default
Open

ticket_overview.title

ticket_status.title.open

2SRA SICURCASA SAS di
ticket_status.section.title
ticket_table.label_subject ticket_table.label_id ticket_table.label_name ticket_table.label_service ticket_table.label_tags ticket_table.label_date
CompINC-142231
Tiziana Sicurcasa
Contacts
  • 1st Level
  • Abgeschlossen
  • Offen
26.03.2024
CompINC-142232
Tiziana Sicurcasa
Webmonitor
  • 1st Level
  • Abgeschlossen
  • Neue Kunden-Aktivität
26.03.2024
CompINC-142233
Tiziana Sicurcasa
Cloud
  • 1st Level
  • In Auto Abschluss
  • Abgelehnt
26.03.2024
CompINC-142234
Tiziana Sicurcasa
Composer
  • Wiedereröffnet
  • 2nd Level
  • Rückfrage
26.03.2024

ticket_status.title.closed

ticket_status.section.title
ticket_table.label_subject ticket_table.label_id ticket_table.label_name ticket_table.label_service ticket_table.label_tags ticket_table.label_date
CompINC-142231
Tiziana Sicurcasa
Contacts
  • 1st Level
  • Abgeschlossen
  • Offen
26.03.2024
CompINC-142232
Tiziana Sicurcasa
Webmonitor
  • 1st Level
  • Abgeschlossen
  • Offen
26.03.2024
Employee
Open

ticket_overview.title

ticket_overview.is_employee