/ Kanban / Drag and drop
Search results

Drag and drop in Vue Kanban component

20 Mar 2023 / 10 minutes to read

All cards can be dragged and dropped across the columns or within the columns or swimlane row or kanban to an external source and vice versa.

The following drag and drop types are available in the Kanban board.

  • Internal drag and drop
  • Column drag and drop
  • Swimlane drag and drop
  • External drag and drop
  • Kanban to Kanban
  • Kanban to External source and vice versa.

Dropped card position varies based on the sortSettings property.

Internal drag and drop

Allows the user to drag and drop the cards within the kanban board. Based on this, we can categorize into two ways.

  • Column drag and drop
  • Swimlane drag and drop

Column drag and drop

By default, all cards can be dragged and dropped across the columns and within the columns. You cannot drag and drop the cards when disabling the allowDragAndDrop property.

You can prevent the drag or drop behavior of the particular column by disabling the allowDrag or allowDrop property. You can also control the flow of transition cards between the columns by using the transitionColumns property.

In the following example, disable the drag and drop behavior on the Kanban board.

Copied to clipboard
<template>
  <div id="app">
   <ejs-kanban id="kanban" keyField="Status" :dataSource="kanbanData"
    :cardSettings="cardSettings" :allowDragAndDrop="false">
      <e-columns>
        <e-column headerText="To Do" keyField="Open"></e-column>
        <e-column headerText="In Progress" keyField="InProgress"></e-column>
        <e-column headerText="Testing" keyField="Testing"></e-column>
        <e-column headerText="Done" keyField="Close"></e-column>
      </e-columns>
    </ejs-kanban>
  </div>
</template>

<script>
import Vue from "vue";
import { KanbanPlugin } from '@syncfusion/ej2-vue-kanban';
import { extend } from '@syncfusion/ej2-base';
import { kanbanData } from './datasource.js';
Vue.use(KanbanPlugin);
export default {
  data: function() {
return {
  kanbanData: extend([], kanbanData, null, true),
  cardSettings: {
    contentField: "Summary",
    headerField: "Id"
  }
};
  },
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-layouts/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-kanban/styles/material.css';
</style>
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.kanbanData = [
        {
            'Id': 1,
            'Status': 'Open',
            'Summary': 'Analyze the new requirements gathered from the customer.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Analyze,Customer',
            'Estimate': 3.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 2,
            'Status': 'InProgress',
            'Summary': 'Improve application performance',
            'Type': 'Improvement',
            'Priority': 'Normal',
            'Tags': 'Improvement',
            'Estimate': 6,
            'Assignee': 'Andrew Fuller',
            'RankId': 1
        },
        {
            'Id': 3,
            'Status': 'Open',
            'Summary': 'Arrange a web meeting with the customer to get new requirements.',
            'Type': 'Others',
            'Priority': 'Critical',
            'Tags': 'Meeting',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 4,
            'Status': 'InProgress',
            'Summary': 'Fix the issues reported in the IE browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'IE',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 5,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported by the customer.',
            'Type': 'Bug',
            'Priority': 'Low',
            'Tags': 'Customer',
            'Estimate': '3.5',
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 6,
            'Status': 'Close',
            'Summary': 'Arrange a web meeting with the customer to get the login page requirements.',
            'Type': 'Others',
            'Priority': 'Low',
            'Tags': 'Meeting',
            'Estimate': 2,
            'Assignee': 'Michael Suyama',
            'RankId': 1
        },
        {
            'Id': 7,
            'Status': 'Validate',
            'Summary': 'Validate new requirements',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Robert King',
            'RankId': 1
        },
        {
            'Id': 8,
            'Status': 'Close',
            'Summary': 'Login page validation',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Validation,Fix',
            'Estimate': 2.5,
            'Assignee': 'Laura Callahan',
            'RankId': 2
        },
        {
            'Id': 9,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in Safari browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'Fix,Safari',
            'Estimate': 1.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 2
        },
        {
            'Id': 10,
            'Status': 'Close',
            'Summary': 'Test the application in the IE browser.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Testing,IE',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 3
        },
        {
            'Id': 11,
            'Status': 'Validate',
            'Summary': 'Validate the issues reported by the customer.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Validation,Fix',
            'Estimate': 1,
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 12,
            'Status': 'Testing',
            'Summary': 'Check Login page validation.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Testing',
            'Estimate': 0.5,
            'Assignee': 'Michael Suyama',
            'RankId': 3
        },
        {
            'Id': 13,
            'Status': 'Open',
            'Summary': 'API improvements.',
            'Type': 'Improvement',
            'Priority': 'High',
            'Tags': 'Grid,API',
            'Estimate': 3.5,
            'Assignee': 'Robert King',
            'RankId': 3
        },
        {
            'Id': 14,
            'Status': 'InProgress',
            'Summary': 'Add responsive support to application',
            'Type': 'Epic',
            'Priority': 'Critical',
            'Tags': 'Responsive',
            'Estimate': 6,
            'Assignee': 'Laura Callahan',
            'RankId': 3
        },
        {
            'Id': 15,
            'Status': 'Open',
            'Summary': 'Show the retrieved data from the server in grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Database,SQL',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 4
        },
        {
            'Id': 16,
            'Status': 'InProgress',
            'Summary': 'Fix cannot open user’s default database SQL error.',
            'Priority': 'Critical',
            'Type': 'Bug',
            'Tags': 'Database,Sql2008',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 17,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in data binding.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Databinding',
            'Estimate': '3.5',
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 18,
            'Status': 'Close',
            'Summary': 'Analyze SQL server 2008 connection.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Grid,Sql',
            'Estimate': 2,
            'Assignee': 'Andrew Fuller',
            'RankId': 4
        },
        {
            'Id': 19,
            'Status': 'Validate',
            'Summary': 'Validate databinding issues.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 1
        },
        {
            'Id': 20,
            'Status': 'Close',
            'Summary': 'Analyze grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Analyze',
            'Estimate': 2.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 5
        },
        {
            'Id': 21,
            'Status': 'Close',
            'Summary': 'Stored procedure for initial data binding of the grid.',
            'Type': 'Others',
            'Priority': 'Release Breaker',
            'Tags': 'Databinding',
            'Estimate': 1.5,
            'Assignee': 'Steven walker',
            'RankId': 6
        },
        {
            'Id': 22,
            'Status': 'Close',
            'Summary': 'Analyze stored procedures.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Procedures',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 7
        },
        {
            'Id': 23,
            'Status': 'Validate',
            'Summary': 'Validate editing issues.',
            'Type': 'Story',
            'Priority': 'Critical',
            'Tags': 'Editing',
            'Estimate': 1,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 24,
            'Status': 'Testing',
            'Summary': 'Test editing functionality.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Editing,Test',
            'Estimate': 0.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 5
        },
        {
            'Id': 25,
            'Status': 'Open',
            'Summary': 'Enhance editing functionality.',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Editing',
            'Estimate': 3.5,
            'Assignee': 'Andrew Fuller',
            'RankId': 5
        }
    ];
});

Swimlane drag and drop

By default, Swimlane allows drag and drop across the columns within the swimlane row. Kanban does not allow dragging the cards across the swimlane rows.

Enabling the dragAndDrop property allows you to drag the cards across the swimlane rows, which is specified inside the swimlaneSettings property.

Copied to clipboard
<template>
  <div id="app">
   <ejs-kanban id="kanban" keyField="Status" :dataSource="kanbanData"
    :cardSettings="cardSettings" :swimlaneSettings="swimlaneSettings">
      <e-columns>
        <e-column headerText="To Do" keyField="Open"></e-column>
        <e-column headerText="In Progress" keyField="InProgress"></e-column>
        <e-column headerText="Testing" keyField="Testing"></e-column>
        <e-column headerText="Done" keyField="Close"></e-column>
      </e-columns>
    </ejs-kanban>
  </div>
</template>

<script>
import Vue from "vue";
import { KanbanPlugin } from '@syncfusion/ej2-vue-kanban';
import { extend } from '@syncfusion/ej2-base';
import { kanbanData } from './datasource.js';
Vue.use(KanbanPlugin);
export default {
  data: function() {
return {
  kanbanData: extend([], kanbanData, null, true),
  cardSettings: {
    contentField: "Summary",
    headerField: "Id",
  },
  swimlaneSettings: {
    keyField: 'Assignee',
    allowDragAndDrop: true
  }
};
  },
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-layouts/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-kanban/styles/material.css';
</style>
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.kanbanData = [
        {
            'Id': 1,
            'Status': 'Open',
            'Summary': 'Analyze the new requirements gathered from the customer.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Analyze,Customer',
            'Estimate': 3.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 2,
            'Status': 'InProgress',
            'Summary': 'Improve application performance',
            'Type': 'Improvement',
            'Priority': 'Normal',
            'Tags': 'Improvement',
            'Estimate': 6,
            'Assignee': 'Andrew Fuller',
            'RankId': 1
        },
        {
            'Id': 3,
            'Status': 'Open',
            'Summary': 'Arrange a web meeting with the customer to get new requirements.',
            'Type': 'Others',
            'Priority': 'Critical',
            'Tags': 'Meeting',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 4,
            'Status': 'InProgress',
            'Summary': 'Fix the issues reported in the IE browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'IE',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 5,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported by the customer.',
            'Type': 'Bug',
            'Priority': 'Low',
            'Tags': 'Customer',
            'Estimate': '3.5',
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 6,
            'Status': 'Close',
            'Summary': 'Arrange a web meeting with the customer to get the login page requirements.',
            'Type': 'Others',
            'Priority': 'Low',
            'Tags': 'Meeting',
            'Estimate': 2,
            'Assignee': 'Michael Suyama',
            'RankId': 1
        },
        {
            'Id': 7,
            'Status': 'Validate',
            'Summary': 'Validate new requirements',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Robert King',
            'RankId': 1
        },
        {
            'Id': 8,
            'Status': 'Close',
            'Summary': 'Login page validation',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Validation,Fix',
            'Estimate': 2.5,
            'Assignee': 'Laura Callahan',
            'RankId': 2
        },
        {
            'Id': 9,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in Safari browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'Fix,Safari',
            'Estimate': 1.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 2
        },
        {
            'Id': 10,
            'Status': 'Close',
            'Summary': 'Test the application in the IE browser.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Testing,IE',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 3
        },
        {
            'Id': 11,
            'Status': 'Validate',
            'Summary': 'Validate the issues reported by the customer.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Validation,Fix',
            'Estimate': 1,
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 12,
            'Status': 'Testing',
            'Summary': 'Check Login page validation.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Testing',
            'Estimate': 0.5,
            'Assignee': 'Michael Suyama',
            'RankId': 3
        },
        {
            'Id': 13,
            'Status': 'Open',
            'Summary': 'API improvements.',
            'Type': 'Improvement',
            'Priority': 'High',
            'Tags': 'Grid,API',
            'Estimate': 3.5,
            'Assignee': 'Robert King',
            'RankId': 3
        },
        {
            'Id': 14,
            'Status': 'InProgress',
            'Summary': 'Add responsive support to application',
            'Type': 'Epic',
            'Priority': 'Critical',
            'Tags': 'Responsive',
            'Estimate': 6,
            'Assignee': 'Laura Callahan',
            'RankId': 3
        },
        {
            'Id': 15,
            'Status': 'Open',
            'Summary': 'Show the retrieved data from the server in grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Database,SQL',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 4
        },
        {
            'Id': 16,
            'Status': 'InProgress',
            'Summary': 'Fix cannot open user’s default database SQL error.',
            'Priority': 'Critical',
            'Type': 'Bug',
            'Tags': 'Database,Sql2008',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 17,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in data binding.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Databinding',
            'Estimate': '3.5',
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 18,
            'Status': 'Close',
            'Summary': 'Analyze SQL server 2008 connection.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Grid,Sql',
            'Estimate': 2,
            'Assignee': 'Andrew Fuller',
            'RankId': 4
        },
        {
            'Id': 19,
            'Status': 'Validate',
            'Summary': 'Validate databinding issues.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 1
        },
        {
            'Id': 20,
            'Status': 'Close',
            'Summary': 'Analyze grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Analyze',
            'Estimate': 2.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 5
        },
        {
            'Id': 21,
            'Status': 'Close',
            'Summary': 'Stored procedure for initial data binding of the grid.',
            'Type': 'Others',
            'Priority': 'Release Breaker',
            'Tags': 'Databinding',
            'Estimate': 1.5,
            'Assignee': 'Steven walker',
            'RankId': 6
        },
        {
            'Id': 22,
            'Status': 'Close',
            'Summary': 'Analyze stored procedures.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Procedures',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 7
        },
        {
            'Id': 23,
            'Status': 'Validate',
            'Summary': 'Validate editing issues.',
            'Type': 'Story',
            'Priority': 'Critical',
            'Tags': 'Editing',
            'Estimate': 1,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 24,
            'Status': 'Testing',
            'Summary': 'Test editing functionality.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Editing,Test',
            'Estimate': 0.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 5
        },
        {
            'Id': 25,
            'Status': 'Open',
            'Summary': 'Enhance editing functionality.',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Editing',
            'Estimate': 3.5,
            'Assignee': 'Andrew Fuller',
            'RankId': 5
        }
    ];
});

External drag and drop

Allows the user to drag and drop the cards from one kanban to another kanban or Kanban to an external source and vice versa.

Kanban to kanban

Drag and drop the card from one kanban to another kanban and vice versa. This can be achieved by specifying the externalDropId property which is used to specify the id of the dropped kanban element and the dragStop event which is used to delete the card on dragged Kanban and add the card on dropped Kanban using the deleteCard and addCard public methods.

Before adding a card to dropped kanban, you can manually change the card data headerField when the same card data headerField is dropped to another Kanban.

In the following example, Drag the card from one Kanban and drop it into another kanban using the dragStop event. In this event, remove the card from the dragged Kanban by using the deleteCard public method and add the card to the dropped Kanban by using the addCard public method.

Copied to clipboard
<template>
  <div id="app">
  <div class="container-fluid">
<div class="row">
  <div class="col-sm-6">
  <h4>Kanban A</h4>
   <ejs-kanban id="kanbanA" ref="kanbanObjA" keyField="Status" :dataSource="kanbanData"
    :cardSettings="cardSettings" :externalDropId='externalKanbanADropId' :dragStop="kanbanDragStopA">
      <e-columns>
        <e-column headerText="To Do" keyField="Open"></e-column>
        <e-column headerText="Done" keyField="Close"></e-column>
      </e-columns>
    </ejs-kanban>
  </div>
  <div class="col-sm-6">
    <h4>Kanban B</h4>
    <ejs-kanban id="kanbanB" ref="kanbanObjB" keyField="Status" :dataSource="kanbanData"
    :cardSettings="cardSettings" :externalDropId='externalKanbanBDropId' :dragStop="kanbanDragStopB">
      <e-columns>
        <e-column headerText="To Do" keyField="Open"></e-column>
       <e-column headerText="Done" keyField="Close"></e-column>
      </e-columns>
    </ejs-kanban>
  </div>
</div>
  </div>
 </div>
</template>

<script>
import Vue from "vue";
import { KanbanPlugin } from '@syncfusion/ej2-vue-kanban';
import { extend, closest } from '@syncfusion/ej2-base';
import { kanbanData } from './datasource.js';
Vue.use(KanbanPlugin);
export default {
  data: function() {
return {
  kanbanData: extend([], kanbanData, null, true),
  cardSettings: {
    contentField: "Summary",
    headerField: "Id"
  },
  externalKanbanADropId: ['#kanbanB'],
  externalKanbanBDropId: ['#kanbanA']
};
  },
   methods: {
  kanbanDragStopA: function (args) {
      let kanbanBElement = closest(args.event.target as Element, '#kanbanB');
      let kanbanObjA = this.$refs.kanbanObjA.ej2Instances;
      let kanbanObjB = this.$refs.kanbanObjB.ej2Instances;
      if (kanbanBElement) {
        kanbanObjA.deleteCard(args.data);
        args.data.forEach((card, i) => {
            const index = kanbanObjB.kanbanData.findIndex((colData) =>
                colData[kanbanObjB.cardSettings.headerField] === card[kanbanObjB.cardSettings.headerField]);
            if (index !== -1) {
                card[kanbanObjB.cardSettings.headerField] = Math.max(...kanbanObjB.kanbanData.map(
                    (obj) => parseInt(obj[kanbanObjB.cardSettings.headerField], 10))) + ++i;
            }
        });
        kanbanObjB.addCard(args.data, args.dropIndex);
        args.cancel = true;
    }
  },
  kanbanDragStopB: function (args) {
    let kanbanAElement = closest(args.event.target, '#kanbanA');
    let kanbanObjA = this.$refs.kanbanObjA.ej2Instances;
    let kanbanObjB = this.$refs.kanbanObjB.ej2Instances;
    if (kanbanAElement) {
        kanbanObjB.deleteCard(args.data);
        args.data.forEach((card, i) => {
        const index = kanbanObjA.kanbanData.findIndex((colData) =>
            colData[kanbanObjA.cardSettings.headerField] === card[kanbanObjA.cardSettings.headerField]);
        if (index !== -1) {
            card[kanbanObjA.cardSettings.headerField] = Math.max(...kanbanObjA.kanbanData.map(
                (obj) => parseInt(obj[kanbanObjA.cardSettings.headerField], 10))) + ++i;
        }
    });
    kanbanObjA.addCard(args.data, args.dropIndex);
    args.cancel = true;
    }
  }
   }
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-layouts/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-kanban/styles/material.css';
.row {
  display: flex;
}
</style>
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.kanbanData = [
        {
            'Id': 1,
            'Status': 'Open',
            'Summary': 'Analyze the new requirements gathered from the customer.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Analyze,Customer',
            'Estimate': 3.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 2,
            'Status': 'InProgress',
            'Summary': 'Improve application performance',
            'Type': 'Improvement',
            'Priority': 'Normal',
            'Tags': 'Improvement',
            'Estimate': 6,
            'Assignee': 'Andrew Fuller',
            'RankId': 1
        },
        {
            'Id': 3,
            'Status': 'Open',
            'Summary': 'Arrange a web meeting with the customer to get new requirements.',
            'Type': 'Others',
            'Priority': 'Critical',
            'Tags': 'Meeting',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 4,
            'Status': 'InProgress',
            'Summary': 'Fix the issues reported in the IE browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'IE',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 2
        },
        {
            'Id': 5,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported by the customer.',
            'Type': 'Bug',
            'Priority': 'Low',
            'Tags': 'Customer',
            'Estimate': '3.5',
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 6,
            'Status': 'Close',
            'Summary': 'Arrange a web meeting with the customer to get the login page requirements.',
            'Type': 'Others',
            'Priority': 'Low',
            'Tags': 'Meeting',
            'Estimate': 2,
            'Assignee': 'Michael Suyama',
            'RankId': 1
        },
        {
            'Id': 7,
            'Status': 'Validate',
            'Summary': 'Validate new requirements',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Robert King',
            'RankId': 1
        },
        {
            'Id': 8,
            'Status': 'Close',
            'Summary': 'Login page validation',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Validation,Fix',
            'Estimate': 2.5,
            'Assignee': 'Laura Callahan',
            'RankId': 2
        },
        {
            'Id': 9,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in Safari browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'Fix,Safari',
            'Estimate': 1.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 2
        },
        {
            'Id': 10,
            'Status': 'Close',
            'Summary': 'Test the application in the IE browser.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Testing,IE',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 3
        },
        {
            'Id': 11,
            'Status': 'Validate',
            'Summary': 'Validate the issues reported by the customer.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Validation,Fix',
            'Estimate': 1,
            'Assignee': 'Steven walker',
            'RankId': 1
        },
        {
            'Id': 12,
            'Status': 'Testing',
            'Summary': 'Check Login page validation.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Testing',
            'Estimate': 0.5,
            'Assignee': 'Michael Suyama',
            'RankId': 3
        },
        {
            'Id': 13,
            'Status': 'Open',
            'Summary': 'API improvements.',
            'Type': 'Improvement',
            'Priority': 'High',
            'Tags': 'Grid,API',
            'Estimate': 3.5,
            'Assignee': 'Robert King',
            'RankId': 3
        },
        {
            'Id': 14,
            'Status': 'InProgress',
            'Summary': 'Add responsive support to application',
            'Type': 'Epic',
            'Priority': 'Critical',
            'Tags': 'Responsive',
            'Estimate': 6,
            'Assignee': 'Laura Callahan',
            'RankId': 3
        },
        {
            'Id': 15,
            'Status': 'Open',
            'Summary': 'Show the retrieved data from the server in grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Database,SQL',
            'Estimate': 5.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 4
        },
        {
            'Id': 16,
            'Status': 'InProgress',
            'Summary': 'Fix cannot open user’s default database SQL error.',
            'Priority': 'Critical',
            'Type': 'Bug',
            'Tags': 'Database,Sql2008',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 17,
            'Status': 'Testing',
            'Summary': 'Fix the issues reported in data binding.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Databinding',
            'Estimate': '3.5',
            'Assignee': 'Janet Leverling',
            'RankId': 4
        },
        {
            'Id': 18,
            'Status': 'Close',
            'Summary': 'Analyze SQL server 2008 connection.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Grid,Sql',
            'Estimate': 2,
            'Assignee': 'Andrew Fuller',
            'RankId': 4
        },
        {
            'Id': 19,
            'Status': 'Validate',
            'Summary': 'Validate databinding issues.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Validation',
            'Estimate': 1.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 1
        },
        {
            'Id': 20,
            'Status': 'Close',
            'Summary': 'Analyze grid control.',
            'Type': 'Story',
            'Priority': 'High',
            'Tags': 'Analyze',
            'Estimate': 2.5,
            'Assignee': 'Margaret hamilt',
            'RankId': 5
        },
        {
            'Id': 21,
            'Status': 'Close',
            'Summary': 'Stored procedure for initial data binding of the grid.',
            'Type': 'Others',
            'Priority': 'Release Breaker',
            'Tags': 'Databinding',
            'Estimate': 1.5,
            'Assignee': 'Steven walker',
            'RankId': 6
        },
        {
            'Id': 22,
            'Status': 'Close',
            'Summary': 'Analyze stored procedures.',
            'Type': 'Story',
            'Priority': 'Release Breaker',
            'Tags': 'Procedures',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'RankId': 7
        },
        {
            'Id': 23,
            'Status': 'Validate',
            'Summary': 'Validate editing issues.',
            'Type': 'Story',
            'Priority': 'Critical',
            'Tags': 'Editing',
            'Estimate': 1,
            'Assignee': 'Nancy Davloio',
            'RankId': 1
        },
        {
            'Id': 24,
            'Status': 'Testing',
            'Summary': 'Test editing functionality.',
            'Type': 'Story',
            'Priority': 'Normal',
            'Tags': 'Editing,Test',
            'Estimate': 0.5,
            'Assignee': 'Nancy Davloio',
            'RankId': 5
        },
        {
            'Id': 25,
            'Status': 'Open',
            'Summary': 'Enhance editing functionality.',
            'Type': 'Improvement',
            'Priority': 'Low',
            'Tags': 'Editing',
            'Estimate': 3.5,
            'Assignee': 'Andrew Fuller',
            'RankId': 5
        }
    ];
});

Treeview to Kanban

Drag the card from the Kanban board and drop it to the Treeview component and vice versa.

In the following sample, remove the data from the Kanban board using the deleteCard public method and add to the Treeview component using the addNodes public method at Kanban dragStop event when dragging the card and dropping it to the Treeview component. Remove the data from Treeview using the removeNodes public method and add to Kanban board using the openDialog public method when dragging the list from the Treeview component and dropping it to the kanban board.

Copied to clipboard
<template>
  <div id="app">
  <div class="container-fluid">
<div class="row">
  <div class="col-sm-6">
    <h4>Kanban</h4>
   <ejs-kanban id="kanban" ref="kanbanObj" keyField="Status" :dataSource="kanbanData"
    :cardSettings="cardSettings" :externalDropId='externalKanbanDropId' :dragStop="kanbanDragStop">
      <e-columns>
        <e-column headerText="To Do" keyField="Open"></e-column>
        <e-column headerText="Done" keyField="Close"></e-column>
      </e-columns>
    </ejs-kanban>
    </div>
  <div class="col-sm-6">
    <h4>TreeView</h4>
        <ejs-treeview id='treeView' ref="treeViewObj" :nodeTemplate="treeTemplate" :fields='treeViewFields' :allowDragAndDrop=true :nodeDragStop="onItemDragStop"></ejs-treeview>
    </div>
</div>
  </div>
</div>
</template>

<script>
import Vue from "vue";
import { KanbanPlugin } from '@syncfusion/ej2-vue-kanban';
import { extend, closest } from '@syncfusion/ej2-base';
import { kanbanData, treeViewData } from './datasource.js';
Vue.use(KanbanPlugin);
import { TreeViewPlugin } from "@syncfusion/ej2-vue-navigations";
Vue.use(TreeViewPlugin);

 var treeVue = Vue.component("tree-template", {
    template: '<div id="treelist"><div id="treeviewlist">{{data.Id}} - {{data.Status}}</div></div>',
    data() {
        return {
            data: {}
        };
    }
});
export default {
  data: function() {
return {
  kanbanData: extend([], kanbanData, null, true),
  cardSettings: {
    contentField: "Summary",
    headerField: "Id"
  },
  externalKanbanDropId: ['#treeView'],
  treeViewFields: { dataSource: treeViewData, id: 'Id', text: 'Status' },
  treeTemplate: function(e) {
      return { template: treeVue }
  }
};
  },
   methods: {
  kanbanDragStop: function (args) {
      let treeViewElement = closest(args.event.target as Element, '#treeView');
      let kanbanObj = this.$refs.kanbanObj.ej2Instances;
      let treeObj = this.$refs.treeViewObj.ej2Instances;
      if (treeViewElement) {
        kanbanObj.deleteCard(args.data);
        treeObj.addNodes(args.data);
        args.cancel = true;
      }
  },
  onItemDragStop: function (args) {
    let kanbanElement = closest(args.event.target as Element, '#kanban');
    let kanbanObj = this.$refs.kanbanObj.ej2Instances;
    let treeObj = this.$refs.treeViewObj.ej2Instances;
    if (kanbanElement) {
      let treeData =
        treeObj.fields.dataSource as { [key: string]: Object }[];
      const filteredData =
        treeData.filter((item) => item.Id === parseInt(args.draggedNodeData.id as string, 10));
      treeObj.removeNodes([args.draggedNodeData.id] as string[]);
      kanbanObj.openDialog('Add', filteredData[0]);
      args.cancel = true;
    }
  }
   }
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-layouts/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-kanban/styles/material.css';
.row {
  display: flex;
}
</style>
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.kanbanData = [
        {
            'Id': 1,
            'Status': 'Open',
            'Summary': 'Analyze the new requirements gathered from the customer.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Analyze,Customer',
            'Estimate': 3.5,
            'Assignee': 'Andrew Fuller',
            'AssigneeName': 'Andrew',
            'RankId': 1
        },
        {
            'Id': 2,
            'Status': 'Close',
            'Summary': 'Improve application performance',
            'Type': 'Improvement',
            'Priority': 'Normal',
            'Tags': 'Improvement',
            'Estimate': 6,
            'Assignee': 'Andrew Fuller',
            'AssigneeName': 'Andrew',
            'RankId': 1
        },
        {
            'Id': 3,
            'Status': 'Open',
            'Summary': 'Arrange a web meeting with the customer to get new requirements.',
            'Type': 'Others',
            'Priority': 'Critical',
            'Tags': 'Meeting',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'AssigneeName': 'Janet',
            'RankId': 2
        },
        {
            'Id': 4,
            'Status': 'Close',
            'Summary': 'Fix the issues reported in the IE browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'IE',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'AssigneeName': 'Janet',
            'RankId': 2
        },
        {
            'Id': 5,
            'Status': 'Close',
            'Summary': 'Fix the issues reported by the customer.',
            'Type': 'Bug',
            'Priority': 'Low',
            'Tags': 'Customer',
            'Estimate': '3.5',
            'Assignee': 'Steven walker',
            'AssigneeName': 'Steven',
            'RankId': 1
        }
    ];
    exports.treeViewData = [
        {
            'Id': 11,
            'Status': 'Open',
            'Summary': 'Analyze the new requirements gathered from the customer.',
            'Type': 'Story',
            'Priority': 'Low',
            'Tags': 'Analyze,Customer',
            'Estimate': 3.5,
            'Assignee': 'Andrew Fuller',
            'AssigneeName': 'Andrew',
            'RankId': 1
        },
        {
            'Id': 12,
            'Status': 'Close',
            'Summary': 'Improve application performance',
            'Type': 'Improvement',
            'Priority': 'Normal',
            'Tags': 'Improvement',
            'Estimate': 6,
            'Assignee': 'Andrew Fuller',
            'AssigneeName': 'Andrew',
            'RankId': 1
        },
        {
            'Id': 13,
            'Status': 'Open',
            'Summary': 'Arrange a web meeting with the customer to get new requirements.',
            'Type': 'Others',
            'Priority': 'Critical',
            'Tags': 'Meeting',
            'Estimate': 5.5,
            'Assignee': 'Janet Leverling',
            'AssigneeName': 'Janet',
            'RankId': 2
        },
        {
            'Id': 14,
            'Status': 'Close',
            'Summary': 'Fix the issues reported in the IE browser.',
            'Type': 'Bug',
            'Priority': 'Release Breaker',
            'Tags': 'IE',
            'Estimate': 2.5,
            'Assignee': 'Janet Leverling',
            'AssigneeName': 'Janet',
            'RankId': 2
        },
        {
            'Id': 15,
            'Status': 'Close',
            'Summary': 'Fix the issues reported by the customer.',
            'Type': 'Bug',
            'Priority': 'Low',
            'Tags': 'Customer',
            'Estimate': '3.5',
            'Assignee': 'Steven walker',
            'AssigneeName': 'Steven',
            'RankId': 1
        }
    ]
});

Schedule to Kanban

Drag the card from the Kanban board and drop it to the Schedule component and vice versa.

In the following sample, remove the data from the Kanban board using the deleteCard public method and add to the schedule component using the addNodes public method at Kanban dragStop event when dragging the card and dropping it to the Treeview component. Remove the data from Treeview using the removeNodes public method and add to Kanban board using the addCard public method when dragging the list from the Treeview component and dropping it to the kanban board.

Copied to clipboard
<template>
  <div id="app">
  <div class="container-fluid">
<div class="row">
  <div class="col-sm-6" style="width: 30%">
    <h4>Kanban</h4>
   <ejs-kanban id="kanban" ref="kanbanObj" keyField="DepartmentName" :dataSource="kanbanData"
    :cardSettings="cardSettings" :externalDropId='externalKanbanDropId' :dragStop="kanbanDragStop">
      <e-columns>
        <e-column headerText="GENERAL" keyField="GENERAL"></e-column>
      </e-columns>
    </ejs-kanban>
  </div>
  <div class="col-sm-6"  style="width: 70%">
    <h4>TreeView</h4>
      <ejs-schedule id='schedule' ref="scheduleObj" height="650px" :cssClass='cssClass' :selectedDate='selectedDate' :eventSettings='eventSettings'
              :group='group' :currentView='currentView' :resourceHeaderTemplate='resourceHeaderTemplate' :dragStop="onItemDragStop">
              <e-views>
                  <e-view option="TimelineDay"></e-view>
                  <e-view option="TimelineMonth"></e-view>
              </e-views>
              <e-resources>
                  <e-resource field='DepartmentID' title='Department' name='Departments' :dataSource='departmentDataSource'
                      textField='Text' idField='Id' colorField='Color'>
                  </e-resource>
                  <e-resource field='ConsultantID' title='Consultant' name='Consultants' :dataSource='consultantDataSource'
                      textField='Text' idField='Id' groupIDField='GroupId' colorField='Color'>
                  </e-resource>
              </e-resources>
          </ejs-schedule>
    </div>
</div>
  </div>
</div>
</template>

<script>
import Vue from "vue";
import { KanbanPlugin } from '@syncfusion/ej2-vue-kanban';
import { extend, closest } from '@syncfusion/ej2-base';
import { kanbanData, scheduleData } from './datasource.js';
Vue.use(KanbanPlugin);
import { SchedulePlugin, TimelineViews, TimelineMonth, View, Resize, DragAndDrop } from "@syncfusion/ej2-vue-schedule";
Vue.use(SchedulePlugin);

var resourceHeaderVue = Vue.component("resource-headerTemplate", {
  template: '<div className="template-wrap"><div class="specialist-category"><div v-if=getConsultantImageName(data)></div><div class="specialist-name">' +
            '{{getConsultantName(data)}}</div><div class="specialist-designation">{{getConsultantDesignation(data)}}</div></div></div>',
  data() {
      return {
          data: {}
      };
  },
  methods: {
      getConsultantName: function (data) {
          let value = JSON.parse(JSON.stringify(data));
          return (value.resourceData) ? value.resourceData[value.resource.textField] : value.resourceName;
      },
      getConsultantImageName: function (data) {
          let value = JSON.parse(JSON.stringify(data));
          let resourceName = (value.resourceData) ? value.resourceData[value.resource.textField] : value.resourceName;
          if (resourceName === 'GENERAL' || resourceName === 'DENTAL') {
              return false;
          } else {
              return true;
          }
      },
      getConsultantDesignation: function (data) {
          let value = JSON.parse(JSON.stringify(data));
          var resourceName = value.resourceData[value.resource.textField];
          if (resourceName === "GENERAL" || resourceName === "DENTAL") {
              return '';
          } else {
              return value.resourceData.Designation;
          }
      }
  }
});

export default {
  data: function() {
return {
  kanbanData: extend([], kanbanData, null, true),
  cardSettings: {
    contentField: "Name",
    headerField: "Id"
  },
  externalKanbanDropId: ['#schedule'],
  eventSettings: {
      dataSource: extend([], scheduleData, null, true),
      fields: {
          subject: { title: 'Patient Name', name: 'Name' },
          startTime: { title: "From", name: "StartTime" },
          endTime: { title: "To", name: "EndTime" },
          description: { title: 'Reason', name: 'Description' }
      },
  },
  selectedDate: new Date(2018, 7, 1),
  currentView: 'TimelineDay',
  cssClass: 'schedule-drag-drop',
  group: {
      enableCompactView: false,
      resources: ['Departments', 'Consultants']
  },
  departmentDataSource: [
      { Text: 'GENERAL', Id: 1, Color: '#bbdc00' },
      { Text: 'DENTAL', Id: 2, Color: '#9e5fff' }
  ],
  consultantDataSource: [
      { Text: 'Alice', Id: 1, GroupId: 1, Color: '#bbdc00', Designation: 'Cardiologist' },
      { Text: 'Nancy', Id: 2, GroupId: 2, Color: '#9e5fff', Designation: 'Orthodontist' },
      { Text: 'Robert', Id: 3, GroupId: 1, Color: '#bbdc00', Designation: 'Optometrist' },
      { Text: 'Robson', Id: 4, GroupId: 2, Color: '#9e5fff', Designation: 'Periodontist' },
      { Text: 'Laura', Id: 5, GroupId: 1, Color: '#bbdc00', Designation: 'Orthopedic' },
      { Text: 'Margaret', Id: 6, GroupId: 2, Color: '#9e5fff', Designation: 'Endodontist' }
  ],
  resourceHeaderTemplate: function (e) {
      return { template: resourceHeaderVue }
  }
};
  },
  methods: {
 kanbanDragStop: function (args) {
    let scheduleElement: Element = closest(args.event.target as Element, '#schedule');
    let kanbanObj = this.$refs.kanbanObj.ej2Instances;
    let scheduleObj = this.$refs.scheduleObj.ej2Instances;
    if (scheduleElement) {
        kanbanObj.deleteCard(args.data);
        scheduleObj.openEditor(args.data[0], 'Add', true);
        args.cancel = true;
    }
  },
  onItemDragStop: function (args) {
    let kanbanElement: Element = closest(args.event.target as Element, '#kanban');
    let kanbanObj = this.$refs.kanbanObj.ej2Instances;
    let scheduleObj = this.$refs.scheduleObj.ej2Instances;
    if (kanbanElement) {
        scheduleObj.deleteEvent(args.data.Id);
         removeClass([scheduleObj.element.querySelector('.e-selected-cell')], 'e-selected-cell');
         kanbanObj.openDialog('Add', args.data);
         args.cancel = true;
    }
  }
   },
   provide: {
  schedule: [TimelineViews, TimelineMonth, Resize, DragAndDrop]
   }
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-layouts/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material.css';
@import '../node_modules/@syncfusion/ej2-excel-export/styles/material.css';
@import '../node_modules/@syncfusion/ej2-file-utils/styles/material.css';
@import '../node_modules/@syncfusion/ej2-schedule/styles/material.css';
@import '../node_modules/@syncfusion/ej2-compression/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-kanban/styles/material.css';
.row {
  display: flex;
}
</style>
Copied to clipboard
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.kanbanData = [
        {
            "Id": 101,
            "Name": "David",
            "StartTime": "2018-08-01T03:30:00.000Z",
            "EndTime": "2018-08-01T04:30:00.000Z",
            "Description": "Health Checkup",
            "DepartmentID": 1,
            "ConsultantID": 1,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 111,
            "Name": "John",
            "StartTime": "2018-08-01T05:00:00.000Z",
            "EndTime": "2018-08-01T06:00:00.000Z",
            "Description": "Tooth Erosion",
            "DepartmentID": 2,
            "ConsultantID": 2,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 121,
            "Name": "Peter",
            "StartTime": "2018-08-01T06:30:00.000Z",
            "EndTime": "2018-08-01T07:30:00.000Z",
            "Description": "Eye and Spectacles Checkup",
            "DepartmentID": 1,
            "ConsultantID": 3,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 131,
            "Name": "Starc",
            "StartTime": "2018-08-01T08:30:00.000Z",
            "EndTime": "2018-08-01T09:30:00.000Z",
            "Description": "Toothaches",
            "DepartmentID": 2,
            "ConsultantID": 4,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 141,
            "Name": "James",
            "StartTime": "2018-08-01T04:30:00.000Z",
            "EndTime": "2018-08-01T05:30:00.000Z",
            "Description": "Surgery Appointment",
            "DepartmentID": 1,
            "ConsultantID": 5,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 151,
            "Name": "Jercy",
            "StartTime": "2018-08-01T04:00:00.000Z",
            "EndTime": "2018-08-01T05:00:00.000Z",
            "Description": "Tooth Sensitivity",
            "DepartmentID": 2,
            "ConsultantID": 6,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 161,
            "Name": "Albert",
            "StartTime": "2018-08-02T04:30:00.000Z",
            "EndTime": "2018-08-02T06:00:00.000Z",
            "Description": "Skin care treatment",
            "DepartmentID": 1,
            "ConsultantID": 7,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 171,
            "Name": "Louis",
            "StartTime": "2018-08-02T07:00:00.000Z",
            "EndTime": "2018-08-02T08:15:00.000Z",
            "Description": "General Checkup",
            "DepartmentID": 1,
            "ConsultantID": 9,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 181,
            "Name": "Williams",
            "StartTime": "2018-08-02T06:30:00.000Z",
            "EndTime": "2018-08-02T08:30:00.000Z",
            "Description": "Mouth Sores",
            "DepartmentID": 2,
            "ConsultantID": 10,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 191,
            "Name": "David",
            "StartTime": "2018-08-02T11:00:00.000Z",
            "EndTime": "2018-08-02T12:45:00.000Z",
            "Description": "Eye checkup and Treatment",
            "DepartmentID": 1,
            "ConsultantID": 1,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 201,
            "Name": "John",
            "StartTime": "2018-08-02T14:00:00.000Z",
            "EndTime": "2018-08-02T16:15:00.000Z",
            "Description": "Toothaches",
            "DepartmentID": 2,
            "ConsultantID": 2,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 211,
            "Name": "Peter",
            "StartTime": "2018-08-03T12:00:00.000Z",
            "EndTime": "2018-08-03T14:00:00.000Z",
            "Description": "Surgery Treatment",
            "DepartmentID": 1,
            "ConsultantID": 3,
            "DepartmentName": "GENERAL"
        }
    ];
    exports.scheduleData = [
        {
            "Id": 10,
            "Name": "David",
            "StartTime": "2018-08-01T03:30:00.000Z",
            "EndTime": "2018-08-01T04:30:00.000Z",
            "Description": "Health Checkup",
            "DepartmentID": 1,
            "ConsultantID": 1,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 11,
            "Name": "John",
            "StartTime": "2018-08-01T05:00:00.000Z",
            "EndTime": "2018-08-01T06:00:00.000Z",
            "Description": "Tooth Erosion",
            "DepartmentID": 2,
            "ConsultantID": 2,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 12,
            "Name": "Peter",
            "StartTime": "2018-08-01T06:30:00.000Z",
            "EndTime": "2018-08-01T07:30:00.000Z",
            "Description": "Eye and Spectacles Checkup",
            "DepartmentID": 1,
            "ConsultantID": 3,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 13,
            "Name": "Starc",
            "StartTime": "2018-08-01T08:30:00.000Z",
            "EndTime": "2018-08-01T09:30:00.000Z",
            "Description": "Toothaches",
            "DepartmentID": 2,
            "ConsultantID": 4,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 14,
            "Name": "James",
            "StartTime": "2018-08-01T04:30:00.000Z",
            "EndTime": "2018-08-01T05:30:00.000Z",
            "Description": "Surgery Appointment",
            "DepartmentID": 1,
            "ConsultantID": 5,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 15,
            "Name": "Jercy",
            "StartTime": "2018-08-01T04:00:00.000Z",
            "EndTime": "2018-08-01T05:00:00.000Z",
            "Description": "Tooth Sensitivity",
            "DepartmentID": 2,
            "ConsultantID": 6,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 16,
            "Name": "Albert",
            "StartTime": "2018-08-02T04:30:00.000Z",
            "EndTime": "2018-08-02T06:00:00.000Z",
            "Description": "Skin care treatment",
            "DepartmentID": 1,
            "ConsultantID": 7,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 17,
            "Name": "Louis",
            "StartTime": "2018-08-02T07:00:00.000Z",
            "EndTime": "2018-08-02T08:15:00.000Z",
            "Description": "General Checkup",
            "DepartmentID": 1,
            "ConsultantID": 9,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 18,
            "Name": "Williams",
            "StartTime": "2018-08-02T06:30:00.000Z",
            "EndTime": "2018-08-02T08:30:00.000Z",
            "Description": "Mouth Sores",
            "DepartmentID": 2,
            "ConsultantID": 10,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 19,
            "Name": "David",
            "StartTime": "2018-08-02T11:00:00.000Z",
            "EndTime": "2018-08-02T12:45:00.000Z",
            "Description": "Eye checkup and Treatment",
            "DepartmentID": 1,
            "ConsultantID": 1,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 20,
            "Name": "John",
            "StartTime": "2018-08-02T14:00:00.000Z",
            "EndTime": "2018-08-02T16:15:00.000Z",
            "Description": "Toothaches",
            "DepartmentID": 2,
            "ConsultantID": 2,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 21,
            "Name": "Peter",
            "StartTime": "2018-08-03T12:00:00.000Z",
            "EndTime": "2018-08-03T14:00:00.000Z",
            "Description": "Surgery Treatment",
            "DepartmentID": 1,
            "ConsultantID": 3,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 22,
            "Name": "Starc",
            "StartTime": "2018-08-04T13:00:00.000Z",
            "EndTime": "2018-08-04T16:00:00.000Z",
            "Description": "Tooth Decay",
            "DepartmentID": 2,
            "ConsultantID": 4,
            "DepartmentName": "DENTAL"
        }, {
            "Id": 23,
            "Name": "James",
            "StartTime": "2018-08-03T13:30:00.000Z",
            "EndTime": "2018-08-03T15:30:00.000Z",
            "Description": "General Checkup",
            "DepartmentID": 1,
            "ConsultantID": 5,
            "DepartmentName": "GENERAL"
        }, {
            "Id": 24,
            "Name": "Jercy",
            "StartTime": "2018-08-04T14:30:00.000Z",
            "EndTime": "2018-08-04T16:30:00.000Z",
            "Description": "Tooth Erosion",
            "DepartmentID": 2,
            "ConsultantID": 6,
            "DepartmentName": "DENTAL"
        }
    ];
});