datastake-daf 0.6.834 → 0.6.835
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/components/index.js +32 -1
- package/dist/pages/index.js +32 -42
- package/dist/utils/index.js +18 -0
- package/package.json +1 -1
- package/src/@daf/core/components/AuthForm/index.jsx +34 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/ChartsContainer/components/GenderDistribution/index.js +1 -1
- package/src/@daf/pages/Dashboards/SupplyChain/components/KeyIndicators/config.js +4 -4
- package/src/@daf/pages/Data/Channels/columns.js +1 -1
- package/src/@daf/pages/Events/Activities/columns.js +1 -2
- package/src/@daf/pages/Events/Incidents/columns.js +1 -2
- package/src/@daf/pages/Events/Testimonials/columns.js +1 -2
- package/src/@daf/pages/Events/columns.js +3 -3
- package/src/@daf/pages/Locations/MineSite/columns.js +1 -1
- package/src/@daf/pages/Stakeholders/Operators/columns.js +0 -2
- package/src/@daf/pages/Stakeholders/Workers/columns.js +1 -3
- package/src/@daf/pages/Summary/Operator/components/KeyInformation/config.js +1 -0
- package/src/@daf/pages/TablePage/create.jsx +6 -6
- package/src/@daf/pages/TablePage/index.jsx +1 -7
- package/src/constants/locales/en/translation.js +6 -0
- package/src/constants/locales/fr/translation.js +6 -0
- package/src/constants/locales/sp/translation.js +6 -0
package/dist/components/index.js
CHANGED
|
@@ -43057,7 +43057,38 @@ function AuthForm(_ref) {
|
|
|
43057
43057
|
initialValues: isMultiStep ? allFormValues : initialValues,
|
|
43058
43058
|
onFinish: handleSubmit,
|
|
43059
43059
|
onValuesChange: handleValuesChange,
|
|
43060
|
-
children: [
|
|
43060
|
+
children: [(() => {
|
|
43061
|
+
const {
|
|
43062
|
+
step,
|
|
43063
|
+
order
|
|
43064
|
+
} = additionalItemConfig;
|
|
43065
|
+
const shouldShowAdditionalItem = additionalItem && (step === undefined || step === currentStep);
|
|
43066
|
+
if (!shouldShowAdditionalItem) {
|
|
43067
|
+
return currentFields.map(renderField);
|
|
43068
|
+
}
|
|
43069
|
+
const fieldsWithAdditionalItem = [...currentFields];
|
|
43070
|
+
const insertIndex = order !== undefined ? order : fieldsWithAdditionalItem.length;
|
|
43071
|
+
return fieldsWithAdditionalItem.map((field, index) => {
|
|
43072
|
+
const elements = [];
|
|
43073
|
+
if (index === insertIndex) {
|
|
43074
|
+
elements.push( /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43075
|
+
style: {
|
|
43076
|
+
marginBottom: '16px',
|
|
43077
|
+
marginTop: '16px'
|
|
43078
|
+
},
|
|
43079
|
+
children: additionalItem
|
|
43080
|
+
}, "additional-item"));
|
|
43081
|
+
}
|
|
43082
|
+
elements.push(renderField(field));
|
|
43083
|
+
return elements;
|
|
43084
|
+
}).flat().concat(insertIndex >= fieldsWithAdditionalItem.length ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43085
|
+
style: {
|
|
43086
|
+
marginBottom: '16px',
|
|
43087
|
+
marginTop: '16px'
|
|
43088
|
+
},
|
|
43089
|
+
children: additionalItem
|
|
43090
|
+
}, "additional-item") : []);
|
|
43091
|
+
})(), formErrors ? renderErrors(formErrors, t) : null, isMultiStep && currentStep > 0 ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
43061
43092
|
className: "flex flex-column gap-2",
|
|
43062
43093
|
style: {
|
|
43063
43094
|
width: '100%'
|
package/dist/pages/index.js
CHANGED
|
@@ -7575,7 +7575,7 @@ const getRowConfig$2 = ({
|
|
|
7575
7575
|
t: t,
|
|
7576
7576
|
getRedirectLink: getRedirectLink,
|
|
7577
7577
|
theme: theme,
|
|
7578
|
-
label: "Identified Mine Sites",
|
|
7578
|
+
label: t("Identified Mine Sites"),
|
|
7579
7579
|
link: APP === 'nashiriki' ? '/app/scl' : '/app/production-sites'
|
|
7580
7580
|
}),
|
|
7581
7581
|
render: () => {
|
|
@@ -7588,7 +7588,7 @@ const getRowConfig$2 = ({
|
|
|
7588
7588
|
t: t,
|
|
7589
7589
|
getRedirectLink: getRedirectLink,
|
|
7590
7590
|
theme: theme,
|
|
7591
|
-
label: "Identified Operators",
|
|
7591
|
+
label: t("Identified Operators"),
|
|
7592
7592
|
link: "/app/operators"
|
|
7593
7593
|
}),
|
|
7594
7594
|
render: () => /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -7610,7 +7610,7 @@ const getRowConfig$2 = ({
|
|
|
7610
7610
|
t: t,
|
|
7611
7611
|
getRedirectLink: getRedirectLink,
|
|
7612
7612
|
theme: theme,
|
|
7613
|
-
label: "Associated Documents",
|
|
7613
|
+
label: t("Associated Documents"),
|
|
7614
7614
|
link: "/app/documents"
|
|
7615
7615
|
}),
|
|
7616
7616
|
render: () => /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -7621,7 +7621,7 @@ const getRowConfig$2 = ({
|
|
|
7621
7621
|
t: t,
|
|
7622
7622
|
getRedirectLink: getRedirectLink,
|
|
7623
7623
|
theme: theme,
|
|
7624
|
-
label: "Information Sources",
|
|
7624
|
+
label: t("Information Sources"),
|
|
7625
7625
|
link: "/app/partners"
|
|
7626
7626
|
}),
|
|
7627
7627
|
render: () => /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -13807,7 +13807,7 @@ function GenderDistribution$1({
|
|
|
13807
13807
|
return renderTooltipJsx({
|
|
13808
13808
|
title: t("Role"),
|
|
13809
13809
|
items: [{
|
|
13810
|
-
label: options?.optionPositionSupplyChain?.find(o => {
|
|
13810
|
+
label: (options?.optionPositionSupplyChain || options?.positionSupplyChainOptions || [])?.find(o => {
|
|
13811
13811
|
return o.value === item.key;
|
|
13812
13812
|
}).label || item.key,
|
|
13813
13813
|
value: data[item.key] || 0
|
|
@@ -41046,21 +41046,20 @@ const Create = ({
|
|
|
41046
41046
|
form: formConfig,
|
|
41047
41047
|
data: formValue
|
|
41048
41048
|
};
|
|
41049
|
+
const language = React.useMemo(() => user?.language, [user?.language]);
|
|
41049
41050
|
React.useEffect(() => {
|
|
41050
|
-
if (
|
|
41051
|
-
|
|
41052
|
-
|
|
41053
|
-
|
|
41054
|
-
|
|
41055
|
-
|
|
41056
|
-
|
|
41057
|
-
|
|
41058
|
-
|
|
41059
|
-
|
|
41060
|
-
data = formValue;
|
|
41061
|
-
}
|
|
41051
|
+
if (!edit) {
|
|
41052
|
+
getData({
|
|
41053
|
+
namespace,
|
|
41054
|
+
module: APP,
|
|
41055
|
+
view,
|
|
41056
|
+
scope
|
|
41057
|
+
});
|
|
41058
|
+
} else {
|
|
41059
|
+
form = formConfig;
|
|
41060
|
+
data = formValue;
|
|
41062
41061
|
}
|
|
41063
|
-
}, [edit,
|
|
41062
|
+
}, [edit, language, scope, namespace, APP, view]);
|
|
41064
41063
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41065
41064
|
className: "daf-create-form",
|
|
41066
41065
|
children: /*#__PURE__*/jsxRuntime.jsx(DynamicForm, {
|
|
@@ -41707,7 +41706,7 @@ const getColumns$e = ({
|
|
|
41707
41706
|
className: "daf-default-cell"
|
|
41708
41707
|
});
|
|
41709
41708
|
}
|
|
41710
|
-
const positionSupplyChainOptions = [...(
|
|
41709
|
+
const positionSupplyChainOptions = [...(options?.positionSupplyChainOptions || []), ...(options?.optionPositionSupplyChain || [])];
|
|
41711
41710
|
const country = findOptions(v, positionSupplyChainOptions);
|
|
41712
41711
|
return country ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41713
41712
|
title: country,
|
|
@@ -41727,7 +41726,7 @@ const getColumns$e = ({
|
|
|
41727
41726
|
className: "daf-default-cell"
|
|
41728
41727
|
});
|
|
41729
41728
|
}
|
|
41730
|
-
const subCategoriesOptions = [...(
|
|
41729
|
+
const subCategoriesOptions = [...(options?.subCategoriesOptions || []), ...(options?.subCategory || [])];
|
|
41731
41730
|
const subCategory = findOptions(v, subCategoriesOptions);
|
|
41732
41731
|
return subCategory ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
41733
41732
|
title: subCategory,
|
|
@@ -42100,8 +42099,6 @@ const getColumns$d = ({
|
|
|
42100
42099
|
className: "daf-default-cell"
|
|
42101
42100
|
});
|
|
42102
42101
|
}
|
|
42103
|
-
|
|
42104
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
42105
42102
|
const mineSite = all?.location?.name;
|
|
42106
42103
|
return mineSite ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42107
42104
|
title: mineSite,
|
|
@@ -42119,7 +42116,7 @@ const getColumns$d = ({
|
|
|
42119
42116
|
className: "daf-default-cell"
|
|
42120
42117
|
});
|
|
42121
42118
|
}
|
|
42122
|
-
const activityAtSiteOptions = [...(
|
|
42119
|
+
const activityAtSiteOptions = [...(options?.activityAtSiteOptions || []), ...(options?.activityAtSite || [])];
|
|
42123
42120
|
const activity = findOptions(v, activityAtSiteOptions);
|
|
42124
42121
|
return activity ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42125
42122
|
title: activity,
|
|
@@ -42858,14 +42855,14 @@ const getColumns$b = ({
|
|
|
42858
42855
|
if (all.navigationEventType === "other") {
|
|
42859
42856
|
return "-";
|
|
42860
42857
|
}
|
|
42861
|
-
const categoryOptions = (
|
|
42858
|
+
const categoryOptions = (options?.categoryOptions || []).map(c => {
|
|
42862
42859
|
const searchTerm = `typeOfEvent is ${all.navigationEventType}`;
|
|
42863
42860
|
return {
|
|
42864
42861
|
value: c.value,
|
|
42865
42862
|
label: c.label[searchTerm]
|
|
42866
42863
|
};
|
|
42867
42864
|
});
|
|
42868
|
-
const relaxantOptions = [...categoryOptions, ...(
|
|
42865
|
+
const relaxantOptions = [...categoryOptions, ...(options?.eventsType || []), ...(options?.testimonialsType || [])];
|
|
42869
42866
|
const title = relaxantOptions.find(v => v.value === value)?.label || "-";
|
|
42870
42867
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
42871
42868
|
title: title,
|
|
@@ -43280,8 +43277,6 @@ const getColumns$a = ({
|
|
|
43280
43277
|
className: "daf-default-cell"
|
|
43281
43278
|
});
|
|
43282
43279
|
}
|
|
43283
|
-
|
|
43284
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
43285
43280
|
const mineSite = all?.location?.name;
|
|
43286
43281
|
return mineSite ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
43287
43282
|
title: mineSite,
|
|
@@ -43337,7 +43332,7 @@ const getColumns$a = ({
|
|
|
43337
43332
|
"corrective-actions": "correctiveActions",
|
|
43338
43333
|
"activities": "activity"
|
|
43339
43334
|
};
|
|
43340
|
-
const eventCategory = findOptions(v,
|
|
43335
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
43341
43336
|
const categoryValue = getEventCategoryBySubject(eventCategory, subjectMap[subject], true);
|
|
43342
43337
|
return categoryValue ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
43343
43338
|
title: categoryValue,
|
|
@@ -43712,8 +43707,6 @@ const getColumns$9 = ({
|
|
|
43712
43707
|
className: "daf-default-cell"
|
|
43713
43708
|
});
|
|
43714
43709
|
}
|
|
43715
|
-
|
|
43716
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
43717
43710
|
const mineSite = all?.location?.name;
|
|
43718
43711
|
return mineSite ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
43719
43712
|
title: mineSite,
|
|
@@ -43765,7 +43758,7 @@ const getColumns$9 = ({
|
|
|
43765
43758
|
className: "daf-default-cell"
|
|
43766
43759
|
});
|
|
43767
43760
|
}
|
|
43768
|
-
const eventCategory = findOptions(v,
|
|
43761
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
43769
43762
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
43770
43763
|
return categoryValue ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
43771
43764
|
title: categoryValue,
|
|
@@ -44160,8 +44153,6 @@ const getColumns$8 = ({
|
|
|
44160
44153
|
className: "daf-default-cell"
|
|
44161
44154
|
});
|
|
44162
44155
|
}
|
|
44163
|
-
|
|
44164
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
44165
44156
|
const mineSite = all?.location?.name;
|
|
44166
44157
|
return mineSite ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44167
44158
|
title: mineSite,
|
|
@@ -44179,7 +44170,7 @@ const getColumns$8 = ({
|
|
|
44179
44170
|
className: "daf-default-cell"
|
|
44180
44171
|
});
|
|
44181
44172
|
}
|
|
44182
|
-
const eventCategory = findOptions(v,
|
|
44173
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
44183
44174
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
44184
44175
|
return categoryValue ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44185
44176
|
title: categoryValue,
|
|
@@ -44794,7 +44785,7 @@ const getColumns$6 = ({
|
|
|
44794
44785
|
className: "daf-default-cell"
|
|
44795
44786
|
});
|
|
44796
44787
|
}
|
|
44797
|
-
const locationCategories = [...(
|
|
44788
|
+
const locationCategories = [...(options?.locationCategories || []), ...(options?.productionSiteCategories || []), ...(options?.locationCategories || [])];
|
|
44798
44789
|
const category = findOptions(v, locationCategories);
|
|
44799
44790
|
return category ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44800
44791
|
title: category,
|
|
@@ -45689,12 +45680,6 @@ const TablePage = ({
|
|
|
45689
45680
|
breadcrumbs = [],
|
|
45690
45681
|
onDownload
|
|
45691
45682
|
}) => {
|
|
45692
|
-
const _options = React.useMemo(() => {
|
|
45693
|
-
return {
|
|
45694
|
-
...options,
|
|
45695
|
-
...data?.options
|
|
45696
|
-
};
|
|
45697
|
-
}, [options, data?.options]);
|
|
45698
45683
|
const {
|
|
45699
45684
|
activeTab,
|
|
45700
45685
|
selectOptions,
|
|
@@ -45710,7 +45695,7 @@ const TablePage = ({
|
|
|
45710
45695
|
location,
|
|
45711
45696
|
getData,
|
|
45712
45697
|
extendingFilters,
|
|
45713
|
-
options
|
|
45698
|
+
options,
|
|
45714
45699
|
t,
|
|
45715
45700
|
goTo,
|
|
45716
45701
|
user,
|
|
@@ -46035,6 +46020,11 @@ const getKeyIndicatorConfig = ({
|
|
|
46035
46020
|
label: t("Legal Form"),
|
|
46036
46021
|
render: () => {
|
|
46037
46022
|
const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions || options?.subCategory);
|
|
46023
|
+
console.log({
|
|
46024
|
+
subCategory,
|
|
46025
|
+
initialSub: data?.subCategory,
|
|
46026
|
+
options: options?.subCategoriesOptions || options?.subCategory
|
|
46027
|
+
});
|
|
46038
46028
|
if (subCategory?.length > 22) {
|
|
46039
46029
|
const _subCategory = truncateString(subCategory, 22);
|
|
46040
46030
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
package/dist/utils/index.js
CHANGED
|
@@ -7850,6 +7850,11 @@ function mapUser(user) {
|
|
|
7850
7850
|
}
|
|
7851
7851
|
|
|
7852
7852
|
const en = {
|
|
7853
|
+
"Identified Mine Sites": "Identified Mine Sites",
|
|
7854
|
+
"Associated Documents": "Associated Documents",
|
|
7855
|
+
"Male": "Male",
|
|
7856
|
+
"Female": "Female",
|
|
7857
|
+
"Invalid input": "Invalid input",
|
|
7853
7858
|
"conflict-management": "Conflict Management",
|
|
7854
7859
|
"review-requests": "Review Requests",
|
|
7855
7860
|
"create-account": "Create Account",
|
|
@@ -9121,6 +9126,7 @@ const en = {
|
|
|
9121
9126
|
"max-char": "Maximum {{filled}}/{{chars}} characters.",
|
|
9122
9127
|
"max-items": "Maximum {{chars}} items.",
|
|
9123
9128
|
"max-item": "Maximum {{chars}} item.",
|
|
9129
|
+
"organisation-already-exist": "If your organisation is already active on {{appName}}, your application will not be reviewed. Instead, please contact the account's main user and request an invitation.",
|
|
9124
9130
|
projectInviteBackDesc: "Are you sure you want to invite this source again?This user will receive a new notification",
|
|
9125
9131
|
DataStore: {
|
|
9126
9132
|
overview: "Overview",
|
|
@@ -9215,6 +9221,11 @@ const en = {
|
|
|
9215
9221
|
};
|
|
9216
9222
|
|
|
9217
9223
|
const fr = {
|
|
9224
|
+
"Identified Mine Sites": "Sites miniers identifiés",
|
|
9225
|
+
"Associated Documents": "Documents associés",
|
|
9226
|
+
"Male": "Masculin",
|
|
9227
|
+
"Female": "Féminin",
|
|
9228
|
+
"Invalid input": "Entrée invalide",
|
|
9218
9229
|
"review-requests": "Examiner les demandes",
|
|
9219
9230
|
"create-account": "Créer un compte",
|
|
9220
9231
|
"manage-users": "Gérer les utilisateurs",
|
|
@@ -10538,6 +10549,7 @@ const fr = {
|
|
|
10538
10549
|
"Please introduce yourself": "Prière de vous présenter",
|
|
10539
10550
|
"Almost There": "On y est presque",
|
|
10540
10551
|
"Help us guide you to the right application": "Aidez-nous à vous guider vers la bonne application",
|
|
10552
|
+
"organisation-already-exist": "Si votre organisation est déjà active dans {{appName}}, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation.",
|
|
10541
10553
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation": "Si votre organisation est déjà active dans Datastake, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation",
|
|
10542
10554
|
"Yes, I understand": "Oui, je comprends",
|
|
10543
10555
|
"Protect your data assets": "Protégez vos données",
|
|
@@ -11146,6 +11158,11 @@ const fr = {
|
|
|
11146
11158
|
};
|
|
11147
11159
|
|
|
11148
11160
|
const sp = {
|
|
11161
|
+
"Identified Mine Sites": "Sitios mineros identificados",
|
|
11162
|
+
"Associated Documents": "Documentos asociados",
|
|
11163
|
+
"Male": "Masculino",
|
|
11164
|
+
"Female": "Femenino",
|
|
11165
|
+
"Invalid input": "Entrada inválida",
|
|
11149
11166
|
"review-requests": "Revisar solicitudes",
|
|
11150
11167
|
"create-account": "Crear cuenta",
|
|
11151
11168
|
"manage-users": "Gestionar usuarios",
|
|
@@ -12152,6 +12169,7 @@ const sp = {
|
|
|
12152
12169
|
"Please introduce yourself": "Preséntese",
|
|
12153
12170
|
"Almost There": "Ya casi está",
|
|
12154
12171
|
"Help us guide you to the right application": "Ayúdenos a guiarle hacia la solicitud correcta",
|
|
12172
|
+
"organisation-already-exist": "Si su organización ya está activa en {{appName}}, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
12155
12173
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation": "Si su organización ya está activa en Datastake, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
12156
12174
|
"Yes, I understand": "Sí, entiendo",
|
|
12157
12175
|
"Protect your data assets": "Proteja sus activos de datos",
|
package/package.json
CHANGED
|
@@ -206,7 +206,40 @@ function AuthForm ({
|
|
|
206
206
|
onFinish={handleSubmit}
|
|
207
207
|
onValuesChange={handleValuesChange}
|
|
208
208
|
>
|
|
209
|
-
{
|
|
209
|
+
{(() => {
|
|
210
|
+
const { step, order } = additionalItemConfig;
|
|
211
|
+
const shouldShowAdditionalItem = additionalItem &&
|
|
212
|
+
(step === undefined || step === currentStep);
|
|
213
|
+
|
|
214
|
+
if (!shouldShowAdditionalItem) {
|
|
215
|
+
return currentFields.map(renderField);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const fieldsWithAdditionalItem = [...currentFields];
|
|
219
|
+
const insertIndex = order !== undefined ? order : fieldsWithAdditionalItem.length;
|
|
220
|
+
|
|
221
|
+
return fieldsWithAdditionalItem.map((field, index) => {
|
|
222
|
+
const elements = [];
|
|
223
|
+
|
|
224
|
+
if (index === insertIndex) {
|
|
225
|
+
elements.push(
|
|
226
|
+
<div key="additional-item" style={{ marginBottom: '16px', marginTop: '16px' }}>
|
|
227
|
+
{additionalItem}
|
|
228
|
+
</div>
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
elements.push(renderField(field));
|
|
233
|
+
|
|
234
|
+
return elements;
|
|
235
|
+
}).flat().concat(
|
|
236
|
+
insertIndex >= fieldsWithAdditionalItem.length ? (
|
|
237
|
+
<div key="additional-item" style={{ marginBottom: '16px', marginTop: '16px' }}>
|
|
238
|
+
{additionalItem}
|
|
239
|
+
</div>
|
|
240
|
+
) : []
|
|
241
|
+
);
|
|
242
|
+
})()}
|
|
210
243
|
|
|
211
244
|
|
|
212
245
|
{formErrors ? (
|
|
@@ -51,7 +51,7 @@ function GenderDistribution({
|
|
|
51
51
|
items: [
|
|
52
52
|
{
|
|
53
53
|
label:
|
|
54
|
-
options?.optionPositionSupplyChain?.find((o) => {
|
|
54
|
+
(options?.optionPositionSupplyChain || options?.positionSupplyChainOptions || [])?.find((o) => {
|
|
55
55
|
return o.value === item.key;
|
|
56
56
|
}).label || item.key,
|
|
57
57
|
value: data[item.key] || 0,
|
|
@@ -9,7 +9,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
9
9
|
t={t}
|
|
10
10
|
getRedirectLink={getRedirectLink}
|
|
11
11
|
theme={theme}
|
|
12
|
-
label="Identified Mine Sites"
|
|
12
|
+
label={t("Identified Mine Sites")}
|
|
13
13
|
link={APP === 'nashiriki' ? '/app/scl' : '/app/production-sites'}
|
|
14
14
|
/>
|
|
15
15
|
),
|
|
@@ -23,7 +23,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
23
23
|
t={t}
|
|
24
24
|
getRedirectLink={getRedirectLink}
|
|
25
25
|
theme={theme}
|
|
26
|
-
label="Identified Operators"
|
|
26
|
+
label={t("Identified Operators")}
|
|
27
27
|
link="/app/operators"
|
|
28
28
|
/>
|
|
29
29
|
),
|
|
@@ -43,7 +43,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
43
43
|
t={t}
|
|
44
44
|
getRedirectLink={getRedirectLink}
|
|
45
45
|
theme={theme}
|
|
46
|
-
label="Associated Documents"
|
|
46
|
+
label={t("Associated Documents")}
|
|
47
47
|
link="/app/documents"
|
|
48
48
|
/>
|
|
49
49
|
),
|
|
@@ -55,7 +55,7 @@ export const getRowConfig = ({ t, data = {}, goTo, getRedirectLink, theme = {},
|
|
|
55
55
|
t={t}
|
|
56
56
|
getRedirectLink={getRedirectLink}
|
|
57
57
|
theme={theme}
|
|
58
|
-
label="Information Sources"
|
|
58
|
+
label={t("Information Sources")}
|
|
59
59
|
link="/app/partners"
|
|
60
60
|
/>
|
|
61
61
|
),
|
|
@@ -52,7 +52,7 @@ const getLinkValue = (value, linkingObject) => {
|
|
|
52
52
|
return <div className="daf-default-cell" />
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const category = findOptions(v,
|
|
55
|
+
const category = findOptions(v, options?.locationCategories);
|
|
56
56
|
|
|
57
57
|
return category ? <Tooltip title={category}>{category}</Tooltip> : '-';
|
|
58
58
|
},
|
|
@@ -64,7 +64,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
64
64
|
return <div className="daf-default-cell" />
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
68
67
|
const mineSite = all?.location?.name
|
|
69
68
|
|
|
70
69
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -113,7 +112,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
113
112
|
"corrective-actions": "correctiveActions",
|
|
114
113
|
"activities": "activity",
|
|
115
114
|
}
|
|
116
|
-
const eventCategory = findOptions(v,
|
|
115
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
117
116
|
const categoryValue = getEventCategoryBySubject(eventCategory, subjectMap[subject], true);
|
|
118
117
|
|
|
119
118
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -64,7 +64,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
64
64
|
return <div className="daf-default-cell" />
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
68
67
|
const mineSite = all?.location?.name
|
|
69
68
|
|
|
70
69
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -110,7 +109,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
110
109
|
return <div className="daf-default-cell" />
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
const eventCategory = findOptions(v,
|
|
112
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
114
113
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
115
114
|
|
|
116
115
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -81,7 +81,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
81
81
|
return <div className="daf-default-cell" />
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
85
84
|
const mineSite = all?.location?.name
|
|
86
85
|
|
|
87
86
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -97,7 +96,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
97
96
|
return <div className="daf-default-cell" />
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
const eventCategory = findOptions(v,
|
|
99
|
+
const eventCategory = findOptions(v, options?.eventCategoryOptions || options?.categoryOptions);
|
|
101
100
|
const categoryValue = getEventCategoryBySubject(eventCategory, subject);
|
|
102
101
|
|
|
103
102
|
return categoryValue ? <Tooltip title={categoryValue}>{categoryValue}</Tooltip> : '-';
|
|
@@ -116,7 +116,7 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
116
116
|
return "-";
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
const categoryOptions = (
|
|
119
|
+
const categoryOptions = (options?.categoryOptions || []).map((c) => {
|
|
120
120
|
const searchTerm = `typeOfEvent is ${all.navigationEventType}`;
|
|
121
121
|
|
|
122
122
|
return {
|
|
@@ -127,8 +127,8 @@ export const getColumns = ({ t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
127
127
|
|
|
128
128
|
const relaxantOptions = [
|
|
129
129
|
...categoryOptions,
|
|
130
|
-
...(
|
|
131
|
-
...(
|
|
130
|
+
...(options?.eventsType || []),
|
|
131
|
+
...(options?.testimonialsType || []),
|
|
132
132
|
];
|
|
133
133
|
|
|
134
134
|
const title = relaxantOptions.find((v) => v.value === value)?.label || "-";
|
|
@@ -52,7 +52,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const locationCategories = [
|
|
55
|
-
...(
|
|
55
|
+
...(options?.locationCategories || []),
|
|
56
56
|
...(options?.productionSiteCategories || []),
|
|
57
57
|
...(options?.locationCategories || [])
|
|
58
58
|
]
|
|
@@ -50,7 +50,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const positionSupplyChainOptions = [
|
|
53
|
-
...(data?.options?.positionSupplyChainOptions || []),
|
|
54
53
|
...(options?.positionSupplyChainOptions || []),
|
|
55
54
|
...(options?.optionPositionSupplyChain || [])
|
|
56
55
|
]
|
|
@@ -73,7 +72,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
const subCategoriesOptions = [
|
|
76
|
-
...(data?.options?.subCategoriesOptions || []),
|
|
77
75
|
...(options?.subCategoriesOptions || []),
|
|
78
76
|
...(options?.subCategory || [])
|
|
79
77
|
]
|
|
@@ -50,7 +50,6 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
50
50
|
return <div className="daf-default-cell" />
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// const country = findOptions(v, data?.options?.positionSupplyChainOptions);
|
|
54
53
|
const mineSite = all?.location?.name
|
|
55
54
|
|
|
56
55
|
return mineSite ? <Tooltip title={mineSite}>{mineSite}</Tooltip> : '-';
|
|
@@ -67,8 +66,7 @@ export const getColumns = ({t, goTo, user, options, activeTab, getRedirectLink,
|
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
const activityAtSiteOptions = [
|
|
70
|
-
...(
|
|
71
|
-
...(options?.activityAtSiteOptions || []),
|
|
69
|
+
...(options?.activityAtSiteOptions || []),
|
|
72
70
|
...(options?.activityAtSite || [])
|
|
73
71
|
]
|
|
74
72
|
|
|
@@ -43,6 +43,7 @@ export const getKeyIndicatorConfig = ({ t, data = {}, options = {} }) => [
|
|
|
43
43
|
label: t("Legal Form"),
|
|
44
44
|
render: () => {
|
|
45
45
|
const subCategory = findOptions(data?.subCategory, options?.subCategoriesOptions || options?.subCategory);
|
|
46
|
+
console.log({subCategory, initialSub: data?.subCategory, options: options?.subCategoriesOptions || options?.subCategory})
|
|
46
47
|
if(subCategory?.length > 22) {
|
|
47
48
|
const _subCategory = truncateString(subCategory, 22);
|
|
48
49
|
return <Tooltip title={subCategory}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect} from 'react'
|
|
1
|
+
import React, { useEffect, useMemo} from 'react'
|
|
2
2
|
import { message } from 'antd';
|
|
3
3
|
import { MessageTypes } from '../../../helpers/messages.js';
|
|
4
4
|
import DynamicForm from '../../core/components/DynamicForm/index.jsx';
|
|
@@ -38,16 +38,16 @@ const Create = ({
|
|
|
38
38
|
data: formValue
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
const language = useMemo(() => user?.language, [user?.language]);
|
|
42
|
+
|
|
41
43
|
useEffect(() => {
|
|
42
|
-
if (
|
|
43
|
-
if (!edit) {
|
|
44
|
+
if (!edit) {
|
|
44
45
|
getData({ namespace, module: APP, view, scope });
|
|
45
|
-
|
|
46
|
+
} else {
|
|
46
47
|
form = formConfig;
|
|
47
48
|
data = formValue;
|
|
48
|
-
}
|
|
49
49
|
}
|
|
50
|
-
}, [edit,
|
|
50
|
+
}, [edit, language, scope, namespace, APP, view]);
|
|
51
51
|
|
|
52
52
|
return (
|
|
53
53
|
<div className="daf-create-form">
|
|
@@ -41,12 +41,6 @@ const TablePage = ({
|
|
|
41
41
|
breadcrumbs = [],
|
|
42
42
|
onDownload,
|
|
43
43
|
}) => {
|
|
44
|
-
const _options = useMemo(() => {
|
|
45
|
-
return {
|
|
46
|
-
...options,
|
|
47
|
-
...data?.options,
|
|
48
|
-
}
|
|
49
|
-
},[options, data?.options])
|
|
50
44
|
|
|
51
45
|
const {
|
|
52
46
|
activeTab,
|
|
@@ -63,7 +57,7 @@ const TablePage = ({
|
|
|
63
57
|
location,
|
|
64
58
|
getData,
|
|
65
59
|
extendingFilters,
|
|
66
|
-
options
|
|
60
|
+
options,
|
|
67
61
|
t,
|
|
68
62
|
goTo,
|
|
69
63
|
user,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const en = {
|
|
2
|
+
"Identified Mine Sites": "Identified Mine Sites",
|
|
3
|
+
"Associated Documents": "Associated Documents",
|
|
4
|
+
"Male": "Male",
|
|
5
|
+
"Female": "Female",
|
|
6
|
+
"Invalid input": "Invalid input",
|
|
2
7
|
"conflict-management": "Conflict Management",
|
|
3
8
|
"review-requests": "Review Requests",
|
|
4
9
|
"create-account": "Create Account",
|
|
@@ -1430,6 +1435,7 @@ const en = {
|
|
|
1430
1435
|
"max-char": "Maximum {{filled}}/{{chars}} characters.",
|
|
1431
1436
|
"max-items": "Maximum {{chars}} items.",
|
|
1432
1437
|
"max-item": "Maximum {{chars}} item.",
|
|
1438
|
+
"organisation-already-exist": "If your organisation is already active on {{appName}}, your application will not be reviewed. Instead, please contact the account's main user and request an invitation.",
|
|
1433
1439
|
projectInviteBackDesc:
|
|
1434
1440
|
"Are you sure you want to invite this source again?This user will receive a new notification",
|
|
1435
1441
|
DataStore: {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const fr = {
|
|
2
|
+
"Identified Mine Sites": "Sites miniers identifiés",
|
|
3
|
+
"Associated Documents": "Documents associés",
|
|
4
|
+
"Male": "Masculin",
|
|
5
|
+
"Female": "Féminin",
|
|
6
|
+
"Invalid input": "Entrée invalide",
|
|
2
7
|
"review-requests": "Examiner les demandes",
|
|
3
8
|
"create-account": "Créer un compte",
|
|
4
9
|
"manage-users": "Gérer les utilisateurs",
|
|
@@ -1444,6 +1449,7 @@ const fr = {
|
|
|
1444
1449
|
"Almost There": "On y est presque",
|
|
1445
1450
|
"Help us guide you to the right application":
|
|
1446
1451
|
"Aidez-nous à vous guider vers la bonne application",
|
|
1452
|
+
"organisation-already-exist": "Si votre organisation est déjà active dans {{appName}}, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation.",
|
|
1447
1453
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation":
|
|
1448
1454
|
"Si votre organisation est déjà active dans Datastake, votre requête ne sera pas revue. Prière de contacter l’utilisateur principal et solliciter une invitation",
|
|
1449
1455
|
"Yes, I understand": "Oui, je comprends",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const sp = {
|
|
2
|
+
"Identified Mine Sites": "Sitios mineros identificados",
|
|
3
|
+
"Associated Documents": "Documentos asociados",
|
|
4
|
+
"Male": "Masculino",
|
|
5
|
+
"Female": "Femenino",
|
|
6
|
+
"Invalid input": "Entrada inválida",
|
|
2
7
|
"review-requests": "Revisar solicitudes",
|
|
3
8
|
"create-account": "Crear cuenta",
|
|
4
9
|
"manage-users": "Gestionar usuarios",
|
|
@@ -1005,6 +1010,7 @@ const sp = {
|
|
|
1005
1010
|
"Please introduce yourself": "Preséntese",
|
|
1006
1011
|
"Almost There": "Ya casi está",
|
|
1007
1012
|
"Help us guide you to the right application": "Ayúdenos a guiarle hacia la solicitud correcta",
|
|
1013
|
+
"organisation-already-exist": "Si su organización ya está activa en {{appName}}, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
1008
1014
|
"If your organisation is already active on Datastake, your application will not be reviewed. Instead, please contact the account's main user and request an invitation": "Si su organización ya está activa en Datastake, su solicitud no será revisada. En su lugar, póngase en contacto con el usuario principal de la cuenta y solicite una invitación.",
|
|
1009
1015
|
"Yes, I understand": "Sí, entiendo",
|
|
1010
1016
|
"Protect your data assets": "Proteja sus activos de datos",
|