new(core.gbapp): Timestamp fields are now default.
This commit is contained in:
parent
d3a2d55a7d
commit
7becf2980d
1 changed files with 18 additions and 14 deletions
|
@ -171,22 +171,22 @@ export class SystemKeywords {
|
|||
if (date) {
|
||||
return array
|
||||
? array.sort((a, b) => {
|
||||
const c = new Date(a[memberName]);
|
||||
const d = new Date(b[memberName]);
|
||||
return c.getTime() - d.getTime();
|
||||
})
|
||||
const c = new Date(a[memberName]);
|
||||
const d = new Date(b[memberName]);
|
||||
return c.getTime() - d.getTime();
|
||||
})
|
||||
: null;
|
||||
} else {
|
||||
return array
|
||||
? array.sort((a, b) => {
|
||||
if (a[memberName] < b[memberName]) {
|
||||
return -1;
|
||||
}
|
||||
if (a[memberName] > b[memberName]) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
})
|
||||
if (a[memberName] < b[memberName]) {
|
||||
return -1;
|
||||
}
|
||||
if (a[memberName] > b[memberName]) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
})
|
||||
: array;
|
||||
}
|
||||
}
|
||||
|
@ -749,6 +749,10 @@ export class SystemKeywords {
|
|||
public async saveToStorageBatch({ pid, table, rows }): Promise<void> {
|
||||
const { min } = await DialogKeywords.getProcessInfo(pid);
|
||||
|
||||
if (typeof rows === 'object' && rows !== null) {
|
||||
rows = [rows];
|
||||
}
|
||||
|
||||
if (rows.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue