Our pure JavaScript Scheduler component


Post by eugenem »

I've just bought Scheduler Pro and it broke my app. Basically it somehow webpack generates this weird line:

if (!window.bryntum) window.bryntum = {}; //endregion
/***/
})
/******/
});
});
undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefined

/***/
}),

/***/
"8qYY":
/*!******************************************************!*\
  !*** ./src/app/workinglist/workinglist.component.ts ***!
  \******************************************************/

This is between the end of your schedulerpro.lite.umd.js and my sources.

So I've tried to upgrade all libraries just in case, along with Angular (from 10 to 11), and it's the same.

The trial was working fine with Angular 10.


Post by eugenem »

Trial is working with Angular 11 too. So the issue is actually with switching to the paid version.


Post by mats »

Can you please upload a test case app so we can try to reproduce this? Also, please try with latest 4.1 beta build from the customer zone?


Post by eugenem »

I've rolled back to Angular 10. Trial works, paid one doesn't.

I did 'npm i --force' just in case, it didn't help. Compiled angular module same as with trial...

I don't have test case app, I've got a huge project that is using scheduler.

Your samples work obviously.

With 4.1 I don't even see how to compile the module.


Post by saki »

There are several things you can try before preparing a showcase:

  1. npm cache clean --force
  2. rm -rf node_modules package-lock.json dist
  3. npm i
  4. npm start

If this fails, you can compare tsconfig*, angular.json with the corresponding files in our resource-histogram demo which is Angular 10. This could give you a clue what option can cause the problem.

If everything else fails, we need a way to reproduce it. I do understand that you cannot give use the whole project but we do need a way to reproduce the problem so that we can fix it. The best would be one of our examples with your additions and/or modifications that had caused the error to appear.


Post by eugenem »

ok, I see that Angular 10 integration uses a different module. I've copied settings from resource-histogram demo, and eventually it started to load. But now CRUD manager doesn't load any data (don't see any errors there). Is there any difference between Pro and Standard scheduler with regards to CRUD?


Post by eugenem »

this is how I run it:

 <bry-schedulerpro #scheduler2
                      [height]="height - 150"
                      [columns]="schedulerConfig.columns"
                      [timeRangesFeature]="schedulerConfig.features.timeRanges"
                      [eventEditFeature]="schedulerConfig.eventEditFeature"
                      [eventTooltipFeature]="schedulerConfig.features.eventTooltip"
                      [crudManager]="schedulerConfig.crudManager"
                      [startDate]="startDate"
                      [endDate]="endDate"
                      [headerZoomFeature]="true"
                      [stripeFeature]="true"
                      [mode]="orientation">
    </bry-schedulerpro>

Post by eugenem »

  schedulerConfig = {
    crudManager: {
      resourceStore: {
        // Add some custom fields
        groupers: [
          // type could be 'Machines', 'Operators', etc
          { field: 'type', ascending: true }
        ]
      },
      eventStore: {
        // Add a custom field and redefine durationUnit to default to hours
        //fields: ['dt', { name: 'durationUnit', defaultValue: 'hour' }]
        fields: ['companyId']
      },
      autoLoad: true,
      autoSync: true,
      phantomIdField: 'phantomId',
      transport: {
        load: {
          url: '/api/Scheduler/GetB',
          headers: {
            'Authorization': `Bearer `
          },
        }, sync: {
          url: '/api/Scheduler/SaveB',
          headers: {
            'Authorization': `Bearer `
          },
        }
      }
    },

Post by saki »

For SchedulerPro, https://bryntum.com/docs/scheduler-pro/#SchedulerPro/view/SchedulerPro#config-project is mandatory. project has CrudManager built-in and can be configured the same way as standard CM. However, you don't use crudManager config option, but project.

See please Resource Histogram Pro demo. (src/app/config.ts)


Post by eugenem »

thanks! finally it's working...


Post Reply