This repository was archived by the owner on May 4, 2019. It is now read-only.
Commit 8cea5bc 1 parent 1b4a7c6 commit 8cea5bc Copy full SHA for 8cea5bc
File tree 3 files changed +13
-3
lines changed
3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ export const mockBankItemExistsClient = (items: ItemExistsRequestModel[]) => {
18
18
const result : ItemExistsResponseModel [ ] = [ ] ;
19
19
items . forEach ( ( item , index ) => {
20
20
if ( index % 2 === 0 ) {
21
- result . push ( { ...item , exists : false } ) ;
21
+ result . push ( {
22
+ ...item ,
23
+ exists : false ,
24
+ error : "Its Raining cats and Dogs"
25
+ } ) ;
26
+ } else {
27
+ result . push ( { ...item , exists : true } ) ;
22
28
}
23
29
} ) ;
24
30
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface ItemRevisionModel {
13
13
revision ?: string ;
14
14
isaap ?: string ;
15
15
valid ?: boolean ;
16
+ error ?: string ;
16
17
}
17
18
18
19
export interface ItemExistsRequestModel {
@@ -23,6 +24,7 @@ export interface ItemExistsRequestModel {
23
24
24
25
export interface ItemExistsResponseModel extends ItemExistsRequestModel {
25
26
exists : boolean ;
27
+ error ?: string ;
26
28
}
27
29
28
30
export function itemsAreEqual (
@@ -79,6 +81,7 @@ export function existenceResponseModelToRevisionModel(
79
81
) ;
80
82
if ( match ) {
81
83
item . valid = match . exists ;
84
+ item . error = match . error ;
82
85
}
83
86
84
87
return item ;
Original file line number Diff line number Diff line change @@ -188,7 +188,8 @@ export class ItemEntryRow extends React.Component<
188
188
const hidden =
189
189
this . props . row . valid !== undefined &&
190
190
! this . props . row . valid &&
191
- this . props . row . itemKey
191
+ this . props . row . itemKey &&
192
+ this . props . row . error
192
193
? ""
193
194
: "hidden" ;
194
195
@@ -206,7 +207,7 @@ export class ItemEntryRow extends React.Component<
206
207
editRow . itemKey
207
208
) }
208
209
{ this . renderDeleteButton ( ) }
209
- < td className = { `error-text ${ hidden } ` } > Item Not Found </ td >
210
+ < td className = { `error-text ${ hidden } ` } > { this . props . row . error } </ td >
210
211
</ tr >
211
212
) ;
212
213
}
You can’t perform that action at this time.
0 commit comments