Skip to content

Commit ecd461b

Browse files
fix: remove changes
1 parent 1371c2c commit ecd461b

File tree

2 files changed

+4
-102
lines changed

2 files changed

+4
-102
lines changed

apps/OpenSign/src/json/ReportJson.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ export default function reportJson(id) {
283283
textColor: "white",
284284
btnIcon: "fa fa-plus",
285285
redirectUrl: "placeHolderSign",
286-
action: "redirect",
287-
selector: "reactourSecond",
288-
message: "onclick use button to create document from template."
286+
action: "redirect"
289287
},
290288
{
291289
btnLabel: "Edit",
@@ -294,9 +292,7 @@ export default function reportJson(id) {
294292
textColor: "white",
295293
btnIcon: "fa-solid fa-pen",
296294
redirectUrl: "template",
297-
action: "redirect",
298-
selector: "reactourThird",
299-
message: "onclick edit button you can edit template."
295+
action: "redirect"
300296
},
301297
{
302298
btnId: "1834",
@@ -305,9 +301,7 @@ export default function reportJson(id) {
305301
textColor: "white",
306302
btnIcon: "fa fa-trash",
307303
redirectUrl: "",
308-
action: "delete",
309-
selector: "reactourForth",
310-
message: "onclick delete button you can delete template."
304+
action: "delete"
311305
}
312306
],
313307
helpMsg:

apps/OpenSign/src/primitives/GetReportDisplay.js

Lines changed: 1 addition & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { modalSubmitBtnColor, modalCancelBtnColor } from "../constant/const";
88
import Alert from "./Alert";
99
import Tooltip from "./Tooltip";
1010
import { RWebShare } from "react-web-share";
11-
import Tour from "reactour";
12-
import Parse from "parse";
1311

1412
const ReportTable = ({
1513
ReportName,
@@ -21,9 +19,7 @@ const ReportTable = ({
2119
isMoreDocs,
2220
docPerPage,
2321
form,
24-
report_help,
25-
tourData,
26-
isDontShow
22+
report_help
2723
}) => {
2824
const navigate = useNavigate();
2925
const [currentPage, setCurrentPage] = useState(1);
@@ -37,8 +33,6 @@ const ReportTable = ({
3733
const [shareUrls, setShareUrls] = useState([]);
3834
const [copied, setCopied] = useState(false);
3935
const [alertMsg, setAlertMsg] = useState({ type: "success", message: "" });
40-
const [isTour, setIsTour] = useState(false);
41-
const [tourStatusArr, setTourStatusArr] = useState([]);
4236
const startIndex = (currentPage - 1) * docPerPage;
4337

4438
// For loop is used to calculate page numbers visible below table
@@ -52,7 +46,6 @@ const ReportTable = ({
5246
}, [List, docPerPage]);
5347
// below useEffect reset currenpage to 1 if user change route
5448
useEffect(() => {
55-
checkTourStatus();
5649
return () => setCurrentPage(1);
5750
}, []);
5851

@@ -357,80 +350,6 @@ const ReportTable = ({
357350
setActLoader({});
358351
});
359352
};
360-
361-
async function checkTourStatus() {
362-
const currentUser = Parse.User.current();
363-
const cloudRes = await Parse.Cloud.run("getUserDetails", {
364-
email: currentUser.get("email")
365-
});
366-
const res = { data: cloudRes.toJSON() };
367-
if (res.data && res.data.TourStatus && res.data.TourStatus.length > 0) {
368-
const tourStatus = res.data.TourStatus;
369-
// console.log("res ", res.data.TourStatus);
370-
setTourStatusArr(tourStatus);
371-
const filteredtourStatus = tourStatus.filter(
372-
(obj) => obj["templateReportTour"]
373-
);
374-
if (filteredtourStatus.length > 0) {
375-
const templateReportTour = filteredtourStatus[0]["templateReportTour"];
376-
377-
if (templateReportTour) {
378-
setIsTour(false);
379-
} else {
380-
setIsTour(true);
381-
}
382-
} else {
383-
setIsTour(true);
384-
}
385-
} else {
386-
setIsTour(true);
387-
}
388-
}
389-
390-
const closeTour = async () => {
391-
// console.log("closeTour");
392-
setIsTour(false);
393-
if (isDontShow) {
394-
const serverUrl = localStorage.getItem("baseUrl");
395-
const appId = localStorage.getItem("parseAppId");
396-
const extUserClass = localStorage.getItem("extended_class");
397-
const json = JSON.parse(localStorage.getItem("Extand_Class"));
398-
const extUserId = json && json.length > 0 && json[0].objectId;
399-
// console.log("extUserId ", extUserId)
400-
401-
let updatedTourStatus = [];
402-
if (tourStatusArr.length > 0) {
403-
updatedTourStatus = [...tourStatusArr];
404-
const templateReportTourIndex = tourStatusArr.findIndex(
405-
(obj) =>
406-
obj["templateReportTour"] === false ||
407-
obj["templateReportTour"] === true
408-
);
409-
if (templateReportTourIndex !== -1) {
410-
updatedTourStatus[templateReportTourIndex] = {
411-
templateReportTour: true
412-
};
413-
} else {
414-
updatedTourStatus.push({ templateReportTour: true });
415-
}
416-
} else {
417-
updatedTourStatus = [{ templateReportTour: true }];
418-
}
419-
420-
await axios.put(
421-
serverUrl + "classes/" + extUserClass + "/" + extUserId,
422-
{
423-
TourStatus: updatedTourStatus
424-
},
425-
{
426-
headers: {
427-
"X-Parse-Application-Id": appId
428-
}
429-
}
430-
);
431-
}
432-
};
433-
434353
return (
435354
<div className="relative">
436355
{Object.keys(actLoader)?.length > 0 && (
@@ -443,15 +362,6 @@ const ReportTable = ({
443362
)}
444363
<div className="p-2 overflow-x-scroll w-full bg-white rounded-md">
445364
{isAlert && <Alert type={alertMsg.type}>{alertMsg.message}</Alert>}
446-
{tourData && ReportName === "Templates" && (
447-
<Tour
448-
onRequestClose={closeTour}
449-
steps={tourData}
450-
isOpen={isTour}
451-
// rounded={5}
452-
closeWithMask={false}
453-
/>
454-
)}
455365
<div className="flex flex-row items-center justify-between my-2 mx-3 text-[20px] md:text-[23px]">
456366
<div className="font-light">
457367
{ReportName}{" "}
@@ -463,7 +373,6 @@ const ReportTable = ({
463373
</div>
464374
{ReportName === "Templates" && (
465375
<i
466-
data-tut="reactourFirst"
467376
onClick={() => navigate("/form/template")}
468377
className="fa-solid fa-square-plus text-sky-400 text-[25px]"
469378
></i>
@@ -595,7 +504,6 @@ const ReportTable = ({
595504
{actions?.length > 0 &&
596505
actions.map((act, index) => (
597506
<button
598-
data-tut={act?.selector}
599507
key={index}
600508
onClick={() => handleActionBtn(act, item)}
601509
className={`w-[25px] h-[25px] flex justify-center items-center rounded shadow`}

0 commit comments

Comments
 (0)