Our pure JavaScript Scheduler component


Post by mikemcs »

I am trying to load Items into a combo on the TBAR for filtering from my CRUD data. When Doing this I get an error saying "usersStore is not defined". I am passing the usersStore in with all of the CRUD data but I guess I am missing something on how to set this data up as a store.

       type                 : 'combo',
       //items                : ['1','2'],
       store                : usersStore,
       valueField           : 'id',
       displayField         : 'fullname',
       ref                  : 'filterByUser',
       placeholder          : 'Filter User',
       clearable            : true,
       keyStrokeChangeDelay : 100,
       triggers             : {
           filter : {
               align : 'start',
               cls   : 'b-fa b-fa-filter'
           }
       },
       onChange : 'up.onFilterChangeUser'
{"success"   : true,

"project" : {
    "calendar" : "workhours"
  },

  "calendars" : {
      "rows" : [
        {
          "id"                       : "workhours",
          "name"                     : "Working hours",
          "unspecifiedTimeIsWorking" : true,
          "intervals"                : [



        {
          "recurrentStartDate" : "on Sat at 00:00",
          "recurrentEndDate"   : "on Sun at 23:59",
          "isWorking"          : false,
          "name"               : "Sat/Sun"
        },{
                   "startDate"  : "2024-11-29T00:00",
                   "endDate"     : "2024-11-30T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-11-28T00:00",
                   "endDate"     : "2024-11-29T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-09-02T00:00",
                   "endDate"     : "2024-09-03T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-07-05T00:00",
                   "endDate"     : "2024-07-06T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-07-04T00:00",
                   "endDate"     : "2024-07-05T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-05-27T00:00",
                   "endDate"     : "2024-05-28T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2025-01-01T00:00",
                   "endDate"     : "2025-01-02T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-12-27T00:00",
                   "endDate"     : "2024-12-28T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-12-26T00:00",
                   "endDate"     : "2024-12-27T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-12-25T00:00",
                   "endDate"     : "2024-12-26T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-12-24T00:00",
                   "endDate"     : "2024-12-25T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   },{
                   "startDate"  : "2024-12-23T00:00",
                   "endDate"     : "2024-12-24T00:00",
                   "isWorking"          : false,
                   "name"               : "Closed"

                   }]
    }
  ]
},



  "resources" : {
    "rows" : [
               {"id"             : "Project Total",
              "name"          : "Project Total",
              "activity"      : "Project Total"},
               {"id"             : "Other",
                "name"          : "Other",
                "activity"      : "Other"},
               {"id"             : "Material Procurement",
                "name"          : "Material Procurement",
                "activity"      : "Material Procurement"},
               {"id"             : "Material Delivery",
                "name"          : "Material Delivery",
                "activity"      : "Material Delivery"},
               {"id"             : "Part Design",
                "name"          : "Part Design",
                "activity"      : "Part Design"},
               {"id"             : "Design Approval",
                "name"          : "Design Approval",
                "activity"      : "Design Approval"},
               {"id"             : "Tool Design",
                "name"          : "Tool Design",
                "activity"      : "Tool Design"},
               {"id"             : "Tool Build",
                "name"          : "Tool Build",
                "activity"      : "Tool Build"},
               {"id"             : "First Offs",
                "name"          : "First Offs",
                "activity"      : "First Offs"},
               {"id"             : "Mold Trial/FAI",
                "name"          : "Mold Trial/FAI",
                "activity"      : "Mold Trial/FAI"},
               {"id"             : "Part Approval (Release to Production)",
                "name"          : "Part Approval (Release to Production)",
                "activity"      : "Part Approval (Release to Production)"},
               {"id"             : "OQ Validation",
                "name"          : "OQ Validation",
                "activity"      : "OQ Validation"},
               {"id"             : "Pilot Production Run (PQ)",
                "name"          : "Pilot Production Run (PQ)",
                "activity"      : "Pilot Production Run (PQ)"}
    ],
    "total" : 13
  },


  "events" : {
    "rows" : [
               {"id"           : "325 HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)" ,
                  "name"         : "325 HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
                  "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
                  "eventStyle"        : "rounded",
                  "durationUnit" : "d",
                  "startDate"    : "2023-12-21 00:00:00",
                  "endDate"      : "2025-05-15 23:00:00" ,
                  "resourceId"   : "Project Total",
                  "mastproject"      : "8169:  HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1): STACATO LLC.",
                  "mastid"       : "31",
                  "custno"       : "W93557",
                  "company"       : "STACATO LLC.",
                  "status"       : "",
                  "desc"    : "Other",
                  "custresposable" : "Y",
                  "responsible" : "",
                  "users" : "",
                  "otherdesc"    : "Material Selection",
                  "eventColor"   : "yellow"},
               {"id"           : 325,
                "name"         : "325",
                "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
                "eventStyle"        : "border",
                "durationUnit" : "d",
                "startDate"    : "2023-12-21 00:00:00",
                "endDate"      : "2024-02-07 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2023-12-21 00:00:00",



            "resourceId"   : "Other",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Other",
            "custresposable" : "Y",
            "responsible" : "STACATO LLC. responsible",
            "users" : "2643 , ",
            "otherdesc"    : "Material Selection",
            "eventColor"   : "yellow"},
           {"id"           : 314,
            "name"         : "314",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-02-08 00:00:00",
            "endDate"      : "2024-02-15 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-02-08 00:00:00",



            "resourceId"   : "Material Procurement",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Material Procurement",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DEC , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 315,
            "name"         : "315",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-02-08 00:00:00",
            "endDate"      : "2024-05-10 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-02-08 00:00:00",



            "resourceId"   : "Material Delivery",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Material Delivery",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DDB , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 326,
            "name"         : "326",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-02-08 00:00:00",
            "endDate"      : "2024-02-19 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-02-08 00:00:00",



            "resourceId"   : "Other",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Other",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "JLR , TAS , ",
            "otherdesc"    : "3D Printed Parts",
            "eventColor"   : "yellow"},
           {"id"           : 570,
            "name"         : "570",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-02-20 00:00:00",
            "endDate"      : "2024-08-30 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-02-20 00:00:00",



            "resourceId"   : "Other",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Other",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "BLB , JLR , ",
            "otherdesc"    : "Receipt of parts from Xometry",
            "eventColor"   : "yellow"},
           {"id"           : 321,
            "name"         : "321",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-09-03 00:00:00",
            "endDate"      : "2024-09-19 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-09-03 00:00:00",



            "resourceId"   : "Other",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Other",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DCG , ",
            "otherdesc"    : "First 25 pc EEP with Xometry parts",
            "eventColor"   : "yellow"},
           {"id"           : 316,
            "name"         : "316",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-09-20 00:00:00",
            "endDate"      : "2024-12-16 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-09-20 00:00:00",



            "resourceId"   : "Part Design",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Part Design",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "JLR , TAS , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 317,
            "name"         : "317",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2024-12-17 00:00:00",
            "endDate"      : "2024-12-19 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-12-17 00:00:00",



            "resourceId"   : "Design Approval",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "Design Approval",
            "custresposable" : "Y",
            "responsible" : "STACATO LLC. responsible",
            "users" : "2643 , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 324,
            "name"         : "324",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "colored",
            "durationUnit" : "d",
            "startDate"    : "2024-12-20 00:00:00",
            "endDate"      : "2025-01-06 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2024-12-20 00:00:00",



            "resourceId"   : "Other",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Todo",
            "desc"    : "Other",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DCG , ",
            "otherdesc"    : "75 piece EEP with molded parts",
            "eventColor"   : "yellow"},
           {"id"           : 318,
            "name"         : "318",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "colored",
            "durationUnit" : "d",
            "startDate"    : "2025-01-07 00:00:00",
            "endDate"      : "2025-04-01 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2025-01-07 00:00:00",



            "resourceId"   : "Tool Design",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Todo",
            "desc"    : "Tool Design",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "JLR , TAS , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 319,
            "name"         : "319",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "colored",
            "durationUnit" : "d",
            "startDate"    : "2025-04-02 00:00:00",
            "endDate"      : "2025-04-16 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2025-04-02 00:00:00",



            "resourceId"   : "Tool Build",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Todo",
            "desc"    : "Tool Build",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "BKD , JLR , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 320,
            "name"         : "320",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "border",
            "durationUnit" : "d",
            "startDate"    : "2025-04-17 00:00:00",
            "endDate"      : "2025-04-22 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2025-04-17 00:00:00",



            "resourceId"   : "First Offs",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Completed",
            "desc"    : "First Offs",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DCG , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 322,
            "name"         : "322",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "colored",
            "durationUnit" : "d",
            "startDate"    : "2025-04-23 00:00:00",
            "endDate"      : "2025-05-07 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2025-04-23 00:00:00",



            "resourceId"   : "Part Approval (Release to Production)",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Todo",
            "desc"    : "Part Approval (Release to Production)",
            "custresposable" : "Y",
            "responsible" : "STACATO LLC. responsible",
            "users" : "2643 , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"},
           {"id"           : 323,
            "name"         : "323",
            "projdesc"         : "HOUSING TEMPLE FRAME 44113 L/44114 R E-344 (1 + 1)",
            "eventStyle"        : "colored",
            "durationUnit" : "d",
            "startDate"    : "2025-05-08 00:00:00",
            "endDate"      : "2025-05-15 23:00:00" ,

            "constraintType"    : "startnoearlierthan",
            "constraintDate"    : "2025-05-08 00:00:00",



            "resourceId"   : "OQ Validation",
            "mastproject"      : "8169",
            "mastid"       : "31",
            "custno"       : "W93557",
            "company"       : "STACATO LLC.",
            "status"       : "Todo",
            "desc"    : "OQ Validation",
            "custresposable" : "N",
            "responsible" : "",
            "users" : "DCG , ",
            "otherdesc"    : "",
            "eventColor"   : "yellow"}
],
"total" : 14
  },



  "dependencies" : {
    "rows" : [
               {"id"           : 0,
                    "fromEvent"         : "325",
                    "toEvent"           : "326"},
               {"id"           : 1,
                    "fromEvent"         : "326",
                    "toEvent"           : "570"},
               {"id"           : 2,
                    "fromEvent"         : "570",
                    "toEvent"           : "321"},
               {"id"           : 3,
                    "fromEvent"         : "321",
                    "toEvent"           : "316"},
               {"id"           : 4,
                    "fromEvent"         : "316",
                    "toEvent"           : "317"},
               {"id"           : 5,
                    "fromEvent"         : "317",
                    "toEvent"           : "324"},
               {"id"           : 6,
                    "fromEvent"         : "324",
                    "toEvent"           : "318"},
               {"id"           : 7,
                    "fromEvent"         : "318",
                    "toEvent"           : "319"},
               {"id"           : 8,
                    "fromEvent"         : "319",
                    "toEvent"           : "320"},
               {"id"           : 9,
                    "fromEvent"         : "320",
                    "toEvent"           : "322"},
               {"id"           : 10,
                    "fromEvent"         : "322",
                    "toEvent"           : "323"}
    ],
    "total" : 11
  },

  "usersStore" : {
    "rows" : [
               {"id"           : "2643",
                 "fullname"           : "Keith Harvey"},
               {"id"           : "DEC",
                 "fullname"           : "Doug Custer"},
               {"id"           : "DDB",
                 "fullname"           : "Donna King"},
               {"id"           : "JLR",
                 "fullname"           : "John Rehak"},
               {"id"           : "TAS",
                 "fullname"           : "Trish Hoffman"},
               {"id"           : "BLB",
                 "fullname"           : "Boni Bottomley"},
               {"id"           : "DCG",
                 "fullname"           : "Dean Gray"},
               {"id"           : "BKD",
                 "fullname"           : "Kirk Dodson"}
    ],
    "total" : 8
  }

}

Post by tasnim »

Hi,

It seems like the userStore isn't defined. But can't exactly say what's wrong without reproducing it. Would it be possible to share a runnable test case or a codepen test-case where we can reproduce the issue?

Here is a codepen template with combo where can you try to reproduce the issue and share the link with us https://codepen.io/dv-auntik/pen/QWeNyqW?editors=0011!


Post by mikemcs »

I guess this is my Issue how do I define a store from the data I load using

  project : {
      transport : {
        load : {
            url : '?LOC=CRUD_LOAD'
        },
      },
      autoLoad : true,

  onRequestFail : (event) => {
    const
        { requestType, response } = event,
        serverMessage             = response && response.message,
        exceptionText             = `Action "${requestType}" failed. ${serverMessage ? ` Server response: ${serverMessage}` : ''}`;

    Toast.show({
        html    : exceptionText,
        color   : 'b-red',
        style   : 'color:white',
        timeout : 3000
    });
    console.error(exceptionText);
  }
  },


Post by marcio »

Hey mikemcs,

That doesn't look like the problem, how are you defining the usersStore? If you could adapt your code to the CodePen that Tasmin shared, it would be easier for us to assist you on this.

Best regards,
Márcio


Post by Animal »

You can define any store to be loaded in the crud response.

See this example: https://bryntum.com/products/calendar/examples/event-items/

Screenshot 2024-10-04 at 08.49.06.png
Screenshot 2024-10-04 at 08.49.06.png (116.02 KiB) Viewed 60 times

Post Reply