@tuoitre/flowchart-builder

Flowchart Builder for TuoiTre ERP

Usage no npm install needed!

<script type="module">
  import tuoitreFlowchartBuilder from 'https://cdn.skypack.dev/@tuoitre/flowchart-builder';
</script>

README

@tuoitre/flowchart-builder

Flowchart Builder for TuoiTre ERP

NPM JavaScript Style Guide

Install

npm install @tuoitre/flowchart-builder

or

yarn add @tuoitre/flowchart-builder

Usage

import React from 'react'

import {TTFlow} from '@tuoitre/flowchart-builder'
import '@tuoitre/flowchart-builder/dist/index.css'

const Example = () => {
    // list permisison of current login user
    let permissions = [];
    
    // id and name of current login user
    let user = {
        id: 15,
        name: "Admin"
    };

    let url = {
        get_list_document_types: '{domain}/api/document-type/get-document-types',
        get_one_document_type: '{domain}/api/document-type/get',
        get_workflow_detail: '{domain}/api/workflow/detail',
        store_work_flow: '{domain}/api/workflow/store',
        get_list_departments: '{domain}/api/list/departments',
        get_list_positions: '{domain}/api/list/positions',
        get_list_actions_by_post_dep: '{domain}/api/permission/departments/positions',
        get_list_actions_by_post: '{domain}/api/list/permission/work-formality',
    };
    return (
        <div>
            <TTFlow urls={url} permissions={permissions} user={user}/>
        </div>
    )

}

Props

urls : Object

get_list_document_types : url get list document type

get_one_document_type : url get single document typr

get_workflow_detail : url get workflow detail

store_work_flow : url store workflow with step

get_list_departments : url get list departments

get_list_positions : url get list positions

get_list_actions_by_post_dep : url get list action by department and position

get_list_actions_by_post : url get list action by position

tableId: id of table Workflow on service-management

Repo

https://github.com/duynguyen27091997/flowchart-builder

License

MIT © duynguyen27091997