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,
|
// 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
|
// with the one-of rows among them since they are the same group: "Keeps
|
||||||
// Denmark, in Malmö, Lund or Helsingborg, or remote within Europe."
|
// 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) {
|
function whereSentence(where, others) {
|
||||||
const parts = [];
|
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.places) parts.push(phrase(where.places));
|
||||||
if (where.remote) parts.push(where.europe ? "remote within Europe" : "remote");
|
if (where.remote) parts.push(where.europe ? "remote within Europe" : "remote");
|
||||||
parts.push(...others.map(phrase));
|
parts.push(...others.map(phrase));
|
||||||
if (!parts.length) return "";
|
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
|
// 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
|
// what lifts it. "Keeps roles anywhere in Denmark, or remote within Europe,
|
||||||
// with seniority senior. Prefers hybrid."
|
// and leaves out the rest. Only roles with seniority senior. Prefers
|
||||||
|
// hybrid."
|
||||||
function rulesLine(gates) {
|
function rulesLine(gates) {
|
||||||
const { where, rest } = distribute(gates);
|
const { where, rest } = distribute(gates);
|
||||||
const of = (mode) => rest.filter((g) => g.mode === mode);
|
const of = (mode) => rest.filter((g) => g.mode === mode);
|
||||||
@@ -604,7 +608,7 @@
|
|||||||
const view = () => {
|
const view = () => {
|
||||||
offerScope();
|
offerScope();
|
||||||
$("#a-gates", f).value = JSON.stringify(gates(), null, 2);
|
$("#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();
|
view();
|
||||||
|
|
||||||
|
|||||||
@@ -28,18 +28,18 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="where">
|
<fieldset class="where">
|
||||||
<legend>Where can the role be?</legend>
|
<legend>Where can the role be?</legend>
|
||||||
<span class="hint">A role passes when it matches any line; with none filled in, it can be anywhere. A role whose location is not known yet ranks until extract reads the posting.</span>
|
<span class="hint">Each line adds places. A role is kept when it fits at least one line, so a line more means more roles, never fewer. With every line empty a role can be anywhere. A role whose location is not known yet ranks until extract reads the posting.</span>
|
||||||
<div class="where-line">
|
<div class="where-line">
|
||||||
<span>In these countries</span>
|
<span>Anywhere in</span>
|
||||||
<div id="a-countries"></div>
|
<div id="a-countries"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="where-line">
|
<div class="where-line">
|
||||||
<span>In these towns</span>
|
<span>or in the towns</span>
|
||||||
<div id="a-towns"></div>
|
<div id="a-towns"></div>
|
||||||
</div>
|
</div>
|
||||||
<span class="hint">A town matches as part of the location, so Lund matches "Lund, Sweden": it is for towns outside the countries above.</span>
|
<span class="hint">Towns are for places outside the countries above: with Denmark above, Malmö here adds Malmö to all of Denmark. A town inside a country above changes nothing, since the whole country is in already.</span>
|
||||||
<div class="where-line">
|
<div class="where-line">
|
||||||
<label class="inline"><input type="checkbox" id="a-remote"> Remote</label>
|
<label class="inline"><input type="checkbox" id="a-remote"> or remote</label>
|
||||||
<select id="a-remote-scope" aria-label="Remote from where">
|
<select id="a-remote-scope" aria-label="Remote from where">
|
||||||
<option value="europe">within Europe</option>
|
<option value="europe">within Europe</option>
|
||||||
<option value="anywhere">anywhere</option>
|
<option value="anywhere">anywhere</option>
|
||||||
|
|||||||
Reference in new issue
Block a user