282 lines
9.2 KiB
JavaScript
282 lines
9.2 KiB
JavaScript
var fromDate_reprt;
|
|
var toDate_reprt;
|
|
$(function () {
|
|
fromDate_reprt = $("#report_from_date").persianDatepicker({
|
|
format: "YYYY/MM/DD",
|
|
initialValue: false,
|
|
autoClose: true,
|
|
initialValueType: "persian",
|
|
});
|
|
toDate_reprt = $("#reprt_to_date").persianDatepicker({
|
|
format: "YYYY/MM/DD",
|
|
initialValue: false,
|
|
autoClose: true,
|
|
initialValueType: "persian",
|
|
});
|
|
});
|
|
$(".second-menu-img").click(function () {
|
|
$(".queen-size-nav").toggle({
|
|
direction: "right"
|
|
}, 50);
|
|
if (
|
|
$(".second-menu-img").attr("src") ==
|
|
"./dist/images/new-design/burger-list.svg"
|
|
) {
|
|
$(".second-menu-img").attr("src", "./dist/images/new-design/delete.svg");
|
|
$(".queen-size-nav").css("position", "absolute");
|
|
$(".queen-size-nav").css("z-index", "2");
|
|
$(".queen-size-nav").css("width", "30%");
|
|
$(".queen-size-nav").css("height", "100%");
|
|
$(".second-top-menu").css("z-index", "2");
|
|
} else if (
|
|
$(".second-menu-img").attr("src") == "./dist/images/new-design/delete.svg"
|
|
) {
|
|
$(".second-menu-img").attr(
|
|
"src",
|
|
"./dist/images/new-design/burger-list.svg"
|
|
);
|
|
$(".second-top-menu").css("margin-right", "0px");
|
|
$(".queen-size-nav").css("width", "0%");
|
|
$(".queen-size-nav").css("height", "0%");
|
|
}
|
|
});
|
|
//slider for mobile end
|
|
$(".queen-res").click(function () {
|
|
$(".first-step-res").slideToggle(300);
|
|
if ($(".forth-step-res").css("display") == "block") {
|
|
$(".forth-step-res").slideUp(300);
|
|
} else if ($(".sixth-step-res").css("display") == "block") {
|
|
$(".sixth-step-res").slideUp(300);
|
|
} else if ($(".seventh-step-res").css("display") == "block") {
|
|
$(".seventh-step-res").slideUp(300);
|
|
}
|
|
if ($(".first-step-res").css("display") == "block") {
|
|
$(".arrow-changing1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
}
|
|
setTimeout(() => {
|
|
if ($(".first-step-res").css("display") == "none") {
|
|
$(".arrow-changing1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".forth-step-res").css("display") == "none") {
|
|
$(".arrow-changing2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".sixth-step-res").css("display") == "none") {
|
|
$(".arrow-changing3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
});
|
|
$(".inside-queen-res").click(function () {
|
|
$(".second-step-res").slideToggle(300);
|
|
if (
|
|
$(".arrow-changing-inside1").attr("src") ==
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
) {
|
|
$(".arrow-changing-inside1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
} else if (
|
|
$(".arrow-changing-inside1").attr("src") ==
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
) {
|
|
$(".arrow-changing-inside1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
});
|
|
$(".again-inside-queen-res").click(function () {
|
|
$(".third-step-res").slideToggle(300);
|
|
if (
|
|
$(".arrow-changing-inside2").attr("src") ==
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
) {
|
|
$(".arrow-changing-inside2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
} else if (
|
|
$(".arrow-changing-inside2").attr("src") ==
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
) {
|
|
$(".arrow-changing-inside2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
});
|
|
$(".second-queen-res").click(function () {
|
|
$(".forth-step-res").slideToggle(300);
|
|
if ($(".first-step-res").css("display") == "block") {
|
|
$(".first-step-res").slideUp(300);
|
|
} else if ($(".sixth-step-res").css("display") == "block") {
|
|
$(".sixth-step-res").slideUp(300);
|
|
} else if ($(".seventh-step-res").css("display") == "block") {
|
|
$(".seventh-step-res").slideUp(300);
|
|
}
|
|
if ($(".forth-step-res").css("display") == "block") {
|
|
$(".arrow-changing2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
}
|
|
setTimeout(() => {
|
|
if ($(".forth-step-res").css("display") == "none") {
|
|
$(".arrow-changing2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".first-step-res").css("display") == "none") {
|
|
$(".arrow-changing1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".sixth-step-res").css("display") == "none") {
|
|
$(".arrow-changing3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
});
|
|
$(".inside-second-queen-res").click(function () {
|
|
$(".fivth-step-res").slideToggle(300);
|
|
$(".third-step-res").slideToggle(300);
|
|
if (
|
|
$(".arrow-changing-inside3").attr("src") ==
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
) {
|
|
$(".arrow-changing-inside3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
} else if (
|
|
$(".arrow-changing-inside3").attr("src") ==
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
) {
|
|
$(".arrow-changing-inside3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
});
|
|
$(".third-queen-res").click(function () {
|
|
$(".sixth-step-res").slideToggle(300);
|
|
if ($(".forth-step-res").css("display") == "block") {
|
|
$(".forth-step-res").slideUp(300);
|
|
} else if ($(".first-step-res").css("display") == "block") {
|
|
$(".first-step-res").slideUp(300);
|
|
} else if ($(".seventh-step-res").css("display") == "block") {
|
|
$(".seventh-step-res").slideUp(300);
|
|
}
|
|
if ($(".sixth-step-res").css("display") == "block") {
|
|
$(".arrow-changing3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-down.svg"
|
|
);
|
|
}
|
|
setTimeout(() => {
|
|
if ($(".sixth-step-res").css("display") == "none") {
|
|
$(".arrow-changing3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".first-step-res").css("display") == "none") {
|
|
$(".arrow-changing1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".forth-step-res").css("display") == "none") {
|
|
$(".arrow-changing2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
});
|
|
$(".forth-queen-res").click(function () {
|
|
$(".seventh-step-res").slideToggle(300);
|
|
if ($(".forth-step-res").css("display") == "block") {
|
|
$(".forth-step-res").slideUp(300);
|
|
} else if ($(".sixth-step-res").css("display") == "block") {
|
|
$(".sixth-step-res").slideUp(300);
|
|
} else if ($(".first-step-res").css("display") == "block") {
|
|
$(".first-step-res").slideUp(300);
|
|
}
|
|
setTimeout(() => {
|
|
if ($(".first-step-res").css("display") == "none") {
|
|
$(".arrow-changing1").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".forth-step-res").css("display") == "none") {
|
|
$(".arrow-changing2").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
setTimeout(() => {
|
|
if ($(".sixth-step-res").css("display") == "none") {
|
|
$(".arrow-changing3").attr(
|
|
"src",
|
|
"./dist/images/new-design/arrow-left.svg"
|
|
);
|
|
}
|
|
}, 320);
|
|
});
|
|
$(".fivth-queen-res").click(function () {
|
|
$(".eight-step-res").slideToggle(300);
|
|
});
|
|
|
|
$("#report_output").on("click", function () {
|
|
const modal = $("#report_modal");
|
|
modal.find('.input-cleaner').val('')
|
|
modal.modal("show")
|
|
});
|
|
|
|
$("#give_report").on("click", function () {
|
|
const modal = $("#report_modal");
|
|
modal.find(".input-cleaner").each(function () {
|
|
$(this).val() == "" ? $(this).addClass("no-val") : $(this).removeClass("no-val");
|
|
});
|
|
if (modal.find(".input-cleaner").hasClass("no-val")) {
|
|
alert("لطفا فیلد های مربوطه را تکمیل نمایید")
|
|
} else {
|
|
const convert_fromDate_reprt = moment(fromDate_reprt.getState().selected.unixDate).format("YYYY-MM-DD");
|
|
const convert_toDate_reprt = moment(toDate_reprt.getState().selected.unixDate).format("YYYY-MM-DD");
|
|
window.open(`/poster/progress_info?fromDate=${convert_fromDate_reprt}&toDate=${convert_toDate_reprt}`, `_blank`);
|
|
modal.modal("hide")
|
|
}
|
|
}); |