File tree 5 files changed +14
-9
lines changed
5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"recommendations" : [
3
3
" orta.vscode-jest" ,
4
- " eg2.vscode-npm-script" ,
5
4
" burkeholland.simple-react-snippets"
6
5
]
7
6
}
Original file line number Diff line number Diff line change @@ -51,13 +51,12 @@ function App() {
51
51
>
52
52
< Route path = '/login' element = { < Login /> } />
53
53
54
- < Route path = "/core/:model/:pk/:action "
54
+ < Route path = "/core/:model/:pk/history "
55
55
element = { < History
56
56
setContentHeading = { setContentHeading }
57
57
SetContentHeaderIcon = { SetContentHeaderIcon }
58
58
/> }
59
59
errorElement = { < ErrorPage /> }
60
- loader = { detailsLoader }
61
60
/>
62
61
63
62
< Route path = "/settings"
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ const Table = ({
261
261
< td
262
262
onClick = { ( e ) => {
263
263
let a = e
264
- document . getElementById ( 'expandable-' + e . currentTarget . parentElement . id ) . classList . toggle ( "hide-expandable-row" )
264
+ document . getElementById ( 'expandable-' + data . id ) . classList . toggle ( "hide-expandable-row" )
265
265
} }
266
266
>
267
267
< IconLoader
Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ export default function urlBuilder(
63
63
pk = params . pk
64
64
}
65
65
66
- if ( ! module && path_directories [ 0 ] == 'settings' ) {
66
+ if ( ! module ) {
67
67
68
- module = 'settings'
68
+ module = path_directories [ 0 ]
69
69
70
70
}
71
71
@@ -75,12 +75,10 @@ export default function urlBuilder(
75
75
76
76
}
77
77
78
-
79
78
const allowed_actions = [ 'add' , 'delete' , 'edit' ]
80
79
81
80
if ( ! allowed_actions . includes ( action ) ) {
82
81
83
- action = null
84
82
85
83
for ( let dir of path_directories ) {
86
84
@@ -90,6 +88,12 @@ export default function urlBuilder(
90
88
}
91
89
}
92
90
91
+ if ( ! action && path_directories [ path_directories . length - 1 ] == 'history' ) {
92
+
93
+ action = 'history'
94
+ }
95
+
96
+
93
97
const ticket_models = [
94
98
'change' ,
95
99
'incident' ,
@@ -294,6 +298,9 @@ export default function urlBuilder(
294
298
295
299
method = 'PATCH'
296
300
301
+ } else if ( action === 'history' ) {
302
+
303
+ url += '/history'
297
304
}
298
305
299
306
if (
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const History = ({
22
22
< div className = "content" >
23
23
< Table
24
24
callback = { setContentHeading }
25
- data_url_path = { 'core/' + url_builder . model + '/' + url_builder . pk + '/history' }
25
+ data_url_path = { 'core/' + url_builder . params . model + '/' + url_builder . params . pk + '/history' }
26
26
/>
27
27
</ div >
28
28
</ section >
You can’t perform that action at this time.
0 commit comments