PrintAll client bug fixed

This commit is contained in:
SamSys
2024-11-26 17:53:04 +03:30
parent da7863f039
commit 26b361a494
6 changed files with 1682 additions and 2405 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -23,9 +23,9 @@
padding-top: 15px;
}
.container2:last-of-type {
height: 280mm;
}
.container2:last-of-type {
height: 280mm;
}
.modal-dialog {
max-width: 100%;
@@ -37,7 +37,8 @@
}*/
@@page {
size: A4;
margin: 0mm;
margin: 10mm
/* margin: 0mm; */
page-break-after: auto;
}
@@ -58,41 +59,68 @@
@@media print {
body * {
visibility: hidden;
page-break-after: auto;
visibility: hidden !important;
page-break-after: auto !important;
}
body {
background-color: #ffffff !important;
}
.container2, #printSection {
background-color: #ffffff !important;
}
html, body {
height: 100%;
/* height: 100%; */
width: 210mm;
height: 297mm;
margin: 0 !important;
padding: 0 !important;
overflow: hidden;
background-color: #ffffff !important;
-webkit-print-color-adjust: exact;
}
.container2 {
height: 100%;
page-break-inside: avoid;
}
.container2:last-of-type {
height: auto;
}
.modal-dialog {
width: 100%;
max-width: 210mm;
}
#printSection, #printSection * {
visibility: visible;
page-break-after: auto;
visibility: visible !important;
page-break-after: auto !important;
}
footer {
page-break-after: auto;
display: none;
page-break-after: auto !important;
display: none !important;
}
header {
display: none;
display: none !important;
}
#printSection {
position: absolute;
right: 0;
page-break-after: auto;
top: 0;
position: absolute !important;
right: 0 !important;
page-break-after: auto !important;
top: 0 !important;
}
.head {
background-color: #cccccc !important;
-webkit-print-color-adjust: exact;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
.week {
@@ -102,7 +130,8 @@
.radio-info input[type="radio"]:checked + label::after {
background-color: black !important;
-webkit-print-color-adjust: exact;
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
.mt-15 {

View File

@@ -1,315 +1,8 @@
@using _0_Framework.Application
@using System.Security.Cryptography.X509Certificates
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
@{
<style>
.modal .modal-dialog .modal-content {
background-color: white !important;
}
.modal-dialog {
max-width: 100%;
width: 22.4cm;
}
/* @@page {
size: 7in 9.25in;
margin: 27mm 16mm 27mm 16mm;
}*/
@@page {
size: A4;
margin: 0mm;
page-break-after: auto;
}
@@media screen {
#printSection {
display: none;
}
}
.print * {
font-family: IranSans !important;
}
.print:last-child {
page-break-after: auto !important;
}
@@media print {
body * {
visibility: hidden;
page-break-after: auto;
}
html, body {
height: 100%;
margin: 0 !important;
padding: 0 !important;
overflow: hidden;
}
#printSection, #printSection * {
visibility: visible;
page-break-after: auto;
}
footer {
page-break-after: auto;
display: none;
}
header {
display: none;
}
#printSection {
position: absolute;
left: 0;
page-break-after: auto;
top: 0;
}
.head {
background-color: #cdcdcd !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.week {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.radio-info input[type="radio"]:checked + label::after {
background-color: black !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.mt-30 {
margin: 30px 0 0 0 !important;
}
.restActive, .rest {
pointer-events: none;
font-size: 8px !important;
width: 46px !important;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
text-align: center;
}
}
.col-4, .col-3, .col-9,
.col-2, .col-10, .col-6,
.col-8, .col-5, .col-7,
.col-offset-1 {
float: right !important;
}
h5, h6 {
margin: 5px 0px !important;
}
body .modal {
font-size: 11px;
}
label .modal {
margin-bottom: 2px;
}
.radio {
display: inline-block;
margin-top: -10px !important;
}
.radio input[type=radio] {
position: unset !important;
}
textarea.form-control {
height: 100px !important;
}
.fontBold {
font-family: IranSans !important;
}
.fontNumber {
font-family: IranText !important;
}
.modal-body {
height: 99%;
}
.row {
margin-right: -10px !important;
margin-left: -10px !important;
}
div span.week {
/* border-radius: 5px;
padding: 2px 8px;
margin-right: 32px;
pointer-events: none;*/
}
#shanbeh, #yekshanbeh, #doshanbeh, #seshanbeh, #cheharshanbeh, #panjshanbeh, #jomeh {
width: 80px;
}
#Sh1, #Sh2, #Sh3, #Sh4, #Sh5, #Sh6, #Sh7, #Sh8 {
width: 80px;
margin-right: 21%;
border-radius: 15px;
font-size: 8px !important;
}
.week {
width: 48px !important;
border-radius: 5px;
padding: 1px !important;
font-size: 8px !important;
pointer-events: none;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.time {
width: 8%;
text-align: center;
padding: 0px !important;
direction: ltr;
border-radius: 5px;
border: 1px solid #47c848 !important;
pointer-events: none;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
font-size: 8px !important;
}
.time2 {
width: 8%;
text-align: center;
direction: ltr;
border-radius: 5px;
border: 1px solid #47c848 !important;
pointer-events: none;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
font-size: 8px !important;
}
.fild {
border: 1px solid #878686 !important;
background-color: #f7f7f7 !important;
border-radius: 10px;
// margin: 5px 10px;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.fild2 {
border: 1px solid #878686 !important;
background-color: #d9d9d9 !important;
border-radius: 10px;
padding: 10px 0 10px 0;
display: inline;
float: left;
width: 80%;
margin-left: 15px;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.fild3 {
border: 1px solid #878686 !important;
background-color: #e7e7e7 !important;
border-radius: 10px;
display: inline;
float: left;
width: 100%;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.call {
background-color: #d2dbd2 !important;
border-radius: 5px;
margin-bottom: 3px;
margin-left: 10px;
margin-right: 10px;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.rest {
pointer-events: none;
font-size: 8px !important;
width: 49px !important;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
text-align: center;
}
.shiftDisplayNone {
display: none;
}
.fildeWeek {
height: 136px !important;
width: 48% !important;
display: inline-block;
border: 1px solid #cfcfcf !important;
background-color: #e7e5e5 !important;
border-radius: 12px 0px 12px 12px;
padding: 2px 15px !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.fildeWeek .row {
height: 16px;
margin: 1px 0;
}
.weekName {
margin-bottom: -18px !important;
top: -18px;
position: relative;
margin-right: -16px;
padding-right: 5px !important;
font-size: 10px !important;
border-bottom: 0px;
color: #505458 !important;
background-color: #bdd1be !important;
border-radius: 15px 5px 0px 0px;
width: 57px;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.btn-deactive {
background-color: #bbbbbb !important;
-webkit-print-color-adjust: exact;
}
.btn-active {
background-color: #3ac53c !important;
-webkit-print-color-adjust: exact;
}
.input-deactive {
background-color: #dbd8d8 !important;
-webkit-print-color-adjust: exact !important;
}
</style>
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link href="~/assetsclient/pages/checkouts/css/printone.css?ver=@clientVersion" rel="stylesheet" />
}
<div class="modal-header" style="border-bottom: unset">
@@ -2528,7 +2221,7 @@
@{
if (Model.IsLeft)
{
<span style="float: right; font-size: 11.2px">
<span style="float: right;font-size: 11.2px;height: 0;">
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span>&nbsp;</span>
<span>@Model.LastDayOfWork</span><span>&nbsp;</span>
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span>&nbsp;</span>
@@ -2536,6 +2229,10 @@
<span>می باشد</span>
</span>
}
else
{
<span style="float: right;font-size: 11.2px;height: 0;"></span>
}
}
</div>
@@ -2604,464 +2301,4 @@
</form>
<!--<script src="~/AdminTheme/assets/js/workingHoursPrintable.js"></script>-->
<script>
var shiftNumber = $('#shiftWorkval').val();
if (shiftNumber === "4") {
$('#ComplexFildset').addClass("shiftDisplayNone");
$('#WeeklyFildset').removeClass("shiftDisplayNone");
} else {
$('#WeeklyFildset').addClass("shiftDisplayNone");
$('#ComplexFildset').removeClass("shiftDisplayNone");
}
if ($('#fw1').is(":checked")) {//شنبه
$('#shanbehw1').addClass("btn-active");
} else {
$('#shanbehw1').removeClass("btn-active");
$('#shanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#shanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f1w1').is(":checked")) {//یکشنبه
$('#yekshanbehw1').addClass("btn-active");
} else {
$('#yekshanbehw1').removeClass("btn-active");
$('#yekshanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#yekshanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f2w1').is(":checked")) {//دوشنبه
$('#doshanbehw1').addClass("btn-active");
} else {
$('#doshanbehw1').removeClass("btn-active");
$('#doshanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#doshanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f3w1').is(":checked")) {//سه شنبه
$('#seshanbehw1').addClass("btn-active");
} else {
$('#seshanbehw1').removeClass("btn-active");
$('#seshanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#seshanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f4w1').is(":checked")) {//چهارشنبه
$('#cheharshanbehw1').addClass("btn-active");
} else {
$('#cheharshanbehw1').removeClass("btn-active");
$('#cheharshanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#cheharshanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f5w1').is(":checked")) {//پنجشنبه
$('#panjshanbehw1').addClass("btn-active");
} else {
$('#panjshanbehw1').removeClass("btn-active");
$('#panjshanbehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#panjshanbehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f6w1').is(":checked")) {//جمعه
$('#jomehw1').addClass("btn-active");
} else {
$('#jomehw1').removeClass("btn-active");
$('#jomehRow3w1 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).val("");
});
$('#jomehRow3w1 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
//week2 days by value
if ($('#fw2').is(":checked")) {//شنبه
$('#shanbehw2').addClass("btn-active");
} else {
$('#shanbehw2').removeClass("btn-active");
$('#shanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#shanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f1w2').is(":checked")) {//یکشنبه
$('#yekshanbehw2').addClass("btn-active");
} else {
$('#yekshanbehw2').removeClass("btn-active");
$('#yekshanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#yekshanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f2w2').is(":checked")) {//دوشنبه
$('#doshanbehw2').addClass("btn-active");
} else {
$('#doshanbehw2').removeClass("btn-active");
$('#doshanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#doshanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f3w2').is(":checked")) {//سه شنبه
$('#seshanbehw2').addClass("btn-active");
} else {
$('#seshanbehw2').removeClass("btn-active");
$('#seshanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#seshanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f4w2').is(":checked")) {//چهارشنبه
$('#cheharshanbehw2').addClass("btn-active");
} else {
$('#cheharshanbehw2').removeClass("btn-active");
$('#cheharshanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#cheharshanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f5w2').is(":checked")) {//پنجشنبه
$('#panjshanbehw2').addClass("btn-active");
} else {
$('#panjshanbehw2').removeClass("btn-active");
$('#panjshanbehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#panjshanbehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f6w2').is(":checked")) {//جمعه
$('#jomehw2').addClass("btn-active");
} else {
$('#jomehw2').removeClass("btn-active");
$('#jomehRow3w2 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).val("");
});
$('#jomehRow3w2 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#fw3').is(":checked")) {//شنبه
$('#shanbehw3').addClass("btn-active");
} else {
$('#shanbehw3').removeClass("btn-active");
$('#shanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#shanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f1w3').is(":checked")) {//یکشنبه
$('#yekshanbehw3').addClass("btn-active");
} else {
$('#yekshanbehw3').removeClass("btn-active");
$('#yekshanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#yekshanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f2w3').is(":checked")) {//دوشنبه
$('#doshanbehw3').addClass("btn-active");
} else {
$('#doshanbehw3').removeClass("btn-active");
$('#doshanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#doshanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f3w3').is(":checked")) {//سه شنبه
$('#seshanbehw3').addClass("btn-active");
} else {
$('#seshanbehw3').removeClass("btn-active");
$('#seshanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#seshanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f4w3').is(":checked")) {//چهارشنبه
$('#cheharshanbehw3').addClass("btn-active");
} else {
$('#cheharshanbehw3').removeClass("btn-active");
$('#cheharshanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#cheharshanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f5w3').is(":checked")) {//پنجشنبه
$('#panjshanbehw3').addClass("btn-active");
} else {
$('#panjshanbehw3').removeClass("btn-active");
$('#panjshanbehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#panjshanbehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f6w3').is(":checked")) {//جمعه
$('#jomehw3').addClass("btn-active");
} else {
$('#jomehw3').removeClass("btn-active");
$('#jomehRow3w3 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).val("");
});
$('#jomehRow3w3 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#fw4').is(":checked")) {//شنبه
$('#shanbehw4').addClass("btn-active");
} else {
$('#shanbehw4').removeClass("btn-active");
$('#shanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#shanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f1w4').is(":checked")) {//یکشنبه
$('#yekshanbehw4').addClass("btn-active");
} else {
$('#yekshanbehw4').removeClass("btn-active");
$('#yekshanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#yekshanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f2w4').is(":checked")) {//دوشنبه
$('#doshanbehw4').addClass("btn-active");
} else {
$('#doshanbehw4').removeClass("btn-active");
$('#doshanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#doshanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f3w4').is(":checked")) {//سه شنبه
$('#seshanbehw4').addClass("btn-active");
} else {
$('#seshanbehw4').removeClass("btn-active");
$('#seshanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#seshanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f4w4').is(":checked")) {//چهارشنبه
$('#cheharshanbehw4').addClass("btn-active");
} else {
$('#cheharshanbehw4').removeClass("btn-active");
$('#cheharshanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#cheharshanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f5w4').is(":checked")) {//پنجشنبه
$('#panjshanbehw4').addClass("btn-active");
} else {
$('#panjshanbehw4').removeClass("btn-active");
$('#panjshanbehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
});
$('#panjshanbehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
if ($('#f6w4').is(":checked")) {//جمعه
$('#jomehw4').addClass("btn-active");
} else {
$('#jomehw4').removeClass("btn-active");
$('#jomehRow3w4 input').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).val("");
});
$('#jomehRow3w4 .rest').each(function () {
$(this).prop('selectedIndex', 0);
});
}
//disable shifte 2
function towDeactive() {
$('input.tow').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).val("");
$(this).removeProp("style");
});
}
//active shift2
function towActive() {
$('input.tow').each(function () {
$(this).removeAttr("disabled");
$(this).removeClass("input-deactive");
});
}
function oneActive() {
$('input.one').each(function () {
$(this).removeAttr("disabled");
$(this).removeClass("input-deactive");
});
}
//rest disable
function restDeactive() {
$('.restActive').each(function () {
$(this).attr("disabled", "disabled");
$(this).addClass("input-deactive");
$(this).prop('selectedIndex', 0);
});
}
//empty rest
function restReset() {
$('.restActive').each(function () {
$(this).prop('selectedIndex', 0);
});
}
//rest active
function restActive() {
$('.restActive').each(function () {
$(this).removeAttr("disabled");
$(this).removeClass("input-deactive");
});
}
</script>
<script>
document.getElementById("btnPrint").onclick = function () {
printElement(document.getElementById("printThis"));
}
function printElement(elem) {
var domClone = elem.cloneNode(true);
var $printSection = document.getElementById("printSection");
if (!$printSection) {
$printSection = document.createElement("div");
$printSection.id = "printSection";
document.body.appendChild($printSection);
}
$printSection.innerHTML = "";
$printSection.appendChild(domClone);
window.print();
}
</script>
<script src="~/assetsclient/pages/checkouts/js/printone.js"></script>

View File

@@ -592,6 +592,8 @@
<None Include="wwwroot\AssetsClient\libs\select2\js\select2.full.min.js" />
<None Include="wwwroot\AssetsClient\libs\select2\js\select2.js" />
<None Include="wwwroot\AssetsClient\libs\select2\js\select2.min.js" />
<None Include="wwwroot\AssetsClient\pages\Checkouts\js\PrintOne.js" />
<None Include="wwwroot\AssetsClient\pages\Checkouts\js\PrintOneMobile.js" />
<None Include="wwwroot\AssetsClient\pages\Checkouts\js\PrintOneRollCall.js" />
<None Include="wwwroot\AssetsClient\pages\Employees\js\createleave.js" />
<None Include="wwwroot\AssetsClient\pages\Index\js\LeaveCreate.js" />

View File

@@ -36,12 +36,23 @@
visibility: hidden;
page-break-after: auto;
}
body {
background-color: #ffffff !important;
}
.container2, #printSection {
background-color: #ffffff !important;
}
html, body {
height: 100%;
margin: 0 !important;
padding: 0 !important;
overflow: hidden;
background-color: #ffffff !important;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
#printSection, #printSection * {

File diff suppressed because it is too large Load Diff