@fuentis/phoenix-ui 0.0.9-alpha.542 → 0.0.9-alpha.543
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.
|
@@ -8977,8 +8977,17 @@ class MetaFormFieldV2Component {
|
|
|
8977
8977
|
if (v === null || v === undefined || v === '')
|
|
8978
8978
|
return '--';
|
|
8979
8979
|
// SS_OPTION value object {label,value} ili raw
|
|
8980
|
-
if (this.type === 'SS_OPTION'
|
|
8981
|
-
|
|
8980
|
+
if (this.type === 'SS_OPTION') {
|
|
8981
|
+
const opts = this.field?.configuration?.options ?? [];
|
|
8982
|
+
if (typeof v !== 'object') {
|
|
8983
|
+
const hit = opts.find((o) => o?.value === v);
|
|
8984
|
+
const label = hit?.label ?? v;
|
|
8985
|
+
// ako je label i18n key
|
|
8986
|
+
return this.translate.instant(label);
|
|
8987
|
+
}
|
|
8988
|
+
// ako je objekat
|
|
8989
|
+
const label = v.label ?? v.value;
|
|
8990
|
+
return this.translate.instant(label);
|
|
8982
8991
|
}
|
|
8983
8992
|
// DATE
|
|
8984
8993
|
if (this.type === 'DATE' && v instanceof Date) {
|