Gate all disconnect rules on PTW70 product line

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michael-A-SloanandCursor committed 2026-05-05 15:31:40 -04:00
1 parent f350c5ba7d
commit cc8f3ecf5f
10 files changed
+31 -19

No files matched your search

+8 -2
View File
@@ -7,7 +7,7 @@
'PTW_DAPPER', 'PTW_COOREVAL', 'PTW_CAPTOR', 'PTW_IEC_FAULT', 'PTW_IEC61363'
];
/** Exact match on Feature cell only; Product must look like PTW70 (e.g. "1 PTW70") so "9"/"19" do not fire on other lines. */
/** Exact Feature cell match; only evaluated when Product contains PTW70 (same product gate as PTW_* keywords). */
const TARGET_FEATURE_IDS = ['19', '9'];
window.__ptw_logQueue = window.__ptw_logQueue || [];
@@ -54,6 +54,12 @@
return TARGET_KEYWORDS.some(function (k) { return feature.indexOf(k) !== -1; });
}
/** PTW_* strings must appear in Feature; Product must contain PTW70 (e.g. "1 PTW70") for any auto-disconnect. */
function matchesPtw70FeatureKeyword(product, feature) {
if (!isPtw70Product(product)) return false;
return matchesKeywordInFeature(feature);
}
function matchesFeatureId(product, feature) {
if (!isPtw70Product(product)) return false;
return TARGET_FEATURE_IDS.some(function (id) { return feature === id; });
@@ -64,7 +70,7 @@
const rows = document.querySelectorAll('#mydata table.list tr');
rows.forEach(function (row) {
var pf = productFeatureCells(row);
const keywordMatch = matchesKeywordInFeature(pf.feature);
const keywordMatch = matchesPtw70FeatureKeyword(pf.product, pf.feature);
const idMatch = matchesFeatureId(pf.product, pf.feature);
if (keywordMatch || idMatch) {
const disconnectLink = row.querySelector('a.sbutton');