Skip to content

[Enhancement] Analytics overview metrics edit functionality and minor text updates #766

Description

@JaanikaTalvistu

AS AN admin
I WANT to toggle which components are shown on the analytics Overview and apply my selection
SO THAT the Overview shows only the metrics and widgets that matter most to me

Under the analytics module, the Overview page the admin can choose which components are displayed. The existing card behaviour (like trend icon, percentage and previous-period comparison) must be preserved on every metric card. There will be a tooltip enhancement in the future but this will be a separate task (as the task description will explode due to the tooltip description text length).

Figma:
https://www.figma.com/design/JYnmhsKixyUSCSUXXfwTAA/B%C3%BCrokratt?node-id=12243-37612&t=4TZp2BeH2oA5WhwV-0

Acceptance criteria

  • When testing, check that the layout matches the Figma design. The wording will differ from Figma, follow the design in Figma but for titles and text follow the AC descriptions.
  • Date selection (Day/Week/Month + range) and the "Today" / "Täna" button works the same way and applies to all visible components.

Edit control & modal

  • An "Edit" / "Muuda" button is available at the top left.
  • Clicking it opens the "Edit overview" / "Muuda ülevaadet" modal.
  • The modal shows the helper text: "Lülita vajalikud komponendid sisse või välja, et näha konkreetseid mõõdikuid." / "Toggle the components on or off to see metric specific details."
  • The modal lists all Overview components as checkboxes (see component list below).
  • Checking a a box will show the corresponding metric on the overview page.
  • Unchecking will hide the metric from the overview page.
  • "Cancel" / "Tühista" closes the modal without applying any changes.
  • "Apply" / "Salvesta" applies the selection and closes the modal.
  • User preferences will be saved and remembered even after navigating in the back office.

Result on the Overview

  • After applying, only the selected components are shown and deselected components are removed from view.
  • Components fill the layout with no empty gaps (KPI cards resize to fill the row width).
  • The selected metrics persist across page reloads or sessions.
  • There are two sectors on how metrics are displayed:
    • The top of the page will show overall metric details
    • The bottom sector of the page will show Response quality, rating, themes and a list of actions

Preserved metric-card behaviour

  • Each visible metric card keeps:
    • Metric title
    • Current value in a larger size, based on the selected date range
    • Bottom row reflecting the previous period:
      • Starts with a trend icon (descending or ascending)
      • Percentage = ((current metric result - previous metric result) / previous metric result) x 100
      • A dot separator before the label
      • Label depends on date selection: Last day / Eelmine päev, Last week / Eelmine nädal, Last month / Eelmine kuu
      • Previous-period value shown at the end

Overview components (modal order)

  • Total number of chats / Vestluste koguarv — KPI card
  • Average waiting time / Keskmine ooteaeg — KPI card
  • Average feedback rating / Keskmine hinnang — KPI card
  • Bürokratt answered / Vastas Bürokratt — KPI card
  • CSA answered / Vastas nõustaja — KPI card
  • Redirected / Edasi suunatud — KPI card
  • Left without an answer / Lahkus vastuseta — KPI card
  • Total number of chats as a graph / Vestluste koguarv graafikuna — bar chart
  • Feedback / Tagasiside — feedback rating widget
  • Response quality / Vastuste kvaliteet — list
  • Most popular themes in period / Populaarsemad teemad perioodil — list
  • Top after-actions / Järeltegevuste top — list

Metric specifics:

Bar chart update:

  • The title needs to be in format changed into a format
    • EE version: "number vestlust perioodil startDate kuni endDate" (example: 270 vestlust perioodil 20.07 kuni 22.07)
    • Note! In EE version if the number of conversations is 1, then the text needs to be different: "1 vestlus perioodil _date-range". This is the only language difference from the general sentence.
    • ENG version: "number of chats per period startDate to endDate" (example: 270 of chats per period 20.07 to 22.07)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Stage tested

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions