Skip to content

Commit f313461

Browse files
committed
Merge branch 'main' of github.com:devforth/adminforth
2 parents 59a1174 + cae0122 commit f313461

File tree

9 files changed

+29
-4
lines changed

9 files changed

+29
-4
lines changed

adminforth/commands/createApp/templates/package.json.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
"@types/express": "latest",
3232
"@types/node": "latest",
3333
"@prisma/client": "latest",
34-
"prisma": "latest"
34+
"prisma": "^7.0.0"
3535
}
3636
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import 'dotenv/config'
2+
import { defineConfig, env } from 'prisma/config'
3+
4+
export default defineConfig({
5+
datasource: {
6+
url: env('PRISMA_DATABASE_URL'),
7+
},
8+
})

adminforth/commands/createApp/templates/schema.prisma.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ generator client {
44

55
datasource db {
66
provider = "{{provider}}"
7-
url = env("PRISMA_DATABASE_URL")
87
}
98

109
model adminuser {

adminforth/commands/createApp/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ async function writeTemplateFiles(dirname, cwd, options) {
222222
data: { provider },
223223
condition: Boolean(prismaDbUrl), // only create if prismaDbUrl is truthy
224224
},
225+
{
226+
src: 'prisma.config.ts.hbs',
227+
dest: 'prisma.config.ts',
228+
data: {},
229+
},
225230
{
226231
src: 'package.json.hbs',
227232
dest: 'package.json',

adminforth/spa/src/views/ShowView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<template v-for="action in coreStore.resource.options.actions.filter(a => a.showIn?.showButton)" :key="action.id">
1616
<component
17-
:is="getCustomComponent(action.customComponent) || CallActionWrapper"
17+
:is="action?.customComponent ? getCustomComponent(action.customComponent) : CallActionWrapper"
1818
:meta="action.customComponent?.meta"
1919
@callAction="(payload?) => startCustomAction(action.id, payload)"
2020
:disabled="actionLoadingStates[action.id]"

dev-demo/resources/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import AdminForth, {
44
AdminForthResourceColumn,
55
AdminForthResourceInput,
66
AdminUser,
7-
} from "../../adminforth";
7+
} from "../../adminforth";
88
import ForeignInlineListPlugin from "../../plugins/adminforth-foreign-inline-list";
99
import OpenSignupPlugin from "../../plugins/adminforth-open-signup";
1010
import TwoFactorsAuthPlugin from "../../plugins/adminforth-two-factors-auth";

live-demo/app/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

live-demo/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@adminforth/audit-log": "^1.2.3",
2020
"@adminforth/bulk-ai-flow": "^1.14.5",
2121
"@adminforth/chat-gpt": "^1.0.20",
22+
"@adminforth/clone-row": "^1.1.1",
2223
"@adminforth/completion-adapter-open-ai-chat-gpt": "^1.0.2",
2324
"@adminforth/email-password-reset": "^1.1.0",
2425
"@adminforth/foreign-inline-list": "^1.6.6",

live-demo/app/resources/apartments.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import AdminForthAdapterS3Storage from '@adminforth/storage-adapter-amazon-s3'
99
import ImageGenerationAdapterOpenAI from '@adminforth/image-generation-adapter-openai';
1010
import BulkAiFlowPlugin from '@adminforth/bulk-ai-flow';
1111
import AdminForthImageVisionAdapterOpenAi from '@adminforth/image-vision-adapter-openai';
12+
import CloneRow from "@adminforth/clone-row";
1213

1314
const blockDemoUsers = async ({ record, adminUser, resource }) => {
1415
if (adminUser.dbUser && adminUser.dbUser.role !== 'superadmin') {
@@ -284,6 +285,7 @@ export default {
284285
},
285286
isAllowedToSave: blockDemoUsers,
286287
}),
288+
new CloneRow({}),
287289
],
288290
options: {
289291
listPageSize: 8,

0 commit comments

Comments
 (0)