@stoker-platform/web-app 0.5.44 → 0.5.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/package.json +4 -4
- package/src/Calendar.tsx +26 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.46
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: apply calendar record filter to unscheduled records
|
|
8
|
+
|
|
9
|
+
## 0.5.45
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- feat: add record filter to calendar
|
|
14
|
+
- @stoker-platform/node-client@0.5.29
|
|
15
|
+
- @stoker-platform/utils@0.5.23
|
|
16
|
+
- @stoker-platform/web-client@0.5.25
|
|
17
|
+
|
|
3
18
|
## 0.5.44
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoker-platform/web-app",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"scripts": {
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
52
52
|
"@react-google-maps/api": "^2.20.8",
|
|
53
53
|
"@sentry/react": "^10.38.0",
|
|
54
|
-
"@stoker-platform/node-client": "0.5.
|
|
55
|
-
"@stoker-platform/utils": "0.5.
|
|
56
|
-
"@stoker-platform/web-client": "0.5.
|
|
54
|
+
"@stoker-platform/node-client": "0.5.29",
|
|
55
|
+
"@stoker-platform/utils": "0.5.23",
|
|
56
|
+
"@stoker-platform/web-client": "0.5.25",
|
|
57
57
|
"@tanstack/react-table": "^8.21.3",
|
|
58
58
|
"@types/react": "18.3.13",
|
|
59
59
|
"@types/react-dom": "18.3.1",
|
package/src/Calendar.tsx
CHANGED
|
@@ -630,7 +630,11 @@ export function Calendar({
|
|
|
630
630
|
}
|
|
631
631
|
})
|
|
632
632
|
const mainEvents = updatedList
|
|
633
|
-
.filter(
|
|
633
|
+
.filter(
|
|
634
|
+
(record) =>
|
|
635
|
+
record[calendarConfig.startField] &&
|
|
636
|
+
(!calendarConfig.filterRecords || calendarConfig.filterRecords(record)),
|
|
637
|
+
)
|
|
634
638
|
.map((record) => {
|
|
635
639
|
const isPendingServer = isGlobalLoading.get(record.id)?.server
|
|
636
640
|
|
|
@@ -675,8 +679,12 @@ export function Calendar({
|
|
|
675
679
|
if (calendarConfig?.additionalFields) {
|
|
676
680
|
calendarConfig.additionalFields.forEach((additionalField) => {
|
|
677
681
|
updatedList
|
|
678
|
-
|
|
679
|
-
|
|
682
|
+
.filter(
|
|
683
|
+
(record) =>
|
|
684
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
685
|
+
record[additionalField] &&
|
|
686
|
+
(!calendarConfig.filterRecords || calendarConfig.filterRecords(record)),
|
|
687
|
+
)
|
|
680
688
|
.forEach((record) => {
|
|
681
689
|
const additionalFieldSchema = getField(fields, additionalField)
|
|
682
690
|
const additionalFieldCustomization = getFieldCustomization(additionalFieldSchema, customization)
|
|
@@ -1127,15 +1135,21 @@ export function Calendar({
|
|
|
1127
1135
|
<ScrollArea className="h-full pb-4">
|
|
1128
1136
|
<Table>
|
|
1129
1137
|
<TableBody>
|
|
1130
|
-
{unscheduledRecords
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1138
|
+
{unscheduledRecords
|
|
1139
|
+
.filter(
|
|
1140
|
+
(record) =>
|
|
1141
|
+
!calendarConfig.filterRecords ||
|
|
1142
|
+
calendarConfig.filterRecords(record),
|
|
1143
|
+
)
|
|
1144
|
+
.map((record) => (
|
|
1145
|
+
<Row
|
|
1146
|
+
key={record.id}
|
|
1147
|
+
collection={collection}
|
|
1148
|
+
record={record}
|
|
1149
|
+
recordTitleField={recordTitleField}
|
|
1150
|
+
isDisabled={!!isUpdateDisabled}
|
|
1151
|
+
/>
|
|
1152
|
+
))}
|
|
1139
1153
|
</TableBody>
|
|
1140
1154
|
</Table>
|
|
1141
1155
|
</ScrollArea>
|