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