@topconsultnpm/sdkui-react 6.21.0-dev2.21 → 6.21.0-dev2.23
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.
|
@@ -10,18 +10,18 @@ const StyledBackButton = styled.button `
|
|
|
10
10
|
justify-content: center;
|
|
11
11
|
gap: 4px;
|
|
12
12
|
padding: 4px 10px;
|
|
13
|
-
border: 1px solid ${({ $isActive }) => $isActive ? 'rgba(
|
|
13
|
+
border: 1px solid ${({ $isActive }) => $isActive ? 'rgba(37, 89, 165, 0.3)' : 'rgba(255, 255, 255, 0.4)'};
|
|
14
14
|
border-radius: 6px;
|
|
15
15
|
cursor: pointer;
|
|
16
16
|
font-weight: 500;
|
|
17
17
|
font-size: 0.85rem;
|
|
18
18
|
flex-shrink: 0;
|
|
19
19
|
transition: all 0.15s ease;
|
|
20
|
-
background-color: #2559A5;
|
|
20
|
+
background-color: ${({ $isActive }) => $isActive ? '#FFFFFF' : '#2559A5'};
|
|
21
21
|
box-shadow: none;
|
|
22
22
|
|
|
23
23
|
&&, && * {
|
|
24
|
-
color: #FFFFFF !important;
|
|
24
|
+
color: ${({ $isActive }) => $isActive ? '#2559A5' : '#FFFFFF'} !important;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
svg {
|
|
@@ -135,7 +135,30 @@ const TMDcmtForm = ({ TID, DID, groupId, layoutMode = LayoutModes.Update, formMo
|
|
|
135
135
|
if (!did)
|
|
136
136
|
return;
|
|
137
137
|
TMSpinner.show({ description: 'Loading Metadata...' });
|
|
138
|
-
let res = getMetadataResult
|
|
138
|
+
let res = getMetadataResult;
|
|
139
|
+
if (!res) {
|
|
140
|
+
try {
|
|
141
|
+
res = await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, did, true);
|
|
142
|
+
}
|
|
143
|
+
catch (metadataError) {
|
|
144
|
+
// Estrai ErrorCode dal campo detail se disponibile
|
|
145
|
+
let errorCode = undefined;
|
|
146
|
+
if (metadataError?.isApiException && metadataError?.response?.detail) {
|
|
147
|
+
try {
|
|
148
|
+
const detailObj = JSON.parse(metadataError.response.detail);
|
|
149
|
+
errorCode = detailObj?.ErrorCode;
|
|
150
|
+
}
|
|
151
|
+
catch (parseError) {
|
|
152
|
+
console.log("Impossibile parsare il detail dell'eccezione:", parseError);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// Se ErrorCode è -5, ignora silenziosamente, altrimenti mostra l'eccezione originale
|
|
156
|
+
if (errorCode !== -5) {
|
|
157
|
+
TMExceptionBoxManager.show({ exception: metadataError });
|
|
158
|
+
}
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
139
162
|
const origin = { fromName: res?.fromName, fromTID: res?.fromTID };
|
|
140
163
|
let dtd = res?.dtdResult;
|
|
141
164
|
let rows = dtd.rows ? dtd.rows[0] : [];
|