简体   繁体   English

FullCalendar Resource TimeLineView 中每个资源的多个营业时间

[英]FullCalendar Multiple businesshours per resource in Resource TimeLineView

I want to view multiple business hours in the ResourceTimeLine view, so I implemented multiple business hours for by resource.我想在 ResourceTimeLine 视图中查看多个营业时间,因此我按资源实现了多个营业时间。 For example, Monday to Wednesday - 8H to 17H and Thursday to Friday - 15H to 23H for a resource, other resource with another business hour.例如,星期一到星期三 - 8H 到 17H 和星期四到星期五 - 15H 到 23H 用于资源,其他资源具有另一个营业时间。

In Docs of Fullcalendar component ( https://fullcalendar.io/docs/businessHours-per-resource ) says its possible with an array:在 Fullcalendar 组件的文档 ( https://fullcalendar.io/docs/businessHours-per-resource ) 中说它可以使用数组:

businessHours: [ // specify an array instead
      {
        daysOfWeek: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
        startTime: '08:00', // 8am
        endTime: '18:00' // 6pm
      },
      {
        daysOfWeek: [ 4, 5 ], // Thursday, Friday
        startTime: '10:00', // 10am
        endTime: '16:00' // 4pm
      }
    ]

In Outsystems I define my Business Hours an array and It's ok, appears the correct information, but when I drag and drop an event to a resource it doesn't invoke the action to save the change.在 Outsystems 中,我将我的营业时间定义为一个数组,并且可以显示正确的信息,但是当我将事件拖放到资源中时,它不会调用操作来保存更改。

在此处输入图片说明

If I implement a single business hour it already invoke the action and save the change information when I drag and drop an event to a resource.如果我实现了一个营业时间,它已经在我将事件拖放到资源中时调用了该操作并保存了更改信息。 But I need multiple business hours.但我需要多个营业时间。 I don't find the source of this problem.我没有找到这个问题的根源。 Can you please help me?你能帮我么?

My Json object about Outsystems component of the Full Calendar, :我的关于完整日历的 Outsystems 组件的 Json 对象,:

"newResource":{
        "id":"8547",
        "title":"Adelino Silva",
        "parentId":"1",
        "businessHours":{
            "defs":{
                "0":    {"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{}, "publicId":"", "ui":{"startEditable":null, "durationEditable":null, "constraints":[], "overlap":null, "allows":[], "backgroundColor":"", "borderColor":"", "textColor":"", "classNames":["fc-nonbusiness"]}, "defId":"0", "sourceId":"", "allDay":false, "hasEnd":true, "resourceIds":[], "resourceEditable":null, "recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":28800000},"endTime":{"years":0, "months":0,"days":0, "milliseconds":45000000}, "startRecur":null,"endRecur":null}, "duration":{"years":0, "months":0, "days":0, "milliseconds":16200000}}},
                "1":{"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{},"publicId":"","ui":{"startEditable":null,"durationEditable":null,"constraints":[],"overlap":null,"allows":[],"backgroundColor":"","borderColor":"","textColor":"","classNames":["fc-nonbusiness"]},"defId":"1","sourceId":"","allDay":false,"hasEnd":true,"resourceIds":[],"resourceEditable":null,"recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":48600000},"endTime":{"years":0,"months":0,"days":0,"milliseconds":61200000},"startRecur":null,"endRecur":null},"duration":{"years":0,"months":0,"days":0,"milliseconds":12600000}}}
                },
            "instances":{}
        },

Next video example without business hours and with multiple business hours.下一个没有营业时间和多个营业时间的视频示例。

I found the problem.我发现了问题。 The problem is on CallbackEvent Structure, not accept the BusinessHours list by Resource.问题出在回调事件结构上,不接受资源的营业时间列表。 The solution: I created a Resource structure with single business hour for CallbackEvent Structure and it's work.解决方案:我为 CallbackEvent 结构创建了一个具有单一工作时间的资源结构,并且可以正常工作。

enter image description here在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM