@ammarkhalidfarooq/dashboard-package 0.3.39 → 0.3.40
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 +10 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5517,6 +5517,10 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5517
5517
|
}
|
|
5518
5518
|
};
|
|
5519
5519
|
var activeCampaignsData = (apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || [];
|
|
5520
|
+
var donorMix = (apiData === null || apiData === void 0 ? void 0 : apiData.donorMix) || {};
|
|
5521
|
+
var totalDonorsMix = (donorMix.newDonors || 0) + (donorMix.returningDonors || 0);
|
|
5522
|
+
var newDonorsPerc = totalDonorsMix > 0 ? Math.round(donorMix.newDonors / totalDonorsMix * 100) : 0;
|
|
5523
|
+
var returningDonorsPerc = totalDonorsMix > 0 ? Math.round(donorMix.returningDonors / totalDonorsMix * 100) : 0;
|
|
5520
5524
|
var renderCard = function renderCard(title) {
|
|
5521
5525
|
return /*#__PURE__*/jsx(DisplayCard, {
|
|
5522
5526
|
title: title,
|
|
@@ -5879,22 +5883,22 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5879
5883
|
children: /*#__PURE__*/jsx(DonorMixCard, {
|
|
5880
5884
|
title: "Donor mix",
|
|
5881
5885
|
subtitle: "Acquisition vs retention",
|
|
5882
|
-
series: [
|
|
5886
|
+
series: [donorMix.newDonors || 0, donorMix.returningDonors || 0],
|
|
5883
5887
|
labels: ["New donors", "Returning"],
|
|
5884
5888
|
colors: ["rgb(99, 99, 230)", "#10B981"],
|
|
5885
5889
|
centerLabel: "donors",
|
|
5886
|
-
centerValue:
|
|
5890
|
+
centerValue: totalDonorsMix.toString(),
|
|
5887
5891
|
items: [{
|
|
5888
5892
|
label: "New donors",
|
|
5889
|
-
val: "
|
|
5893
|
+
val: "".concat(donorMix.newDonors || 0, " \xB7 ").concat(newDonorsPerc, "%"),
|
|
5890
5894
|
color: "rgb(99, 99, 230)"
|
|
5891
5895
|
}, {
|
|
5892
5896
|
label: "Returning",
|
|
5893
|
-
val: "
|
|
5897
|
+
val: "".concat(donorMix.returningDonors || 0, " \xB7 ").concat(returningDonorsPerc, "%"),
|
|
5894
5898
|
color: "#10B981"
|
|
5895
5899
|
}],
|
|
5896
|
-
bottomSummaryValue: "$
|
|
5897
|
-
bottomSummaryTrend: "
|
|
5900
|
+
bottomSummaryValue: "$".concat(donorMix.avgGift || 0),
|
|
5901
|
+
bottomSummaryTrend: "".concat(donorMix.donorMixPrev || 0, "% vs ").concat(dateName || "last month"),
|
|
5898
5902
|
sx: {
|
|
5899
5903
|
width: "100%"
|
|
5900
5904
|
}
|