diff --git a/jey_wizard/__init__.py b/jey_wizard/__init__.py index 3dc1f76..485f44a 100644 --- a/jey_wizard/__init__.py +++ b/jey_wizard/__init__.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1" diff --git a/jey_wizard/public/js/jey_setup.js b/jey_wizard/public/js/jey_setup.js index c2870dc..a9dcd84 100644 --- a/jey_wizard/public/js/jey_setup.js +++ b/jey_wizard/public/js/jey_setup.js @@ -10,7 +10,7 @@ frappe.provide("jey_wizard"); // Bump this string in every commit that changes wizard code. Displayed in the badge so // we can tell at a glance which version is actually running on a given machine. Kept in // sync with __version__ in jey_wizard/__init__.py. -const JEY_WIZARD_VERSION = "0.1.0"; +const JEY_WIZARD_VERSION = "0.1.1"; // Wipe Frappe + ERPNext default slides so their `before_load`/`after_load` listeners // don't try to mutate a wizard that isn't slide-based anymore. @@ -368,14 +368,11 @@ frappe.setup.SetupWizard = class JeySetupWizard { `); } else if (this.amas_state === "done") { const n = (this.data.amas_selected_employees || []).length; - const existingCount = Object.keys(this.amas_existing_map || {}).length; - const newCount = n - existingCount; $body.html(`

✓ ${__("Employees ready to import")}

${__("Organization:")} ${frappe.utils.escape_html(this.data.amas_organization_name || "")}
${__("Employees found:")} ${n} - (${__("new")}: ${newCount < 0 ? n : newCount}, ${__("already in system")}: ${existingCount})

${__("All employees will be imported into ƏMAS Employees and the standard Employee doctype after the wizard finishes.")}

`); @@ -993,37 +990,7 @@ frappe.setup.SetupWizard = class JeySetupWizard { return; } this.amas_employees = employees; - // Populate existing_map purely for the summary UI; the actual import - // updates existing records rather than skipping them, so no filtering. - const fins = employees - .map((e) => e.identification_number) - .filter(Boolean); - if (fins.length === 0) { - this.amas_existing_map = {}; - this.amas_commit_selection(); - return; - } - frappe.call({ - method: "frappe.client.get_list", - args: { - doctype: "Employee", - filters: { passport_number: ["in", fins] }, - fields: ["name", "passport_number"], - limit_page_length: 0, - }, - callback: (r2) => { - const map = {}; - (r2.message || []).forEach((emp) => { - if (emp.passport_number) map[emp.passport_number] = emp.name; - }); - this.amas_existing_map = map; - this.amas_commit_selection(); - }, - error: () => { - this.amas_existing_map = {}; - this.amas_commit_selection(); - }, - }); + this.amas_commit_selection(); }, }); }