@kaspernj/api-maker 1.0.307 → 1.0.308

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  ]
17
17
  },
18
18
  "name": "@kaspernj/api-maker",
19
- "version": "1.0.307",
19
+ "version": "1.0.308",
20
20
  "type": "module",
21
21
  "description": "",
22
22
  "main": "index.js",
@@ -4,9 +4,11 @@ import {memo} from "react"
4
4
 
5
5
  const ApiMakerSuperAdminIndexPage = ({modelClass}) => {
6
6
  return (
7
- <ModelClassTable
8
- modelClass={modelClass}
9
- />
7
+ <div className="super-admin--index-page">
8
+ <ModelClassTable
9
+ modelClass={modelClass}
10
+ />
11
+ </div>
10
12
  )
11
13
  }
12
14
 
@@ -43,6 +43,8 @@ const ApiMakerSuperAdmin = () => {
43
43
  const model = await modelClass.find(modelId)
44
44
 
45
45
  await model.destroy()
46
+
47
+ Params.changeParams({mode: undefined, model_id: undefined})
46
48
  } catch (error) {
47
49
  FlashMessage.errorResponse(error)
48
50
  }
@@ -57,10 +59,10 @@ const ApiMakerSuperAdmin = () => {
57
59
  }
58
60
  {modelClass && pageToShow == "show" &&
59
61
  <>
60
- <Link to={Params.withParams({model: modelName, model_id: modelId, mode: "edit"})}>
62
+ <Link className="edit-model-link" to={Params.withParams({model: modelName, model_id: modelId, mode: "edit"})}>
61
63
  Edit
62
64
  </Link>
63
- <a href="#" onClick={onDestroyClicked}>
65
+ <a className="destroy-model-link" href="#" onClick={onDestroyClicked}>
64
66
  Delete
65
67
  </a>
66
68
  </>