File tree Expand file tree Collapse file tree 4 files changed +38
-10
lines changed
src/Umbraco.Cms.Integrations.PIM.Inriver
App_Plugins/UmbracoCms.Integrations/PIM/Inriver Expand file tree Collapse file tree 4 files changed +38
-10
lines changed Original file line number Diff line number Diff line change 5959 fields : obj . fieldValues . map ( fieldObj => {
6060 return {
6161 fieldType : fieldTypes . find ( fieldTypeObj => fieldTypeObj . fieldTypeId === fieldObj . fieldTypeId ) . fieldTypeDisplayName ,
62- value : fieldObj . value
62+ value : fieldObj . display
6363 }
6464 } )
6565 }
Original file line number Diff line number Diff line change 44 < uui-box headline ="{{model.title}} " class ="inriver-container ">
55 < div >
66 < uui-icon-registry-essential >
7- < uui-input id ="inSearch " class ="inriver-search " label ="search "
7+ < uui-input id ="inSearch " class ="inriver-search " label ="search "
88 ng-on-input ="vm.search() " ng-model ="vm.searchTerm "
99 placeholder ="Enter a name to search... ">
1010 < uui-icon style ="padding-left: 10px; " slot ="prepend " name ="search "> </ uui-icon >
1111 </ uui-input >
1212 </ uui-icon-registry-essential >
1313 </ div >
14- < uui-scroll-container class ="mt2 " style ="width:100% ">
14+ < uui-scroll-container class ="mt2 " style ="width:100%;height:600px; ">
1515 < uui-form ng-if ="vm.filteredEntities.length > 0 ">
1616 < uui-form-layout-item >
1717 < uui-table class ="uui-text ">
3535 </ uui-table >
3636 </ uui-form-layout-item >
3737 </ uui-form >
38- < div ng-show ="!vm.loading " class ="inriver-center ">
39- < uui-pagination > </ uui-pagination >
40- </ div >
4138 </ uui-scroll-container >
39+ < div ng-show ="!vm.loading " class ="inriver-center ">
40+ < uui-pagination > </ uui-pagination >
41+ </ div >
4242 </ uui-box >
4343 < umb-editor-footer >
4444 < umb-editor-footer-content-right >
Original file line number Diff line number Diff line change 1- using System . Text . Json . Serialization ;
1+ using System . Text . Json ;
2+ using System . Text . Json . Serialization ;
23
34namespace Umbraco . Cms . Integrations . PIM . Inriver . Models
45{
@@ -8,6 +9,33 @@ public class FieldValue
89 public string FieldTypeId { get ; set ; }
910
1011 [ JsonPropertyName ( "value" ) ]
11- public string Value { get ; set ; }
12+ public object Value { get ; set ; }
13+
14+ public Dictionary < string , string > ValueDictionary
15+ {
16+ get
17+ {
18+ try
19+ {
20+ if ( Value == null ) return null ;
21+
22+ return JsonSerializer . Deserialize < Dictionary < string , string > > ( Value . ToString ( ) ) ;
23+ }
24+ catch { return null ; }
25+ }
26+ }
27+
28+ public string Display
29+ {
30+ get
31+ {
32+ if ( ValueDictionary != null )
33+ {
34+ return string . Join ( "," , ValueDictionary ) ;
35+ }
36+
37+ return Value ? . ToString ( ) ;
38+ }
39+ }
1240 }
1341}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ public class InriverEntityViewModel
55 {
66 public InriverEntityViewModel ( )
77 {
8- Fields = new Dictionary < string , string > ( ) ;
8+ Fields = new Dictionary < string , object > ( ) ;
99 }
1010
1111 public int Id { get ; set ; }
@@ -14,6 +14,6 @@ public InriverEntityViewModel()
1414
1515 public string DisplayDescription { get ; set ; }
1616
17- public Dictionary < string , string > Fields { get ; set ; }
17+ public Dictionary < string , object > Fields { get ; set ; }
1818 }
1919}
You can’t perform that action at this time.
0 commit comments