Git Product home page Git Product logo

adminjs-adonis's People

Contributors

carassale avatar chirgjin avatar iamsukhe avatar watzon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

adminjs-adonis's Issues

Fresh Adonis app error and admin route not found

I just installed a fresh adonis js app and added adminjs as per the limited documentation. And i get this error when i run yarn dev.
I tried settings tsconfig to different settings like admin js suggests

{
  "compilerOptions": {
    "moduleResolution": "node16",
    "module": "commonjs",
    "target": "esnext",
    // ...
  }
}

However that combination is not allowed, so I tried different other options with no luck.

 Error: require() of ES Module /node_modules/adminjs/index.js from
   //adminjs-app/node_modules/adminjs-adonis/build/providers/AdminProvider.js not supported.
   Instead change the require of index.js in /adminjs-app/node_modules/adminjs-adonis/build/providers/AdminProvider.js to a dynamic import() which is
   available in all CommonJS modules.

Feature request: support for Array fields

It would be really nice to have support for Arrays (if there already is, some documentation on how to use them would be nice). I have a couple of array fields in my objects which contain different things. It would be cool to have some kind of "New" button which adds a field (or fields in the case of a key/value type thing) and allows you to save/delete items.

Error with ES Module import when using AdonisJS with AdminJS

Description:

I'm currently using AdonisJS alongside AdminJS. When I try to run the server, I'm faced with the following error:

Error: require() of ES Module /my-project-folder/node_modules/adminjs/index.js from my-project-folder/node_modules/adminjs-adonis/build/providers/AdminProvider.js not supported.
Instead change the require of index.js in my-project-folder/node_modules/adminjs-adonis/build/providers/AdminProvider.js to a dynamic import() which is available in all CommonJS modules.

I'm still getting familiar with the intricacies of CommonJS and ES modules, so I apologize if this issue is not directly related to the package itself. However, any guidance or clarification on this matter would be highly appreciated.

Feature request: Support for computed columns

I noticed that computed columns are not registered on the models.

I see the regular properties are listed here:

public properties() {
const properties: Property[] = []
for (const column of this.model.$columnsDefinitions.keys()) {
properties.push(this.property(column)!)
}
return properties
}

The computed definitions should be available as this.model.$computedDefinitions.keys()

Unclear how to handle attachments in adminjs

Dear adminjs-adonis Maintainers,

I'm reaching out to address an issue encountered when attempting to integrate the attachment-lite package with adminjs-adonis, as per the model customization options outlined in the readme.

The attachment-lite package is my chosen library for handling attachments. Successfully integrating it within my controllers, I specified the type: "file" within the @adminColumn decorator to accommodate file attachments as illustrated in the following Product model excerpt:

// ... [other model properties]

@adminColumn({
  type: "file",
  serialize: () => {
    console.log("serialize");
  },
})
@attachment()
public image: AttachmentContract;

// ... [other model relationships and properties]

While the files are being accepted as anticipated, persisting the model via save operations triggers a 500 Internal Server Error, stemming from the Lucid ORM. Efforts to mitigate this via additional hooks and custom serialization functions have unfortunately not borne fruit.

In light of this, I would like to inquire if there's an existing workaround or configuration that supports attachment-lite within adminjs-adonis. If such functionality is currently absent, could you guide me on how to extend the adapter to incorporate this feature? I am eager and willing to contribute to the development of this capability.

Your guidance and support would be greatly appreciated.

Thank you for your attention to this matter.

Best regards,
Adam

How to set it up?

Hey,

I tried to follow the README.md, but after I run node ace configure adminjs-adonis, I'm not sure what to do next. When I serve the adonis backend, I cannot access the /admin url. Is there something I am missing?

Unclear steps to be follwed

After running
yarn add adminjs-adonis adminjs
i amd running
node ace configure adminjs-adonis
and getting error this error
Screen Shot 2023-02-08 at 1 21 13 PM

node -v =>v16.15.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.