File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection] Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 32
32
payload : Payload
33
33
) {
34
34
const isSuccess = payload .status === ' completed' ;
35
-
36
- // TODO: the migrations worker sends 2 events!
37
- const isError = ! isSuccess && !! payload .error ;
35
+ const isError = ! isSuccess && !! payload .errors ;
38
36
39
37
if (! isSuccess && ! isError ) return ;
40
38
41
39
const type = isSuccess ? ' success' : ' error' ;
42
- const message = isError ? payload .error : ' CSV import finished successfully.' ;
40
+ const message = isSuccess
41
+ ? ' CSV import finished successfully.'
42
+ : (payload .errors [0 ]?.message ??
43
+ ' Import failed. Check your CSV for correct fields and required values.' );
43
44
44
45
const url = ` ${base }/project-${page .params .region }-${page .params .project }/databases/database-${database }/collection-${collection } ` ;
45
46
Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ function createPreferences() {
107
107
}
108
108
) ;
109
109
} ,
110
-
111
110
getCustomCollectionColumns : ( collectionId : string ) : Preferences [ 'columns' ] => {
112
111
return preferences ?. collections ?. [ collectionId ] ?? [ ] ;
113
112
} ,
Original file line number Diff line number Diff line change 251
251
{:else }
252
252
{@const formatted = formatColumn (document [id ])}
253
253
{@const isDatetimeAttribute = attr .type === ' datetime' }
254
- {@const isEncryptedAttribute = isString (attr ) && ! attr .encrypt }
254
+ {@const isEncryptedAttribute = isString (attr ) && attr .encrypt }
255
255
{#if isDatetimeAttribute }
256
256
<DualTimeView time ={formatted .whole }>
257
257
<span slot =" title" >Timestamp</span >
You can’t perform that action at this time.
0 commit comments