jQuery UI Widgets Forums Scheduler Lock Status

This topic contains 11 replies, has 2 voices, and was last updated by  Todor 4 years, 7 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Lock Status Posts
  • Lock Status #106118

    mobiyan
    Participant

    Is there a way to lock status to “Out Of Office” for all items created?

    Lock Status #106122

    Todor
    Participant

    Hello mobiyan,

    I’m not quite sure what you mean by’lock status’, but you could set scheduler’s statuses with a statuses property. Also you could review the following example.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

    Lock Status #106124

    mobiyan
    Participant

    What I meant is I want to allow only Out Of Office status on all created appointments.

    Lock Status #106128

    mobiyan
    Participant

    I tried with

            this.scheduler.setAppointmentProperty(appointment.id, "status", "OutOfOffice");
    

    this.scheduler.setAppointmentProperty(appointment.id, “subject”, “test”);

    It works for the subject, but not for the status

    Lock Status #106129

    mobiyan
    Participant

    I created a sample to see it:

    https://stackblitz.com/edit/github-tkcks7

    Lock Status #106133

    Todor
    Participant

    Hello mobiyan,

    I’ve updated your sample. The only thing that I’ve change is status to “status” in this.scheduler.setAppointmentProperty(appointment.id, "status", "outOfOffice");.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

    Lock Status #106142

    mobiyan
    Participant

    Still not working, if you look at the sample in https://stackblitz.com/edit/github-tkcks7

    Lock Status #106143

    mobiyan
    Participant

    Sorry I saw that it is working in your version

    Lock Status #106144

    mobiyan
    Participant

    Thanks for your help!

    Lock Status #106145

    mobiyan
    Participant

    Hello @todor,

    I noticed that when using setAppointmentProperty, the data when calling getDataAppointments() is not reflecting the right values.

    0: Object
    calendar: “Room 1”
    description: “George brings projector for presentations.”
    end: “2018-11-23T21:00:00.000Z”
    id: “id1”
    location: “”
    start: “2018-11-23T14:00:00.000Z”
    status: “busy
    subject: “Quarterly Project Review Meeting

    Is there a missing step in the code?

    You can see the code in : https://stackblitz.com/edit/github-tkcks7

    Lock Status #106146

    mobiyan
    Participant

    When using the GetAppointment you see clearly that the data is not in sync:

    0: Object
    description: “George brings projector for presentations.”
    from:
    id: “id1”
    jqxAppointment: “{“id”:”id1″,”from”:”2018-11-23T14:00:00Z”,”to”:”2018-11-23T21:00:00Z”,“subject”:”test”,“status”:”outOfOffice”,”location”:””,”description”:”George brings projector for presentations.”,”resourceId”:”Room 1″,”recurrencePattern”:””,”recurrenceException”:””,”dtstamp”:”2019-07-19T18:05:57Z”}”
    location: “”
    originalData: Object
    resourceId: “Room 1”
    status: “busy”
    subject: “Quarterly Project Review Meeting”
    to:
    toString: ƒ ()

    Lock Status #106159

    Todor
    Participant

    Hello mobiyan,

    I would suggest you few options, because I’m not quite sure which one will fits you the best:

    1) You could add to each appointment status: 'outOfOffice'. In that way on scheduler’s render all appointments will be with status out of office. In combination with setAppointmentProperty method from the previous example you won’t be able to visually change this status, but if you getAppointments the status will be changed. Updated example with this option.
    2) If you want the only status to be out of office you could do that with statuses property. You could review an example with it.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

    • This reply was modified 4 years, 7 months ago by  Todor.
Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.