mirror of
https://github.com/inventree/InvenTree.git
synced 2026-06-12 03:28:37 +00:00
[bug] Various fixes (#12057)
* [bug] Various fixes - Add get_api_url to EmailThread model - Prevent setting creation during import - Tweak BarcodeScanHistoryTable * Tweak barcode history table tests * Bump API version
This commit is contained in:
@@ -258,23 +258,28 @@ export default function BarcodeScanHistoryTable() {
|
||||
icon={<IconExclamationCircle />}
|
||||
title={t`Logging Disabled`}
|
||||
>
|
||||
<Text>{t`Barcode logging is not enabled`}</Text>
|
||||
<Text>
|
||||
{t`Barcode logging is not enabled.`}{' '}
|
||||
{t`No barcode scan history will be recorded.`}
|
||||
</Text>
|
||||
</Alert>
|
||||
)}
|
||||
<InvenTreeTable
|
||||
url={apiUrl(ApiEndpoints.barcode_history)}
|
||||
tableState={table}
|
||||
columns={tableColumns}
|
||||
props={{
|
||||
tableFilters: filters,
|
||||
enableBulkDelete: canDelete,
|
||||
rowActions: rowActions,
|
||||
onRowClick: (row) => {
|
||||
setSelectedResult(row);
|
||||
open();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
{globalSettings.isSet('BARCODE_STORE_RESULTS') && (
|
||||
<InvenTreeTable
|
||||
url={apiUrl(ApiEndpoints.barcode_history)}
|
||||
tableState={table}
|
||||
columns={tableColumns}
|
||||
props={{
|
||||
tableFilters: filters,
|
||||
enableBulkDelete: canDelete,
|
||||
rowActions: rowActions,
|
||||
onRowClick: (row) => {
|
||||
setSelectedResult(row);
|
||||
open();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -385,10 +385,20 @@ test('Settings - Admin - Barcode History', async ({ browser }) => {
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
// Barcode history is displayed in table
|
||||
barcodes.forEach(async (barcode) => {
|
||||
const checkBarcode = async (barcode: string) => {
|
||||
await page.getByRole('textbox', { name: 'table-search-input' }).clear();
|
||||
await page
|
||||
.getByRole('textbox', { name: 'table-search-input' })
|
||||
.fill(barcode);
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.getByText(barcode).first().waitFor();
|
||||
});
|
||||
};
|
||||
|
||||
for (const barcode of barcodes) {
|
||||
await checkBarcode(barcode);
|
||||
}
|
||||
|
||||
await page.waitForTimeout(2500);
|
||||
});
|
||||
|
||||
test('Settings - Admin - Parameter', async ({ browser }) => {
|
||||
|
||||
Reference in New Issue
Block a user