2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Dayjs updates (#9388)

* Update Scan.tsx

* Tweak Scan.tsx
This commit is contained in:
Oliver 2025-03-26 14:27:55 +11:00 committed by GitHub
parent a1b34f5591
commit 59f22a1627
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,7 @@ import {
import { useCallback, useEffect, useMemo, useState } from 'react';
import { hideNotification, showNotification } from '@mantine/notifications';
import dayjs from 'dayjs';
import { api } from '../../App';
import { BarcodeInput } from '../../components/barcodes/BarcodeInput';
import type { BarcodeScanItem } from '../../components/barcodes/BarcodeScanItem';
@ -103,7 +104,7 @@ export default function Scan() {
id: randomId(),
barcode: barcode,
data: data,
timestamp: new Date(),
timestamp: dayjs().toDate(),
source: 'scan',
model: model_type as ModelType,
pk: data[model_type]?.pk
@ -117,7 +118,7 @@ export default function Scan() {
id: randomId(),
barcode: barcode,
data: data,
timestamp: new Date(),
timestamp: dayjs().toDate(),
source: 'scan'
});
}