Setting up
To setup your admin panel, just open settings.js .
Firebase setup
To connect to your Firebase intance.
NOTE: Be carefull on the ".
It has to be
"apiKey": "YOUR API KEY",
and not
apiKey: "YOUR API KEY",
.
Google Firebase by default will give you without ".
Go in your firebase console and grab the web settings.
"apiKey": "YOUR API KEY",
"authorizationPushKey": "YOUR API KEY",
"authDomain": "YOUR DOMAIN",
"databaseURL": "YOUR DB URL",
"storageBucket": "YOUR BUCKET",
"messagingSenderId": "SENDER ID",
Add Firebase menu
Add new navigation item that connects to your Firebase at specific path.
- link - Is the file that will be open when clicked. For firebase scren enter firebase.php
- path - Is the actual path got from firebase live database
- name - Is the name of the menu
- schema - Schema for this entity, can be null - if null, adding new items will not work
- icon - font awesome icon
- tableFields - Desired table fields, if empty, first 5 will be used
- prefixForJoin - Display firebase object in table if it's key start with this string.
{"-KX":"orders"}
"-KX" is the prefix and "orders" is the name of the table
Example for Firebase menu
{
"link": "firebase.php",
"path": "Categories",
"name": "Menu",
"schema":{"items":[{"name":"Category name","description":"Category description","photo":"","items":[{"description":"Item description","info":{"Calories":""},"name":"Item name","photo":"","price":"12.00 $","prices":[{"price_info":"Price info","price_name":"Price name","price_value":"12"}]}]}]},
"icon":"list-alt",
"tableFields":["name","description"],
"prefixForJoin":{"-KX":"orders"}
}
Example for normal menu
{
"link": "index.php",
"name": "Dashboard",
"schema":null,
"icon":"home"
},
Define fields
In settings.js define your fields to play special action.
- photoFields - Enter the keys of the fields that you want to become image pickers. You can list more than one. Images are uploaded on Firebase storage.
- dropdowns - Set all the values of select HTML component. You can defined more than one drop down.
- pushTopics - list your firebase notifications subscription topics
"photoFields":["photo"],
"dropdowns":["status"],
"dropdownOptions":[{"key":"status","options"["new","processing","rejected","completed"]}],
"pushTopics":["promo","news"],