Processing.js Documentation
Functions
- newProduction()
Creates a new prodction and adds the card to the UI
- getProductionCards()
Loads all production cards
- loadSingleProductionCard(address, [bottle]) ⇒
Loads a single production as card
- addProductionCard(address)
Adds a card to the UI
- openProduction(address)
Opens the details modal and loads the production details
- addTransport(production)
Function to add a delivery from a transport to a production
- finish(production)
Finishes the production and disables the UI for it
- productionAsJson(production) ⇒
Loads the production details and creates a JSON file with it
- getHarvestsFromTransport(transport) ⇒
Retrieves all harvests from a transport
- currentTransport() ⇒
Fetches the current Transport
- addData(production)
Adds a transaction to a production
- getTotalTransactionCount(address) ⇒
Gets the total amount of transactions to this contract
- getTransactionSenderAtIndex(address, index) ⇒
string
Gets a specific transaction sender with an index
- getTransactionDataAtIndex(address, index) ⇒
string
Gets the data of a transaction with an index
- getTransactionTimeAtIndex(address, index) ⇒
string
Gets the timestamp of a transaction
- getAllTransactions(address) ⇒
string
Gets all transactions made to this contract
newProduction()
Creates a new prodction and adds the card to the UI
getProductionCards()
Loads all production cards
loadSingleProductionCard(address, [bottle]) ⇒
Loads a single production as card
Kind: global function Returns: The HTML object of the card
Param | Type | Default | Description |
---|---|---|---|
address | string |
The address of the production | |
[bottle] | boolean |
false |
Check if the card is loaded for the bottle section |
addProductionCard(address)
Adds a card to the UI
Kind: global function
Param | Type | Description |
---|---|---|
address | \* |
Address of the production |
openProduction(address)
Opens the details modal and loads the production details
Kind: global function
Param | Type | Description |
---|---|---|
address | \* |
The address of the production |
addTransport(production)
Function to add a delivery from a transport to a production
Kind: global function
Param | Type | Description |
---|---|---|
production | \* |
Address of the production |
finish(production)
Finishes the production and disables the UI for it
Kind: global function
Param | Type | Description |
---|---|---|
production | \* |
Address of the production |
productionAsJson(production) ⇒
Loads the production details and creates a JSON file with it
Kind: global function Returns: The JSON file
Param | Type | Description |
---|---|---|
production | string |
Address of the production |
getHarvestsFromTransport(transport) ⇒
Retrieves all harvests from a transport
Kind: global function Returns: Addresses of the harvests
Param | Type | Description |
---|---|---|
transport | string |
Address of a transport |
currentTransport() ⇒
Fetches the current Transport
Kind: global function Returns: Address of the transport
addData(production)
Adds a transaction to a production
Kind: global function
Param | Type | Description |
---|---|---|
production | string |
Address of the production |
getTotalTransactionCount(address) ⇒
Gets the total amount of transactions to this contract
Kind: global function Returns: Integer value of the total transactions
Param | Type | Description |
---|---|---|
address | string |
Address of the contract |
getTransactionSenderAtIndex(address, index) ⇒ string
Gets a specific transaction sender with an index
Kind: global function
Returns: string
- Address of the sender
Param | Type | Description |
---|---|---|
address | string |
Address of the contract |
index | string |
Integer value as index |
getTransactionDataAtIndex(address, index) ⇒ string
Gets the data of a transaction with an index
Kind: global function
Returns: string
- string of the data
Param | Type | Description |
---|---|---|
address | string |
Address of the contract |
index | Integer |
Integer value as index |
getTransactionTimeAtIndex(address, index) ⇒ string
Gets the timestamp of a transaction
Kind: global function
Returns: string
- Readable timestamp
Param | Type | Description |
---|---|---|
address | string |
Address of the contract |
index | Integer |
Integer value as index |
getAllTransactions(address) ⇒ string
Gets all transactions made to this contract
Kind: global function
Returns: string
- Json file with all transactions
Param | Type | Description |
---|---|---|
address | string |
Address of the contract |