IO-2335 Exported GSR to Excel
Change idtype to reporttype to prevent issues later on down the road if we extend more reports to excel format
This commit is contained in:
@@ -92,7 +92,11 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
||||
to: values.to,
|
||||
subject: Templates[values.key]?.subject,
|
||||
},
|
||||
values.sendby === "excel" ? "x" : values.sendby === "email" ? "e" : "p",
|
||||
values.sendbyexcel === "excel"
|
||||
? "x"
|
||||
: values.sendby === "email"
|
||||
? "e"
|
||||
: "p",
|
||||
id
|
||||
);
|
||||
setLoading(false);
|
||||
@@ -253,27 +257,22 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
|
||||
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
||||
{() => {
|
||||
const key = form.getFieldValue("key");
|
||||
const currentId = form.getFieldValue("id");
|
||||
if (!key) return null;
|
||||
//Kind of Id
|
||||
const idtype = Templates[key] && Templates[key].idtype;
|
||||
if (!idtype && currentId) {
|
||||
form.setFieldsValue({ id: null });
|
||||
return null;
|
||||
}
|
||||
if (idtype === "excel")
|
||||
const reporttype = Templates[key] && Templates[key].reporttype;
|
||||
|
||||
if (reporttype === "excel")
|
||||
return (
|
||||
<Form.Item
|
||||
label={t("general.labels.sendby")}
|
||||
name="sendby"
|
||||
initialValue="print"
|
||||
name="sendbyexcel"
|
||||
initialValue="excel"
|
||||
>
|
||||
<Radio.Group>
|
||||
<Radio value="excel">{t("general.labels.excel")}</Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
);
|
||||
if (idtype !== "excel")
|
||||
if (reporttype !== "excel")
|
||||
return (
|
||||
<Form.Item
|
||||
label={t("general.labels.sendby")}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user