[ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Thu Dec 01, 2022 11:03 am
by tomerPlanit
Hi I am using scheduler 5.2.2v with angular 13.
I want to move event to another resource by change the "resourceId" parameter.
After the change the event moves to the destination resource(in second click) but when I look on the event's resourceId parameter the value inside is the previous resource id.
I create demo that based on yours angular 11 demo 5.2.4v, I add some dummy resource and add button that move all events to this resource.
1) Click on the custom button that move the jobs(first click not work don't know why) twice.
2) See the console after 3 seconds will print the new state.
3) Click on the event you will see in the console the resource id.
I did something wrong?
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Thu Dec 01, 2022 11:28 am
by tomerPlanit
This is a very critical bug because my whole system uses your parameters and now I can't trust them because I don't know if all the other parameters have changed.
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Fri Dec 02, 2022 5:34 am
by alex.l
Could you please check if you can build and run your application? I see many deprecation warnings and an error after that.
Error: Error on worker #1: Error: Debug Failure. Unhandled SyntaxKind: Unknown.
at pipelineEmitWithHintWorker (/angular-11-routing/node_modules/typescript/lib/typescript.js:114177:22)
at pipelineEmitWithHint (/angular-11-routing/node_modules/typescript/lib/typescript.js:113708:17)
at pipelineEmitWithComments (/angular-11-routing/node_modules/typescript/lib/typescript.js:117396:13)
at pipelineEmit (/angular-11-routing/node_modules/typescript/lib/typescript.js:113648:13)
at emit (/angular-11-routing/node_modules/typescript/lib/typescript.js:113621:13)
at emitParameter (/angular-11-routing/node_modules/typescript/lib/typescript.js:114414:13)
at pipelineEmitWithHintWorker (/angular-11-routing/node_modules/typescript/lib/typescript.js:113757:32)
at pipelineEmitWithHint (/angular-11-routing/node_modules/typescript/lib/typescript.js:113708:17)
at pipelineEmitWithComments (/angular-11-routing/node_modules/typescript/lib/typescript.js:117396:13)
at pipelineEmit (/angular-11-routing/node_modules/typescript/lib/typescript.js:113648:13)
at ClusterMaster.onWorkerMessage (file:///angular-11-routing/node_modules/@angular/compiler-cli/bundles/chunk-OU6PTAY7.js:1464:15)
at file:///angular-11-routing/node_modules/@angular/compiler-cli/bundles/chunk-OU6PTAY7.js:1374:71
at EventEmitter.<anonymous> (file:///angular-11-routing/node_modules/@angular/compiler-cli/bundles/chunk-OU6PTAY7.js:1532:15)
at EventEmitter.emit (node:events:527:28)
at Worker.<anonymous> (node:internal/cluster/primary:186:13)
at Worker.emit (node:events:527:28)
at ChildProcess.<anonymous> (node:internal/cluster/worker:33:12)
at ChildProcess.emit (node:events:527:28)
at emit (node:internal/child_process:938:14)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
/angular-11-routing/node_modules/@ngtools/webpack/src/ngcc_processor.js:135
throw new Error(errorMessage + `NGCC failed${errorMessage ? ', see above' : ''}.`);
^
Error: NGCC failed.
at NgccProcessor.process (/angular-11-routing/node_modules/@ngtools/webpack/src/ngcc_processor.js:135:19)
at /angular-11-routing/node_modules/@ngtools/webpack/src/ivy/plugin.js:147:27
at Hook.eval [as call] (eval at create (/angular-11-routing/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:24:1)
at Hook.CALL_DELEGATE [as _call] (/angular-11-routing/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/angular-11-routing/node_modules/webpack/lib/Compiler.js:1108:30)
at /angular-11-routing/node_modules/webpack/lib/Compiler.js:1153:29
at eval (eval at create (/angular-11-routing/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:1)
Id of the resource this event is associated with (only usable for single assignments). We recommend using assignments in an AssignmentStore over this approach. Internally any Event using resourceId will have an assignment in AssignmentStore generated.
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Sun Dec 04, 2022 9:50 am
by tomerPlanit
Hi Alex,
The demo is in angular 13 and not 11.
You need to run npm i and I work with nodeJS 16.13.2.
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Mon Dec 05, 2022 6:34 am
by alex.l
angular-11-routing is the name of the folder you sent. I just run npm i and it uses versions you specified.
Did you review and fix moments I mentioned in my previous post? I don't see the need to do troubleshooting with the app before you fixed that.
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Mon Dec 05, 2022 9:35 am
by tomerPlanit
Hi alex,
I create a new demo based on the original angular 11 example as is only move the logic, and add button that move one event to the dummy resource and change the event name also.
When you will click on this event after a move you will see that the name changed but the resource not in the console.
Re: [ANGULAR] Change Events Resource Not Change The Resource Id Parameter
Posted: Tue Dec 06, 2022 5:13 am
by alex.l
Thank you for the test case
The problem here is same as I described above. This code
Id of the resource this event is associated with (only usable for single assignments). We recommend using assignments in an AssignmentStore over this approach. Internally any Event using resourceId will have an assignment in AssignmentStore generated.