Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-2024-03-21 #294

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/pages/Dashboard/FeedbackModal.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Button, Modal, ModalBody } from "@appquality/appquality-design-system";
import { ChatLeftDots } from "react-bootstrap-icons";
import { useTranslation } from "react-i18next";
import { useGetUsersMeQuery } from "src/services/tryberApi";
import styled from "styled-components";

export const FeedbackModal = ({
open = true,
onClose,
user,
}: {
open?: boolean;
onClose: () => void;
user?: UserData;
}) => {
const { data: user, isLoading } = useGetUsersMeQuery({ fields: "id,email" });
const { t } = useTranslation();

const iFrameStyle = {
Expand All @@ -20,10 +20,13 @@ export const FeedbackModal = ({
minHeight: "400px",
border: "none",
};

if (isLoading) return null;
return (
<Modal isOpen={open} onClose={onClose} title={t("Send us your feedback!")}>
<ModalBody>
<iframe
title="Feedback form"
src={`https://form.jotform.com/213364740407351?testerId=T${user?.id}&email=${user?.email}`}
style={iFrameStyle}
/>
Expand Down
1 change: 0 additions & 1 deletion src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default function Dashboard() {
<FeedbackModal
onClose={() => setFeedbackModalOpen(false)}
open={isFeedbackModalOpen}
user={user}
/>
<FeedbackButton handleClick={() => setFeedbackModalOpen(true)} />
</>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Profile/TabFiscal/TabFiscalEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const TabFiscalEdit = ({ setEdit, inputRef }: TabCommonProps) => {
helpers.resetForm({ values });
}}
>
{({ isValid, isValidating, dirty, values, errors }) => (
{({ isValid, isValidating, isSubmitting, dirty, values, errors }) => (
<Form id="fiscalProfileForm">
<CSSGrid gutter="50px" rowGap="1rem" min="220px">
<div className="user-info">
Expand Down Expand Up @@ -354,7 +354,7 @@ export const TabFiscalEdit = ({ setEdit, inputRef }: TabCommonProps) => {
kind="primary"
type="submit"
flat
disabled={!isValid || isValidating || !dirty}
disabled={!isValid || isValidating || !dirty || isSubmitting}
>
{t("Save")}
</HalfColumnButton>
Expand Down
Loading