Our powerful JS Calendar component


Post by ehc-between »

Hi

i have set up the calendar with a dayResource mode and a grid component with events without any assignments

when i try to drag it into the day resource view it triggers an "add" but also a "remove" in the assignmentstore.

when i try to reassign a event it also trigger the same " add" and "remove" but this works as intended.

what happens is the the event i drag in from the grid dont show up because the assignment is added then removed right away.

how can i solve this ?

 modes : {
    // Removes default modes that is not in use
    year   : null,
    day    : null,
    // agenda : null,

dayresource : {
  // Save a little space by hiding weekends.
  hideNonWorkingDays : true,

  // Configure a nice min-width for the resource columns
  minResourceWidth : '3em',

  // Demo uses more padding than default, switch to the short event duration "earlier" to fit contents
  shortEventDuration : '1 hour',

  // Hide resource header avatars
  showHeaderAvatars: true,
  range : 'day',
  meta : (resource: {title: any}) => resource.title
},
<bryntum-calendar-project-model
  #project
  [events]="calendar.events"
  [resources]="calendar.resources!"
</bryntum-calendar-project-model>

<div class="container-1 w-100 h-100">
  <div [ngClass]="{'top-test': showSelectedOrder, 'top-test-full': !showSelectedOrder}" style="overflow: hidden; resize: vertical">
    <bryntum-calendar
      #calendar
      [config]="calendarConfig"
      (onEventClick)="onEventClick($event)"
    ></bryntum-calendar>
    <bryntum-splitter></bryntum-splitter>
    <bryntum-grid
      [id]="gridConfig.id!"
      [title]="gridConfig.title!"
      [collapsible]="gridConfig.collapsible!"
      [flex]="gridConfig.flex!"
      [ui]="gridConfig.ui!"
      [store]="unassignedEventStore"
      [columns]="gridConfig.columns!"
      [sortFeature]="gridConfig.features!.sort!"
      [stripeFeature]="gridConfig.features!.stripe!"
      [cellEditFeature]="gridConfig.features!.cellEdit!"
      [groupFeature]="gridConfig.features!.group!"
    ></bryntum-grid>
  </div>
  <div *ngIf="showSelectedOrder" class="bottom-test">
    <app-event-details [showSelectedOrder]="showSelectedOrder" [orderId]="selectedOrderEventId" (disSelected)="onDisSelectOrder($event)" (updateCalendar)="onUpdateCalendar($event)"></app-event-details>
  </div>
</div>

Post by ehc-between »

Console output

Attachments
Screenshot 2024-01-11 at 14.08.48.png
Screenshot 2024-01-11 at 14.08.48.png (34.51 KiB) Viewed 1149 times

Post by Animal »

It seems there is a bug. It's harmless, but still a bug. It's removing zero records:

Screenshot 2024-01-11 at 14.42.11.png
Screenshot 2024-01-11 at 14.42.11.png (335.5 KiB) Viewed 1142 times

It does end up correctly assigning the dropped event.


Post by ehc-between »

For me there is 1 record with the same resource that was just added. Can provide more info in about 30 min :) thanks for looking into it


Post by ehc-between »

What can i try to give you of information to help debug the issue ?


Post by ehc-between »

here is my delete event record console loged from

assignmentStore.on => remove

Attachments
Screenshot 2024-01-11 at 15.15.45.png
Screenshot 2024-01-11 at 15.15.45.png (111.09 KiB) Viewed 1128 times

Post by marcio »

Hey,

We're able to reproduce that issue. I created a ticket to fix that https://github.com/bryntum/support/issues/8231

Best regards,
Márcio


Post by Animal »

In unassignedEventStore, all events definitely are not assigned to any resources? You can examine the store and check them?

Screenshot 2024-01-11 at 16.15.27.png
Screenshot 2024-01-11 at 16.15.27.png (783.9 KiB) Viewed 1111 times

Post by ehc-between »

here is the result of the unassignedEventStore query

Attachments
Screenshot 2024-01-11 at 22.25.15.png
Screenshot 2024-01-11 at 22.25.15.png (37.58 KiB) Viewed 1074 times
Screenshot 2024-01-11 at 22.23.09.png
Screenshot 2024-01-11 at 22.23.09.png (63.34 KiB) Viewed 1074 times
Screenshot 2024-01-11 at 22.20.57.png
Screenshot 2024-01-11 at 22.20.57.png (46.03 KiB) Viewed 1074 times

Post by ghulam.ghous »

Hi there,

Thanks for sharing this. We will investigate and fix the issue.

Regards,
Ghous


Post Reply