Calendar issue (item and siblings)

Hello, my problem is in old codebase i have to add an feature the feature is if the is an item under another item in calendar it should become a siblings like in picture below i tried to do like this :

      if(l.span > 1 && l.item.firstDay['_d'] != l.item.lastDay['_d']){
        let otherItems = [] => {
          if(item.workOrderId != l.item.workOrderId && moment(item.get('firstDay')).isSame(l.item.get('lastDay', 'day'))){
          // l.item.siblings.push(item.workOrderId)
          l.item.set("siblings", l.siblings)

the code is :

weekTeams: computed("teams", "teams.@each.position", "from", "to", "items.@each.updatedAt", function(){
    const within = moment.range(this.get("from"), this.get("to")),
          allItems = this.get("items"),
          teams = this.get("teams");


      const items = allItems.filterBy("", team.get("")),
            teamDays = [];"days", (d)=>{
        const dItems = items.filter(function(i){

          return i.withinRange(moment(d).subtract("hour", 1), moment(d).add("hour", 1));

          day: d.toDate(),
          dayDef: this.dayDefFor(d),
          items: dItems
      const lanes = getLanes(teamDays);
      lanes.get("lastObject").last = true;
      return {
        teamId: items.get(""),
        team: team.get("foreman"),
        boardTeam: team,
        position: team.get("position"),
        firstLane: lanes[0],
        otherLanes: lanes.slice(1),
        lanesLength: lanes.length

  teamSort: ["position:asc"],
  teamsSorted: sort("weekTeams", "teamSort")

Hi, I’d like to help but this question is not really well-formed. There’s not enough context for a reader to know what most of this code means, and you didn’t ask any specific questions.

Can you break down your question to more specific smaller questions?