@@ -34,7 +34,11 @@ function Header({
34
34
setIsEmail,
35
35
completeBtnTitle,
36
36
setIsEditTemplate,
37
- isPublicTemplate
37
+ isPublicTemplate,
38
+ clickOnZoomIn,
39
+ clickOnZoomOut,
40
+ handleRotationFun,
41
+ isDisableRotate
38
42
} ) {
39
43
const { t } = useTranslation ( ) ;
40
44
const filterPrefill =
@@ -73,7 +77,7 @@ function Header({
73
77
allPages = { allPages }
74
78
changePage = { changePage }
75
79
/>
76
- { pdfUrl && alreadySign ? (
80
+ { isCompleted && alreadySign ? (
77
81
< DropdownMenu . Root >
78
82
< DropdownMenu . Trigger asChild >
79
83
< div className = "op-link op-link-primary no-underline text-[16px] font-semibold pr-[3px] pl-[5px]" >
@@ -184,13 +188,7 @@ function Header({
184
188
) : (
185
189
< div
186
190
data-tut = "reactourThird"
187
- onClick = { ( ) => {
188
- if ( ! pdfUrl ) {
189
- embedWidgetsData ( ) ;
190
- } else if ( isPdfRequestFiles ) {
191
- embedWidgetsData ( ) ;
192
- }
193
- } }
191
+ onClick = { ( ) => embedWidgetsData ( ) }
194
192
className = "border-none font-[650] text-[14px] op-link op-link-primary no-underline"
195
193
>
196
194
{ t ( "finish" ) }
@@ -207,15 +205,15 @@ function Header({
207
205
</ DropdownMenu . Trigger >
208
206
< DropdownMenu . Portal >
209
207
< DropdownMenu . Content
210
- className = "bg-white shadow-md rounded-full px-3 py-2"
208
+ className = "bg-white shadow-md rounded-md px-3 py-2"
211
209
sideOffset = { 5 }
212
210
>
213
211
< DropdownMenu . Item
214
212
className = "flex flex-row justify-center items-center text-[13px] focus:outline-none cursor-pointer"
215
213
onClick = { ( ) =>
216
214
handleDownloadPdf (
217
215
pdfDetails ,
218
- pdfUrl ,
216
+ pdfDetails [ 0 ] ?. URL ,
219
217
setIsDownloading
220
218
)
221
219
}
@@ -226,6 +224,43 @@ function Header({
226
224
> </ i >
227
225
< span className = "font-[500]" > { t ( "download" ) } </ span >
228
226
</ DropdownMenu . Item >
227
+ { ! isDisableRotate && (
228
+ < >
229
+ < DropdownMenu . Item
230
+ className = "flex flex-row justify-center items-center text-[13px] focus:outline-none cursor-pointer"
231
+ onClick = { ( ) => handleRotationFun ( 90 ) }
232
+ >
233
+ < i className = "fa-light fa-rotate-right text-gray-500 2xl:text-[30px] mr-[3px]" > </ i >
234
+ < span className = "font-[500]" >
235
+ { t ( "rotate-right" ) }
236
+ </ span >
237
+ </ DropdownMenu . Item >
238
+ < DropdownMenu . Item
239
+ className = "flex flex-row justify-center items-center text-[13px] focus:outline-none cursor-pointer"
240
+ onClick = { ( ) => handleRotationFun ( - 90 ) }
241
+ >
242
+ < i className = "fa-light fa-rotate-left text-gray-500 2xl:text-[30px] mr-[3px]" > </ i >
243
+ < span className = "font-[500]" >
244
+ { t ( "rotate-left" ) }
245
+ </ span >
246
+ </ DropdownMenu . Item >
247
+ </ >
248
+ ) }
249
+
250
+ < DropdownMenu . Item
251
+ className = "flex flex-row justify-center items-center text-[13px] focus:outline-none cursor-pointer"
252
+ onClick = { ( ) => clickOnZoomIn ( ) }
253
+ >
254
+ < i className = "fa-light fa-magnifying-glass-plus text-gray-500 2xl:text-[30px]" > </ i >
255
+ < span className = "font-[500]" > { t ( "zoom-in" ) } </ span >
256
+ </ DropdownMenu . Item >
257
+ < DropdownMenu . Item
258
+ className = "flex flex-row justify-center items-center text-[13px] focus:outline-none cursor-pointer"
259
+ onClick = { ( ) => clickOnZoomOut ( ) }
260
+ >
261
+ < i className = "fa-light fa-magnifying-glass-minus text-gray-500 2xl:text-[30px]" > </ i >
262
+ < span className = "font-[500]" > { t ( "zoom-out" ) } </ span >
263
+ </ DropdownMenu . Item >
229
264
</ DropdownMenu . Content >
230
265
</ DropdownMenu . Portal >
231
266
</ DropdownMenu . Root >
@@ -423,9 +458,7 @@ function Header({
423
458
< button
424
459
type = "button"
425
460
className = "op-btn op-btn-primary op-btn-sm shadow"
426
- onClick = { ( ) => {
427
- embedWidgetsData ( ) ;
428
- } }
461
+ onClick = { ( ) => embedWidgetsData ( ) }
429
462
>
430
463
{ t ( "sign-now" ) }
431
464
</ button >
@@ -442,11 +475,7 @@ function Header({
442
475
< button
443
476
type = "button"
444
477
className = "op-btn op-btn-primary op-btn-sm mr-[3px]"
445
- onClick = { ( ) => {
446
- if ( ! pdfUrl ) {
447
- embedWidgetsData ( ) ;
448
- }
449
- } }
478
+ onClick = { ( ) => embedWidgetsData ( ) }
450
479
>
451
480
{ t ( "finish" ) }
452
481
</ button >
0 commit comments