datastake-daf 0.6.764 → 0.6.766

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.
Files changed (60) hide show
  1. package/dist/components/index.js +353 -191
  2. package/dist/layouts/index.js +0 -3
  3. package/dist/pages/index.js +308 -223
  4. package/dist/services/index.js +18 -0
  5. package/dist/utils/index.js +312 -4
  6. package/package.json +1 -2
  7. package/src/@daf/core/components/Charts/BarChart/index.jsx +4 -0
  8. package/src/@daf/core/components/Dashboard/Map/ChainIcon/index.js +0 -7
  9. package/src/@daf/core/components/Graphs/StakeholderMappings/index.jsx +0 -2
  10. package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +3 -4
  11. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/KeyIndicatorsWidget/config.js +2 -2
  12. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/KeyIndicatorsWidget/index.jsx +1 -1
  13. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserActivity/helper.js +4 -1
  14. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserActivity/index.jsx +5 -0
  15. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/UserGrowth/index.jsx +1 -0
  16. package/src/@daf/core/components/Screens/Admin/AdminDashboard/components/UserStatistics/index.jsx +34 -26
  17. package/src/@daf/core/components/Screens/Admin/AdminDashboard/index.jsx +56 -52
  18. package/src/@daf/core/components/Screens/Admin/AdminScreens/Dashboard.jsx +52 -67
  19. package/src/@daf/core/components/Screens/Admin/AdminScreens/Location.jsx +96 -0
  20. package/src/@daf/core/components/Screens/Admin/AdminScreens/Subjects.jsx +96 -0
  21. package/src/@daf/core/components/Screens/Admin/AdminScreens/index.js +2 -1
  22. package/src/@daf/core/components/Screens/Admin/adminRoutes.js +116 -89
  23. package/src/@daf/core/components/Table/MoreTags/index.jsx +17 -5
  24. package/src/@daf/layouts/AuthLayout/components/Navbar/index.jsx +0 -1
  25. package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/Identification/hook.js +10 -10
  26. package/src/@daf/pages/Dashboards/SupplyChain/components/SupplyChainMap/index.js +6 -3
  27. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/helper.js +1 -14
  28. package/src/@daf/pages/Dashboards/UserDashboard/components/ContributionsGraph/hook.js +12 -5
  29. package/src/@daf/pages/Dashboards/UserDashboard/components/MineSites/index.jsx +1 -1
  30. package/src/@daf/pages/Dashboards/UserDashboard/components/Triangulation/hook.js +1 -1
  31. package/src/@daf/pages/Data/Channels/columns.js +175 -0
  32. package/src/@daf/pages/Data/Channels/config.js +0 -0
  33. package/src/@daf/pages/Data/Channels/create.jsx +0 -0
  34. package/src/@daf/pages/Data/Channels/index.jsx +0 -0
  35. package/src/@daf/pages/Events/Activities/columns.js +1 -4
  36. package/src/@daf/pages/Events/helper.js +3 -2
  37. package/src/@daf/pages/Events/index.jsx +1 -1
  38. package/src/@daf/pages/Locations/MineSite/columns.js +6 -4
  39. package/src/@daf/pages/Stakeholders/Operators/columns.js +4 -2
  40. package/src/@daf/pages/Summary/Activities/PlantingCycle/config.js +40 -0
  41. package/src/@daf/pages/Summary/Activities/PlantingCycle/helper.js +122 -0
  42. package/src/@daf/pages/Summary/Activities/PlantingCycle/index.jsx +47 -0
  43. package/src/@daf/pages/Summary/Activities/Restoration/config.js +1 -1
  44. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/config.js +2 -2
  45. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/helper.js +7 -7
  46. package/src/@daf/pages/Summary/Minesite/components/StakeholderMapping/index.js +3 -2
  47. package/src/@daf/pages/Summary/Minesite/index.jsx +3 -1
  48. package/src/@daf/pages/Summary/Operator/components/Governance/index.js +0 -1
  49. package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +33 -21
  50. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/helper.js +13 -13
  51. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/hook.js +8 -8
  52. package/src/@daf/pages/Summary/Operator/components/TradeRelationships/index.js +5 -2
  53. package/src/@daf/pages/Summary/Operator/index.jsx +3 -0
  54. package/src/@daf/pages/Summary/components/InformationAvailability/index.js +4 -3
  55. package/src/@daf/services/AdminService.js +14 -0
  56. package/src/constants/locales/en/translation.js +104 -2
  57. package/src/constants/locales/fr/translation.js +104 -1
  58. package/src/constants/locales/sp/translation.js +104 -1
  59. package/src/index.js +2 -0
  60. package/src/pages.js +1 -0
@@ -760,6 +760,24 @@ class AdminService extends BaseService {
760
760
  url: `/accounts/cancelInvitation/${token}`
761
761
  });
762
762
  }
763
+ getSubjects({
764
+ subject,
765
+ params
766
+ }) {
767
+ return this.apiGet({
768
+ url: `${subject}`,
769
+ params
770
+ });
771
+ }
772
+ mergeSubjects({
773
+ subject,
774
+ ...data
775
+ }) {
776
+ return this.apiPost({
777
+ url: `/merge/${subject}`,
778
+ data
779
+ });
780
+ }
763
781
  }
764
782
  var AdminService$1 = createLazyService(AdminService);
765
783
 
@@ -7724,15 +7724,117 @@ function getRedirectPath(user, fallback = '', app, isDatastake) {
7724
7724
  }
7725
7725
 
7726
7726
  const en = {
7727
+ "Identified Customers": "Identified Customers",
7728
+ "Identified Suppliers": "Identified Suppliers",
7729
+ "Associated Mine Sites": "Associated Mine Sites",
7730
+ "Supply Chain Position": "Supply Chain Position",
7731
+ "Governance": "Governance",
7732
+ "Holding": "Holding",
7733
+ "Operator Review": "Operator Review",
7734
+ "Stakeholder Mapping": "Stakeholder Mapping",
7735
+ "sources-reporting": "Sources Reporting",
7736
+ "link-details": "Link details",
7737
+ "Mine Site Details": "Mine Site Details",
7738
+ "Number of Workers on Site": "Number of Workers on Site",
7739
+ "Extraction Methods": "Extraction Methods",
7740
+ "Find Data": "Find Data",
7741
+ "Mine Review": "Mine Review",
7742
+ "Completion": "Completion",
7743
+ "Information Completeness": "Information Completeness",
7744
+ "Consolidated": "Consolidated",
7745
+ "Datapoints": "Datapoints",
7746
+ "Own Data": "Own Data",
7747
+ "Create Worker": "Create Worker",
7748
+ "Workers": "Workers",
7749
+ "Census Update": "Census Update",
7750
+ "Create Operator": "Create Operator",
7751
+ "Edit Settings": "Edit Settings",
7752
+ "Create Partner": "Create Partner",
7753
+ "Only authorised users can create partnerships.": "Only authorised users can create partnerships.",
7754
+ "Partners are organisations sharing their information with you, or receiving your information.": "Partners are organisations sharing their information with you, or receiving your information.",
7755
+ "List": "List",
7756
+ "Partner suspended successfully": "Partner suspended successfully",
7757
+ "Invitation type": "Invitation type",
7758
+ "Person name": "Person name",
7759
+ "Source: This partner will share information with you.": "Source: This partner will share information with you.",
7760
+ "Client: You will share information with this partner.": "Client: You will share information with this partner.",
7761
+ "Exchange: You will both share information with each other.": "Exchange: You will both share information with each other.",
7762
+ "Type of partnership": "Type of partnership",
7763
+ "Type of partner": "Type of partner",
7764
+ "Re-activate Partnership": "Re-activate Partnership",
7765
+ "Activate Partner": "Activate Partner",
7766
+ "Resend Invitation": "Resend Invitation",
7767
+ "Resend Invite": "Resend Invite",
7768
+ "Copy Invitation Link": "Copy Invitation Link",
7769
+ "Are you sure you want to suspend this partner?": "Are you sure you want to suspend this partner?",
7770
+ "Suspend Partner": "Suspend Partner",
7771
+ "Are you sure you want to block this user?": "Are you sure you want to block this user?",
7772
+ "Block User": "Block User",
7773
+ "Suspended": "Suspended",
7774
+ "Entity Type": "Entity Type",
7775
+ "Source: This partner shares information with your organisation.": "Source: This partner shares information with your organisation.",
7776
+ "Client: This partner receives information from your organisation.": "Client: This partner receives information from your organisation.",
7777
+ "Exchange: You share information with each other.": "Exchange: You share information with each other.",
7778
+ "Create Production Site": "Create Production Site",
7779
+ "production-sites": "Production Sites",
7780
+ "Summary": "Summary",
7781
+ "Create Locations": "Create Locations",
7782
+ "Create Incidents": "Create Incidents",
7783
+ "Create Activity": "Create Activity",
7784
+ "Activities": "Activities",
7785
+ "Create Events": "Create Events",
7786
+ "Create Document": "Create Document",
7787
+ "Documents": "Documents",
7788
+ "Triangluation": "Triangluation",
7789
+ "Monitoring Map": "Monitoring Map",
7790
+ "Major Incidents": "Major Incidents",
7791
+ "Minor Incidents": "Minor Incidents",
7792
+ "Moderate Incidents": "Moderate Incidents",
7793
+ "Mine Site": "Mine Site",
7794
+ "Location Type": "Location Type",
7795
+ "Data Points": "Data Points",
7796
+ "Information Subjects": "Information Subjects",
7797
+ "Data Compilation": "Data Compilation",
7798
+ "Data Chain of Custody": "Data Chain of Custody",
7799
+ "Contributions": "Contributions",
7800
+ "Others": "Others",
7801
+ "Locations Data": "Locations Data",
7802
+ "Stakeholders Data": "Stakeholders Data",
7803
+ "Events Data": "Events Data",
7804
+ "Accumulation": "Accumulation",
7805
+ "Create Mine Site": "Create Mine Site",
7806
+ "Supply Chain Map": "Supply Chain Map",
7807
+ "Participants": "Participants",
7808
+ "Trade Connections": "Trade Connections",
7809
+ "Key Information": "Key Information",
7810
+ "Weekly": "Weekly",
7811
+ "Monthly": "Monthly",
7812
+ "Daily": "Daily",
7813
+ "Workforce": "Workforce",
7814
+ "Trade Actors": "Trade Actors",
7815
+ "Mining Sites": "Mining Sites",
7816
+ "Primary Data Collection": "Primary Data Collection",
7817
+ "Implementation Partner": "Implementation Partner",
7818
+ "Origin": "Origin",
7819
+ "Activity Participants": "Activity Participants",
7820
+ "Legal Form": "Legal Form",
7821
+ "Hectares Planted": "Hectares Planted",
7822
+ "Sub Category": "Sub Category",
7823
+ "Licensing": "Licensing",
7824
+ "Email address": "Email address",
7825
+ "Partner Type": "Partner Type",
7826
+ "Product": "Product",
7827
+ "Filter by": "Filter by",
7828
+ "Key Stakeholder": "Key Stakeholder",
7829
+ "Mineral Supply Chain Transparency": "Mineral Supply Chain Transparency",
7727
7830
  "no-board-members": "No board members identified",
7728
7831
  "no-management": "No management identified",
7729
7832
  "no-beneficiaries": "No beneficiaries identified",
7730
7833
  "no-stakeholders": "No stakeholders identified",
7731
7834
  "no-operators": "No operators identified",
7732
7835
  "no-traders": "No traders identified",
7733
- "no-government": "No government identified",
7836
+ "no-governance": "No governance identified",
7734
7837
  "no-other": "No other identified",
7735
- "No planning required": "No planning required",
7736
7838
  "No evaluation required": "No evaluation required",
7737
7839
  "No improvement required": "No improvement required",
7738
7840
  "Currently unavailable": "Currently unavailable",
@@ -8935,13 +9037,116 @@ const en = {
8935
9037
  };
8936
9038
 
8937
9039
  const fr = {
9040
+ "Identified Customers": "Clients identifiés",
9041
+ "Identified Suppliers": "Fournisseurs identifiés",
9042
+ "Associated Mine Sites": "Sites miniers associés",
9043
+ "Supply Chain Position": "Position dans la chaîne d'approvisionnement",
9044
+ "Governance": "Gouvernance",
9045
+ "Holding": "Holding",
9046
+ "Operator Review": "Évaluation de l'opérateur",
9047
+ "Stakeholder Mapping": "Cartographie des parties prenantes",
9048
+ "sources-reporting": "Sources de rapport",
9049
+ "link-details": "Détails du lien",
9050
+ "Mine Site Details": "Détails du site minier",
9051
+ "Number of Workers on Site": "Nombre de travailleurs sur le site",
9052
+ "Extraction Methods": "Méthodes d'extraction",
9053
+ "Find Data": "Rechercher des données",
9054
+ "Mine Review": "Évaluation de la mine",
9055
+ "Completion": "Achèvement",
9056
+ "Information Completeness": "Complétude de l'information",
9057
+ "Consolidated": "Consolidé",
9058
+ "Datapoints": "Points de données",
9059
+ "Own Data": "Données propres",
9060
+ "Create Worker": "Créer un travailleur",
9061
+ "Workers": "Travailleurs",
9062
+ "Census Update": "Mise à jour du recensement",
9063
+ "Create Operator": "Créer un opérateur",
9064
+ "Edit Settings": "Modifier les paramètres",
9065
+ "Create Partner": "Créer un partenaire",
9066
+ "Only authorised users can create partnerships.": "Seuls les utilisateurs autorisés peuvent créer des partenariats.",
9067
+ "Partners are organisations sharing their information with you, or receiving your information.": "Les partenaires sont des organisations qui partagent leurs informations avec vous ou qui reçoivent vos informations.",
9068
+ "List": "Liste",
9069
+ "Partner suspended successfully": "Partenaire suspendu avec succès",
9070
+ "Invitation type": "Type d'invitation",
9071
+ "Person name": "Nom de la personne",
9072
+ "Source: This partner will share information with you.": "Source : Ce partenaire partagera des informations avec vous.",
9073
+ "Client: You will share information with this partner.": "Client : Vous partagerez des informations avec ce partenaire.",
9074
+ "Exchange: You will both share information with each other.": "Échange : Vous partagerez tous deux des informations l'un avec l'autre.",
9075
+ "Type of partnership": "Type de partenariat",
9076
+ "Type of partner": "Type de partenaire",
9077
+ "Re-activate Partnership": "Réactiver le partenariat",
9078
+ "Activate Partner": "Activer le partenaire",
9079
+ "Resend Invitation": "Renvoyer l'invitation",
9080
+ "Resend Invite": "Renvoyer l'invitation",
9081
+ "Copy Invitation Link": "Copier le lien d'invitation",
9082
+ "Are you sure you want to suspend this partner?": "Êtes-vous sûr de vouloir suspendre ce partenaire ?",
9083
+ "Suspend Partner": "Suspendre le partenaire",
9084
+ "Are you sure you want to block this user?": "Êtes-vous sûr de vouloir bloquer cet utilisateur ?",
9085
+ "Block User": "Bloquer l'utilisateur",
9086
+ "Suspended": "Suspendu",
9087
+ "Entity Type": "Type d'entité",
9088
+ "Source: This partner shares information with your organisation.": "Source : Ce partenaire partage des informations avec votre organisation.",
9089
+ "Client: This partner receives information from your organisation.": "Client : Ce partenaire reçoit des informations de votre organisation.",
9090
+ "Exchange: You share information with each other.": "Échange : Vous partagez des informations l'un avec l'autre.",
9091
+ "Create Production Site": "Créer un site de production",
9092
+ "production-sites": "Sites de production",
9093
+ "Summary": "Résumé",
9094
+ "Create Locations": "Créer des emplacements",
9095
+ "Create Incidents": "Créer des incidents",
9096
+ "Create Activity": "Créer une activité",
9097
+ "Activities": "Activités",
9098
+ "Create Events": "Créer des événements",
9099
+ "Create Document": "Créer un document",
9100
+ "Documents": "Documents",
9101
+ "Triangluation": "Triangulation",
9102
+ "Monitoring Map": "Carte de surveillance",
9103
+ "Major Incidents": "Incidents majeurs",
9104
+ "Minor Incidents": "Incidents mineurs",
9105
+ "Moderate Incidents": "Incidents modérés",
9106
+ "Mine Site": "Site minier",
9107
+ "Location Type": "Type d'emplacement",
9108
+ "Data Points": "Points de données",
9109
+ "Information Subjects": "Sujets d'information",
9110
+ "Data Compilation": "Compilation de données",
9111
+ "Data Chain of Custody": "Chaîne de traçabilité des données",
9112
+ "Contributions": "Contributions",
9113
+ "Others": "Autres",
9114
+ "Locations Data": "Données de localisation",
9115
+ "Stakeholders Data": "Données des parties prenantes",
9116
+ "Events Data": "Données d'événements",
9117
+ "Accumulation": "Accumulation",
9118
+ "Create Mine Site": "Créer un site minier",
9119
+ "Supply Chain Map": "Carte de la chaîne d'approvisionnement",
9120
+ "Participants": "Participants",
9121
+ "Trade Connections": "Connexions commerciales",
9122
+ "Key Information": "Informations clés",
9123
+ "Weekly": "Hebdomadaire",
9124
+ "Monthly": "Mensuel",
9125
+ "Daily": "Quotidien",
9126
+ "Workforce": "Main-d'œuvre",
9127
+ "Trade Actors": "Acteurs commerciaux",
9128
+ "Mining Sites": "Sites miniers",
9129
+ "Primary Data Collection": "Collecte de données primaires",
9130
+ "Implementation Partner": "Partenaire de mise en œuvre",
9131
+ "Origin": "Origine",
9132
+ "Activity Participants": "Participants à l'activité",
9133
+ "Legal Form": "Forme juridique",
9134
+ "Hectares Planted": "Hectares plantés",
9135
+ "Sub Category": "Sous-catégorie",
9136
+ "Licensing": "Licences",
9137
+ "Email address": "Adresse e-mail",
9138
+ "Partner Type": "Type de partenaire",
9139
+ "Product": "Produit",
9140
+ "Filter by": "Filtrer par",
9141
+ "Key Stakeholder": "Partie prenante clé",
9142
+ "Mineral Supply Chain Transparency": "Transparence de la chaîne d'approvisionnement minérale",
8938
9143
  "no-board-members": "Aucun membre du conseil d'administration identifié",
8939
9144
  "no-management": "Aucun management identifié",
8940
9145
  "no-beneficiaries": "Aucun bénéficiaire identifié",
8941
9146
  "no-stakeholders": "Aucun stakeholder identifié",
8942
9147
  "no-operators": "Aucun opérateur identifié",
8943
9148
  "no-traders": "Aucun négociant identifié",
8944
- "no-government": "Aucun gouvernement identifié",
9149
+ "no-governance": "Aucun gouvernance identifié",
8945
9150
  "no-other": "Aucun autre identifié",
8946
9151
  "No planning required": "Pas de planification requise",
8947
9152
  "No evaluation required": "Pas d'évaluation requise",
@@ -10779,13 +10984,116 @@ const fr = {
10779
10984
  };
10780
10985
 
10781
10986
  const sp = {
10987
+ "Identified Customers": "Clientes identificados",
10988
+ "Identified Suppliers": "Proveedores identificados",
10989
+ "Associated Mine Sites": "Sitios mineros asociados",
10990
+ "Supply Chain Position": "Posición en la cadena de suministro",
10991
+ "Governance": "Gobernanza",
10992
+ "Holding": "Holding",
10993
+ "Operator Review": "Revisión del operador",
10994
+ "Stakeholder Mapping": "Mapeo de partes interesadas",
10995
+ "sources-reporting": "Fuentes de informes",
10996
+ "link-details": "Detalles del enlace",
10997
+ "Mine Site Details": "Detalles del sitio minero",
10998
+ "Number of Workers on Site": "Número de trabajadores en el sitio",
10999
+ "Extraction Methods": "Métodos de extracción",
11000
+ "Find Data": "Buscar datos",
11001
+ "Mine Review": "Revisión de la mina",
11002
+ "Completion": "Finalización",
11003
+ "Information Completeness": "Completitud de la información",
11004
+ "Consolidated": "Consolidado",
11005
+ "Datapoints": "Puntos de datos",
11006
+ "Own Data": "Datos propios",
11007
+ "Create Worker": "Crear trabajador",
11008
+ "Workers": "Trabajadores",
11009
+ "Census Update": "Actualización del censo",
11010
+ "Create Operator": "Crear operador",
11011
+ "Edit Settings": "Editar configuración",
11012
+ "Create Partner": "Crear socio",
11013
+ "Only authorised users can create partnerships.": "Solo los usuarios autorizados pueden crear asociaciones.",
11014
+ "Partners are organisations sharing their information with you, or receiving your information.": "Los socios son organizaciones que comparten su información con usted o reciben su información.",
11015
+ "List": "Lista",
11016
+ "Partner suspended successfully": "Socio suspendido exitosamente",
11017
+ "Invitation type": "Tipo de invitación",
11018
+ "Person name": "Nombre de la persona",
11019
+ "Source: This partner will share information with you.": "Fuente: Este socio compartirá información con usted.",
11020
+ "Client: You will share information with this partner.": "Cliente: Compartirá información con este socio.",
11021
+ "Exchange: You will both share information with each other.": "Intercambio: Ambos compartirán información entre sí.",
11022
+ "Type of partnership": "Tipo de asociación",
11023
+ "Type of partner": "Tipo de socio",
11024
+ "Re-activate Partnership": "Reactivar asociación",
11025
+ "Activate Partner": "Activar socio",
11026
+ "Resend Invitation": "Reenviar invitación",
11027
+ "Resend Invite": "Reenviar invitación",
11028
+ "Copy Invitation Link": "Copiar enlace de invitación",
11029
+ "Are you sure you want to suspend this partner?": "¿Está seguro de que desea suspender a este socio?",
11030
+ "Suspend Partner": "Suspender socio",
11031
+ "Are you sure you want to block this user?": "¿Está seguro de que desea bloquear a este usuario?",
11032
+ "Block User": "Bloquear usuario",
11033
+ "Suspended": "Suspendido",
11034
+ "Entity Type": "Tipo de entidad",
11035
+ "Source: This partner shares information with your organisation.": "Fuente: Este socio comparte información con su organización.",
11036
+ "Client: This partner receives information from your organisation.": "Cliente: Este socio recibe información de su organización.",
11037
+ "Exchange: You share information with each other.": "Intercambio: Comparten información entre sí.",
11038
+ "Create Production Site": "Crear sitio de producción",
11039
+ "production-sites": "Sitios de producción",
11040
+ "Summary": "Resumen",
11041
+ "Create Locations": "Crear ubicaciones",
11042
+ "Create Incidents": "Crear incidentes",
11043
+ "Create Activity": "Crear actividad",
11044
+ "Activities": "Actividades",
11045
+ "Create Events": "Crear eventos",
11046
+ "Create Document": "Crear documento",
11047
+ "Documents": "Documentos",
11048
+ "Triangluation": "Triangulación",
11049
+ "Monitoring Map": "Mapa de monitoreo",
11050
+ "Major Incidents": "Incidentes mayores",
11051
+ "Minor Incidents": "Incidentes menores",
11052
+ "Moderate Incidents": "Incidentes moderados",
11053
+ "Mine Site": "Sitio minero",
11054
+ "Location Type": "Tipo de ubicación",
11055
+ "Data Points": "Puntos de datos",
11056
+ "Information Subjects": "Temas de información",
11057
+ "Data Compilation": "Compilación de datos",
11058
+ "Data Chain of Custody": "Cadena de custodia de datos",
11059
+ "Contributions": "Contribuciones",
11060
+ "Others": "Otros",
11061
+ "Locations Data": "Datos de ubicaciones",
11062
+ "Stakeholders Data": "Datos de partes interesadas",
11063
+ "Events Data": "Datos de eventos",
11064
+ "Accumulation": "Acumulación",
11065
+ "Create Mine Site": "Crear sitio minero",
11066
+ "Supply Chain Map": "Mapa de la cadena de suministro",
11067
+ "Participants": "Participantes",
11068
+ "Trade Connections": "Conexiones comerciales",
11069
+ "Key Information": "Información clave",
11070
+ "Weekly": "Semanal",
11071
+ "Monthly": "Mensual",
11072
+ "Daily": "Diario",
11073
+ "Workforce": "Fuerza laboral",
11074
+ "Trade Actors": "Actores comerciales",
11075
+ "Mining Sites": "Sitios mineros",
11076
+ "Primary Data Collection": "Recopilación de datos primarios",
11077
+ "Implementation Partner": "Socio de implementación",
11078
+ "Origin": "Origen",
11079
+ "Activity Participants": "Participantes de la actividad",
11080
+ "Legal Form": "Forma jurídica",
11081
+ "Hectares Planted": "Hectáreas plantadas",
11082
+ "Sub Category": "Subcategoría",
11083
+ "Licensing": "Licencias",
11084
+ "Email address": "Dirección de correo electrónico",
11085
+ "Partner Type": "Tipo de socio",
11086
+ "Product": "Producto",
11087
+ "Filter by": "Filtrar por",
11088
+ "Key Stakeholder": "Parte interesada clave",
11089
+ "Mineral Supply Chain Transparency": "Transparencia de la cadena de suministro mineral",
10782
11090
  "no-board-members": "No hay miembros del consejo identificados",
10783
11091
  "no-management": "No hay gerencia identificados",
10784
11092
  "no-beneficiaries": "No hay beneficiarios identificados",
10785
11093
  "no-stakeholders": "No hay partes interesadas identificadas",
10786
11094
  "no-operators": "No hay operadores identificados",
10787
11095
  "no-traders": "No hay comerciantes identificados",
10788
- "no-government": "No hay gobierno identificado",
11096
+ "no-governance": "No hay gobernanza identificado",
10789
11097
  "no-other": "No hay otros identificados",
10790
11098
  "No planning required": "No se requiere planeación",
10791
11099
  "No evaluation required": "No se requiere evaluación",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.764",
3
+ "version": "0.6.766",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -15,7 +15,6 @@
15
15
  "buffer": "^6.0.3",
16
16
  "countries-list": "^2.6.1",
17
17
  "country-city-location": "^1.0.13",
18
- "datastake-daf": "^0.6.378",
19
18
  "dayjs": "^1.11.12",
20
19
  "deepmerge": "^4.3.1",
21
20
  "docx": "^9.5.1",
@@ -90,6 +90,7 @@ export default function BarChart({
90
90
  isPdf = false,
91
91
  legendConfig = {},
92
92
  width,
93
+ xAxisConfig = {},
93
94
  ...rest
94
95
  }) {
95
96
  const containerRef = React.useRef(null);
@@ -122,10 +123,12 @@ export default function BarChart({
122
123
  },
123
124
  }
124
125
  : {}),
126
+ ...xAxisConfig,
125
127
  label: {
126
128
  formatter: isPercentage
127
129
  ? (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`) + " %"
128
130
  : formattedXAxis,
131
+ ...xAxisConfig?.label,
129
132
  },
130
133
  },
131
134
  yAxis: {
@@ -170,6 +173,7 @@ export default function BarChart({
170
173
  formattedXAxis,
171
174
  color,
172
175
  token.colorPrimary7,
176
+ xAxisConfig,
173
177
  ]);
174
178
 
175
179
  React.useEffect(() => {
@@ -105,13 +105,6 @@ export default function LocationIcon({
105
105
  const div = document.getElementById(markerId);
106
106
  root.current = createRoot(div);
107
107
 
108
- console.log({
109
- locationID: data.datastakeId,
110
- stakeholder,
111
- index,
112
- parentId: data.datastakeId,
113
- });
114
-
115
108
  root.current.render(
116
109
  <StakeholderIcon
117
110
  data={stakeholder}
@@ -163,7 +163,6 @@ function StakeholderMappings({
163
163
  t = (s) => s,
164
164
  emptyString = undefined,
165
165
  isPdf = false,
166
- zoomOutTransition = false,
167
166
  }) {
168
167
  const reactFlowWrapper = useRef(null);
169
168
  const [nodes, setNodes] = useNodesState([]);
@@ -473,7 +472,6 @@ function StakeholderMappings({
473
472
 
474
473
  return (
475
474
  <BaseGraph
476
- zoomOutTransition={zoomOutTransition}
477
475
  nodes={nodes}
478
476
  mandatoryNodesToFit={mandatoryNodesToFit}
479
477
  edges={edges}
@@ -33,7 +33,6 @@ const BaseGraph = forwardRef(function BaseGraph(
33
33
  withDuration = true,
34
34
  onFilterChange,
35
35
  isPdf,
36
- zoomOutTransition = false,
37
36
  ...props
38
37
  },
39
38
  ref,
@@ -57,8 +56,8 @@ const BaseGraph = forwardRef(function BaseGraph(
57
56
  fitView({
58
57
  padding: 0.4,
59
58
  nodes: [...nodesToFit],
60
- duration: withDuration ? 300 : undefined,
61
- maxZoom: 0.8,
59
+ // duration: withDuration ? 300 : undefined,
60
+ maxZoom: 0.9,
62
61
  });
63
62
  });
64
63
  }, [JSON.stringify(nodesToFit), withDuration]);
@@ -87,7 +86,7 @@ const BaseGraph = forwardRef(function BaseGraph(
87
86
  fitView={true} // zoom out on default
88
87
  fitViewOptions={{
89
88
  padding: 0.2, //zoom out on default
90
- ...(zoomOutTransition ? { duration: withDuration ? 300 : undefined } : {}),
89
+ // ...(zoomOutTransition ? { duration: withDuration ? 300 : undefined } : {}),
91
90
  }}
92
91
  {...props}
93
92
  >
@@ -8,7 +8,7 @@ export function getConfig(data, goTo, t) {
8
8
  return {
9
9
  label: (
10
10
  <div className="flex">
11
- <div className="flex-1">{t(`admin::${item.title}`)}</div>
11
+ <div className="flex-1">{t(`${item.title}`)}</div>
12
12
  <div className="cursor-pointer" onClick={() => goTo(item.goToPath)}>
13
13
  <CustomIcon name="LinkNewTab" width={16} height={16} color={iconColor} />
14
14
  </div>
@@ -17,4 +17,4 @@ export function getConfig(data, goTo, t) {
17
17
  render: () => <span>{renderNumber(item.valueToShow)}</span>,
18
18
  };
19
19
  });
20
- }
20
+ }
@@ -17,4 +17,4 @@ export default function KeyIndicatorsWidget({ data = [], loading, goTo, t }) {
17
17
  />
18
18
  </div>
19
19
  );
20
- }
20
+ }
@@ -53,6 +53,9 @@ export const getColor = (users, items) => {
53
53
 
54
54
  export function useConfig(data) {
55
55
  const config = useMemo(() => {
56
+ // Ensure data is an array to prevent "data.find is not a function" error
57
+ const safeData = Array.isArray(data) ? data : [];
58
+
56
59
  const start = moment().add(-1, "years").format("MMM YY");
57
60
  let now = moment(start, "MMM YY");
58
61
  const _config = [];
@@ -65,7 +68,7 @@ export function useConfig(data) {
65
68
  while (true) {
66
69
  DAYS.forEach((d) => {
67
70
  if (d === nowMonth.format("dd") && now.format("MMM YY") === nowMonth.format("MMM YY")) {
68
- const users = data.find((d) => d._id === nowMonth.format("YYYY-MM-DD"))?.count || 0;
71
+ const users = safeData.find((d) => d._id === nowMonth.format("YYYY-MM-DD"))?.count || 0;
69
72
  conf.push({ date: nowMonth.format("DD MMM YY"), active: true, users: users });
70
73
  nowMonth.add(1, "days");
71
74
  } else {
@@ -10,8 +10,13 @@ const DAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
10
10
 
11
11
  export default function UserActivity({ loading, data = [], t }) {
12
12
  const config = useConfig(data);
13
+
13
14
  const { isCollapsed } = useResizeContext();
14
15
 
16
+
17
+
18
+ // console.log("userActivityyyyy",data);
19
+
15
20
  return (
16
21
  <Widget
17
22
  title={t(`admin::user-activity`)}
@@ -10,6 +10,7 @@ export default function UserGrowth({ loading, data = [], t, translationKeys, fet
10
10
 
11
11
  useUserGrowth({ container, data, t, translationKeys });
12
12
 
13
+
13
14
  useEffect(() => {
14
15
  if (typeof fetchUserGrowth === "function") {
15
16
  fetchUserGrowth(selectValue);
@@ -4,32 +4,40 @@ import TopContributors from "./TopContributors/index.jsx";
4
4
  import Widget from "../../../../../Dashboard/Widget/index.jsx";
5
5
 
6
6
  export default function UserStatistics({
7
- fetchUserGrowth,
8
- loading,
9
- loadingUserGrowth,
10
- data,
11
- t,
12
- translationKeys,
7
+ fetchUserGrowth,
8
+ loading,
9
+ loadingUserGrowth,
10
+ data,
11
+ t,
12
+ translationKeys,
13
13
  }) {
14
- return (
15
- <Widget
16
- title={t(`${translationKeys}-admin::usage-statistics`)}
17
- className="with-border-header"
18
- >
19
- <div className="flex flex-column gap-6">
20
- <UserActivity loading={loading} data={data.userActivityData} t={t} />
14
+ // console.log("UserStatistics:loading", loading);
15
+ // console.log("UserStatistics:loadingUserGrowth", loadingUserGrowth);
16
+ // console.log("UserStatistics:data", data);
17
+ // console.log("UserStatistics:userActivityData", data?.userActivityData);
18
+ // console.log("UserStatistics:topContributorsData", data?.topContributorsData);
19
+ // console.log("UserStatistics:userGrowthData", data?.userGrowthData);
21
20
 
22
- <div className="flex flex-row flex-col-mobile gap-6">
23
- <TopContributors data={data.topContributorsData} loading={loading} t={t} />
24
- <UserGrowth
25
- t={t}
26
- loading={loadingUserGrowth}
27
- data={data.userGrowthData}
28
- fetchUserGrowth={fetchUserGrowth}
29
- translationKeys={translationKeys}
30
- />
31
- </div>
32
- </div>
33
- </Widget>
34
- );
21
+
22
+ return (
23
+ <Widget
24
+ title={t(`${translationKeys}-admin::usage-statistics`)}
25
+ className="with-border-header"
26
+ >
27
+ <div className="flex flex-column gap-6">
28
+ <UserActivity loading={loading} data={data.userActivityData || []} t={t} />
29
+
30
+ <div className="flex flex-row flex-col-mobile gap-6">
31
+ <TopContributors data={data.topContributorsData || []} loading={loading} t={t} />
32
+ <UserGrowth
33
+ t={t}
34
+ loading={loadingUserGrowth}
35
+ data={data.userGrowthData || []}
36
+ fetchUserGrowth={fetchUserGrowth}
37
+ translationKeys={translationKeys}
38
+ />
39
+ </div>
40
+ </div>
41
+ </Widget>
42
+ );
35
43
  }