Skip to content

Commit f577358

Browse files
Derive Waterline detail badges from actionability
Use actionability annotations to drive Waterline run detail badges and keep row badge rendering aligned with the typed actionability contract.
1 parent b2bf471 commit f577358

4 files changed

Lines changed: 25 additions & 4 deletions

File tree

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=b411ae7fdc166fb6effcde55a370168f",
2+
"/app.js": "/app.js?id=b6f447fe8ac9cf47732560f28dd409d8",
33
"/app-dark.css": "/app-dark.css?id=64d24ee96944ffdb4b26a9be1658c1e3",
44
"/app.css": "/app.css?id=d525454610dfd3c5a581fc49676f8a37",
55
"/img/favicon.png": "/img/favicon.png?id=7c006241b093796d6abfa3049df93a59",

resources/js/screens/flows/flow-row.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
repairBlocked(flow) {
247247
const badge = this.actionabilityBadge(flow, 'repair')
248248
249-
if (badge) {
249+
if (badge || this.hasActionabilityPayload(flow)) {
250250
return badge
251251
}
252252
@@ -286,7 +286,7 @@
286286
taskProblem(flow) {
287287
const badge = this.actionabilityBadge(flow, 'task_problem')
288288
289-
if (badge) {
289+
if (badge || this.hasActionabilityPayload(flow)) {
290290
return badge
291291
}
292292
@@ -302,6 +302,10 @@
302302
return badges && badges[name] ? badges[name] : null
303303
},
304304
305+
hasActionabilityPayload(flow) {
306+
return !!(flow && flow.actionability && typeof flow.actionability === 'object')
307+
},
308+
305309
showCompatibilityEntryBadge(flow) {
306310
return flow && flow.declared_entry_mode === 'compatibility'
307311
},

resources/js/screens/flows/flow.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,6 +2253,12 @@ export default {
22532253
},
22542254
22552255
taskProblemBadge(flow) {
2256+
const badge = this.actionabilityBadge(flow, 'task_problem')
2257+
2258+
if (badge || this.hasActionabilityPayload(flow)) {
2259+
return badge
2260+
}
2261+
22562262
return flow && flow.task_problem_badge
22572263
? flow.task_problem_badge
22582264
: null
@@ -2272,6 +2278,17 @@ export default {
22722278
}[(badge && badge.tone) || 'secondary'] || 'badge badge-secondary'
22732279
},
22742280
2281+
actionabilityBadge(flow, name) {
2282+
const actionability = flow && flow.actionability ? flow.actionability : null
2283+
const badges = actionability && actionability.badges ? actionability.badges : null
2284+
2285+
return badges && badges[name] ? badges[name] : null
2286+
},
2287+
2288+
hasActionabilityPayload(flow) {
2289+
return !!(flow && flow.actionability && typeof flow.actionability === 'object')
2290+
},
2291+
22752292
compatibilityFleetSummary(supported) {
22762293
if (supported === true) {
22772294
return 'yes'

0 commit comments

Comments
 (0)