btaskee-sdk-src-booking-rn
TypeScript icon, indicating that this package has built-in type declarations

1.12.0-beta-0.1.3 • Public • Published

btaskee-sdk-src-booking-rn

PRs Welcome License MIT

Installation

App requires Node.js v13+ to run.

Using npm:

npm reset

Using yarn:

yarn reset

Run

On IOS On Android

Start Server

Server Asker (start MongoDB and API testing).

Clone https://bitbucket.org/lanterns/unicorn-asker/src/feature-mockAPI/ branch feature-mockAPI Start server

npm start
Server Golang (start API)

Clone https://gitlab.com/btaskee/go-testing-app-asker branch master Start server

./run-service.sh

Troubleshooting

When installing or runing app, you may encounter the following problems: Not connected with server Edit file dev.env with key

  • SERVER_API_IP=[my ip]
  • AUTH_CODE=[authentication code of mini app]
  • FROM_PARTNER=[from parent app]
npm install btaskee-sdk-src-booking-rn

Usage

IMPORT
import { BtaskeeSDKBooking } from 'btaskee-sdk-src-booking-rn';
RENDER

return (
        <BtaskeeSDKBooking 
            params={{
                id_service: id_service,   //  default is '636211053a8feeea7ee24769'
                userInfor: {
                    name: "test",   // username on the app or the name in the btaskee system
                    phone: "0123456789",  // the phone number on the app or the phone number in the btaskee system
                    address: {  // the address provided on the application or the address already in the btaskee system
                      address: "Đường Nguyễn Huệ, Bến Nghé, Quận 1, Thành phố Hồ Chí Minh, Việt Nam",
                      city: "Hồ Chí Minh",
                      country: "VN",
                      district: "Quận 1",
                      lat: 10.7740739,
                      lng: 106.703627,
                      shortAddress: "Đường Nguyễn Huệ Bến Nghé",
                    }
                },
            }}
            navigator={navigator} //  navigator to push through the required screen 
         />
)
enum navigator : navigator.push to screen new
  this.props.navigator.push({  // actually this navigator's 
    screen: "ExampleScreen",
    options: { title: "Exampe" },
  });

enum userInfor  
{
    name: 'test',
    phone: '0123456789',
    address: {
      address: "Đường Nguyễn Huệ, Bến Nghé, Quận 1, Thành phố Hồ Chí Minh, Việt Nam",
      city: "Hồ Chí Minh",
      country: "VN",
      district: "Quận 1",
      lat: 10.7740739,
      lng: 106.703627,
      shortAddress: "Đường Nguyễn Huệ Bến Nghé",
    }
}

id_service: id of each service
enum id_service  
{
    house_cleaning: '636211053a8feeea7ee24769',
    deep_cleaning: '636211053a8feeea7ee2476c',
    ac_cleaning: '636211053a8feeea7ee24768',
}
enum refName  
{
    DEFAULT: 'house_cleaning', 
    deep_cleaning: 'deep_cleaning',
    ac_cleaning: 'ac_cleaning',
}
enum title  
{
    house_cleaning: 'Dọn dẹp nhà',
    deep_cleaning: 'Tổng vệ sinh',
    ac_cleaning: 'Vệ sinh máy lạnh',
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i btaskee-sdk-src-booking-rn

Weekly Downloads

1

Version

1.12.0-beta-0.1.3

License

MIT

Unpacked Size

10.6 MB

Total Files

842

Last publish

Collaborators

  • manhcuong.nguyen