2.2.6 • Published 5 months ago
@tickid/tickid-rada v2.2.6
tickid-rada
Module React Native for Rada
Demo
Installation
Yarn:
$ npm i @tickid/tickid-rada --save
or NPM:
$ yarn add @tickid/tickid-rada
Usage
Sample code to use this simple library:
import React, { Component } from 'react';
import {
Router,
Stack,
Scene,
} from 'react-native-router-flux';
import TickIDRada from '@tickid/tickid-rada';
export default class RadaExample extends Component {
constructor(properties) {
super(properties);
let config = {
partnerAuthorization: 'partnerAuthorization',
webhookUrl: 'webhookUrl',
defaultLocation: 'defaultLocation'
};
TickIDRada.init(config);
}
render() {
return (
<Router
store={store}
backAndroidHandler={this.backAndroidHandler.bind(this)}
onStateChange={(prevState, newState, action) => {
handleStatusBarStyle(prevState, newState, action);
}}
>
<Stack key="tickidRada">
<Scene
key="tickidRada1"
component={TickIDRada.Category}
{...navBarConfig}
back
/>
</Stack>
<Stack key="tickidRadaListService">
<Scene
key="tickidRadaListService1"
component={TickIDRada.ListService}
{...navBarConfig}
back
/>
</Stack>
<Stack key="tickidRadaServiceDetail">
<Scene
key="tickidRadaServiceDetail1"
component={TickIDRada.ServiceDetail}
{...navBarConfig}
back
/>
</Stack>
<Stack key="tickidRadaBooking">
<Scene
key="tickidRadaBooking1"
component={TickIDRada.Booking}
{...navBarConfig}
back
/>
</Stack>
</Router>
);
}
}
Props:
init
Property | Type | Default | Description |
---|---|---|---|
partnerAuthorization | String | null | The id of customer (rada provided). (required) |
defaultLocation | String | null | Default customer's location in latitude, longitude (e.g. '21.034519,105.365196'). (required) |
webhookUrl | String | null | The customer's webhook - units that integrate this package, to record successful booking information. (optional) |
<Category>
Property | Type | Default | Description |
---|---|---|---|
onPressItem | Function | () => {} | Called when caterogy item onpress. (optional) |
<ListService>
Property | Type | Default | Description |
---|---|---|---|
keyword | String | "" | The keyword of service for search. (optional) |
page | Style | 0 | Default page number of service list. (optional) |
limit | number | 20 | Number of services per page, maximum 40. (optional) |
onPressItem | Function | () => {} | Called when service item onpress. (optional) |
onPressCartImage | Function | () => {} | Called when cart button press. (optional) |
<ServiceDetail>
Property | Type | Default | Description |
---|---|---|---|
onPressOrder | Function | () => {} | Called when order button onpress. (optional) |
onPressLink | Function | () => {} | Called when onpress link in html content. (optional) |
<Booking>
Property | Type | Default | Description |
---|---|---|---|
customerName | String | "" | Name of customer. (optional) |
phone | String | "" | Phone number of customer. (optional) |
address | String | "" | Address of customer. (optional) |
onBookingSuccess | Function | () => {} | Called when booking success. (optional) |
onBookingFail | Function | () => {} | Called when booking fail. (optional) |
onCallWebHookSuccess | Function | () => {} | Called when call webhook success. (optional) |
onCallWebHookFail | Function | () => {} | Called when call webhook fail. (optional) |
2.2.6
5 months ago
2.2.5
4 years ago
2.2.4
4 years ago
2.2.3
4 years ago
2.2.1
4 years ago
2.2.2
4 years ago
2.2.0
4 years ago
2.1.9
4 years ago
2.1.8
4 years ago
2.1.7
4 years ago
2.1.6
4 years ago
2.1.5
4 years ago
2.1.4
4 years ago
2.1.3
4 years ago
2.1.2
4 years ago
2.1.2-Th
4 years ago
2.1.1
4 years ago
2.1.0
4 years ago
2.0.8
4 years ago
2.0.7
5 years ago
2.0.6
5 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.0
5 years ago