Display user fix (#12869)

* Add 'created-by' badge to order pages

* Update playwright tests

* fix icons
This commit is contained in:
Oliver
2026-09-18 07:39:18 +10:00
committed by GitHub
parent 960c5f18e4
commit e37045ac41
6 changed files with 48 additions and 0 deletions
@@ -165,6 +165,14 @@ export function PurchaseOrderDetailsPanel({
label: t`Responsible`,
badge: 'owner',
hidden: !instance?.responsible
},
{
type: 'text',
name: 'created_by.pk',
label: t`Created By`,
icon: 'user',
badge: 'user',
hidden: !instance?.created_by
}
];
@@ -177,6 +177,14 @@ export function ReturnOrderDetailsPanel({
label: t`Responsible`,
badge: 'owner',
hidden: !instance?.responsible
},
{
type: 'text',
name: 'created_by.pk',
label: t`Created By`,
icon: 'user',
badge: 'user',
hidden: !instance?.created_by
}
];
@@ -179,6 +179,14 @@ export function SalesOrderDetailsPanel({
label: t`Responsible`,
badge: 'owner',
hidden: !instance?.responsible
},
{
type: 'text',
name: 'created_by.pk',
label: t`Created By`,
icon: 'user',
badge: 'user',
hidden: !instance?.created_by
}
];
@@ -259,6 +259,11 @@ test('Purchase Orders - Table', async ({ browser }) => {
// Expected values
await page.getByText('2025-06-12').waitFor(); // Start Date
await page.getByText('2025-07-17').waitFor(); // Target Date
// Creator of the order should be displayed
await expect(page.getByRole('row', { name: 'Created By' })).toContainText(
'steven'
);
});
test('Purchase Orders - Calendar', async ({ browser }) => {
@@ -1,3 +1,4 @@
import { expect } from '@playwright/test';
import { test } from '../baseFixtures';
import { loadTab } from '../helpers';
import { doCachedLogin } from '../login';
@@ -8,6 +9,12 @@ test('Return Orders - Receive Items', async ({ browser }) => {
});
await page.getByRole('cell', { name: 'RMA-0002' }).click();
// Creator of the order should be displayed
await expect(page.getByRole('row', { name: 'Created By' })).toContainText(
'admin'
);
await loadTab(page, 'Parameters');
await loadTab(page, 'Attachments');
await loadTab(page, 'Line Items');
@@ -68,6 +68,12 @@ test('Sales Orders - Tabs', async ({ browser }) => {
.getByLabel('Order Details')
.getByText('Selling some stuff')
.waitFor();
// Creator of the order should be displayed
await expect(page.getByRole('row', { name: 'Created By' })).toContainText(
'admin'
);
await loadTab(page, 'Line Items');
await loadTab(page, 'Shipments');
await loadTab(page, 'Build Orders');
@@ -82,6 +88,12 @@ test('Sales Orders - Tabs', async ({ browser }) => {
await loadTab(page, 'Return Orders');
await page.getByRole('cell', { name: 'RMA-' }).click();
await page.getByText('RMA-0001', { exact: true }).waitFor();
// Creator of the order should be displayed
await expect(page.getByRole('row', { name: 'Created By' })).toContainText(
'admin'
);
await loadTab(page, 'Line Items');
await loadTab(page, 'Attachments');
await loadTab(page, 'Notes');