@ammarkhalidfarooq/dashboard-package 0.3.38 → 0.3.39
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 +14 -58
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14 -58
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5516,6 +5516,7 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5516
5516
|
icon: Adjust
|
|
5517
5517
|
}
|
|
5518
5518
|
};
|
|
5519
|
+
var activeCampaignsData = (apiData === null || apiData === void 0 ? void 0 : apiData.activeCampaigns) || [];
|
|
5519
5520
|
var renderCard = function renderCard(title) {
|
|
5520
5521
|
return /*#__PURE__*/jsx(DisplayCard, {
|
|
5521
5522
|
title: title,
|
|
@@ -5854,64 +5855,19 @@ var OverallSection = function OverallSection(_ref) {
|
|
|
5854
5855
|
columns: ["Campaign", "Raised", "Progress", "Donors", "Avg gift"
|
|
5855
5856
|
// "Status",
|
|
5856
5857
|
],
|
|
5857
|
-
rows:
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
name: "Emergency food — Gaza",
|
|
5871
|
-
val1: "$62,100",
|
|
5872
|
-
type: "progress",
|
|
5873
|
-
progress: 83,
|
|
5874
|
-
val3: "61",
|
|
5875
|
-
val4: "$1,018"
|
|
5876
|
-
// status: "Active",
|
|
5877
|
-
// statusColor: "#22C55E",
|
|
5878
|
-
// statusBg: "#DCFCE7",
|
|
5879
|
-
}, {
|
|
5880
|
-
id: "MB",
|
|
5881
|
-
name: "Masjid build — Somalia",
|
|
5882
|
-
val1: "$38,200",
|
|
5883
|
-
type: "progress",
|
|
5884
|
-
progress: 48,
|
|
5885
|
-
val3: "34",
|
|
5886
|
-
val4: "$1,124"
|
|
5887
|
-
// status: "Slow",
|
|
5888
|
-
// statusColor: "#B45309",
|
|
5889
|
-
// statusBg: "#FEF3C7",
|
|
5890
|
-
// progressColor: "#F59E0B",
|
|
5891
|
-
}, {
|
|
5892
|
-
id: "WW",
|
|
5893
|
-
name: "Water wells — Pakistan",
|
|
5894
|
-
val1: "$29,800",
|
|
5895
|
-
type: "progress",
|
|
5896
|
-
progress: 99,
|
|
5897
|
-
val3: "28",
|
|
5898
|
-
val4: "$1,064"
|
|
5899
|
-
// status: "Closing",
|
|
5900
|
-
// statusColor: "#6366F1",
|
|
5901
|
-
// statusBg: "#EEF2FF",
|
|
5902
|
-
// progressColor: "#10B981",
|
|
5903
|
-
}, {
|
|
5904
|
-
id: "RP",
|
|
5905
|
-
name: "Ramadan packs — Egypt",
|
|
5906
|
-
val1: "$19,400",
|
|
5907
|
-
type: "progress",
|
|
5908
|
-
progress: 78,
|
|
5909
|
-
val3: "10",
|
|
5910
|
-
val4: "$1,940"
|
|
5911
|
-
// status: "Active",
|
|
5912
|
-
// statusColor: "#22C55E",
|
|
5913
|
-
// statusBg: "#DCFCE7",
|
|
5914
|
-
}]
|
|
5858
|
+
rows: activeCampaignsData.map(function (campaign) {
|
|
5859
|
+
return {
|
|
5860
|
+
id: campaign.campaignName ? campaign.campaignName.split(" ").filter(Boolean).map(function (word) {
|
|
5861
|
+
return word[0];
|
|
5862
|
+
}).join("").toUpperCase().slice(0, 2) : "??",
|
|
5863
|
+
name: campaign.campaignName || "Untitled Campaign",
|
|
5864
|
+
val1: "$".concat(formatNumber(campaign.raisedAmount || 0)),
|
|
5865
|
+
type: "progress",
|
|
5866
|
+
progress: Math.round((campaign.raisedAmount || 0) / (campaign.totalAmount || 1) * 100),
|
|
5867
|
+
val3: formatNumber(campaign.donors || 0),
|
|
5868
|
+
val4: "$".concat(formatNumber(campaign.avgGift || 0))
|
|
5869
|
+
};
|
|
5870
|
+
})
|
|
5915
5871
|
})
|
|
5916
5872
|
}), /*#__PURE__*/jsx(Grid, {
|
|
5917
5873
|
item: true,
|