spsprinkles / timeline-calendar

A SharePoint Framework (SPFx) web part that provides a configurable, dynamic timeline that renders data from multiple SharePoint calendars and lists.
2 stars 1 forks source link

Timeline Calendar Sort by Category #9

Closed Wilky1234 closed 1 month ago

Wilky1234 commented 3 months ago

Has anyone tried sorting by category --this is what I've been working on but I doesn't work:

{ "groups": [ { "id": "ACC Event", "content": "ACC Event" }, { "id": "ACC MLR", "content": "ACC MLR" }, { "id": "CC Leave/TDY", "content": "CC Leave/TDY" }, { "id": "CD/Leave/TDY", "content": "CD/Leave/TDY" }, { "id": "CCC Leave/TDY", "content": "CCC Leave/TDY" }, { "id": "MA @ Shaw", "content": "MA @ Shaw" }, { "id": "ACC Staff LV/TDY", "content": "ACC Staff LV/TDY" }, { "id": "15 AF Event", "content": "15 AF Event" }, { "id": "Battle Rhythm Events", "content": "Battle Rhythm Events" }, { "id": "Significant Event", "content": "Significant Event" }, { "id": "Information/Awareness", "content": "Information/Awareness" } ], "sortOrder": { "ACC Event": 1, "ACC MLR": 2, "CC Leave/TDY": 3, "CD/Leave/TDY": 4, "CCC Leave/TDY": 5, "MA @ Shaw": 6, "ACC Staff LV/TDY": 7, "15 AF Event": 8, "Battle Rhythm Events": 9, "Significant Event": 10, "Information/Awareness": 11 }, "options": { "width": "100%", "height": "30px", "margin": { "item": 20 } }, "subgroupOrder": "sortOrder", "showCurrentTime": true }

Describe the bug and what should* be happening** Type in a clear and concise description of what the bug/issue is. Steps to reproduce should be placed in the section below.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Device details (please complete the following information):

Additional context Add any other context about the problem here.

mikevasiloff commented 2 months ago

@Wilky1234 I'm having a hard time understanding what you are trying to do. Are you using the Timeline Calendar web part or the legacy, code-based Timeline Calendar solution (DoD login only)?

In the web part version you don't define your groups/rows via JSON, which is why I'm confused by your question. If you can include screenshots that would help as well. If the data in the screenshots is "sensitive", consider posting instead within the Timeline Calednar web part's support group on milSuite (DoD login only).

Wilky1234 commented 2 months ago

Mike,

I received a request to sort by the categories so basically the ACC items are first then the General’s items then the Deputy…

This is what I came up with but could not get the calendar to sort:

{

"items": [

{

  "name": "Item 1",

  "Category": "ACC Event"

},

{

  "name": "Item 2",

  "Category": "ACC MLR"

}

,

{

  "name": "Item 3",

  "Category": "CC Leave/TDY"

}

,

{

  "name": "Item 4",

  "Category": "CD/Leave/TDY"

}

,

{

  "name": "Item 5",

  "Category": "CCC Leave/TDY"

}

,

{

  "name": "Item 6",

  "Category": "MA @ Shaw"

}

,

{

  "name": "Item 7",

  "Category": "ACC Staff LV/TDY"

}

,

{

  "name": "Item 8",

  "Category": "15 AF Event"

}

,

{

  "name": "Item 9",

  "Category": "Battle Rhythm Events"

}

,

{

  "name": "Item 10",

  "Category": "Significant Event"

}

,

{

  "name": "Item 11",

  "Category": "Information/Awareness"

}

],

"groupOrder": {

"ACC Event": 1,

"ACC MLR": 2,

"CC Leave/TDY": 3,

"CD/Leave/TDY": 4,

"CCC Leave/TDY": 5,

"MA @ Shaw": 6,

"ACC Staff LV/TDY": 7,

"15 AF Event": 8,

"Battle Rhythm Events": 9,

"Significant Event": 10,

"Information/Awareness": 11

}

}

[

{ "name": "Item 1", "Category": "ACC Event" },

{ "name": "Item 2", "Category": "ACC MLR" },

// ... other items

],

"order": categorySort

v/r

Wilky

From: Michael Vasiloff @.> Sent: Wednesday, April 24, 2024 4:56 AM To: spsprinkles/timeline-calendar @.> Cc: WILKINSON, ALLEN R CIV USAF ACC 15 AF/A3O @.>; Mention @.> Subject: [Non-DoD Source] Re: [spsprinkles/timeline-calendar] Timeline Calendar Sort by Category (Issue #9)

You don't often get email from @.*** Learn why this is important https://aka.ms/LearnAboutSenderIdentification

@Wilky1234 https://github.com/Wilky1234 I'm having a hard time understanding what you are trying to do. Are you using the Timeline Calendar web part or the legacy, code-based Timeline Calendar solution https://www.milsuite.mil/book/docs/DOC-1169495 (DoD login only)?

In the web part version you don't define your groups/rows via JSON, which is why I'm confused by your question. If you can include screenshots that would help as well. If the data in the screenshots is "sensitive", consider posting instead within the Timeline Calednar web part's support group on milSuite https://www.milsuite.mil/book/groups/m365-support/projects/timeline-calendar (DoD login only).

— Reply to this email directly, view it on GitHub https://github.com/spsprinkles/timeline-calendar/issues/9#issuecomment-2074438813 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BHNHINDMNE4C7BYQYFCIEXTY65XQXAVCNFSM6AAAAABGL3O64WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUGQZTQOBRGM . You are receiving this because you were mentioned.Message ID: @.***>

mikevasiloff commented 1 month ago

After connecting outside of GitHub it was clarified that the user was attempting to have the events on the calendar listed in a certain order with some at the top followed by others. This is not applicable as the timeline will render events as necessary to fill the available space.