From 2aeb75f4cfa9a45e738347949cce4833fb3c29b6 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sat, 3 Feb 2024 06:53:53 +0330 Subject: [PATCH 1/2] fixed bug link loan history --- .../Form/HistoryForm/PrintHistory.jsx | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx index 438bff5..9028919 100644 --- a/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx +++ b/src/components/dashboard/loan-history/Form/HistoryForm/PrintHistory.jsx @@ -3,33 +3,24 @@ import {useTranslations} from "next-intl"; import {useState} from "react"; import useRequest from "@/lib/app/hooks/useRequest"; import DescriptionIcon from '@mui/icons-material/Description'; +import Link from "next/link"; const PrintHistory = ({attachment}) => { const t = useTranslations(); - const [loading, setLoading] = useState(false) - const requestServer = useRequest({auth: true, pending: false, success: {notification: {show: false}}}) - const clickHandler = (attachment) => { - const anchor = document.createElement('a'); - anchor.href = attachment; - anchor.setAttribute('download', ''); - document.body.appendChild(anchor); - anchor.click(); - document.body.removeChild(anchor); - } - - - return () + return ( + + ); } export default PrintHistory \ No newline at end of file From 39b397c4ffa8de7ed48676f7044a6c04a5e36a50 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Sat, 3 Feb 2024 06:55:40 +0330 Subject: [PATCH 2/2] change version --- example.env.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.env.local b/example.env.local index 3c99d5d..4474c59 100644 --- a/example.env.local +++ b/example.env.local @@ -1,5 +1,5 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard" -NEXT_PUBLIC_API_VERSION = "1.30.0" +NEXT_PUBLIC_API_VERSION = "1.30.1" NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa" NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"