리포트 복사 기능 개선
This commit is contained in:
parent
c6f0750050
commit
6c7807e1d1
|
|
@ -477,6 +477,12 @@ export class ReportService {
|
|||
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
|
||||
`;
|
||||
|
||||
// components가 이미 문자열이면 그대로, 객체면 JSON.stringify
|
||||
const componentsData =
|
||||
typeof originalLayout.components === "string"
|
||||
? originalLayout.components
|
||||
: JSON.stringify(originalLayout.components);
|
||||
|
||||
await client.query(copyLayoutQuery, [
|
||||
newLayoutId,
|
||||
newReportId,
|
||||
|
|
@ -487,7 +493,7 @@ export class ReportService {
|
|||
originalLayout.margin_bottom,
|
||||
originalLayout.margin_left,
|
||||
originalLayout.margin_right,
|
||||
JSON.stringify(originalLayout.components),
|
||||
componentsData,
|
||||
userId,
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue