+ {showDowloadButton ? (
+
+ }
+ href={downloadUrl}
+ target={'_blank'}
+ />
+
+ ) : (
+ <>
+
}
+ onClick={() =>
+ router.push(`/profile/tax-receipt/modify-recipient-data`)
+ }
+ />
+
+ >
+ )}
+
+ );
+};
+
+export default ReceiptActions;
diff --git a/src/features/user/DonorReceipt/microComponents/ReceiptDataSection.tsx b/src/features/user/DonorReceipt/microComponents/ReceiptDataSection.tsx
new file mode 100644
index 000000000..7abb15fdd
--- /dev/null
+++ b/src/features/user/DonorReceipt/microComponents/ReceiptDataSection.tsx
@@ -0,0 +1,93 @@
+import type { ReceiptData } from '../donorReceipt';
+import type { APIError } from '@planet-sdk/common';
+
+import { useCallback, useContext, useState } from 'react';
+import { handleError } from '@planet-sdk/common';
+import { CircularProgress } from '@mui/material';
+import { useDonorReceipt } from '../../../common/Layout/DonorReceiptContext';
+import styles from '../donationReceipt.module.scss';
+import DonationData from './DonationData';
+import ReceiptActions from './ReceiptActions';
+import DonorDetails from './DonorDetails';
+import { getVerificationDate, RECEIPT_STATUS } from '../utils';
+import { useTenant } from '../../../common/Layout/TenantContext';
+import { putRequest } from '../../../../utils/apiRequests/api';
+import { ErrorHandlingContext } from '../../../common/Layout/ErrorHandlingContext';
+
+interface Prop {
+ donorReceiptData: ReceiptData | null;
+}
+
+const ReceiptDataSection = ({ donorReceiptData }: Prop) => {
+ if (!donorReceiptData) return null;
+ const { updateDonorReceiptData } = useDonorReceipt();
+ const { tenantConfig } = useTenant();
+ const { setErrors } = useContext(ErrorHandlingContext);
+ const [isLoading, setIsLoading] = useState(false);
+ const {
+ issuedDonations,
+ downloadUrl,
+ operation,
+ donor,
+ address,
+ hasDonorDataChanged,
+ dtn,
+ challenge,
+ year,
+ } = donorReceiptData;
+
+ const confirmDonorData = useCallback(async () => {
+ if (operation !== RECEIPT_STATUS.VERIFY) return;
+
+ if (hasDonorDataChanged) {
+ //TODO: PUT Authentication request logic
+ }
+
+ try {
+ setIsLoading(true);
+ const data = await putRequest({
+ tenant: tenantConfig.id,
+ url: `/app/donationReceipt/verify`,
+ data: {
+ dtn,
+ challenge,
+ year,
+ verificationDate: getVerificationDate(),
+ },
+ });
+ if (data) updateDonorReceiptData(data);
+ } catch (error) {
+ setErrors(handleError(error as APIError));
+ } finally {
+ setIsLoading(false);
+ }
+ }, [
+ operation,
+ hasDonorDataChanged,
+ tenantConfig.id,
+ dtn,
+ challenge,
+ year,
+ updateDonorReceiptData,
+ ]);
+
+ return (
+