Skip to content

Commit

Permalink
Fixed categories filter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Amer committed Jan 15, 2025
1 parent 63b1c32 commit a9792f1
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 27 deletions.
3 changes: 3 additions & 0 deletions samples/react-calendar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Each category has its own color that is generated in the load.

The Web Part checks the user's permissions for the View, Add, Edit, and Delete events.

![calendar](assets/react-calendar-categories.mp4)

![calendar](assets/animatevideo.gif)

![calendar](assets/weekly_moderncalendar.gif)
Expand Down Expand Up @@ -118,6 +120,7 @@ Version|Date|Comments
1.0.19|June 28, 2024| added filter by category | fixed the packages.json issues which prevent solution to build successfully.
1.0.20|October 1, 2024| upgraded to SPFx 1.16.1
1.0.21|November 03, 2024| upgraded to SPFx 1.20.0
1.0.22|January 15, 2025| Fixed categories filter issues

## Minimal Path to Awesome

Expand Down
Binary file not shown.
55 changes: 30 additions & 25 deletions samples/react-calendar/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"This Web Part allows you to manage events in a calendar. Uses a list of existing calendars on any website. The location and name of the list and the dates of the events to be displayed are defined in the properties of the web part."
],
"creationDateTime": "2020-12-04",
"updateDateTime": "2024-11-03",
"products": [
"SharePoint"
],
"updateDateTime": "2025-01-15",
"products": ["SharePoint"],
"metadata": [
{
"key": "CLIENT-SIDE-DEV",
Expand All @@ -35,126 +33,132 @@
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-calendar/assets/animatevideo.gif",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/react-calendar-categories.mp4?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 101,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/calendar_teams.jpg?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-calendar/assets/animatevideo.gif",
"alt": "Calendar"
},
{
"type": "image",
"order": 102,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/calendar_teams2.jpg?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/calendar_teams.jpg?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 103,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/modercalendar_monthly.gif?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/calendar_teams2.jpg?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 104,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/moderncalendar_yearly.gif?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/modercalendar_monthly.gif?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 105,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.0.jpg?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/moderncalendar_yearly.gif?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 106,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.0.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.0.jpg?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 107,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.1.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.0.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 108,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.2.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.1.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 109,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.3.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.2.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 110,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.4.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.3.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 111,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.4.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 112,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen2.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen1.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 113,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen3.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen2.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 114,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen4.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen3.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 115,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen5.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen4.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 116,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen6.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen5.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 117,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen7.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen6.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 118,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen8.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen7.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 119,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen9.png?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen8.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 120,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/screen9.png?raw=true",
"alt": "Calendar"
},
{
"type": "image",
"order": 121,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-calendar/assets/weekly_moderncalendar.gif?raw=true",
"alt": "Calendar"
}
Expand Down Expand Up @@ -199,7 +203,8 @@
"pictureUrl": "https://avatars.githubusercontent.com/u/19314043?s=460&u=79acb7fd0ad466e1040ddd8a739fa93385018b81&v=4",
"name": "Mohammed Amer",
"twitter": "Mohammad3mer"
}, {
},
{
"gitHubAccount": "Eli-Schei",
"name": "Eli H. Schei",
"pictureUrl": "https://github.com/Eli-Schei"
Expand Down
2 changes: 1 addition & 1 deletion samples/react-calendar/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"solution": {
"name": "react-calendar-client-side-solution",
"id": "3a13208b-3874-4036-9262-4edd22e88187",
"version": "1.0.21.0",
"version": "1.0.22.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false
Expand Down
2 changes: 1 addition & 1 deletion samples/react-calendar/src/services/spservices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export default class spservices {
return Text.format(camlQuery, Constants.AndConditionStart, Text.format(categoryCondition, categories[0].key), Constants.AndConditionEnd);
} else {
let orCondition: string = `${Constants.OrConditionStart}{0}{1}${Constants.OrConditionEnd}`;
queryResult = Text.format(orCondition, Text.format(categoryCondition, categories[0].key), Text.format(categoryCondition, categories[1]));
queryResult = Text.format(orCondition, Text.format(categoryCondition, categories[0].key), Text.format(categoryCondition, categories[1].key));

for (let i = 2; i < categories.length; i++) {
const category = categories[i];
Expand Down

0 comments on commit a9792f1

Please sign in to comment.