Skip to content

Commit a87df8d

Browse files
fixed move to v2
1 parent edfa3f8 commit a87df8d

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

database.types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,29 +534,35 @@ export type Database = {
534534
Row: {
535535
adder: number
536536
created_at: string
537+
formatting: string | null
537538
icon: string | null
538539
id: number
539540
multiplier: number
540541
name: string
541542
notation: string
543+
public_name: string | null
542544
}
543545
Insert: {
544546
adder?: number
545547
created_at?: string
548+
formatting?: string | null
546549
icon?: string | null
547550
id?: number
548551
multiplier?: number
549552
name: string
550553
notation?: string
554+
public_name?: string | null
551555
}
552556
Update: {
553557
adder?: number
554558
created_at?: string
559+
formatting?: string | null
555560
icon?: string | null
556561
id?: number
557562
multiplier?: number
558563
name?: string
559564
notation?: string
565+
public_name?: string | null
560566
}
561567
Relationships: []
562568
}

src/data/data.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class DataService {
8989
throw new NotFoundException('Device type not found');
9090
}
9191
const deviceTypeData = await this.deviceTypeService.findById(deviceType);
92-
if (!deviceTypeData || !deviceTypeData.data_table) {
92+
if (!deviceTypeData || !deviceTypeData.data_table_v2) {
9393
throw new NotFoundException('Device type data or data table not found');
9494
}
9595
return deviceTypeData;

src/export/export.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ export class ExportService {
5656
const filtered = {};
5757
dataMetadata.forEach((meta) => {
5858
if (d[meta.name]) {
59-
filtered[meta.name] = d[meta.name];
59+
if (meta.formatting === 'MM/DD/YYYY HH:mm:ss') {
60+
filtered[meta.public_name] = new Date(d[meta.name]).toLocaleString();
61+
} else {
62+
filtered[meta.public_name] = d[meta.name];
63+
}
6064
}
6165
});
6266
return filtered;

0 commit comments

Comments
 (0)