Code Monkey home page Code Monkey logo

kb_client's Introduction

KB-Client - Kanboard Frontend

Kanboard frontend UI powered by Webix

Screenshot

Project list Task list Task detail

Desktop page

Installation

1. Build app

npm run buildconf --endpoint=http://your-kanboard-endpoint.com

2. Copy all inside www folder to your webserver app

Ok done, run

or

Using Docker

docker run --rm --name kbclient -p 8085:80 -d -e "API_SERVER=http://localhost/kanboard" finzaiko/kb_client:1.0

and open in browser: http://localhost:8085

Try on development

Clone this repository and run:

npm i
npm start

API Modification

1. Allow cross origin

Replace <rootpath>/jsonrpc.php to this:

require __DIR__.'/app/common.php';

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: ACCEPT, ORIGIN, X-REQUESTED-WITH, CONTENT-TYPE, AUTHORIZATION');
if ("OPTIONS" === $_SERVER['REQUEST_METHOD']) {
    die();
}

echo $container['api']->execute();

2. Update extendedQuery

Change extendedQuery to addional usefull field method in kanboard/app/Model/TaskFinderModel.php

 public function getExtendedQuery()
    {
        return $this->db
            ->table(TaskModel::TABLE)
            ->columns(
                ...
                ProjectModel::TABLE.'.name AS project_name',
                ...
                'uc.username AS creator_username', // <-- new
                'uc.name AS creator_name' // <-- new
                )
            ->join(UserModel::TABLE, 'id', 'owner_id', TaskModel::TABLE)
            ...
    }

3. Update get task query

Change getAll method in kanboard/app/Model/TaskFinderModel.php to this to get all available joined data

public function getAll($project_id, $status_id = TaskModel::STATUS_OPEN)
{
    return
        $this->getExtendedQuery() // <-- new
        ->eq(TaskModel::TABLE.'.project_id', $project_id)
        ->eq(TaskModel::TABLE.'.is_active', $status_id)
        ->desc(TaskModel::TABLE.'.id') // order last update on top
        ->findAll();
}

4. Update get task by id query

Change getAll method in kanboard/app/Model/TaskFinderModel.php to this to get by id joined data

public function getById($task_id)
{
    return  $this->getExtendedQuery() // <-- new
        ->eq(TaskModel::TABLE.'.id', $task_id)->findOne();
}

kb_client's People

Contributors

finzaiko avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.