Premium support for our pure JavaScript UI components


Post by liuyan@honeycombtech »

Thank you very much. It works very well.


Post by liuyan@honeycombtech »

Hi alex.l,

Last week, the same code it works. But now it doesn't work. The only difference is installing node_modules again.

Attachments
projectModel.zip
(172.09 KiB) Downloaded 54 times

Post by alex.l »

I see old code in your sources:

 changeOrder() {
      // create new array with resources
      const res = this.resources.map((item) => {
        item.name = "11111";
        return item;
      });
      // assign new data to bound variable
      this.resources = res;

  // same for events
  const evts = this.events.map((item) => {
    item.name = "event 111";
    return item;
  });
  if (evts.length === 1 || this.value === "b") {
    evts.push({
      // id: 2,
      resourceId: 2,
      name: "event BB 1111",
      startDate: "2022-03-24T03:00",
      endDate: "2022-03-24T05:00",
      iconCls: "b-fa",
      eventColor: "orange",
    });
  }
  this.events = evts;
},

Check my last response and update it accordingly.
Let us know if you figured out.

All the best,
Alex


Post by liuyan@honeycombtech »

Hi,
It can not run.

2022-05-11 16.30.14.gif
2022-05-11 16.30.14.gif (3.83 MiB) Viewed 423 times
projectModel.zip
(172.09 KiB) Downloaded 52 times

Post by alex.l »

I don't follow. Please describe your problem in more words. I am not sure what do you want to achieve by your code and what is correct behaviour of it. Actual result and expected result with steps to reproduce would be perfect.

Check dates you used for added event and visible date range, if you are talking about adding 2nd event and not about renaming initial dataset. If you zoom out, you will see it's added according to dates you set.

All the best,
Alex


Post by liuyan@honeycombtech »

Hi,
Thank you very much. It's my fault. I didn't notice the date.


Post Reply