Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you give an example of the database and configuration file? #55

Open
Jortana opened this issue Aug 2, 2022 · 2 comments
Open

Comments

@Jortana
Copy link

Jortana commented Aug 2, 2022

Is your feature request related to a problem? Please describe.
Give an example of a database and configuration file.

Describe the solution you'd like
I don't know what kind of database to create if I want the page to render something (anything), I've spent a few hours trying and not succeeding, can you officially give a small example for reference?

@lyqht
Copy link

lyqht commented Aug 3, 2022

Hi @Jortana , Dashibase has a tutorial page that includes an example of the DB. Give it a read — and let the Dashibase team know if it suffices! If it's good then I'll make a PR to include a link to it in the README.

@Jortana
Copy link
Author

Jortana commented Aug 4, 2022

I followed the tutorial and then thought about rendering a little something out of it, but my page was completely blank.
My configuration file looks like this.
I'm sure the url and key are correct.

import { Page, Attribute, AttributeType, Config, Trigger } from './utils/config'

const DASHIBASE_CONFIG: Config = {
  name: 'MultiverseCRM',
  supabase_url: '',
  supabase_anon_key: ''
  pages: [
    {
      name: 'Contacts',
      page_id: 'contacts',
      table_id: 'contacts',
      mode: 'list',
      user_col: 'user',
      attributes: [
        {
          id: 'name',
          label: 'Name',
          required: false,
          readonly: false,
          type: AttributeType.Text,
          hidden: false
        },
        {
          id: 'universe',
          label: 'Universe ',
          required: false,
          readonly: false,
          type: AttributeType.Text,
          hidden: false
        }
      ] as Attribute[],
      triggers: [
        {
          label: 'My Action',
          code: 'alert(user)'
        }
      ] as Trigger[]
    }
  ] as Page[]
}

export default DASHIBASE_CONFIG


image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants