timeRangesFeature

Our pure JavaScript Scheduler component
User avatar
melazhadi
Premium Member
Premium Member
Posts: 160
Joined: Tue Mar 19, 2019 5:51 pm

timeRangesFeature

Post by melazhadi » Thu Jul 11, 2019 4:30 pm

Hello,

i have a problem on timeRangeFeature but i think the problem is caused because the data is late

because when I put the hard data the timeRange is displayed well

but we in our case all the data that appears on the scheduler I rammenes them from the blinds vuex which makes a delay on the arrival of the data

for info the events and the hierarchy of the employees are also data that I read from the store but since I affect the events to the property events and the employees to resources and these properties pass by your watcher the data change as and when as you go

for that my question is what you have a property where I can affect my timeRanges and will be displayed

for info here's what I'm doing now

Code: Select all

timeRangesFeature: {
				store: {
			 		modelClass: Holiday
				},
				timeRanges: this.joursf
			},
with

Code: Select all

this.joursf
is the variable where I store the return of the store

thanks

User avatar
mats
Core Developer
Core Developer
Posts: 14260
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: timeRangesFeature

Post by mats » Fri Jul 12, 2019 12:12 am

Our API doesn't work like that. You should either use our Store API or set an array with existing data manually.

Code: Select all

scheduler.timeRangesFeature.store.data = [....];
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
melazhadi
Premium Member
Premium Member
Posts: 160
Joined: Tue Mar 19, 2019 5:51 pm

Re: timeRangesFeature

Post by melazhadi » Fri Jul 12, 2019 9:59 am

Hello,
I assigned timeranges on

Code: Select all

timeRangesFeature.store.data
but nothing is displayed yet


and on the vue inspector I see that the scheduler component is getting the timeRanges on this property

Code: Select all

timeRangesFeature.store.data
Attachments
2019-07-12_08h55_42.png
2019-07-12_08h55_42.png (5.5 KiB) Viewed 74 times

User avatar
mats
Core Developer
Core Developer
Posts: 14260
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: timeRangesFeature

Post by mats » Fri Jul 12, 2019 11:15 am

And you're assigning the array *after* it's populated?
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
melazhadi
Premium Member
Premium Member
Posts: 160
Joined: Tue Mar 19, 2019 5:51 pm

Re: timeRangesFeature

Post by melazhadi » Fri Jul 12, 2019 11:22 am

yes, that's the problem, but I do not encounter this problem on events and resources even if the data arrive late but they are displayed correctly

for information :
the property I use for the resources is:

Code: Select all

//app.vue
:resource-store="schedulerConfig.resourceStore"
:resources="resources"
//schedulerConfig.js
resourceStore: {
		modelClass: SmartModel,
		tree: true
	},
the property I use for events is:

Code: Select all

//app.vue
:event-store="schedulerConfig.eventStore"
:events="absences"
//schedulerConfig.js
eventStore: {
		modelClass: MyEvent,
	},
so is there a solution for the timeRanges?

User avatar
mats
Core Developer
Core Developer
Posts: 14260
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: timeRangesFeature

Post by mats » Fri Jul 12, 2019 11:29 am

We'll need your test case to understand what's actually going on.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
melazhadi
Premium Member
Premium Member
Posts: 160
Joined: Tue Mar 19, 2019 5:51 pm

Re: timeRangesFeature

Post by melazhadi » Fri Jul 12, 2019 11:38 am

it's a bit complicated to give you a test case because the data comes from a store that calls webservices what do you have another solution?

User avatar
mats
Core Developer
Core Developer
Posts: 14260
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: timeRangesFeature

Post by mats » Fri Jul 12, 2019 11:43 am

No other solution, you need to provide a test case with dummy data just like our examples.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
melazhadi
Premium Member
Premium Member
Posts: 160
Joined: Tue Mar 19, 2019 5:51 pm

Re: timeRangesFeature

Post by melazhadi » Fri Jul 12, 2019 12:54 pm

https://drive.google.com/file/d/1e5DLpKumeme3ayY7aa_k-Yo47Df0i4wP/view?usp=sharing

here is the drive link to my project

to test

the case where it works well the functionality
1 - remove the comments from line 87 on line 143,
2 - comments line 144 and line 150

what you will find by default is the case where it does not work

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1918
Joined: Fri Apr 01, 2016 11:08 am

Re: timeRangesFeature

Post by pmiklashevich » Mon Jul 15, 2019 1:36 pm

Hello,

I've checked your testcase and see you're using 1.2.5 trial there. Could you please download the latest official release and apply to your testcase? When I replace files in `bryntum-lib` folder with the latest sources I get the following error:

Code: Select all

webpack-internal:///./node_modules/vue/dist/vue.runtime.esm.js:620 [Vue warn]: Error in callback for watcher "viewPreset": "Error: Invalid time axis configuration or filter, please check your input data."
Please make sure your test case is runnable.
the case where it works well the functionality
1 - remove the comments from line 87 on line 143,
2 - comments line 144 and line 150
Please mention the file where these lines are present. Please provide more detailed steps to reproduce your issue. And let's clarify what exactly the problem is. You're not able to specify timeRanges in your application?

Best regards,
Pavel
Pavel Miklashevich - Core Developer

Post Reply