File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import type {
14
14
ScheduleSpecParameters ,
15
15
} from '$lib/types/schedule' ;
16
16
import { encodePayloads } from '$lib/utilities/encode-payload' ;
17
+ import { stringifyWithBigInt } from '$lib/utilities/parse-with-big-int' ;
17
18
import { routeForSchedule , routeForSchedules } from '$lib/utilities/route-for' ;
18
19
import {
19
20
convertDaysAndMonths ,
@@ -204,6 +205,23 @@ export const submitEditSchedule = async (
204
205
} ,
205
206
} ;
206
207
208
+ const fields = body . schedule . action . startWorkflow ?. header ?. fields ;
209
+ if ( fields && Object . keys ( fields ) . length > 0 ) {
210
+ try {
211
+ const entries = Object . entries ( fields ) ;
212
+ for ( const [ key , value ] of entries ) {
213
+ const encodedValue = await encodePayloads (
214
+ stringifyWithBigInt ( value ) ,
215
+ 'json/plain' ,
216
+ ) ;
217
+ fields [ key ] = encodedValue [ 0 ] ;
218
+ }
219
+ } catch ( e ) {
220
+ error . set ( `${ translate ( 'data-encoder.encode-error' ) } : ${ e ?. message } ` ) ;
221
+ return ;
222
+ }
223
+ }
224
+
207
225
if ( preset === 'existing' ) {
208
226
body . schedule . spec = schedule . spec ;
209
227
} else {
You can’t perform that action at this time.
0 commit comments