Skip to content

Conversation

@testower
Copy link
Collaborator

@testower testower commented Jan 13, 2026

PR: Add Branding Column to Line Overview Screen

Summary

  • Adds a new "Branding" column to the Lines table that displays the branding name for each line
  • Applies to both Fixed Lines (/lines) and Flexible Lines (/flexible-lines) pages
  • Includes translations for all 5 supported languages (English, Norwegian, Swedish, Finnish, Bulgarian)

Closes #1996

Changes

GraphQL Queries

  • src/api/uttu/queries.ts: Added branding { id, name } to GET_LINES query for fixed lines
  • src/api/uttu/queries.ts: Added name field to existing branding selection in getFlexibleLinesQuery

LinesTable Component

  • src/components/LinesTable/index.tsx:
    • Added new header cell for "Branding" column (after Operator column)
    • Added data cell displaying line.branding?.name ?? '-' for each row
    • Fixed colSpan values in loading and empty states (changed from 3 to 6 to properly span all columns)

Translations

  • src/i18n/translations/en.ts: Added linesBrandingTableHeader: 'Branding'
  • src/i18n/translations/nb.ts: Added linesBrandingTableHeader: 'Merkevare'
  • src/i18n/translations/sv.ts: Added linesBrandingTableHeader: 'Varumärke'
  • src/i18n/translations/fi.ts: Added linesBrandingTableHeader: 'Brändi'
  • src/i18n/translations/bg.ts: Added linesBrandingTableHeader: 'Марка'

Test Plan

  • TypeScript compilation passes (npx tsc --noEmit)
  • Build passes (npm run build)
  • All tests pass (npm test)
  • Format check passes (npm run check)
  • Navigate to /lines (Fixed Lines page)
    • Branding column header displays between Operator and Delete columns
    • Lines with branding show the branding name
    • Lines without branding show -
  • Navigate to /flexible-lines (Flexible Lines page)
    • Same verification as above
  • Verify table layout is not broken (columns aligned properly)
  • Test language switching to verify translations work

Notes

  • The implementation fetches branding data directly in the GraphQL queries rather than using a lookup pattern, which is simpler and avoids additional API calls
  • This also fixes an existing minor issue where colSpan values in the loading/empty states didn't cover all columns

🤖 Generated with Claude Code

testower and others added 3 commits January 13, 2026 21:39
Include branding { id, name } in GET_LINES and getFlexibleLinesQuery
to support displaying branding information in the lines overview table.

Part of GitHub #1996 - Adding Branding column to Line overview screen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add brandingTableHeader translation variable for i18n support
- Add Branding column header between Operator and Delete columns
- Display branding name in data rows (shows '-' if no branding assigned)
- Update colSpan values from 3 to 6 for no-lines and loading states
  to properly span all 6 columns

Part of #1996: Add Branding column to Line overview screen

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add linesBrandingTableHeader translation key to all supported languages:
- English: 'Branding'
- Norwegian: 'Merkevare'
- Swedish: 'Varumärke'
- Finnish: 'Brändi'
- Bulgarian: 'Марка'

Part of #1996

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 855184d):

https://ent-enki-dev--pr2019-feature-branding-col-109iisqy.web.app

(expires Fri, 16 Jan 2026 21:08:09 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 50f71a028b1cba336bad43cc33ce2755ca3f1855

@JohanEntur
Copy link

The column is now present and it is updated accordingly when adding or removing Brandings from lines.

Copy link

@JohanEntur JohanEntur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it

@testower testower requested a review from solita-topip January 16, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Branding" as a new column on the Line overview screen.

3 participants