@tenancy.nz/reports 1.1.2 → 1.1.3
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.
|
@@ -22,7 +22,13 @@ function OwnerBookingReport(_ref) {
|
|
|
22
22
|
notes = _ref$eventData.notes,
|
|
23
23
|
_ref$eventData$proper = _ref$eventData.property,
|
|
24
24
|
property = _ref$eventData$proper === void 0 ? {} : _ref$eventData$proper,
|
|
25
|
-
stats = _ref$eventData.stats
|
|
25
|
+
stats = _ref$eventData.stats,
|
|
26
|
+
_ref$eventData$includ = _ref$eventData.includes,
|
|
27
|
+
includes = _ref$eventData$includ === void 0 ? {} : _ref$eventData$includ;
|
|
28
|
+
var _includes$sections = includes.sections,
|
|
29
|
+
sections = _includes$sections === void 0 ? [] : _includes$sections,
|
|
30
|
+
_includes$bookingTabl = includes.bookingTableColumns,
|
|
31
|
+
bookingTableColumns = _includes$bookingTabl === void 0 ? "all" : _includes$bookingTabl;
|
|
26
32
|
return /* @__PURE__ */React.createElement(ui.ThemeProvider, null, /* @__PURE__ */React.createElement(ui.Box, {
|
|
27
33
|
width: "100%"
|
|
28
34
|
}, /* @__PURE__ */React.createElement(ui.Grid, {
|
|
@@ -111,14 +117,12 @@ function OwnerBookingReport(_ref) {
|
|
|
111
117
|
xs: 12
|
|
112
118
|
}, /* @__PURE__ */React.createElement(ui.Paper, {
|
|
113
119
|
inset: "medium",
|
|
114
|
-
sx: {
|
|
115
|
-
height: "100%"
|
|
116
|
-
},
|
|
117
120
|
outlined: true
|
|
118
121
|
}, /* @__PURE__ */React.createElement(featureUi.BookingChart, {
|
|
119
122
|
data: chart.data || [],
|
|
120
|
-
labels: chart.labels || []
|
|
121
|
-
|
|
123
|
+
labels: chart.labels || [],
|
|
124
|
+
mode: "day"
|
|
125
|
+
}))), sections.includes("bookings") && /* @__PURE__ */React.createElement(ui.Grid, {
|
|
122
126
|
item: true,
|
|
123
127
|
xs: 12
|
|
124
128
|
}, /* @__PURE__ */React.createElement(ui.Heading, {
|
|
@@ -128,15 +132,16 @@ function OwnerBookingReport(_ref) {
|
|
|
128
132
|
mb: "20px"
|
|
129
133
|
}
|
|
130
134
|
}, "Bookings"), /* @__PURE__ */React.createElement(featureUi.BookingTable, {
|
|
135
|
+
columns: bookingTableColumns,
|
|
131
136
|
data: bookings,
|
|
132
137
|
loading: loading
|
|
133
|
-
})), /* @__PURE__ */React.createElement(ui.Grid, {
|
|
138
|
+
})), sections.includes("notes") && /* @__PURE__ */React.createElement(ui.Grid, {
|
|
134
139
|
item: true,
|
|
135
140
|
xs: 12
|
|
136
141
|
}, /* @__PURE__ */React.createElement(ui.Heading, {
|
|
137
142
|
as: "h4",
|
|
138
143
|
weight: "700"
|
|
139
|
-
}, "Viewing notes")), loading && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(ui.Grid, {
|
|
144
|
+
}, "Viewing notes")), sections.includes("notes") && loading && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(ui.Grid, {
|
|
140
145
|
item: true,
|
|
141
146
|
xs: 6
|
|
142
147
|
}, /* @__PURE__ */React.createElement(featureUi.NotesCard, {
|
|
@@ -148,7 +153,7 @@ function OwnerBookingReport(_ref) {
|
|
|
148
153
|
}, /* @__PURE__ */React.createElement(featureUi.NotesCard, {
|
|
149
154
|
loading: true,
|
|
150
155
|
text: ""
|
|
151
|
-
})))), !loading && notes && notes.length && notes.map(function (_ref2, i) {
|
|
156
|
+
})))), !loading && sections.includes("notes") && notes && notes.length && notes.map(function (_ref2, i) {
|
|
152
157
|
var label = _ref2.label,
|
|
153
158
|
data = _ref2.data;
|
|
154
159
|
return /* @__PURE__ */React.createElement(ui.Box, {
|
|
@@ -186,7 +191,14 @@ function OwnerBookingReport(_ref) {
|
|
|
186
191
|
outlined: true
|
|
187
192
|
}));
|
|
188
193
|
})));
|
|
189
|
-
}))
|
|
194
|
+
}), sections.includes("moreViewingsRequired") && /* @__PURE__ */React.createElement(ui.Heading, {
|
|
195
|
+
as: "h6",
|
|
196
|
+
weight: "700",
|
|
197
|
+
sx: {
|
|
198
|
+
mt: 5,
|
|
199
|
+
mb: 2
|
|
200
|
+
}
|
|
201
|
+
}, "* More viewings are required to be conducted on this property")));
|
|
190
202
|
}
|
|
191
203
|
OwnerBookingReport.Header = ReportHeader.default;
|
|
192
204
|
OwnerBookingReport.Footer = ReportFooter.default;
|
|
@@ -18,7 +18,13 @@ function OwnerBookingReport(_ref) {
|
|
|
18
18
|
notes = _ref$eventData.notes,
|
|
19
19
|
_ref$eventData$proper = _ref$eventData.property,
|
|
20
20
|
property = _ref$eventData$proper === void 0 ? {} : _ref$eventData$proper,
|
|
21
|
-
stats = _ref$eventData.stats
|
|
21
|
+
stats = _ref$eventData.stats,
|
|
22
|
+
_ref$eventData$includ = _ref$eventData.includes,
|
|
23
|
+
includes = _ref$eventData$includ === void 0 ? {} : _ref$eventData$includ;
|
|
24
|
+
var _includes$sections = includes.sections,
|
|
25
|
+
sections = _includes$sections === void 0 ? [] : _includes$sections,
|
|
26
|
+
_includes$bookingTabl = includes.bookingTableColumns,
|
|
27
|
+
bookingTableColumns = _includes$bookingTabl === void 0 ? "all" : _includes$bookingTabl;
|
|
22
28
|
return /* @__PURE__ */React.createElement(ThemeProvider, null, /* @__PURE__ */React.createElement(Box, {
|
|
23
29
|
width: "100%"
|
|
24
30
|
}, /* @__PURE__ */React.createElement(Grid, {
|
|
@@ -107,14 +113,12 @@ function OwnerBookingReport(_ref) {
|
|
|
107
113
|
xs: 12
|
|
108
114
|
}, /* @__PURE__ */React.createElement(Paper, {
|
|
109
115
|
inset: "medium",
|
|
110
|
-
sx: {
|
|
111
|
-
height: "100%"
|
|
112
|
-
},
|
|
113
116
|
outlined: true
|
|
114
117
|
}, /* @__PURE__ */React.createElement(BookingChart, {
|
|
115
118
|
data: chart.data || [],
|
|
116
|
-
labels: chart.labels || []
|
|
117
|
-
|
|
119
|
+
labels: chart.labels || [],
|
|
120
|
+
mode: "day"
|
|
121
|
+
}))), sections.includes("bookings") && /* @__PURE__ */React.createElement(Grid, {
|
|
118
122
|
item: true,
|
|
119
123
|
xs: 12
|
|
120
124
|
}, /* @__PURE__ */React.createElement(Heading, {
|
|
@@ -124,15 +128,16 @@ function OwnerBookingReport(_ref) {
|
|
|
124
128
|
mb: "20px"
|
|
125
129
|
}
|
|
126
130
|
}, "Bookings"), /* @__PURE__ */React.createElement(BookingTable, {
|
|
131
|
+
columns: bookingTableColumns,
|
|
127
132
|
data: bookings,
|
|
128
133
|
loading: loading
|
|
129
|
-
})), /* @__PURE__ */React.createElement(Grid, {
|
|
134
|
+
})), sections.includes("notes") && /* @__PURE__ */React.createElement(Grid, {
|
|
130
135
|
item: true,
|
|
131
136
|
xs: 12
|
|
132
137
|
}, /* @__PURE__ */React.createElement(Heading, {
|
|
133
138
|
as: "h4",
|
|
134
139
|
weight: "700"
|
|
135
|
-
}, "Viewing notes")), loading && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Grid, {
|
|
140
|
+
}, "Viewing notes")), sections.includes("notes") && loading && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Grid, {
|
|
136
141
|
item: true,
|
|
137
142
|
xs: 6
|
|
138
143
|
}, /* @__PURE__ */React.createElement(NotesCard, {
|
|
@@ -144,7 +149,7 @@ function OwnerBookingReport(_ref) {
|
|
|
144
149
|
}, /* @__PURE__ */React.createElement(NotesCard, {
|
|
145
150
|
loading: true,
|
|
146
151
|
text: ""
|
|
147
|
-
})))), !loading && notes && notes.length && notes.map(function (_ref2, i) {
|
|
152
|
+
})))), !loading && sections.includes("notes") && notes && notes.length && notes.map(function (_ref2, i) {
|
|
148
153
|
var label = _ref2.label,
|
|
149
154
|
data = _ref2.data;
|
|
150
155
|
return /* @__PURE__ */React.createElement(Box, {
|
|
@@ -182,7 +187,14 @@ function OwnerBookingReport(_ref) {
|
|
|
182
187
|
outlined: true
|
|
183
188
|
}));
|
|
184
189
|
})));
|
|
185
|
-
}))
|
|
190
|
+
}), sections.includes("moreViewingsRequired") && /* @__PURE__ */React.createElement(Heading, {
|
|
191
|
+
as: "h6",
|
|
192
|
+
weight: "700",
|
|
193
|
+
sx: {
|
|
194
|
+
mt: 5,
|
|
195
|
+
mb: 2
|
|
196
|
+
}
|
|
197
|
+
}, "* More viewings are required to be conducted on this property")));
|
|
186
198
|
}
|
|
187
199
|
OwnerBookingReport.Header = ReportHeader;
|
|
188
200
|
OwnerBookingReport.Footer = ReportFooter;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenancy.nz/reports",
|
|
3
3
|
"description": "React UI reporting components.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"author": "TPS <https://www.tenancy.co.nz>",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"type": "module",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
16
16
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
17
|
-
"@tenancy.nz/feature-ui": "1.1.
|
|
18
|
-
"@tenancy.nz/ui": "1.1.
|
|
17
|
+
"@tenancy.nz/feature-ui": "1.1.3",
|
|
18
|
+
"@tenancy.nz/ui": "1.1.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tenancy.nz/
|
|
22
|
-
"@tenancy.nz/ui": "1.1.
|
|
21
|
+
"@tenancy.nz/ui": "1.1.3",
|
|
22
|
+
"@tenancy.nz/feature-ui": "1.1.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"react-uid": "^2.4.0"
|