Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelblum committed Dec 28, 2023
1 parent b658e5b commit dcce040
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
1 change: 1 addition & 0 deletions packages/admin/cms-admin/bin/comet-admin-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ require("ts-node").register({
require: ["tsconfig-paths/register"],
});
require(`${__dirname}/../lib/generator/generate`);
require(`${__dirname}/../node_modules/change-case/dist`);
5 changes: 3 additions & 2 deletions packages/admin/cms-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"slugify": "^1.0.0",
"split.js": "^1.6.4",
"use-debounce": "^6.0.0",
"uuid": "^9.0.0"
"uuid": "^9.0.0",
"change-case": "^5.2.0"
},
"devDependencies": {
"@apollo/client": "^3.7.0",
Expand Down Expand Up @@ -165,4 +166,4 @@
"access": "public",
"registry": "https://registry.npmjs.org"
}
}
}
3 changes: 2 additions & 1 deletion packages/admin/cms-admin/src/generator/generateForm.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { sentenceCase } from "change-case";
import {
IntrospectionEnumType,
IntrospectionField,
Expand Down Expand Up @@ -287,7 +288,7 @@ export async function writeCrudForm(generatorConfig: CrudGeneratorConfig, schema
</IconButton>
</ToolbarItem>
<ToolbarTitleItem>
<FormattedMessage id="${instanceNamePlural}.${classNameSingular}" defaultMessage="${camelCaseToHumanReadable(
<FormattedMessage id="${instanceNamePlural}.${classNameSingular}" defaultMessage="${sentenceCase(
classNameSingular,
)}" />
</ToolbarTitleItem>
Expand Down
39 changes: 21 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dcce040

Please sign in to comment.