waibu-db 2.33.0 → 2.33.1
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.
|
@@ -101,7 +101,7 @@ async function btnExport () {
|
|
|
101
101
|
if (_.isEmpty(selector)) {
|
|
102
102
|
await wbs.notify('Cant get data selector', { type: 'danger' })
|
|
103
103
|
} else {
|
|
104
|
-
const item =
|
|
104
|
+
const item = ['list', ''].includes(handler) ? this.extractTable(selector) : this.extractForm(selector)
|
|
105
105
|
await wbs.copyToClipboard(item)
|
|
106
106
|
}
|
|
107
107
|
instance.hide()
|
|
@@ -36,7 +36,7 @@ async function exportHandler (opts = {}) {
|
|
|
36
36
|
const mdl = this.app.dobo.getModel(model)
|
|
37
37
|
const { schema } = await getSchemaExt(model, 'add', merge({ args: [{ req, model: mdl }] }, { params }, options))
|
|
38
38
|
if (schema.disabled.includes('find')) return await reply.view(templateDisabled, { action: 'list' })
|
|
39
|
-
const crud = await prepCrud.call(this.app.getPlugin('waibuDb'), { model, req, reply, args: ['model'] })
|
|
39
|
+
const crud = await prepCrud.call(this.app.getPlugin('waibuDb'), { model, req, reply, args: ['model'], options })
|
|
40
40
|
const data = {
|
|
41
41
|
name: model,
|
|
42
42
|
filter: crud.filter,
|
package/lib/util.js
CHANGED
|
@@ -147,7 +147,7 @@ export async function processHandler (opts = {}) {
|
|
|
147
147
|
if (!(req.method === 'POST' && req.body._action === 'export' && options.allowExport)) return
|
|
148
148
|
const { importModule } = this.app.bajo
|
|
149
149
|
const exportHandler = await importModule('waibuDb:/lib/crud/export-handler.js')
|
|
150
|
-
await exportHandler.call(this, { model: model.name, req, reply })
|
|
150
|
+
await exportHandler.call(this, { model: model.name, req, reply, options })
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function suppressedReturn (err) {
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED