st: fix: cell style 속성 추가, grid 데이터 변환 공통함수 추가
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { SewerageSupplyRateItem } from "@/entities/statistics/model/statistics-input-interface";
|
||||
|
||||
export function toGridRows(items: SewerageSupplyRateItem[]): Record<string, string | number>[] {
|
||||
return items.map((item) => {
|
||||
const row: Record<string, string | number> = {};
|
||||
for (const [key, value] of Object.entries(item)) {
|
||||
row[key] = value === null || value === undefined ? "" : value;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user