@ammarkhalidfarooq/dashboard-package 0.1.5 → 0.1.6
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/dist/index.cjs.js +13 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -873,6 +873,16 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
873
873
|
var oneTimeTotal = oneTimeData.length > 0 ? oneTimeValues.reduce(function (sum, val) {
|
|
874
874
|
return sum + val;
|
|
875
875
|
}, 0) : 7100;
|
|
876
|
+
var firstInstData = (apiData === null || apiData === void 0 ? void 0 : apiData.firstInstallmentRevenue) || [];
|
|
877
|
+
var firstInstValues = firstInstData.length > 0 ? firstInstData.map(function (item) {
|
|
878
|
+
return item.value;
|
|
879
|
+
}) : currentData.slice(-7);
|
|
880
|
+
var firstInstCategories = firstInstData.length > 0 ? firstInstData.map(function (item) {
|
|
881
|
+
return item.date;
|
|
882
|
+
}) : categories.slice(-7);
|
|
883
|
+
var firstInstTotal = firstInstData.length > 0 ? firstInstValues.reduce(function (sum, val) {
|
|
884
|
+
return sum + val;
|
|
885
|
+
}, 0) : 510;
|
|
876
886
|
var primaryCharts = [{
|
|
877
887
|
label: "Total Revenue",
|
|
878
888
|
value: (apiData === null || apiData === void 0 ? void 0 : apiData.totalRevenue) || "$9,200.00",
|
|
@@ -882,9 +892,9 @@ var NewOverview = function NewOverview(_ref) {
|
|
|
882
892
|
showSelector: true
|
|
883
893
|
}, {
|
|
884
894
|
label: "First installments",
|
|
885
|
-
value: "$510.00",
|
|
886
|
-
data:
|
|
887
|
-
categories:
|
|
895
|
+
value: apiData !== null && apiData !== void 0 && apiData.firstInstallmentRevenue ? "$".concat(firstInstTotal.toLocaleString()) : "$510.00",
|
|
896
|
+
data: firstInstValues,
|
|
897
|
+
categories: firstInstCategories
|
|
888
898
|
}, {
|
|
889
899
|
label: "One-time donations",
|
|
890
900
|
value: apiData !== null && apiData !== void 0 && apiData.oneTimeDonations ? "$".concat(oneTimeTotal.toLocaleString()) : "$7,100.00",
|