waibu-db 2.24.0 → 2.25.0
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.
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</c:grid-col>
|
|
24
24
|
<c:grid-col col="6-lg" flex="justify-content:end-lg align-items:center">
|
|
25
25
|
<% if (!_getSetting('waibuDb:/control/wdbBtnDelete/disabled')) { %>
|
|
26
|
-
<c:wdb-btn-delete href="<%= _getSetting('waibuDb:/control/wdbBtnDelete/href', 'undefined') %>"
|
|
26
|
+
<c:wdb-btn-delete href="<%= _getSetting('waibuDb:/control/wdbBtnDelete/href', 'undefined') %>" <%= _.get(form, '_immutable.0') === '*' ? 'disabled' : '' %>/>
|
|
27
27
|
<% } %>
|
|
28
28
|
</c:grid-col>
|
|
29
29
|
</c:grid-row>
|
|
@@ -52,7 +52,7 @@ async function form () {
|
|
|
52
52
|
}
|
|
53
53
|
if (widget.componentOpts) attr['c-opts'] = base64JsonEncode(widget.componentOpts)
|
|
54
54
|
if (prop.virtual) widget.component = 'form-plaintext'
|
|
55
|
-
const immutable = get(this, 'formData._immutable'
|
|
55
|
+
const immutable = get(this, 'formData._immutable') || []
|
|
56
56
|
if ((immutable.length === 1 && immutable[0] === '*') || immutable.includes(prop.name)) widget.component = 'form-plaintext'
|
|
57
57
|
widget.addons = widget.addons ?? []
|
|
58
58
|
if (!isArray(widget.addons)) widget.addons = [widget.addons]
|
package/index.js
CHANGED
|
@@ -74,11 +74,10 @@ async function factory (pkgName) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
exportData = async (params) => {
|
|
77
|
-
const { getPlugin } = this.app.bajo
|
|
78
77
|
const { get } = this.app.lib._
|
|
79
78
|
const { fs } = this.app.lib
|
|
80
79
|
const { exportTo } = this.app.doboExtra
|
|
81
|
-
const { downloadDir } = getPlugin('sumba')
|
|
80
|
+
const { downloadDir } = this.app.getPlugin('sumba')
|
|
82
81
|
const model = get(params, 'payload.data.name')
|
|
83
82
|
const fields = get(params, 'payload.data.opts.fields')
|
|
84
83
|
const { id, file } = get(params, 'payload.data.download', {})
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { prepCrud } from '../util.js'
|
|
2
2
|
|
|
3
3
|
async function exportHandler ({ req, reply, model, params = {}, templateDisabled = 'waibuDb.template:/disabled.html', options = {} } = {}) {
|
|
4
|
-
const { getPlugin } = this.app.bajo
|
|
5
4
|
const { dayjs } = this.app.lib
|
|
6
5
|
const { omit, kebabCase, get, merge } = this.app.lib._
|
|
7
6
|
const { pascalCase } = this.app.lib.aneka
|
|
8
7
|
const { getSchemaExt } = this.app.waibuDb
|
|
9
8
|
const { buildUrl } = this.app.waibuMpa
|
|
10
|
-
const { pushDownload } = getPlugin('sumba')
|
|
9
|
+
const { pushDownload } = this.app.getPlugin('sumba')
|
|
11
10
|
model = pascalCase(model ?? req.params.model)
|
|
12
11
|
const mdl = this.app.dobo.getModel(model)
|
|
13
12
|
const { schema } = await getSchemaExt(model, 'add', merge({ args: [{ req, model: mdl }] }, { params }, options))
|
|
14
13
|
if (schema.disabled.includes('find')) return await reply.view(templateDisabled, { action: 'list' })
|
|
15
|
-
const data = await prepCrud.call(getPlugin('waibuDb'), { model, req, reply, args: ['model'] })
|
|
14
|
+
const data = await prepCrud.call(this.app.getPlugin('waibuDb'), { model, req, reply, args: ['model'] })
|
|
16
15
|
data.opts = omit(data.opts, ['req', 'reply'])
|
|
17
16
|
const source = `${this.name}:/export-handler`
|
|
18
17
|
const worker = 'waibuDb:exportData'
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-06-12
|
|
4
|
+
|
|
5
|
+
- [2.25.0] Necessary updates to ```bajo@2.18.0``` specs
|
|
6
|
+
|
|
7
|
+
## 2026-06-11
|
|
8
|
+
|
|
9
|
+
- [2.24.1] Bug fix in ```wdb-form``` widget
|
|
10
|
+
- [2.24.1] Bug fix in ```_details-btns.html``` partial
|
|
11
|
+
|
|
3
12
|
## 2026-06-10
|
|
4
13
|
|
|
5
14
|
- [2.24.0] Add secure routes declaration
|