Skip to content

Commit ac0cdd2

Browse files
feat: mail button on header after sign document in signyourself flow
1 parent 0102480 commit ac0cdd2

File tree

4 files changed

+68
-7
lines changed

4 files changed

+68
-7
lines changed

microfrontends/SignDocuments/src/Component/SignYourselfPdf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ function SignYourSelf() {
989989
currentSigner={true}
990990
alreadySign={pdfUrl ? true : false}
991991
isSignYourself={true}
992+
setIsEmail={setIsEmail}
992993
/>
993994

994995
{/* className="hidePdf" */}

microfrontends/SignDocuments/src/Component/component/emailComponent.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ function EmailComponent({
6868

6969
if (sendMail.data.result.status === "success") {
7070
setIsEmail(false);
71+
setEmailValue("");
72+
setEmailCount("");
7173
setSuccessEmail(true);
7274
setTimeout(() => {
7375
setSuccessEmail(false);
74-
}, 3000);
76+
}, 1000);
77+
7578
setIsLoading(false);
7679
} else if (sendMail.data.result.status === "error") {
7780
setIsLoading(false);
@@ -81,6 +84,7 @@ function EmailComponent({
8184
alert("Something went wrong!");
8285
}
8386
};
87+
8488
//function for remove email
8589
const removeChip = (index) => {
8690
const updateEmailCount = emailCount.filter((data, key) => key !== index);
@@ -363,7 +367,11 @@ function EmailComponent({
363367
}}
364368
type="button"
365369
className="finishBtn"
366-
onClick={() => setIsEmail(false)}
370+
onClick={() => {
371+
setIsEmail(false);
372+
setEmailValue("");
373+
setEmailCount("");
374+
}}
367375
>
368376
Close
369377
</button>

microfrontends/SignDocuments/src/Component/component/header.js

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function Header({
3333
currentSigner,
3434
dataTut4,
3535
alreadySign,
36-
isSignYourself
36+
isSignYourself,
37+
setIsEmail
3738
}) {
3839
const isMobile = window.innerWidth < 767;
3940
const navigate = useNavigate();
@@ -329,9 +330,29 @@ function Header({
329330
</DropdownMenu.Item>
330331
) : (
331332
isSignYourself && (
332-
<DropdownMenu.Item className="DropdownMenuItem">
333-
<CertificateDropDown />
334-
</DropdownMenu.Item>
333+
<>
334+
<DropdownMenu.Item className="DropdownMenuItem">
335+
<CertificateDropDown />
336+
</DropdownMenu.Item>
337+
<DropdownMenu.Item
338+
className="DropdownMenuItem"
339+
onClick={() => setIsEmail(true)}
340+
>
341+
<div
342+
style={{
343+
display: "flex",
344+
flexDirection: "row"
345+
}}
346+
>
347+
<i
348+
class="fa fa-envelope"
349+
style={{ marginRight: "2px" }}
350+
aria-hidden="true"
351+
></i>
352+
Mail
353+
</div>
354+
</DropdownMenu.Item>
355+
</>
335356
)
336357
)}
337358
<DropdownMenu.Item
@@ -690,6 +711,28 @@ function Header({
690711
></i>
691712
Download
692713
</button>
714+
<button
715+
type="button"
716+
className="defaultBtn mailBtn"
717+
style={{
718+
display: "flex",
719+
flexDirection: "row",
720+
alignItems: "center",
721+
marginLeft: "10px"
722+
}}
723+
onClick={() => setIsEmail(true)}
724+
>
725+
<i
726+
class="fa fa-envelope"
727+
style={{
728+
color: "white",
729+
fontSize: "15px",
730+
marginRight: "3px"
731+
}}
732+
aria-hidden="true"
733+
></i>
734+
Mail
735+
</button>
693736
</div>
694737
) : (
695738
<div>

microfrontends/SignDocuments/src/css/signature.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@
88
.penContainer {
99
width: 460px;
1010
}
11-
11+
.mailBtn{
12+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.18);
13+
padding: 3px 15px !important;
14+
background-color: rgb(79 190 241);
15+
border: none !important;
16+
color: white !important;
17+
}
18+
.mailBtn:hover {
19+
box-shadow: 0 2px 4px rgba(154, 36, 36, 0.1), 0 2px 4px rgba(0, 0, 0, 0.18);
20+
}
1221
.signatureBtn {
1322
border: 1.5px solid #47a3ad;
1423
margin-bottom: 10px;

0 commit comments

Comments
 (0)