Progress bar is not hiding

I want to add progress bar but after adding progress bar it is not hiding.

function getAttendancePercentage() {
		frappe.show_progress('Loading..', 70, 100, 'Please wait');
		frappe.call({
			method: "test.test.page.report.getData",
			callback: function (res) {
				frappe.show_progress('Loading..', 100, 100, 'Please wait');	
				
			}
		});
	}
}

Just pass another ‘true’ argument, that’s all

example:

frappe.show_progress('Loading..', 100, 100, 'Please wait', true);	
2 Likes

I am passing true from the condition to hide but the dialog is not hiding ,

what is the mistake in my code?

frm.add_custom_button(__('Progress Dialog'), function() {
    for (let i = 1; i <= 100; i++) {
        if (i % 10 === 0) continue;  // Skip multiples of 10
        setTimeout(function() {
            console.log(i);
            frappe.show_progress('Loading..', i, 100, 'Please wait',i>=99);
        }, 10 * i);  // Multiply delay by `i` to achieve a cumulative delay
    }
}, __("Dialog Examples"));