|
|
|
|
@@ -69,7 +69,7 @@ $(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
var isDefaultMonthYear = (paramsUrl["year"] === year && paramsUrl["month"] === month);
|
|
|
|
|
|
|
|
|
|
if (isAnyNotEmpty && !isDefaultMonthYear) {
|
|
|
|
|
if (isAnyNotEmpty) {
|
|
|
|
|
$('.btn-clear-filter').removeClass('disable');
|
|
|
|
|
} else {
|
|
|
|
|
$('.btn-clear-filter').addClass('disable');
|
|
|
|
|
@@ -177,13 +177,35 @@ function removeSearch() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function loadGetTabCounts() {
|
|
|
|
|
var paramsUrl = UrlParamsBuilder.readParams(["year", "month"]);
|
|
|
|
|
var paramsUrl = UrlParamsBuilder.readParams([
|
|
|
|
|
"year",
|
|
|
|
|
"month",
|
|
|
|
|
"workshop-code",
|
|
|
|
|
"employee-id",
|
|
|
|
|
"workshop-id",
|
|
|
|
|
"type-of-insurance",
|
|
|
|
|
//"branch",
|
|
|
|
|
//"city",
|
|
|
|
|
"fixed-salary"
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
var yearSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['year']) : year;
|
|
|
|
|
var monthSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['month']) : month;
|
|
|
|
|
var searchModel = {
|
|
|
|
|
Year: paramsUrl['year'] !== "" ? paramsUrl['year'] : year,
|
|
|
|
|
Month: paramsUrl['month'] !== "" ? paramsUrl['month'] : month,
|
|
|
|
|
WorkShopCode: paramsUrl['workshop-code'],
|
|
|
|
|
EmployerId: paramsUrl['employee-id'],
|
|
|
|
|
WorkshopId: paramsUrl['workshop-id'],
|
|
|
|
|
TypeOfInsuranceSend: paramsUrl['type-of-insurance'],
|
|
|
|
|
//Branch: paramsUrl['branch'],
|
|
|
|
|
//City: paramsUrl['city'],
|
|
|
|
|
FixedSalary: paramsUrl['fixed-salary']
|
|
|
|
|
};
|
|
|
|
|
//var paramsUrl = UrlParamsBuilder.readParams(["year", "month"]);
|
|
|
|
|
//var yearSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['year']) : year;
|
|
|
|
|
//var monthSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['month']) : month;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
var response = await ajaxService.get(ajaxGetTabCountsUrl, { month: monthSelect, year: yearSelect }, true);
|
|
|
|
|
var response = await ajaxService.get(ajaxGetTabCountsUrl, searchModel, true);
|
|
|
|
|
|
|
|
|
|
updateStatus('notStarted', response.notStarted);
|
|
|
|
|
updateStatus('inProgress', response.inProgress);
|
|
|
|
|
@@ -259,8 +281,8 @@ function loadSearchNew(status = 0) {
|
|
|
|
|
if (b === 0 && hasMoreData) {
|
|
|
|
|
ajaxService.get(ajaxSearchNewUrl, searchModel, false)
|
|
|
|
|
.then(response => {
|
|
|
|
|
|
|
|
|
|
var responseData = response.data;
|
|
|
|
|
|
|
|
|
|
if (responseData.length > 0) {
|
|
|
|
|
responseData.forEach(function (item) {
|
|
|
|
|
var n = pageIndexJs + 1;
|
|
|
|
|
@@ -313,7 +335,7 @@ function loadSearchNew(status = 0) {
|
|
|
|
|
${booleanSvgResponse(item.employerApproved)}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="insurance-table__cell tw-w-[7%] tw-text-center tw-flex tw-justify-center">
|
|
|
|
|
${booleanSvgResponse(item.confirmSentlist)}
|
|
|
|
|
${booleanSvgResponse(item.confirmSentlist, item.employerApprovalStatus)}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="insurance-table__cell tw-w-[13%] tw-text-end">
|
|
|
|
|
<div class="tw-flex tw-justify-end tw-gap-2">
|
|
|
|
|
@@ -412,7 +434,7 @@ function loadSearchNew(status = 0) {
|
|
|
|
|
|
|
|
|
|
<div class="insurance-table__toggle-item tw-flex tw-items-center tw-w-[50%] tw-gap-2">
|
|
|
|
|
<span class="insurance-table__toggle-label">ارسال لیست: </span>
|
|
|
|
|
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.confirmSentlist)}</span>
|
|
|
|
|
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.confirmSentlist, item.employerApprovalStatus)}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@@ -498,7 +520,7 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
|
|
|
|
</button>`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item.inspectionDone && item.debtDone && item.employerApproved) {
|
|
|
|
|
if (item.inspectionDone && item.debtDone && item.employerApproved || item.confirmSentlist) {
|
|
|
|
|
// Download Button
|
|
|
|
|
if (hasPermission_80216) {
|
|
|
|
|
html += `
|
|
|
|
|
@@ -525,7 +547,7 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//if (item.inspectionDone && item.debtDone && item.employerApproved && item.confirmSentlist) {
|
|
|
|
|
if (item.inspectionDone || item.debtDone || item.employerApproved) {
|
|
|
|
|
if (item.inspectionDone || item.debtDone || item.employerApproved || item.confirmSentlist) {
|
|
|
|
|
// Confirm List and Print Button
|
|
|
|
|
if (hasPermission_80215) {
|
|
|
|
|
html += `
|
|
|
|
|
@@ -543,7 +565,7 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (item.inspectionDone || item.debtDone || item.employerApproved) {
|
|
|
|
|
if (item.inspectionDone || item.debtDone || item.employerApproved || item.confirmSentlist) {
|
|
|
|
|
// Summary List and Print Button
|
|
|
|
|
if (hasPermission_80214) {
|
|
|
|
|
html += `
|
|
|
|
|
@@ -600,7 +622,9 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
|
|
|
|
return isMobile ? htmlMobile : html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function booleanSvgResponse(bool) {
|
|
|
|
|
function booleanSvgResponse(bool, employerApprovalStatus) {
|
|
|
|
|
var isWrittenVerbal = employerApprovalStatus === 1;
|
|
|
|
|
|
|
|
|
|
var svg = ``;
|
|
|
|
|
if (bool) {
|
|
|
|
|
svg = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
@@ -610,9 +634,9 @@ function booleanSvgResponse(bool) {
|
|
|
|
|
</svg>`;
|
|
|
|
|
} else {
|
|
|
|
|
svg = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
<circle cx="12" cy="12" r="9" fill="#E0C7D2"/>
|
|
|
|
|
<path d="M16 8L8 16" stroke="#E54B4B" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
|
|
|
<path d="M8 8L16 16" stroke="#E54B4B" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
|
|
|
<circle cx="12" cy="12" r="9" fill="${isWrittenVerbal ? `#B4D8FF` : `#E0C7D2`}"/>
|
|
|
|
|
<path d="M16 8L8 16" stroke="${isWrittenVerbal ? `#6D4BE5` : `#E54B4B`}" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
|
|
|
<path d="M8 8L16 16" stroke="${isWrittenVerbal ? `#6D4BE5` : `#E54B4B`}" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
|
|
|
</svg>`;
|
|
|
|
|
}
|
|
|
|
|
return svg;
|
|
|
|
|
|