Migrate remaining legacy operator workflows
This commit is contained in:
@@ -171,6 +171,14 @@
|
||||
return [null, null];
|
||||
}
|
||||
|
||||
function krxIdentityEnvelope(value) {
|
||||
const pair = normalizePair(value);
|
||||
if (!pair || pair.some(target => target.kind !== "krx-stock")) return "";
|
||||
return pair
|
||||
.map(target => `${target.market === "kospi" ? "KOSPI" : "KOSDAQ"}:${target.stockCode}`)
|
||||
.join("|");
|
||||
}
|
||||
|
||||
function normalizePair(value) {
|
||||
const [firstValue, secondValue] = pairParts(value);
|
||||
const first = normalizeTarget(firstValue);
|
||||
@@ -288,6 +296,10 @@
|
||||
const builderKey = selectedAction.kind === "return" ? "s5029" : selectedAction.builderKey;
|
||||
const code = selectedAction.kind === "return" ? "5029" : selectedAction.code;
|
||||
const graphicType = selectedAction.kind === "return" ? "RETURN_COMPARISON" : selectedAction.graphicType;
|
||||
const dataCode = krxIdentityEnvelope(pair);
|
||||
if (!dataCode) {
|
||||
throw new RangeError("Comparison graphs require two exact KRX stock identities.");
|
||||
}
|
||||
return Object.freeze({
|
||||
builderKey,
|
||||
code,
|
||||
@@ -297,7 +309,7 @@
|
||||
subject,
|
||||
graphicType,
|
||||
subtype: selectedAction.period,
|
||||
dataCode: ""
|
||||
dataCode
|
||||
}),
|
||||
effectiveMode: compatibility.effectiveMode,
|
||||
warning: compatibility.warning
|
||||
@@ -482,6 +494,7 @@
|
||||
getCompatibility,
|
||||
isActionAllowed,
|
||||
buildComparisonSelection,
|
||||
krxIdentityEnvelope,
|
||||
createComparisonPlaylistEntry,
|
||||
createYieldBatchEntries,
|
||||
restoreComparisonPlaylistEntry,
|
||||
|
||||
Reference in New Issue
Block a user