Say in the Where block that its lines add up
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0a1d3c67c7
commit
308d2c5eff
2 files changed
+16
-12
No files matched your search
+11
-7
@@ -198,21 +198,25 @@
|
||||
}
|
||||
|
||||
// The Where block in words, one sentence of the lines a role may match,
|
||||
// with the one-of rows among them since they are the same group: "Roles in
|
||||
// Denmark, in Malmö, Lund or Helsingborg, or remote within Europe."
|
||||
// with the one-of rows among them since they are the same group: "Keeps
|
||||
// roles anywhere in Denmark, in Malmö, Lund or Helsingborg, or remote within
|
||||
// Europe, and leaves out the rest." The lines add up, which the first
|
||||
// wording ("Roles in ...") left the owner to guess.
|
||||
function whereSentence(where, others) {
|
||||
const parts = [];
|
||||
if (where.countries) parts.push(phrase(where.countries));
|
||||
if (where.countries) parts.push(`anywhere ${phrase(where.countries)}`);
|
||||
if (where.places) parts.push(phrase(where.places));
|
||||
if (where.remote) parts.push(where.europe ? "remote within Europe" : "remote");
|
||||
parts.push(...others.map(phrase));
|
||||
if (!parts.length) return "";
|
||||
return `Roles ${parts.length < 2 ? parts[0] : `${parts.slice(0, -1).join(", ")}, or ${parts[parts.length - 1]}`}.`;
|
||||
const list = parts.length < 2 ? parts[0] : `${parts.slice(0, -1).join(", ")}, or ${parts[parts.length - 1]}`;
|
||||
return `Keeps roles ${list}, and leaves out the rest.`;
|
||||
}
|
||||
|
||||
// The gates in words: where a role may be, then what it must meet, then
|
||||
// what lifts it. "Roles in Denmark, or remote within Europe. Only roles
|
||||
// with seniority senior. Prefers hybrid."
|
||||
// what lifts it. "Keeps roles anywhere in Denmark, or remote within Europe,
|
||||
// and leaves out the rest. Only roles with seniority senior. Prefers
|
||||
// hybrid."
|
||||
function rulesLine(gates) {
|
||||
const { where, rest } = distribute(gates);
|
||||
const of = (mode) => rest.filter((g) => g.mode === mode);
|
||||
@@ -604,7 +608,7 @@
|
||||
const view = () => {
|
||||
offerScope();
|
||||
$("#a-gates", f).value = JSON.stringify(gates(), null, 2);
|
||||
$("#a-where-sum", f).textContent = rulesLine(gates()) || "Roles anywhere.";
|
||||
$("#a-where-sum", f).textContent = rulesLine(gates()) || "Keeps roles anywhere.";
|
||||
};
|
||||
view();
|
||||
|
||||
|
||||
Reference in new issue
Block a user