File tree 1 file changed +28
-29
lines changed
frontend/src/pages/destructionlist/detail
1 file changed +28
-29
lines changed Original file line number Diff line number Diff line change 4
4
Button ,
5
5
CardBaseTemplate ,
6
6
Column ,
7
+ ErrorMessage ,
7
8
Form ,
8
9
FormField ,
9
10
Grid ,
@@ -172,35 +173,33 @@ export function DestructionListDetailPage() {
172
173
/>
173
174
) ,
174
175
"spacer" ,
175
- < >
176
- { [ "new" , "failed" ] . includes ( destructionList . processingStatus ) ? (
177
- < Grid gutter = { false } >
178
- < Column containerType = "normal" span = { 12 } >
179
- < Button
180
- variant = "danger"
181
- onClick = { ( ) => setDestroyModalOpenState ( true ) }
182
- disabled = { hasDestructionListItemsDateInFuture ( ) }
183
- pad = "h"
184
- bold = { true }
185
- >
186
- < Solid . TrashIcon />
187
- { destructionList . processingStatus === "new"
188
- ? "Vernietigen starten"
189
- : "Vernietigen herstarten" }
190
- </ Button >
191
- </ Column >
192
- < Column containerType = "normal" span = { 12 } >
193
- { hasDestructionListItemsDateInFuture ( ) && (
194
- < P bold >
195
- Er zijn zaken met een archiefactiedatum in de toekomst
196
- </ P >
197
- ) }
198
- </ Column >
199
- </ Grid >
200
- ) : (
201
- < > </ >
202
- ) }
203
- </ > ,
176
+
177
+ hasDestructionListItemsDateInFuture ( ) ? (
178
+ < ErrorMessage >
179
+ Eén of meer zaken hebben een toekomstige archiefdatum.
180
+ </ ErrorMessage >
181
+ ) : (
182
+ < > </ >
183
+ ) ,
184
+ [ "new" , "failed" ] . includes ( destructionList . processingStatus ) ? (
185
+ {
186
+ bold : true ,
187
+ children : (
188
+ < >
189
+ < Solid . TrashIcon />
190
+ { destructionList . processingStatus === "new"
191
+ ? "Vernietigen starten"
192
+ : "Vernietigen herstarten" }
193
+ </ >
194
+ ) ,
195
+ disabled : hasDestructionListItemsDateInFuture ( ) ,
196
+ pad : "h" ,
197
+ variant : "danger" ,
198
+ onClick : ( ) => setDestroyModalOpenState ( true ) ,
199
+ }
200
+ ) : (
201
+ < > </ >
202
+ ) ,
204
203
] ;
205
204
}
206
205
} ;
You can’t perform that action at this time.
0 commit comments