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