fix(wizard): import on short queue + drop org role column (v0.1.34)
- Route the post-setup ƏMAS employee import to the "short" RQ queue so it
starts promptly instead of waiting ~a minute behind the post-setup
backlog on the single worker's default queue.
- Organization selection: remove the Role column ("Hüquqi şəxs" on every
row); organization name + VÖEN are enough.
- Bump version badge to 0.1.34.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
732e6483b2
commit
05aac039a9
|
|
@ -1 +1 @@
|
||||||
__version__ = "0.1.33"
|
__version__ = "0.1.34"
|
||||||
|
|
|
||||||
|
|
@ -1277,6 +1277,10 @@ def _materialize_amas_employees(company_name):
|
||||||
employees_data=json.dumps(employees, ensure_ascii=False),
|
employees_data=json.dumps(employees, ensure_ascii=False),
|
||||||
company=company_name,
|
company=company_name,
|
||||||
create_designation=create_designation,
|
create_designation=create_designation,
|
||||||
|
# "short" queue jumps ahead of the post-setup backlog on "default",
|
||||||
|
# so employees start importing as soon as the single worker frees
|
||||||
|
# instead of after a minute of waiting.
|
||||||
|
queue="short",
|
||||||
)
|
)
|
||||||
# New (post-parallel-import refactor) response shape:
|
# New (post-parallel-import refactor) response shape:
|
||||||
# {success: True, enqueued: True, total: N}
|
# {success: True, enqueued: True, total: N}
|
||||||
|
|
@ -1296,6 +1300,7 @@ def _materialize_amas_employees(company_name):
|
||||||
employees_data=json.dumps(employees, ensure_ascii=False),
|
employees_data=json.dumps(employees, ensure_ascii=False),
|
||||||
company=company_name,
|
company=company_name,
|
||||||
create_designation=create_designation,
|
create_designation=create_designation,
|
||||||
|
queue="short",
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
frappe.log_error(
|
frappe.log_error(
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ frappe.provide("jey_wizard");
|
||||||
// Bump this string in every commit that changes wizard code. Displayed in the badge so
|
// 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
|
// 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.
|
// sync with __version__ in jey_wizard/__init__.py.
|
||||||
const JEY_WIZARD_VERSION = "0.1.33";
|
const JEY_WIZARD_VERSION = "0.1.34";
|
||||||
|
|
||||||
// Wipe Frappe + ERPNext default slides so their `before_load`/`after_load` listeners
|
// 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.
|
// don't try to mutate a wizard that isn't slide-based anymore.
|
||||||
|
|
@ -381,12 +381,10 @@ frappe.setup.SetupWizard = class JeySetupWizard {
|
||||||
const rows = (this.amas_accounts || []).map((a, i) => {
|
const rows = (this.amas_accounts || []).map((a, i) => {
|
||||||
const name = a.accountName || a.name || "";
|
const name = a.accountName || a.name || "";
|
||||||
const voen = a.accountNumber || a.voen || a.number || "";
|
const voen = a.accountNumber || a.voen || a.number || "";
|
||||||
const role = a.roleName || a.role || "";
|
|
||||||
return `
|
return `
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding:8px;border-bottom:1px solid #eee">${frappe.utils.escape_html(name)}</td>
|
<td style="padding:8px;border-bottom:1px solid #eee">${frappe.utils.escape_html(name)}</td>
|
||||||
<td style="padding:8px;border-bottom:1px solid #eee;font-family:monospace">${frappe.utils.escape_html(voen)}</td>
|
<td style="padding:8px;border-bottom:1px solid #eee;font-family:monospace">${frappe.utils.escape_html(voen)}</td>
|
||||||
<td style="padding:8px;border-bottom:1px solid #eee">${frappe.utils.escape_html(role)}</td>
|
|
||||||
<td style="padding:8px;border-bottom:1px solid #eee;text-align:right">
|
<td style="padding:8px;border-bottom:1px solid #eee;text-align:right">
|
||||||
<button class="btn btn-sm btn-primary jey-amas-acc-pick" data-idx="${i}">${__("Select")}</button>
|
<button class="btn btn-sm btn-primary jey-amas-acc-pick" data-idx="${i}">${__("Select")}</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -401,7 +399,6 @@ frappe.setup.SetupWizard = class JeySetupWizard {
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<th style="text-align:left;padding:8px;border-bottom:2px solid #ccc">${__("Organization")}</th>
|
<th style="text-align:left;padding:8px;border-bottom:2px solid #ccc">${__("Organization")}</th>
|
||||||
<th style="text-align:left;padding:8px;border-bottom:2px solid #ccc">${__("VÖEN")}</th>
|
<th style="text-align:left;padding:8px;border-bottom:2px solid #ccc">${__("VÖEN")}</th>
|
||||||
<th style="text-align:left;padding:8px;border-bottom:2px solid #ccc">${__("Role")}</th>
|
|
||||||
<th style="padding:8px;border-bottom:2px solid #ccc"></th>
|
<th style="padding:8px;border-bottom:2px solid #ccc"></th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>${rows}</tbody>
|
<tbody>${rows}</tbody>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue