Skip to content

Commit

Permalink
fix: qrcode download from task popup
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 23, 2024
1 parent 5fad502 commit 708dfbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ const TaskSectionPopup = ({ taskId, body, feature }: TaskSectionPopupPropType) =
<h4 className="fmtm-text-lg fmtm-font-bold">Task: {taskId}</h4>
<p className="fmtm-text-base fmtm-text-[#757575]">Status: {task_status}</p>
</div>
{checkIfTaskAssignedOrNot && task_status !== 'LOCKED_FOR_MAPPING' && <QrcodeComponent qrcode={qrcode} />}
{checkIfTaskAssignedOrNot && task_status !== 'LOCKED_FOR_MAPPING' && (
<QrcodeComponent qrcode={qrcode} taskId={taskId} />
)}
{body}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/src/components/QrcodeComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import CoreModules from '@/shared/CoreModules';
import AssetModules from '@/shared/AssetModules';

const TasksComponent = ({ qrcode }) => {
const TasksComponent = ({ qrcode, taskId }) => {
return (
<div className="fmtm-flex fmtm-justify-center fmtm-py-5 fmtm-border-t-[1px]">
<div className="fmtm-p-5 fmtm-border-[1px] fmtm-rounded-lg fmtm-relative">
Expand All @@ -16,7 +16,7 @@ const TasksComponent = ({ qrcode }) => {
onClick={() => {
const downloadLink = document.createElement('a');
downloadLink.href = qrcode;
downloadLink.download = `Task_${task}`;
downloadLink.download = `Task_${taskId}`;
downloadLink.click();
}}
disabled={qrcode == '' ? true : false}
Expand Down

0 comments on commit 708dfbc

Please sign in to comment.