Link to response form
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ISurvey } from '@/utils/types';
|
||||
import surveyVector from '@/assets/images/survey.svg';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
type Props = {
|
||||
data: ISurvey;
|
||||
@@ -24,6 +25,30 @@ const SurveyFormListItem = ({ data }: Props) => {
|
||||
</div>
|
||||
<img src={surveyVector} className="w-[35%]" />
|
||||
</div>
|
||||
<div className="w-full grid grid-cols-2 gap-3">
|
||||
{data.complete ? (
|
||||
// <Button
|
||||
// className="w-full"
|
||||
// variant="outline"
|
||||
// onClick={() => viewResponsesHandler(data)}
|
||||
// >
|
||||
// <EyeIcon />
|
||||
// مشاهده پاسخها
|
||||
// </Button>
|
||||
<></>
|
||||
) : (
|
||||
<a
|
||||
href={`${
|
||||
import.meta.env.VITE_MAIN_APP_SITE_URL
|
||||
}/survey-forms/response/${data.id}`}
|
||||
target="_blank"
|
||||
>
|
||||
<Button className="w-full" variant="outline">
|
||||
شرکت در نظرسنجی
|
||||
</Button>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user