2.2.6 • Published 5 months ago

@tickid/tickid-rada v2.2.6

Weekly downloads
2
License
ISC
Repository
gitlab
Last release
5 months ago

tickid-rada

Module React Native for Rada

Demo

npm.io

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

PropertyTypeDefaultDescription
partnerAuthorizationStringnullThe id of customer (rada provided). (required)
defaultLocationStringnullDefault customer's location in latitude, longitude (e.g. '21.034519,105.365196'). (required)
webhookUrlStringnullThe customer's webhook - units that integrate this package, to record successful booking information. (optional)

<Category>

PropertyTypeDefaultDescription
onPressItemFunction() => {}Called when caterogy item onpress. (optional)

<ListService>

PropertyTypeDefaultDescription
keywordString""The keyword of service for search. (optional)
pageStyle0Default page number of service list. (optional)
limitnumber20Number of services per page, maximum 40. (optional)
onPressItemFunction() => {}Called when service item onpress. (optional)
onPressCartImageFunction() => {}Called when cart button press. (optional)

<ServiceDetail>

PropertyTypeDefaultDescription
onPressOrderFunction() => {}Called when order button onpress. (optional)
onPressLinkFunction() => {}Called when onpress link in html content. (optional)

<Booking>

PropertyTypeDefaultDescription
customerNameString""Name of customer. (optional)
phoneString""Phone number of customer. (optional)
addressString""Address of customer. (optional)
onBookingSuccessFunction() => {}Called when booking success. (optional)
onBookingFailFunction() => {}Called when booking fail. (optional)
onCallWebHookSuccessFunction() => {}Called when call webhook success. (optional)
onCallWebHookFailFunction() => {}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