alchemy-chimera 1.2.1 → 1.2.2
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/CHANGELOG.md
CHANGED
|
@@ -125,7 +125,7 @@ Editor.setAction(async function add(conduit, model_name) {
|
|
|
125
125
|
*
|
|
126
126
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
127
127
|
* @since 0.1.0
|
|
128
|
-
* @version 1.
|
|
128
|
+
* @version 1.2.2
|
|
129
129
|
*
|
|
130
130
|
* @param {Conduit} conduit
|
|
131
131
|
* @param {String} model_name
|
|
@@ -138,6 +138,11 @@ Editor.setAction(async function edit(conduit, model_name, pk_val) {
|
|
|
138
138
|
model.translateItems = false;
|
|
139
139
|
|
|
140
140
|
let record = await model.findByPk(pk_val);
|
|
141
|
+
|
|
142
|
+
if (!record) {
|
|
143
|
+
return conduit.notFound('Unable to find record with primary key "' + pk_val + '"');
|
|
144
|
+
}
|
|
145
|
+
|
|
141
146
|
let message_type = conduit.param('message');
|
|
142
147
|
|
|
143
148
|
record.keepPrivateFields();
|
|
@@ -26,7 +26,7 @@ ChimeraStatic.setAction(function dashboard(conduit) {
|
|
|
26
26
|
*
|
|
27
27
|
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
28
28
|
* @since 1.0.0
|
|
29
|
-
* @version 1.2.
|
|
29
|
+
* @version 1.2.2
|
|
30
30
|
*
|
|
31
31
|
* @param {Conduit} conduit
|
|
32
32
|
*/
|
|
@@ -95,16 +95,23 @@ ChimeraStatic.setAction(function sidebar(conduit) {
|
|
|
95
95
|
models.sortByPath(1, 'model_name');
|
|
96
96
|
|
|
97
97
|
for (let model of models) {
|
|
98
|
-
|
|
98
|
+
let entry = {
|
|
99
99
|
type : 'link',
|
|
100
100
|
config : {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
link_type: 'route',
|
|
102
|
+
link_settings: {
|
|
103
|
+
route : 'Chimera.Editor#index',
|
|
104
|
+
parameters: [
|
|
105
|
+
{name: 'model', value: model.type_name},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
text: model.title
|
|
106
109
|
}
|
|
107
|
-
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
console.log(entry)
|
|
113
|
+
|
|
114
|
+
widgets.push(entry);
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
|