@@ -98,7 +98,6 @@ import type { OptionListReferences } from 'app-shared/types/OptionListReferences
98
98
import type { LayoutSetsModel } from '../types/api/dto/LayoutSetsModel' ;
99
99
import type { AccessPackageResource , PolicyAccessPackageAreaGroup } from 'app-shared/types/PolicyAccessPackages' ;
100
100
import type { DataType } from '../types/DataType' ;
101
- import type { CodeList } from '@studio/components' ;
102
101
103
102
export const getIsLoggedInWithAnsattporten = ( ) => get < { isLoggedIn : boolean } > ( authStatusAnsattporten ( ) ) ;
104
103
export const getMaskinportenScopes = ( org : string , app : string ) => get < MaskinportenScopes > ( availableMaskinportenScopesPath ( org , app ) ) ;
@@ -177,37 +176,34 @@ export const getProcessTaskType = (org: string, app: string, taskId: string) =>
177
176
export const fetchBelongsToGiteaOrg = ( ) => get ( belongsToOrg ( ) ) ;
178
177
179
178
// Org level code lists
180
-
181
- const orgLevelCodeListsMock : CodeList [ ] = [
179
+ const orgLevelCodeListsMock : OptionListsResponse [ ] = [
182
180
[
183
181
{
184
- description : 'description1' ,
185
- helpText : 'helpText1' ,
186
- label : 'label1' ,
187
- value : 'value1' ,
182
+ title : 'title1' ,
183
+ data : [
184
+ { label : 'label1' , value : 'value1' } ,
185
+ { label : 'label2' , value : 'value2' } ,
186
+ ] ,
187
+ hasError : false ,
188
188
} ,
189
189
{
190
- description : 'description2' ,
191
- helpText : 'helpText2' ,
192
- label : 'label2' ,
193
- value : true ,
190
+ title : 'title2' ,
191
+ data : [ ] ,
192
+ hasError : false ,
194
193
} ,
195
194
] ,
196
195
[
197
196
{
198
- description : 'description3' ,
199
- helpText : 'helpText3' ,
200
- label : 'label3' ,
201
- value : 3 ,
197
+ title : 'title3' ,
198
+ data : [ ] ,
199
+ hasError : false ,
202
200
} ,
203
201
] ,
204
202
] ;
205
- export const getOrgLevelCodeLists = async ( ) : Promise < CodeList [ ] > =>
206
- // TODO: Replace with endpoint when it is ready in backend.
203
+ export const getOrgLevelCodeLists = async ( org : string ) : Promise < OptionListsResponse [ ] > =>
204
+ // TODO: Replace with endpoint when it is ready in backend. https://github.com/Altinn/altinn-studio/issues/14482
207
205
new Promise ( ( resolve ) => {
208
206
setTimeout ( ( ) => {
209
- // Replace the two resolves to test with empty list
210
- // resolve([]);
211
207
resolve ( orgLevelCodeListsMock ) ;
212
- } , 1000 ) ;
208
+ } , 200 ) ;
213
209
} ) ;
0 commit comments