Merge branch 'r2-backend'
# Conflicts: # app/storage/schema.py
This commit is contained in:
commit
562fa3ab09
15 files changed
+924
-157
No files matched your search
@@ -289,14 +289,16 @@
|
||||
render();
|
||||
}
|
||||
|
||||
// Start the `score` job and wait for it, so "scored" means the Roles tab
|
||||
// already orders by what was saved. `said` is what happened first.
|
||||
// Ask for a `score` and wait for the job the server answers with, so
|
||||
// "scored" means the Roles tab already orders by what was saved. While a
|
||||
// score is running that is a follow-up queued after it, since the running
|
||||
// one read the agent before the save. `said` is what happened first.
|
||||
async function rescore(status, agent, said) {
|
||||
const runs = () => link("/settings/sources#runs", "follow it under Runs");
|
||||
status.replaceChildren(`${said}. Scoring every open role; `, runs(), ".");
|
||||
let job;
|
||||
try {
|
||||
job = await api("/api/jobs", { method: "POST", body: { kind: "score", payload: {} } });
|
||||
job = await api("/api/score", { method: "POST" });
|
||||
} catch (err) {
|
||||
status.textContent = `${said}, but scoring did not start.`;
|
||||
return;
|
||||
|
||||
@@ -71,9 +71,12 @@
|
||||
: "own site";
|
||||
sub.appendChild(badge);
|
||||
sub.append(" · not readable yet");
|
||||
} else if (company.from_search) {
|
||||
// Nobody followed it: its roles came from a search, and it was judged.
|
||||
sub.append("from job boards");
|
||||
} else {
|
||||
// Every row comes from the seed, Follow or discover: none of them
|
||||
// found where this company posts its roles.
|
||||
// Followed by the seed, Follow or discover, and none of them found
|
||||
// where this company posts its roles.
|
||||
sub.append("board not found");
|
||||
}
|
||||
if (company.careers_url && !company.board) {
|
||||
@@ -214,7 +217,7 @@
|
||||
case "hidden": return company.affinity === -1;
|
||||
case "on": return company.on === true;
|
||||
case "off": return company.on === false;
|
||||
case "unreadable": return company.subscription_id == null;
|
||||
case "unreadable": return company.subscription_id == null && !company.from_search;
|
||||
default: return true;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -834,12 +834,14 @@
|
||||
}
|
||||
|
||||
/* The company's ★ ▲ ⊘, the one place a company is judged outside the
|
||||
Companies page. A company seen only through a search has no row of its
|
||||
own to judge. A change dims or undims its rows in the feed. */
|
||||
Companies page. A company seen only through a search has no row until
|
||||
its first change creates one, so the list is reloaded then. A change
|
||||
dims or undims its rows in the feed. */
|
||||
function renderAffinity(slot, r) {
|
||||
const company = companies.get(r.company_key);
|
||||
if (!company) { slot.replaceChildren(); return; }
|
||||
slot.replaceChildren(affinityControl(r.company_key, company.affinity, () => {
|
||||
if (!r.company_key) { slot.replaceChildren(); return; }
|
||||
slot.replaceChildren(affinityControl(r.company_key, company ? company.affinity : 0, async () => {
|
||||
if (!company) await loadCompanies(state.filter.agent).catch(() => {});
|
||||
renderAffinity(slot, r);
|
||||
renderFeed();
|
||||
}, state.filter.agent));
|
||||
|
||||
Reference in new issue
Block a user