Skip to content

Commit

Permalink
sched icon - use sub context
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeTWC1984 committed Sep 25, 2023
1 parent 253ccf6 commit cf02618
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdocs/js/pages/Schedule.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,20 +521,22 @@ toggle_token: function () {
},

render_schedule_graph: function () {

var sNodes = []
var sEdges = []
var catMap = Object.fromEntries(app.categories.map(i => [i.id, i]))

let events = app.schedule || []
let currEvent = this.event || {} // will exist for "edit event" mode
const args = this.args || {};


events.forEach((job, index) => {
let jobGroup = job.enabled ? job.category : 'disabled';
let jobCat = catMap[job.category] || {} ;

let iconCd = job.id === currEvent.id ? $("#fe_ee_graph_icon").val() || job.graph_icon : job.graph_icon
// if in event edit mode - use current icon for preview
let iconCd = args.sub == 'edit_event' && job.id === currEvent.id ? $("#fe_ee_graph_icon").val() : job.graph_icon
let code = parseInt(iconCd, 16) || 61713
if(Array.isArray(job.workflow)) code = 61563
let jobIcon = String.fromCodePoint(code);
Expand Down

0 comments on commit cf02618

Please sign in to comment.