Compare the full board target in Replace board
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
57142ab2f2
commit
0e268f3f3c
2 files changed
+7
-5
No files matched your search
@@ -217,8 +217,8 @@
|
||||
// Replacing a different board closes its roles (see set_board in
|
||||
// app/jobs/sources.py); ask first, naming both boards and the count,
|
||||
// the same as Detach and a removed search already do.
|
||||
if (company.board && company.board !== board
|
||||
&& !window.confirm(`Replace ${company.name}'s board (${company.board}) `
|
||||
if (company.target && company.target !== board
|
||||
&& !window.confirm(`Replace ${company.name}'s board (${company.target}) `
|
||||
+ `with ${board}? Its ${count(company.open_roles, "open role")} close.`)) {
|
||||
return;
|
||||
}
|
||||
@@ -429,8 +429,8 @@
|
||||
// editor does, so it asks first too.
|
||||
const existing = [...companies.values()]
|
||||
.find((c) => c.name.toLowerCase() === name.toLowerCase());
|
||||
if (existing && existing.board && existing.board !== board
|
||||
&& !window.confirm(`Replace ${existing.name}'s board (${existing.board}) `
|
||||
if (existing && existing.target && existing.target !== board
|
||||
&& !window.confirm(`Replace ${existing.name}'s board (${existing.target}) `
|
||||
+ `with ${board}? Its ${count(existing.open_roles, "open role")} close.`)) {
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-1
@@ -597,6 +597,7 @@ def test_companies_lists_board_and_open_role_count(
|
||||
assert res.status_code == 200
|
||||
[row] = [c for c in res.json() if c["key"] == "acme"]
|
||||
assert row == {"key": "acme", "name": "Acme", "notes": "", "board": "greenhouse",
|
||||
"target": "greenhouse:acme",
|
||||
"subscription_id": sub.id, "on": True, "affinity": 0, "open_roles": 1,
|
||||
"ats": "greenhouse", "ats_slug": "", "careers_url": "",
|
||||
"country": "DK", "city": "", "domain": "", "watch": None,
|
||||
@@ -1449,7 +1450,8 @@ def test_a_company_is_added_by_hand_with_a_reason_and_a_link(
|
||||
assert res.status_code == 201, res.text
|
||||
assert res.json() == {
|
||||
"key": "revolut", "name": "Revolut Ltd", "domain": "", "notes": "wants a login",
|
||||
"board": "", "subscription_id": None, "on": None, "affinity": 0, "open_roles": 0,
|
||||
"board": "", "target": "", "subscription_id": None, "on": None, "affinity": 0,
|
||||
"open_roles": 0,
|
||||
"ats": "", "ats_slug": "", "careers_url": "https://revolut.example/careers",
|
||||
"country": "", "city": "", "watch": None, "careers_opened_at": "",
|
||||
"failing_since": "", "failing_reason": "", "from_search": False,
|
||||
|
||||
Reference in new issue
Block a user