Compare commits
2 Commits
9c2dd62c7e
...
7ca78280b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ca78280b3 | |||
| 2ff3636913 |
@ -18,11 +18,12 @@ const PropertyChanges = ({ type, value }) => {
|
||||
const val = obj[key]
|
||||
const newKey = prefix ? `${prefix}.${key}` : key
|
||||
|
||||
// Don't flatten keys that are "state" or "netGross"
|
||||
// Keep model references and special value objects intact
|
||||
if (
|
||||
val &&
|
||||
typeof val === 'object' &&
|
||||
!Array.isArray(val) &&
|
||||
!Object.prototype.hasOwnProperty.call(val, '_id') &&
|
||||
key !== 'state' &&
|
||||
key !== 'netGross'
|
||||
) {
|
||||
@ -41,6 +42,9 @@ const PropertyChanges = ({ type, value }) => {
|
||||
...flatOld,
|
||||
...flatNew
|
||||
}
|
||||
|
||||
console.log(combinedChanges)
|
||||
|
||||
return (
|
||||
<Descriptions size='small' column={1}>
|
||||
{Object.keys(combinedChanges).map((key) => {
|
||||
|
||||
@ -131,6 +131,14 @@ export const GCodeFile = {
|
||||
readOnly: true,
|
||||
columnWidth: 180
|
||||
},
|
||||
{
|
||||
name: 'updatedAt',
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
value: null,
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
@ -140,14 +148,6 @@ export const GCodeFile = {
|
||||
required: true,
|
||||
columnWidth: 200
|
||||
},
|
||||
{
|
||||
name: 'updatedAt',
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
value: null,
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
},
|
||||
{
|
||||
name: 'file',
|
||||
label: 'File',
|
||||
|
||||
@ -228,6 +228,13 @@ export const Printer = {
|
||||
showCopy: true,
|
||||
columnWidth: 140
|
||||
},
|
||||
{
|
||||
name: 'createdAt',
|
||||
label: 'Created At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
},
|
||||
{
|
||||
name: '_reference',
|
||||
label: 'Reference',
|
||||
@ -239,8 +246,8 @@ export const Printer = {
|
||||
columnWidth: 180
|
||||
},
|
||||
{
|
||||
name: 'createdAt',
|
||||
label: 'Created At',
|
||||
name: 'updatedAt',
|
||||
label: 'Updated At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
@ -253,13 +260,15 @@ export const Printer = {
|
||||
columnWidth: 200,
|
||||
columnFixed: 'left'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'updatedAt',
|
||||
label: 'Updated At',
|
||||
name: 'connectedAt',
|
||||
label: 'Connected At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
},
|
||||
|
||||
{
|
||||
name: 'state',
|
||||
label: 'Status',
|
||||
@ -269,13 +278,6 @@ export const Printer = {
|
||||
readOnly: true,
|
||||
columnWidth: 250
|
||||
},
|
||||
{
|
||||
name: 'connectedAt',
|
||||
label: 'Connected At',
|
||||
type: 'dateTime',
|
||||
readOnly: true,
|
||||
columnWidth: 175
|
||||
},
|
||||
{
|
||||
name: 'online',
|
||||
label: 'Online',
|
||||
|
||||
@ -31,7 +31,15 @@ export const SubJob = {
|
||||
}
|
||||
}
|
||||
],
|
||||
columns: ['_reference', 'printer', 'job', 'state', 'createdAt'],
|
||||
columns: [
|
||||
'_reference',
|
||||
'printer',
|
||||
'job',
|
||||
'state',
|
||||
'startedAt',
|
||||
'finishedAt',
|
||||
'createdAt'
|
||||
],
|
||||
filters: ['state', '_id', 'job', 'printer'],
|
||||
sorters: ['createdAt', 'state'],
|
||||
group: ['job'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user